Stream build events (SSE)
client.builds.events(stringid, BuildEventsParams { follow } query?, RequestOptionsoptions?): BuildEvent { timestamp, type, content, status } | Stream<BuildEvent { timestamp, type, content, status } >
/builds/{id}/events
Streams build events as Server-Sent Events. Events include:
log: Build log lines with timestamp and contentstatus: Build status changes (queued→building→pushing→ready/failed)heartbeat: Keep-alive events sent every 30s to prevent connection timeouts
Returns existing logs as events, then continues streaming if follow=true.
Parameters
id: string
Returns
Stream build events (SSE)
import Hypeman from '@onkernel/hypeman';
const client = new Hypeman({
apiKey: 'My API Key',
});
const buildEvent = await client.builds.events('id');
console.log(buildEvent.timestamp);