# Description of Changes
This adds some logging utilities, that will probably be helpful for
debugging issues. `stdbLogger` can now accept lazy messages. If you call
`setGlobalLogLevel`, that will set a log level globally. It is set to
`info` by default, but when troubleshooting, we can ask people to run
`setGlobalLogLevel('trace')` and share more detailed logs.
In this PR, it adds a new new logs at the `trace` level:
- All outgoing messages to the server
- All incoming messages from the server
- After handling a server message, we log the number of triggered row
callbacks
There are also some formatting niceties to truncate large arrays and
redact fields that look like credentials.
We are also using `safe-stable-stringify` to handle some cases that
would be errors in `JSON.stringify`.
# API and ABI breaking changes
This adds the `setGlobalLogLevel` function, which is useful for
debugging.
# Expected complexity level and risk
1.5 - the only real risk here is that
# Testing
This has some tests of formatting in `logger.test.ts`.
# Description of Changes
All types are now defined and exported in `module_bindings/types.ts`,
meanings there's only one module you need to import from to access
types.
# Expected complexity level and risk
2
# Testing
n/a, no change in behavior.
# Description of Changes
This fixes a couple issues:
- We are now using the `SendDroppedRows` flag for unsubscribe messages.
- We parse reducer errors as strings now when throwing errors.
- `useTable` was not doing client-side filtering correctly for object
types (Timestamp, ConnectionId, Identity)
- `useTable` was not always recomputing snapshots when it needed to,
because it couldn't distinguish between two events if they were caused
by reducers called by other connections (or two subscription applied
events). All events how have a client-generated id attached, so we can
tell if there was actually a new event processed.
Once we have per-query storage, we can purge the client-side filtering
code.
This also adds some tests to cover these cases, and includes a bit of
refactoring.
Another change added here is to use `SenderError` in the typescript SDK
for errors that were returned by reducers (which throw `SenderError` in
typescript modules).
# Expected complexity level and risk
1
# Testing
This has some new tests added.
Much of the `useTable` logic was tested manually.
# Description of Changes
This PR fixes a bunch of issues and brings some improvements related to
`spacetime.json` config file
# API and ABI breaking changes
-
# Expected complexity level and risk
3
This PR is changing several places that are called during many of the
CLI commands.
# Testing
- [x] Added some automated tests
- [ ] Tested locally