MCPcopy Index your code
hub / github.com/jetify-com/devbox / getVMInfo

Function getVMInfo

vscode-extension/src/openinvscode.ts:51–66  ·  view source on GitHub ↗
(token: string | null, vmId: string | null)

Source from the content-addressed store, hash-verified

49}
50
51async function getVMInfo(token: string | null, vmId: string | null): Promise<any> {
52 // send post request to gateway to get vm info and ssh keys
53 const gatewayHost = 'https://api.devbox.sh/g/vm_info';
54 const data = new FormData();
55 data.append("vm_id", vmId);
56 console.debug("calling devbox to get vm_info...");
57 const response = await fetch(gatewayHost, {
58 method: 'post',
59 body: data,
60 headers: {
61 authorization: `Bearer ${token}`
62 }
63 });
64 console.debug("API Call to api.devbox.sh response: " + response);
65 return response;
66}
67
68async function setupDevboxLauncher(): Promise<any> {
69 // download devbox launcher script

Callers 1

handleOpenInVSCodeFunction · 0.85

Calls 1

fetchFunction · 0.85

Tested by

no test coverage detected