mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(core): Fix loading of scoped-community packages (#6807)
fix(code): Fix loading of scoped-community packages
This commit is contained in:
parent
b7ca27afcf
commit
53e58b408a
|
@ -133,11 +133,17 @@ export class LoadNodesAndCredentials implements INodesAndCredentials {
|
||||||
nodeModulesDir: string,
|
nodeModulesDir: string,
|
||||||
packageName?: string,
|
packageName?: string,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const installedPackagePaths = await glob(packageName ?? ['n8n-nodes-*', '@*/n8n-nodes-*'], {
|
const globOptions = {
|
||||||
cwd: nodeModulesDir,
|
cwd: nodeModulesDir,
|
||||||
onlyDirectories: true,
|
onlyDirectories: true,
|
||||||
deep: 1,
|
deep: 1,
|
||||||
});
|
};
|
||||||
|
const installedPackagePaths = packageName
|
||||||
|
? await glob(packageName, globOptions)
|
||||||
|
: [
|
||||||
|
...(await glob('n8n-nodes-*', globOptions)),
|
||||||
|
...(await glob('@*/n8n-nodes-*', { ...globOptions, deep: 2 })),
|
||||||
|
];
|
||||||
|
|
||||||
for (const packagePath of installedPackagePaths) {
|
for (const packagePath of installedPackagePaths) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue