Permalink
Browse files

Use full URL for archives, and provide dist-tags for NPM

  • Loading branch information...
1 parent 1bd6f7a commit 6bdd661fa8762ecac03fe14032aec176b596727d @kriszyp committed Jan 4, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/model/package.js
View
@@ -110,6 +110,7 @@ function updateVersions(pckg, force){
}
if(firstRepo && (!versions[version] || force)){
update();
+ pckg["dist-tags"] = {"latest":version};
}
var owner = repoName.substring(0, repoName.indexOf("/"));
version = owner + '-' + version;
@@ -260,7 +261,7 @@ var maxSize = 10000000;
exports.cacheArchive = cacheArchive;
function cacheArchive(url){
// download the archive into our local mirror
- return "/archives/" + encodeURIComponent(url).replace(/%/g,'$');
+ return "http://" + host + "/archives/" + encodeURIComponent(url).replace(/%/g,'$');
}
function request(args, tries){

0 comments on commit 6bdd661

Please sign in to comment.