Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "depsync", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"author": "Dom Chen", | ||
@@ -5,0 +5,0 @@ "homepage": "http://www.idom.me/", |
@@ -32,6 +32,6 @@ ////////////////////////////////////////////////////////////////////////////////////// | ||
const DepsTask = require('./tasks/DepsTask'); | ||
const VERSION = "1.1.2"; | ||
const {version} = require('../package.json'); | ||
function printVersion() { | ||
Utils.log("Version " + VERSION + "\n"); | ||
Utils.log("Version " + version + "\n"); | ||
} | ||
@@ -95,3 +95,3 @@ | ||
} | ||
let task = new DepsTask(VERSION, configFileName, commandOptions.platform); | ||
let task = new DepsTask(version, configFileName, commandOptions.platform); | ||
task.run(() => { | ||
@@ -98,0 +98,0 @@ process.exit(0); |
@@ -30,3 +30,3 @@ ////////////////////////////////////////////////////////////////////////////////////// | ||
function AddLoginInfo(url) { | ||
function AddLoginInfo(url, user, password) { | ||
if (url.indexOf("@") !== -1) { | ||
@@ -39,7 +39,2 @@ return url; | ||
} | ||
let user = process.env["GIT_USER"]; | ||
let password = process.env["GIT_PASSWORD"]; | ||
if (!user || !password) { | ||
return url; | ||
} | ||
url = url.substring(0, index + 3) + user + ":" + password + "@" + url.substring(index + 3); | ||
@@ -51,2 +46,13 @@ return url; | ||
this.item = item; | ||
this.username = process.env["GIT_USER"]; | ||
this.password = process.env["GIT_PASSWORD"]; | ||
if (!this.username || !this.password) { | ||
let domainName = process.env["DomainName"]; | ||
let list = domainName.split("@"); | ||
if (list.length === 2) { | ||
list = list[0].split(":"); | ||
this.username = list[0]; | ||
this.password = list[1]; | ||
} | ||
} | ||
} | ||
@@ -60,3 +66,6 @@ | ||
Utils.createDirectory(item.dir); | ||
let url = AddLoginInfo(item.url); | ||
let url = item.url; | ||
if (this.username && this.password) { | ||
url = AddLoginInfo(url, this.username, this.password); | ||
} | ||
Utils.exec("git init -q", item.dir); | ||
@@ -63,0 +72,0 @@ Utils.exec("git remote add origin " + url, item.dir); |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance 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
42153
976
9