mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix: Pick up credential test functions from versioned nodes as well (#4962)
This commit is contained in:
committed by
GitHub
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user