@@ -44,7 +44,7 @@ export type PluginApi = {
4444 extraSources : string [ ] ;
4545 ignorePaths : string [ ] ;
4646 } ;
47- getBundlerStart : ( ) => ( { args : any } ) => Promise < void > ;
47+ getBundlerStart : ( ) => ( { args } : { args : any } ) => void ;
4848} ;
4949
5050type PluginType = ( args : PluginApi ) => PluginOutput ;
@@ -85,7 +85,7 @@ export type ConfigType = {
8585 plugins ?: PluginType [ ] ;
8686 platforms ?: Record < string , PlatformType > ;
8787 commands ?: Array < CommandType > ;
88- remoteCacheProvider ?: null | 'github-actions' | ( ( ) => RemoteBuildCache ) ;
88+ remoteCacheProvider ?: null | 'github-actions' | ( ( ) => RemoteBuildCache ) ;
8989 fingerprint ?: {
9090 extraSources ?: string [ ] ;
9191 ignorePaths ?: string [ ] ;
@@ -175,6 +175,8 @@ export async function getConfig(
175175 process . exit ( 1 ) ;
176176 }
177177
178+ let bundler : BundlerPluginOutput | undefined ;
179+
178180 const api = {
179181 registerCommand : ( command : CommandType ) => {
180182 validatedConfig . commands = [ ...( validatedConfig . commands || [ ] ) , command ] ;
@@ -200,21 +202,21 @@ export async function getConfig(
200202 } ,
201203 getBundlerStart :
202204 ( ) =>
203- ( { args : any } ) =>
204- bundler ?. start ( {
205+ ( { args } : { args : any } ) => {
206+ return bundler ?. start ( {
205207 root : api . getProjectRoot ( ) ,
206208 args,
207209 reactNativeVersion : api . getReactNativeVersion ( ) ,
208210 reactNativePath : api . getReactNativePath ( ) ,
209211 platforms : api . getPlatforms ( ) ,
210- } ) ,
212+ } ) ;
213+ } ,
211214 } ;
212215
213216 const platforms : Record < string , PlatformOutput > = { } ;
214217 if ( validatedConfig . platforms ) {
215218 // platforms register commands and custom platform functionality (TBD)
216219 for ( const platform in validatedConfig . platforms ) {
217- // @ts -expect-error tbd
218220 const platformOutput = validatedConfig . platforms [ platform ] ( api ) ;
219221 platforms [ platform ] = platformOutput ;
220222 }
@@ -231,7 +233,6 @@ export async function getConfig(
231233 // @ts -expect-error tbd
232234 bundler = assignOriginToCommand (
233235 validatedConfig . bundler ,
234- // @ts -expect-error tbd
235236 api ,
236237 validatedConfig
237238 ) ;
@@ -249,6 +250,8 @@ export async function getConfig(
249250 root : projectRoot ,
250251 commands : validatedConfig . commands ?? [ ] ,
251252 platforms : platforms ?? { } ,
253+ // @ts -expect-error tbd
254+ bundler,
252255 ...api ,
253256 } ;
254257
0 commit comments