@@ -25,6 +25,7 @@ type CreateAppFixtureOptions = {
2525 bundler ?: 'vite' | 'rsbuild'
2626 packageManager ?: 'pnpm' | 'npm' | 'yarn' | 'bun' | 'deno'
2727 blank ?: boolean
28+ toolchain ?: string
2829 deployment ?: string
2930 routerOnly ?: boolean
3031 template ?: string
@@ -139,7 +140,9 @@ function waitForDevServerURL(getStdout: () => string, timeoutMs = 90_000) {
139140 }
140141
141142 if ( Date . now ( ) - started > timeoutMs ) {
142- rejectPromise ( new Error ( 'Timed out waiting for dev server URL in output' ) )
143+ rejectPromise (
144+ new Error ( 'Timed out waiting for dev server URL in output' ) ,
145+ )
143146 return
144147 }
145148
@@ -353,15 +356,20 @@ export async function createAppFixture(
353356 }
354357
355358 const totalMs = now ( ) - start
356- const summary = timings . map ( ( [ label , ms ] ) => `${ label } =${ Math . round ( ms ) } ms` ) . join ( ' | ' )
357- console . log ( `[e2e:timing] ${ options . appName } :: ${ summary } | total=${ Math . round ( totalMs ) } ms` )
359+ const summary = timings
360+ . map ( ( [ label , ms ] ) => `${ label } =${ Math . round ( ms ) } ms` )
361+ . join ( ' | ' )
362+ console . log (
363+ `[e2e:timing] ${ options . appName } :: ${ summary } | total=${ Math . round ( totalMs ) } ms` ,
364+ )
358365 }
359366
360367 const rootDir = await mkdtemp ( join ( tmpdir ( ) , 'tanstack-cli-e2e-' ) )
361368 const {
362369 appName,
363370 blank = false ,
364371 deployment,
372+ toolchain,
365373 template,
366374 addOns,
367375 afterCreate,
@@ -399,6 +407,10 @@ export async function createAppFixture(
399407 createArgs . push ( '--blank' , '--yes' , '--no-intent' )
400408 }
401409
410+ if ( toolchain ) {
411+ createArgs . push ( '--toolchain' , toolchain )
412+ }
413+
402414 if ( deployment ) {
403415 createArgs . push ( '--deployment' , deployment )
404416 }
@@ -413,16 +425,12 @@ export async function createAppFixture(
413425
414426 try {
415427 const createStartedAt = now ( )
416- await runCommand (
417- process . execPath ,
418- createArgs ,
419- {
420- cwd : rootDir ,
421- env : {
422- CI : '1' ,
423- } ,
428+ await runCommand ( process . execPath , createArgs , {
429+ cwd : rootDir ,
430+ env : {
431+ CI : '1' ,
424432 } ,
425- )
433+ } )
426434 mark ( 'create' , createStartedAt )
427435
428436 await afterCreate ?.( appDir )
@@ -431,12 +439,16 @@ export async function createAppFixture(
431439
432440 if ( postCreateAddOns ?. length ) {
433441 const postAddOnsStartedAt = now ( )
434- await runCommand ( process . execPath , [ cliDistPath , 'add' , ...postCreateAddOns , '--forced' ] , {
435- cwd : appDir ,
436- env : {
437- CI : '1' ,
442+ await runCommand (
443+ process . execPath ,
444+ [ cliDistPath , 'add' , ...postCreateAddOns , '--forced' ] ,
445+ {
446+ cwd : appDir ,
447+ env : {
448+ CI : '1' ,
449+ } ,
438450 } ,
439- } )
451+ )
440452
441453 mark ( 'post-add-ons' , postAddOnsStartedAt )
442454
@@ -565,7 +577,10 @@ export function attachRuntimeGuards(page: Page, appUrl: string): RuntimeGuards {
565577 }
566578 const errorText = request . failure ( ) ?. errorText || 'unknown error'
567579
568- if ( errorText . includes ( 'ERR_ABORTED' ) || isBlockedByClientError ( errorText ) ) {
580+ if (
581+ errorText . includes ( 'ERR_ABORTED' ) ||
582+ isBlockedByClientError ( errorText )
583+ ) {
569584 return
570585 }
571586
0 commit comments