Socket
Socket
Sign inDemoInstall

serve

Package Overview
Dependencies
Maintainers
4
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serve - npm Package Compare versions

Comparing version 6.5.3 to 6.5.4

30

bin/serve.js

@@ -13,6 +13,7 @@ #!/usr/bin/env node

const { coroutine } = require('bluebird')
const updateNotifier = require('@zeit/check-updates')
const { red } = require('chalk')
const checkForUpdate = require('update-check')
const { red, bold } = require('chalk')
const nodeVersion = require('node-version')
const cert = require('openssl-self-signed-certificate')
const boxen = require('boxen')

@@ -35,8 +36,2 @@ // Utilities

// Let user know if there's an update
// This isn't important when deployed to production
if (process.env.NODE_ENV !== 'production' && pkg.dist) {
updateNotifier(pkg, 'serve')
}
// Register the list of options

@@ -90,3 +85,20 @@ args.options(options)

detect(port).then(open => {
detect(port).then(async open => {
const { NODE_ENV } = process.env
const update = await checkForUpdate(pkg)
if (NODE_ENV !== 'production' && update) {
const message = `${bold(
'UPDATE AVAILABLE:'
)} The latest version of \`serve\` is ${update.latest}`
console.log(
boxen(message, {
padding: 1,
borderColor: 'green',
margin: 1
})
)
}
let inUse = open !== port

@@ -93,0 +105,0 @@

{
"name": "serve",
"version": "6.5.3",
"version": "6.5.4",
"description": "Static file serving and directory listing",

@@ -54,3 +54,2 @@ "scripts": {

"dependencies": {
"@zeit/check-updates": "1.1.0",
"args": "3.0.8",

@@ -76,4 +75,5 @@ "basic-auth": "2.0.0",

"path-type": "3.0.0",
"send": "0.16.2"
"send": "0.16.2",
"update-check": "1.2.0"
}
}
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