moleculerjs / moleculer-repl

REPL module for Moleculer framework
http://moleculer.services/docs/moleculer-repl.html
MIT License
27 stars 25 forks source link

Returning Vorpal from constructor for better customization of the CLI // Autocomplete for dcall #44

Closed Wallacy closed 4 years ago

Wallacy commented 4 years ago

Very basic PR:

To make sure that we can make a great CLI/Repl under moleculer-repl, return the vorpal object is needed to improve the Repl customization.

Example:

broker.start().then(() => {
    const repl = REPL(broker, {
                    delimiter: "moleculer λ",
                    customCommands: broker.options.replCommands
                    });
    repl.removeIfExist("load");
    repl.removeIfExist("loadFolder");
});

Also: Autocomplete for dcall