fix: fixing dependencies

This commit is contained in:
Hydra 2024-04-15 10:18:24 +01:00
parent cdd9908775
commit db79136cf5
No known key found for this signature in database
20 changed files with 2439 additions and 21400 deletions

View file

@ -1,5 +1,6 @@
module.exports = { module.exports = {
semi: true, semi: true,
trailingComma: "all", trailingComma: "es5",
singleQuote: false, singleQuote: false,
tabWidth: 2,
}; };

View file

@ -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

File diff suppressed because it is too large Load diff

View file

@ -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"
} }

View file

@ -1,4 +1,4 @@
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />

View file

@ -1,119 +1,119 @@
{ {
"catalogue": { "catalogue": {
"featured": "Destacado", "featured": "Destacado",
"recently_added": "Recién Añadidos", "recently_added": "Recién Añadidos",
"trending": "Tendencias", "trending": "Tendencias",
"surprise_me": "✨ ¡Sorpréndeme!" "surprise_me": "✨ ¡Sorpréndeme!"
}, },
"sidebar": { "sidebar": {
"catalogue": "Catálogo", "catalogue": "Catálogo",
"downloads": "Descargas", "downloads": "Descargas",
"settings": "Ajustes", "settings": "Ajustes",
"my_library": "Mi biblioteca", "my_library": "Mi biblioteca",
"downloading_metadata": "{{title}} (Descargando metadatos…)", "downloading_metadata": "{{title}} (Descargando metadatos…)",
"checking_files": "{{title}} ({{percentage}} - Analizando archivos…)", "checking_files": "{{title}} ({{percentage}} - Analizando archivos…)",
"paused": "{{title}} (Pausado)", "paused": "{{title}} (Pausado)",
"downloading": "{{title}} ({{percentage}} - Descargando…)", "downloading": "{{title}} ({{percentage}} - Descargando…)",
"filter": "Filtrar biblioteca" "filter": "Filtrar biblioteca"
}, },
"header": { "header": {
"search": "Buscar", "search": "Buscar",
"catalogue": "Catálogo", "catalogue": "Catálogo",
"downloads": "Descargas", "downloads": "Descargas",
"search_results": "Resultados de búsqueda", "search_results": "Resultados de búsqueda",
"settings": "Ajustes" "settings": "Ajustes"
}, },
"bottom_panel": { "bottom_panel": {
"no_downloads_in_progress": "Sin descargas en progreso", "no_downloads_in_progress": "Sin descargas en progreso",
"downloading_metadata": "Descargando metadatos de {{title}}…", "downloading_metadata": "Descargando metadatos de {{title}}…",
"checking_files": "Analizando archivos de {{title}} - ({{percentage}} completado)", "checking_files": "Analizando archivos de {{title}} - ({{percentage}} completado)",
"downloading": "Descargando {{title}}… ({{percentage}} completado) - Finalizando {{eta}} - {{speed}}", "downloading": "Descargando {{title}}… ({{percentage}} completado) - Finalizando {{eta}} - {{speed}}",
"deleting": "Eliminando archivos…" "deleting": "Eliminando archivos…"
}, },
"game_details": { "game_details": {
"open_download_options": "Ver opciones de descargas", "open_download_options": "Ver opciones de descargas",
"download_options_zero": "No hay opciones de descargas disponibles", "download_options_zero": "No hay opciones de descargas disponibles",
"download_options_one": "{{count}} opción de descarga", "download_options_one": "{{count}} opción de descarga",
"download_options_other": "{{count}} opciones de descargas", "download_options_other": "{{count}} opciones de descargas",
"updated_at": "Actualizado el {{updated_at}}", "updated_at": "Actualizado el {{updated_at}}",
"launch": "Iniciar", "launch": "Iniciar",
"resume": "Continuar", "resume": "Continuar",
"pause": "Pausa", "pause": "Pausa",
"cancel": "Cancelar", "cancel": "Cancelar",
"remove": "Eliminar", "remove": "Eliminar",
"space_left_on_disk": "{{space}} restantes en el disco", "space_left_on_disk": "{{space}} restantes en el disco",
"eta": "Finalizando {{eta}}", "eta": "Finalizando {{eta}}",
"downloading_metadata": "Descargando metadatos…", "downloading_metadata": "Descargando metadatos…",
"checking_files": "Analizando archivos…", "checking_files": "Analizando archivos…",
"filter": "Filtrar repacks", "filter": "Filtrar repacks",
"requirements": "Requisitos del Sistema", "requirements": "Requisitos del Sistema",
"minimum": "Mínimos", "minimum": "Mínimos",
"recommended": "Recomendados", "recommended": "Recomendados",
"no_minimum_requirements": "Sin requisitos mínimos para {{title}}", "no_minimum_requirements": "Sin requisitos mínimos para {{title}}",
"no_recommended_requirements": "{{title}} no tiene requisitos recomendados", "no_recommended_requirements": "{{title}} no tiene requisitos recomendados",
"paused_progress": "{{progress}} (Pausado)", "paused_progress": "{{progress}} (Pausado)",
"deleting": "Eliminando archivos…", "deleting": "Eliminando archivos…",
"delete": "Eliminar todos los archivos", "delete": "Eliminar todos los archivos",
"release_date": "Fecha de lanzamiento {{date}}", "release_date": "Fecha de lanzamiento {{date}}",
"publisher": "Publicado por {{publisher}}", "publisher": "Publicado por {{publisher}}",
"copy_link_to_clipboard": "Copiar enlace", "copy_link_to_clipboard": "Copiar enlace",
"copied_link_to_clipboard": "Enlace copiado", "copied_link_to_clipboard": "Enlace copiado",
"hours": "horas", "hours": "horas",
"minutes": "minutos", "minutes": "minutos",
"accuracy": "{{accuracy}}% precisión" "accuracy": "{{accuracy}}% precisión"
}, },
"activation": { "activation": {
"title": "Activar Hydra", "title": "Activar Hydra",
"installation_id": "ID de la Instalación:", "installation_id": "ID de la Instalación:",
"enter_activation_code": "Introduce tu código de activación", "enter_activation_code": "Introduce tu código de activación",
"message": "Si no sabes donde obtener el código, no deberías de tener esto.", "message": "Si no sabes donde obtener el código, no deberías de tener esto.",
"activate": "Activar", "activate": "Activar",
"loading": "Cargando…" "loading": "Cargando…"
}, },
"downloads": { "downloads": {
"launch": "Iniciar", "launch": "Iniciar",
"resume": "Resumir", "resume": "Resumir",
"pause": "Pausa", "pause": "Pausa",
"eta": "Finalizando {{eta}}", "eta": "Finalizando {{eta}}",
"paused": "En Pausa", "paused": "En Pausa",
"verifying": "Verificando…", "verifying": "Verificando…",
"completed_at": "Completado el {{date}}", "completed_at": "Completado el {{date}}",
"completed": "Completado", "completed": "Completado",
"cancelled": "Cancelado", "cancelled": "Cancelado",
"download_again": "Descargar de nuevo", "download_again": "Descargar de nuevo",
"cancel": "Cancelar", "cancel": "Cancelar",
"filter": "Buscar juegos descargados", "filter": "Buscar juegos descargados",
"remove": "Eliminar", "remove": "Eliminar",
"downloading_metadata": "Descargando metadatos…", "downloading_metadata": "Descargando metadatos…",
"checking_files": "Verificando archivos…", "checking_files": "Verificando archivos…",
"starting_download": "Iniciando descarga…", "starting_download": "Iniciando descarga…",
"deleting": "Eliminando archivos…", "deleting": "Eliminando archivos…",
"delete": "Eliminar todos los archivos" "delete": "Eliminar todos los archivos"
}, },
"settings": { "settings": {
"downloads_path": "Ruta de descarga", "downloads_path": "Ruta de descarga",
"change": "Cambiar", "change": "Cambiar",
"notifications": "Notificaciones", "notifications": "Notificaciones",
"enable_download_notifications": "Cuando se completa una descarga", "enable_download_notifications": "Cuando se completa una descarga",
"enable_repack_list_notifications": "Cuando se añade un repack nuevo" "enable_repack_list_notifications": "Cuando se añade un repack nuevo"
}, },
"notifications": { "notifications": {
"download_complete": "Descarga completada", "download_complete": "Descarga completada",
"game_ready_to_install": "{{title}} está listo para instalarse", "game_ready_to_install": "{{title}} está listo para instalarse",
"repack_list_updated": "Lista de repacks actualizadas", "repack_list_updated": "Lista de repacks actualizadas",
"repack_count_one": "{{count}} repack ha sido añadido", "repack_count_one": "{{count}} repack ha sido añadido",
"repack_count_other": "{{count}} repacks añadidos" "repack_count_other": "{{count}} repacks añadidos"
}, },
"system_tray": { "system_tray": {
"open": "Abrir Hydra", "open": "Abrir Hydra",
"quit": "Salir" "quit": "Salir"
}, },
"game_card": { "game_card": {
"no_downloads": "No hay descargas disponibles" "no_downloads": "No hay descargas disponibles"
}, },
"binary_not_found_modal": { "binary_not_found_modal": {
"title": "Programas no instalados", "title": "Programas no instalados",
"description": "Los ejecutables de Wine o Lutris no se encontraron en su sistema", "description": "Los ejecutables de Wine o Lutris no se encontraron en su sistema",
"instructions": "Comprueba la forma correcta de instalar cualquiera de ellos en tu distro Linux para que el juego pueda ejecutarse con normalidad" "instructions": "Comprueba la forma correcta de instalar cualquiera de ellos en tu distro Linux para que el juego pueda ejecutarse con normalidad"
} }
} }

