Fix passing configuration into commands on programmatic usage, fixes #608.

This commit is contained in:
André Cruz
2013-07-11 07:56:53 +01:00
parent ff54168a10
commit 56679d2a8e
12 changed files with 13 additions and 13 deletions

View File

@@ -16,7 +16,7 @@ function clean(packages, options, config) {
var names;
options = options || {};
config = mout.object.deepMixIn(config || {}, defaultConfig);
config = mout.object.deepFillIn(config || {}, defaultConfig);
// If packages is an empty array, null them
if (packages && !packages.length) {

View File

@@ -10,7 +10,7 @@ function list(packages, options, config) {
var emitter = new EventEmitter();
var logger = new Logger();
config = mout.object.deepMixIn(config || {}, defaultConfig);
config = mout.object.deepFillIn(config || {}, defaultConfig);
repository = new PackageRepository(config, logger);
// If packages is an empty array, null them

View File

@@ -10,7 +10,7 @@ function info(pkg, property, config) {
var emitter = new EventEmitter();
var logger = new Logger();
config = mout.object.deepMixIn(config || {}, defaultConfig);
config = mout.object.deepFillIn(config || {}, defaultConfig);
repository = new PackageRepository(config, logger);
pkg = pkg.split('#');

View File

@@ -11,7 +11,7 @@ function install(endpoints, options, config) {
var logger = new Logger();
options = options || {};
config = mout.object.deepMixIn(config || {}, defaultConfig);
config = mout.object.deepFillIn(config || {}, defaultConfig);
project = new Project(config, logger);
// If endpoints is an empty array, null them

View File

@@ -16,7 +16,7 @@ function linkSelf(config) {
var emitter = new EventEmitter();
var logger = new Logger();
config = mout.object.deepMixIn(config || {}, defaultConfig);
config = mout.object.deepFillIn(config || {}, defaultConfig);
project = new Project(config, logger);
project.getJson()
@@ -49,7 +49,7 @@ function linkTo(name, localName, config) {
var dst;
var emitter = new EventEmitter();
config = mout.object.deepMixIn(config || {}, defaultConfig);
config = mout.object.deepFillIn(config || {}, defaultConfig);
localName = localName || name;
src = path.join(config.storage.links, name);

View File

@@ -16,7 +16,7 @@ function list(options, config) {
var logger = new Logger();
options = options || {};
config = mout.object.deepMixIn(config || {}, defaultConfig);
config = mout.object.deepFillIn(config || {}, defaultConfig);
project = new Project(config, logger);
repository = new PackageRepository(config, logger);

View File

@@ -9,7 +9,7 @@ function lookup(name, config) {
var registryClient;
var emitter = new EventEmitter();
config = mout.object.deepMixIn(config || {}, defaultConfig);
config = mout.object.deepFillIn(config || {}, defaultConfig);
config.cache = config.storage.registry;
registryClient = new RegistryClient(config);

View File

@@ -10,7 +10,7 @@ function prune(names, config) {
var emitter = new EventEmitter();
var logger = new Logger();
config = mout.object.deepMixIn(config || {}, defaultConfig);
config = mout.object.deepFillIn(config || {}, defaultConfig);
project = new Project(config, logger);
// If names is an empty array, null them

View File

@@ -16,7 +16,7 @@ function register(name, url, config) {
var logger = new Logger();
var force;
config = mout.object.deepMixIn(config || {}, defaultConfig);
config = mout.object.deepFillIn(config || {}, defaultConfig);
force = config.force;
// Bypass any cache

View File

@@ -10,7 +10,7 @@ function search(name, config) {
var promise;
var emitter = new EventEmitter();
config = mout.object.deepMixIn(config || {}, defaultConfig);
config = mout.object.deepFillIn(config || {}, defaultConfig);
config.cache = config.storage.registry;
registryClient = new RegistryClient(config);

View File

@@ -11,7 +11,7 @@ function uninstall(names, options, config) {
var logger = new Logger();
options = options || {};
config = mout.object.deepMixIn(config || {}, defaultConfig);
config = mout.object.deepFillIn(config || {}, defaultConfig);
project = new Project(config, logger);
// If names is an empty array, null them

View File

@@ -11,7 +11,7 @@ function update(names, options, config) {
var logger = new Logger();
options = options || {};
config = mout.object.deepMixIn(config || {}, defaultConfig);
config = mout.object.deepFillIn(config || {}, defaultConfig);
project = new Project(config, logger);
// If names is an empty array, null them