mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 12:44:07 -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`, {
|
.sync(`dist/${kind}/**/*.${kind === 'nodes' ? 'node' : kind}.js`, {
|
||||||
cwd: packageDir,
|
cwd: packageDir,
|
||||||
})
|
})
|
||||||
.filter((filePath) => !/[vV]\d.node\.js$/.test(filePath))
|
|
||||||
.map(loadClass)
|
.map(loadClass)
|
||||||
.filter((data) => !!data)
|
.filter((data) => !!data)
|
||||||
.reduce((obj, { className, sourcePath, instance }) => {
|
.reduce((obj, { className, sourcePath, instance }) => {
|
||||||
const name = kind === 'nodes' ? instance.description.name : instance.name;
|
const name = kind === 'nodes' ? instance.description.name : instance.name;
|
||||||
if (name in obj) console.error('already loaded', kind, name, sourcePath);
|
if (!/[vV]\d.node\.js$/.test(sourcePath)) {
|
||||||
else obj[name] = { className, sourcePath };
|
if (name in obj) console.error('already loaded', kind, name, sourcePath);
|
||||||
|
else obj[name] = { className, sourcePath };
|
||||||
|
}
|
||||||
|
|
||||||
if (kind === 'nodes') {
|
if (kind === 'nodes') {
|
||||||
const { credentials } = instance.description;
|
const { credentials } = instance.description;
|
||||||
|
|
Loading…
Reference in a new issue