-
-
Notifications
You must be signed in to change notification settings - Fork 31
Spotlight Control Center #1139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Spotlight Control Center #1139
Conversation
Co-authored-by: burak.kaya <[email protected]>
Co-authored-by: burak.kaya <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| -p, --port <port> Port to listen on (default: 8969, or 0 for random) | ||
| -d, --debug Enable debug logging | ||
| -f, --format <format> Output format for tail command (default: human) | ||
| -f, --format <format> Output format for tail/list command (default: human) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| -f, --format <format> Output format for tail/list command (default: human) | |
| -f, --format <format> Output format for commands like run, tail, and list command (default: human) |
| return Object.entries(fields) | ||
| .map(([key, value]) => `${key}=${value}`) | ||
| .join(" "); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the existing logfmt library we have for this.
| switch (format) { | ||
| case "human": | ||
| for (const instance of instances) { | ||
| console.log(formatHuman(instance)); | ||
| } | ||
| break; | ||
|
|
||
| case "json": | ||
| console.log(formatJson(instances)); | ||
| break; | ||
|
|
||
| case "logfmt": | ||
| for (const instance of instances) { | ||
| console.log(formatLogfmt(instance)); | ||
| } | ||
| break; | ||
|
|
||
| case "md": | ||
| console.log(formatMarkdown(instances)); | ||
| break; | ||
|
|
||
| default: | ||
| logger.error(`Unsupported format: ${format}`); | ||
| process.exit(1); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this switch/case block research the code for formatters and try to use existing formatters by extending them. If that's not possible, at least use the Map() architecture rather than if or switch blocks.
| @@ -0,0 +1,268 @@ | |||
| # Spotlight Control Center - Implementation Summary | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create new docs using the contents of this file under packages/website/src/docs and then delete this file.
TESTING_COMPLETE.md
Outdated
| @@ -0,0 +1,248 @@ | |||
| # Spotlight Control Center - Testing Complete ✅ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this file.
Co-authored-by: burak.kaya <[email protected]>
Closes #1136.
Spotlight Control Center
This PR introduces the Spotlight Control Center, enabling users to manage all
spotlight runinstances from a centralized UI or via a newspotlight listCLI command.Key Features:
spotlight runinstances, including health checks (HTTP, PID, start time) and automatic cleanup of stale entries.spotlight listCLI Command: A new command to list running instances with support for human, JSON, logfmt, and Markdown output formats.pidusagefor robust process management across Linux, macOS, and Windows.Why this change?
This feature addresses the need for better visibility and control over multiple running Spotlight instances, improving the developer experience by simplifying instance management and debugging.
Testing Notes:
spotlight listand instance registration) has been thoroughly tested and verified.