How to use the @node-red/registry.getModuleInfo function in @node-red/registry

To help you get started, we’ve selected a few @node-red/registry examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-red / node-red / packages / node_modules / @node-red / runtime / lib / nodes / index.js View on Github external
function installModule(module,version) {
    var existingModule = registry.getModuleInfo(module);
    var isUpgrade = !!existingModule;
    return registry.installModule(module,version).then(function(info) {
        if (isUpgrade) {
            events.emit("runtime-event",{id:"node/upgraded",retain:false,payload:{module:module,version:version}});
        } else {
            events.emit("runtime-event",{id:"node/added",retain:false,payload:info.nodes});
        }
        return info;
    });
}
github node-red / node-red / packages / node_modules / @node-red / runtime / lib / nodes / index.js View on Github external
function uninstallModule(module) {
    var info = registry.getModuleInfo(module);
    if (!info) {
        throw new Error(log._("nodes.index.unrecognised-module", {module:module}));
    } else {
        for (var i=0;i