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.4.5 to 0.4.6

2

index.js

@@ -44,3 +44,3 @@ const childProcess = require('child_process')

let linePromise = new zPromise({ timeout: 30000 })
let linePromise = new zPromise({ delay: 30000 })

@@ -47,0 +47,0 @@ rl.on('line', function (data) {

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

let awaitLoading = new zPromise({ timeout: 10000, message: `网页加载超时` })
let awaitLoading = new zPromise({ delay: 10000, message: `网页加载超时` })

@@ -53,0 +53,0 @@ this.pages.set(targetId, { awaitLoading })

@@ -25,6 +25,4 @@ const { sleep, signale } = require('./helper');

* @param {Object} options evaluate选项
* @param {Object} config page.send消息配置
* @param {Number} config.timeout 消息超时时间
*/
async evaluate(options = {}, config) {
async evaluate(options = {}) {

@@ -46,3 +44,3 @@ let { func, returnByValue = false, args = [] } = options

userGesture: true
}, config)
})

@@ -65,3 +63,3 @@ if (result.className === 'TypeError') {

userGesture: true
}, config)
})

@@ -68,0 +66,0 @@ let { className, description, objectId } = result

@@ -143,14 +143,2 @@ const EventEmitter = require('events');

}
// /**
// * Target发生变更后需要获取新的FrameTree
// */
// async 'Target.targetInfoChanged'({ targetInfo }) {
// let { targetId } = targetInfo
// if (targetId === this.page.targetId) {
// }
// }
/**

@@ -157,0 +145,0 @@ * Target分离,用于监听关闭标签事件

const signale = require('signale')
const zPromise = require('zpromise')
const timeChain = require('timechain')
const timechain = new timeChain({ timeout: 5000 })
const timechain = new timeChain({ delay: 5000 })

@@ -6,0 +6,0 @@ module.exports = {

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

} else {
this.awaitLoading = new zPromise({ timeout: 10000, message: `网页加载超时` })
this.awaitLoading = new zPromise({ delay: 10000, message: `网页加载超时` })
this.awaitLoading.catch(error => { })

@@ -117,0 +117,0 @@ }

@@ -84,3 +84,3 @@ const Message = require('./Message');

returnByValue: true
}, { timeout: 5000, message: '等待返回消息超时' })
})

@@ -87,0 +87,0 @@ if (result.className === 'TypeError') {

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

@@ -15,6 +15,19 @@ "main": "index.js",

"signale": "^1.2.1",
"timechain": "^1.1.1",
"timechain": "^1.1.2",
"ws": "^6.0.0",
"zpromise": "^1.2.0"
}
},
"directories": {
"lib": "lib",
"test": "test"
},
"devDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/xiangle/auto-chrome.git"
},
"bugs": {
"url": "https://github.com/xiangle/auto-chrome/issues"
},
"homepage": "https://github.com/xiangle/auto-chrome#readme"
}

@@ -24,2 +24,3 @@ # auto-chrome

* 消息超时机制,由于各种难以预料的情况,devtools并不保证100%对接收的消息做出回应,在没有超时机制的状态下消息将处于持续等待状态,导致任务无法继续执行。

@@ -26,0 +27,0 @@ ## Install

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