npm package diff
Package: @forge/tunnel
Versions: 5.3.3-next.0-experimental-10722bc - 5.5.0-next.13
File: package/out/servers/csp-reporter-server.js
Index: package/out/servers/csp-reporter-server.js
===================================================================
--- package/out/servers/csp-reporter-server.js
+++ package/out/servers/csp-reporter-server.js
@@ -35,9 +35,17 @@
}
async start() {
return new Promise((resolve, reject) => {
this.server = this.app.listen(this.port, resolve);
- this.server.on('error', reject);
+ this.server.on('error', (err) => {
+ const error = err;
+ if (error.code === 'EADDRINUSE') {
+ reject(new cli_shared_1.UserError(`Port ${this.port} is already in use. Please select a different port by setting the CSP_REPORTER_PORT environment variable`));
+ }
+ else {
+ reject(err);
+ }
+ });
});
}
async stop() {
return new Promise((resolve, reject) => {