File tree Expand file tree Collapse file tree 4 files changed +15
-1
lines changed
Expand file tree Collapse file tree 4 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @heymp/scratchpad " : patch
3+ ---
4+
5+ Add bypassCSP flag to run command.
6+
7+ Example:
8+
9+ ``` bash
10+ scratchpad run test.ts --bypassCSP
11+ ```
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ export async function browser(processor: Processor) {
3333 } ) ;
3434 const context = await browser . newContext ( {
3535 storageState : processor . opts . login ? await getSession ( '.scratchpad/login.json' ) : undefined ,
36+ bypassCSP : processor . opts . bypassCSP ,
3637 } ) ;
3738 const page = await context . newPage ( ) ;
3839 const playwrightConfig = processor . opts . playwright ;
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export type Config = {
1616 url ?: string ;
1717 login ?: boolean ;
1818 rerouteDir ?: string ;
19+ bypassCSP ?: boolean ;
1920 playwright ?: ( page : PlaywrightConfig ) => Promise < void >
2021}
2122
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ export const runCommand = new Command('run')
2323 playwright : opts [ 'playwright' ] ,
2424 login : ! ! opts [ 'login' ] ,
2525 rerouteDir : opts [ 'rerouteDir' ] ,
26- file
26+ bypassCSP : opts [ 'bypassCSP' ] ,
27+ file : file
2728 } ) ;
2829 browser ( processor ) ;
2930 } ) ;
You can’t perform that action at this time.
0 commit comments