Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
27 lines (24 loc) · 778 Bytes

File metadata and controls

27 lines (24 loc) · 778 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { devsFactory } from "./build"
import { CmdOptions, error } from "./command"
import { readCompiled } from "./run"
export interface RunOptions {
tcp?: boolean
}
export async function deployScript(
fn: string,
options: RunOptions & CmdOptions
) {
const inst = await devsFactory()
if (options.tcp)
await inst.setupNodeTcpSocketTransport(require, "127.0.0.1", 8082)
else await inst.setupWebsocketTransport("ws://127.0.0.1:8081")
inst.devsStart()
inst.deployHandler = code => {
if (code) error(`deploy error ${code}`)
process.exit(code)
}
const prog = await readCompiled(fn)
const r = inst.devsClientDeploy(prog)
if (r) throw new Error("deploy error: " + r)
console.log(`remote-deployed ${fn}`)
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.