feat: add link module
test / test (push) Failing after 5m44s

This commit is contained in:
2026-11-02 02:41:43 +03:00
parent 7615dbfc48
commit bb6d82d538
11 changed files with 157 additions and 130 deletions
+5 -14
View File
@@ -2,7 +2,6 @@ import fs from "fs";
import fse from "fs-extra";
import os from "os";
import path from "path";
import env from "../common/env";
import { System } from "../common/system";
import { watch } from "../common/watch";
import { Sdk } from "../core/sdk";
@@ -26,12 +25,15 @@ export class FlashPlayer extends Sdk {
BASE_URL = "https://fpdownload.macromedia.com/pub/flashplayer/updaters";
private debug: boolean;
protected baseUrl: string;
url =
"https://fpdownload.macromedia.com/pub/flashplayer/updaters/" +
"<%= version %>/" +
"<%= {linux:'flash_player_sa_linux' + (debug ? '_debug' : '') +'.x86_64.tar.gz','win':'flashplayer_'+version+'_sa'+(debug ? '_debug' : '')+'.exe'}[os_name] %>";
constructor(debug: boolean = false, version?: string, playerId = FlashPlayer.ID) {
super(playerId, version || FlashPlayer.VERSION);
this.debug = debug;
this.baseUrl = env.get("FLASHPLAYER_URL") || this.BASE_URL;
}
prepare() {
@@ -46,17 +48,6 @@ export class FlashPlayer extends Sdk {
}
}
get link(): string {
const baseUrl = `${this.baseUrl}/${this.version}`;
if (System.isWindows) {
return baseUrl + `/flashplayer_${this.version}_sa${this.debug ? "_debug" : ""}.exe`;
} else if (System.isLinux) {
return baseUrl + `/flash_player_sa_linux${this.debug ? "_debug" : ""}.x86_64.tar.gz`;
} else {
throw `Unsupported os '${os.type()}'`;
}
}
get flashPlayerBin(): string {
if (System.isWindows) {
const playerName = `flashplayer_${this.version}_sa${this.debug ? "_debug" : ""}.exe`;