Skip to content

Commit

Permalink
[General] Remove proton from available repositories, because they don…
Browse files Browse the repository at this point in the history
…'t provide binaries (#8)

* Removed proton repository

* update version

* lint fix
  • Loading branch information
Nocccer authored Feb 18, 2022
1 parent 7f20c90 commit 66011b7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 33 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "heroic-wine-downloader",
"version": "1.2.2",
"version": "1.2.3",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
Expand Down
4 changes: 0 additions & 4 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ export const WINEGE_URL =
export const PROTONGE_URL =
'https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases'

/// Url to Proton github release page
export const PROTON_URL =
'https://api.github.com/repos/ValveSoftware/Proton/releases'

/// Url to Wine Lutris github release page
export const WINELUTRIS_URL =
'https://api.github.com/repos/lutris/wine/releases'
22 changes: 1 addition & 21 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ import {
statSync
} from 'graceful-fs'

import {
WINEGE_URL,
PROTONGE_URL,
PROTON_URL,
WINELUTRIS_URL
} from './constants'
import { WINEGE_URL, PROTONGE_URL, WINELUTRIS_URL } from './constants'
import { VersionInfo, Repositorys, State, ProgressInfo } from './types'
import {
downloadFile,
Expand Down Expand Up @@ -42,7 +37,6 @@ async function getAvailableVersions({
repositorys = [
Repositorys.WINEGE,
Repositorys.PROTONGE,
Repositorys.PROTON,
Repositorys.WINELUTRIS
],
count = 100
Expand Down Expand Up @@ -78,20 +72,6 @@ async function getAvailableVersions({
})
break
}
case Repositorys.PROTON: {
await fetchReleases({
url: PROTON_URL,
type: 'Proton',
count: count
})
.then((fetchedReleases: VersionInfo[]) => {
releases.push(...fetchedReleases)
})
.catch((error: Error) => {
throw error
})
break
}
case Repositorys.WINELUTRIS: {
await fetchReleases({
url: WINELUTRIS_URL,
Expand Down
8 changes: 1 addition & 7 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
/**
* Defines from where the version comes
*/
export type Type =
| 'Wine-GE'
| 'Proton-GE'
| 'Proton'
| 'Wine-Lutris'
| 'Wine-Kron4ek'
export type Type = 'Wine-GE' | 'Proton-GE' | 'Wine-Lutris' | 'Wine-Kron4ek'

/**
* Interface contains information about a version
Expand All @@ -33,7 +28,6 @@ export interface VersionInfo {
export enum Repositorys {
WINEGE,
PROTONGE,
PROTON,
WINELUTRIS
}

Expand Down

0 comments on commit 66011b7

Please sign in to comment.