-
Notifications
You must be signed in to change notification settings - Fork 6
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
createSkyInspector #12
Conversation
@@ -30,7 +34,8 @@ | |||
"prepublishOnly": "tsup src/index.ts --dts", | |||
"changeset": "changeset", | |||
"release": "changeset publish", | |||
"version": "changeset version" | |||
"version": "changeset version", | |||
"dev": "yarn build && ./scripts/dev.sh" |
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.
The dev script will build and copy the package to destinations defined in a root .env
file. Let's say you wanted to try this package in two other projects (studio
and sky-starter-app
) located in the same directory as inspect
. Then you would add this to your .env
file:
DEV_DESTINATIONS="../sky-starter-app,../studio"
src/createSkyInspector.ts
Outdated
serialize(event) { | ||
if (!filter || filter(event)) { | ||
const skyEvent = apiKey ? { apiKey, ...event } : event; | ||
socket.send(stringify(skyEvent)); |
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.
This is in the wrong place - we should repurpose createWebsocketInspector
for this
(I say "wrong" because this option is only meant for serializing the event; it should be pure)
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.
Makes sense; this was just me exploiting what I had available 😅 I've tried to update the browser inspector to match what we need in the latest; see if this looks okay to you.
Co-authored-by: David Khourshid <[email protected]>
This PR adds
createSkyInspector
, which allows you to inspect machines in Node or the browser. The inspection will send the events to a server backend through websockets and allows you to open and share a live inspection URL.