File tree Expand file tree Collapse file tree 4 files changed +609
-379
lines changed
Expand file tree Collapse file tree 4 files changed +609
-379
lines changed Original file line number Diff line number Diff line change 2828 "@remix-run/react" : " ^2.16.2" ,
2929 "@remix-run/serve" : " ^2.16.2" ,
3030 "@remix-run/server-runtime" : " ^2.16.2" ,
31- "@types/node" : " ^22.13 .13" ,
31+ "@types/node" : " ^24.0 .13" ,
3232 "@types/serialize-error" : " ^4.0.1" ,
3333 "body-parser" : " ^1.20.3" ,
34- "convert-svg-to-png" : " ^0.6.4 " ,
34+ "convert-svg-to-png" : " ^0.7.1 " ,
3535 "cors" : " ^2.8.5" ,
3636 "date-fns" : " ^4.1.0" ,
3737 "discord.js" : " ^14.18.0" ,
4747 "otplib" : " ^12.0.1" ,
4848 "pretty-ms" : " ^9.2.0" ,
4949 "proj4" : " ^2.15.0" ,
50- "puppeteer" : " 13.7.0 " ,
50+ "puppeteer" : " 24.12.1 " ,
5151 "react" : " ^19.0.0" ,
5252 "react-dom" : " ^19.0.0" ,
5353 "remix-auth" : " ^4.1.0" ,
Original file line number Diff line number Diff line change 1- import svgToPng from "convert-svg-to-png" ;
2- import type { Converter } from "convert-svg-to-png " ;
1+ import { createConverter } from "convert-svg-to-png" ;
2+ import { executablePath } from "puppeteer " ;
33
44let timeout : ReturnType < typeof setTimeout > | null = null ;
5- let converter : Converter | null = null ;
5+ let converter : Awaited < ReturnType < typeof createConverter > > | null = null ;
66
77export async function renderSvg ( svg : string ) {
8- if ( converter === null || converter . destroyed ) {
9- converter = svgToPng . createConverter ( {
10- puppeteer : { args : [ "--no-sandbox" ] } ,
8+ if ( converter === null || converter . closed ) {
9+ converter = await createConverter ( {
10+ launch : {
11+ executablePath,
12+ args : [ "--no-sandbox" ] ,
13+ } ,
1114 } ) ;
1215
1316 if ( timeout !== null ) clearTimeout ( timeout ) ;
1417 timeout = setTimeout ( ( ) => {
15- converter ?. destroy ( ) ;
18+ converter ?. close ( ) ;
1619 timeout = null ;
1720 } , 60000 ) ;
1821 }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments