Loading src/apis/mbin.api.ts +2 −1 Original line number Diff line number Diff line import puppeteer, { Browser } from "puppeteer"; import { IMessage, ServiceAPI } from "./abstract.api"; import { Software } from ".."; import { useHeadless } from "../const"; export interface IMbinNotification { id: string; Loading @@ -19,7 +20,7 @@ export class MBinAPI implements ServiceAPI<IMbinNotification> { } this.browser = await puppeteer.launch({ headless: !!process.env.TESTKIT_HEADFUL, headless: useHeadless, }); const page = await this.browser.newPage(); Loading src/const.ts +5 −0 Original line number Diff line number Diff line export const SOFTWARES = ["MASTODON", "LEMMY", "PIEFED", "MBIN"] as const; export type SOFTWARES = (typeof SOFTWARES)[number]; const testkit_headful = process.env.TESTKIT_HEADFUL; export const useHeadless = testkit_headful ? testkit_headful.toLowerCase() !== "true" && testkit_headful !== "1" : true; Loading
src/apis/mbin.api.ts +2 −1 Original line number Diff line number Diff line import puppeteer, { Browser } from "puppeteer"; import { IMessage, ServiceAPI } from "./abstract.api"; import { Software } from ".."; import { useHeadless } from "../const"; export interface IMbinNotification { id: string; Loading @@ -19,7 +20,7 @@ export class MBinAPI implements ServiceAPI<IMbinNotification> { } this.browser = await puppeteer.launch({ headless: !!process.env.TESTKIT_HEADFUL, headless: useHeadless, }); const page = await this.browser.newPage(); Loading
src/const.ts +5 −0 Original line number Diff line number Diff line export const SOFTWARES = ["MASTODON", "LEMMY", "PIEFED", "MBIN"] as const; export type SOFTWARES = (typeof SOFTWARES)[number]; const testkit_headful = process.env.TESTKIT_HEADFUL; export const useHeadless = testkit_headful ? testkit_headful.toLowerCase() !== "true" && testkit_headful !== "1" : true;