refactor: refork tail module

This commit is contained in:
2026-10-22 12:04:40 +03:00
parent a421d56ec1
commit 84d905dbb3
12 changed files with 1047 additions and 2036 deletions
+2 -14
View File
@@ -2,10 +2,9 @@ import fs from "fs";
import fse from "fs-extra";
import os from "os";
import path from "path";
import through from "through2";
import { Env } from "../common/env";
import { System } from "../common/system";
import { TailVinyl } from "../common/tail";
import { watch } from "../common/watch";
import { Sdk } from "../core/sdk";
import run from "../run";
@@ -120,17 +119,6 @@ export class FlashPlayer extends Sdk {
this.log.i("_run_ *%s*", filename);
FlashPlayer.trust(filename);
FlashPlayer.enableLog();
return run(`${this.flashPlayerBin} ${filename}`, params)
.exec()
.pipe(
through.obj(function (file: any, enc: string, callback: any) {
const log = new TailVinyl({
path: FlashPlayer.log,
});
this.on("end", () => log.dispose());
this.push(log);
callback();
}),
);
return run(`${this.flashPlayerBin} ${filename}`, params).exec().pipe(watch(FlashPlayer.log));
}
}