mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-06 22:40:26 -05:00
Fixed issue publishing unpublished modules
This commit is contained in:
parent
f74d7cbd3e
commit
d52cfe8bac
5 changed files with 21 additions and 21 deletions
|
@ -24,7 +24,6 @@ $(function() {
|
||||||
scrollFunc();
|
scrollFunc();
|
||||||
|
|
||||||
$(window).resize(function() {
|
$(window).resize(function() {
|
||||||
console.log('resize');
|
|
||||||
$content.css('margin-top', $header.outerHeight());
|
$content.css('margin-top', $header.outerHeight());
|
||||||
}).resize();
|
}).resize();
|
||||||
});
|
});
|
|
@ -1,5 +1,6 @@
|
||||||
var $ = require('unopinionate').selector,
|
var $ = require('unopinionate').selector,
|
||||||
template = require('../entry.hbs');
|
template = require('../entry.hbs'),
|
||||||
|
onScroll = require('onscroll');
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -63,4 +64,7 @@ $(function() {
|
||||||
$input.val('');
|
$input.val('');
|
||||||
$form.keyup();
|
$form.keyup();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -48,7 +48,7 @@ Storage.prototype._internal_error = function(err, file, msg) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
Storage.prototype.add_package = function(name, package, callback) {
|
Storage.prototype.add_package = function(name, info, callback) {
|
||||||
this.storage(name).create_json(info_file, get_boilerplate(name), function(err) {
|
this.storage(name).create_json(info_file, get_boilerplate(name), function(err) {
|
||||||
if (err && err.code === 'EEXISTS') {
|
if (err && err.code === 'EEXISTS') {
|
||||||
return callback(new UError({
|
return callback(new UError({
|
||||||
|
@ -56,13 +56,12 @@ Storage.prototype.add_package = function(name, package, callback) {
|
||||||
msg: 'this package is already present'
|
msg: 'this package is already present'
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
search.add(info.versions[info['dist-tags'].latest]);
|
||||||
|
localList.add(name);
|
||||||
|
|
||||||
callback()
|
callback()
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(package);
|
|
||||||
|
|
||||||
search.add(package.versions[package['dist-tags'].latest]);
|
|
||||||
localList.add(name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Storage.prototype.remove_package = function(name, callback) {
|
Storage.prototype.remove_package = function(name, callback) {
|
||||||
|
|
|
@ -15,16 +15,11 @@ Search.prototype = {
|
||||||
return this.index.search(q);
|
return this.index.search(q);
|
||||||
},
|
},
|
||||||
add: function(package) {
|
add: function(package) {
|
||||||
var self = this;
|
this.index.add({
|
||||||
|
|
||||||
this.storage.get_readme(package.name, package.version, function(readme) {
|
|
||||||
self.index.add({
|
|
||||||
id: package.name,
|
id: package.name,
|
||||||
name: package.name,
|
name: package.name,
|
||||||
description: package.description,
|
description: package.description,
|
||||||
author: package._npmUser.name,
|
author: package._npmUser.name
|
||||||
readme: readme
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
reindex: function() {
|
reindex: function() {
|
||||||
|
|
|
@ -129,7 +129,6 @@ $(function() {
|
||||||
scrollFunc();
|
scrollFunc();
|
||||||
|
|
||||||
$(window).resize(function() {
|
$(window).resize(function() {
|
||||||
console.log('resize');
|
|
||||||
$content.css('margin-top', $header.outerHeight());
|
$content.css('margin-top', $header.outerHeight());
|
||||||
}).resize();
|
}).resize();
|
||||||
});
|
});
|
||||||
|
@ -139,7 +138,8 @@ require('./entry');
|
||||||
require('./header');
|
require('./header');
|
||||||
},{"./entry":2,"./header":3,"./search":5}],5:[function(require,module,exports){
|
},{"./entry":2,"./header":3,"./search":5}],5:[function(require,module,exports){
|
||||||
var $ = require('unopinionate').selector,
|
var $ = require('unopinionate').selector,
|
||||||
template = require('../entry.hbs');
|
template = require('../entry.hbs'),
|
||||||
|
onScroll = require('onscroll');
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -203,9 +203,12 @@ $(function() {
|
||||||
$input.val('');
|
$input.val('');
|
||||||
$form.keyup();
|
$form.keyup();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
},{"../entry.hbs":1,"unopinionate":16}],6:[function(require,module,exports){
|
},{"../entry.hbs":1,"onscroll":14,"unopinionate":16}],6:[function(require,module,exports){
|
||||||
"use strict";
|
"use strict";
|
||||||
/*globals Handlebars: true */
|
/*globals Handlebars: true */
|
||||||
var base = require("./handlebars/base");
|
var base = require("./handlebars/base");
|
||||||
|
|
Loading…
Reference in a new issue