mirror of
https://github.com/open-goal/launcher.git
synced 2024-10-19 14:47:36 -04:00
build(deps-dev): bump the frontend-deps group with 8 updates (#289)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
This commit is contained in:
parent
69476e249c
commit
68794258b7
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<!-- TODO - perhaps eventually add a lightmode toggle -->
|
<!-- TODO - perhaps eventually add a lightmode toggle -->
|
||||||
<html lang="en" class="dark">
|
<html lang="en" class="dark">
|
||||||
<head>
|
<head>
|
||||||
|
|
20
package.json
20
package.json
|
@ -22,36 +22,36 @@
|
||||||
"@fullhuman/postcss-purgecss": "^5.0.0",
|
"@fullhuman/postcss-purgecss": "^5.0.0",
|
||||||
"@iconify-json/ic": "^1.1.13",
|
"@iconify-json/ic": "^1.1.13",
|
||||||
"@iconify-json/mdi": "^1.1.53",
|
"@iconify-json/mdi": "^1.1.53",
|
||||||
"@octokit/plugin-retry": "^3.0.9",
|
"@octokit/plugin-retry": "^6.0.0",
|
||||||
"@octokit/plugin-throttling": "^7.0.0",
|
"@octokit/plugin-throttling": "^7.0.0",
|
||||||
"@octokit/rest": "^20.0.1",
|
"@octokit/rest": "^20.0.1",
|
||||||
"@popperjs/core": "^2.11.7",
|
"@popperjs/core": "^2.11.7",
|
||||||
"@sveltejs/vite-plugin-svelte": "^2.4.2",
|
"@sveltejs/vite-plugin-svelte": "^2.4.3",
|
||||||
"@tauri-apps/cli": "^1.4.0",
|
"@tauri-apps/cli": "^1.4.0",
|
||||||
"@tauri-apps/tauricon": "github:tauri-apps/tauricon",
|
"@tauri-apps/tauricon": "github:tauri-apps/tauricon",
|
||||||
"@testing-library/svelte": "^4.0.3",
|
"@testing-library/svelte": "^4.0.3",
|
||||||
"@vitest/coverage-v8": "^0.33.0",
|
|
||||||
"@tsconfig/svelte": "^5.0.0",
|
"@tsconfig/svelte": "^5.0.0",
|
||||||
|
"@vitest/coverage-v8": "^0.33.0",
|
||||||
"ansi-to-span": "^0.0.1",
|
"ansi-to-span": "^0.0.1",
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.14",
|
||||||
"classnames": "^2.3.2",
|
"classnames": "^2.3.2",
|
||||||
"escape-html": "^1.0.3",
|
"escape-html": "^1.0.3",
|
||||||
"execa": "^7.1.1",
|
"execa": "^7.1.1",
|
||||||
"flowbite": "^1.6.5",
|
"flowbite": "^1.6.5",
|
||||||
"flowbite-svelte": "^0.39.2",
|
"flowbite-svelte": "0.39.3",
|
||||||
"jsdom": "^22.1.0",
|
"jsdom": "^22.1.0",
|
||||||
"postcss": "^8.4.26",
|
"postcss": "^8.4.27",
|
||||||
"postcss-load-config": "^4.0.1",
|
"postcss-load-config": "^4.0.1",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^3.0.0",
|
||||||
"prettier-plugin-svelte": "^2.10.1",
|
"prettier-plugin-svelte": "^3.0.0",
|
||||||
"svelte": "^3.59.1",
|
"svelte": "^4.1.1",
|
||||||
"svelte-i18n": "^3.6.0",
|
"svelte-i18n": "^3.6.0",
|
||||||
"svelte-preprocess": "^5.0.3",
|
"svelte-preprocess": "^5.0.3",
|
||||||
"tailwindcss": "^3.3.3",
|
"tailwindcss": "^3.3.3",
|
||||||
"typescript": "^5.1.3",
|
"typescript": "^5.1.3",
|
||||||
"unplugin-icons": "^0.16.5",
|
"unplugin-icons": "^0.16.5",
|
||||||
"vitest": "^0.33.0",
|
"vite": "^4.4.7",
|
||||||
"vite": "^4.4.4"
|
"vitest": "^0.33.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^1.4.0",
|
"@tauri-apps/api": "^1.4.0",
|
||||||
|
|
|
@ -21,7 +21,7 @@ const octokit = new Octokit({
|
||||||
throttle: {
|
throttle: {
|
||||||
onRateLimit: (retryAfter, options) => {
|
onRateLimit: (retryAfter, options) => {
|
||||||
octokit.log.warn(
|
octokit.log.warn(
|
||||||
`Request quota exhausted for request ${options.method} ${options.url}`
|
`Request quota exhausted for request ${options.method} ${options.url}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Retry twice after hitting a rate limit error, then give up
|
// Retry twice after hitting a rate limit error, then give up
|
||||||
|
@ -33,7 +33,7 @@ const octokit = new Octokit({
|
||||||
onAbuseLimit: (retryAfter, options) => {
|
onAbuseLimit: (retryAfter, options) => {
|
||||||
// does not retry, only logs a warning
|
// does not retry, only logs a warning
|
||||||
octokit.log.warn(
|
octokit.log.warn(
|
||||||
`Abuse detected for request ${options.method} ${options.url}`
|
`Abuse detected for request ${options.method} ${options.url}`,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,7 +17,7 @@ const octokit = new Octokit({
|
||||||
throttle: {
|
throttle: {
|
||||||
onRateLimit: (retryAfter, options) => {
|
onRateLimit: (retryAfter, options) => {
|
||||||
octokit.log.warn(
|
octokit.log.warn(
|
||||||
`Request quota exhausted for request ${options.method} ${options.url}`
|
`Request quota exhausted for request ${options.method} ${options.url}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Retry twice after hitting a rate limit error, then give up
|
// Retry twice after hitting a rate limit error, then give up
|
||||||
|
@ -29,7 +29,7 @@ const octokit = new Octokit({
|
||||||
onAbuseLimit: (retryAfter, options) => {
|
onAbuseLimit: (retryAfter, options) => {
|
||||||
// does not retry, only logs a warning
|
// does not retry, only logs a warning
|
||||||
octokit.log.warn(
|
octokit.log.warn(
|
||||||
`Abuse detected for request ${options.method} ${options.url}`
|
`Abuse detected for request ${options.method} ${options.url}`,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -178,7 +178,7 @@ const releaseMeta = {
|
||||||
launcherRelease.tag_name
|
launcherRelease.tag_name
|
||||||
}/OpenGOAL-Launcher_${launcherRelease.tag_name.replace(
|
}/OpenGOAL-Launcher_${launcherRelease.tag_name.replace(
|
||||||
"v",
|
"v",
|
||||||
""
|
"",
|
||||||
)}_amd64.AppImage.tar.gz`,
|
)}_amd64.AppImage.tar.gz`,
|
||||||
},
|
},
|
||||||
"windows-x86_64": {
|
"windows-x86_64": {
|
||||||
|
@ -187,14 +187,14 @@ const releaseMeta = {
|
||||||
launcherRelease.tag_name
|
launcherRelease.tag_name
|
||||||
}/OpenGOAL-Launcher_${launcherRelease.tag_name.replace(
|
}/OpenGOAL-Launcher_${launcherRelease.tag_name.replace(
|
||||||
"v",
|
"v",
|
||||||
""
|
"",
|
||||||
)}_x64_en-US.msi.zip`,
|
)}_x64_en-US.msi.zip`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
"./.tauri/latest-release-v2.json",
|
"./.tauri/latest-release-v2.json",
|
||||||
JSON.stringify(releaseMeta, null, 2) + "\n"
|
JSON.stringify(releaseMeta, null, 2) + "\n",
|
||||||
);
|
);
|
||||||
|
|
||||||
// Publish the release
|
// Publish the release
|
||||||
|
|
|
@ -21,7 +21,7 @@ const octokit = new Octokit({
|
||||||
throttle: {
|
throttle: {
|
||||||
onRateLimit: (retryAfter, options) => {
|
onRateLimit: (retryAfter, options) => {
|
||||||
octokit.log.warn(
|
octokit.log.warn(
|
||||||
`Request quota exhausted for request ${options.method} ${options.url}`
|
`Request quota exhausted for request ${options.method} ${options.url}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Retry twice after hitting a rate limit error, then give up
|
// Retry twice after hitting a rate limit error, then give up
|
||||||
|
@ -33,7 +33,7 @@ const octokit = new Octokit({
|
||||||
onAbuseLimit: (retryAfter, options) => {
|
onAbuseLimit: (retryAfter, options) => {
|
||||||
// does not retry, only logs a warning
|
// does not retry, only logs a warning
|
||||||
octokit.log.warn(
|
octokit.log.warn(
|
||||||
`Abuse detected for request ${options.method} ${options.url}`
|
`Abuse detected for request ${options.method} ${options.url}`,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -74,7 +74,7 @@ for (const asset of assets.data) {
|
||||||
}
|
}
|
||||||
if (!matchFound) {
|
if (!matchFound) {
|
||||||
console.log(
|
console.log(
|
||||||
`Asset name does not match any of the expected regexes: ${assetName}`
|
`Asset name does not match any of the expected regexes: ${assetName}`,
|
||||||
);
|
);
|
||||||
missingAsset = true;
|
missingAsset = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,10 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-outline {
|
.text-outline {
|
||||||
text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
|
text-shadow:
|
||||||
|
-1px -1px 0 #000,
|
||||||
|
1px -1px 0 #000,
|
||||||
|
-1px 1px 0 #000,
|
||||||
1px 1px 0 #000;
|
1px 1px 0 #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -168,14 +168,14 @@ export async function initLocales(async: boolean) {
|
||||||
for (const locale of AVAILABLE_LOCALES) {
|
for (const locale of AVAILABLE_LOCALES) {
|
||||||
register(
|
register(
|
||||||
locale.id,
|
locale.id,
|
||||||
() => import(`../../assets/translations/${locale.id}.json`)
|
() => import(`../../assets/translations/${locale.id}.json`),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const locale of AVAILABLE_LOCALES) {
|
for (const locale of AVAILABLE_LOCALES) {
|
||||||
addMessages(
|
addMessages(
|
||||||
locale.id,
|
locale.id,
|
||||||
await import(`../../assets/translations/${locale.id}.json`)
|
await import(`../../assets/translations/${locale.id}.json`),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,10 +10,10 @@ function failed(msg: string): InstallationOutput {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function updateDataDirectory(
|
export async function updateDataDirectory(
|
||||||
gameName: string
|
gameName: string,
|
||||||
): Promise<InstallationOutput> {
|
): Promise<InstallationOutput> {
|
||||||
return await invoke_rpc("update_data_directory", { gameName }, () =>
|
return await invoke_rpc("update_data_directory", { gameName }, () =>
|
||||||
failed("Failed to update data directory")
|
failed("Failed to update data directory"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,48 +23,48 @@ export async function getEndOfLogs(): Promise<string> {
|
||||||
|
|
||||||
export async function extractAndValidateISO(
|
export async function extractAndValidateISO(
|
||||||
pathToIso: string,
|
pathToIso: string,
|
||||||
gameName: string
|
gameName: string,
|
||||||
): Promise<InstallationOutput> {
|
): Promise<InstallationOutput> {
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"extract_and_validate_iso",
|
"extract_and_validate_iso",
|
||||||
{ pathToIso, gameName },
|
{ pathToIso, gameName },
|
||||||
() => failed("Failed to extract and validate ISO")
|
() => failed("Failed to extract and validate ISO"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function runDecompiler(
|
export async function runDecompiler(
|
||||||
pathToIso: string,
|
pathToIso: string,
|
||||||
gameName: string,
|
gameName: string,
|
||||||
truncateLogs: boolean = false
|
truncateLogs: boolean = false,
|
||||||
): Promise<InstallationOutput> {
|
): Promise<InstallationOutput> {
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"run_decompiler",
|
"run_decompiler",
|
||||||
{ pathToIso, gameName, truncateLogs },
|
{ pathToIso, gameName, truncateLogs },
|
||||||
() => failed("Failed to run decompiler")
|
() => failed("Failed to run decompiler"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function runCompiler(
|
export async function runCompiler(
|
||||||
pathToIso: string,
|
pathToIso: string,
|
||||||
gameName: string,
|
gameName: string,
|
||||||
truncateLogs: boolean = false
|
truncateLogs: boolean = false,
|
||||||
): Promise<InstallationOutput> {
|
): Promise<InstallationOutput> {
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"run_compiler",
|
"run_compiler",
|
||||||
{ pathToIso, gameName, truncateLogs },
|
{ pathToIso, gameName, truncateLogs },
|
||||||
() => failed("Failed to run compiler")
|
() => failed("Failed to run compiler"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function launchGame(
|
export async function launchGame(
|
||||||
gameName: string,
|
gameName: string,
|
||||||
inDebug: boolean
|
inDebug: boolean,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"launch_game",
|
"launch_game",
|
||||||
{ gameName, inDebug },
|
{ gameName, inDebug },
|
||||||
() => {},
|
() => {},
|
||||||
"Unable to launch game"
|
"Unable to launch game",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +73,6 @@ export async function openREPL(gameName: string): Promise<void> {
|
||||||
"open_repl",
|
"open_repl",
|
||||||
{ gameName },
|
{ gameName },
|
||||||
() => {},
|
() => {},
|
||||||
"Unable to open REPL"
|
"Unable to open REPL",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ export async function resetLauncherSettingsToDefaults(): Promise<boolean> {
|
||||||
"reset_to_defaults",
|
"reset_to_defaults",
|
||||||
{},
|
{},
|
||||||
() => false,
|
() => false,
|
||||||
"Unable to reset settings"
|
"Unable to reset settings",
|
||||||
);
|
);
|
||||||
return success != false;
|
return success != false;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ export async function getInstallationDirectory(): Promise<string | null> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function setInstallationDirectory(
|
export async function setInstallationDirectory(
|
||||||
newDir: string
|
newDir: string,
|
||||||
): Promise<string | null> {
|
): Promise<string | null> {
|
||||||
// TODO - not insanely crazy about this pattern (message in the response instead of the error)
|
// TODO - not insanely crazy about this pattern (message in the response instead of the error)
|
||||||
// consider changing it
|
// consider changing it
|
||||||
|
@ -36,7 +36,7 @@ export async function setInstallationDirectory(
|
||||||
"set_install_directory",
|
"set_install_directory",
|
||||||
{ newDir },
|
{ newDir },
|
||||||
() => "Unexpected error occurred",
|
() => "Unexpected error occurred",
|
||||||
"Invalid installation directory"
|
"Invalid installation directory",
|
||||||
);
|
);
|
||||||
|
|
||||||
if (errMsg !== null) {
|
if (errMsg !== null) {
|
||||||
|
@ -50,18 +50,18 @@ export async function setInstallationDirectory(
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function isAVXRequirementMet(
|
export async function isAVXRequirementMet(
|
||||||
force: boolean
|
force: boolean,
|
||||||
): Promise<boolean | undefined> {
|
): Promise<boolean | undefined> {
|
||||||
return await invoke_rpc("is_avx_requirement_met", { force }, () => undefined);
|
return await invoke_rpc("is_avx_requirement_met", { force }, () => undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function isOpenGLRequirementMet(
|
export async function isOpenGLRequirementMet(
|
||||||
force: boolean
|
force: boolean,
|
||||||
): Promise<boolean | undefined> {
|
): Promise<boolean | undefined> {
|
||||||
const result = await invoke_rpc(
|
const result = await invoke_rpc(
|
||||||
"is_opengl_requirement_met",
|
"is_opengl_requirement_met",
|
||||||
{ force },
|
{ force },
|
||||||
() => undefined
|
() => undefined,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (typeof result !== "boolean") {
|
if (typeof result !== "boolean") {
|
||||||
|
@ -84,20 +84,20 @@ export async function getInstalledVersion(gameName: string): Promise<String> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getInstalledVersionFolder(
|
export async function getInstalledVersionFolder(
|
||||||
gameName: string
|
gameName: string,
|
||||||
): Promise<String> {
|
): Promise<String> {
|
||||||
return invoke_rpc("get_installed_version_folder", { gameName }, () => null);
|
return invoke_rpc("get_installed_version_folder", { gameName }, () => null);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function saveActiveVersionChange(
|
export async function saveActiveVersionChange(
|
||||||
versionFolder: VersionFolders,
|
versionFolder: VersionFolders,
|
||||||
newActiveVersion: String
|
newActiveVersion: String,
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
return invoke_rpc(
|
return invoke_rpc(
|
||||||
"save_active_version_change",
|
"save_active_version_change",
|
||||||
{ versionFolder, newActiveVersion },
|
{ versionFolder, newActiveVersion },
|
||||||
() => false,
|
() => false,
|
||||||
"Couldn't save active version change"
|
"Couldn't save active version change",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,20 +115,20 @@ export async function setLocale(localeId: string): Promise<void> {
|
||||||
svelteLocale.set(localeId);
|
svelteLocale.set(localeId);
|
||||||
// Update CSS variable if needed
|
// Update CSS variable if needed
|
||||||
let localeInfo = AVAILABLE_LOCALES.find(
|
let localeInfo = AVAILABLE_LOCALES.find(
|
||||||
(locale) => locale.id === localeId
|
(locale) => locale.id === localeId,
|
||||||
);
|
);
|
||||||
if (localeInfo !== undefined && localeInfo.fontFamily !== undefined) {
|
if (localeInfo !== undefined && localeInfo.fontFamily !== undefined) {
|
||||||
document.documentElement.style.setProperty(
|
document.documentElement.style.setProperty(
|
||||||
"--launcher-font-family",
|
"--launcher-font-family",
|
||||||
localeInfo.fontFamily
|
localeInfo.fontFamily,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
document.documentElement.style.setProperty(
|
document.documentElement.style.setProperty(
|
||||||
"--launcher-font-family",
|
"--launcher-font-family",
|
||||||
"Noto Sans"
|
"Noto Sans",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,18 +141,18 @@ export async function getBypassRequirements(): Promise<boolean> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getEnabledTexturePacks(
|
export async function getEnabledTexturePacks(
|
||||||
gameName: string
|
gameName: string,
|
||||||
): Promise<string[]> {
|
): Promise<string[]> {
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"get_enabled_texture_packs",
|
"get_enabled_texture_packs",
|
||||||
{ gameName: gameName },
|
{ gameName: gameName },
|
||||||
() => []
|
() => [],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function cleanupEnabledTexturePacks(
|
export async function cleanupEnabledTexturePacks(
|
||||||
gameName: string,
|
gameName: string,
|
||||||
cleanupList: string[]
|
cleanupList: string[],
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"cleanup_enabled_texture_packs",
|
"cleanup_enabled_texture_packs",
|
||||||
|
@ -160,7 +160,7 @@ export async function cleanupEnabledTexturePacks(
|
||||||
gameName: gameName,
|
gameName: gameName,
|
||||||
cleanupList: cleanupList,
|
cleanupList: cleanupList,
|
||||||
},
|
},
|
||||||
() => {}
|
() => {},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ function failed(msg: string): FeatureJobOutput {
|
||||||
|
|
||||||
export async function setEnabledTexturePacks(
|
export async function setEnabledTexturePacks(
|
||||||
gameName: string,
|
gameName: string,
|
||||||
packs: string[]
|
packs: string[],
|
||||||
): Promise<FeatureJobOutput> {
|
): Promise<FeatureJobOutput> {
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"set_enabled_texture_packs",
|
"set_enabled_texture_packs",
|
||||||
|
@ -188,6 +188,6 @@ export async function setEnabledTexturePacks(
|
||||||
undefined,
|
undefined,
|
||||||
() => {
|
() => {
|
||||||
return { success: true, msg: null };
|
return { success: true, msg: null };
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,20 +12,20 @@ function failed(msg: string): FeatureJobOutput {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function listExtractedTexturePackInfo(
|
export async function listExtractedTexturePackInfo(
|
||||||
gameName: string
|
gameName: string,
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"list_extracted_texture_pack_info",
|
"list_extracted_texture_pack_info",
|
||||||
{
|
{
|
||||||
gameName: gameName,
|
gameName: gameName,
|
||||||
},
|
},
|
||||||
() => []
|
() => [],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function extractNewTexturePack(
|
export async function extractNewTexturePack(
|
||||||
gameName: string,
|
gameName: string,
|
||||||
pathToZip: string
|
pathToZip: string,
|
||||||
): Promise<boolean | undefined> {
|
): Promise<boolean | undefined> {
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"extract_new_texture_pack",
|
"extract_new_texture_pack",
|
||||||
|
@ -33,12 +33,12 @@ export async function extractNewTexturePack(
|
||||||
gameName: gameName,
|
gameName: gameName,
|
||||||
zipPath: pathToZip,
|
zipPath: pathToZip,
|
||||||
},
|
},
|
||||||
() => undefined
|
() => undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function updateTexturePackData(
|
export async function updateTexturePackData(
|
||||||
gameName: string
|
gameName: string,
|
||||||
): Promise<FeatureJobOutput> {
|
): Promise<FeatureJobOutput> {
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"update_texture_pack_data",
|
"update_texture_pack_data",
|
||||||
|
@ -49,13 +49,13 @@ export async function updateTexturePackData(
|
||||||
undefined,
|
undefined,
|
||||||
() => {
|
() => {
|
||||||
return { success: true, msg: null };
|
return { success: true, msg: null };
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleteTexturePacks(
|
export async function deleteTexturePacks(
|
||||||
gameName: string,
|
gameName: string,
|
||||||
packs: string[]
|
packs: string[],
|
||||||
): Promise<FeatureJobOutput> {
|
): Promise<FeatureJobOutput> {
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"delete_texture_packs",
|
"delete_texture_packs",
|
||||||
|
@ -67,6 +67,6 @@ export async function deleteTexturePacks(
|
||||||
undefined,
|
undefined,
|
||||||
() => {
|
() => {
|
||||||
return { success: true, msg: null };
|
return { success: true, msg: null };
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ export async function uninstallGame(gameName: string): Promise<boolean> {
|
||||||
"uninstall_game",
|
"uninstall_game",
|
||||||
{ gameName },
|
{ gameName },
|
||||||
() => false,
|
() => false,
|
||||||
"Unable to uninstall game"
|
"Unable to uninstall game",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,6 @@ export async function resetGameSettings(gameName: string): Promise<void> {
|
||||||
"reset_game_settings",
|
"reset_game_settings",
|
||||||
{ gameName },
|
{ gameName },
|
||||||
() => {},
|
() => {},
|
||||||
"Unable to reset game settings"
|
"Unable to reset game settings",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ async function genericLog(level: string, log: String): Promise<void> {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(
|
console.log(
|
||||||
"[opengoal_launcher]: Unexpected error encountered when trying to log",
|
"[opengoal_launcher]: Unexpected error encountered when trying to log",
|
||||||
e
|
e,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ export async function errorLog(log: String): Promise<void> {
|
||||||
export async function exceptionLog(log: String, error: any): Promise<void> {
|
export async function exceptionLog(log: String, error: any): Promise<void> {
|
||||||
if (error instanceof Error) {
|
if (error instanceof Error) {
|
||||||
errorLog(
|
errorLog(
|
||||||
`${log} | Exception: ${error.name}:${error.message}, Stack: ${error.stack}, Cause: ${error.cause}`
|
`${log} | Exception: ${error.name}:${error.message}, Stack: ${error.stack}, Cause: ${error.cause}`,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
errorLog(`${log} | ${error}`);
|
errorLog(`${log} | ${error}`);
|
||||||
|
|
|
@ -16,7 +16,7 @@ export async function invoke_rpc<T>(
|
||||||
args: InvokeArgs,
|
args: InvokeArgs,
|
||||||
handleError: (error: unknown) => T,
|
handleError: (error: unknown) => T,
|
||||||
toastOnError?: string,
|
toastOnError?: string,
|
||||||
onSuccess?: (result: T) => T
|
onSuccess?: (result: T) => T,
|
||||||
): Promise<T> {
|
): Promise<T> {
|
||||||
try {
|
try {
|
||||||
// this assumes the call is made in a way that does not trick the type inference
|
// this assumes the call is made in a way that does not trick the type inference
|
||||||
|
|
|
@ -5,12 +5,12 @@ export async function generateSupportPackage(): Promise<void> {
|
||||||
const userPath = await saveFilePrompt(
|
const userPath = await saveFilePrompt(
|
||||||
"ZIP",
|
"ZIP",
|
||||||
["zip"],
|
["zip"],
|
||||||
"opengoal-support-package.zip"
|
"opengoal-support-package.zip",
|
||||||
);
|
);
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"generate_support_package",
|
"generate_support_package",
|
||||||
{ userPath },
|
{ userPath },
|
||||||
() => {},
|
() => {},
|
||||||
"Unable to create support package"
|
"Unable to create support package",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,38 +3,38 @@ import { invoke_rpc } from "./rpc";
|
||||||
export type VersionFolders = null | "official" | "unofficial" | "devel";
|
export type VersionFolders = null | "official" | "unofficial" | "devel";
|
||||||
|
|
||||||
export async function listDownloadedVersions(
|
export async function listDownloadedVersions(
|
||||||
versionFolder: VersionFolders
|
versionFolder: VersionFolders,
|
||||||
): Promise<string[]> {
|
): Promise<string[]> {
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"list_downloaded_versions",
|
"list_downloaded_versions",
|
||||||
{ versionFolder },
|
{ versionFolder },
|
||||||
() => []
|
() => [],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function downloadOfficialVersion(
|
export async function downloadOfficialVersion(
|
||||||
version: String,
|
version: String,
|
||||||
url: String
|
url: String,
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"download_version",
|
"download_version",
|
||||||
{ version, url, versionFolder: "official" },
|
{ version, url, versionFolder: "official" },
|
||||||
() => false,
|
() => false,
|
||||||
"Unable to download official version",
|
"Unable to download official version",
|
||||||
() => true
|
() => true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function removeVersion(
|
export async function removeVersion(
|
||||||
version: String,
|
version: String,
|
||||||
versionFolder: String
|
versionFolder: String,
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
return await invoke_rpc(
|
return await invoke_rpc(
|
||||||
"remove_version",
|
"remove_version",
|
||||||
{ version, versionFolder },
|
{ version, versionFolder },
|
||||||
() => false,
|
() => false,
|
||||||
"Unable to remove version",
|
"Unable to remove version",
|
||||||
() => true
|
() => true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ export async function openVersionFolder(versionFolder: VersionFolders) {
|
||||||
"go_to_version_folder",
|
"go_to_version_folder",
|
||||||
{ versionFolder },
|
{ versionFolder },
|
||||||
() => {},
|
() => {},
|
||||||
"Unable to open version folder"
|
"Unable to open version folder",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,6 +60,6 @@ export async function ensureActiveVersionStillExists(): Promise<boolean> {
|
||||||
"ensure_active_version_still_exists",
|
"ensure_active_version_still_exists",
|
||||||
{},
|
{},
|
||||||
() => false,
|
() => false,
|
||||||
"Error checking that active version exists"
|
"Error checking that active version exists",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ export async function openDir(directory: string): Promise<void> {
|
||||||
"open_dir_in_os",
|
"open_dir_in_os",
|
||||||
{ directory },
|
{ directory },
|
||||||
() => {},
|
() => {},
|
||||||
"Unable to open directory"
|
"Unable to open directory",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { open, save } from "@tauri-apps/api/dialog";
|
||||||
export async function filePrompt(
|
export async function filePrompt(
|
||||||
extensions: string[],
|
extensions: string[],
|
||||||
name: string,
|
name: string,
|
||||||
title: string
|
title: string,
|
||||||
): Promise<string | null> {
|
): Promise<string | null> {
|
||||||
const path = await open({
|
const path = await open({
|
||||||
title: title,
|
title: title,
|
||||||
|
@ -22,7 +22,7 @@ export async function filePrompt(
|
||||||
export async function saveFilePrompt(
|
export async function saveFilePrompt(
|
||||||
fileType: string,
|
fileType: string,
|
||||||
fileExtensions: string[],
|
fileExtensions: string[],
|
||||||
fileName: string
|
fileName: string,
|
||||||
): Promise<string | null> {
|
): Promise<string | null> {
|
||||||
return await save({
|
return await save({
|
||||||
filters: [{ name: fileType, extensions: fileExtensions }],
|
filters: [{ name: fileType, extensions: fileExtensions }],
|
||||||
|
@ -32,7 +32,7 @@ export async function saveFilePrompt(
|
||||||
|
|
||||||
export async function saveFolderPrompt(
|
export async function saveFolderPrompt(
|
||||||
fileType: string,
|
fileType: string,
|
||||||
fileExtensions: string[]
|
fileExtensions: string[],
|
||||||
): Promise<string | null> {
|
): Promise<string | null> {
|
||||||
return await save({
|
return await save({
|
||||||
filters: [{ name: fileType, extensions: fileExtensions }],
|
filters: [{ name: fileType, extensions: fileExtensions }],
|
||||||
|
@ -43,7 +43,7 @@ export async function isoPrompt(): Promise<string | undefined> {
|
||||||
const path = await filePrompt(
|
const path = await filePrompt(
|
||||||
["ISO", "iso"],
|
["ISO", "iso"],
|
||||||
"Jak ISO File",
|
"Jak ISO File",
|
||||||
"Select your legitimately obtained ISO File"
|
"Select your legitimately obtained ISO File",
|
||||||
);
|
);
|
||||||
if (path === null) {
|
if (path === null) {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|
|
@ -137,12 +137,12 @@ describe("listOfficialReleases", () => {
|
||||||
"opengoal-windows-v0.0.1.zip",
|
"opengoal-windows-v0.0.1.zip",
|
||||||
"opengoal-linux-v0.0.1.tar.gz",
|
"opengoal-linux-v0.0.1.tar.gz",
|
||||||
]),
|
]),
|
||||||
])
|
]),
|
||||||
);
|
);
|
||||||
const releases = await listOfficialReleases();
|
const releases = await listOfficialReleases();
|
||||||
expect(releases.length).toBe(1);
|
expect(releases.length).toBe(1);
|
||||||
expect(
|
expect(
|
||||||
releases[0].downloadUrl.endsWith("opengoal-macos-intel-v0.0.1.tar.gz")
|
releases[0].downloadUrl.endsWith("opengoal-macos-intel-v0.0.1.tar.gz"),
|
||||||
).toBeTruthy();
|
).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ describe("listOfficialReleases", () => {
|
||||||
"opengoal-windows-v0.0.1.zip",
|
"opengoal-windows-v0.0.1.zip",
|
||||||
"opengoal-linux-v0.0.1.tar.gz",
|
"opengoal-linux-v0.0.1.tar.gz",
|
||||||
]),
|
]),
|
||||||
])
|
]),
|
||||||
);
|
);
|
||||||
const releases = await listOfficialReleases();
|
const releases = await listOfficialReleases();
|
||||||
expect(releases.length).toBe(1);
|
expect(releases.length).toBe(1);
|
||||||
|
@ -173,12 +173,12 @@ describe("listOfficialReleases", () => {
|
||||||
"opengoal-windows-v0.0.1.zip",
|
"opengoal-windows-v0.0.1.zip",
|
||||||
"opengoal-linux-v0.0.1.tar.gz",
|
"opengoal-linux-v0.0.1.tar.gz",
|
||||||
]),
|
]),
|
||||||
])
|
]),
|
||||||
);
|
);
|
||||||
const releases = await listOfficialReleases();
|
const releases = await listOfficialReleases();
|
||||||
expect(releases.length).toBe(1);
|
expect(releases.length).toBe(1);
|
||||||
expect(
|
expect(
|
||||||
releases[0].downloadUrl.endsWith("opengoal-windows-v0.0.1.zip")
|
releases[0].downloadUrl.endsWith("opengoal-windows-v0.0.1.zip"),
|
||||||
).toBeTruthy();
|
).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -192,12 +192,12 @@ describe("listOfficialReleases", () => {
|
||||||
"opengoal-windows-v0.0.1.zip",
|
"opengoal-windows-v0.0.1.zip",
|
||||||
"opengoal-linux-v0.0.1.tar.gz",
|
"opengoal-linux-v0.0.1.tar.gz",
|
||||||
]),
|
]),
|
||||||
])
|
]),
|
||||||
);
|
);
|
||||||
const releases = await listOfficialReleases();
|
const releases = await listOfficialReleases();
|
||||||
expect(releases.length).toBe(1);
|
expect(releases.length).toBe(1);
|
||||||
expect(
|
expect(
|
||||||
releases[0].downloadUrl.endsWith("opengoal-linux-v0.0.1.tar.gz")
|
releases[0].downloadUrl.endsWith("opengoal-linux-v0.0.1.tar.gz"),
|
||||||
).toBeTruthy();
|
).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -218,12 +218,12 @@ describe("getLatestOfficialRelease", () => {
|
||||||
"opengoal-windows-v0.0.1.zip",
|
"opengoal-windows-v0.0.1.zip",
|
||||||
"opengoal-linux-v0.0.1.tar.gz",
|
"opengoal-linux-v0.0.1.tar.gz",
|
||||||
]),
|
]),
|
||||||
])
|
]),
|
||||||
);
|
);
|
||||||
const releases = await listOfficialReleases();
|
const releases = await listOfficialReleases();
|
||||||
expect(releases.length).toBe(1);
|
expect(releases.length).toBe(1);
|
||||||
expect(
|
expect(
|
||||||
releases[0].downloadUrl.endsWith("opengoal-macos-intel-v0.0.1.tar.gz")
|
releases[0].downloadUrl.endsWith("opengoal-macos-intel-v0.0.1.tar.gz"),
|
||||||
).toBeTruthy();
|
).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ describe("getLatestOfficialRelease", () => {
|
||||||
"opengoal-windows-v0.0.1.zip",
|
"opengoal-windows-v0.0.1.zip",
|
||||||
"opengoal-linux-v0.0.1.tar.gz",
|
"opengoal-linux-v0.0.1.tar.gz",
|
||||||
]),
|
]),
|
||||||
])
|
]),
|
||||||
);
|
);
|
||||||
const releases = await listOfficialReleases();
|
const releases = await listOfficialReleases();
|
||||||
expect(releases.length).toBe(1);
|
expect(releases.length).toBe(1);
|
||||||
|
@ -254,12 +254,12 @@ describe("getLatestOfficialRelease", () => {
|
||||||
"opengoal-windows-v0.0.1.zip",
|
"opengoal-windows-v0.0.1.zip",
|
||||||
"opengoal-linux-v0.0.1.tar.gz",
|
"opengoal-linux-v0.0.1.tar.gz",
|
||||||
]),
|
]),
|
||||||
])
|
]),
|
||||||
);
|
);
|
||||||
const releases = await listOfficialReleases();
|
const releases = await listOfficialReleases();
|
||||||
expect(releases.length).toBe(1);
|
expect(releases.length).toBe(1);
|
||||||
expect(
|
expect(
|
||||||
releases[0].downloadUrl.endsWith("opengoal-windows-v0.0.1.zip")
|
releases[0].downloadUrl.endsWith("opengoal-windows-v0.0.1.zip"),
|
||||||
).toBeTruthy();
|
).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -273,12 +273,12 @@ describe("getLatestOfficialRelease", () => {
|
||||||
"opengoal-windows-v0.0.1.zip",
|
"opengoal-windows-v0.0.1.zip",
|
||||||
"opengoal-linux-v0.0.1.tar.gz",
|
"opengoal-linux-v0.0.1.tar.gz",
|
||||||
]),
|
]),
|
||||||
])
|
]),
|
||||||
);
|
);
|
||||||
const releases = await listOfficialReleases();
|
const releases = await listOfficialReleases();
|
||||||
expect(releases.length).toBe(1);
|
expect(releases.length).toBe(1);
|
||||||
expect(
|
expect(
|
||||||
releases[0].downloadUrl.endsWith("opengoal-linux-v0.0.1.tar.gz")
|
releases[0].downloadUrl.endsWith("opengoal-linux-v0.0.1.tar.gz"),
|
||||||
).toBeTruthy();
|
).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,7 +13,7 @@ export interface ReleaseInfo {
|
||||||
function isIntelMacOsRelease(
|
function isIntelMacOsRelease(
|
||||||
platform: string,
|
platform: string,
|
||||||
architecture: string,
|
architecture: string,
|
||||||
assetName: string
|
assetName: string,
|
||||||
): boolean {
|
): boolean {
|
||||||
return (
|
return (
|
||||||
platform === "darwin" &&
|
platform === "darwin" &&
|
||||||
|
@ -26,7 +26,7 @@ function isIntelMacOsRelease(
|
||||||
function isWindowsRelease(
|
function isWindowsRelease(
|
||||||
platform: string,
|
platform: string,
|
||||||
architecture: string,
|
architecture: string,
|
||||||
assetName: string
|
assetName: string,
|
||||||
): boolean {
|
): boolean {
|
||||||
return (
|
return (
|
||||||
platform === "win32" &&
|
platform === "win32" &&
|
||||||
|
@ -38,7 +38,7 @@ function isWindowsRelease(
|
||||||
function isLinuxRelease(
|
function isLinuxRelease(
|
||||||
platform: string,
|
platform: string,
|
||||||
architecture: string,
|
architecture: string,
|
||||||
assetName: string
|
assetName: string,
|
||||||
): boolean {
|
): boolean {
|
||||||
return (
|
return (
|
||||||
platform === "linux" &&
|
platform === "linux" &&
|
||||||
|
@ -48,7 +48,7 @@ function isLinuxRelease(
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getDownloadLinkForCurrentPlatform(
|
async function getDownloadLinkForCurrentPlatform(
|
||||||
release: any
|
release: any,
|
||||||
): Promise<string | undefined> {
|
): Promise<string | undefined> {
|
||||||
const platformName = await platform();
|
const platformName = await platform();
|
||||||
const archName = await arch();
|
const archName = await arch();
|
||||||
|
@ -69,7 +69,7 @@ export async function listOfficialReleases(): Promise<ReleaseInfo[]> {
|
||||||
// TODO - handle rate limiting
|
// TODO - handle rate limiting
|
||||||
// TODO - long term - handle pagination (more than 100 releases)
|
// TODO - long term - handle pagination (more than 100 releases)
|
||||||
const resp = await fetch(
|
const resp = await fetch(
|
||||||
"https://api.github.com/repos/open-goal/jak-project/releases?per_page=100"
|
"https://api.github.com/repos/open-goal/jak-project/releases?per_page=100",
|
||||||
);
|
);
|
||||||
// TODO - handle error
|
// TODO - handle error
|
||||||
const githubReleases = await resp.json();
|
const githubReleases = await resp.json();
|
||||||
|
@ -92,7 +92,7 @@ export async function listOfficialReleases(): Promise<ReleaseInfo[]> {
|
||||||
export async function getLatestOfficialRelease(): Promise<ReleaseInfo> {
|
export async function getLatestOfficialRelease(): Promise<ReleaseInfo> {
|
||||||
// TODO - handle rate limiting
|
// TODO - handle rate limiting
|
||||||
const resp = await fetch(
|
const resp = await fetch(
|
||||||
"https://api.github.com/repos/open-goal/jak-project/releases/latest"
|
"https://api.github.com/repos/open-goal/jak-project/releases/latest",
|
||||||
);
|
);
|
||||||
// TODO - handle error
|
// TODO - handle error
|
||||||
const githubRelease = await resp.json();
|
const githubRelease = await resp.json();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en" class="dark">
|
<html lang="en" class="dark">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
|
|
|
@ -54,7 +54,7 @@ describe("Splash.svelte", () => {
|
||||||
});
|
});
|
||||||
render(Splash, {});
|
render(Splash, {});
|
||||||
const localeSelect = (await screen.findByTestId(
|
const localeSelect = (await screen.findByTestId(
|
||||||
"locale-select"
|
"locale-select",
|
||||||
)) as HTMLSelectElement;
|
)) as HTMLSelectElement;
|
||||||
expect(localeSelect).toBeTruthy();
|
expect(localeSelect).toBeTruthy();
|
||||||
fireEvent.change(localeSelect, { target: { value: "en-US" } });
|
fireEvent.change(localeSelect, { target: { value: "en-US" } });
|
||||||
|
@ -80,14 +80,14 @@ describe("Splash.svelte", () => {
|
||||||
});
|
});
|
||||||
render(Splash, {});
|
render(Splash, {});
|
||||||
const deleteOldDataDirButton = await screen.findByTestId(
|
const deleteOldDataDirButton = await screen.findByTestId(
|
||||||
"delete-old-data-dir-button"
|
"delete-old-data-dir-button",
|
||||||
);
|
);
|
||||||
expect(deleteOldDataDirButton).toBeTruthy();
|
expect(deleteOldDataDirButton).toBeTruthy();
|
||||||
// delete the dir, it'll go away
|
// delete the dir, it'll go away
|
||||||
fireEvent.click(deleteOldDataDirButton);
|
fireEvent.click(deleteOldDataDirButton);
|
||||||
expect(oldDataDirDeleted).toBeTruthy();
|
expect(oldDataDirDeleted).toBeTruthy();
|
||||||
const pickInstallFolderButton = await screen.findByTestId(
|
const pickInstallFolderButton = await screen.findByTestId(
|
||||||
"pick-install-folder-button"
|
"pick-install-folder-button",
|
||||||
);
|
);
|
||||||
expect(pickInstallFolderButton).toBeTruthy();
|
expect(pickInstallFolderButton).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
@ -109,13 +109,13 @@ describe("Splash.svelte", () => {
|
||||||
vi.mocked(folderPrompt).mockResolvedValue(undefined);
|
vi.mocked(folderPrompt).mockResolvedValue(undefined);
|
||||||
render(Splash, {});
|
render(Splash, {});
|
||||||
let pickInstallFolderButton = await screen.findByTestId(
|
let pickInstallFolderButton = await screen.findByTestId(
|
||||||
"pick-install-folder-button"
|
"pick-install-folder-button",
|
||||||
);
|
);
|
||||||
expect(pickInstallFolderButton).toBeTruthy();
|
expect(pickInstallFolderButton).toBeTruthy();
|
||||||
fireEvent.click(pickInstallFolderButton);
|
fireEvent.click(pickInstallFolderButton);
|
||||||
// It's still there since the user didn't pick a folder
|
// It's still there since the user didn't pick a folder
|
||||||
pickInstallFolderButton = await screen.findByTestId(
|
pickInstallFolderButton = await screen.findByTestId(
|
||||||
"pick-install-folder-button"
|
"pick-install-folder-button",
|
||||||
);
|
);
|
||||||
expect(pickInstallFolderButton).toBeTruthy();
|
expect(pickInstallFolderButton).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
@ -145,7 +145,7 @@ describe("Splash.svelte", () => {
|
||||||
vi.mocked(folderPrompt).mockResolvedValue("/wow/good/job/nice/folder");
|
vi.mocked(folderPrompt).mockResolvedValue("/wow/good/job/nice/folder");
|
||||||
render(Splash, {});
|
render(Splash, {});
|
||||||
let pickInstallFolderButton = await screen.findByTestId(
|
let pickInstallFolderButton = await screen.findByTestId(
|
||||||
"pick-install-folder-button"
|
"pick-install-folder-button",
|
||||||
);
|
);
|
||||||
expect(pickInstallFolderButton).toBeTruthy();
|
expect(pickInstallFolderButton).toBeTruthy();
|
||||||
fireEvent.click(pickInstallFolderButton);
|
fireEvent.click(pickInstallFolderButton);
|
||||||
|
@ -156,7 +156,7 @@ describe("Splash.svelte", () => {
|
||||||
() => {
|
() => {
|
||||||
expect(mainWindowOpened).toBeTruthy();
|
expect(mainWindowOpened).toBeTruthy();
|
||||||
},
|
},
|
||||||
{ timeout: 5000 }
|
{ timeout: 5000 },
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ describe("Splash.svelte", () => {
|
||||||
vi.mocked(folderPrompt).mockResolvedValue("/wow/good/job/nice/folder");
|
vi.mocked(folderPrompt).mockResolvedValue("/wow/good/job/nice/folder");
|
||||||
render(Splash, {});
|
render(Splash, {});
|
||||||
let pickInstallFolderButton = await screen.findByTestId(
|
let pickInstallFolderButton = await screen.findByTestId(
|
||||||
"pick-install-folder-button"
|
"pick-install-folder-button",
|
||||||
);
|
);
|
||||||
expect(pickInstallFolderButton).toBeTruthy();
|
expect(pickInstallFolderButton).toBeTruthy();
|
||||||
fireEvent.click(pickInstallFolderButton);
|
fireEvent.click(pickInstallFolderButton);
|
||||||
|
@ -191,7 +191,7 @@ describe("Splash.svelte", () => {
|
||||||
screen.findByText("wow that was a terrible directory");
|
screen.findByText("wow that was a terrible directory");
|
||||||
});
|
});
|
||||||
pickInstallFolderButton = await screen.findByTestId(
|
pickInstallFolderButton = await screen.findByTestId(
|
||||||
"pick-install-folder-button"
|
"pick-install-folder-button",
|
||||||
);
|
);
|
||||||
expect(pickInstallFolderButton).toBeTruthy();
|
expect(pickInstallFolderButton).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default defineConfig({
|
||||||
input: {
|
input: {
|
||||||
main: fileURLToPath(new URL("./index.html", import.meta.url)),
|
main: fileURLToPath(new URL("./index.html", import.meta.url)),
|
||||||
splash: fileURLToPath(
|
splash: fileURLToPath(
|
||||||
new URL("./src/splash/index.html", import.meta.url)
|
new URL("./src/splash/index.html", import.meta.url),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue