Skip to content

feat(inspector/unstable): add /ws/events endpoint in inspector server, notify watcher restart event in it - #31901

Merged
kt3k merged 2 commits into
denoland:mainfrom
kt3k:inspector-server-watcher-event
Jan 22, 2026
Merged

kt3k merged 2 commits into
denoland:mainfrom
kt3k:inspector-server-watcher-event

Conversation

@kt3k

@kt3k kt3k commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

This PR adds unstable env var UNSTABLE_INSPECTOR_WS_EVENTS.

If the env var is specified, the inspector server exposes another websocket endpoint /ws/events, and file watcher's 'restart' events are notified in it. (I gave relatively general name to the endpoint to allow extending it for supporting more events in the future)

The event payload looks like:

{"type":"restart":"timestamp":1768976498233}

@kt3k
kt3k requested a review from bartlomieju January 21, 2026 06:32

@bartlomieju bartlomieju left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kt3k
kt3k merged commit 1556f14 into denoland:main Jan 22, 2026
30 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants