For "Copy" script, shouldn't there be
// get all the documents in the collection
await subcollectionRef
instead of
// get all the documents in the collection
return await subcollectionRef
when copying recursively?
Return value in for..of means that iterator will finish. So only the first subcollection will be copied. Or maybe I'm missing something.