File tree Expand file tree Collapse file tree 4 files changed +332
-10
lines changed Expand file tree Collapse file tree 4 files changed +332
-10
lines changed Original file line number Diff line number Diff line change 6363 cd work-fonts
6464 git clone --depth=1 https://github.com/dev-protocol/stackroom.git
6565 cd stackroom/fonts
66- mv IBM_Plex_Sans_JP/* ./
66+ mv IBM_Plex_Sans_JP/IBMPlexSansJP-Bold.ttf ./
6767 rm -rf IBM_Plex_Sans_JP
6868 mv Noto_Color_Emoji/* ./
6969 rm -rf Noto_Color_Emoji
Original file line number Diff line number Diff line change 1515 "license" : " MPL-2.0" ,
1616 "dependencies" : {
1717 "@sparticuz/chromium" : " ^132.0.0" ,
18- "puppeteer-core" : " ^24.2.0"
18+ "puppeteer-core" : " ^24.2.0" ,
19+ "puppeteer-extra" : " ^3.3.6" ,
20+ "puppeteer-extra-plugin-stealth" : " ^2.11.2"
1921 },
2022 "devDependencies" : {
2123 "@eslint/js" : " ^9.12.0" ,
Original file line number Diff line number Diff line change 1- import type { Browser , LaunchOptions } from 'puppeteer-core'
2- import puppeteer from 'puppeteer-core'
1+ import type { Browser , PuppeteerLaunchOptions } from 'puppeteer-core'
2+ import puppeteer from 'puppeteer-extra'
3+ import StealthPlugin from 'puppeteer-extra-plugin-stealth'
4+
5+ // eslint-disable-next-line functional/no-expression-statements
6+ puppeteer . use ( StealthPlugin ( ) )
37
48export const Chromium = ( ( ) => {
5- const instances : WeakMap < LaunchOptions , Browser > = new WeakMap ( )
9+ const instances : WeakMap < PuppeteerLaunchOptions , Browser > = new WeakMap ( )
610
7- const createInstance = ( options : LaunchOptions ) => {
11+ const createInstance = ( options : PuppeteerLaunchOptions ) => {
812 // eslint-disable-next-line functional/no-expression-statements
913 console . log ( '&&&&&' , 'new chromium instanse will be created' )
1014 return puppeteer . launch ( options )
1115 }
1216
1317 return {
14- getInstance : async ( options : LaunchOptions ) => {
18+ getInstance : async ( options : PuppeteerLaunchOptions ) => {
1519 const fromCache = instances . get ( options )
1620 const instance = fromCache
1721 ? fromCache
You can’t perform that action at this time.
0 commit comments