mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
update tracking
This commit is contained in:
parent
57628ec244
commit
00f10c283e
1 changed files with 3 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ import { createDecorator } from '../../instantiation/common/instantiation.js';
|
|||
import { ProxyChannel } from '../../../base/parts/ipc/common/ipc.js';
|
||||
import { IMainProcessService } from '../../ipc/common/mainProcessService.js';
|
||||
import { InstantiationType, registerSingleton } from '../../instantiation/common/extensions.js';
|
||||
import { IMetricsService } from './metricsService.js';
|
||||
|
||||
|
||||
|
||||
|
|
@ -27,16 +28,17 @@ export class VoidUpdateService implements IVoidUpdateService {
|
|||
|
||||
constructor(
|
||||
@IMainProcessService mainProcessService: IMainProcessService, // (only usable on client side)
|
||||
@IMetricsService private readonly metricsService: IMetricsService,
|
||||
) {
|
||||
// creates an IPC proxy to use metricsMainService.ts
|
||||
this.voidUpdateService = ProxyChannel.toService<IVoidUpdateService>(mainProcessService.getChannel('void-channel-update'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// anything transmitted over a channel must be async even if it looks like it doesn't have to be
|
||||
check: IVoidUpdateService['check'] = async () => {
|
||||
const res = await this.voidUpdateService.check()
|
||||
this.metricsService.capture('Check for Updates', { ...res })
|
||||
return res
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue