mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Whitespace fixes
This commit is contained in:
parent
2bcc4cac6a
commit
c2ba6c0370
@ -65,7 +65,7 @@ function loadModuleTypeFiles(module, type) {
|
|||||||
moduleFn = parts.slice(0,nmi+2).join(path.sep);
|
moduleFn = parts.slice(0,nmi+2).join(path.sep);
|
||||||
}
|
}
|
||||||
if (!moduleFn) {
|
if (!moduleFn) {
|
||||||
// shortcut - skip calling statSync on empty string
|
// shortcut - skip calling statSync on empty string
|
||||||
break; // Module not found, don't attempt to load its nodes
|
break; // Module not found, don't attempt to load its nodes
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -250,7 +250,7 @@ function scanDirForNodesModules(dir,moduleName,packageDetails) {
|
|||||||
/*
|
/*
|
||||||
1. if !exist(package.json) || !package.json.has(node-red) => look for node_modules
|
1. if !exist(package.json) || !package.json.has(node-red) => look for node_modules
|
||||||
2. exist(package.json) && package.json.has(node-red) => load this only
|
2. exist(package.json) && package.json.has(node-red) => load this only
|
||||||
3. in original scan of nodesDir, ignore if:(exist(package.json) && package.json.has(node-red))
|
3. in original scan of nodesDir, ignore if:(exist(package.json) && package.json.has(node-red))
|
||||||
*/
|
*/
|
||||||
if (nodesDir) {
|
if (nodesDir) {
|
||||||
for (let dirIndex = 0; dirIndex < nodesDir.length; dirIndex++) {
|
for (let dirIndex = 0; dirIndex < nodesDir.length; dirIndex++) {
|
||||||
@ -542,7 +542,7 @@ function getPackageList() {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Gets the package json object for the supplied `dir`.
|
* Gets the package json object for the supplied `dir`.
|
||||||
* If there is no package.json or the `node-red` section is missing, `result.isNodeRedModule` will be `false`.
|
* If there is no package.json or the `node-red` section is missing, `result.isNodeRedModule` will be `false`.
|
||||||
* If there is no package.json `isPackage` will be `false`.
|
* If there is no package.json `isPackage` will be `false`.
|
||||||
* If an error occurs, `result.error` will contain the error.
|
* If an error occurs, `result.error` will contain the error.
|
||||||
@ -550,7 +550,7 @@ function getPackageList() {
|
|||||||
*/
|
*/
|
||||||
function getPackageDetails(dir) {
|
function getPackageDetails(dir) {
|
||||||
const result = {
|
const result = {
|
||||||
/** @type {string} The package directory */
|
/** @type {string} The package directory */
|
||||||
moduleDir: dir,
|
moduleDir: dir,
|
||||||
/** @type {string} The full file path of package.json for this package */
|
/** @type {string} The full file path of package.json for this package */
|
||||||
packageFile: null,
|
packageFile: null,
|
||||||
@ -579,7 +579,7 @@ function getPackageList() {
|
|||||||
result.isNodeRedModule = typeof result.package['node-red'] === 'object'
|
result.isNodeRedModule = typeof result.package['node-red'] === 'object'
|
||||||
if(result.isNodeRedModule) {
|
if(result.isNodeRedModule) {
|
||||||
result.isNodeRedModule = true;
|
result.isNodeRedModule = true;
|
||||||
result.allowed = registryUtil.checkModuleAllowed(pkg.name,pkg.version,loadAllowList,loadDenyList)
|
result.allowed = registryUtil.checkModuleAllowed(pkg.name,pkg.version,loadAllowList,loadDenyList)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
|
@ -785,7 +785,7 @@ module.exports = {
|
|||||||
|
|
||||||
get:getNode,
|
get:getNode,
|
||||||
eachNode: eachNode,
|
eachNode: eachNode,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the current flow configuration
|
* Gets the current flow configuration
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user