mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2026-02-01 20:23:38 +00:00
feat(cli): set outputDir via cli options (#338)
This commit is contained in:
@@ -36,6 +36,7 @@ export type CLIOptions = {
|
||||
host?: string;
|
||||
vision?: boolean;
|
||||
config?: string;
|
||||
outputDir?: string;
|
||||
};
|
||||
|
||||
const defaultConfig: Config = {
|
||||
@@ -110,6 +111,7 @@ export async function configFromCLIOptions(cliOptions: CLIOptions): Promise<Conf
|
||||
},
|
||||
capabilities: cliOptions.caps?.split(',').map((c: string) => c.trim() as ToolCapability),
|
||||
vision: !!cliOptions.vision,
|
||||
outputDir: cliOptions.outputDir,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ program
|
||||
.option('--port <port>', 'Port to listen on for SSE transport.')
|
||||
.option('--host <host>', 'Host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.')
|
||||
.option('--vision', 'Run server that uses screenshots (Aria snapshots are used by default)')
|
||||
.option('--output-dir <path>', 'Path to the directory for output files.')
|
||||
.option('--config <path>', 'Path to the configuration file.')
|
||||
.action(async options => {
|
||||
const config = await resolveConfig(options);
|
||||
|
||||
Reference in New Issue
Block a user