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.6 to 6.5.7

38

bin/serve.js

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

const boxen = require('boxen');
const promiseTimeout = require('promise-timeout');

@@ -72,4 +73,3 @@ // Utilities

key: cert.key,
cert: cert.cert,
passphrase: cert.passphrase
cert: cert.cert
};

@@ -89,15 +89,29 @@

if (NODE_ENV !== 'production') {
const update = await checkForUpdate(pkg);
try {
const update = await promiseTimeout.timeout(checkForUpdate(pkg), 2000);
if (update) {
const message = `${bold(
'UPDATE AVAILABLE:'
)} The latest version of \`serve\` is ${update.latest}`;
if (update) {
const message = `${bold(
'UPDATE AVAILABLE:'
)} The latest version of \`serve\` is ${update.latest}`;
console.log(
boxen(message, {
padding: 1,
borderColor: 'green',
margin: 1
})
);
}
} catch (err) {
console.log(
boxen(message, {
padding: 1,
borderColor: 'green',
margin: 1
})
boxen(
`${bold(
'UPDATE CHECK FAILED:'
)} ${err.message}`, {
padding: 1,
borderColor: 'red',
margin: 1
}
)
);

@@ -104,0 +118,0 @@ }

{
"name": "serve",
"version": "6.5.6",
"version": "6.5.7",
"description": "Static file serving and directory listing",

@@ -22,3 +22,3 @@ "scripts": {

"engines": {
"node": ">=6.9.0"
"node": ">=7.6.0"
},

@@ -63,4 +63,5 @@ "keywords": [

"path-type": "3.0.0",
"promise-timeout": "1.3.0",
"send": "0.16.2",
"update-check": "1.3.2"
"update-check": "1.5.0"
},

@@ -67,0 +68,0 @@ "eslintConfig": {

Sorry, the diff of this file is not supported yet

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