This commit is contained in:
Alan K 2014-10-24 07:57:19 -04:00
parent 9b51e10742
commit 62be361fdc
5 changed files with 25 additions and 13 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "filer", "name": "filer",
"version": "0.0.34", "version": "0.0.35",
"main": "dist/filer.js", "main": "dist/filer.js",
"ignore": [ "ignore": [
"build", "build",

14
dist/filer-test.js vendored
View File

@ -9687,7 +9687,7 @@ module.exports = {
}; };
},{"./indexeddb.js":55,"./memory.js":56,"./websql.js":57}],55:[function(require,module,exports){ },{"./indexeddb.js":55,"./memory.js":56,"./websql.js":57}],55:[function(require,module,exports){
(function (global){ (function (global,Buffer){
var FILE_SYSTEM_NAME = require('../constants.js').FILE_SYSTEM_NAME; var FILE_SYSTEM_NAME = require('../constants.js').FILE_SYSTEM_NAME;
var FILE_STORE_NAME = require('../constants.js').FILE_STORE_NAME; var FILE_STORE_NAME = require('../constants.js').FILE_STORE_NAME;
var IDB_RW = require('../constants.js').IDB_RW; var IDB_RW = require('../constants.js').IDB_RW;
@ -9763,7 +9763,13 @@ IndexedDBContext.prototype.putObject = function(key, value, callback) {
_put(this.objectStore, key, value, callback); _put(this.objectStore, key, value, callback);
}; };
IndexedDBContext.prototype.putBuffer = function(key, uint8BackedBuffer, callback) { IndexedDBContext.prototype.putBuffer = function(key, uint8BackedBuffer, callback) {
_put(this.objectStore, key, uint8BackedBuffer.buffer, callback); var buf;
if(!Buffer._useTypedArrays) { // workaround for fxos 1.3
buf = uint8BackedBuffer.toArrayBuffer();
} else {
buf = uint8BackedBuffer.buffer;
}
_put(this.objectStore, key, buf, callback);
}; };
IndexedDBContext.prototype.delete = function(key, callback) { IndexedDBContext.prototype.delete = function(key, callback) {
@ -9831,8 +9837,8 @@ IndexedDB.prototype.getReadWriteContext = function() {
module.exports = IndexedDB; module.exports = IndexedDB;
}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
},{"../buffer.js":42,"../constants.js":43,"../errors.js":46}],56:[function(require,module,exports){ },{"../buffer.js":42,"../constants.js":43,"../errors.js":46,"buffer":38}],56:[function(require,module,exports){
var FILE_SYSTEM_NAME = require('../constants.js').FILE_SYSTEM_NAME; var FILE_SYSTEM_NAME = require('../constants.js').FILE_SYSTEM_NAME;
// NOTE: prefer setImmediate to nextTick for proper recursion yielding. // NOTE: prefer setImmediate to nextTick for proper recursion yielding.
// see https://github.com/js-platform/filer/pull/24 // see https://github.com/js-platform/filer/pull/24

14
dist/filer.js vendored
View File

@ -5153,7 +5153,7 @@ module.exports = {
}; };
},{"./indexeddb.js":23,"./memory.js":24,"./websql.js":25}],23:[function(_dereq_,module,exports){ },{"./indexeddb.js":23,"./memory.js":24,"./websql.js":25}],23:[function(_dereq_,module,exports){
(function (global){ (function (global,Buffer){
var FILE_SYSTEM_NAME = _dereq_('../constants.js').FILE_SYSTEM_NAME; var FILE_SYSTEM_NAME = _dereq_('../constants.js').FILE_SYSTEM_NAME;
var FILE_STORE_NAME = _dereq_('../constants.js').FILE_STORE_NAME; var FILE_STORE_NAME = _dereq_('../constants.js').FILE_STORE_NAME;
var IDB_RW = _dereq_('../constants.js').IDB_RW; var IDB_RW = _dereq_('../constants.js').IDB_RW;
@ -5229,7 +5229,13 @@ IndexedDBContext.prototype.putObject = function(key, value, callback) {
_put(this.objectStore, key, value, callback); _put(this.objectStore, key, value, callback);
}; };
IndexedDBContext.prototype.putBuffer = function(key, uint8BackedBuffer, callback) { IndexedDBContext.prototype.putBuffer = function(key, uint8BackedBuffer, callback) {
_put(this.objectStore, key, uint8BackedBuffer.buffer, callback); var buf;
if(!Buffer._useTypedArrays) { // workaround for fxos 1.3
buf = uint8BackedBuffer.toArrayBuffer();
} else {
buf = uint8BackedBuffer.buffer;
}
_put(this.objectStore, key, buf, callback);
}; };
IndexedDBContext.prototype.delete = function(key, callback) { IndexedDBContext.prototype.delete = function(key, callback) {
@ -5297,8 +5303,8 @@ IndexedDB.prototype.getReadWriteContext = function() {
module.exports = IndexedDB; module.exports = IndexedDB;
}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},_dereq_("buffer").Buffer)
},{"../buffer.js":10,"../constants.js":11,"../errors.js":14}],24:[function(_dereq_,module,exports){ },{"../buffer.js":10,"../constants.js":11,"../errors.js":14,"buffer":6}],24:[function(_dereq_,module,exports){
var FILE_SYSTEM_NAME = _dereq_('../constants.js').FILE_SYSTEM_NAME; var FILE_SYSTEM_NAME = _dereq_('../constants.js').FILE_SYSTEM_NAME;
// NOTE: prefer setImmediate to nextTick for proper recursion yielding. // NOTE: prefer setImmediate to nextTick for proper recursion yielding.
// see https://github.com/js-platform/filer/pull/24 // see https://github.com/js-platform/filer/pull/24

6
dist/filer.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,7 @@
"idb", "idb",
"websql" "websql"
], ],
"version": "0.0.34", "version": "0.0.35",
"author": "Alan K <ack@modeswitch.org> (http://blog.modeswitch.org)", "author": "Alan K <ack@modeswitch.org> (http://blog.modeswitch.org)",
"homepage": "http://filerjs.github.io/filer", "homepage": "http://filerjs.github.io/filer",
"bugs": "https://github.com/filerjs/filer/issues", "bugs": "https://github.com/filerjs/filer/issues",