11// Build script to handle Turborepo build execution 
22const  {  spawnProcess }  =  require ( "../utils/spawn-process" ) ; 
3- const  path  =  require ( "path" ) ; 
3+ const  path  =  require ( "node: path" ) ; 
44
55const  runTurbo  =  async  ( task ,  args ,  {  apiSecret,  apiEndpoint,  apiSignatureKey }  =  { } )  =>  { 
6-   const  command  =  [ "turbo" ,  "run" ,  task ,  "--concurrency=100%" ,  "--output-logs=errors-only" ] ; 
6+   const  devConfig  =  ( ( )  =>  { 
7+     try  { 
8+       return  require ( "../../turbo.dev.json" ) ; 
9+     }  catch  ( e )  { 
10+       return  { } ; 
11+     } 
12+   } ) ( ) ; 
13+   const  execArguments  =  [ 
14+     "turbo" , 
15+     "run" , 
16+     task , 
17+     `--concurrency=${ devConfig . concurrency  ??  "100%" }  ` , 
18+     `--output-logs=${ devConfig . outputLogs  ??  "errors-only" }  ` , 
19+   ] ; 
720
821  const  cacheReadWriteKey  =  process . env . AWS_JSV3_TURBO_CACHE_BUILD_TYPE  ??  "dev" ; 
922
@@ -17,8 +30,8 @@ const runTurbo = async (task, args, { apiSecret, apiEndpoint, apiSignatureKey }
1730    dev : "--cache=local:rw,remote:r" , 
1831  } ; 
1932
20-   command . push ( cacheReadWrite [ cacheReadWriteKey ] ) ; 
21-   command . push ( ...args ) ; 
33+   execArguments . push ( cacheReadWrite [ cacheReadWriteKey ] ) ; 
34+   execArguments . push ( ...args ) ; 
2235
2336  const  turboRoot  =  path . join ( __dirname ,  ".." ,  ".." ) ; 
2437
@@ -36,7 +49,8 @@ const runTurbo = async (task, args, { apiSecret, apiEndpoint, apiSignatureKey }
3649  } ; 
3750
3851  try  { 
39-     return  await  spawnProcess ( "yarn" ,  command ,  { 
52+     console . log ( "RUNNING: yarn" ,  execArguments . join ( " " ) ) ; 
53+     return  await  spawnProcess ( "yarn" ,  execArguments ,  { 
4054      stdio : "inherit" , 
4155      cwd : turboRoot , 
4256      env : turboEnv , 
0 commit comments