UNPKG

@auto-browse/auto-browse

Version:
28 lines (27 loc) 846 B
/** * Configuration types and utilities for auto-browse-ts * Adapted from playwright-mcp to work with session manager */ import path from 'path'; export async function outputFile(config, filename) { // Create a downloads directory in the current working directory const downloadsDir = path.join(process.cwd(), 'downloads'); // Ensure the directory exists const fs = await import('fs'); await fs.promises.mkdir(downloadsDir, { recursive: true }); return path.join(downloadsDir, filename); } // Default configuration for auto-browse-ts export const defaultConfig = { browser: { browserName: 'chromium', launchOptions: { headless: false, channel: 'chrome' }, contextOptions: {}, isolated: false }, imageResponses: 'auto', saveTrace: false };