-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
54 lines (38 loc) · 1.63 KB
/
Copy pathJustfile
File metadata and controls
54 lines (38 loc) · 1.63 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
set shell := ["bash", "-cu"]
default:
@just --list
install:
pnpm install
build: build-ts build-web build-c
build-ts:
pnpm --filter @pty-server/protocol --filter @pty-server/client --filter @pty-server/server --filter @pty-server/example-simple-client build
build-web:
pnpm --filter @pty-server/example-web-multiplexer build
build-c:
cargo build --manifest-path sdk/c/Cargo.toml --release
test: test-ts test-c
test-ts:
pnpm test
test-c:
cargo test --manifest-path sdk/c/Cargo.toml
check:
pnpm typecheck
cargo fmt --manifest-path sdk/c/Cargo.toml -- --check
cargo clippy --manifest-path sdk/c/Cargo.toml -- -D warnings
# Start on a machine-local Unix domain socket.
serve socket="/tmp/pty-server.sock": build-ts
node packages/server/dist/cli.js --socket "{{socket}}"
# Start a TCP listener. Use a firewall/authenticating proxy on untrusted networks.
serve-tcp port="8022" host="127.0.0.1": build-ts
node packages/server/dist/cli.js --host "{{host}}" --port "{{port}}"
client socket="/tmp/pty-server.sock": build-ts
node examples/simple-client/dist/index.js --socket "{{socket}}"
# Start the Next.js + xterm.js example with an embedded pty-server.
web port="3000" socket="/tmp/pty-server-web.sock": build-ts
PTY_SOCKET="{{socket}}" PORT="{{port}}" pnpm --filter @pty-server/example-web-multiplexer dev
# Connect the web example to a separately managed pty-server.
web-external port="3000" socket="/tmp/pty-server.sock": build-ts
PTY_EXTERNAL=1 PTY_SOCKET="{{socket}}" PORT="{{port}}" pnpm --filter @pty-server/example-web-multiplexer dev
clean:
pnpm -r exec -- rm -rf dist
cargo clean --manifest-path sdk/c/Cargo.toml