refactor: fix typescript errors

This commit is contained in:
2026-10-22 23:18:06 +03:00
parent 84d905dbb3
commit a25f223b61
16 changed files with 739 additions and 392 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ export class FlashHTMLPacker extends Packer {
call() {
const target = this.targetPath;
const indexTemplate = template(
fs.readFileSync(path.resolve(import.meta.dirname, "..", "template/flash/index.html")),
fs.readFileSync(path.resolve(import.meta.dirname, "..", "template/flash/index.html"), "utf8"),
);
const index = indexTemplate(this.config);
fs.writeFileSync(path.resolve(target, "index.html"), index);
+4 -4
View File
@@ -2,7 +2,7 @@ import fs from "fs";
import fse from "fs-extra";
import gulp from "gulp";
import deb from "gulp-debian";
import template from "lodash.template";
import { template } from "lodash";
import os from "os";
import path from "path";
import { Config } from "../../../../core/config";
@@ -21,7 +21,7 @@ export class LinuxDEBPacker extends Packer {
const buildDir = path.join(os.tmpdir(), "build", this.config.name, "debian");
const iconfile = `${this.config.meta.filename}${path.extname(this.config.meta.icon!)}`;
const desktopTemplate = template(
fs.readFileSync(path.resolve(import.meta.dirname, "..", "template/linux/app.desktop")),
fs.readFileSync(path.resolve(import.meta.dirname, "..", "template/linux/app.desktop"), "utf8"),
);
const desktop = desktopTemplate(Object.assign({ iconfile: iconfile }, this.config));
fse.ensureDirSync(`${buildDir}/usr/share/applications`);
@@ -30,8 +30,8 @@ export class LinuxDEBPacker extends Packer {
fse.copySync(this.config.meta.icon!, `${buildDir}/usr/share/${this.config.meta.filename}/${iconfile}`);
return gulp.src(`${buildDir}/*`).pipe(
deb({
package: this.config.meta.filename,
version: this.config.meta.version,
package: this.config.meta.filename!,
version: this.config.meta.version!,
section: "base",
priority: "optional",
architecture: "all",