1+ import { type Interfaces } from '@oclif/core' ;
12import { Flags , SfCommand , Ux } from '@salesforce/sf-plugins-core' ;
23import { promises } from 'fs' ;
34import { type Options } from 'p-retry' ;
@@ -130,16 +131,18 @@ export abstract class BrowserforceCommand<T> extends SfCommand<T> {
130131 }
131132}
132133
133- async function createBrowserContextFromFlags ( flags ) {
134+ type BrowserforceFlags = Interfaces . InferredFlags < typeof BrowserforceCommand . baseFlags > ;
135+
136+ async function createBrowserContextFromFlags ( flags : BrowserforceFlags ) {
134137 const browser = await chromium . launch ( {
135- ...( flags . channel
138+ ...( flags [ 'browser- channel' ]
136139 ? {
137- channel : flags . channel ,
140+ channel : flags [ 'browser- channel' ] ,
138141 }
139142 : { } ) ,
140- ...( flags [ 'executable-path' ]
143+ ...( flags [ 'browser- executable-path' ]
141144 ? {
142- executablePath : flags [ 'executable-path' ] ,
145+ executablePath : flags [ 'browser- executable-path' ] ,
143146 }
144147 : { } ) ,
145148 headless : flags . headless ,
@@ -159,7 +162,7 @@ async function createBrowserContextFromFlags(flags) {
159162 return browserContext ;
160163}
161164
162- function createRetryOptionsFromFlags ( flags ) : Options {
165+ function createRetryOptionsFromFlags ( flags : BrowserforceFlags ) : Options {
163166 return {
164167 retries : flags [ 'max-retries' ] ,
165168 minTimeout : flags [ 'retry-timeout' ] ,
0 commit comments