Liking cljdoc? Tell your friends :D

wagoe.cli.config-edn


active-closing-braceclj

(active-closing-brace text)

Index of the brace closing the :active map, or nil.

Index of the brace closing the `:active` map, or nil.
sourceraw docstring

active-sectionclj

(active-section text)

[start end] indices of the :active map's braces, or nil.

[start end] indices of the `:active` map's braces, or nil.
sourceraw docstring

append-entryclj

(append-entry text kw snippet)

text with snippet — entries written at column 2 — after the last entry of the map under kw: at that entry's column, a blank line before it, and the map's closing brace right after it. Unchanged when there is no map.

`text` with `snippet` — entries written at column 2 — after the last entry
of the map under `kw`: at that entry's column, a blank line before it, and
the map's closing brace right after it. Unchanged when there is no map.
sourceraw docstring

columnclj

(column text i)

The column of index i in text.

The column of index `i` in `text`.
sourceraw docstring

entriesclj

(entries text kw)

The key/value pairs of the map under kw, in order, as maps of :key (the key's text), :start (the key), :end (past the value) and :from (where the comments above it begin). nil when there is no such map or it cannot be read.

The key/value pairs of the map under `kw`, in order, as maps of `:key` (the
key's text), `:start` (the key), `:end` (past the value) and `:from` (where
the comments above it begin). nil when there is no such map or it cannot be
read.
sourceraw docstring

inject-key!clj

(inject-key! path key-str snippet {:keys [dry-run?]})

Add snippet to the :active map of the config at path.

Returns :written, :already-present, :no-active-section, or :no-file. With dry-run?, returns what it would have done and writes nothing.

Add `snippet` to the `:active` map of the config at `path`.

Returns `:written`, `:already-present`, `:no-active-section`, or `:no-file`.
With `dry-run?`, returns what it would have done and writes nothing.
sourceraw docstring

insert-before-active-closeclj

(insert-before-active-close text snippet)

text with snippet inserted just inside the :active map's closing brace.

Returns text unchanged when there is no :active section — the caller decides whether that is an error.

`text` with `snippet` inserted just inside the `:active` map's closing brace.

Returns text unchanged when there is no `:active` section — the caller
decides whether that is an error.
sourceraw docstring

insert-intoclj

(insert-into text kw snippet)

text with snippet inserted just inside the closing brace of the map under kw, or unchanged when there is none.

`text` with `snippet` inserted just inside the closing brace of the map
under `kw`, or unchanged when there is none.
sourceraw docstring

key-statusclj

(key-status text key-str)

:already-present when key-str is a key in the :active map, else :absent.

Two mistakes a substring search over the whole file makes, both of which report a module as configured while writing nothing:

  • :wagoe/payment is a substring of :wagoe/payment-provider, which the shipped dev config already contains. So are route/router, setting/settings, metric/metrics, log/logging — six plausible module names in one file.
  • :wagoe/h2 appears only under :inactive, and :wagoe/cache only in a comment. Reporting those as present is the configured-and-switched-off outcome this namespace exists to avoid.

A value naming the key, #ig/ref :wagoe/jobs, is not the key. Only a map whose entries cannot be read falls back to searching its text.

`:already-present` when `key-str` is a key in the `:active` map, else
`:absent`.

Two mistakes a substring search over the whole file makes, both of which
report a module as configured while writing nothing:

- `:wagoe/payment` is a substring of `:wagoe/payment-provider`, which the
  shipped dev config already contains. So are route/router,
  setting/settings, metric/metrics, log/logging — six plausible module names
  in one file.
- `:wagoe/h2` appears only under `:inactive`, and `:wagoe/cache` only in a
  comment. Reporting those as present is the configured-and-switched-off
  outcome this namespace exists to avoid.

A value naming the key, `#ig/ref :wagoe/jobs`, is not the key. Only a map
whose entries cannot be read falls back to searching its text.
sourceraw docstring

line-endingclj

(line-ending text)

The file's own line ending, so inserted lines match it.

The file's own line ending, so inserted lines match it.
sourceraw docstring

reindentclj

(reindent snippet col nl)

snippet, written at column 2, moved to column col, lines ending in nl. The first line is left as it is: the caller places it.

`snippet`, written at column 2, moved to column `col`, lines ending in `nl`.
The first line is left as it is: the caller places it.
sourceraw docstring

root-mapclj

(root-map text)

[open close] indices of the braces of the file's top-level map, or nil.

[open close] indices of the braces of the file's top-level map, or nil.
sourceraw docstring

sectionclj

(section text kw)

[start end] indices of the braces of the map under the top-level key kw (":active", ":inactive"), or nil.

Only the root map's own keys count, matched exactly: a nested :active, or :active-profiles, is not the section. nil too when the value is not a literal map (#include, #profile), since there is nothing to edit.

[start end] indices of the braces of the map under the top-level key `kw`
(":active", ":inactive"), or nil.

Only the root map's own keys count, matched exactly: a nested `:active`, or
`:active-profiles`, is not the section. nil too when the value is not a
literal map (`#include`, `#profile`), since there is nothing to edit.
sourceraw docstring

snippet-entriesclj

(snippet-entries snippet)

The entries of snippet, a map body without its braces as modules write it, in order, as maps of :key (the key's text) and :text (the entry with the comment lines above it). nil when it cannot be read.

The entries of `snippet`, a map body without its braces as modules write
it, in order, as maps of `:key` (the key's text) and `:text` (the entry
with the comment lines above it). nil when it cannot be read.
sourceraw 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