Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Get combined real-time events from `$ station metrics` and `$ station activity`.
```bash
$ station events
{"type":"jobs-completed","total":36}
{"type":"activity:info","module":"Saturn","message":"Saturn Node was able to connect to the Orchestrator and will now start connecting to the Saturn network..."}
{"date":"2023-04-05T11:26:41.000Z","type":"activity:info","module":"Saturn","message":"Saturn Node was able to connect to the Orchestrator and will now start connecting to the Saturn network..."}
...
```

Expand All @@ -187,9 +187,11 @@ The following event types exist:
- `activity:info`
- `module`
- `message`
- `date`
- `activity:error`
- `module`
- `message`
- `date`

### `$ station --help`

Expand Down
1 change: 1 addition & 0 deletions commands/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const events = async () => {
(async () => {
for await (const activity of followActivity()) {
console.log(JSON.stringify({
date: activity.date,
type: `activity:${activity.type}`,
module: activity.source,
message: activity.message
Expand Down
2 changes: 2 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ describe('Events', () => {
if (events.length === 2) break
}
ps.kill()
assert(events[1].date)
delete events[1].date
assert.deepStrictEqual(events, [
{ type: 'jobs-completed', total: 0 },
{ type: 'activity:info', module: 'Saturn', message: 'beep boop' }
Expand Down