Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "depsync", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"author": "Dom Chen", | ||
@@ -5,0 +5,0 @@ "homepage": "http://www.idom.me/", |
@@ -36,3 +36,3 @@ <p align="left"> | ||
{ | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"vars": { | ||
@@ -103,15 +103,7 @@ "GIT_DOMAIN": "github.com", | ||
{ | ||
"command": "npm", | ||
"args": [ | ||
"install", | ||
"tspack" | ||
], | ||
"command": "npm install tspack", | ||
"dir": "./" | ||
}, | ||
{ | ||
"command": "node", | ||
"args": [ | ||
"node_modules/tspack/bin/tspack", | ||
"--v" | ||
], | ||
"command": "node node_modules/tspack/bin/tspack --v", | ||
"dir": "./" | ||
@@ -118,0 +110,0 @@ } |
@@ -33,3 +33,3 @@ ////////////////////////////////////////////////////////////////////////////////////// | ||
const DepsTask = require('./tasks/DepsTask'); | ||
const VERSION = "1.1.0"; | ||
const VERSION = "1.1.1"; | ||
@@ -36,0 +36,0 @@ function printVersion() { |
@@ -28,3 +28,3 @@ ////////////////////////////////////////////////////////////////////////////////////// | ||
const terminal = require('../Terminal'); | ||
const ShellTask = require('./ShellTask'); | ||
const Utils = require("../Utils"); | ||
@@ -37,9 +37,7 @@ function ActionTask(item) { | ||
let item = this.item; | ||
terminal.log("【depsync】executing action: " + item.command + " " + item.args.join(" ")); | ||
let task = new ShellTask(item.command, item.args, item.dir); | ||
task.run(() => { | ||
callback && callback(); | ||
}); | ||
terminal.log("【depsync】executing action: " + item.command); | ||
Utils.exec(item.command, item.dir); | ||
callback && callback(); | ||
}; | ||
module.exports = ActionTask; |
@@ -30,4 +30,2 @@ ////////////////////////////////////////////////////////////////////////////////////// | ||
const Utils = require("../Utils"); | ||
const TaskRunner = require('./TaskRunner') | ||
const ShellTask = require('./ShellTask'); | ||
@@ -62,12 +60,9 @@ function AddLoginInfo(url) { | ||
let url = AddLoginInfo(item.url); | ||
let tasks = []; | ||
tasks.push(new ShellTask("git", ["init", "-q"], item.dir)); | ||
tasks.push(new ShellTask("git", ["remote", "add", "origin", url], item.dir)); | ||
tasks.push(new ShellTask("git", ["fetch", "--depth", "1", "origin", item.commit], item.dir)); | ||
tasks.push(new ShellTask("git", ["reset", "--hard", "FETCH_HEAD", "-q"], item.dir)); | ||
TaskRunner.runTasks(tasks, () => { | ||
callback && callback(); | ||
}); | ||
Utils.exec("git init -q", item.dir); | ||
Utils.exec("git remote add origin " + url, item.dir); | ||
Utils.exec("git fetch --depth 1 origin " + item.commit, item.dir); | ||
Utils.exec("git reset --hard FETCH_HEAD -q", item.dir); | ||
callback && callback(); | ||
}; | ||
module.exports = RepoTask; |
@@ -171,3 +171,7 @@ ////////////////////////////////////////////////////////////////////////////////////// | ||
function exec(cmd, dir) { | ||
return childProcess.execSync(cmd, {cwd: dir, env: process.env}).toString(); | ||
let args = cmd.split(" "); | ||
let result = childProcess.spawnSync(args[0], args.slice(1), {cwd: dir, env: process.env, stdio: "inherit"}); | ||
if (result.status !== 0) { | ||
process.exit(1); | ||
} | ||
} | ||
@@ -174,0 +178,0 @@ |
Sorry, the diff of this file is not supported yet
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
8
1
45004
15
1048
113