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

@xapp/arachne

Package Overview
Dependencies
Maintainers
5
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xapp/arachne - npm Package Compare versions

Comparing version 0.4.7 to 0.5.0

6

lib/Arachne.d.ts

@@ -9,5 +9,5 @@ /*! Copyright (c) 2020, XAPP AI */

export declare const DEFAULT_MAX_RETRIES = 3;
export declare type ArachneResponse = HTTPResponse;
export declare type ArachnePage = Page;
export declare type ArachnePageHandler = (page: ArachnePage, request: ArachneRequest, response: ArachneResponse) => Promise<void>;
export type ArachneResponse = HTTPResponse;
export type ArachnePage = Page;
export type ArachnePageHandler = (page: ArachnePage, request: ArachneRequest, response: ArachneResponse) => Promise<void>;
export interface ArachneProps {

@@ -14,0 +14,0 @@ /**

@@ -25,2 +25,3 @@ "use strict";

super(message);
this.name = "PagedError";
this.page = page;

@@ -148,6 +149,15 @@ }

try {
yield (0, util_1.promiseWithTimeout)(this.pageHandlerTimeout, this.pageHandler.bind(this, page, currentRequest, response), new PagedError(`ArachnePageHandler function exceeded timeout of ${this.pageHandlerTimeout} ms`, page));
yield (0, util_1.promiseWithTimeout)(this.pageHandlerTimeout, this.pageHandler.bind(this, page, currentRequest, response), `ArachnePageHandler function exceeded timeout of ${this.pageHandlerTimeout} ms`);
}
catch (e) {
// Throw it again with the page so it gets caught!
console.error(e);
if (e.name === "TimeoutError") {
// eslint-disable-next-line no-console
console.debug(e.message);
}
else {
console.error(`Caught error in pageHandler`);
console.error(e);
}
throw new PagedError(e, page);

@@ -154,0 +164,0 @@ }

/*! Copyright (c) 2020, XAPP AI */
export declare class TimeoutError extends Error {
readonly name = "TimeoutError";
}
/**

@@ -3,0 +6,0 @@ * Wraps the function that returns a promise with a timeout

"use strict";
/*! Copyright (c) 2020, XAPP AI */
Object.defineProperty(exports, "__esModule", { value: true });
exports.promiseWithTimeout = void 0;
exports.promiseWithTimeout = exports.TimeoutError = void 0;
class TimeoutError extends Error {
constructor() {
super(...arguments);
this.name = "TimeoutError";
}
}
exports.TimeoutError = TimeoutError;
/**

@@ -16,6 +23,6 @@ * Wraps the function that returns a promise with a timeout

if (!failureMessage) {
error = new Error();
error = new TimeoutError();
}
else if (typeof failureMessage === "string") {
error = new Error(failureMessage);
error = new TimeoutError(failureMessage);
}

@@ -22,0 +29,0 @@ else {

{
"name": "@xapp/arachne",
"version": "0.4.7",
"version": "0.5.0",
"types": "lib/index",

@@ -15,10 +15,10 @@ "main": "lib/index",

"engines": {
"node": "^10 || ^12 || ^14 || ^16"
"node": "^14 || ^16 || ^18"
},
"devDependencies": {
"@microsoft/api-extractor": "7.33.6",
"@microsoft/api-extractor": "7.34.4",
"@types/chai": "4.3.4",
"@types/generic-pool": "3.1.11",
"@types/mocha": "10.0.0",
"@types/node": "17.0.32",
"@types/mocha": "10.0.1",
"@types/node": "18.11.18",
"@types/sinon": "10.0.13",

@@ -28,15 +28,15 @@ "@types/sinon-chai": "3.2.9",

"chai": "4.3.7",
"mocha": "10.1.0",
"mocha": "10.2.0",
"puppeteer": "18.2.1",
"sinon": "14.0.1",
"sinon": "15.0.1",
"sinon-chai": "3.7.0",
"ts-node": "10.9.1",
"tslib": "2.4.1",
"typescript": "4.8.4"
"tslib": "2.5.0",
"typescript": "4.9.5"
},
"dependencies": {
"@xapp/arachne-utils": "0.4.6",
"@xapp/arachne-utils": "0.5.0",
"generic-pool": "3.9.0",
"puppeteer-extra": "3.3.4",
"puppeteer-extra-plugin-stealth": "2.11.1"
"puppeteer-extra": "3.3.6",
"puppeteer-extra-plugin-stealth": "2.11.2"
},

@@ -52,3 +52,3 @@ "peerDependencies": {

},
"gitHead": "20868c6a7532079a290b47fd3d9e44f1040bfc70"
"gitHead": "3f8407d44b028384726efab7359aafe796469209"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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