mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
fix: fixing dependencies
This commit is contained in:
parent
cdd9908775
commit
db79136cf5
20 changed files with 2439 additions and 21400 deletions
|
@ -1,5 +1,6 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
semi: true,
|
semi: true,
|
||||||
trailingComma: "all",
|
trailingComma: "es5",
|
||||||
singleQuote: false,
|
singleQuote: false,
|
||||||
|
tabWidth: 2,
|
||||||
};
|
};
|
||||||
|
|
|
@ -39,13 +39,13 @@ const config: ForgeConfig = {
|
||||||
new MakerRpm({
|
new MakerRpm({
|
||||||
options: {
|
options: {
|
||||||
mimeType: ["x-scheme-handler/hydralauncher"],
|
mimeType: ["x-scheme-handler/hydralauncher"],
|
||||||
bin: './Hydra'
|
bin: "./Hydra",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
new MakerDeb({
|
new MakerDeb({
|
||||||
options: {
|
options: {
|
||||||
mimeType: ["x-scheme-handler/hydralauncher"],
|
mimeType: ["x-scheme-handler/hydralauncher"],
|
||||||
bin: './Hydra'
|
bin: "./Hydra",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
19174
package-lock.json
generated
19174
package-lock.json
generated
File diff suppressed because it is too large
Load diff
14
package.json
14
package.json
|
@ -16,7 +16,8 @@
|
||||||
"package": "electron-forge package",
|
"package": "electron-forge package",
|
||||||
"make": "electron-forge make",
|
"make": "electron-forge make",
|
||||||
"publish": "electron-forge publish",
|
"publish": "electron-forge publish",
|
||||||
"lint": "eslint ."
|
"lint": "eslint .",
|
||||||
|
"format": "prettier . --write"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@electron-forge/cli": "^7.3.0",
|
"@electron-forge/cli": "^7.3.0",
|
||||||
|
@ -43,6 +44,7 @@
|
||||||
"@typescript-eslint/parser": "^7.3.1",
|
"@typescript-eslint/parser": "^7.3.1",
|
||||||
"@vanilla-extract/webpack-plugin": "^2.3.7",
|
"@vanilla-extract/webpack-plugin": "^2.3.7",
|
||||||
"@vercel/webpack-asset-relocator-loader": "1.7.3",
|
"@vercel/webpack-asset-relocator-loader": "1.7.3",
|
||||||
|
"@vitejs/plugin-react-swc": "^3.6.0",
|
||||||
"css-loader": "^6.0.0",
|
"css-loader": "^6.0.0",
|
||||||
"dotenv-webpack": "^8.1.0",
|
"dotenv-webpack": "^8.1.0",
|
||||||
"electron": "29.1.4",
|
"electron": "29.1.4",
|
||||||
|
@ -52,25 +54,26 @@
|
||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
"fork-ts-checker-webpack-plugin": "^7.2.13",
|
"fork-ts-checker-webpack-plugin": "^7.2.13",
|
||||||
"node-loader": "^2.0.0",
|
"node-loader": "^2.0.0",
|
||||||
|
"prettier": "^3.2.5",
|
||||||
"style-loader": "^3.0.0",
|
"style-loader": "^3.0.0",
|
||||||
"ts-loader": "^9.2.2",
|
"ts-loader": "^9.2.2",
|
||||||
"ts-node": "^10.0.0",
|
"ts-node": "^10.0.0",
|
||||||
"tsconfig-paths": "^4.2.0",
|
"tsconfig-paths": "^4.2.0",
|
||||||
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
||||||
"typescript": "^5.4.3"
|
"typescript": "^5.4.3",
|
||||||
|
"vite-plugin-svgr": "^4.2.0",
|
||||||
|
"vite-tsconfig-paths": "^4.3.2"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/fira-mono": "^5.0.12",
|
"@fontsource/fira-mono": "^5.0.12",
|
||||||
"@fontsource/fira-sans": "^5.0.19",
|
"@fontsource/fira-sans": "^5.0.19",
|
||||||
"@msgpack/msgpack": "^3.0.0-beta2",
|
|
||||||
"@primer/octicons-react": "^19.8.0",
|
"@primer/octicons-react": "^19.8.0",
|
||||||
"@reduxjs/toolkit": "^2.2.2",
|
"@reduxjs/toolkit": "^2.2.2",
|
||||||
"@vanilla-extract/css": "^1.14.1",
|
"@vanilla-extract/css": "^1.14.1",
|
||||||
"@vanilla-extract/recipes": "^0.5.2",
|
"@vanilla-extract/recipes": "^0.5.2",
|
||||||
"@vanilla-extract/vite-plugin": "^4.0.6",
|
"@vanilla-extract/vite-plugin": "^4.0.6",
|
||||||
"@vitejs/plugin-react-swc": "^3.6.0",
|
|
||||||
"axios": "^1.6.8",
|
"axios": "^1.6.8",
|
||||||
"check-disk-space": "^3.4.0",
|
"check-disk-space": "^3.4.0",
|
||||||
"classnames": "^2.5.1",
|
"classnames": "^2.5.1",
|
||||||
|
@ -92,12 +95,9 @@
|
||||||
"react-redux": "^9.1.0",
|
"react-redux": "^9.1.0",
|
||||||
"react-router-dom": "^6.22.3",
|
"react-router-dom": "^6.22.3",
|
||||||
"sqlite3": "^5.1.7",
|
"sqlite3": "^5.1.7",
|
||||||
"systeminformation": "^5.22.3",
|
|
||||||
"typeorm": "^0.3.20",
|
"typeorm": "^0.3.20",
|
||||||
"update-electron-app": "^3.0.0",
|
"update-electron-app": "^3.0.0",
|
||||||
"uuid": "^9.0.1",
|
"uuid": "^9.0.1",
|
||||||
"vite-plugin-svgr": "^4.2.0",
|
|
||||||
"vite-tsconfig-paths": "^4.3.2",
|
|
||||||
"winston": "^3.12.0",
|
"winston": "^3.12.0",
|
||||||
"yaml": "^2.4.1"
|
"yaml": "^2.4.1"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
|
|
|
@ -109,4 +109,3 @@
|
||||||
"no_downloads": "Aucun téléchargement disponible"
|
"no_downloads": "Aucun téléchargement disponible"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ const openGame = async (
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!fs.existsSync(gamePath)) {
|
if (!fs.existsSync(gamePath)) {
|
||||||
await gameRepository.delete({ id: gameId, });
|
await gameRepository.delete({ id: gameId });
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,23 +15,30 @@ export const generateYML = (game: Game) => {
|
||||||
game: {
|
game: {
|
||||||
prefix: "$GAMEDIR",
|
prefix: "$GAMEDIR",
|
||||||
arch: "win64",
|
arch: "win64",
|
||||||
working_dir: "$GAMEDIR"
|
working_dir: "$GAMEDIR",
|
||||||
},
|
},
|
||||||
installer: [{
|
installer: [
|
||||||
task: {
|
{
|
||||||
name: "create_prefix",
|
task: {
|
||||||
arch: "win64",
|
name: "create_prefix",
|
||||||
prefix: "$GAMEDIR"
|
arch: "win64",
|
||||||
}
|
prefix: "$GAMEDIR",
|
||||||
}, {
|
},
|
||||||
task: {
|
},
|
||||||
executable: path.join(game.downloadPath, game.folderName, "setup.exe"),
|
{
|
||||||
name: "wineexec",
|
task: {
|
||||||
prefix: "$GAMEDIR"
|
executable: path.join(
|
||||||
}
|
game.downloadPath,
|
||||||
}]
|
game.folderName,
|
||||||
}
|
"setup.exe"
|
||||||
|
),
|
||||||
|
name: "wineexec",
|
||||||
|
prefix: "$GAMEDIR",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return doc.toString();
|
return doc.toString();
|
||||||
}
|
};
|
||||||
|
|
|
@ -19,11 +19,11 @@ export const getSteamDBAlgoliaCredentials = async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const js = await requestWebPage(
|
const js = await requestWebPage(
|
||||||
`https://steamdb.info/static/js/instantsearch.js?${searchParams.toString()}`,
|
`https://steamdb.info/static/js/instantsearch.js?${searchParams.toString()}`
|
||||||
);
|
);
|
||||||
|
|
||||||
const algoliaCredentialsRegExp = new RegExp(
|
const algoliaCredentialsRegExp = new RegExp(
|
||||||
/algoliasearch\("(.*?)",atob\("(.*?)"\)\);/,
|
/algoliasearch\("(.*?)",atob\("(.*?)"\)\);/
|
||||||
);
|
);
|
||||||
|
|
||||||
const [, applicationId, encodedApiKey] = algoliaCredentialsRegExp.exec(js);
|
const [, applicationId, encodedApiKey] = algoliaCredentialsRegExp.exec(js);
|
||||||
|
@ -35,7 +35,7 @@ export const getSteamDBAlgoliaCredentials = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const searchAlgolia = async <T>(
|
export const searchAlgolia = async <T>(
|
||||||
params: AlgoliaSearchParams,
|
params: AlgoliaSearchParams
|
||||||
): Promise<AlgoliaResponse<T>> => {
|
): Promise<AlgoliaResponse<T>> => {
|
||||||
const algoliaCredentials = stateManager.getValue("steamDBAlgoliaCredentials");
|
const algoliaCredentials = stateManager.getValue("steamDBAlgoliaCredentials");
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ export const searchAlgolia = async <T>(
|
||||||
}?${searchParams.toString()}`,
|
}?${searchParams.toString()}`,
|
||||||
{
|
{
|
||||||
headers: params.headers,
|
headers: params.headers,
|
||||||
},
|
}
|
||||||
)
|
)
|
||||||
.then((response) => response.data);
|
.then((response) => response.data);
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,14 +28,14 @@ export const searchHowLongToBeat = async (gameName: string) => {
|
||||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",
|
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",
|
||||||
Referer: "https://howlongtobeat.com/",
|
Referer: "https://howlongtobeat.com/",
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
return response.data as HowLongToBeatSearchResponse;
|
return response.data as HowLongToBeatSearchResponse;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getHowLongToBeatGame = async (
|
export const getHowLongToBeatGame = async (
|
||||||
id: string,
|
id: string
|
||||||
): Promise<HowLongToBeatCategory[]> => {
|
): Promise<HowLongToBeatCategory[]> => {
|
||||||
const response = await requestWebPage(`https://howlongtobeat.com/game/${id}`);
|
const response = await requestWebPage(`https://howlongtobeat.com/game/${id}`);
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ export function App() {
|
||||||
}
|
}
|
||||||
|
|
||||||
addPacket(downloadProgress);
|
addPacket(downloadProgress);
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
@ -77,7 +77,7 @@ export function App() {
|
||||||
replace: location.pathname.startsWith("/search"),
|
replace: location.pathname.startsWith("/search"),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
[dispatch, location.pathname, navigate],
|
[dispatch, location.pathname, navigate]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleClear = useCallback(() => {
|
const handleClear = useCallback(() => {
|
||||||
|
|
|
@ -39,7 +39,7 @@ export function Downloads() {
|
||||||
}, [library]);
|
}, [library]);
|
||||||
|
|
||||||
const openGame = (gameId: number) =>
|
const openGame = (gameId: number) =>
|
||||||
window.electron.openGame(gameId).then(isBinaryInPath => {
|
window.electron.openGame(gameId).then((isBinaryInPath) => {
|
||||||
if (!isBinaryInPath) setShowBinaryNotFoundModal(true);
|
if (!isBinaryInPath) setShowBinaryNotFoundModal(true);
|
||||||
updateLibrary();
|
updateLibrary();
|
||||||
});
|
});
|
||||||
|
@ -205,7 +205,10 @@ export function Downloads() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className={styles.downloadsContainer}>
|
<section className={styles.downloadsContainer}>
|
||||||
<BinaryNotFoundModal visible={showBinaryNotFoundModal} onClose={() => setShowBinaryNotFoundModal(false)} />
|
<BinaryNotFoundModal
|
||||||
|
visible={showBinaryNotFoundModal}
|
||||||
|
onClose={() => setShowBinaryNotFoundModal(false)}
|
||||||
|
/>
|
||||||
<TextField placeholder={t("filter")} onChange={handleFilter} />
|
<TextField placeholder={t("filter")} onChange={handleFilter} />
|
||||||
|
|
||||||
<ul className={styles.downloads}>
|
<ul className={styles.downloads}>
|
||||||
|
|
|
@ -104,12 +104,12 @@ export function GameDetails() {
|
||||||
shop,
|
shop,
|
||||||
encodeURIComponent(gameDetails?.name),
|
encodeURIComponent(gameDetails?.name),
|
||||||
i18n.language,
|
i18n.language,
|
||||||
]),
|
])
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
navigator.clipboard.writeText(
|
navigator.clipboard.writeText(
|
||||||
OPEN_HYDRA_URL + `/?${searchParams.toString()}`,
|
OPEN_HYDRA_URL + `/?${searchParams.toString()}`
|
||||||
);
|
);
|
||||||
|
|
||||||
const zero = performance.now();
|
const zero = performance.now();
|
||||||
|
@ -135,7 +135,7 @@ export function GameDetails() {
|
||||||
repackId,
|
repackId,
|
||||||
gameDetails.objectID,
|
gameDetails.objectID,
|
||||||
gameDetails.name,
|
gameDetails.name,
|
||||||
shop as GameShop,
|
shop as GameShop
|
||||||
).then(() => {
|
).then(() => {
|
||||||
getGame();
|
getGame();
|
||||||
setShowRepacksModal(false);
|
setShowRepacksModal(false);
|
||||||
|
|
|
@ -49,7 +49,7 @@ export function HeroPanel({
|
||||||
const isGameDownloading = isDownloading && gameDownloading?.id === game?.id;
|
const isGameDownloading = isDownloading && gameDownloading?.id === game?.id;
|
||||||
|
|
||||||
const openGame = (gameId: number) =>
|
const openGame = (gameId: number) =>
|
||||||
window.electron.openGame(gameId).then(isBinaryInPath => {
|
window.electron.openGame(gameId).then((isBinaryInPath) => {
|
||||||
if (!isBinaryInPath) setShowBinaryNotFoundModal(true);
|
if (!isBinaryInPath) setShowBinaryNotFoundModal(true);
|
||||||
updateLibrary();
|
updateLibrary();
|
||||||
});
|
});
|
||||||
|
@ -206,7 +206,10 @@ export function HeroPanel({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ backgroundColor: color }} className={styles.panel}>
|
<div style={{ backgroundColor: color }} className={styles.panel}>
|
||||||
<BinaryNotFoundModal visible={showBinaryNotFoundModal} onClose={() => setShowBinaryNotFoundModal(false)} />
|
<BinaryNotFoundModal
|
||||||
|
visible={showBinaryNotFoundModal}
|
||||||
|
onClose={() => setShowBinaryNotFoundModal(false)}
|
||||||
|
/>
|
||||||
<div className={styles.content}>{getInfo()}</div>
|
<div className={styles.content}>{getInfo()}</div>
|
||||||
<div className={styles.actions}>{getActions()}</div>
|
<div className={styles.actions}>{getActions()}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -56,8 +56,8 @@ export function RepacksModal({
|
||||||
gameDetails.repacks.filter((repack) =>
|
gameDetails.repacks.filter((repack) =>
|
||||||
repack.title
|
repack.title
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(event.target.value.toLocaleLowerCase()),
|
.includes(event.target.value.toLocaleLowerCase())
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Modal } from "@renderer/components"
|
import { Modal } from "@renderer/components";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
interface BinaryNotFoundModalProps {
|
interface BinaryNotFoundModalProps {
|
||||||
|
@ -8,7 +8,7 @@ interface BinaryNotFoundModalProps {
|
||||||
|
|
||||||
export const BinaryNotFoundModal = ({
|
export const BinaryNotFoundModal = ({
|
||||||
visible,
|
visible,
|
||||||
onClose
|
onClose,
|
||||||
}: BinaryNotFoundModalProps) => {
|
}: BinaryNotFoundModalProps) => {
|
||||||
const { t } = useTranslation("binary_not_found_modal");
|
const { t } = useTranslation("binary_not_found_modal");
|
||||||
|
|
||||||
|
@ -21,5 +21,5 @@ export const BinaryNotFoundModal = ({
|
||||||
>
|
>
|
||||||
{t("instructions")}
|
{t("instructions")}
|
||||||
</Modal>
|
</Modal>
|
||||||
)
|
);
|
||||||
}
|
};
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
import type { ModuleOptions } from 'webpack';
|
import type { ModuleOptions } from "webpack";
|
||||||
|
|
||||||
export const rules: Required<ModuleOptions>['rules'] = [
|
export const rules: Required<ModuleOptions>["rules"] = [
|
||||||
// Add support for native node modules
|
// Add support for native node modules
|
||||||
{
|
{
|
||||||
// We're specifying native_modules in the test because the asset relocator loader generates a
|
// We're specifying native_modules in the test because the asset relocator loader generates a
|
||||||
// "fake" .node file which is really a cjs file.
|
// "fake" .node file which is really a cjs file.
|
||||||
test: /native_modules[/\\].+\.node$/,
|
test: /native_modules[/\\].+\.node$/,
|
||||||
use: 'node-loader',
|
use: "node-loader",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /[/\\]node_modules[/\\].+\.(m?js|node)$/,
|
test: /[/\\]node_modules[/\\].+\.(m?js|node)$/,
|
||||||
parser: { amd: false },
|
parser: { amd: false },
|
||||||
use: {
|
use: {
|
||||||
loader: '@vercel/webpack-asset-relocator-loader',
|
loader: "@vercel/webpack-asset-relocator-loader",
|
||||||
options: {
|
options: {
|
||||||
outputAssetBase: 'native_modules',
|
outputAssetBase: "native_modules",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -22,7 +22,7 @@ export const rules: Required<ModuleOptions>['rules'] = [
|
||||||
test: /\.tsx?$/,
|
test: /\.tsx?$/,
|
||||||
exclude: /(node_modules|\.webpack)/,
|
exclude: /(node_modules|\.webpack)/,
|
||||||
use: {
|
use: {
|
||||||
loader: 'ts-loader',
|
loader: "ts-loader",
|
||||||
options: {
|
options: {
|
||||||
transpileOnly: true,
|
transpileOnly: true,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue