i18nexus-cli
Advanced tools
Comparing version 2.0.2 to 2.1.0
{ | ||
"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); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6690
113
5
8
2
+ Addedhttps-proxy-agent@^5.0.0
+ Addedagent-base@6.0.2(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addedhttps-proxy-agent@5.0.1(transitive)
+ Addedms@2.1.3(transitive)
Updatednode-fetch@^2.6.7