mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Pass full runtime object to storage and flow sub-components
This commit is contained in:
@@ -43,12 +43,12 @@ var subflowInstanceNodeMap = {};
|
||||
|
||||
var typeEventRegistered = false;
|
||||
|
||||
function init(_settings, _storage) {
|
||||
function init(runtime) {
|
||||
if (started) {
|
||||
throw new Error("Cannot init without a stop");
|
||||
}
|
||||
settings = _settings;
|
||||
storage = _storage;
|
||||
settings = runtime.settings;
|
||||
storage = runtime.storage;
|
||||
started = false;
|
||||
if (!typeEventRegistered) {
|
||||
events.on('type-registered',function(type) {
|
||||
|
@@ -78,7 +78,7 @@ function createNode(node,def) {
|
||||
function init(runtime) {
|
||||
settings = runtime.settings;
|
||||
credentials.init(runtime.storage);
|
||||
flows.init(runtime.settings,runtime.storage);
|
||||
flows.init(runtime);
|
||||
registry.init(runtime);
|
||||
context.init(runtime.settings);
|
||||
}
|
||||
|
Reference in New Issue
Block a user