Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afa5639752 | ||
|
|
e0213e18a0 | ||
|
|
a74d60c7eb | ||
|
|
fcabc49d39 | ||
|
|
ad0722b57b | ||
|
|
6e11a2c8a7 | ||
|
|
0329cfad61 | ||
|
|
ede8a3ce5f | ||
|
|
cde4f2179e | ||
|
|
374dc17a6b | ||
|
|
626259c379 |
@@ -7,4 +7,4 @@ addons:
|
||||
- postgresql: '9.3'
|
||||
script: 'make test-travis-all'
|
||||
after_script:
|
||||
- "npm i codecov && codecov"
|
||||
- 'npm i codecov && codecov'
|
||||
|
||||
15
History.md
15
History.md
@@ -1,4 +1,19 @@
|
||||
|
||||
2.9.4 / 2016-04-09
|
||||
==================
|
||||
|
||||
* fix: don't sync constructor package on exists mode (#883)
|
||||
* Update utility to version 1.7.0 🚀
|
||||
* chore: update sponsor link
|
||||
|
||||
2.9.3 / 2016-04-05
|
||||
==================
|
||||
|
||||
* fix: use better diff time to check sync status
|
||||
* Update sequelize to version 3.21.0 🚀
|
||||
* chore(package): update agentkeepalive to version 2.1.0
|
||||
* chore(package): update pg to version 4.5.2
|
||||
|
||||
2.9.2 / 2016-03-29
|
||||
==================
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ Tips: make sure your code is following the [node-style-guide](https://github.com
|
||||
|
||||
## Sponsors
|
||||
|
||||
- [](https://www.aliyun.com?from=cnpmjs.org) (2016.2 - now)
|
||||
- [](http://click.aliyun.com/m/4288/) (2016.2 - now)
|
||||
- [](http://www.ucloud.cn?sem=sdk-CNPMJS) (2015.3 - 2016.3)
|
||||
|
||||
## License
|
||||
|
||||
@@ -151,5 +151,5 @@ Release [History](/history).
|
||||
|
||||
## Sponsors
|
||||
|
||||
- [](https://www.aliyun.com?from=cnpmjs.org) (2016.2 - now)
|
||||
- [](http://click.aliyun.com/m/4288/) (2016.2 - now)
|
||||
- [](http://www.ucloud.cn?sem=sdk-CNPMJS) (2015.3 - 2016.3)
|
||||
|
||||
10
package.json
10
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cnpmjs.org",
|
||||
"version": "2.9.2",
|
||||
"version": "2.9.4",
|
||||
"description": "Private npm registry and web for Enterprise, base on MySQL and Simple Store Service",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -13,7 +13,7 @@
|
||||
"cnpmjs.org": "bin/cli.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"agentkeepalive": "~2.0.3",
|
||||
"agentkeepalive": "~2.1.0",
|
||||
"bytes": "~2.3.0",
|
||||
"cfork": "~1.4.0",
|
||||
"co": "~4.6.0",
|
||||
@@ -46,12 +46,12 @@
|
||||
"mysql": "~2.10.2",
|
||||
"nodemailer": "~1.3.0",
|
||||
"semver": "~5.1.0",
|
||||
"sequelize": "~3.20.0",
|
||||
"sequelize": "~3.21.0",
|
||||
"thunkify-wrap": "~1.0.4",
|
||||
"treekill": "~1.0.0",
|
||||
"tunnel-agent": "^0.4.0",
|
||||
"urllib": "~2.8.0",
|
||||
"utility": "~1.6.0",
|
||||
"utility": "~1.7.0",
|
||||
"xss": "~0.2.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -64,7 +64,7 @@
|
||||
"mocha": "*",
|
||||
"node-dev": "*",
|
||||
"pedding": "*",
|
||||
"pg": "~4.4.2",
|
||||
"pg": "~4.5.2",
|
||||
"pg-hstore": "~2.3.2",
|
||||
"should": "~7.1.0",
|
||||
"should-http": "*",
|
||||
|
||||
@@ -195,9 +195,11 @@ function* checkSyncStatus() {
|
||||
}
|
||||
var diff = Date.now() - lastSyncTime;
|
||||
var oneDay = 3600000 * 24;
|
||||
if (diff > oneDay) {
|
||||
var err = new Error('Last sync time is expired in ' + diff + ' ms, lastSyncTime: ' + new Date(lastSyncTime));
|
||||
err.name = 'SyncExpriedError';
|
||||
var maxTime = Math.max(oneDay, syncInterval * 2);
|
||||
if (diff > maxTime) {
|
||||
var err = new Error('Last sync time is expired in ' + diff + ' ms, lastSyncTime: ' +
|
||||
new Date(lastSyncTime) + ', maxTime: ' + maxTime + ' ms');
|
||||
err.name = 'SyncExpiredError';
|
||||
sendMailToAdmin(err, null, new Date());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ function intersection(arrOne, arrTwo) {
|
||||
map[name] = true;
|
||||
});
|
||||
arrTwo.forEach(function (name) {
|
||||
map[name] && results.push(name);
|
||||
map[name] === true && results.push(name);
|
||||
});
|
||||
return results;
|
||||
}
|
||||
@@ -48,7 +48,7 @@ module.exports = function* sync() {
|
||||
|
||||
var allPackages;
|
||||
if (!info.last_exist_sync_time) {
|
||||
var pkgs = yield* npmService.getShort();
|
||||
var pkgs = yield npmService.getShort();
|
||||
debug('First time sync all packages from official registry, got %d packages', pkgs.length);
|
||||
if (info.last_sync_module) {
|
||||
// start from last success
|
||||
@@ -74,7 +74,7 @@ module.exports = function* sync() {
|
||||
fails: []
|
||||
};
|
||||
}
|
||||
debug('Total %d packages to sync', packages.length);
|
||||
debug('Total %d packages to sync, top 10: %j', packages.length, packages.slice(0, 10));
|
||||
|
||||
var worker = new SyncModuleWorker({
|
||||
username: 'admin',
|
||||
|
||||
Reference in New Issue
Block a user