@applitools/eyes.cypress
Advanced tools
Comparing version 3.2.2 to 3.2.3
'use strict'; | ||
require('./src/commands'); | ||
require('./src/browser/commands'); |
{ | ||
"name": "@applitools/eyes.cypress", | ||
"version": "3.2.2", | ||
"version": "3.2.3", | ||
"main": "index.js", | ||
@@ -35,4 +35,4 @@ "license": "MIT", | ||
"dependencies": { | ||
"@applitools/dom-capture": "^2.0.1", | ||
"@applitools/visual-grid-client": "^5.3.2", | ||
"@applitools/dom-capture": "^2.0.6", | ||
"@applitools/visual-grid-client": "^5.3.3", | ||
"body-parser": "^1.18.3", | ||
@@ -39,0 +39,0 @@ "cors": "^2.8.4", |
@@ -6,3 +6,3 @@ 'use strict'; | ||
function startApp(handlers, logger = console) { | ||
function startApp({handlers, logger = console} = {}) { | ||
const app = express(); | ||
@@ -9,0 +9,0 @@ app.use(cors()); |
@@ -70,2 +70,3 @@ 'use strict'; | ||
frames = [], | ||
sendDom, | ||
}) => { | ||
@@ -92,2 +93,3 @@ if (!checkWindow) { | ||
frames: framesWithResources, | ||
sendDom, | ||
}); | ||
@@ -94,0 +96,0 @@ }, |
'use strict'; | ||
const { | ||
makeVisualGridClient, | ||
makeGetConfig, | ||
createLogger, | ||
} = require('@applitools/visual-grid-client'); | ||
const {startApp} = require('./app'); | ||
const makeHandlers = require('./handlers'); | ||
const getConfig = makeGetConfig(); | ||
const config = getConfig(); | ||
const logger = createLogger(config.showLogs); | ||
const handlers = makeHandlers({ | ||
logger, | ||
config, | ||
makeVisualGridClient, | ||
}); | ||
const app = startApp(handlers, logger); | ||
function makeStartServer({logger, app}) { | ||
return function startServer() { | ||
return new Promise((resolve, reject) => { | ||
logger.log(`starting plugin server`); | ||
const server = app.listen(0, err => { | ||
if (err) { | ||
logger.log('error starting plugin server', err); | ||
reject(err); | ||
} else { | ||
logger.log(`plugin server running at port: ${server.address().port}`); | ||
resolve({ | ||
eyesPort: server.address().port, | ||
closeServer: server.close.bind(server), | ||
}); | ||
} | ||
}); | ||
function startServer() { | ||
return new Promise((resolve, reject) => { | ||
logger.log(`starting plugin server`); | ||
const server = app.listen(0, err => { | ||
if (err) { | ||
logger.log('error starting plugin server', err); | ||
server.on('error', err => { | ||
if (err.code === 'EADDRINUSE') { | ||
logger.log( | ||
`error: plugin server could not start at port ${ | ||
server.address().port | ||
}: port is already in use.`, | ||
); | ||
} else { | ||
logger.log('error in plugin server:', err); | ||
} | ||
reject(err); | ||
} else { | ||
logger.log(`plugin server running at port: ${server.address().port}`); | ||
resolve({ | ||
eyesPort: server.address().port, | ||
closeServer: server.close.bind(server), | ||
}); | ||
} | ||
}); | ||
}); | ||
server.on('error', err => { | ||
if (err.code === 'EADDRINUSE') { | ||
logger.log( | ||
`error: plugin server could not start at port ${ | ||
server.address().port | ||
}: port is already in use.`, | ||
); | ||
} else { | ||
logger.log('error in plugin server:', err); | ||
} | ||
reject(err); | ||
}); | ||
}); | ||
}; | ||
} | ||
module.exports = {startServer}; | ||
module.exports = makeStartServer; |
'use strict'; | ||
const {startServer} = require('./server'); | ||
const makeStartServer = require('./server'); | ||
const makePluginExport = require('./pluginExport'); | ||
const {startApp} = require('./app'); | ||
const { | ||
makeVisualGridClient, | ||
makeGetConfig, | ||
createLogger, | ||
} = require('@applitools/visual-grid-client'); | ||
const makeHandlers = require('./handlers'); | ||
const getConfig = makeGetConfig(); | ||
const config = getConfig(); | ||
const logger = createLogger(config.showLogs); | ||
const handlers = makeHandlers({ | ||
logger, | ||
config, | ||
makeVisualGridClient, | ||
}); | ||
const app = startApp({handlers, logger}); | ||
const startServer = makeStartServer({app, logger}); | ||
module.exports = makePluginExport(startServer); |
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
36330
405
28
573
+ Addedgopd@1.1.0(transitive)
+ Addedhas-proto@1.1.0(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhas-proto@1.0.3(transitive)