Comparing version 1.3.2 to 1.3.5
{ | ||
"name": "depsync", | ||
"version": "1.3.2", | ||
"version": "1.3.5", | ||
"author": "Dom Chen", | ||
@@ -5,0 +5,0 @@ "homepage": "http://www.idom.me/", |
@@ -33,2 +33,3 @@ ////////////////////////////////////////////////////////////////////////////////////// | ||
const ActionTask = require("./ActionTask"); | ||
const SubRepoTask = require("./SubRepoTask"); | ||
const TaskRunner = require("./TaskRunner"); | ||
@@ -63,7 +64,9 @@ const path = require("path"); | ||
tasks.push(new RepoTask(item)); | ||
if (!this.nonRecursive) { | ||
let depsFile = path.join(item.dir, "DEPS"); | ||
tasks.push(new DepsTask(depsFile, this.version, this.platform, this.nonRecursive)); | ||
} | ||
} | ||
let subRepoTask = new SubRepoTask(item); | ||
tasks.push(subRepoTask); | ||
if (!this.nonRecursive) { | ||
let depsFile = path.join(item.dir, "DEPS"); | ||
tasks.push(new DepsTask(depsFile, this.version, this.platform, this.nonRecursive)); | ||
} | ||
} | ||
@@ -79,3 +82,5 @@ for (let item of config.files) { | ||
} | ||
let item = {dir: path.dirname(this.configFile)}; | ||
let subRepoTask = new SubRepoTask(item); | ||
tasks.push(subRepoTask); | ||
TaskRunner.runTasks(tasks, () => { | ||
@@ -82,0 +87,0 @@ callback && callback(); |
@@ -81,8 +81,6 @@ ////////////////////////////////////////////////////////////////////////////////////// | ||
Utils.exec("git fetch --depth 1 origin " + item.commit, item.dir); | ||
Utils.exec("git reset --hard FETCH_HEAD -q", item.dir); | ||
Utils.exec("git submodule update --quiet --init --recursive --depth=1", item.dir, false); | ||
Utils.exec("GIT_LFS_SKIP_SMUDGE=1 git reset --hard FETCH_HEAD", item.dir); | ||
} else { | ||
Utils.exec("git fetch origin " + item.commit, item.dir); | ||
Utils.exec("git reset --hard FETCH_HEAD -q", item.dir); | ||
Utils.exec("git submodule update --quiet --init --recursive", item.dir, false); | ||
Utils.exec("GIT_LFS_SKIP_SMUDGE=1 git reset --hard FETCH_HEAD", item.dir); | ||
} | ||
@@ -89,0 +87,0 @@ callback && callback(); |
@@ -168,4 +168,11 @@ ////////////////////////////////////////////////////////////////////////////////////// | ||
function exec(cmd, dir, quiet) { | ||
if (!dir) { | ||
dir = process.cwd(); | ||
} else { | ||
dir = path.resolve(dir); | ||
} | ||
let options = { | ||
shell: os.platform() === "win32" ? "cmd.exe" : true, cwd: dir, env: process.env | ||
shell: os.platform() === "win32" ? "cmd.exe" : true, | ||
cwd: dir, | ||
env: process.env | ||
} | ||
@@ -187,2 +194,22 @@ | ||
function execSafe(cmd, dir) { | ||
if (!dir) { | ||
dir = process.cwd(); | ||
} else { | ||
dir = path.resolve(dir); | ||
} | ||
let options = { | ||
shell: os.platform() === "win32" ? "cmd.exe" : true, | ||
cwd: dir, | ||
env: process.env | ||
} | ||
try { | ||
let result = childProcess.spawnSync(cmd, options); | ||
return result.stdout.toString(); | ||
} catch (e) { | ||
return ""; | ||
} | ||
} | ||
function addLineBreaker() { | ||
@@ -198,4 +225,5 @@ hasLineBreaker = true; | ||
exports.exec = exec; | ||
exports.execSafe = execSafe; | ||
exports.log = log; | ||
exports.error = error; | ||
exports.addLineBreaker = addLineBreaker; |
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
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
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
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
52327
16
1232
0
13
2