Socket
Socket
Sign inDemoInstall

@automattic/vip

Package Overview
Dependencies
Maintainers
20
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@automattic/vip - npm Package Compare versions

Comparing version 1.4.0-dev3 to 1.4.0-dev4

16

dist/lib/api.js

@@ -44,9 +44,17 @@ "use strict";

const unauthorizedLink = (0, _apolloLinkError.onError)(({
networkError
const errorLink = (0, _apolloLinkError.onError)(({
networkError,
graphQLErrors
}) => {
if (networkError.statusCode === 401) {
if (networkError && networkError.statusCode === 401) {
console.error(_chalk.default.red('Unauthorized:'), 'You are unauthorized to perform this request, please logout with `vip logout` then try again.');
process.exit();
}
if (graphQLErrors && graphQLErrors.length) {
graphQLErrors.forEach(error => {
console.error(_chalk.default.red('Error:'), error.message);
});
process.exit();
}
});

@@ -58,5 +66,5 @@ const httpLink = new _apolloLinkHttp.HttpLink({

return new _apolloClient.ApolloClient({
link: unauthorizedLink.concat(httpLink),
link: errorLink.concat(httpLink),
cache: new _apolloCacheInmemory.InMemoryCache()
});
}
{
"name": "@automattic/vip",
"version": "1.4.0-dev3",
"version": "1.4.0-dev4",
"description": "The VIP Go Javascript library & CLI",

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

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