mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-08 11:56:36 +00:00
Fix version retrieval in node process (#837)
This commit is contained in:
parent
5ab3a747a6
commit
9ecff86bbe
@ -1,5 +1,4 @@
|
||||
import { inject, injectable, postConstruct } from 'inversify';
|
||||
import { app } from 'electron';
|
||||
import { ILogger } from '@theia/core/lib/common/logger';
|
||||
import { MaybePromise } from '@theia/core/lib/common/types';
|
||||
import { ConfigServiceImpl } from './config-service-impl';
|
||||
@ -71,10 +70,11 @@ export abstract class GrpcClientProvider<C> {
|
||||
protected abstract close(client: C): void;
|
||||
|
||||
protected get channelOptions(): Record<string, unknown> {
|
||||
const pjson = require('../../package.json') || { "version": "0.0.0" }
|
||||
return {
|
||||
'grpc.max_send_message_length': 512 * 1024 * 1024,
|
||||
'grpc.max_receive_message_length': 512 * 1024 * 1024,
|
||||
'grpc.primary_user_agent': `arduino-ide/${app.getVersion()}`
|
||||
'grpc.primary_user_agent': `arduino-ide/${pjson.version}`
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user