Can you tell me if FogCreek/wetty is currently in production. I am considering making a pull request but if there is non-public changes then their would be too many conflicts.
That’s not the code that’s currently in production. I don’t think we have anything secret in our wetty changes. If you’re interested, we can get that repo up to date. What were you planning to add?
we’ll let you know when it’s available, unfortunately we can’t give you an ETA right now
Thanks, just wanted to make sure that it did not fly under the radar.
What’s in FogCreek/wetty is now up to date with what’s in production. Please feel free to make a pull request, and we’ll be happy to take a look. Sorry for the delay!
Great, was it only one commit?
I would also like to know how Wetty connected to the container? Is it run on the container or remotely connected to the container.
I think that I understand. I’ll try to explain it back to you and see if it is correct. To my understanding you are sending the data from
pty.js (container) through WebSockets to Wetty?
Yes, that’s right. What kind of improvements were you thinking of making?
I was thinking of creating a WebSocket server so that you can programatically run commands and see their output. My use for this is creating a GitHub App that auto-deploys to a project and something like Netlify’s Command Line.
Ah, I see. If that’s what you’re looking for wait a couple of days - we’re adding an endpoint to the API that runs a command in the container and returns the output.
Wow! Thanks! Can you update me on when this will be available?
You can use it by POSTing to
https://api.glitch.com/projects/<projectId>/exec?authorization=<your glitch token>
The body of the request is JSON:
command: ‘something to do’
You’ll get back a JSON object:
You can get your token by looking in the Chrome developer console on the network tab, and searching for routes with ‘authorization=’. They’ll look something like this:
Don’t let anybody have that token - it’s your Glitch identity. This part will be easier soon.
What about streams? Is that implemented?
No, right now you can only send a command and get back the results.
It it coming in the future?
I’m not exactly sure what you mean by streams.
I mean processes that do not exit. For instance if you were running
node app.js and wanted to see the logs as they come out compared to
echo Hello! which exits immediately.