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

npm-profile

Package Overview
Dependencies
Maintainers
7
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-profile - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

27

index.js
'use strict'
const fetch = require('npm-registry-fetch')
const {HttpErrorBase} = require('npm-registry-fetch/errors.js')
const { HttpErrorBase } = require('npm-registry-fetch/errors.js')
const os = require('os')

@@ -21,2 +21,12 @@ const pudding = require('figgy-pudding')

const url = require('url')
const isValidUrl = u => {
if (u && typeof u === 'string') {
const p = url.parse(u)
return !!(p.protocol && p.slashes && p.host && p.path)
}
return false
}
const ProfileConfig = pudding({

@@ -80,17 +90,12 @@ creds: {},

}).then(([res, content]) => {
const {doneUrl, loginUrl} = content
const { doneUrl, loginUrl } = content
process.emit('log', 'verbose', 'web auth', 'got response', content)
if (
typeof doneUrl !== 'string' ||
typeof loginUrl !== 'string' ||
!doneUrl ||
!loginUrl
) {
if (!isValidUrl(doneUrl) || !isValidUrl(loginUrl)) {
throw new WebLoginInvalidResponse('POST', res, content)
}
return content
}).then(({doneUrl, loginUrl}) => {
}).then(({ doneUrl, loginUrl }) => {
process.emit('log', 'verbose', 'web auth', 'opening url pair')
return opener(loginUrl).then(
() => webAuthCheckLogin(doneUrl, opts.concat({cache: false}))
() => webAuthCheckLogin(doneUrl, opts.concat({ cache: false }))
)

@@ -188,3 +193,3 @@ }).catch(er => {

return fetch.json(target, opts.concat({
query: {write: true}
query: { write: true }
})).then(result => {

@@ -191,0 +196,0 @@ Object.keys(result).forEach(function (k) {

{
"name": "npm-profile",
"version": "4.0.2",
"version": "4.0.3",
"description": "Library for updating an npmjs.com profile",

@@ -5,0 +5,0 @@ "keywords": [],

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