pouchdb-community / pouchdb-adapter-fs Goto Github PK
View Code? Open in Web Editor NEWPouchDB adapter using fsdown under the hood
License: Apache License 2.0
PouchDB adapter using fsdown under the hood
License: Apache License 2.0
seen it on travis and locally, tested with Node v6 and v7
1) test.ajax.js-http #5061 ajax returns ETIMEDOUT error on timeout:
Uncaught AssertionError: expected 'ESOCKETTIMEDOUT' to match /(ETIMEDOUT|ENETUNREACH|EAGAIN|ECONNREFUSED)/
at tests/integration/test.ajax.js:19:25
at Request._callback (node_modules/pouchdb-ajax/lib/index.js:79:14)
at self.callback (node_modules/request/request.js:187:22)
at ClientRequest.<anonymous> (node_modules/request/request.js:779:16)
at Socket.socket.once (_http_client.js:566:38)
at Socket._onTimeout (net.js:339:8)
Hey @nolanlawson, it took a while, but finally got around to give this a try. Unfortunately something’s not quite working:
const PouchDB = require('pouchdb-core').plugin(require('pouchdb-adapter-fs'))
const db = new PouchDB('test')
db.put({_id: 'test'})
This creates a test.json
file withe the content of undefined
in it. I guess the problem is in fsdown.
I’m pretty sure the adapter worked when I tested it right after you created it, something must get broken since then. Do you have an idea? Or could you give me pointers for what to look for?
npm link ..
npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/gregor/.nvm/versions/node/v6.4.0/bin/node" "/Users/gregor/.nvm/versions/node/v6.4.0/bin/npm" "link" ".."
npm ERR! node v6.4.0
npm ERR! npm v3.10.3
npm ERR! May not delete: /Users/gregor/Projects/pouchdb-adapter-fs/pouchdb
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/gregor/Projects/pouchdb-adapter-fs/pouchdb/npm-debug.log
I suggest we add a section Testing
to the README and ask people to git clone pouchdb
into a different repository, install dependencies and then run npm link /path/to/pouchdb-adapter-fs
and then run CLIENT_ADAPTER=pouchdb-adapter-fs npm test
in the pouchdb
folder?
That would be a simple first step. In general it would be nice to have a best practice for PouchDB adapter developers to test their adapter using the pouchdb test suite
I tried to do it myself but I don’t have admin access to the repository
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.
Since we did not receive a CI status on the greenkeeper/initial
branch, we assume that you still need to configure it.
If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/
.
We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
This code currently creates .fsdown/datamydb.json
, but I’d expect data/mydb.json
as the leveldb adapter does it.
var PouchDB = require('pouchdb-core')
.plugin(require('pouchdb-adapter-fs'))
.defaults({
prefix: 'data/'
})
new PouchDB('mydb')
Would you agree?
For Hoodie we need the folder where the databases are stored to be configurable.
I’d suggest that we default to .fsdown/
unless the prefix
option is set.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.