Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

quiq-chat

Package Overview
Dependencies
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quiq-chat - npm Package Compare versions

Comparing version 1.8.90 to 1.8.91

25

build/quiq-chat.js

@@ -143,2 +143,3 @@ 'use strict';

var noOfErrors = 0;
var stubbornFetch = (function (url, fetchRequest) {

@@ -173,3 +174,12 @@ var retryCount = 0;

}
if (noOfErrors > 100) {
window.clearTimeout(timerId);
burnItDown();
if (callbacks.onBurn) {
callbacks.onBurn();
}
return reject();
}
delayIfNeeded().then(function () {

@@ -189,2 +199,12 @@ return fetch(url, fetchRequest).then(function (response) {

if (response.status === 401) {
if (url === getSessionApiUrl()) {
window.clearTimeout(timerId);
burnItDown();
if (callbacks.onBurn) {
callbacks.onBurn();
}
return reject(response);
}
if (url.includes('/session/web/generate') && fetchRequest.method && fetchRequest.method.toUpperCase() === 'POST') {

@@ -202,2 +222,3 @@ if (callbacks.onError) {

noOfErrors++;
return login().then(validateSession).then(request);

@@ -213,2 +234,3 @@ }

retryCount++;
noOfErrors++;
return request();

@@ -239,2 +261,3 @@ }

retryCount++;
noOfErrors++;
return request();

@@ -258,3 +281,3 @@ }

var version = "1.8.90";
var version = "1.8.91";

@@ -261,0 +284,0 @@ //

2

package.json
{
"name": "quiq-chat",
"version": "1.8.90",
"version": "1.8.91",
"description": "Library to help with network requests to create a webchat client for Quiq Messaging",

@@ -5,0 +5,0 @@ "main": "build/quiq-chat.js",

@@ -6,3 +6,3 @@ // @flow

import {burnItDown} from './utils';
import {getBurned} from './globals';
import {getBurned, getSessionApiUrl} from './globals';
import type {ApiError, IsomorphicFetchNetworkError} from 'types';

@@ -28,2 +28,3 @@

let noOfErrors = 0;
export default (url: string, fetchRequest: RequestOptions) => {

@@ -55,3 +56,12 @@ let retryCount = 0;

}
if (noOfErrors > 100) {
window.clearTimeout(timerId);
burnItDown();
if (callbacks.onBurn) {
callbacks.onBurn();
}
return reject();
}
delayIfNeeded().then(() =>

@@ -72,2 +82,12 @@ fetch(url, fetchRequest).then(

if (response.status === 401) {
if (url === getSessionApiUrl()) {
window.clearTimeout(timerId);
burnItDown();
if (callbacks.onBurn) {
callbacks.onBurn();
}
return reject(response);
}
if (

@@ -89,2 +109,3 @@ url.includes('/session/web/generate') &&

noOfErrors++;
return login().then(validateSession).then(request);

@@ -100,2 +121,3 @@ }

retryCount++;
noOfErrors++;
return request();

@@ -127,2 +149,3 @@ }

retryCount++;
noOfErrors++;
return request();

@@ -129,0 +152,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc