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

docker-host

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docker-host - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

LICENSE

4

index.js

@@ -16,5 +16,5 @@ module.exports = function(remote) {

if (protocol === 'unix' || protocol === 'http+unix') return {socketPath:host, protocol:'http:'}
if (protocol === 'unix' || protocol === 'http+unix') return {socketPath:host, host:'localhost', protocol:'http:'}
if (host === '0.0.0.0') host = 'localhost'
return {host:host, port:parseInt(port, 10), protocol:protocol+':'}
}
}
{
"name": "docker-host",
"version": "3.0.0",
"version": "3.1.0",
"description": "Tiny module that converts a host to docker (usually $DOCKER_HOST) to a standard http url",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -25,4 +25,4 @@ var tape = require('tape')

tape('unix', function(t) {
t.same(host('unix:///foo.sock'), {socketPath:'/foo.sock', protocol:'http:'})
t.same(host('/foo.sock'), {socketPath:'/foo.sock', protocol:'http:'})
t.same(host('unix:///foo.sock'), {socketPath:'/foo.sock', host:'localhost', protocol:'http:'})
t.same(host('/foo.sock'), {socketPath:'/foo.sock', host:'localhost', protocol:'http:'})
t.end()

@@ -33,7 +33,6 @@ })

process.env.DOCKER_HOST = ''
t.same(host(), {socketPath:'/var/run/docker.sock', protocol:'http:'})
t.same(host(), {socketPath:'/var/run/docker.sock', host:'localhost', protocol:'http:'})
process.env.DOCKER_HOST = 'unix:///env.sock'
t.same(host(), {socketPath:'/env.sock', protocol:'http:'})
t.same(host(), {socketPath:'/env.sock', host:'localhost', protocol:'http:'})
t.end()
})
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