diff --git a/package.json b/package.json index b65137df..b875cc89 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "intuita-vscode-extension", "displayName": "Intuita", "description": " Discover, run & manage codemods faster & easier.", - "version": "0.38.11", + "version": "0.38.12", "publisher": "Intuita", "icon": "img/intuita_square128.png", "repository": { diff --git a/src/components/webview/MainProvider.ts b/src/components/webview/MainProvider.ts index d0e71eef..e8659951 100644 --- a/src/components/webview/MainProvider.ts +++ b/src/components/webview/MainProvider.ts @@ -250,12 +250,20 @@ export class MainViewProvider implements WebviewViewProvider { return; } - this.__directoryPaths = - (await glob(`${basePath}/**`, { - // ignore node_modules and files, match only directories - onlyDirectories: true, - ignore: ['**/node_modules/**'], - })) ?? []; + const directoryPaths = await glob(`${basePath}/**`, { + // ignore node_modules and files, match only directories + onlyDirectories: true, + ignore: ['**/node_modules/**'], + followSymbolicLinks: false, + deep: 10, + }); + + const MAX_NUMBER_OF_DIRECTORIES = 10000; + + this.__directoryPaths = directoryPaths.slice( + 0, + MAX_NUMBER_OF_DIRECTORIES, + ); } private __postMessage(message: WebviewMessage) {