geoip-country 4.2.32 → 4.2.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/geoip-country.dat +0 -0
- package/data/geoip-country6.dat +0 -0
- package/package.json +1 -1
- package/scripts/updatedb.js +9 -9
package/data/geoip-country.dat
CHANGED
|
Binary file
|
package/data/geoip-country6.dat
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/scripts/updatedb.js
CHANGED
|
@@ -170,9 +170,9 @@ function fetch(database, cb) {
|
|
|
170
170
|
|
|
171
171
|
if (status !== 200) {
|
|
172
172
|
if (status === 401) {
|
|
173
|
-
console.log('ERROR'
|
|
173
|
+
console.log('ERROR' + ': Download Not Allowed — Is Your License Key Valid? [HTTP %d]', status);
|
|
174
174
|
} else {
|
|
175
|
-
console.log('ERROR'
|
|
175
|
+
console.log('ERROR' + ': HTTP Request Failed [%d]', status);
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
client.abort();
|
|
@@ -183,7 +183,7 @@ function fetch(database, cb) {
|
|
|
183
183
|
var tmpFilePipe = response.pipe(tmpFileStream);
|
|
184
184
|
|
|
185
185
|
tmpFilePipe.on('close', function() {
|
|
186
|
-
console.log(' DONE'
|
|
186
|
+
console.log(' DONE');
|
|
187
187
|
cb(null, tmpFile, fileName, database);
|
|
188
188
|
});
|
|
189
189
|
}
|
|
@@ -256,7 +256,7 @@ function processLookupCountry(src, cb){
|
|
|
256
256
|
.skip(1)
|
|
257
257
|
.map(processLine)
|
|
258
258
|
.on('pipe', function() {
|
|
259
|
-
console.log(' DONE'
|
|
259
|
+
console.log(' DONE');
|
|
260
260
|
cb();
|
|
261
261
|
});
|
|
262
262
|
}
|
|
@@ -380,7 +380,7 @@ function processCountryData(src, dest, cb) {
|
|
|
380
380
|
.skip(1)
|
|
381
381
|
.map(processLine)
|
|
382
382
|
.on('pipe', function() {
|
|
383
|
-
console.log(' DONE'
|
|
383
|
+
console.log(' DONE');
|
|
384
384
|
cb();
|
|
385
385
|
});
|
|
386
386
|
}
|
|
@@ -569,7 +569,7 @@ function processData(database, cb) {
|
|
|
569
569
|
processCityData(src[1], dest[1], function() {
|
|
570
570
|
console.log("city data processed");
|
|
571
571
|
processCityData(src[2], dest[2], function() {
|
|
572
|
-
console.log(' DONE'
|
|
572
|
+
console.log(' DONE');
|
|
573
573
|
cb();
|
|
574
574
|
});
|
|
575
575
|
});
|
|
@@ -586,17 +586,17 @@ rimraf(tmpPath);
|
|
|
586
586
|
mkdir(tmpPath);
|
|
587
587
|
|
|
588
588
|
console.log('Fetching new databases from MaxMind...');
|
|
589
|
-
console.log('Storing files at ' + dataPath
|
|
589
|
+
console.log('Storing files at ' + dataPath);
|
|
590
590
|
|
|
591
591
|
async.eachSeries(databases, function(database, nextDatabase) {
|
|
592
592
|
if (database.type.indexOf('city') !== -1) return nextDatabase();
|
|
593
593
|
async.seq(fetch, extract, processData)(database, nextDatabase);
|
|
594
594
|
}, function(err) {
|
|
595
595
|
if (err) {
|
|
596
|
-
console.log('Failed to Update Databases from MaxMind.'
|
|
596
|
+
console.log('Failed to Update Databases from MaxMind.');
|
|
597
597
|
process.exit(1);
|
|
598
598
|
} else {
|
|
599
|
-
console.log('Successfully Updated Databases from MaxMind.'
|
|
599
|
+
console.log('Successfully Updated Databases from MaxMind.');
|
|
600
600
|
if (process.argv[2] == 'debug') console.log('Notice: temporary files are not deleted for debug purposes.'.bold.yellow);
|
|
601
601
|
else setTimeout(function(){rimraf(tmpPath);}, 100);
|
|
602
602
|
}
|