New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

wait-port

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wait-port - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

5

bin/wait-port.js

@@ -18,3 +18,3 @@ #!/usr/bin/env node

// Validate the parameters (extractTarget) will throw if target is invalid).
const { protocol, host, port } = extractTarget(target);
const { protocol, host, port, path } = extractTarget(target);
const timeout = program.timeout || 0;

@@ -24,3 +24,3 @@ const output = program.output;

debug(`Timeout: ${timeout}`);
debug(`Target: ${target} => ${protocol}://${host}:${port}`);
debug(`Target: ${target} => ${protocol}://${host}:${port}${path}`);

@@ -32,2 +32,3 @@ const params = {

port,
path,
output

@@ -34,0 +35,0 @@ };

4

lib/extract-target.spec.js

@@ -52,8 +52,8 @@ const assert = require('assert');

it('should extract a valid protocol and path', () => {
const { protocol, port, host, path } = extractTarget('http://google:9000/');
const { protocol, port, host, path } = extractTarget('http://google:9000/healthcheck');
assert.strictEqual(protocol, 'http');
assert.strictEqual(port, 9000);
assert.strictEqual(host, 'google');
assert.strictEqual(path, '/');
assert.strictEqual(path, '/healthcheck');
});
});
{
"name": "wait-port",
"version": "0.2.1",
"version": "0.2.2",
"description": "Utility to wait for a TCP port to open.",

@@ -5,0 +5,0 @@ "main": "./lib/wait-port.js",

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