Compare commits
3 Commits
7df448eea8
...
428ead8525
Author | SHA1 | Date | |
---|---|---|---|
428ead8525 | |||
1b1914f684 | |||
2034016ac7 |
6
bun.lock
6
bun.lock
@@ -4,6 +4,7 @@
|
||||
"": {
|
||||
"name": "ezpplauncher",
|
||||
"dependencies": {
|
||||
"@better-fetch/fetch": "^1.1.18",
|
||||
"@elron/svelte-audio-store": "1.0.0",
|
||||
"@number-flow/svelte": "^0.3.9",
|
||||
"@tailwindcss/typography": "0.5.16",
|
||||
@@ -16,7 +17,6 @@
|
||||
"buffer": "^6.0.3",
|
||||
"crypto": "^1.0.1",
|
||||
"crypto-js": "^4.2.0",
|
||||
"ky": "1.8.1",
|
||||
"lucide-svelte": "0.523.0",
|
||||
"osu-classes": "3.1.0",
|
||||
"osu-parsers": "4.1.7",
|
||||
@@ -56,6 +56,8 @@
|
||||
|
||||
"@ampproject/remapping": ["@ampproject/remapping@2.3.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="],
|
||||
|
||||
"@better-fetch/fetch": ["@better-fetch/fetch@1.1.18", "", {}, "sha512-rEFOE1MYIsBmoMJtQbl32PGHHXuG2hDxvEd7rUHE0vCBoFQVSDqaVs9hkZEtHCxRoY+CljXKFCOuJ8uxqw1LcA=="],
|
||||
|
||||
"@bufbuild/protobuf": ["@bufbuild/protobuf@2.5.2", "", {}, "sha512-foZ7qr0IsUBjzWIq+SuBLfdQCpJ1j8cTuNNT4owngTHoN5KsJb8L9t65fzz7SCeSWzescoOil/0ldqiL041ABg=="],
|
||||
|
||||
"@elron/svelte-audio-store": ["@elron/svelte-audio-store@1.0.0", "", { "peerDependencies": { "svelte": "^4.0.0" } }, "sha512-ksBF88rG4cbIt+ZLrxMKDdr1CxWxxEiyyZfHfNHCF/G9O2eDflSnCytSpid0Y43R4DwK+AukUlFfc0j5evqqEw=="],
|
||||
@@ -382,8 +384,6 @@
|
||||
|
||||
"kleur": ["kleur@4.1.5", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="],
|
||||
|
||||
"ky": ["ky@1.8.1", "", {}, "sha512-7Bp3TpsE+L+TARSnnDpk3xg8Idi8RwSLdj6CMbNWoOARIrGrbuLGusV0dYwbZOm4bB3jHNxSw8Wk/ByDqJEnDw=="],
|
||||
|
||||
"lilconfig": ["lilconfig@3.1.3", "", {}, "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw=="],
|
||||
|
||||
"lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="],
|
||||
|
@@ -16,6 +16,7 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@better-fetch/fetch": "^1.1.18",
|
||||
"@elron/svelte-audio-store": "1.0.0",
|
||||
"@number-flow/svelte": "^0.3.9",
|
||||
"@tailwindcss/typography": "0.5.16",
|
||||
@@ -28,7 +29,6 @@
|
||||
"buffer": "^6.0.3",
|
||||
"crypto": "^1.0.1",
|
||||
"crypto-js": "^4.2.0",
|
||||
"ky": "1.8.1",
|
||||
"lucide-svelte": "0.523.0",
|
||||
"osu-classes": "3.1.0",
|
||||
"osu-parsers": "4.1.7",
|
||||
|
1972
src-tauri/Cargo.lock
generated
1972
src-tauri/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@ name = "ezpplauncher"
|
||||
version = "0.1.0"
|
||||
description = "A Tauri App"
|
||||
authors = ["you"]
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@@ -15,10 +15,10 @@ name = "ezpplauncher_lib"
|
||||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2", features = [] }
|
||||
tauri-build = { version = "2.3.0", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "2", features = [] }
|
||||
tauri = { version = "2.6.2", features = [] }
|
||||
tauri-plugin-shell = "2.3.0"
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
serde_json = "1.0.140"
|
||||
@@ -28,6 +28,7 @@ tauri-plugin-dialog = "2.3.0"
|
||||
tauri-plugin-fs = "2.4.0"
|
||||
hardware-id = "0.3.0"
|
||||
winreg = "0.55.0"
|
||||
tauri-plugin-cors-fetch = "4.1.0"
|
||||
|
||||
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
||||
tauri-plugin-single-instance = "2.3.0"
|
||||
|
@@ -2,9 +2,7 @@
|
||||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "default",
|
||||
"description": "Capability for the main window",
|
||||
"windows": [
|
||||
"main"
|
||||
],
|
||||
"windows": ["main"],
|
||||
"permissions": [
|
||||
"core:default",
|
||||
"shell:allow-open",
|
||||
@@ -14,6 +12,7 @@
|
||||
"core:window:allow-start-dragging",
|
||||
"core:window:allow-minimize",
|
||||
"core:window:allow-close",
|
||||
"cors-fetch:default",
|
||||
"fs:default",
|
||||
{
|
||||
"identifier": "fs:allow-write",
|
||||
|
@@ -137,7 +137,7 @@ fn find_osu_installation() -> Option<String> {
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
let mut builder = tauri::Builder::default().plugin(tauri_plugin_fs::init());
|
||||
let mut builder = tauri::Builder::default();
|
||||
#[cfg(desktop)]
|
||||
{
|
||||
builder = builder.plugin(tauri_plugin_single_instance::init(|app, _args, _cwd| {
|
||||
@@ -155,8 +155,10 @@ pub fn run() {
|
||||
find_osu_installation,
|
||||
valid_osu_folder
|
||||
])
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.plugin(tauri_plugin_cors_fetch::init())
|
||||
.plugin(tauri_plugin_sql::Builder::default().build())
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
|
@@ -20,6 +20,7 @@
|
||||
"maximizable": false
|
||||
}
|
||||
],
|
||||
"withGlobalTauri": true,
|
||||
"security": {
|
||||
"csp": null
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import ky from 'ky';
|
||||
import type { EZPPUser } from '@/types';
|
||||
import { betterFetch } from '@better-fetch/fetch';
|
||||
|
||||
const BANCHO_ENDPOINT = 'https://c.ez-pp.farm/';
|
||||
const ENDPOINT = 'https://ez-pp.farm/';
|
||||
@@ -7,8 +8,8 @@ export const ezppfarm = {
|
||||
ping: async (): Promise<number | undefined> => {
|
||||
try {
|
||||
const start = Date.now();
|
||||
const request = await ky(BANCHO_ENDPOINT);
|
||||
if (!request.ok) return undefined;
|
||||
const request = await betterFetch(BANCHO_ENDPOINT);
|
||||
if (request.error) return undefined;
|
||||
const ping = Date.now() - start;
|
||||
return ping;
|
||||
} catch {
|
||||
@@ -31,28 +32,23 @@ export const ezppfarm = {
|
||||
}
|
||||
| undefined
|
||||
> => {
|
||||
try {
|
||||
const request = await ky(`${ENDPOINT}login/check`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ username, password }),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'User-Agent': 'EZPPLauncher',
|
||||
},
|
||||
});
|
||||
if (!request.ok) return undefined;
|
||||
return await request.json<{
|
||||
code: number;
|
||||
message: string;
|
||||
user?: {
|
||||
id: number;
|
||||
donor: boolean;
|
||||
name: string;
|
||||
email: string;
|
||||
};
|
||||
}>();
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
const request = await betterFetch<{
|
||||
code: number;
|
||||
message: string;
|
||||
user?: EZPPUser;
|
||||
}>('https://ez-pp.farm/login/check', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
username: username,
|
||||
password: password,
|
||||
}),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'User-Agent':
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0',
|
||||
},
|
||||
});
|
||||
if (request.error) return undefined;
|
||||
return request.data;
|
||||
},
|
||||
};
|
||||
|
@@ -1,11 +1,9 @@
|
||||
import ky from "ky";
|
||||
|
||||
const API_ENDPOINT = "https://osu.direct/api/";
|
||||
|
||||
export const osudirect = {
|
||||
osu: async (mapId: number): Promise<string | undefined> => {
|
||||
try {
|
||||
return await ky(API_ENDPOINT + `osu/${mapId}?raw`).text();
|
||||
return await (await fetch(API_ENDPOINT + `osu/${mapId}?raw`)).text();
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
|
Reference in New Issue
Block a user