update to node v06 compatible deps

This commit is contained in:
Dane Springmeyer
2011-11-18 17:45:01 -08:00
parent fca703f63e
commit 970330575d
2 changed files with 9 additions and 6 deletions
+4 -4
View File
@@ -2,7 +2,7 @@ var _ = require('underscore'),
fs = require('fs'), fs = require('fs'),
Step = require('step'), Step = require('step'),
crypto = require('crypto'), crypto = require('crypto'),
zlib = require('zlib'), _zlib = require('_zlib'),
path = require('path'), path = require('path'),
url = require('url'), url = require('url'),
qs = require('querystring'), qs = require('querystring'),
@@ -216,7 +216,7 @@ MBTiles.prototype.getGrid = function(z, x, y, callback) {
if (err) return callback(err); if (err) return callback(err);
try { try {
var grid = zlib.inflate( var grid = _zlib.inflate(
!Buffer.isBuffer(row.grid) !Buffer.isBuffer(row.grid)
? new Buffer(row.grid, 'binary') ? new Buffer(row.grid, 'binary')
: row.grid : row.grid
@@ -227,7 +227,7 @@ MBTiles.prototype.getGrid = function(z, x, y, callback) {
}, {}); }, {});
var result = _(JSON.parse(grid)).extend({ data: data }); var result = _(JSON.parse(grid)).extend({ data: data });
} catch (err) { } catch (err) {
return callback(new Error('Grid is invalid')); return callback(new Error('Grid is invalid:' + err.message));
} }
callback(null, result); callback(null, result);
@@ -565,7 +565,7 @@ MBTiles.prototype.putGrid = function(z, x, y, data, callback) {
var id = crypto.createHash('md5').update(json).digest('hex'); var id = crypto.createHash('md5').update(json).digest('hex');
if (!this._gridCache[id]) { if (!this._gridCache[id]) {
// This corresponds to the grid_utfgrid table. // This corresponds to the grid_utfgrid table.
this._gridCache[id] = zlib.deflate(new Buffer(json, 'utf8')); this._gridCache[id] = _zlib.deflate(new Buffer(json, 'utf8'));
// This corresponds to the grid_key table. // This corresponds to the grid_key table.
this._keyCache[id] = Object.keys(data.data || {}); this._keyCache[id] = Object.keys(data.data || {});
+5 -2
View File
@@ -30,11 +30,14 @@
], ],
"dependencies": { "dependencies": {
"optimist": "0.2.x", "optimist": "0.2.x",
"sqlite3": "~2.0.17", "sqlite3": "~2.1.1",
"step": "0.0.x", "step": "0.0.x",
"sphericalmercator": "1.0.x", "sphericalmercator": "1.0.x",
"underscore": "1.1.x", "underscore": "1.1.x",
"zlib": "1.0.x" "zlib": "https://github.com/springmeyer/node-zlib/tarball/master"
},
"devDependencies": {
"expresso": "~0.9.0"
}, },
"engines": { "engines": {
"node": ">= 0.4.0" "node": ">= 0.4.0"