mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
fix: Pick up credential test functions from versioned nodes as well (#4962)
This commit is contained in:
parent
bfc8e68b37
commit
2797c085e5
|
@ -29,13 +29,14 @@ const generate = async (kind) => {
|
|||
.sync(`dist/${kind}/**/*.${kind === 'nodes' ? 'node' : kind}.js`, {
|
||||
cwd: packageDir,
|
||||
})
|
||||
.filter((filePath) => !/[vV]\d.node\.js$/.test(filePath))
|
||||
.map(loadClass)
|
||||
.filter((data) => !!data)
|
||||
.reduce((obj, { className, sourcePath, instance }) => {
|
||||
const name = kind === 'nodes' ? instance.description.name : instance.name;
|
||||
if (name in obj) console.error('already loaded', kind, name, sourcePath);
|
||||
else obj[name] = { className, sourcePath };
|
||||
if (!/[vV]\d.node\.js$/.test(sourcePath)) {
|
||||
if (name in obj) console.error('already loaded', kind, name, sourcePath);
|
||||
else obj[name] = { className, sourcePath };
|
||||
}
|
||||
|
||||
if (kind === 'nodes') {
|
||||
const { credentials } = instance.description;
|
||||
|
|
Loading…
Reference in a new issue