As per documentation there is no such command mentioned to list the folders/subfolders using maximum depth in gsutil.
To get the top level objects of a bucket using node.js, it can be done by API as mentioned :
`const [files, nextQuery, apiResponse] = await storage.bucket(bucketName).getFiles({autoPaginate: false, delimiter: "/", prefix: ""});`
For more information you can refer to the link and github case where a similar issue has been discussed.
This command is mentioned as a trick :
gsutil ls -l gs://bucket_name/folder_name | xargs -I{} gsutil du -sh {}
There's no --max-depth support in gsutil du. You could write a script that lists the first-level folder names, and then iterate over those folders and run gsutil ls -l $folder/*