Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
made registry read-only
  • Loading branch information
stevengill committed Aug 31, 2015
1 parent e5af2f5 commit d286c22abc3f8f0bb9120c69e1bb3f0cda78b0fc
Showing 1 changed file with 6 additions and 1 deletion.
@@ -1,8 +1,11 @@
var updates = exports

updates.package = function (doc, req) {
return error('The plugin reigstry has switcehd to read-only!, please publish your plugins to npm. Learn more at http://plugins.cordova.io/npm/authors.html.');
/*
require("monkeypatch").patch(Object, Date, Array, String)
var tempbody = JSON.parse(req.body);
//only allow npm client 1.3.4 to publish
if(tempbody['_npmVersion']) {
@@ -20,9 +23,11 @@ if(tempbody['_npmVersion']) {
}
var semver = require("semver")
var valid = require("valid")
*/
function error (reason) {
return [{_id: "error: forbidden", forbidden:reason}, JSON.stringify({forbidden:reason})]
}
/*
function ok (doc, message) {
delete doc.mtime
@@ -143,5 +148,5 @@ if(tempbody['_npmVersion']) {
if (!doc['dist-tags']) doc['dist-tags'] = {}
if (latest) doc["dist-tags"].latest = latest
return ok(doc, "created new entry")
}
}*/
}

0 comments on commit d286c22

Please sign in to comment.