chore: reverting stripping as we don't need it

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2021-09-08 10:59:40 +02:00
parent e86adc6892
commit a316cd838d
2 changed files with 4 additions and 3 deletions
@@ -94,8 +94,6 @@ export class AzureUrlReader implements UrlReader {
url: string,
options?: ReadTreeOptions,
): Promise<ReadTreeResponse> {
// TODO: Support filepath based reading tree feature like other providers
// Get latest commit SHA
const commitsAzureResponse = await fetch(
@@ -129,11 +127,13 @@ export class AzureUrlReader implements UrlReader {
throw new Error(message);
}
const { filepath } = parseGitUrl(url);
return await this.deps.treeResponseFactory.fromZipArchive({
stream: archiveAzureResponse.body as unknown as Readable,
etag: commitSha,
filter: options?.filter,
stripFirstDirectory: true,
subpath: filepath,
});
}
@@ -21,5 +21,6 @@ const directoryNameRegex = /^[^\/]+\//;
// Removes the first segment of a forward-slash-separated path
export function stripFirstDirectoryFromPath(path: string): string {
console.log('stripFirstDirectoryPath path:', path);
return path.replace(directoryNameRegex, '');
}