@node-red/registry
Advanced tools
Comparing version 1.3.0-beta.1 to 1.3.0
@@ -196,3 +196,3 @@ // This module handles the management of modules required by the runtime and flows. | ||
},true).then(result => { | ||
log.info("successfully installed: "+installSpec); | ||
log.info(log._("server.install.installed", { name: installSpec })); | ||
}).catch(result => { | ||
@@ -224,2 +224,2 @@ var output = result.stderr; | ||
require: requireModule | ||
} | ||
} |
@@ -304,2 +304,13 @@ /*! | ||
/** | ||
* Gets the full path to a module's resource file | ||
* @param {String} module - the name of the module providing the resource file | ||
* @param {String} path - the relative path of the resource file | ||
* @return {String} the full path to the resource file | ||
* | ||
* @function | ||
* @memberof @node-red/registry | ||
*/ | ||
getModuleResource: registry.getModuleResource, | ||
checkFlowDependencies: externalModules.checkFlowDependencies, | ||
@@ -313,5 +324,6 @@ | ||
exportPluginSettings: plugins.exportPluginSettings, | ||
deprecated: require("./deprecated") | ||
}; |
@@ -388,6 +388,13 @@ /** | ||
if (stack) { | ||
var i = stack.indexOf(node.file); | ||
var filePath = node.file; | ||
try { | ||
filePath = fs.realpathSync(filePath); | ||
} | ||
catch (e) { | ||
// ignore canonicalization error | ||
} | ||
var i = stack.indexOf(filePath); | ||
if (i > -1) { | ||
var excerpt = stack.substring(i+node.file.length+1,i+node.file.length+20); | ||
var m = /^(\d+):(\d+)/.exec(excerpt); | ||
var excerpt = stack.substring(i+filePath.length+1,i+filePath.length+20); | ||
var m = /^(\d+)/.exec(excerpt); | ||
if (m) { | ||
@@ -394,0 +401,0 @@ node.err = err+" (line:"+m[1]+")"; |
@@ -265,2 +265,10 @@ /** | ||
} | ||
var resourcesDir = path.join(moduleDir,"resources"); | ||
try { | ||
fs.statSync(resourcesDir) | ||
result.resources = {path:resourcesDir}; | ||
} catch(err) { | ||
} | ||
return result; | ||
@@ -410,2 +418,3 @@ } | ||
plugins: {}, | ||
resources: nodeModuleFiles.resources, | ||
icons: nodeModuleFiles.icons, | ||
@@ -412,0 +421,0 @@ examples: nodeModuleFiles.examples |
@@ -18,4 +18,4 @@ /** | ||
//var UglifyJS = require("uglify-js"); | ||
var path = require("path"); | ||
var fs = require("fs"); | ||
const path = require("path"); | ||
const fs = require("fs"); | ||
@@ -684,3 +684,2 @@ var library = require("./library"); | ||
var iconList = {}; | ||
for (var module in moduleConfigs) { | ||
@@ -697,2 +696,17 @@ if (moduleConfigs.hasOwnProperty(module)) { | ||
function getModuleResource(module, resourcePath) { | ||
let mod = moduleConfigs[module]; | ||
if (mod && mod.resources) { | ||
let basePath = mod.resources.path; | ||
let fullPath = path.join(basePath,resourcePath); | ||
if (/^\.\./.test(path.relative(basePath,fullPath))) { | ||
return null; | ||
} | ||
if (fs.existsSync(fullPath)) { | ||
return fullPath; | ||
} | ||
} | ||
return null; | ||
} | ||
var registry = module.exports = { | ||
@@ -728,2 +742,4 @@ init: init, | ||
getNodeIcons: getNodeIcons, | ||
getModuleResource: getModuleResource, | ||
/** | ||
@@ -730,0 +746,0 @@ * Gets all of the node template configs |
{ | ||
"name": "@node-red/registry", | ||
"version": "1.3.0-beta.1", | ||
"version": "1.3.0", | ||
"license": "Apache-2.0", | ||
@@ -19,7 +19,7 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@node-red/util": "1.3.0-beta.1", | ||
"@node-red/util": "1.3.0", | ||
"semver": "6.3.0", | ||
"tar": "6.0.5", | ||
"uglify-js": "3.12.4" | ||
"tar": "6.1.0", | ||
"uglify-js": "3.13.3" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
128369
3189
1
+ Added@node-red/util@1.3.0(transitive)
+ Addedmoment-timezone@0.5.33(transitive)
+ Addedtar@6.1.0(transitive)
+ Addeduglify-js@3.13.3(transitive)
- Removed@node-red/util@1.3.0-beta.1(transitive)
- Removedmoment-timezone@0.5.32(transitive)
- Removedtar@6.0.5(transitive)
- Removeduglify-js@3.12.4(transitive)
Updated@node-red/util@1.3.0
Updatedtar@6.1.0
Updateduglify-js@3.13.3