Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Debugging

  • Loading branch information...
commit 599a65a8768f8b3d87a8be2e17b80caad3614e59 1 parent f27ab5d
@kriszyp authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/model/package.js
View
8 lib/model/package.js
@@ -57,7 +57,6 @@ PackageModel = exports.Package = Model(packageStore, {
//if(pckg.repositories && pckg.mtime < new Date().getTime()){
// if there are github repositories, we can query them
return when(updateVersions(pckg), function(){
- print("get done");
return pckg;
});
//}
@@ -115,14 +114,12 @@ function updateVersions(pckg, force){
var packageUpdates = [];
var latestVersion;
return when(queryRepo(repoName).forEach(function(version, type){
- print("add version " + version);
try{
var gitVersion = version;
if(version.match(/^v\d+\.\d+/)){
// following semver v-prefixing for tags, strip it off
version = version.substring(1);
}
- console.log("firstRepo " + firstRepo);
if(firstRepo && (!versions[version] || force)){
update();
latestVersion = version;
@@ -134,7 +131,6 @@ function updateVersions(pckg, force){
update();
}
function update(){
- print("adding version " + version);
var descriptorForVersion = versions[version] = {
name: pckg.name,
version: version,
@@ -223,7 +219,6 @@ function publish(url, asName, force){
url = url.replace(/\/\w+ball\/[^\/]+/,'');
}
var isAlreadyPublished = packageStore.get(asName);
- print("publishing repositor " + isAlreadyPublished);
if(isAlreadyPublished && !force){
/*if(asName && notPublishedAsName){
linkToExistingPackage();
@@ -272,16 +267,19 @@ function publish(url, asName, force){
print("Error " + error);
});
}else if(force){
+ print("In force, checking to see if we are primary repository")
if(pckg.repositories[0].url == url){
// copy the latest info from the package.json if it is the primary repo
for(var i in packageData){
pckg[i] = packageData[i];
}
+ print("Copied from package.json " + pckg.icon);
}
updateVersions(pckg, true).then(null, function(error){
print("Error " + error);
});
}
+ print("icon " + pckg.icon);
packageStore.put(pckg);
return packageData.name;
});
Please sign in to comment.
Something went wrong with that request. Please try again.