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

i18nexus-cli

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18nexus-cli - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

5

package.json
{
"name": "i18nexus-cli",
"version": "2.0.2",
"version": "2.1.0",
"description": "Command line interface (CLI) for accessing the i18nexus API",

@@ -20,4 +20,5 @@ "main": "index.js",

"commander": "^7.2.0",
"node-fetch": "^2.6.1"
"https-proxy-agent": "^5.0.0",
"node-fetch": "^2.6.7"
}
}

17

pull.js
const fs = require('fs');
const fetch = require('node-fetch');
const colors = require('colors');
const HttpsProxyAgent = require('https-proxy-agent');

@@ -32,3 +33,3 @@ const handleError = async (response, usingVersion) => {

// as safety precation, only delete folders that match regex
// as safety precaution, only delete folders that match regex
const regex = /^[a-z]{2}(-[A-Z]{2,4})?$/;

@@ -56,4 +57,16 @@

const response = await fetch(url);
const proxy =
process.env.http_proxy ||
process.env.HTTP_PROXY ||
process.env.https_proxy ||
process.env.HTTPS_PROXY;
const fetchOptions = {};
if (proxy) {
fetchOptions.agent = new HttpsProxyAgent(proxy);
}
const response = await fetch(url, fetchOptions);
if (response.status !== 200) {

@@ -60,0 +73,0 @@ return handleError(response, usingVersion);

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