Liking cljdoc? Tell your friends :D

dirac.runtime.repl


*bootstrapped?*cljs

source

*installed?*cljs

source

api-versioncljs

source

available?cljs

(available?)
source

bootstrapped?cljs

(bootstrapped?)
source

call-diraccljs

(call-dirac name & args)
source

capture-outputcljs

(capture-output job-id f)

This printing wrapper is responsible for capturing printed output and presenting it via present-output.

This printing wrapper is responsible for capturing printed output and presenting it via `present-output`.
sourceraw docstring

console-tunnelcljs

(console-tunnel method & args)
source

detect-and-stripcljs

(detect-and-strip prefix text)
source

dirac-log-argscljs

(dirac-log-args request-id kind args)
source

dirac-msg-argscljs

(dirac-msg-args name args)
source

emit-error!cljs

(emit-error! request-id message)
source

emit-warning!cljs

(emit-warning! request-id message)
source

errorcljs

(error request-id kind & args)
source

evalcljs

(eval job-id eval-mode wrap-mode job-fn)

This is the main entrypoint for evaluation of a snippet of code in the context of REPL. Please note that this code runs in the context of the app and uses ClojureScript runtime built together with the app.

job-id - a numeric id of the REPL job eval-mode - 'captured' or 'special' wrap-mode - 'short-circuit-presentation' or nil job-fn - code to be executed in the form of a function

Note that normally we want to support capturing REPL specials *1 *2 *3 and *e. Only when we are executing their retrieval we don't want to capture them and we want to use the 'special' path.

Also normally we want to wrap our code in a supporting wrapper which will present results directly via cljs-devtools, or present exceptions in a friendly way. Also we want to capture any printing which might occur during evaluation. In some special cases we might not want to do that.

Finally we want to postprocess evaluation result and prepare Weasel's nREPL response.

See https://github.com/binaryage/dirac/blob/master/docs/about-repls.md for conceptual overview.

This is the main entrypoint for evaluation of a snippet of code in the context of REPL.
 Please note that this code runs in the context of the app and uses ClojureScript runtime built together with the app.

  job-id    - a numeric id of the REPL job
  eval-mode - 'captured' or 'special'
  wrap-mode - 'short-circuit-presentation' or nil
  job-fn    - code to be executed in the form of a function

Note that normally we want to support capturing REPL specials *1 *2 *3 and *e. Only when we are executing their retrieval
we don't want to capture them and we want to use the 'special' path.

Also normally we want to wrap our code in a supporting wrapper which will present results directly via cljs-devtools,
or present exceptions in a friendly way. Also we want to capture any printing which might occur during evaluation.
In some special cases we might not want to do that.

Finally we want to postprocess evaluation result and prepare Weasel's nREPL response.

See https://github.com/binaryage/dirac/blob/master/docs/about-repls.md for conceptual overview.
sourceraw docstring

eval-capturedcljs

(eval-captured job-id wrap-mode job-fn)

Evaluates a REPL job in the captured mode. Compare it to eval-special. Captured mode keeps track of *1 *2 *3 and *e REPL specials.

Evaluates a REPL job in the captured mode. Compare it to eval-special.
Captured mode keeps track of *1 *2 *3 and *e REPL specials.
sourceraw docstring

eval-specialcljs

(eval-special job-id wrap-mode job-fn)

Evaluates a REPL job in the special mode. Compare it to eval-captured.

Evaluates a REPL job in the special mode. Compare it to eval-captured.
sourceraw docstring

execute-jobcljs

(execute-job job-id wrap-mode job-fn)

Execute a REPL job by optionally wrapping it in a requested wrapper.

Execute a REPL job by optionally wrapping it in a requested wrapper.
sourceraw docstring

formatted-logcljs

(formatted-log request-id kind format text)
source

get-api-versioncljs

(get-api-version)
source

get-effective-configcljs

(get-effective-config)
source

get-serialized-configcljs

(get-serialized-config)
source

get-whitespace-prefix-lengthcljs

(get-whitespace-prefix-length line)
source

groupcljs

(group & args)
source

group*cljs

