update deps

This commit is contained in:
syuilo
2023-07-07 10:53:06 +09:00
parent e987af4e4f
commit d5c4e77c44
8 changed files with 2762 additions and 2151 deletions

View File

@@ -304,11 +304,11 @@ export class FileInfoService {
@bindThis
public fixMime(mime: string | fileType.MimeType): string {
// see https://github.com/misskey-dev/misskey/pull/10686
if (mime === "audio/x-flac") {
return "audio/flac";
if (mime === 'audio/x-flac') {
return 'audio/flac';
}
if (mime === "audio/vnd.wave") {
return "audio/wav";
if (mime === 'audio/vnd.wave') {
return 'audio/wav';
}
return mime;
@@ -355,11 +355,12 @@ export class FileInfoService {
* Check the file is SVG or not
*/
@bindThis
public async checkSvg(path: string) {
public async checkSvg(path: string): Promise<boolean> {
try {
const size = await this.getFileSize(path);
if (size > 1 * 1024 * 1024) return false;
return isSvg(fs.readFileSync(path));
const buffer = await fs.promises.readFile(path);
return isSvg(buffer.toString());
} catch {
return false;
}

View File

@@ -35,7 +35,7 @@ html
link(rel='prefetch' href=infoImageUrl)
link(rel='prefetch' href=notFoundImageUrl)
//- https://github.com/misskey-dev/misskey/issues/9842
link(rel='stylesheet' href='/assets/tabler-icons/tabler-icons.min.css?v2.22.0')
link(rel='stylesheet' href='/assets/tabler-icons/tabler-icons.min.css?v2.24.0')
link(rel='modulepreload' href=`/vite/${clientEntry.file}`)
if !config.clientManifestExists