Repository navigation
hidane 0.2.2
hidane 0.2.2 closes two gaps with the official emulator (v1.22.0), each recorded from it and replayed by the test suite.
Security Rules check a commit's verify writes (#173)
The JS and mobile SDKs commit a transaction with a verify write for every document they read but did not write. The official emulator checks each one against the rules as a get of its document (request.inTransaction is true), and so does hidane now: a transaction that read a document the rules do not let it read is denied at the commit, with false for 'get' @ L….
As on the official emulator:
- The writes of a commit are checked in order, and the first denied one denies the commit.
- The rules come before preconditions, for the whole commit: a failing
existsprecondition next to a denied write answers 403, not 404. - A verify shares the commit's lookup limits (10 per write, 20 in all). Its document is free to
getAfter()andexistsAfter()but not toget()andexists(). - A denied commit ends its transaction, over REST, gRPC and the Write stream.
Three differences remain, from the official emulator's two-pass evaluation and from a lookup count that varied between projects. They are listed in docs/parity-exceptions.md.
-0.0 (#174)
The official emulator reads JSON numbers through BigDecimal, which has no negative zero. So -0.0 written over REST or WebChannel becomes 0.0, while -0.0 written over gRPC is stored, read back, exported and imported as -0.0. hidane now does the same.
Writing -0.0 over 0.0 counts as a change, and NaN over NaN does not, as on the official emulator. Exports keep -0.0, and REST prints it as -0.0.
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.2Full changelog: v0.2.1...v0.2.2