Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

surge

Package Overview
Dependencies
Maintainers
2
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

surge - npm Package Compare versions

Comparing version 0.20.5 to 0.21.0

9

lib/middleware/auth.js

@@ -29,3 +29,10 @@ var request = require("request")

} else {
return authenticateAndSave(callback)
if (req.passintoken){
helpers.space()
helpers.trunc("Invalid token")
helpers.space()
process.exit(1)
} else {
return authenticateAndSave(callback)
}
}

@@ -32,0 +39,0 @@ })

@@ -8,4 +8,11 @@ var path = require("path")

module.exports = function(req, next){
req.creds = localCreds(req.endpoint).get()
req.passintoken = req.argv.token || process.env['SURGE_TOKEN'] || process.env['TRAVIS_SURGE_TOKEN'] || null
if (req.passintoken){
req.creds = { email: "token", token: req.passintoken }
} else {
req.creds = localCreds(req.endpoint).get()
}
next()
}

13

lib/middleware/util/creds.js

@@ -23,15 +23,2 @@ var path = require("path")

if (process.env['SURGE_LOGIN'] && process.env['SURGE_TOKEN']) {
return {
"email": process.env['SURGE_LOGIN'],
"token": process.env['SURGE_TOKEN']
}
// Fallback to original implementation
} else if (process.env['TRAVIS_SURGE_LOGIN'] && process.env['TRAVIS_SURGE_TOKEN']) {
return {
"email": process.env['TRAVIS_SURGE_LOGIN'],
"token": process.env['TRAVIS_SURGE_TOKEN']
}
}
if (obj.hasOwnProperty(host)) {

@@ -38,0 +25,0 @@ return {

var helpers = require("./util/helpers.js")
module.exports = function(req, next){
module.exports = function(req, next){
if (req.creds == null) {

@@ -5,0 +6,0 @@ helpers.trunc(("Welcome to " + (req.config.name || "Surge").underline + "!").blue + (" (" + req.config.platform +")").grey)

@@ -10,3 +10,3 @@ var helpers = require("./util/helpers")

helpers.space()
var str = req.creds.email.underline.grey
var str = req.account.email.underline.grey
if (req.account.plan){

@@ -13,0 +13,0 @@ str = str + (" - " + req.account.plan.name).grey

{
"name": "surge",
"version": "0.20.5",
"version": "0.21.0",
"description": "CDN for front-end developers",

@@ -5,0 +5,0 @@ "author": "Brock Whitten <brock@chloi.io>",

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