backend-common: review comments for readTree + switch archive return type to a stream

This commit is contained in:
Patrik Oldsberg
2020-11-13 00:43:20 +01:00
parent 8e2effb531
commit bd1cef1847
6 changed files with 37 additions and 29 deletions
+2 -1
View File
@@ -14,6 +14,7 @@
* limitations under the License.
*/
import { Readable } from 'stream';
import { getDocFilesFromRepository } from './helpers';
import { UrlReader, ReadTreeResponse } from '@backstage/backend-common';
import { Entity } from '@backstage/catalog-model';
@@ -34,7 +35,7 @@ describe('getDocFilesFromRepository', () => {
return [];
},
archive: async () => {
return Buffer.from('');
return Readable.from('');
},
};
}