-
Notifications
You must be signed in to change notification settings - Fork 6k
Add linkup command to improve link functionality #4128
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
Changes from all commits
b1e9660
4043153
c7a5263
d39a141
682a378
bece429
5551751
a815d60
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ node_modules | |
node-* | ||
/plugins | ||
/lib/coder-cloud-agent | ||
/lib/linkup | ||
.home | ||
coverage | ||
**/.DS_Store | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,8 @@ | |
"ms-vscode.remotehub", | ||
"ms-vscode.remotehub-insiders", | ||
"GitHub.remotehub", | ||
"GitHub.remotehub-insiders" | ||
"GitHub.remotehub-insiders", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kylecarbs This will need to be adjusted in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gotcha. Doing it now! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually I'll tackle this after the all-hands. Gotta prep! Feel free to tackle if you have time! |
||
"coder.vscode-link" | ||
], | ||
"builtInExtensions": [ | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { logger } from "@coder/logger" | ||
import { spawn } from "child_process" | ||
import path from "path" | ||
|
||
export function startLink(port: number): Promise<void> { | ||
logger.debug(`running link targetting ${port}`) | ||
|
||
const agent = spawn(path.resolve(__dirname, "../../lib/linkup"), ["--devurl", `code:${port}:code-server`], { | ||
shell: false, | ||
}) | ||
return new Promise((res, rej) => { | ||
agent.on("error", rej) | ||
agent.on("close", (code) => { | ||
if (code !== 0) { | ||
return rej({ | ||
message: `Link exited with ${code}`, | ||
}) | ||
} | ||
res() | ||
}) | ||
}) | ||
} |
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.
love comments ❤️