Skip to content

Releases: pemrouz/fero

v1.5.1

29 Dec 01:50
Compare
Choose a tag to compare
  • fero now has a new commit guarantee. This allows you to make a change and wait for that change to committed. This works from any client or server node.
await cache.update('foo', 'bar').on('reply')
cache.foo === 'bar' // true
  • You can also now use .add to insert records with an auto-incrementing ID similar to traditional SQL INSERT.
// this returns the id of the newly added record as well as setting it on the record:
const id = (await users.add({ firstname, lastname }).on('reply')).value
users[id] === { firstname, lastname, id }
  • fero has a new connect utility. This allows restoring initial state from some persistent storage as well as replaying actions on to it to keep it in sync. See the docs for more details.

Fero CLI

09 Dec 23:45
Compare
Choose a tag to compare

Fero CLI

fero now comes packaged with a command-line utility when installed globally (npm i -g fero).

Fero works orthogonal to however you choose to deploy or monitor processes. The functionality here is mostly useful just to inspect the state of services and also easily make small updates where necessary.

  • fero ls - will display a realtime list of all services and a summary of their state (ip, port, partitions, commits, hash). You can also use fero ls <name> to show summaries from the specified service only.

  • fero set <name> <key> <value> - will set the value of the resource at the specified key. The key can be arbitrarily deep using dot-notation.

  • fero get <name> <key> - will tail in realtime the value of the resource at the specified key. The key can be arbitrarily deep using dot-notation. You can also use:

    • --json formats output as json
    • --table formats output as a table. You can specify the fields to use, or a number to specify max number of columns (it default to all the fields of the first row).
    • --sort comma-delimited list of fields to sort by
    • --where comma-delimited list of key=val predicates to fuzzy filter rows by

    Examples:

    • fero get users 28 - get the user record which is indexed at ID 28
    • fero get users --table id,username --sort last_updated,firstname - tail all users by ID and username, sorted by when their profile was last updated and then their firstname
    • fero get users --table --where name=david - tail a list of all users whose name includes david.

The CLI will also soon spin up a webserver and expose the same information that way too.