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

@pushrocks/webrequest

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pushrocks/webrequest - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

dist/index.d.ts

@@ -19,3 +19,3 @@ /**

/**
*
* a fault tolerant request
*/

@@ -22,0 +22,0 @@ request(urlArg: string | string[], optionsArg: {

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./webrequest.plugins");
const plugins = __importStar(require("./webrequest.plugins"));
/**

@@ -16,10 +15,8 @@ * web request

class WebRequest {
getJson(urlArg, requestBody) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.request(urlArg, {
body: requestBody,
method: 'GET'
});
return response.json();
async getJson(urlArg, requestBody) {
const response = await this.request(urlArg, {
body: requestBody,
method: 'GET'
});
return response.json();
}

@@ -29,10 +26,8 @@ /**

*/
postJson(urlArg, requestBody) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.request(urlArg, {
body: requestBody,
method: 'GET'
});
return response.json();
async postJson(urlArg, requestBody) {
const response = await this.request(urlArg, {
body: requestBody,
method: 'GET'
});
return response.json();
}

@@ -42,10 +37,8 @@ /**

*/
putJson(urlArg, requestBody) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.request(urlArg, {
body: requestBody,
method: 'GET'
});
return response.json();
async putJson(urlArg, requestBody) {
const response = await this.request(urlArg, {
body: requestBody,
method: 'GET'
});
return response.json();
}

@@ -55,72 +48,68 @@ /**

*/
deleteJson(urlArg, requestBody) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.request(urlArg, {
body: requestBody,
method: 'GET'
});
return response.json();
async deleteJson(urlArg, requestBody) {
const response = await this.request(urlArg, {
body: requestBody,
method: 'GET'
});
return response.json();
}
/**
*
* a fault tolerant request
*/
request(urlArg, optionsArg) {
return __awaiter(this, void 0, void 0, function* () {
let allUrls;
let usedUrlIndex = 0;
// determine what we got
if (Array.isArray(urlArg)) {
allUrls = urlArg;
async request(urlArg, optionsArg) {
let allUrls;
let usedUrlIndex = 0;
// determine what we got
if (Array.isArray(urlArg)) {
allUrls = urlArg;
}
else {
allUrls = [urlArg];
}
const requestHistory = []; // keep track of the request history
const doHistoryCheck = async (
// check history for a
historyEntryTypeArg) => {
requestHistory.push(historyEntryTypeArg);
if (historyEntryTypeArg === '429') {
console.log('got 429, so waiting a little bit.');
await plugins.smartdelay.delayFor(Math.floor(Math.random() * (2000 - 1000 + 1)) + 1000); // wait between 1 and 10 seconds
}
let numOfHistoryType = 0;
for (const entry of requestHistory) {
if (entry === historyEntryTypeArg)
numOfHistoryType++;
}
if (numOfHistoryType > 2 * allUrls.length * usedUrlIndex) {
usedUrlIndex++;
}
};
// lets go recursive
const doRequest = async (urlToUse) => {
if (!urlToUse) {
throw new Error('request failed permanently');
}
const response = await fetch(urlToUse, {
method: optionsArg.method,
headers: {
'Content-Type': 'application/json'
},
body: optionsArg.body
});
console.log(`${urlToUse} answers with status: ${response.status}`);
if (response.status >= 200 && response.status < 300) {
return response;
}
else {
allUrls = [urlArg];
await doHistoryCheck(response.status.toString());
// tslint:disable-next-line: no-return-await
return await doRequest(allUrls[usedUrlIndex]);
}
const requestHistory = []; // keep track of the request history
const doHistoryCheck = (
// check history for a
historyEntryTypeArg) => __awaiter(this, void 0, void 0, function* () {
requestHistory.push(historyEntryTypeArg);
if (historyEntryTypeArg === '429') {
console.log('got 429, so waiting a little bit.');
yield plugins.smartdelay.delayFor(Math.floor(Math.random() * (2000 - 1000 + 1)) + 1000); // wait between 1 and 10 seconds
}
let numOfHistoryType = 0;
for (const entry of requestHistory) {
if (entry === historyEntryTypeArg)
numOfHistoryType++;
}
if (numOfHistoryType > 2 * allUrls.length * usedUrlIndex) {
usedUrlIndex++;
}
});
// lets go recursive
const doRequest = (urlToUse) => __awaiter(this, void 0, void 0, function* () {
if (!urlToUse) {
throw new Error('request failed permanently');
}
const response = yield fetch(urlToUse, {
method: optionsArg.method,
headers: {
'Content-Type': 'application/json'
},
body: optionsArg.body
});
console.log(`${urlToUse} answers with status: ${response.status}`);
if (response.status >= 200 && response.status < 300) {
return response;
}
else {
yield doHistoryCheck(response.status.toString());
// tslint:disable-next-line: no-return-await
return yield doRequest(allUrls[usedUrlIndex]);
}
});
const finalResponse = yield doRequest(urlArg[usedUrlIndex]);
console.log(finalResponse);
return finalResponse;
});
};
const finalResponse = await doRequest(urlArg[usedUrlIndex]);
console.log(finalResponse);
return finalResponse;
}
}
exports.WebRequest = WebRequest;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsZ0RBQWdEO0FBRWhEOztHQUVHO0FBQ0gsTUFBYSxVQUFVO0lBQ1IsT0FBTyxDQUFDLE1BQXlCLEVBQUUsV0FBaUI7O1lBQy9ELE1BQU0sUUFBUSxHQUFhLE1BQU0sSUFBSSxDQUFDLE9BQU8sQ0FBQyxNQUFNLEVBQUU7Z0JBQ3BELElBQUksRUFBRSxXQUFXO2dCQUNqQix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QUFHLEVBQUU7Z0JBQ25ELE9BQU8sUUFBUSxDQUFDO2FBQ2pCO2lCQUFNO2dCQUNMLE1BQU0sY0FBYyxDQUFDLFFBQVEsQ0FBQyxNQUFNLENBQUMsUUFBUSxFQUFFLENBQUMsQ0FBQztnQkFDakQsNENBQTRDO2dCQUM1QyxPQUFPLE1BQU0sU0FBUyxDQUFDLE9BQU8sQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDO2FBQy9DO1FBQ0gsQ0FBQyxDQUFDO1FBRUYsTUFBTSxhQUFhLEdBQWEsTUFBTSxTQUFTLENBQUMsTUFBTSxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUM7UUFDdEUsT0FBTyxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQztRQUMzQixPQUFPLGFBQWEsQ0FBQztJQUN2QixDQUFDO0NBQ0Y7QUEvR0QsZ0NBK0dDIn0=
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const smartdelay = require("@pushrocks/smartdelay");
const smartdelay = __importStar(require("@pushrocks/smartdelay"));
exports.smartdelay = smartdelay;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2VicmVxdWVzdC5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvd2VicmVxdWVzdC5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsb0RBQW9EO0FBRTNDLGdDQUFVIn0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2VicmVxdWVzdC5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvd2VicmVxdWVzdC5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBLGtFQUFvRDtBQUUzQyxnQ0FBVSJ9
{
"name": "@pushrocks/webrequest",
"version": "2.0.0",
"version": "2.0.1",
"private": false,

@@ -16,13 +16,13 @@ "description": "securely request from browsers",

"devDependencies": {
"@gitzone/tsbuild": "^2.1.3",
"@gitzone/tstest": "^1.0.17",
"@pushrocks/smartexpress": "^2.0.4",
"@pushrocks/tapbundle": "^3.0.7",
"@types/node": "^10.12.12",
"node-fetch": "^2.3.0",
"tslint": "^5.17.0",
"@gitzone/tsbuild": "^2.1.17",
"@gitzone/tstest": "^1.0.24",
"@pushrocks/smartexpress": "^3.0.40",
"@pushrocks/tapbundle": "^3.0.13",
"@types/node": "^12.7.8",
"node-fetch": "^2.6.0",
"tslint": "^5.20.0",
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@pushrocks/smartdelay": "^2.0.2"
"@pushrocks/smartdelay": "^2.0.3"
},

@@ -34,2 +34,3 @@ "files": [

"dist_web/*",
"dist_ts_web/*",
"assets/*",

@@ -36,0 +37,0 @@ "cli.js",

@@ -24,4 +24,4 @@ # @pushrocks/webrequest

> MIT licensed | **&copy;** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

@@ -49,5 +49,5 @@ import * as plugins from './webrequest.plugins';

/**
*
* a fault tolerant request
*/
async request(
public async request(
urlArg: string | string[],

@@ -54,0 +54,0 @@ optionsArg: {

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