Comparing version 1.13.10 to 1.13.11
## History | ||
- v1.13.11 October 22, 2012 | ||
- `balUtilPaths` changes: | ||
- `ensurePath` now returns `err` and `exists` instead of just `err` | ||
- `balUtilModules` changes: | ||
- `initGitRepo` will now default `remote` to `origin` and `branch` to `master` | ||
- Added `initOrPullGitRepo` | ||
- v1.13.10 October 7, 2012 | ||
@@ -4,0 +11,0 @@ - `balUtilPaths` changes: |
@@ -453,2 +453,4 @@ // Generated by CoffeeScript 1.3.3 | ||
path = opts.path, remote = opts.remote, url = opts.url, branch = opts.branch, logger = opts.logger, output = opts.output, gitPath = opts.gitPath; | ||
remote || (remote = 'origin'); | ||
branch || (branch = 'master'); | ||
commands = [['init'], ['remote', 'add', remote, url], ['fetch', remote], ['pull', remote, branch], ['submodule', 'init'], ['submodule', 'update', '--recursive']]; | ||
@@ -475,2 +477,22 @@ if (logger) { | ||
}, | ||
initOrPullGitRepo: function(opts, next) { | ||
var branch, path, remote, _ref4, | ||
_this = this; | ||
_ref4 = balUtilFlow.extractOptsAndCallback(opts, next), opts = _ref4[0], next = _ref4[1]; | ||
path = opts.path, remote = opts.remote, branch = opts.branch; | ||
remote || (remote = 'origin'); | ||
branch || (branch = 'master'); | ||
balUtilPaths.ensurePath(path, function(err, exists) { | ||
if (err) { | ||
return complete(err); | ||
} | ||
if (exists) { | ||
opts.cwd = path; | ||
return balUtilModules.gitCommand(['pull', remote, branch], opts, next); | ||
} else { | ||
return balUtilModules.initGitRepo(opts, next); | ||
} | ||
}); | ||
return this; | ||
}, | ||
initNodeModules: function(opts, next) { | ||
@@ -477,0 +499,0 @@ var force, logger, nodeModulesPath, packageJsonPath, partTwo, path, pathUtil, _ref4; |
@@ -261,3 +261,3 @@ // Generated by CoffeeScript 1.3.3 | ||
if (exists) { | ||
return next(); | ||
return next(null, true); | ||
} | ||
@@ -268,3 +268,3 @@ parentPath = balUtilPaths.getParentPathSync(path); | ||
console.log("balUtilPaths.ensurePath: failed to ensure the path: " + parentPath); | ||
return next(err); | ||
return next(err, false); | ||
} | ||
@@ -277,3 +277,3 @@ return balUtilPaths.mkdir(path, '700', function(err) { | ||
} | ||
return next(); | ||
return next(null, false); | ||
}); | ||
@@ -280,0 +280,0 @@ }); |
{ | ||
"name": "bal-util", | ||
"version": "1.13.10", | ||
"version": "1.13.11", | ||
"description": "Common utility functions for Node.js used and maintained by Benjamin Lupton", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/balupton/bal-util", |
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
98203
2359
0