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

auto-chrome

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auto-chrome - npm Package Compare versions

Comparing version 0.2.9 to 0.3.0

t.js

2

lib/Chrome.js

@@ -14,2 +14,3 @@ const Event = require('./Event');

this.ws = ws
this.isClose = false
this.ignoreHTTPSErrors = ignoreHTTPSErrors

@@ -72,2 +73,3 @@ this.emulate = emulate

this.isClose = true
return this.send('Browser.close')

@@ -74,0 +76,0 @@

8

lib/Event.js

@@ -38,5 +38,5 @@ const debug = require('debug');

return new Promise((resolve, reject) => {
this.callbacks.set(id, { resolve, reject, method, error: new Error() });
this.callbacks.set(id, { resolve, reject, method });
}).catch(error => {
signale.error(new Error(`messageId:${id},${error.message}`))
signale.error(id, new Error(error.message))
})

@@ -200,3 +200,5 @@

if (this.page) {
this.page.send('Page.bringToFront')
if (this.isClose === false) {
this.page.send('Page.bringToFront')
}
}

@@ -203,0 +205,0 @@ }

@@ -21,3 +21,3 @@ const debug = require('debug');

*/
async send(method = '', params = {}) {
send(method = '', params = {}) {

@@ -33,6 +33,10 @@ let id = this.id++

return new Promise((resolve, reject) => {
this.callbacks.set(id, { resolve, reject, method, error: new Error() });
this.callbacks.set(id, { resolve, reject, method });
}).catch(error => {
let { code, message, data } = error
signale.error(code, message, new Error(data))
if (error.code) {
let { code, message, data } = error
signale.error(code, message, new Error(data))
} else {
signale.error(new Error(Object.values(error).toString()))
}
})

@@ -39,0 +43,0 @@

{
"name": "auto-chrome",
"version": "0.2.9",
"version": "0.3.0",
"description": "使用Node.js操作Chrome或Chromium,高仿真的用户行为模拟器",

@@ -5,0 +5,0 @@ "main": "index.js",

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