Liking cljdoc? Tell your friends :D

apollo-test.cljs-eval

CLJS prepl daemon lifecycle management. Starts a persistent JVM subprocess running a ClojureScript Node.js prepl server, manages connections, and provides synchronous eval over socket.

CLJS prepl daemon lifecycle management.
Starts a persistent JVM subprocess running a ClojureScript Node.js prepl
server, manages connections, and provides synchronous eval over socket.
raw docstring

close-connection!clj

(close-connection! conn)

Closes a prepl connection. The daemon process stays alive.

Closes a prepl connection. The daemon process stays alive.
raw docstring

connect-max-retriesclj


connect-retry-msclj


ensure-prepl!clj

(ensure-prepl! cache-dir)
(ensure-prepl! cache-dir opts)

Ensures a CLJS prepl daemon is running and returns a connection map {:socket :reader :writer}. Tries existing daemon first, starts new if needed. cache-dir is the base cache directory (e.g. ".apollo-test"). opts may include :clj-aliases to control the daemon subprocess classpath.

Ensures a CLJS prepl daemon is running and returns a connection map
{:socket :reader :writer}. Tries existing daemon first, starts new if needed.
cache-dir is the base cache directory (e.g. ".apollo-test").
opts may include :clj-aliases to control the daemon subprocess classpath.
raw docstring

eval-cljsclj

(eval-cljs conn expr-str)

Sends a CLJS expression string to the prepl and reads responses until :ret. Returns {:tag :ret :val <string> :ns <string> :ms <number> :out <collected-stdout> :err <collected-stderr>}.

Sends a CLJS expression string to the prepl and reads responses until :ret.
Returns {:tag :ret :val <string> :ns <string> :ms <number>
         :out <collected-stdout> :err <collected-stderr>}.
raw docstring

eval-timeout-msclj


start-daemon!clj

(start-daemon! cache-dir)
(start-daemon! cache-dir opts)

Starts a background JVM subprocess running a CLJS prepl server. Reads stdout until APOLLO_CLJS_PORT=NNNN appears, writes state file, and returns the port number. Throws on timeout or startup failure. opts may include :clj-aliases (default ":cljs") to control the subprocess classpath.

Starts a background JVM subprocess running a CLJS prepl server.
Reads stdout until APOLLO_CLJS_PORT=NNNN appears, writes state file,
and returns the port number. Throws on timeout or startup failure.
opts may include :clj-aliases (default ":cljs") to control the
subprocess classpath.
raw docstring

startup-timeout-msclj


stop-daemon!clj

(stop-daemon! cache-dir)

Kills the daemon process and cleans up the state file. cache-dir is the base cache directory (e.g. ".apollo-test").

Kills the daemon process and cleans up the state file.
cache-dir is the base cache directory (e.g. ".apollo-test").
raw docstring

try-connectclj

(try-connect port)

Tries to connect to an existing daemon at the given port. Returns {:socket s :reader r :writer w} or nil on failure.

Tries to connect to an existing daemon at the given port.
Returns {:socket s :reader r :writer w} or nil on failure.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close