File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed 
arduino-ide-extension/src/node Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11import  {  inject ,  injectable ,  postConstruct  }  from  'inversify' ; 
2- import  {  app  }  from  'electron' ; 
32import  {  ILogger  }  from  '@theia/core/lib/common/logger' ; 
43import  {  MaybePromise  }  from  '@theia/core/lib/common/types' ; 
54import  {  ConfigServiceImpl  }  from  './config-service-impl' ; 
@@ -71,10 +70,11 @@ export abstract class GrpcClientProvider<C> {
7170  protected  abstract  close ( client : C ) : void ; 
7271
7372  protected  get  channelOptions ( ) : Record < string ,  unknown >  { 
73+     const  pjson  =  require ( '../../package.json' )  ||  {  "version" : "0.0.0"  } 
7474    return  { 
7575      'grpc.max_send_message_length' : 512  *  1024  *  1024 , 
7676      'grpc.max_receive_message_length' : 512  *  1024  *  1024 , 
77-       'grpc.primary_user_agent' : `arduino-ide/${ app . getVersion ( ) }  ` 
77+       'grpc.primary_user_agent' : `arduino-ide/${ pjson . version }  ` 
7878    } ; 
7979  } 
8080} 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments