Liking cljdoc? Tell your friends :D

wagoe.cli.add


-mainclj

(-main args)
source

database-warningsclj

(database-warnings dir {:keys [databases] :as module})

One line per profile module goes in whose active database it cannot boot on, per the catalogue's :databases. H2 passes where the module's snippet says :allow-h2? true, as tenant's test snippet does (BOU-576).

One line per profile `module` goes in whose active database it cannot boot
on, per the catalogue's :databases. H2 passes where the module's snippet
says `:allow-h2? true`, as tenant's test snippet does (BOU-576).
sourceraw docstring

dep-coordsclj

(dep-coords content clojars scope)

Coordinate of clojars where the module belongs, or :unreadable, or nil.

Where matters, and a substring search over the file gets it wrong. The generated deps.edn lists wagoe-devtools, wagoe-ai, wagoe-scaffolder, wagoe-tools and wagoe-jobs inside the :mcp alias, which is a launcher for the MCP server and not the app's classpath. wagoe add ai read the file as text, found the name in that alias, and treated the module as installed — printing success and writing nothing.

deps.edn is plain EDN, so this reads it. :unreadable when it will not parse: writing into a file we cannot read risks a duplicate key, and a deps.edn with a duplicate key does not load at all.

Coordinate of `clojars` where the module belongs, or `:unreadable`, or nil.

Where matters, and a substring search over the file gets it wrong. The
generated deps.edn lists wagoe-devtools, wagoe-ai, wagoe-scaffolder,
wagoe-tools and wagoe-jobs inside the `:mcp` alias, which is a launcher for
the MCP server and not the app's classpath. `wagoe add ai` read the file as
text, found the name in that alias, and treated the module as installed —
printing success and writing nothing.

deps.edn is plain EDN, so this reads it. `:unreadable` when it will not
parse: writing into a file we cannot read risks a duplicate key, and a
deps.edn with a duplicate key does not load at all.
sourceraw docstring

installed?clj

(installed? dir module dep-present?)

Whether module needs nothing more: its dep is there and every profile it belongs in has its key. Dev alone was checked, so a prod created later never got a module added before it (BOU-564).

Whether `module` needs nothing more: its dep is there and every profile it
belongs in has its key. Dev alone was checked, so a prod created later
never got a module added before it (BOU-564).
sourceraw docstring

module-statesclj

(module-states dir)

Each catalogue module with where the project has it: :enabled, :configurable (in deps.edn, not switched on) or :absent. A module with a :module-key is on when that key is in config or :extra-modules; the other core modules and the :always-on ones are wired whatever config says; the rest need their config key in every profile.

Each catalogue module with where the project has it: :enabled, :configurable
(in deps.edn, not switched on) or :absent. A module with a :module-key is on
when that key is in config or :extra-modules; the other core modules and the
:always-on ones are wired whatever config says; the rest need their config
key in every profile.
sourceraw docstring

patch-config!clj

(patch-config! dir relative-path snippet)

Inject snippet into the :active map of a config file unless its key is there. It goes after the last entry, at that entry's column, with the closing brace right after it. Returns :added, :present, :no-active when there is no :active map to write into, or :not-written when the result would not have the key under :active.

Inject snippet into the :active map of a config file unless its key is there.
It goes after the last entry, at that entry's column, with the closing brace
right after it. Returns :added, :present, :no-active when there is no
:active map to write into, or :not-written when the result would not have
the key under :active.
sourceraw docstring

patch-configs!clj

(patch-configs! dir module)

Patch every existing resources/conf/<profile>/config.edn. Returns [[env result]], result as patch-config! returns it. Only dev and test were written, so a module was missing under WAG_ENV=prod (BOU-529).

Patch every existing resources/conf/<profile>/config.edn. Returns
[[env result]], result as `patch-config!` returns it. Only dev and test
were written, so a module was missing under WAG_ENV=prod (BOU-529).
sourceraw docstring

patch-deps!clj

(patch-deps! dir {:keys [clojars version scope]})

Add clojars coordinate to deps.edn if not already present.

A module with :scope :dev goes into the :repl alias instead of :deps. devtools is the first: it pulls a dashboard and a Jetty adapter, and putting it in :deps would ship all of that in the uberjar. Returns :deps, :repl-alias, :no-repl-extra-deps or :unreadable (nothing written), or nil when the dep was already there.

Add clojars coordinate to deps.edn if not already present.

A module with `:scope :dev` goes into the `:repl` alias instead of `:deps`.
devtools is the first: it pulls a dashboard and a Jetty adapter, and putting
it in `:deps` would ship all of that in the uberjar. Returns `:deps`,
`:repl-alias`, `:no-repl-extra-deps` or `:unreadable` (nothing written), or
nil when the dep was already there.
sourceraw docstring

patch-env-example!clj

(patch-env-example! dir {:keys [prod-env-vars]} results)

Append to .env.example each of the module's :prod-env-vars it lacks, once results show a profile other than dev and test runs the module. Lines already there are never changed. Returns the variables added.

Append to .env.example each of the module's :prod-env-vars it lacks, once
`results` show a profile other than dev and test runs the module. Lines
already there are never changed. Returns the variables added.
sourceraw docstring

project-nameclj

(project-name dir)

The project's name: dev's :wagoe/settings :name less its profile suffix, as bb setup reads it, else the directory's name.

The project's name: dev's :wagoe/settings :name less its profile suffix,
as `bb setup` reads it, else the directory's name.
sourceraw docstring

render-module-blocksclj

(render-module-blocks content states)

content with the available- and installed-modules blocks rendered from states, as module-states returns them.

`content` with the available- and installed-modules blocks rendered from
`states`, as `module-states` returns them.
sourceraw docstring

repl-extra-deps-insertion-pointclj

(repl-extra-deps-insertion-point content)

Index just after the :extra-deps { of the :repl alias, or nil.

Scoped to the alias, which a regex is not. (?s):repl\s*\{.*?:extra-deps\s*\{ anchors on :repl and then takes the NEXT :extra-deps in the file, which need not be inside it — with a :repl alias that has none, devtools landed in whatever alias came next (:test in a generated project). It reported the :repl alias while writing to :test.

Index just after the `:extra-deps {` of the `:repl` alias, or nil.

Scoped to the alias, which a regex is not. `(?s):repl\s*\{.*?:extra-deps\s*\{`
anchors on :repl and then takes the NEXT :extra-deps in the file, which need
not be inside it — with a :repl alias that has none, devtools landed in
whatever alias came next (:test in a generated project). It reported the
:repl alias while writing to :test.
sourceraw docstring

sync-agents-md!clj

(sync-agents-md! dir)

Rewrite AGENTS.md's module blocks to match deps.edn and config.edn.

Rewrite AGENTS.md's module blocks to match deps.edn and config.edn.
sourceraw docstring

wagoe-project?clj

(wagoe-project? dir)

True if dir contains a deps.edn referencing com.wagoe.

True if dir contains a deps.edn referencing com.wagoe.
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