@aj-shadow/z-build-project 0.0.0-aj-beta.237 → 0.0.0-aj-beta.239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aj-shadow/z-build-project",
|
|
3
|
-
"version": "0.0.0-aj-beta.
|
|
3
|
+
"version": "0.0.0-aj-beta.239",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@aj-shadow/z-build-project",
|
|
9
|
-
"version": "0.0.0-aj-beta.
|
|
9
|
+
"version": "0.0.0-aj-beta.239",
|
|
10
10
|
"license": "MIT"
|
|
11
11
|
}
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ const GitGlobal = require('./git-global');
|
|
|
5
5
|
const Log = require('./log');
|
|
6
6
|
const RepoManager = require('./repo-manager');
|
|
7
7
|
const Tr = Reflect.get(global, 'tr@actorjs_global');
|
|
8
|
-
const
|
|
8
|
+
const { simpleGit } = require('simple-git');
|
|
9
9
|
const Clc = require('cli-color');
|
|
10
10
|
const Fs = require('fs');
|
|
11
11
|
const Path = require('path');
|
|
@@ -221,7 +221,7 @@ function isRepo(path, cb) {
|
|
|
221
221
|
}
|
|
222
222
|
else if(stat.isDirectory()) {
|
|
223
223
|
repoResult.isFolder = true;
|
|
224
|
-
|
|
224
|
+
simpleGit(path).checkIsRepo((err, result) => {
|
|
225
225
|
if(err) {
|
|
226
226
|
repoResult.error = err;
|
|
227
227
|
}
|
|
@@ -263,19 +263,19 @@ function getRepoStatus(path, repoGroup, name, cb) {
|
|
|
263
263
|
}
|
|
264
264
|
else if(stat.isDirectory()) {
|
|
265
265
|
repo.isFolder = true;
|
|
266
|
-
|
|
266
|
+
simpleGit(path).checkIsRepo((err, result) => {
|
|
267
267
|
if(err) {
|
|
268
268
|
repo.error = err;
|
|
269
269
|
return cb(err, repo);
|
|
270
270
|
}
|
|
271
271
|
if(result) {
|
|
272
272
|
repo.isRepo = true;
|
|
273
|
-
|
|
273
|
+
simpleGit(path).fetch((err, result) => {
|
|
274
274
|
if(err) {
|
|
275
275
|
repo.error = err;
|
|
276
276
|
return cb(err, repo);
|
|
277
277
|
}
|
|
278
|
-
|
|
278
|
+
simpleGit(path).status((err, result) => {
|
|
279
279
|
repo.error = err;
|
|
280
280
|
repo.ready = 0 === result.not_added.length && 0 === result.conflicted.length && 0 === result.created.length && 0 === result.deleted.length && 0 === result.modified.length && 0 === result.renamed.length && 0 === result.staged.length && 0 === result.ahead && 0 == result.behind;
|
|
281
281
|
repo.result = result;
|
|
@@ -616,7 +616,7 @@ Tr.task('task:clone', (cb) => {
|
|
|
616
616
|
else {
|
|
617
617
|
Log.log('start clone repo:', repoData.repo, '...');
|
|
618
618
|
++pendings;
|
|
619
|
-
|
|
619
|
+
simpleGit().clone(repoData.repo, `${Path.normalize(repoGroup.path)}${Path.sep}${repoData.folder}`, (err, result) => {
|
|
620
620
|
if(!err) {
|
|
621
621
|
repoResult.result.repoSucceded.push(repoStatus);
|
|
622
622
|
cloneRepoReady = true;
|
|
@@ -699,7 +699,7 @@ Tr.task('task:pull', (cb) => {
|
|
|
699
699
|
if(tagRepo) {
|
|
700
700
|
const repoData = _RepoManager.get(tagRepo);
|
|
701
701
|
if(repoData) {
|
|
702
|
-
|
|
702
|
+
simpleGit(Path.normalize(`${repoData.path}${Path.sep}${repoData.data.folder}`)).pull((err, update) => {
|
|
703
703
|
_printPullResultHeading();
|
|
704
704
|
if(err) {
|
|
705
705
|
Log.log(Clc.red('git pull error:'), err);
|
|
@@ -726,7 +726,7 @@ Tr.task('task:pull', (cb) => {
|
|
|
726
726
|
const folder = Path.normalize(`${repoGroup.path}${Path.sep}${repo.folder}`);
|
|
727
727
|
isRepo(folder, (result) => {
|
|
728
728
|
if(result.success()) {
|
|
729
|
-
|
|
729
|
+
simpleGit(folder).pull((err, update) => {
|
|
730
730
|
if(err) {
|
|
731
731
|
Log.log(Clc.red('git pull '), Clc.yellow(repo.repo), Clc.red(' error: '), err);
|
|
732
732
|
errors.push(Clc.red('git pull '), Clc.yellow(repo.repo), Clc.red(' error: '), err);
|