fix(core): Use SmartRequest with Buffer for binary downloads, tighten static route handling, bump dependencies and add workspace/config files
This commit is contained in:
@@ -9,9 +9,12 @@ export class TestFileProvider {
|
||||
public async getDockerAlpineImageAsLocalTarball(): Promise<string> {
|
||||
const filePath = plugins.path.join(paths.testFilesDir, 'alpine.tar')
|
||||
// fetch the docker alpine image
|
||||
const response = await plugins.smartrequest.getBinary(fileUrls.dockerAlpineImage);
|
||||
const response = await plugins.smartrequest.SmartRequest.create()
|
||||
.url(fileUrls.dockerAlpineImage)
|
||||
.get();
|
||||
await plugins.smartfile.fs.ensureDir(paths.testFilesDir);
|
||||
await plugins.smartfile.memory.toFs(response.body, filePath);
|
||||
const buffer = Buffer.from(await response.arrayBuffer());
|
||||
await plugins.smartfile.memory.toFs(buffer, filePath);
|
||||
return filePath;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user