(group* collapsed? request-id kind & args)
source

group-collapsedcljs

(group-collapsed & args)
source

group-endcljs

(group-end)
source

install!cljs

(install!)
source

installed?cljs

(installed?)
source

logcljs

(log request-id kind & args)
source

postprocess-successful-evalcljs

(postprocess-successful-eval value)

This is a postprocessing function wrapping Weasel's Javascript evaluation attempt. This structure is needed for building response to nREPL server (see dirac.implant.weasel in Dirac project) In our case weasel is running in the context of Dirac DevTools and could potentially have different version of cljs runtime. To be correct we have to do this post-processing in app's context to use the same cljs runtime as app evaluating the code.

Also we have to be careful to not enter into infinite printing with cyclic data structures. We limit printing level and length via with-safe-printing.

This is a postprocessing function wrapping Weasel's Javascript evaluation attempt.
This structure is needed for building response to nREPL server (see dirac.implant.weasel in Dirac project)
In our case weasel is running in the context of Dirac DevTools and could potentially have different version of cljs runtime.
To be correct we have to do this post-processing in app's context to use the same cljs runtime as app evaluating the code.

Also we have to be careful to not enter into infinite printing with cyclic data structures.
We limit printing level and length via with-safe-printing.
sourceraw docstring

postprocess-unsuccessful-evalcljs

(postprocess-unsuccessful-eval ex)
source

presentcljs

(present job-id job-fn)

A presentation wrapper which takes care of presenting REPL evaluation to Dirac user. We short-circuit nREPL feedback mechanism and display REPL results immediately to the user as native data. This is especially important for cljs-devtools.

Please note that for traditional nREPL clients we still serialize the result, send it over the wire to nREPL server and in turn that result is sent back to clients and presented. The Dirac client has just some special logic and ignores this echoed output because it was already presented directly.

See https://github.com/binaryage/dirac/blob/master/docs/about-repls.md for conceptual overview.

A presentation wrapper which takes care of presenting REPL evaluation to Dirac user.
We short-circuit nREPL feedback mechanism and display REPL results immediately to the user as native data.
This is especially important for cljs-devtools.

Please note that for traditional nREPL clients we still serialize the result, send it over the wire to nREPL server and
in turn that result is sent back to clients and presented. The Dirac client has just some special logic and ignores this
echoed output because it was already presented directly.

See https://github.com/binaryage/dirac/blob/master/docs/about-repls.md for conceptual overview.
sourceraw docstring

present-java-tracecljs

(present-java-trace request-id text)
source

present-outputcljs

(present-output request-id kind format text)
source

present-repl-exceptioncljs

(present-repl-exception request-id exception)

Called by our nREPL boilerplate when we capture a REPL evaluation exception.

Called by our nREPL boilerplate when we capture a REPL evaluation exception.
sourceraw docstring

present-repl-resultcljs

(present-repl-result request-id value)

Called by our nREPL boilerplate when we capture a REPL evaluation result.

Called by our nREPL boilerplate when we capture a REPL evaluation result.
sourceraw docstring

remove-common-whitespace-prefixcljs

(remove-common-whitespace-prefix text)
source

request-eval-cljscljs

(request-eval-cljs code)

Automates Dirac REPL from the app. This way you can request evaluation of ClojureScript code as it would be entered directly by the user.

Automates Dirac REPL from the app. This way you can request evaluation of ClojureScript code as it would be entered
directly by the user.
sourceraw docstring

request-eval-jscljs

(request-eval-js code)

Automates Dirac REPL from the app. This way you can request evaluation of Javascript code as it would be entered directly by the user.

Automates Dirac REPL from the app. This way you can request evaluation of Javascript code as it would be entered
directly by the user.
sourceraw docstring

safe-pr-strcljs

(safe-pr-str v)
source

should-silence-error?cljs

(should-silence-error? _message)
source

should-silence-warning?cljs

(should-silence-warning? message)
source

uninstall!cljs

(uninstall!)
source

warncljs

(warn request-id kind & args)
source

with-safe-printingcljs

(with-safe-printing f)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close