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.6 to 0.4.7

8

index.js

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

const helper = require('./lib/helper')
const { signale, zPromise } = helper
const { logger, zPromise } = helper

@@ -36,3 +36,3 @@ async function index(options) {

chromeProcess.once('exit', () => {
signale.success('浏览器关闭');
logger.success('浏览器关闭');
});

@@ -69,5 +69,5 @@

await awaitOpen.then(function () {
// signale.success('WebSocket连接成功');
// logger.success('WebSocket连接成功');
}).catch(function (error) {
signale.error(new Error('WebSocket连接失败'));
logger.error(new Error('WebSocket连接失败'));
throw error

@@ -74,0 +74,0 @@ })

const Event = require('./Event');
const { signale, zPromise } = require('./helper');
const { logger, zPromise } = require('./helper');

@@ -55,3 +55,3 @@ class Chrome extends Event {

await awaitLoading.catch(info => {
signale.warn(info)
logger.warn(info)
})

@@ -58,0 +58,0 @@

@@ -1,2 +0,2 @@

const { sleep, signale } = require('./helper');
const { sleep, logger } = require('./helper');

@@ -46,3 +46,3 @@ /**

if (result.className === 'TypeError') {
signale.error(new Error(result.description))
logger.error(new Error(result.description))
return

@@ -67,3 +67,3 @@ }

if (className === 'TypeError') {
signale.error(new Error(description))
logger.error(new Error(description))
return

@@ -96,3 +96,3 @@ }

if (className === 'TypeError') {
signale.error(new Error(description))
logger.error(new Error(description))
return

@@ -99,0 +99,0 @@ }

@@ -9,3 +9,3 @@ const EventEmitter = require('events');

const { signale, zPromise } = require('./helper');
const { logger, zPromise } = require('./helper');

@@ -40,3 +40,3 @@ class Event extends EventEmitter {

}).catch(error => {
signale.error(id, new Error(error.message))
logger.error(id, new Error(error.message))
})

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

@@ -1,8 +0,8 @@

const signale = require('signale')
const logger = require('loggercc')
const timeChain = require('timechain')
const zPromise = require('zpromise')
const timeChain = require('timechain')
const timechain = new timeChain({ delay: 5000 })
module.exports = {
signale,
logger,
zPromise,

@@ -9,0 +9,0 @@ timechain,

const debug = require('debug');
const { signale, zPromise, timechain } = require('./helper');
const { logger, zPromise, timechain } = require('./helper');

@@ -36,5 +36,5 @@ const debugSendSession = debug('chrome:send:session');

if (error instanceof Object) {
signale.error(new Error(Object.values(error).toString()))
logger.error(new Error(Object.values(error).toString()))
} else {
signale.error(new Error(error))
logger.error(new Error(error))
}

@@ -91,3 +91,3 @@ })

await this.send('Page.handleJavaScriptDialog', { accept: false });
signale.success(`关闭${data.type}对话框`, data.message)
logger.success(`关闭${data.type}对话框`, data.message)
}

@@ -94,0 +94,0 @@ /**

const Message = require('./Message');
const Element = require('./Element');
const { Keyboard, Mouse, Touch } = require('./Input');
const { sleep, signale, zPromise } = require('./helper');
const { sleep, logger, zPromise } = require('./helper');

@@ -60,3 +60,3 @@ class Page extends Message {

await this.awaitLoading.catch(info => {
signale.warn(info)
logger.warn(info)
})

@@ -88,3 +88,3 @@

if (result.className === 'TypeError') {
signale.error(new Error(result.description))
logger.error(new Error(result.description))
return

@@ -91,0 +91,0 @@ }

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

@@ -14,3 +14,3 @@ "main": "index.js",

"debug": "^3.1.0",
"signale": "^1.2.1",
"loggercc": "^1.2.4",
"timechain": "^1.1.2",

@@ -17,0 +17,0 @@ "ws": "^6.0.0",

const autoChrome = require('../../')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('../../')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('../../')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('../../');
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ /**

const autoChrome = require('../..')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('../..')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('../..')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('../..')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('../..')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('../..')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('../..')
const devices = require('../../device')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -5,0 +5,0 @@ let { userAgent, viewport } = devices['iPhone 6'];

const autoChrome = require('..')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('../../')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('../../')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('../../')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -19,3 +19,3 @@ async function run() {

// await page.awaitLoading.catch(info => {
// signale.warn(info, 999)
// logger.warn(info, 999)
// })

@@ -22,0 +22,0 @@

const autoChrome = require('..')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('..')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@

const autoChrome = require('../../')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('../..')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ async function run() {

const autoChrome = require('../../')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@

const autoChrome = require('../../')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@

const autoChrome = require('../../')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@

const autoChrome = require('../../')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -4,0 +4,0 @@ /**

const autoChrome = require('../../')
const devices = require('../../device')
const { sleep, signale } = autoChrome.helper
const { sleep, logger } = autoChrome.helper

@@ -5,0 +5,0 @@ let { userAgent, viewport } = devices['iPhone 6'];

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