Repository navigation
hidane 0.2.1
hidane 0.2.1 feeds the Emulator UI's request monitor and gives rules every field of the official request. Both were recorded from the official emulator (v1.22.0) and are replayed by the test suite.
Emulator UI request monitor (#69)
With --websocket_port (which firebase emulators:start passes when the UI runs), hidane serves the official ws://<host>:<port>/requests feed: the last 50 evaluations on connect, then one record per evaluation, in the official format and key order. The Requests tab lists allows, denials and errors as they happen, and its detail view marks the rule lines that decided and shows request.auth, the method, path, resource and time.
Unlike the official emulator, a client that does not read the feed never holds up requests: one that falls more than 16 MiB behind is disconnected, and the UI reconnects for the last 50. The official emulator stalls requests with rules behind such a client; this and the other differences are in docs/parity-exceptions.md.
request as the official emulator gives it (#166)
request.inTransaction, fields, writeFields, readFields, transforms and autoId, and request.query's kind, parent / ancestor, allDescendants, distinct, selectOnlyKeys, groupBy and orderBy (as the query wrote it), with each key in the official order. debug(request) and the coverage report now show the same request as the official emulator, apart from request.time.
Also
- Follow-ups filed:
verifywrites in a commit are not checked against the rules yet (#173);-0.0is stored as written, where the official emulator stores0.0(#174).
Install
curl -fsSL https://hidane.dev/install.sh | sh
brew install hidane-dev/tap/hidane
npm install --save-dev hidane
cargo binstall hidane # or cargo install hidane
dart pub global activate hidane
docker run --rm -p 8080:8080 ghcr.io/hidane-dev/hidane:0.2.1Full changelog: v0.2.0...v0.2.1