@applitools/test-server
Advanced tools
Comparing version 1.1.1 to 1.1.2
exports.testServer = require('./src/test-server') | ||
exports.testServerInProcess = require('./src/test-server-in-process') | ||
exports.testProxyServer = require('./src/proxy-server') |
{ | ||
"name": "@applitools/test-server", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"homepage": "https://github.com/applitools/eyes.sdk.javascript1#readme", | ||
@@ -36,2 +36,3 @@ "bugs": { | ||
"@applitools/utils": "1.3.8", | ||
"body-parser": "1.20.0", | ||
"chalk": "3.0.0", | ||
@@ -38,0 +39,0 @@ "cookie-parser": "1.4.5", |
const http = require('http') | ||
const net = require('net') | ||
const httpProxy = require('http-proxy') | ||
const {promisify} = require('util') | ||
function startProxyServer(port = 12345) { | ||
function startProxyServer({port = 0} = {}) { | ||
const proxy = httpProxy.createServer() | ||
@@ -34,4 +33,5 @@ | ||
server.listen(port, () => { | ||
const port = server.address().port | ||
console.log('[proxy server] listening on port', port) | ||
const close = promisify(server.close.bind(server)) | ||
const close = server.close.bind(server) | ||
resolve({port, close}) | ||
@@ -38,0 +38,0 @@ }) |
@@ -77,2 +77,3 @@ 'use strict' | ||
} else { | ||
const port = server.address().port | ||
const close = server.close.bind(server) | ||
@@ -89,6 +90,6 @@ log(`test server running at port: ${port}`) | ||
} else { | ||
const serverPort = server.address().port | ||
const port = server.address().port | ||
const close = server.close.bind(server) | ||
log(`test server running at port: ${serverPort}`) | ||
resolve({port: serverPort, close}) | ||
log(`test server running at port: ${port}`) | ||
resolve({port: port, close}) | ||
} | ||
@@ -95,0 +96,0 @@ }) |
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
25902
8645
16
292
10
+ Addedbody-parser@1.20.0
+ Addedbody-parser@1.20.0(transitive)
+ Addedbytes@3.1.2(transitive)
+ Addedcall-bind-apply-helpers@1.0.1(transitive)
+ Addedcall-bound@1.0.3(transitive)
+ Addeddestroy@1.2.0(transitive)
+ Addeddunder-proto@1.0.1(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.0.0(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.6(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhttp-errors@1.7.32.0.0(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedmath-intrinsics@1.1.0(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedon-finished@2.4.1(transitive)
+ Addedqs@6.10.3(transitive)
+ Addedraw-body@2.5.1(transitive)
+ Addedsetprototypeof@1.2.0(transitive)
+ Addedside-channel@1.1.0(transitive)
+ Addedside-channel-list@1.0.0(transitive)
+ Addedside-channel-map@1.0.1(transitive)
+ Addedside-channel-weakmap@1.0.2(transitive)
+ Addedstatuses@2.0.1(transitive)
+ Addedtoidentifier@1.0.1(transitive)