update UI, Runtime API, metadata handling, and others

This commit is contained in:
Hiroyasu Nishiyama
2021-01-27 22:27:54 +09:00
parent d51aefa156
commit 4a1d66f210
9 changed files with 900 additions and 420 deletions

View File

@@ -447,5 +447,47 @@ var api = module.exports = {
} else {
return null
}
},
/**
* Gets list of NPM modules
* @param {Object} opts
* @param {User} opts.user - the user calling the api
* @param {Object} opts.req - the request to log (optional)
* @return {Promise<Buffer>} - list of installed NPM modules
* @memberof @node-red/runtime_nodes
*/
listNPMModules: async function(opts) {
var promise = runtime.nodes.listNPMModules();
return promise;
},
/**
* Uninstall NPM modules
* @param {Object} opts
* @param {User} opts.user - the user calling the api
* @param {Object} opts.req - the request to log (optional)
* @return {Promise<Object>} - object for request result
* @memberof @node-red/runtime_nodes
*/
uninstallNPMModule: async function(opts) {
var spec = opts.spec;
var promise = runtime.nodes.uninstallNPMModule(spec);
return promise;
},
/**
* Update NPM modules
* @param {Object} opts
* @param {User} opts.user - the user calling the api
* @param {Object} opts.req - the request to log (optional)
* @return {Promise<Object>} - object for request result
* @memberof @node-red/runtime_nodes
*/
updateNPMModule: async function(opts) {
var spec = opts.spec;
var isUpdate = opts.update;
var promise = runtime.nodes.updateNPMModule(spec, isUpdate);
return promise;
}
}