From 7e5227e4a135febf50e16d84af7ac0006d20e373 Mon Sep 17 00:00:00 2001 From: Alex Kocharin Date: Mon, 11 Aug 2014 08:46:20 +0400 Subject: [PATCH 1/4] allow "pretty" format for logging into files ref #88 --- lib/logger.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/logger.js b/lib/logger.js index e4e99be6a..5a093be29 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -42,7 +42,11 @@ module.exports.setup = function(logs) { Logger.emit('error', err) }) stream.write = function(obj) { - dest.write(JSON.stringify(obj, Logger.safeCycles()) + '\n') + if (target.format === 'pretty') { + dest.write(print(obj.level, obj.msg, obj, false) + '\n') + } else { + dest.write(JSON.stringify(obj, Logger.safeCycles()) + '\n') + } } } else { throw new Error('wrong target type for a log') From b740dd11cf715fa6bcf6179bf5a30adcb004c8c1 Mon Sep 17 00:00:00 2001 From: Alex Kocharin Date: Wed, 3 Sep 2014 15:31:57 +0400 Subject: [PATCH 2/4] remove outdated user existence check doesn't work with htpasswd, and doesn't make sense with future auth plugins ref #115 --- lib/config.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/config.js b/lib/config.js index a634e20c0..744dd4203 100644 --- a/lib/config.js +++ b/lib/config.js @@ -75,11 +75,6 @@ function Config(config) { Array.isArray(hash[action]) , 'CONFIG: bad "'+i+'" package '+action+' description (array or string expected)') hash[action] = flatten(hash[action]) - hash[action].forEach(function(user) { - assert( - users[user] != null - , 'CONFIG: "'+i+'" package: user "'+user+'" doesn\'t exist') - }) } for (var i in this.packages) { From f512925fd4ca7021107ed66b45ec8b5eaa1ee048 Mon Sep 17 00:00:00 2001 From: Alex Kocharin Date: Wed, 3 Sep 2014 15:40:42 +0400 Subject: [PATCH 3/4] 0.9.2 --- History.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/History.md b/History.md index 5c52882e5..737ba8a7a 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,9 @@ +3 Sep 2014, version 0.9.2 + +- allow "pretty" format for logging into files (issue [#88](https://github.com/rlidwka/sinopia/pull/88)) +- remove outdated user existence check (issue [#115](https://github.com/rlidwka/sinopia/pull/115)) + 11 Aug 2014, version 0.9.1 - filter falsey _npmUser values (issue [#95](https://github.com/rlidwka/sinopia/pull/95)) From 4239107ed225bad556dfaf9dcef593164c17c130 Mon Sep 17 00:00:00 2001 From: Alex Kocharin Date: Wed, 3 Sep 2014 15:40:48 +0400 Subject: [PATCH 4/4] 0.9.2 --- package.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.yaml b/package.yaml index 7ce676989..032844f97 100644 --- a/package.yaml +++ b/package.yaml @@ -1,7 +1,7 @@ # use "yapm install ." if you're installing this from git repository name: sinopia -version: 0.9.1 +version: 0.9.2 description: Private npm repository server author: