All the packages are located inside the
Lerna is used to coordinate the installation of package and execution of commands accross all the Nikita packages.
Versioning and change log generation is based on conventionnal commit.
nikita package provide an entry point for the majority of users. The
@nikitajs/core package is the heart of the library with its engine, the plugins and the core actions. All the other packages defines additionnal actions. For example, the
@nikitajs/docker package defines Docker related actions.
Users are encouraged to declare the
nikita package as their only dependency. The package is just a facade in front of the
@nikitajs/core package where the Nikita logic resides and all the other packages which defines additional actions.
nikita package, developers can require Nikita in their code with
const nikita = require('nikita') and they are ready to go.
In fact, if you look inside the
nikita package, there is only one module and its content is explicit:
// Register actions from Nikita packages require('@nikitajs/db/lib/register') require('@nikitajs/docker/lib/register') require('@nikitajs/file/lib/register') require('@nikitajs/ipa/lib/register') require('@nikitajs/java/lib/register') require('@nikitajs/krb5/lib/register') require('@nikitajs/ldap/lib/register') require('@nikitajs/log/lib/register') require('@nikitajs/lxd/lib/register') require('@nikitajs/network/lib/register') require('@nikitajs/service/lib/register') require('@nikitajs/system/lib/register') require('@nikitajs/tools/lib/register') // Expose the Nikita core engine module.exports = require('@nikitajs/core')
Plugins are stored inside the
src/plugins folder. Pretty much everything in Nikita is implemented as a plugin. Plugins define hooks which are interception points of the action lifecycle.