From 31c979f30fc1ef69efe4f05fdc3ab9f424d63ef8 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 16 Jun 2015 15:32:41 +0100 Subject: [PATCH] Add deprecated node list --- red/nodes/deprecated.js | 36 +++++++++++++++++++++++++++++++ red/nodes/flows.js | 10 +++++++-- test/red/nodes/deprecated_spec.js | 28 ++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 red/nodes/deprecated.js create mode 100644 test/red/nodes/deprecated_spec.js diff --git a/red/nodes/deprecated.js b/red/nodes/deprecated.js new file mode 100644 index 000000000..f570825f4 --- /dev/null +++ b/red/nodes/deprecated.js @@ -0,0 +1,36 @@ +/** + * Copyright 2015 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + **/ + +var nodes = { + "irc in": {module:"node-red-node-irc"}, + "irc out": {module:"node-red-node-irc"}, + "irc-server": {module:"node-red-node-irc"}, + + "arduino in": {module:"node-red-node-arduino"}, + "arduino out": {module:"node-red-node-arduino"}, + "arduino-board": {module:"node-red-node-arduino"}, + + "redis out": {module:"node-red-node-redis"}, + + "mongodb": {module:"node-red-node-mongodb"}, + "mongodb out": {module:"node-red-node-mongodb"} +} + +module.exports = { + get: function(id) { + return nodes[id]; + } +} diff --git a/red/nodes/flows.js b/red/nodes/flows.js index b50c16241..6e10589ec 100644 --- a/red/nodes/flows.js +++ b/red/nodes/flows.js @@ -24,7 +24,7 @@ var log = require("../log"); var events = require("../events"); var redUtil = require("../util"); var storage = null; - +var deprecated = require("./deprecated"); var activeFlow = null; @@ -146,7 +146,13 @@ var flowNodes = module.exports = { if (missingTypes.length > 0) { log.info("Waiting for missing types to be registered:"); for (var i=0;i