View file

@ -109,4 +109,3 @@
"no_downloads": "Aucun téléchargement disponible" "no_downloads": "Aucun téléchargement disponible"
} }
} }

View file

@ -1,54 +1,54 @@
import { app } from "electron"; import { app } from "electron";
import os from "node:os"; import os from "node:os";
import path from "node:path"; import path from "node:path";
export const repackersOn1337x = [ export const repackersOn1337x = [
"DODI", "DODI",
"FitGirl", "FitGirl",
"0xEMPRESS", "0xEMPRESS",
"KaOsKrew", "KaOsKrew",
"TinyRepacks", "TinyRepacks",
] as const; ] as const;
export const repackers = [ export const repackers = [
...repackersOn1337x, ...repackersOn1337x,
"Xatab", "Xatab",
"CPG", "CPG",
"TinyRepacks", "TinyRepacks",
"GOG", "GOG",
] as const; ] as const;
export const months = [ export const months = [
"Jan", "Jan",
"Feb", "Feb",
"Mar", "Mar",
"Apr", "Apr",
"May", "May",
"Jun", "Jun",
"Jul", "Jul",
"Aug", "Aug",
"Sep", "Sep",
"Oct", "Oct",
"Nov", "Nov",
"Dec", "Dec",
]; ];
export enum GameStatus { export enum GameStatus {
Seeding = "seeding", Seeding = "seeding",
Downloading = "downloading", Downloading = "downloading",
Paused = "paused", Paused = "paused",
CheckingFiles = "checking_files", CheckingFiles = "checking_files",
DownloadingMetadata = "downloading_metadata", DownloadingMetadata = "downloading_metadata",
Cancelled = "cancelled", Cancelled = "cancelled",
} }
export const defaultDownloadsPath = path.join(os.homedir(), "downloads"); export const defaultDownloadsPath = path.join(os.homedir(), "downloads");
export const databasePath = path.join( export const databasePath = path.join(
app.getPath("appData"), app.getPath("appData"),
app.getName(), app.getName(),
"hydra.db" "hydra.db"
); );
export const INSTALLATION_ID_LENGTH = 6; export const INSTALLATION_ID_LENGTH = 6;
export const ACTIVATION_KEY_MULTIPLIER = 7; export const ACTIVATION_KEY_MULTIPLIER = 7;

View file

@ -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;
} }

View file

@ -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();
} };

View file

@ -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);
}; };

View file

@ -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}`);

View file

@ -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(() => {

View file

@ -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}>

View file

@ -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);

View file

@ -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>

View file

@ -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())
), )
); );
}; };

View file

@ -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,12 +8,12 @@ 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");
return ( return (
<Modal <Modal
visible={visible} visible={visible}
title={t("title")} title={t("title")}
description={t("description")} description={t("description")}
@ -21,5 +21,5 @@ export const BinaryNotFoundModal = ({
> >
{t("instructions")} {t("instructions")}
</Modal> </Modal>
) );
} };

View file

@ -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,
}, },

4192
yarn.lock

File diff suppressed because it is too large Load diff