auto-chrome
Advanced tools
Comparing version 0.4.6 to 0.4.7
@@ -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']; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
569878
+ Addedloggercc@^1.2.4
+ Addedfs-extra@7.0.1(transitive)
+ Addedjsonfile@4.0.0(transitive)
+ Addedloggercc@1.3.2(transitive)
+ Addeduniversalify@0.1.2(transitive)
- Removedsignale@^1.2.1
- Removedansi-styles@3.2.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removederror-ex@1.3.2(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedfigures@2.0.0(transitive)
- Removedfind-up@2.1.0(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedis-arrayish@0.2.1(transitive)
- Removedjson-parse-better-errors@1.0.2(transitive)
- Removedload-json-file@4.0.0(transitive)
- Removedlocate-path@2.0.0(transitive)
- Removedp-limit@1.3.0(transitive)
- Removedp-locate@2.0.0(transitive)
- Removedp-try@1.0.0(transitive)
- Removedparse-json@4.0.0(transitive)
- Removedpath-exists@3.0.0(transitive)
- Removedpify@3.0.0(transitive)
- Removedpkg-conf@2.1.0(transitive)
- Removedsignale@1.4.0(transitive)
- Removedstrip-bom@3.0.0(transitive)
- Removedsupports-color@5.5.0(transitive)