🔨 chore(deps): bump npm tauri

This commit is contained in:
Pauline 2024-07-12 19:59:26 +02:00
parent be867a9c8d
commit fe660d2e0d
No known key found for this signature in database
GPG key ID: 722BB181973296AE
21 changed files with 1329 additions and 1628 deletions

View file

@ -19,17 +19,17 @@ authors = [
]
[workspace.dependencies]
tauri = { version = "2.0.0-beta", features = [
tauri = { version = "=2.0.0-beta.22", features = [
"rustls-tls",
"tracing",
"specta"
] }
tauri-build = { version = "2.0.0-beta" }
tauri-plugin-authenticator = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
tauri-plugin-shell = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
tauri-plugin-updater = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2", features = [ "rustls-tls" ] }
tauri-plugin-authenticator = { version = "2.0.0-beta" }
tauri-plugin-shell = { version = "2.0.0-beta" }
tauri-plugin-window-state = { version = "2.0.0-beta" }
tauri-plugin-single-instance = { version = "2.0.0-beta" }
tauri-plugin-updater = { version = "2.0.0-beta", features = [ "rustls-tls" ] }
rspc = { version = "0.2.0", features = [ "specta2" ] }
specta = { version = "=2.0.0-rc.12", features = [
@ -58,7 +58,7 @@ prisma-client-rust-cli = { git = "https://github.com/brendonovich/prisma-client-
], default-features = false }
prisma-client-rust-sdk = { git = "https://github.com/brendonovich/prisma-client-rust", rev = "4f9ef9d38ca732162accff72b2eb684d2f120bab", features = [ "sqlite" ], default-features = false }
interpulse = { git = "https://github.com/pulseflow/workers", rev = "d946e86da93e110468c9e436dccc84139f353496", features = [ "specta" ] }
interpulse = { git = "https://github.com/pulseflow/workers", rev = "abc6fb0f263a6f3a5e1fa5810f7ee9d2ad61e8b8", features = [ "specta" ] }
tracing = { version = "0.1" }
tracing-subscriber = { version = "0.3", features = [
@ -143,8 +143,9 @@ cocoa = { version = "0.25" }
objc = { version = "0.2" }
[patch.crates-io]
specta = { git = "https://github.com/oscartbeaumont/specta", rev = "fadef54000e131008ff6e9dd7efe2ba36479c077" }
rspc = { git = "https://github.com/oscartbeaumont/rspc", rev = "f250409db9e21a67ae252c963d605f863f73d5f0" }
specta = { git = "https://github.com/oscartbeaumont/specta", rev = "13fd87c6a1e5c64f296ff76f113314ed6a3fe685" } # main branch
rspc = { git = "https://github.com/oscartbeaumont/rspc", rev = "9e56e7f5161043f1834594e38bb2bdcdb485d57a" } # v0.x branch
# tauri-specta = { git = "https://github.com/oscartbeaumont/tauri-specta", rev = "a49885967adc01c80e33962e3ecac25fe7497839" } # main branch
[profile.dev]
# add debug symbols/logic and optimize for reduced build time (parallel)

View file

@ -14,14 +14,14 @@
"main": "./src/index.ts",
"types": "./src/index.ts",
"dependencies": {
"@rspc/client": "^0.2.0",
"@rspc/solid": "^0.2.0",
"@rspc/client": "^0.2.2",
"@rspc/solid": "^0.2.1",
"@rspc/tauri": "^0.2.0",
"@solid-primitives/deep": "^0.2.8",
"@tanstack/solid-query": "^5.45.0",
"@solid-primitives/deep": "^0.2.9",
"@tanstack/solid-query": "^5.51.2",
"fast-equals": "^5.0.1",
"plausible-tracker": "^0.3.9",
"solid-js": "^1.8.17",
"solid-js": "^1.8.18",
"zod": "^3.23.8"
}
}

View file

@ -227,9 +227,9 @@ pub(crate) async fn get_loader_version(
_ => return Err(CreateClusterError::MissingManifest(loader.to_string()).into()),
};
let loader_meta = loader_meta
.to_owned()
.ok_or(anyhow!("missing loader meta"))?;
let loader_meta = loader_meta
.to_owned()
.ok_or(anyhow!("missing loader meta"))?;
let loaders = &loader_meta
.game_versions

View file

@ -312,7 +312,10 @@ pub async fn get_optimal_java_version(path: &ClusterPath) -> crate::Result<Optio
let state = State::get().await?;
if let Some(cluster) = get(path, None).await? {
let metadata = state.metadata.read().await;
let minecraft_metadata = metadata.minecraft.to_owned().ok_or(anyhow!("misisng minecraft metadata"))?;
let minecraft_metadata = metadata
.minecraft
.to_owned()
.ok_or(anyhow!("misisng minecraft metadata"))?;
let version = minecraft_metadata
.versions

View file

@ -9,7 +9,13 @@ pub use interpulse::api::modded::Manifest;
#[tracing::instrument]
pub async fn get_minecraft_versions() -> crate::Result<VersionManifest> {
let state = State::get().await?;
let meta = state.metadata.read().await.minecraft.clone().ok_or(anyhow!("missing minecraft metadata"))?;
let meta = state
.metadata
.read()
.await
.minecraft
.clone()
.ok_or(anyhow!("missing minecraft metadata"))?;
Ok(meta)
}
@ -18,7 +24,13 @@ pub async fn get_minecraft_versions() -> crate::Result<VersionManifest> {
#[tracing::instrument]
pub async fn get_fabric_versions() -> crate::Result<Manifest> {
let state = State::get().await?;
let meta = state.metadata.read().await.fabric.clone().ok_or(anyhow!("missing fabric metadata"))?;
let meta = state
.metadata
.read()
.await
.fabric
.clone()
.ok_or(anyhow!("missing fabric metadata"))?;
Ok(meta)
}
@ -27,7 +39,13 @@ pub async fn get_fabric_versions() -> crate::Result<Manifest> {
#[tracing::instrument]
pub async fn get_quilt_versions() -> crate::Result<Manifest> {
let state = State::get().await?;
let meta = state.metadata.read().await.quilt.clone().ok_or(anyhow!("missing quilt metadata"))?;
let meta = state
.metadata
.read()
.await
.quilt
.clone()
.ok_or(anyhow!("missing quilt metadata"))?;
Ok(meta)
}
@ -36,7 +54,13 @@ pub async fn get_quilt_versions() -> crate::Result<Manifest> {
#[tracing::instrument]
pub async fn get_forge_versions() -> crate::Result<Manifest> {
let state = State::get().await?;
let meta = state.metadata.read().await.forge.clone().ok_or(anyhow!("missing forge metadata"))?;
let meta = state
.metadata
.read()
.await
.forge
.clone()
.ok_or(anyhow!("missing forge metadata"))?;
Ok(meta)
}
@ -45,7 +69,13 @@ pub async fn get_forge_versions() -> crate::Result<Manifest> {
#[tracing::instrument]
pub async fn get_neoforge_versions() -> crate::Result<Manifest> {
let state = State::get().await?;
let meta = state.metadata.read().await.neoforge.clone().ok_or(anyhow!("missing neoforce metadata"))?;
let meta = state
.metadata
.read()
.await
.neoforge
.clone()
.ok_or(anyhow!("missing neoforce metadata"))?;
Ok(meta)
}
@ -54,7 +84,13 @@ pub async fn get_neoforge_versions() -> crate::Result<Manifest> {
#[tracing::instrument]
pub async fn get_legacy_fabric_versions() -> crate::Result<Manifest> {
let state = State::get().await?;
let meta = state.metadata.read().await.legacy_fabric.clone().ok_or(anyhow!("missing legacyfabric metadata"))?;
let meta = state
.metadata
.read()
.await
.legacy_fabric
.clone()
.ok_or(anyhow!("missing legacyfabric metadata"))?;
Ok(meta)
}

View file

@ -72,8 +72,11 @@ pub async fn install_minecraft(
let instance_path = &io::canonicalize(cluster.get_full_path().await?)?;
let metadata = state.metadata.read().await;
let version_manifest = metadata.minecraft.to_owned().ok_or(anyhow!("missing metadata"))?;
let version_manifest = metadata
.minecraft
.to_owned()
.ok_or(anyhow!("missing metadata"))?;
let version_idx = version_manifest
.versions
.iter()
@ -86,7 +89,7 @@ pub async fn install_minecraft(
let version = &version_manifest.versions[version_idx];
let updated = version_idx
<= version_manifest
.versions
.versions
.iter()
.position(|g| g.id == "22w16a")
.unwrap_or(0); // LWJGL patching
@ -274,7 +277,10 @@ pub async fn launch_minecraft(
let instance_path = cluster.get_full_path().await?;
let instance_path = &io::canonicalize(instance_path)?;
let version_manifest = metadata.minecraft.to_owned().ok_or(anyhow!("missing minecraft metadata"))?;
let version_manifest = metadata
.minecraft
.to_owned()
.ok_or(anyhow!("missing minecraft metadata"))?;
let version_index = version_manifest
.versions

View file

@ -80,14 +80,14 @@ impl Metadata {
// forge,
// legacy_fabric,
// })
Ok(Self {
minecraft: None,
fabric: None,
quilt: None,
neoforge: None,
forge: None,
legacy_fabric: None
})
Ok(Self {
minecraft: None,
fabric: None,
quilt: None,
neoforge: None,
forge: None,
legacy_fabric: None,
})
}
/// Initialize the core Metadata manager.

View file

@ -15,12 +15,12 @@ const CURRENT_FORMAT_VERSION: u32 = 1;
pub struct Settings {
/// A OneLauncher [`Theme`] managed by the core GUI.
pub theme: Theme,
/// Does not ask for confirmation when closing the OneLauncher GUI
#[serde(default)]
pub hide_close_prompt: bool,
/// Disables animations in the OneLauncher GUI
#[serde(default)]
pub disable_animations: bool,
/// Does not ask for confirmation when closing the OneLauncher GUI
#[serde(default)]
pub hide_close_prompt: bool,
/// Disables animations in the OneLauncher GUI
#[serde(default)]
pub disable_animations: bool,
/// A global fullscreen Minecraft state.
#[serde(default)]
pub force_fullscreen: bool,
@ -95,8 +95,8 @@ impl Settings {
} else {
let settings = Self {
theme: Theme::Dark,
hide_close_prompt: false,
disable_animations: false,
hide_close_prompt: false,
disable_animations: false,
force_fullscreen: false,
resolution: Resolution::default(),
java_versions: JavaVersions::new(),

View file

@ -19,21 +19,21 @@
"@iconify-json/logos": "^1.1.43",
"@leeoniya/ufuzzy": "^1.0.14",
"@onelauncher/client": "workspace:*",
"@rspc/client": "^0.2.0",
"@rspc/solid": "^0.2.0",
"@rspc/client": "^0.2.2",
"@rspc/solid": "^0.2.1",
"@rspc/tauri": "^0.2.0",
"@solid-primitives/refs": "^1.0.8",
"@solidjs/router": "^0.13.5",
"@tanstack/solid-query": "^5.45.0",
"@solidjs/router": "^0.14.1",
"@tanstack/solid-query": "^5.51.2",
"@tauri-apps/api": "^2.0.0-beta.13",
"@tauri-apps/plugin-clipboard-manager": "2.1.0-beta.3",
"@tauri-apps/plugin-clipboard-manager": "2.1.0-beta.4",
"@tauri-apps/plugin-shell": "github:tauri-apps/tauri-plugin-shell#v2",
"@thisbeyond/solid-dnd": "^0.7.5",
"@unocss/reset": "^0.61.0",
"@untitled-theme/icons-solid": "^0.10.0",
"overlayscrollbars": "^2.8.3",
"@unocss/reset": "^0.61.3",
"@untitled-theme/icons-solid": "^0.10.4",
"overlayscrollbars": "^2.9.2",
"overlayscrollbars-solid": "^0.5.5",
"solid-js": "^1.8.17",
"solid-js": "^1.8.18",
"solid-transition-group": "^0.2.3",
"uuid": "^10.0.0"
},
@ -41,10 +41,10 @@
"@solidjs/testing-library": "^0.8.8",
"@tauri-apps/cli": "^2.0.0-beta.20",
"@testing-library/jest-dom": "^6.4.6",
"@types/uuid": "^9.0.8",
"@types/uuid": "^10.0.0",
"jsdom": "^24.1.0",
"sass": "^1.77.6",
"unocss": "^0.61.0",
"sass": "^1.77.8",
"unocss": "^0.61.3",
"vite-plugin-solid": "^2.10.2",
"vite-plugin-solid-svg": "^0.8.1",
"vite-tsconfig-paths": "^4.3.2"

View file

@ -26,7 +26,6 @@ tauri-build = { workspace = true, features = [
[dependencies]
onelauncher = { path = "../../core", features = [ "tauri" ] }
interpulse = { workspace = true, features = [ "bincode" ] }
tauri = { workspace = true, features = [
"isolation",
@ -44,6 +43,8 @@ tauri-plugin-authenticator = { workspace = true }
tauri-specta = { workspace = true }
specta = { workspace = true }
interpulse.workspace = true
tokio = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }

View file

@ -14,7 +14,7 @@ fn main() {
"get_manifest",
"get_settings",
"set_settings",
"get_program_info"
"get_program_info",
]),
),
)

View file

@ -26,7 +26,7 @@ macro_rules! collect_commands {
get_clusters,
get_settings,
set_settings,
get_program_info
get_program_info
])
}};
}
@ -70,7 +70,7 @@ pub async fn create_cluster(props: CreateCluster) -> Result<Uuid, String> {
// #[specta::specta]
// #[tauri::command]
// pub fn update_cluster(cluster: Cluster) -> Result<(), String> {
// }
fn placeholder_cluster() -> Cluster {
@ -139,30 +139,29 @@ pub async fn set_settings(settings: Settings) -> Result<(), String> {
settings::set(settings).await.map_err(|err| err.into())
}
#[derive(Serialize, Deserialize, Type)]
pub struct ProgramInfo {
launcher_version: String,
webview_version: String,
tauri_version: String,
dev_build: bool,
platform: String,
arch: String
launcher_version: String,
webview_version: String,
tauri_version: String,
dev_build: bool,
platform: String,
arch: String,
}
#[specta::specta]
#[tauri::command]
pub fn get_program_info() -> ProgramInfo {
let webview_version = tauri::webview_version().unwrap_or("UNKNOWN".into());
let webview_version = tauri::webview_version().unwrap_or("UNKNOWN".into());
let tauri_version = tauri::VERSION;
let dev_build = tauri::is_dev();
ProgramInfo {
launcher_version: VERSION.into(),
webview_version,
tauri_version: tauri_version.into(),
dev_build,
platform: TARGET_OS.into(),
arch: NATIVE_ARCH.into()
}
ProgramInfo {
launcher_version: VERSION.into(),
webview_version,
tauri_version: tauri_version.into(),
dev_build,
platform: TARGET_OS.into(),
arch: NATIVE_ARCH.into(),
}
}

View file

@ -37,14 +37,14 @@ pub async fn run() {
pub async fn run_app<F: FnOnce(&mut tauri::App) + Send + 'static>(setup: F) {
let builder = tauri::Builder::default()
.plugin(tauri_plugin_shell::init())
.plugin(tauri_plugin_single_instance::init(|app, argv, cwd| {
println!("{}, {argv:?}, {cwd}", app.package_info().name);
app.emit("single-instance", SingleInstancePayload { args: argv, cwd })
.unwrap();
}))
.plugin(tauri_plugin_updater::Builder::new().build())
.plugin(tauri_plugin_clipboard_manager::init())
.plugin(tauri_plugin_shell::init())
.plugin(tauri_plugin_single_instance::init(|app, argv, cwd| {
println!("{}, {argv:?}, {cwd}", app.package_info().name);
app.emit("single-instance", SingleInstancePayload { args: argv, cwd })
.unwrap();
}))
.plugin(tauri_plugin_updater::Builder::new().build())
.plugin(tauri_plugin_clipboard_manager::init())
.plugin(ext::updater::plugin())
.manage(ext::updater::State::default())
.plugin(tauri_plugin_window_state::Builder::default().build())

View file

@ -53,7 +53,7 @@ function Sidebar(props: SidebarProps) {
onClick={() => goto(link[2])}
class={
`px-3 py-1 rounded-md text-md hover:bg-component-bg-hover active:bg-component-bg-pressed ${isActive(link[2]) ? 'bg-gray-05' : ''}`
}
}
>
<span class="flex flex-row items-center gap-x-3 *:w-5">
{link[0]}

View file

@ -41,19 +41,19 @@ function Dropdown(props: DropdownProps) {
split.component
? split.component({ visible, setVisible, children: items })
: (
<Button
class="h-full w-full"
buttonStyle="secondary"
onClick={() => setVisible(true)}
iconRight={<ChevronDownIcon />}
>
<div
class="flex-1 flex flex-row items-center text-nowrap gap-1 h-full overflow-hidden"
<Button
class="h-full w-full"
buttonStyle="secondary"
onClick={() => setVisible(true)}
iconRight={<ChevronDownIcon />}
>
<span>{split.text}</span>
{items()[selected()]}
</div>
</Button>
<div
class="flex-1 flex flex-row items-center text-nowrap gap-1 h-full overflow-hidden"
>
<span>{split.text}</span>
{items()[selected()]}
</div>
</Button>
)
);

View file

@ -15,9 +15,9 @@ function ModalButton(button: { props: ModalButtonProps }) {
<>
{typeof button.props === 'string'
? (
<Button>
{button.props}
</Button>
<Button>
{button.props}
</Button>
)
: (
button.props

View file

@ -1,10 +1,7 @@
import { EyeIcon, FlipBackwardIcon, Globe02Icon, InfoCircleIcon, LayoutTopIcon, Maximize01Icon, XIcon } from '@untitled-theme/icons-solid';
import { EyeIcon, LayoutTopIcon, Maximize01Icon, XIcon } from '@untitled-theme/icons-solid';
import { Show } from 'solid-js';
import Button from '~ui/components/base/Button';
import Dropdown from '~ui/components/base/Dropdown';
import TextField from '~ui/components/base/TextField';
import Toggle from '~ui/components/base/Toggle';
import Tooltip from '~ui/components/base/Tooltip';
import ScrollableContainer from '~ui/components/ScrollableContainer';
import SettingsRow from '~ui/components/SettingsRow';
import Sidebar from '~ui/components/Sidebar';

View file

@ -4,7 +4,6 @@ import petal from '@flowr/eslint-config';
export default petal({
typescript: true,
solid: true,
gitignore: true,
unocss: false,
toml: {
overrides: {
@ -19,9 +18,10 @@ export default petal({
'**/dist',
'**/.temp',
'**/*.svg',
'**/gen',
'*.rs',
'pnpm-lock.yaml',
'**/node_modules',
'**/node_modules',
'desktop/src/bindings.ts',
],
}).append([

View file

@ -17,22 +17,22 @@
"client": "pnpm --filter @onelauncher/client",
"dev": "pnpm gui tauri dev",
"build": "pnpm gui tauri build",
"lint": "eslint . --cache",
"lint": "pnpm eslint . --cache",
"format": "pnpm lint --fix",
"release:node": "bumpp -r"
"release:node": "pnpm bumpp -r"
},
"devDependencies": {
"@flowr/eslint-config": "^3.7.0",
"@types/node": "^20.14.3",
"@vitest/ui": "^1.6.0",
"@flowr/eslint-config": "^3.8.6",
"@types/node": "^20.14.10",
"@vitest/ui": "^2.0.2",
"bumpp": "^9.4.1",
"eslint": "^8.56.0",
"eslint-plugin-solid": "^0.14.0",
"eslint": "^9.6.0",
"eslint-plugin-solid": "^0.14.1",
"ts-node": "^10.9.2",
"tsx": "^4.15.6",
"typescript": "^5.4.5",
"vite": "^5.3.1",
"vitest": "^1.6.0"
"tsx": "^4.16.2",
"typescript": "^5.5.3",
"vite": "^5.3.3",
"vitest": "^2.0.2"
},
"pnpm": {
"patchDependencies": {

2674
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -17,11 +17,11 @@
"tauri": "tsx tauri.ts"
},
"dependencies": {
"@flowr/utils": "^3.7.0",
"@flowr/utils": "^3.8.6",
"@iarna/toml": "^2.2.5",
"execa": "^9.2.0",
"execa": "^9.3.0",
"semver": "^7.6.2",
"undici": "^6.19.1"
"undici": "^6.19.2"
},
"devDependencies": {
"@types/iarna__toml": "^2.0.5",