From 33389266ab1972f4221d5d95b105292f6ce84662 Mon Sep 17 00:00:00 2001 From: Pavel Denisjuk Date: Thu, 4 Jul 2024 10:32:05 +0200 Subject: [PATCH 1/2] fix(cli-plugin-scaffold-extensions): ignore node_modules when detecting workspaces --- .../src/generators/utils/getExtensionsFromFilesystem.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cli-plugin-scaffold-extensions/src/generators/utils/getExtensionsFromFilesystem.ts b/packages/cli-plugin-scaffold-extensions/src/generators/utils/getExtensionsFromFilesystem.ts index 34cf42efc4a..a7e1f9794db 100644 --- a/packages/cli-plugin-scaffold-extensions/src/generators/utils/getExtensionsFromFilesystem.ts +++ b/packages/cli-plugin-scaffold-extensions/src/generators/utils/getExtensionsFromFilesystem.ts @@ -12,7 +12,9 @@ export type ExtensionWorkspace = { }; export const getExtensionsFromFilesystem = (): ExtensionWorkspace[] => { - const workspaces = glob.sync(`extensions/**/package.json`); + const workspaces = glob.sync(`extensions/**/package.json`, { + ignore: ["**/node_modules/**"] + }); return workspaces .map(pkg => ({ path: path.dirname(pkg), From e741f101a279a3a5b6fe1dd171cb6dce0e855ef0 Mon Sep 17 00:00:00 2001 From: Pavel Denisjuk Date: Thu, 4 Jul 2024 10:32:45 +0200 Subject: [PATCH 2/2] fix(api-page-builder): use fs.remove when deleting files and folders --- .../src/graphql/crud/install/utils/downloadInstallFiles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api-page-builder/src/graphql/crud/install/utils/downloadInstallFiles.ts b/packages/api-page-builder/src/graphql/crud/install/utils/downloadInstallFiles.ts index 5a5972774a6..692d9fe5cd0 100644 --- a/packages/api-page-builder/src/graphql/crud/install/utils/downloadInstallFiles.ts +++ b/packages/api-page-builder/src/graphql/crud/install/utils/downloadInstallFiles.ts @@ -20,7 +20,7 @@ function extractZip(zipPath: string, dir: string): Promise { } export function deleteFile(path: string): Promise { - return fs.unlink(path); + return fs.remove(path); } const INSTALL_DIR = "/tmp";