fix(core): update
This commit is contained in:
16
test/test.ts
16
test/test.ts
@@ -35,21 +35,7 @@ tap.test('should extract existing files on disk', async () => {
|
||||
const testSmartarchive = await smartarchive.SmartArchive.fromArchiveUrl(
|
||||
'https://verdaccio.lossless.digital/@pushrocks%2fwebsetup/-/websetup-2.0.14.tgz'
|
||||
);
|
||||
const streamfileStream = await testSmartarchive.exportToStreamOfStreamFiles();
|
||||
|
||||
streamfileStream.pipe(new plugins.smartstream.SmartDuplex({
|
||||
objectMode: true,
|
||||
writeAndTransformFunction: async (chunkArg: plugins.smartfile.StreamFile, streamtools) => {
|
||||
console.log(chunkArg.relativeFilePath);
|
||||
const streamFile = chunkArg;
|
||||
const readStream = await streamFile.createReadStream();
|
||||
const writePath = plugins.path.join(testPaths.nogitDir + streamFile.relativeFilePath);
|
||||
const dir = plugins.path.parse(writePath).dir;
|
||||
await plugins.smartfile.fs.ensureDir(plugins.path.dirname(dir));
|
||||
const writeStream = plugins.smartfile.fsStream.createWriteStream(writePath);
|
||||
readStream.pipe(writeStream);
|
||||
},
|
||||
}));
|
||||
const streamfileStream = await testSmartarchive.exportToFs(testPaths.nogitDir);
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
Reference in New Issue
Block a user