Comparing version 5.0.1 to 5.0.2
@@ -19,2 +19,3 @@ var sm = new (require('sphericalmercator'))(); | ||
this.stats = new Stats(); | ||
this.length = 0; | ||
@@ -44,4 +45,6 @@ // Determine when the writable stream is finished so the | ||
this.stats.total++; | ||
this.length++; | ||
next = this.buffer.indexOf('\n'); | ||
} | ||
this.emit('length', this.length); | ||
callback(); | ||
@@ -67,2 +70,5 @@ }; | ||
stream.stats.done++; | ||
// Update length | ||
stream.length--; | ||
stream.emit('length', stream.length); | ||
get(push); | ||
@@ -69,0 +75,0 @@ } else { |
@@ -36,2 +36,3 @@ var sm = new (require('sphericalmercator'))(); | ||
this.stats = new Stats(); | ||
this.length = 0; | ||
@@ -76,2 +77,4 @@ stream.Readable.call(this, { objectMode: true }); | ||
if (err) return stream.emit('error', err); | ||
stream.length = stream.stats.total; | ||
stream.emit('length', stream.length); | ||
stream.push(new Info(info)); | ||
@@ -116,2 +119,5 @@ }); | ||
stream.stats.done += 1 + sum; | ||
// Update length | ||
stream.length -= 1 + sum; | ||
stream.emit('length', stream.length); | ||
get(push); | ||
@@ -118,0 +124,0 @@ } else { |
@@ -32,2 +32,3 @@ var sm = new (require('sphericalmercator'))(); | ||
this.cursor = undefined; | ||
this.length = 0; | ||
@@ -74,2 +75,4 @@ stream.Readable.call(this, { objectMode: true }); | ||
if (err) return stream.emit('error', err); | ||
stream.length = stream.stats.total; | ||
stream.emit('length', stream.length); | ||
stream.push(new Info(info)); | ||
@@ -91,2 +94,5 @@ }); | ||
stream.stats.done++; | ||
// Update length | ||
stream.length--; | ||
stream.emit('length', stream.length); | ||
get(push); | ||
@@ -93,0 +99,0 @@ } else { |
@@ -104,4 +104,13 @@ var tilelive = exports; | ||
if (!tilelive.protocols[uri.protocol]) { | ||
try { require(keyword).registerProtocols(tilelive); } catch(err) {}; | ||
try { require('tilelive-' + keyword).registerProtocols(tilelive); } catch(err) {}; | ||
[keyword, 'tilelive-' + keyword].forEach(function(name) { | ||
try { | ||
var mod = require(name); | ||
if (typeof(mod.registerProtocols) === 'function') { | ||
mod.registerProtocols(tilelive); | ||
} else { | ||
mod(tilelive); | ||
} | ||
} catch(err) {}; | ||
}); | ||
} | ||
@@ -108,0 +117,0 @@ |
{ | ||
"name": "tilelive", | ||
"version": "5.0.1", | ||
"version": "5.0.2", | ||
"main": "./lib/tilelive.js", | ||
@@ -35,3 +35,3 @@ "description": "API for various map tile backends", | ||
"minimist": "~0.2.0", | ||
"speedometer": "~0.1.2", | ||
"progress-stream": "~0.5.x", | ||
"sphericalmercator": "~1.0.1" | ||
@@ -42,3 +42,4 @@ }, | ||
"mbtiles": "~0.4.3", | ||
"tilejson": "~0.8.0" | ||
"tilejson": "~0.8.0", | ||
"tilelive-http": "^0.3.0" | ||
}, | ||
@@ -45,0 +46,0 @@ "bin": { |
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
43951
719
1
4
+ Addedprogress-stream@~0.5.x
+ Addedcore-util-is@1.0.3(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisarray@0.0.1(transitive)
+ Addedobject-keys@0.4.0(transitive)
+ Addedprogress-stream@0.5.0(transitive)
+ Addedreadable-stream@1.1.14(transitive)
+ Addedsingle-line-log@0.3.1(transitive)
+ Addedstring_decoder@0.10.31(transitive)
+ Addedthrough2@0.2.3(transitive)
+ Addedxtend@2.1.2(transitive)
- Removedspeedometer@~0.1.2