verdaccio
Advanced tools
Comparing version 2.0.1 to 2.1.0
@@ -9,3 +9,3 @@ #!/usr/bin/env node | ||
process.title = 'sinopia' | ||
process.title = 'verdaccio' | ||
require('es6-shim') | ||
@@ -12,0 +12,0 @@ |
@@ -7,2 +7,3 @@ var Cookies = require('cookies') | ||
var Middleware = require('./middleware') | ||
var Notify = require('./notify') | ||
var Utils = require('./utils') | ||
@@ -18,2 +19,3 @@ var expect_json = Middleware.expect_json | ||
var can = Middleware.allow(auth) | ||
var notify = Notify.notify; | ||
@@ -27,2 +29,3 @@ // validate all of these params as a package name | ||
app.param('revision', validate_name) | ||
app.param('token', validate_name) | ||
@@ -208,2 +211,9 @@ // these can't be safely put into express url for some reason | ||
app.delete('/-/user/token/*', function(req, res, next) { | ||
res.status(200) | ||
next({ | ||
ok: 'Logged out', | ||
}) | ||
}) | ||
function tag_package_version(req, res, next) { | ||
@@ -343,3 +353,3 @@ if (typeof(req.body) !== 'string') return next('route') | ||
if (err) return next(err) | ||
notify(metadata, config) | ||
res.status(201) | ||
@@ -346,0 +356,0 @@ return next({ ok: ok_message }) |
@@ -36,2 +36,4 @@ var async = require('async') | ||
Handlebars.registerPartial('entry', fs.readFileSync(require.resolve('./GUI/entry.hbs'), 'utf8')) | ||
if(config.web && config.web.template) { | ||
@@ -41,3 +43,2 @@ var template = Handlebars.compile(fs.readFileSync(config.web.template, 'utf8')); | ||
else { | ||
Handlebars.registerPartial('entry', fs.readFileSync(require.resolve('./GUI/entry.hbs'), 'utf8')) | ||
var template = Handlebars.compile(fs.readFileSync(require.resolve('./GUI/index.hbs'), 'utf8')) | ||
@@ -56,3 +57,7 @@ } | ||
setImmediate(function () { | ||
cb(err, allowed) | ||
if (err) { | ||
cb(null, false); | ||
} else { | ||
cb(err, allowed) | ||
} | ||
}) | ||
@@ -159,2 +164,1 @@ }) | ||
} | ||
@@ -35,2 +35,7 @@ var Logger = require('bunyan') | ||
} | ||
} else if (target.format === 'pretty-timestamped') { | ||
// making fake stream for prettypritting | ||
stream.write = function(obj) { | ||
dest.write(obj.time.toISOString() + print(obj.level, obj.msg, obj, dest.isTTY) + '\n') | ||
} | ||
} else { | ||
@@ -37,0 +42,0 @@ stream.write = function(obj) { |
@@ -19,3 +19,3 @@ var Path = require('path') | ||
// try local plugins first | ||
plugin = try_load(Path.resolve('./lib/plugins', p)) | ||
plugin = try_load(Path.resolve(__dirname + '/plugins', p)) | ||
@@ -22,0 +22,0 @@ // npm package |
@@ -119,2 +119,7 @@ var JSONStream = require('JSONStream') | ||
// add/override headers specified in the config | ||
for (var key in this.config.headers) { | ||
headers[key] = this.config.headers[key] | ||
} | ||
var method = options.method || 'GET' | ||
@@ -121,0 +126,0 @@ var uri = options.uri_full || (this.config.url + options.uri) |
{ | ||
"name": "verdaccio", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "Private npm repository server", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -62,2 +62,3 @@ //require('es6-shim') | ||
require('./adduser')() | ||
require('./logout')() | ||
require('./addtag')() | ||
@@ -89,2 +90,1 @@ require('./plugins')() | ||
}) | ||
@@ -46,2 +46,9 @@ var assert = require('assert') | ||
Server.prototype.logout = function(token) { | ||
return this.request({ | ||
uri: '/-/user/token/'+encodeURIComponent(token), | ||
method: 'DELETE' | ||
}) | ||
} | ||
Server.prototype.get_package = function(name) { | ||
@@ -48,0 +55,0 @@ return this.request({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
769674
111
21551