import path from "path"; import { type Config, Platform } from "../../../core/type"; import { FlashPlayer } from "../../../impl/flashplayer"; import { Runner } from "../../core/runner"; export class FlashRunner extends Runner { public player: FlashPlayer; constructor(config: Config, debug?: boolean, player: typeof FlashPlayer = FlashPlayer) { super(config, Platform.FLASH, debug); this.player = new player(debug); } setup() { return this.player.prepare(); } call() { const target = this.targetPath; const filename = path.resolve(target, this.config.meta.filename + ".swf"); const result = this.player.run(filename, { cwd: target, verbosity: 0 }); return this.log(result); } } Runner.register(Platform.FLASH, FlashRunner);