mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Move exec and events components to util module
The exec and events components are common components that are used by both runtime and registry. It makes sense to move them into the util package. This also adds some docs to the registry module
This commit is contained in:
@@ -22,11 +22,7 @@ var tar = require("tar");
|
||||
|
||||
var registry = require("./registry");
|
||||
var library = require("./library");
|
||||
var log;
|
||||
var exec;
|
||||
|
||||
var events;
|
||||
|
||||
const {exec,log,events} = require("@node-red/util");
|
||||
var child_process = require('child_process');
|
||||
var npmCommand = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
||||
var paletteEditorEnabled = false;
|
||||
@@ -37,11 +33,8 @@ const slashRe = process.platform === "win32" ? /\\|[/]/ : /[/]/;
|
||||
const pkgurlRe = /^(https?|git(|\+https?|\+ssh|\+file)):\/\//;
|
||||
const localtgzRe = /^([a-zA-Z]:|\/).+tgz$/;
|
||||
|
||||
function init(runtime) {
|
||||
events = runtime.events;
|
||||
settings = runtime.settings;
|
||||
log = runtime.log;
|
||||
exec = runtime.exec;
|
||||
function init(_settings) {
|
||||
settings = _settings;
|
||||
}
|
||||
|
||||
var activePromise = Promise.resolve();
|
||||
|
Reference in New Issue
Block a user