Merge branch 'master' into 0.17

This commit is contained in:
Nick O'Leary
2017-04-11 14:53:44 +01:00
6 changed files with 40 additions and 7 deletions

View File

@@ -17,6 +17,7 @@
var when = require("when");
var path = require("path");
var fs = require("fs");
var clone = require("clone");
var registry = require("./registry");
var credentials = require("./credentials");
@@ -79,6 +80,7 @@ function createNode(node,def) {
}
var creds = credentials.get(id);
if (creds) {
creds = clone(creds);
//console.log("Attaching credentials to ",node.id);
// allow $(foo) syntax to substitute env variables for credentials also...
for (var p in creds) {

View File

@@ -80,6 +80,8 @@ function getLocalFile(file) {
* @return an array of fully-qualified paths to .js files
*/
function getLocalNodeFiles(dir) {
dir = path.resolve(dir);
var result = [];
var files = [];
try {
@@ -218,7 +220,7 @@ function getNodeFiles(disableNodePathScan) {
if (settings.coreNodesDir) {
nodeFiles = getLocalNodeFiles(path.resolve(settings.coreNodesDir));
var defaultLocalesPath = path.resolve(path.join(settings.coreNodesDir,"core","locales"));
var defaultLocalesPath = path.join(settings.coreNodesDir,"core","locales");
i18n.registerMessageCatalog("node-red",defaultLocalesPath,"messages.json");
}