rafa pages
- rafa
- rafa module
rafa module
List the modules a project's config names and what became of each, and run an action a loaded module provides.
rafa module shows the modules a project's modules: and allowList: name, and runs actions they provide. At 0.47.0 a module loads from a folder only (a path source); Add-ons explains.
Spends: nothing itself; a module's own action may. Changes: nothing in list; exec does what the module's action does.
In the target layout's cut table this code counts toward the command-line package, @open-tomato/rafa, at the root of the repository, which is where it lives in 0.47.0 too (Repository layout). [verify: its final placement]
Actions
| Action | Does |
|---|---|
list | list the modules the config gives a source for, and what each came to |
exec | run an action of a mounted module |
rafa module list
List the modules the config gives a source for, and what each came to.
rafa module list
Lists every source under modules: in the config, in order: the module's name, version and types, whether allowList: names it, whether it loaded, was refused or is disabled, the adapters it registered, its command entry and whether that is mounted, and every problem found. Phase 1 loads path sources alone and refuses npm and github ones. A disabled module is validated too, so its problems say why it would not load. With --output=json the modules are the data of the terminal result event.
Examples:
rafa module list: Prints one row per configured module: its name, version, state, types and source.rafa module list --output=json: Writes a start event, then a result event whose data is the modules.
Output formats: text, json.
rafa module exec
Run an action of a mounted module.
rafa module exec [module] [action]
Runs the action a mounted module provides: rafa module exec <module> <action>, with the arguments and flags that action declares after it. A module is mounted when allowList: in the config names it and modules: gives its path source; rafa module list shows each one and what it came to. --help after the action prints that action's help. Typed with no module, it refuses with exit code 1 and names every mounted module with its actions.
| Argument | Type | What it is |
|---|---|---|
module | string | The name of a mounted module, as allowList: names it. |
action | string | One of the actions the module provides. |
Examples:
rafa module exec linear next: Runs the action next of the module linear, once allowList: names it.rafa module exec linear next --help: Prints the help of that action, rendered as any core action's help is.
Output formats: text, json.