Skip to content

Tags: hoodiehq/hoodie-server

Tags

v23.0.0

Toggle v23.0.0's commit message
chore(package): @hoodie/store-server 3.0.0

BREAKING CHANGE:

The store instance which `server.plugins.store.api.open(dbName)` resolves to
has several breaking changes via [pouchdb-hoodie-api@2.0.0](https://github.com/hoodiehq/pouchdb-hoodie-api/releases/tag/v2.0.0)

- Before, change events (incl. add, update, remove) have only been triggered
  when using the custom APIs like `.add()` or `.update()`. Now they get always
  triggered, including for changes replicated into the database.

- the order of when the methods’ promises resolve and the events get triggered
  cannot be guaranteed as we rely on PouchDB’s `.changes()`. We would love to
  enforce promises to resolve after changes get emitted, but the required
  complexity to do that is not worth it.

- We no longer map PouchDB’s ._id property to .id, instead we pass trough docs
  from PouchDB 1:1. Also the timestamps are now all namespaced with
  `.hoodie` (`doc.createdAt` becomes `doc.hoodie.createdAt`)

Unless you use the `server.plugins.store.api.open(name)` API you are not affected by any of this.

v22.0.2

Toggle v22.0.2's commit message
fix: remove assuring folders

moved into [hoodie@27.1](https://github.com/hoodiehq/hoodie/releases/tag/v27.1.0)

v22.0.1

Toggle v22.0.1's commit message
fix: assure .hoodie/data folders created when using leveldb (#530)

v22.0.0

Toggle v22.0.0's commit message
docs(pre-auth-hook): clarify .then nesting with comment

#526 (comment)

v21.1.4

Toggle v21.1.4's commit message
fix: close sockets opened by PouchDB on server stop

v21.1.3

Toggle v21.1.3's commit message
style: standard

v21.1.2

Toggle v21.1.2's commit message
chore(package): update all

v21.1.1

Toggle v21.1.1's commit message
fix(store): POST db/_all_docs is still just a read

v21.1.0

Toggle v21.1.0's commit message
feat: automatically add "user" role when testing for access by authen…

…ticated user

v21.0.0

Toggle v21.0.0's commit message
refactor(store): use `server.plugins.store.api`

BREAKING CHANGE:

The API now keeps state of all databases and access in a dedicated
`hoodie-store` database. If your app uses CouchDB as its backend, there
is no migration required, it happens automatically on next restart.

If you don’t use CouchDB (which is the default), the simplest way to
"migrate" is to delete the `.hoodie/data` folder. It will loose all
data, so this is only an option for local development. If you don’t want
to loose all data, you manually have to create the `hoodie-store`
database with documents for each user database. The documents look
like this:

```json
{
   "_id": "db_user/lsdlo55",
   "_rev": "1-a01e6998fb10543ca0402e648dd1d048",
   "access": {
       "read": {
           "role": [
               "id:lsdlo55"
           ]
       },
       "write": {
           "role": [
               "id:lsdlo55"
           ]
       }
   }
}
```

Besides that, this release also updates to a new express-pouchdb version
which includes a bugfix for a faulty encoding of database folders. You
must rename all folders that look like `user%2Fabc4567` to
`user/abc4567` (nested directories). See pouchdb/express-pouchdb#377