Show api_req_started message while verbose details are being built for smoother ux

This commit is contained in:
Saoud Rizwan committed 2024-08-30 08:35:10 -04:00
1 parent bf57218ed9
commit dc2f3a5c28
2 files changed
+41 -15

No files matched your search

+2 -2
View File
@@ -105,10 +105,10 @@ export async function listFiles(dirPath: string, recursive: boolean): Promise<st
// globby doesnt natively support top down level by level globbing, so we implement it ourselves
async function globbyLevelByLevel(options?: Options) {
let results: string[] = []
let currentLevel = 1
let currentLevel = 0
while (results.length < LIST_FILES_LIMIT) {
// Construct the glob pattern for the current level
const pattern = `${"*/".repeat(currentLevel)}*`
const pattern = currentLevel === 0 ? "*" : `${"*/".repeat(currentLevel)}*`
// Get files and directories at the current level
const filesAtLevel = await globby(pattern, options)