WIP: ensure the stream is consumed before end/close are emitted.
This commit is contained in:
+1
-1
@@ -294,7 +294,7 @@ export class NexeCompiler {
|
||||
return binary
|
||||
}
|
||||
const launchCode = this.code()
|
||||
const vfsStream = await this.bundle.toStream()
|
||||
const vfsStream = this.bundle.toStream()
|
||||
let vfsSize = 0
|
||||
const vfsSum = new Transform({
|
||||
transform(chunk, _enc, cb) {
|
||||
|
||||
+2
-2
@@ -41,8 +41,8 @@ export class Bundle {
|
||||
}
|
||||
}
|
||||
|
||||
public async toStream(): Promise<Readable> {
|
||||
await this.zip.finalize()
|
||||
public toStream(): Readable {
|
||||
setTimeout(() => this.zip.finalize())
|
||||
return this.zip
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user