Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/main/services/AutoUpdaterService.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { autoUpdater } from 'electron-updater';
import { dialog, shell, type BrowserWindow } from 'electron';
import { log } from '@shared/utils/logger';
import { getVersion } from '@shared/utils/version';

export class AutoUpdaterService {
private mainWindow: BrowserWindow | null = null;
private updateCheckInProgress = false;
private updateDownloaded = false;
private readonly updateCheckInProgress = false;
private readonly updateDownloaded = false;
private readonly repoOwner = 'miwi-fbsd';
private readonly repoName = 'CCTracker';
private lastManualCheckTime = 0;
Expand Down Expand Up @@ -46,9 +45,9 @@
/**
* Download and install update (disabled - manual only)
*/
async downloadAndInstallUpdate(): Promise<void> {
downloadAndInstallUpdate(): Promise<void> {
log.info('Auto-download disabled - please use manual update check', 'AutoUpdater');
throw new Error('Automatic downloads disabled. Please use manual update check.');
return Promise.reject(new Error('Automatic downloads disabled. Please use manual update check.'));
}

/**
Expand Down Expand Up @@ -104,7 +103,7 @@
log.info('Checking for updates manually via GitHub API', 'AutoUpdater');
const latestRelease = await this.fetchLatestRelease();

if (!latestRelease) {

Check warning on line 106 in src/main/services/AutoUpdaterService.ts

View workflow job for this annotation

GitHub Actions / Code Quality & Tests

Unexpected any value in conditional. An explicit comparison or type conversion is required
log.info('No release information available', 'AutoUpdater');
return false;
}
Expand Down Expand Up @@ -133,7 +132,7 @@
/**
* Fetch latest release from GitHub API
*/
private async fetchLatestRelease(): Promise<any> {

Check warning on line 135 in src/main/services/AutoUpdaterService.ts

View workflow job for this annotation

GitHub Actions / Code Quality & Tests

Unexpected any. Specify a different type
const url = `https://api.github.com/repos/${this.repoOwner}/${this.repoName}/releases/latest`;

try {
Expand Down Expand Up @@ -171,7 +170,7 @@
/**
* Show manual update dialog when update is available
*/
private async showManualUpdateDialog(release: any): Promise<void> {

Check warning on line 173 in src/main/services/AutoUpdaterService.ts

View workflow job for this annotation

GitHub Actions / Code Quality & Tests

Unexpected any. Specify a different type
if (!this.mainWindow || this.mainWindow.isDestroyed()) {
return;
}
Expand Down
Loading