From ed1fa5b5bbb37ab5c925b7a8ee5581c8ce8c6f43 Mon Sep 17 00:00:00 2001 From: Hannes <33062605+HannesGitH@users.noreply.github.com> Date: Sun, 10 Nov 2024 16:33:27 +0100 Subject: [PATCH 1/6] trial 1 to add flake --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 37 +++++++++++++++++++++++++++++++++++++ nix/pkgs/tauri.nix | 31 +++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 nix/pkgs/tauri.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..8dcbdd4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1730785428, + "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..25bc551 --- /dev/null +++ b/flake.nix @@ -0,0 +1,37 @@ +{ + description = "NeoHTop flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = { nixpkgs, ... }: + let + inherit (nixpkgs) lib; + systems = ["aarch64-darwin"]; + forAllSystems = lib.genAttrs systems; + spkgs = system : nixpkgs.legacyPackages.${system}.pkgs; + in + { + packages = forAllSystems (system: with spkgs system; rec { + # tauri = callPackage ./nix/pkgs/tauri.nix { }; + # taurihook = cargo-tauri.hook.override { cargo-tauri = tauri; }; + # neohtop = buildNpmPackage { + # name = "neohtop"; + # src = ./.; + # nativeBuildInputs = [ taurihook ]; + # cargoRoot = "src-tauri"; + # npmDeps = importNpmLock { + # npmRoot = ./.; + # }; + # npmConfigHook = importNpmLock.npmConfigHook; + # }; + # default = neohtop; + }); + devShells = forAllSystems (system: with spkgs system; { + default = mkShell { + buildInputs = [ cargo rustc nodejs ]; + }; + }); + }; +} diff --git a/nix/pkgs/tauri.nix b/nix/pkgs/tauri.nix new file mode 100644 index 0000000..a650fd3 --- /dev/null +++ b/nix/pkgs/tauri.nix @@ -0,0 +1,31 @@ +{ fetchFromGitHub +, cargo-tauri +, rustPlatform +}: +let + version = "2.1.0"; + src = fetchFromGitHub { + owner = "tauri-apps"; + repo = "tauri"; + rev = "tauri-v${version}"; + hash = "sha256-7usmUaAK9HIjrBvq+wquAlI5KuAQA/VFhDp6trxvDAQ="; + }; +in cargo-tauri.overrideAttrs (drv: rec { + inherit src version; + # cargoDeps = drv.cargoDeps.overrideAttrs (lib.const { + # inherit src; + # name = "tauri-${version}-vendor.tar.gz"; + # sourceRoot = "${src.name}/tooling/cli"; + # }); + # # buildInputs = [ gcc clang pkg-config ]; + patchPhase = '' + cp -r ../../Cargo.lock . + ''; + cargoDeps = rustPlatform.importCargoLock { + lockFile = "${src}/Cargo.lock"; + outputHashes = { + "schemars_derive-0.8.21" = "sha256-AmxBKZXm2Eb+w8/hLQWTol5f22uP8UqaIh+LVLbS20g="; + }; + }; + sourceRoot = "${src.name}/crates/tauri-cli"; +}) \ No newline at end of file From 038ad8f469ed174189ac1606b0a2403130abe0d2 Mon Sep 17 00:00:00 2001 From: Hannes <33062605+HannesGitH@users.noreply.github.com> Date: Sun, 10 Nov 2024 17:52:17 +0100 Subject: [PATCH 2/6] nehm ich einfach tauri von wem anders --- flake.lock | 19 ++++++++++++++++++- flake.nix | 31 +++++++++++++++++-------------- nix/pkgs/tauri.nix | 31 ------------------------------- 3 files changed, 35 insertions(+), 46 deletions(-) delete mode 100644 nix/pkgs/tauri.nix diff --git a/flake.lock b/flake.lock index 8dcbdd4..8c902a0 100644 --- a/flake.lock +++ b/flake.lock @@ -16,9 +16,26 @@ "type": "github" } }, + "nixpkgs-getchoo-tauri": { + "locked": { + "lastModified": 1731084262, + "narHash": "sha256-/o85ENIXwwFmQqG+cn1z///8fAtTEeuZ9OMeoBvd6Dw=", + "owner": "getchoo-contrib", + "repo": "nixpkgs", + "rev": "1b7aa1c39a9252741afa3dcf0f6c347442800608", + "type": "github" + }, + "original": { + "owner": "getchoo-contrib", + "ref": "pkgs/cargo-tauri/2.0.1", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgs-getchoo-tauri": "nixpkgs-getchoo-tauri" } } }, diff --git a/flake.nix b/flake.nix index 25bc551..893ff18 100644 --- a/flake.nix +++ b/flake.nix @@ -3,9 +3,10 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + nixpkgs-getchoo-tauri.url = "github:getchoo-contrib/nixpkgs?ref=pkgs/cargo-tauri/2.0.1"; }; - outputs = { nixpkgs, ... }: + outputs = inputs@{ nixpkgs, ... }: let inherit (nixpkgs) lib; systems = ["aarch64-darwin"]; @@ -14,19 +15,21 @@ in { packages = forAllSystems (system: with spkgs system; rec { - # tauri = callPackage ./nix/pkgs/tauri.nix { }; - # taurihook = cargo-tauri.hook.override { cargo-tauri = tauri; }; - # neohtop = buildNpmPackage { - # name = "neohtop"; - # src = ./.; - # nativeBuildInputs = [ taurihook ]; - # cargoRoot = "src-tauri"; - # npmDeps = importNpmLock { - # npmRoot = ./.; - # }; - # npmConfigHook = importNpmLock.npmConfigHook; - # }; - # default = neohtop; + getchoo = inputs.nixpkgs-getchoo-tauri.legacyPackages.${system}; + tauri = getchoo.pkgs.cargo-tauri; + neohtop = rustPlatform.buildRustPackage rec { + name = "neoHtop"; + src = ./.; + nativeBuildInputs = [ tauri.hook npmHooks.npmConfigHook nodejs ]; + cargoRoot = "src-tauri"; + cargoLock = { + lockFile = src-tauri/Cargo.lock; + }; + npmDeps = importNpmLock { + npmRoot = ./.; + }; + }; + default = neohtop; }); devShells = forAllSystems (system: with spkgs system; { default = mkShell { diff --git a/nix/pkgs/tauri.nix b/nix/pkgs/tauri.nix deleted file mode 100644 index a650fd3..0000000 --- a/nix/pkgs/tauri.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ fetchFromGitHub -, cargo-tauri -, rustPlatform -}: -let - version = "2.1.0"; - src = fetchFromGitHub { - owner = "tauri-apps"; - repo = "tauri"; - rev = "tauri-v${version}"; - hash = "sha256-7usmUaAK9HIjrBvq+wquAlI5KuAQA/VFhDp6trxvDAQ="; - }; -in cargo-tauri.overrideAttrs (drv: rec { - inherit src version; - # cargoDeps = drv.cargoDeps.overrideAttrs (lib.const { - # inherit src; - # name = "tauri-${version}-vendor.tar.gz"; - # sourceRoot = "${src.name}/tooling/cli"; - # }); - # # buildInputs = [ gcc clang pkg-config ]; - patchPhase = '' - cp -r ../../Cargo.lock . - ''; - cargoDeps = rustPlatform.importCargoLock { - lockFile = "${src}/Cargo.lock"; - outputHashes = { - "schemars_derive-0.8.21" = "sha256-AmxBKZXm2Eb+w8/hLQWTol5f22uP8UqaIh+LVLbS20g="; - }; - }; - sourceRoot = "${src.name}/crates/tauri-cli"; -}) \ No newline at end of file From 13ce0f7709a76ae7d7e849b1276de3ded93a244c Mon Sep 17 00:00:00 2001 From: Hannes <33062605+HannesGitH@users.noreply.github.com> Date: Sun, 10 Nov 2024 21:53:17 +0100 Subject: [PATCH 3/6] made build reproducible --- flake.lock | 16 +- flake.nix | 15 +- nix/patches/dontbundle.patch | 13 + package-lock.json | 2 +- src-tauri/Cargo.lock | 913 +++++++++++++++++++++++++++++------ src-tauri/Cargo.toml | 4 + 6 files changed, 793 insertions(+), 170 deletions(-) create mode 100644 nix/patches/dontbundle.patch diff --git a/flake.lock b/flake.lock index 8c902a0..1dd9334 100644 --- a/flake.lock +++ b/flake.lock @@ -16,18 +16,18 @@ "type": "github" } }, - "nixpkgs-getchoo-tauri": { + "nixpkgs2": { "locked": { - "lastModified": 1731084262, - "narHash": "sha256-/o85ENIXwwFmQqG+cn1z///8fAtTEeuZ9OMeoBvd6Dw=", - "owner": "getchoo-contrib", + "lastModified": 1731267546, + "narHash": "sha256-KWCYNrarlef3oXh2ykB5um6LGIKS9v7clnP90S6t5aM=", + "owner": "hannesGitH", "repo": "nixpkgs", - "rev": "1b7aa1c39a9252741afa3dcf0f6c347442800608", + "rev": "b50499f326b0399a86a6408060ddcb323595de96", "type": "github" }, "original": { - "owner": "getchoo-contrib", - "ref": "pkgs/cargo-tauri/2.0.1", + "owner": "hannesGitH", + "ref": "tauri2", "repo": "nixpkgs", "type": "github" } @@ -35,7 +35,7 @@ "root": { "inputs": { "nixpkgs": "nixpkgs", - "nixpkgs-getchoo-tauri": "nixpkgs-getchoo-tauri" + "nixpkgs2": "nixpkgs2" } } }, diff --git a/flake.nix b/flake.nix index 893ff18..dc4ffd0 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,8 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; - nixpkgs-getchoo-tauri.url = "github:getchoo-contrib/nixpkgs?ref=pkgs/cargo-tauri/2.0.1"; + # as upstream nixpkgs doesn't have tauri 2, we use a fork + nixpkgs2.url = "github:hannesGitH/nixpkgs?ref=tauri2"; }; outputs = inputs@{ nixpkgs, ... }: @@ -15,12 +16,12 @@ in { packages = forAllSystems (system: with spkgs system; rec { - getchoo = inputs.nixpkgs-getchoo-tauri.legacyPackages.${system}; - tauri = getchoo.pkgs.cargo-tauri; + remote2 = inputs.nixpkgs2.legacyPackages.${system}; + tauri = remote2.pkgs.cargo-tauri; neohtop = rustPlatform.buildRustPackage rec { name = "neoHtop"; src = ./.; - nativeBuildInputs = [ tauri.hook npmHooks.npmConfigHook nodejs ]; + nativeBuildInputs = [ tauri.hook npmConfigHook nodejs ]; cargoRoot = "src-tauri"; cargoLock = { lockFile = src-tauri/Cargo.lock; @@ -28,6 +29,12 @@ npmDeps = importNpmLock { npmRoot = ./.; }; + patches = [ + ./nix/patches/dontbundle.patch + ]; + tauriFlags = "-vvv"; + npmConfigHook = importNpmLock.npmConfigHook; + # npmConfigHook = npmHooks.npmConfigHook; }; default = neohtop; }); diff --git a/nix/patches/dontbundle.patch b/nix/patches/dontbundle.patch new file mode 100644 index 0000000..6f605ee --- /dev/null +++ b/nix/patches/dontbundle.patch @@ -0,0 +1,13 @@ +diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json +index e753646..d187a86 100644 +--- a/src-tauri/tauri.conf.json ++++ b/src-tauri/tauri.conf.json +@@ -7,7 +7,7 @@ + "devUrl": "http://localhost:1420" + }, + "bundle": { +- "active": true, ++ "active": false, + "icon": [ + "icons/32x32.png", + "icons/128x128.png", diff --git a/package-lock.json b/package-lock.json index cabd2f6..8431102 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "macos-task-manager", - "version": "1.0.5", + "version": "1.0.8", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 24d1e3d..fcfd6a0 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -58,9 +58,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.91" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "atk" @@ -85,6 +85,12 @@ dependencies = [ "system-deps", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.4.0" @@ -216,7 +222,7 @@ dependencies = [ "glib", "libc", "once_cell", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -259,7 +265,7 @@ dependencies = [ "semver", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -274,9 +280,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.31" +version = "1.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "40545c26d092346d8a8dab71ee48e7685a7a9cba76e634790c215b41a4a7b4cf" dependencies = [ "shlex", ] @@ -342,9 +348,9 @@ dependencies = [ "bitflags 2.6.0", "block", "cocoa-foundation", - "core-foundation", + "core-foundation 0.10.0", "core-graphics", - "foreign-types", + "foreign-types 0.5.0", "libc", "objc", ] @@ -357,7 +363,7 @@ checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d" dependencies = [ "bitflags 2.6.0", "block", - "core-foundation", + "core-foundation 0.10.0", "core-graphics-types", "libc", "objc", @@ -379,6 +385,26 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "cookie" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" +dependencies = [ + "time", + "version_check", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation" version = "0.10.0" @@ -402,9 +428,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" dependencies = [ "bitflags 2.6.0", - "core-foundation", + "core-foundation 0.10.0", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "libc", ] @@ -415,7 +441,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ "bitflags 2.6.0", - "core-foundation", + "core-foundation 0.10.0", "libc", ] @@ -505,7 +531,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -515,7 +541,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -539,7 +565,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -550,7 +576,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -573,7 +599,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -613,6 +639,17 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "dlopen2" version = "0.7.0" @@ -633,7 +670,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -680,9 +717,9 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "embed-resource" -version = "2.5.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e24052d7be71f0efb50c201557f6fe7d237cfd5a64fd5bcd7fd8fe32dbbffa" +checksum = "b68b6f9f63a0b6a38bc447d4ce84e2b388f3ec95c99c641c8ff0dd3ef89a6379" dependencies = [ "cc", "memchr", @@ -698,6 +735,15 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -714,6 +760,22 @@ dependencies = [ "typeid", ] +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fastrand" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" + [[package]] name = "fdeflate" version = "0.3.6" @@ -743,21 +805,21 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "fluent-uri" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c704e9dbe1ddd863da1e6ff3567795087b1eb201ce80d8fa81162e1516500d" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared 0.1.1", +] + [[package]] name = "foreign-types" version = "0.5.0" @@ -765,7 +827,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" dependencies = [ "foreign-types-macros", - "foreign-types-shared", + "foreign-types-shared 0.3.1", ] [[package]] @@ -776,9 +838,15 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "foreign-types-shared" version = "0.3.1" @@ -844,7 +912,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -1038,7 +1106,7 @@ dependencies = [ "once_cell", "pin-project-lite", "smallvec", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1074,7 +1142,7 @@ dependencies = [ "memchr", "once_cell", "smallvec", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1088,7 +1156,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -1167,7 +1235,26 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", +] + +[[package]] +name = "h2" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap 2.6.0", + "slab", + "tokio", + "tokio-util", + "tracing", ] [[package]] @@ -1178,9 +1265,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" [[package]] name = "heck" @@ -1269,6 +1356,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", + "h2", "http", "http-body", "httparse", @@ -1279,6 +1367,39 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + [[package]] name = "hyper-util" version = "0.1.10" @@ -1331,6 +1452,124 @@ dependencies = [ "png", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1339,12 +1578,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1365,7 +1615,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.1", "serde", ] @@ -1439,7 +1689,7 @@ dependencies = [ "combine", "jni-sys", "log", - "thiserror", + "thiserror 1.0.69", "walkdir", "windows-sys 0.45.0", ] @@ -1459,39 +1709,16 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "json-patch" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b1fb8864823fad91877e6caea0baca82e49e8db50f8e5c9f9a453e27d3330fc" -dependencies = [ - "jsonptr 0.4.7", - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "json-patch" version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08" dependencies = [ - "jsonptr 0.6.3", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "jsonptr" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c6e529149475ca0b2820835d3dce8fcc41c6b943ca608d32f35b449255e4627" -dependencies = [ - "fluent-uri", + "jsonptr", "serde", "serde_json", + "thiserror 1.0.69", ] [[package]] @@ -1560,9 +1787,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.161" +version = "0.2.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" +checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" [[package]] name = "libloading" @@ -1584,6 +1811,18 @@ dependencies = [ "libc", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -1610,6 +1849,8 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" name = "macos-task-manager" version = "1.0.8" dependencies = [ + "hyper-tls", + "reqwest", "serde", "serde_json", "sysinfo", @@ -1705,10 +1946,27 @@ dependencies = [ "once_cell", "png", "serde", - "thiserror", + "thiserror 1.0.69", "windows-sys 0.59.0", ] +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "ndk" version = "0.9.0" @@ -1721,7 +1979,7 @@ dependencies = [ "ndk-sys", "num_enum", "raw-window-handle", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1793,7 +2051,7 @@ dependencies = [ "proc-macro-crate 2.0.2", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -2038,6 +2296,50 @@ version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +[[package]] +name = "openssl" +version = "0.10.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "foreign-types 0.3.2", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "option-ext" version = "0.2.0" @@ -2202,7 +2504,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -2498,7 +2800,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom 0.2.15", "libredox", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2538,25 +2840,33 @@ checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "base64 0.22.1", "bytes", + "encoding_rs", "futures-core", "futures-util", + "h2", "http", "http-body", "http-body-util", "hyper", + "hyper-rustls", + "hyper-tls", "hyper-util", "ipnet", "js-sys", "log", "mime", + "native-tls", "once_cell", "percent-encoding", "pin-project-lite", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", + "system-configuration", "tokio", + "tokio-native-tls", "tokio-util", "tower-service", "url", @@ -2567,6 +2877,21 @@ dependencies = [ "windows-registry", ] +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.15", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + [[package]] name = "rustc-demangle" version = "0.1.24" @@ -2582,6 +2907,58 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.23.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "ryu" version = "1.0.18" @@ -2597,6 +2974,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "schannel" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "schemars" version = "0.8.21" @@ -2621,7 +3007,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -2630,6 +3016,29 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "selectors" version = "0.22.0" @@ -2687,7 +3096,7 @@ checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -2698,7 +3107,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -2721,7 +3130,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -2772,7 +3181,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -2870,7 +3279,7 @@ dependencies = [ "bytemuck", "cfg_aliases", "core-graphics", - "foreign-types", + "foreign-types 0.5.0", "js-sys", "log", "objc2", @@ -2909,6 +3318,12 @@ dependencies = [ "system-deps", ] +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -2947,6 +3362,12 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + [[package]] name = "swift-rs" version = "1.0.7" @@ -2971,9 +3392,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.85" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -2989,6 +3410,17 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "sysinfo" version = "0.29.11" @@ -3004,6 +3436,27 @@ dependencies = [ "winapi", ] +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.6.0", + "core-foundation 0.9.4", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "system-deps" version = "6.2.2" @@ -3019,13 +3472,13 @@ dependencies = [ [[package]] name = "tao" -version = "0.30.5" +version = "0.30.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63f1f6b2017cc33d7f6fc9c6186a2c0f5dfc985899a7b4fe9e64985c17533db3" +checksum = "833b4d43383d76d5078d72f3acd977f47eb5b6751eb40baa665d13828e7b79df" dependencies = [ "bitflags 2.6.0", "cocoa", - "core-foundation", + "core-foundation 0.10.0", "core-graphics", "crossbeam-channel", "dispatch", @@ -3064,7 +3517,7 @@ checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -3075,9 +3528,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.0.6" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3889b392db6d32a105d3757230ea0220090b8f94c90d3e60b6c5eb91178ab1b" +checksum = "c24f1ab82d336e09f5f1094a4d9227c99ac26cce263bfdf8136897cc6db6f1d0" dependencies = [ "anyhow", "bytes", @@ -3112,7 +3565,7 @@ dependencies = [ "tauri-runtime", "tauri-runtime-wry", "tauri-utils", - "thiserror", + "thiserror 2.0.2", "tokio", "tray-icon", "url", @@ -3125,16 +3578,16 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.2" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f96827ccfb1aa40d55d0ded79562d18ba18566657a553f992a982d755148376" +checksum = "7bd2a4bcfaf5fb9f4be72520eefcb61ae565038f8ccba2a497d8c28f463b8c01" dependencies = [ "anyhow", "cargo_toml", "dirs", "glob", "heck 0.5.0", - "json-patch 3.0.1", + "json-patch", "schemars", "semver", "serde", @@ -3147,14 +3600,14 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.2" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947f16f47becd9e9cd39b74ee337fd1981574d78819be18e4384d85e5a0b82f" +checksum = "bf79faeecf301d3e969b1fae977039edb77a4c1f25cc0a961be298b54bff97cf" dependencies = [ "base64 0.22.1", "brotli", "ico", - "json-patch 2.0.0", + "json-patch", "plist", "png", "proc-macro2", @@ -3163,9 +3616,9 @@ dependencies = [ "serde", "serde_json", "sha2", - "syn 2.0.85", + "syn 2.0.87", "tauri-utils", - "thiserror", + "thiserror 2.0.2", "time", "url", "uuid", @@ -3174,23 +3627,23 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.2" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd1c8d4a66799d3438747c3a79705cd665a95d6f24cb5f315413ff7a981fe2a" +checksum = "c52027c8c5afb83166dacddc092ee8fff50772f9646d461d8c33ee887e447a03" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", "tauri-codegen", "tauri-utils", ] [[package]] name = "tauri-runtime" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ef7363e7229ac8d04e8a5d405670dbd43dde8fc4bc3bc56105c35452d03784" +checksum = "cce18d43f80d4aba3aa8a0c953bbe835f3d0f2370aca75e8dbb14bd4bab27958" dependencies = [ "dpi", "gtk", @@ -3200,16 +3653,16 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "thiserror", + "thiserror 2.0.2", "url", "windows", ] [[package]] name = "tauri-runtime-wry" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62fa2068e8498ad007b54d5773d03d57c3ff6dd96f8c8ce58beff44d0d5e0d30" +checksum = "9f442a38863e10129ffe2cec7bd09c2dcf8a098a3a27801a476a304d5bb991d2" dependencies = [ "gtk", "http", @@ -3233,9 +3686,9 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc65d6f5c54e56b66258948a6d9e47a82ea41f4b5a7612bfbdd1634c2913ed0" +checksum = "9271a88f99b4adea0dc71d0baca4505475a0bbd139fb135f62958721aaa8fe54" dependencies = [ "brotli", "cargo_metadata", @@ -3243,8 +3696,9 @@ dependencies = [ "dunce", "glob", "html5ever", + "http", "infer", - "json-patch 2.0.0", + "json-patch", "kuchikiki", "log", "memchr", @@ -3259,7 +3713,7 @@ dependencies = [ "serde_json", "serde_with", "swift-rs", - "thiserror", + "thiserror 2.0.2", "toml 0.8.2", "url", "urlpattern", @@ -3277,6 +3731,19 @@ dependencies = [ "toml 0.7.8", ] +[[package]] +name = "tempfile" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + [[package]] name = "tendril" version = "0.4.3" @@ -3296,22 +3763,42 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.65" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037e29b009aa709f293b974da5cd33b15783c049e07f8435778ce8c4871525d8" +dependencies = [ + "thiserror-impl 2.0.2", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] name = "thiserror-impl" -version = "1.0.65" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" +checksum = "ea4778c7e8ff768bdb32a58a2349903859fe719a320300d7d4ce8636f19a1e69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -3346,25 +3833,20 @@ dependencies = [ ] [[package]] -name = "tinyvec" -version = "1.8.0" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ - "tinyvec_macros", + "displaydoc", + "zerovec", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" -version = "1.41.0" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", @@ -3375,6 +3857,27 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-util" version = "0.7.12" @@ -3489,7 +3992,7 @@ dependencies = [ "once_cell", "png", "serde", - "thiserror", + "thiserror 1.0.69", "windows-sys 0.59.0", ] @@ -3552,38 +4055,29 @@ dependencies = [ "unic-common", ] -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-ident" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", @@ -3609,6 +4103,18 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" version = "1.11.0" @@ -3619,6 +4125,12 @@ dependencies = [ "serde", ] +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version-compare" version = "0.2.0" @@ -3704,7 +4216,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -3738,7 +4250,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3838,7 +4350,7 @@ checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -3847,7 +4359,7 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3a3e2eeb58f82361c93f9777014668eb3d07e7d174ee4c819575a9208011886" dependencies = [ - "thiserror", + "thiserror 1.0.69", "windows", "windows-core 0.58.0", ] @@ -3937,7 +4449,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -3948,7 +4460,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -4223,14 +4735,27 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wry" -version = "0.46.3" +version = "0.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd5cdf57c66813d97601181349c63b96994b3074fc3d7a31a8cce96e968e3bbd" +checksum = "553ca1ce149982123962fac2506aa75b8b76288779a77e72b12fa2fc34938647" dependencies = [ "base64 0.22.1", "block2", + "cookie", "crossbeam-channel", "dpi", "dunce", @@ -4254,7 +4779,8 @@ dependencies = [ "sha2", "soup3", "tao-macros", - "thiserror", + "thiserror 1.0.69", + "url", "webkit2gtk", "webkit2gtk-sys", "webview2-com", @@ -4285,6 +4811,30 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -4303,5 +4853,54 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 6c861c5..c070ce4 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -13,6 +13,10 @@ serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } tauri = { version = "2", features = [] } sysinfo = "0.29.0" +# currently needed for tauri by nix, caused by https://github.com/rust-lang/cargo/issues/10801 +hyper-tls = "^0.6" +reqwest = "^0.12" +# [features] default = [ "custom-protocol" ] From cf8c6f2b39a7e1b6646858a43797537b0ffea669 Mon Sep 17 00:00:00 2001 From: Hannes <33062605+HannesGitH@users.noreply.github.com> Date: Sun, 10 Nov 2024 22:30:33 +0100 Subject: [PATCH 4/6] flake patch not needed --- flake.nix | 7 ++----- nix/patches/dontbundle.patch | 13 ------------- 2 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 nix/patches/dontbundle.patch diff --git a/flake.nix b/flake.nix index dc4ffd0..76d1fe5 100644 --- a/flake.nix +++ b/flake.nix @@ -29,12 +29,9 @@ npmDeps = importNpmLock { npmRoot = ./.; }; - patches = [ - ./nix/patches/dontbundle.patch - ]; - tauriFlags = "-vvv"; + tauriBuildFlags = "--no-bundle"; npmConfigHook = importNpmLock.npmConfigHook; - # npmConfigHook = npmHooks.npmConfigHook; + checkPhase = true; }; default = neohtop; }); diff --git a/nix/patches/dontbundle.patch b/nix/patches/dontbundle.patch deleted file mode 100644 index 6f605ee..0000000 --- a/nix/patches/dontbundle.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json -index e753646..d187a86 100644 ---- a/src-tauri/tauri.conf.json -+++ b/src-tauri/tauri.conf.json -@@ -7,7 +7,7 @@ - "devUrl": "http://localhost:1420" - }, - "bundle": { -- "active": true, -+ "active": false, - "icon": [ - "icons/32x32.png", - "icons/128x128.png", From c240e7f71894df1a6f2a2244b787a4493dd3b067 Mon Sep 17 00:00:00 2001 From: Hannes <33062605+HannesGitH@users.noreply.github.com> Date: Sun, 10 Nov 2024 22:35:35 +0100 Subject: [PATCH 5/6] merge: upstream/main --- .github/workflows/build-check.yml | 2 + .github/workflows/format-check.yml | 25 + .husky/pre-commit | 4 + .prettierrc | 4 + README.md | 28 + docs/index.html | 22 + docs/styles.css | 1 + package-lock.json | 801 +++++++++++++++- package.json | 20 +- src-tauri/Cargo.lock | 115 ++- src-tauri/Cargo.toml | 3 +- src-tauri/capabilities/default.json | 26 +- src-tauri/src/main.rs | 223 +++-- src-tauri/tauri.conf.json | 6 +- src/app.css | 5 +- src/app.html | 24 +- src/lib/components/AppInfo.svelte | 1 + src/lib/components/ProcessDetailsModal.svelte | 296 +++++- src/lib/components/ProcessTable.svelte | 12 +- src/lib/components/StatsBar.svelte | 6 + src/lib/components/ThemeSwitcher.svelte | 13 +- src/lib/components/TitleBar.svelte | 112 +++ src/lib/components/ToolBar.svelte | 152 ++- src/lib/stores/config.ts | 36 + src/lib/stores/index.ts | 43 +- src/lib/styles/index.ts | 874 +++++++++--------- src/lib/types/config.ts | 37 + src/lib/types/index.ts | 7 + src/lib/utils/index.ts | 10 +- src/routes/+page.svelte | 375 ++++++-- vite.config.js | 1 - 31 files changed, 2572 insertions(+), 712 deletions(-) create mode 100644 .github/workflows/format-check.yml create mode 100755 .husky/pre-commit create mode 100644 .prettierrc create mode 100644 src/lib/components/TitleBar.svelte create mode 100644 src/lib/stores/config.ts create mode 100644 src/lib/types/config.ts diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 0ef31e4..1ccb161 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -3,6 +3,8 @@ name: Build Check on: pull_request: branches: [ main ] + paths: + - 'src-tauri/**' env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml new file mode 100644 index 0000000..ebdc1c5 --- /dev/null +++ b/.github/workflows/format-check.yml @@ -0,0 +1,25 @@ +name: Format Check + +on: + pull_request: + branches: [ main ] + +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + + - name: Install dependencies + run: npm ci + + - name: Check formatting + run: npm run format:check diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..a4fc325 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npm exec lint-staged diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..6b78363 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "plugins": ["prettier-plugin-svelte"], + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] +} diff --git a/README.md b/README.md index c9341a2..d6b5610 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,36 @@ npm run tauri dev # Build for production npm run tauri build + +# Build for local mac(Bypass code signing) +npm run tauri build -- --bundles app --config "{\"bundle\":{\"macOS\":{\"signingIdentity\":null}}}" +``` + +### Development Setup + +The project uses pre-commit hooks to ensure code consistency. After cloning and installing dependencies, the pre-commit hooks will be automatically installed. + +#### Code Formatting + +We use Prettier for web code and `cargo fmt` for Rust code. Format your code using: + +```bash +# Format all files +npm run format + +# Check formatting without making changes +npm run format:check ``` +The pre-commit hook will automatically format your code when you commit, but you can run the formatter manually at any time. + +#### Pull Requests + +Before submitting a PR, please ensure: +1. All code is formatted (`npm run format`) +2. The format check passes (`npm run format:check`) +3. Your commits follow the project's commit message conventions + ## Contributing We welcome contributions from the community! Please see our [contributing guidelines](./.github/CONTRIBUTING.md) for more information. diff --git a/docs/index.html b/docs/index.html index 2f9f6fd..efae48e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -196,6 +196,14 @@

x86_64

Universal Linux + + 📦 +
+ .rpm Package + Fedora/RHEL x86_64 +
+
@@ -216,6 +224,14 @@

ARM64

Universal Linux ARM64 + + 📦 +
+ .rpm Package + Fedora/RHEL ARM64 +
+
@@ -420,12 +436,18 @@

Tech Stack

case 'linux-appimage-x64': newHref = `https://github.com/Abdenasser/neohtop/releases/download/v${versionNumber}/NeoHtop_${versionNumber}_x86_64.AppImage`; break; + case 'linux-rpm-x64': + newHref = `https://github.com/Abdenasser/neohtop/releases/download/v${versionNumber}/NeoHtop_${versionNumber}_x86_64.rpm`; + break; case 'linux-deb-arm64': newHref = `https://github.com/Abdenasser/neohtop/releases/download/v${versionNumber}/NeoHtop_${versionNumber}_aarch64.deb`; break; case 'linux-appimage-arm64': newHref = `https://github.com/Abdenasser/neohtop/releases/download/v${versionNumber}/NeoHtop_${versionNumber}_aarch64.AppImage`; break; + case 'linux-rpm-arm64': + newHref = `https://github.com/Abdenasser/neohtop/releases/download/v${versionNumber}/NeoHtop_${versionNumber}_aarch64.rpm`; + break; } if (newHref) { diff --git a/docs/styles.css b/docs/styles.css index 1349533..d4375ef 100644 --- a/docs/styles.css +++ b/docs/styles.css @@ -1229,6 +1229,7 @@ footer { font-size: 2.5rem; margin-bottom: 1rem; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); + background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; } diff --git a/package-lock.json b/package-lock.json index 8431102..9e6af88 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,18 @@ { "name": "macos-task-manager", - "version": "1.0.8", + "version": "1.0.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "macos-task-manager", - "version": "1.0.5", + "version": "1.0.9", "license": "MIT", "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.6.0", "@fortawesome/free-solid-svg-icons": "^6.6.0", "@tauri-apps/api": "^2.0.3", + "@tauri-apps/plugin-shell": "^2.0.1", "simple-icons": "^13.15.0", "svelte-fa": "^4.0.3" }, @@ -20,6 +21,10 @@ "@sveltejs/kit": "^2.7.0", "@sveltejs/vite-plugin-svelte": "^4.0.0", "@tauri-apps/cli": "^2.0.4", + "husky": "^8.0.0", + "lint-staged": "^15.2.10", + "prettier": "^3.3.3", + "prettier-plugin-svelte": "^3.2.7", "svelte": "^5.0.0", "svelte-check": "^4.0.0", "typescript": "^5.5.0", @@ -1062,6 +1067,14 @@ "node": ">= 10" } }, + "node_modules/@tauri-apps/plugin-shell": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-shell/-/plugin-shell-2.0.1.tgz", + "integrity": "sha512-akU1b77sw3qHiynrK0s930y8zKmcdrSD60htjH+mFZqv5WaakZA/XxHR3/sF1nNv9Mgmt/Shls37HwnOr00aSw==", + "dependencies": { + "@tauri-apps/api": "^2.0.0" + } + }, "node_modules/@types/cookie": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", @@ -1096,6 +1109,48 @@ "acorn": ">=8.9.0" } }, + "node_modules/ansi-escapes": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", + "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "environment": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/aria-query": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", @@ -1114,6 +1169,32 @@ "node": ">= 0.4" } }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/chokidar": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", @@ -1130,6 +1211,56 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "dev": true, + "license": "MIT", + "dependencies": { + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/cookie": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", @@ -1140,6 +1271,21 @@ "node": ">= 0.6" } }, + "node_modules/cross-spawn": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/debug": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", @@ -1175,6 +1321,26 @@ "dev": true, "license": "MIT" }, + "node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true, + "license": "MIT" + }, + "node_modules/environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/esbuild": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", @@ -1230,6 +1396,37 @@ "@types/estree": "^1.0.1" } }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true, + "license": "MIT" + }, + "node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, "node_modules/fdir": { "version": "6.4.2", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz", @@ -1245,6 +1442,19 @@ } } }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -1260,6 +1470,32 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/get-east-asian-width": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", + "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globalyzer": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", @@ -1274,6 +1510,32 @@ "dev": true, "license": "MIT" }, + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "dev": true, + "license": "MIT", + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/import-meta-resolve": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", @@ -1285,6 +1547,29 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/is-reference": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", @@ -1294,6 +1579,26 @@ "@types/estree": "*" } }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, "node_modules/kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", @@ -1304,12 +1609,124 @@ "node": ">=6" } }, + "node_modules/lilconfig": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", + "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lint-staged": { + "version": "15.2.10", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.10.tgz", + "integrity": "sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "~5.3.0", + "commander": "~12.1.0", + "debug": "~4.3.6", + "execa": "~8.0.1", + "lilconfig": "~3.1.2", + "listr2": "~8.2.4", + "micromatch": "~4.0.8", + "pidtree": "~0.6.0", + "string-argv": "~0.3.2", + "yaml": "~2.5.0" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" + } + }, + "node_modules/listr2": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.5.tgz", + "integrity": "sha512-iyAZCeyD+c1gPyE9qpFu8af0Y+MRtmKOncdGoA2S5EY8iFq99dmmvkNnHiWo+pj0s7yH7l3KPIgee77tKpXPWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.1.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/locate-character": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", "license": "MIT" }, + "node_modules/log-update": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, "node_modules/magic-string": { "version": "0.30.12", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", @@ -1319,6 +1736,66 @@ "@jridgewell/sourcemap-codec": "^1.5.0" } }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", @@ -1365,6 +1842,61 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -1372,6 +1904,34 @@ "dev": true, "license": "ISC" }, + "node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true, + "license": "MIT", + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/postcss": { "version": "8.4.47", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", @@ -1401,6 +1961,33 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-svelte": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.2.7.tgz", + "integrity": "sha512-/Dswx/ea0lV34If1eDcG3nulQ63YNr5KPDfMsjbdtpSWOxKKJ7nAc2qlVuYwEvCr4raIuredNoR7K4JCkmTGaQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "prettier": "^3.0.0", + "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" + } + }, "node_modules/readdirp": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", @@ -1415,6 +2002,46 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true, + "license": "MIT" + }, "node_modules/rollup": { "version": "4.24.3", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.3.tgz", @@ -1473,6 +2100,42 @@ "dev": true, "license": "MIT" }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/simple-icons": { "version": "13.15.0", "resolved": "https://registry.npmjs.org/simple-icons/-/simple-icons-13.15.0.tgz", @@ -1501,6 +2164,23 @@ "node": ">=18" } }, + "node_modules/slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -1511,6 +2191,63 @@ "node": ">=0.10.0" } }, + "node_modules/string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/svelte": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.1.6.tgz", @@ -1579,6 +2316,19 @@ "globrex": "^0.1.2" } }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/totalist": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", @@ -1682,6 +2432,53 @@ } } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/yaml": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", + "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/zimmerframe": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.2.tgz", diff --git a/package.json b/package.json index 6ad4ee1..2310f6a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "macos-task-manager", - "version": "1.0.8", + "version": "1.1.0", "description": "", "type": "module", "scripts": { @@ -9,13 +9,17 @@ "preview": "vite preview", "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch", - "tauri": "tauri" + "tauri": "tauri", + "format": "prettier --write ./src && cargo fmt --manifest-path src-tauri/Cargo.toml", + "format:check": "prettier --check ./src && cargo fmt --manifest-path src-tauri/Cargo.toml -- --check", + "prepare": "husky install" }, "license": "MIT", "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.6.0", "@fortawesome/free-solid-svg-icons": "^6.6.0", "@tauri-apps/api": "^2.0.3", + "@tauri-apps/plugin-shell": "^2.0.1", "simple-icons": "^13.15.0", "svelte-fa": "^4.0.3" }, @@ -24,9 +28,21 @@ "@sveltejs/kit": "^2.7.0", "@sveltejs/vite-plugin-svelte": "^4.0.0", "@tauri-apps/cli": "^2.0.4", + "husky": "^8.0.0", + "lint-staged": "^15.2.10", + "prettier": "^3.3.3", + "prettier-plugin-svelte": "^3.2.7", "svelte": "^5.0.0", "svelte-check": "^4.0.0", "typescript": "^5.5.0", "vite": "^5.4.10" + }, + "lint-staged": { + "src/**/*.{js,ts,jsx,tsx,svelte}": [ + "prettier --write" + ], + "src-tauri/**/*.rs": [ + "cargo fmt --manifest-path src-tauri/Cargo.toml --" + ] } } diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index fcfd6a0..d393108 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1643,6 +1643,25 @@ version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + [[package]] name = "itoa" version = "0.4.8" @@ -1847,7 +1866,7 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] name = "macos-task-manager" -version = "1.0.8" +version = "1.1.0" dependencies = [ "hyper-tls", "reqwest", @@ -1856,6 +1875,7 @@ dependencies = [ "sysinfo", "tauri", "tauri-build", + "tauri-plugin-shell", ] [[package]] @@ -2296,6 +2316,17 @@ version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +[[package]] +name = "open" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3" +dependencies = [ + "is-wsl", + "libc", + "pathdiff", +] + [[package]] name = "openssl" version = "0.10.68" @@ -2346,6 +2377,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "os_pipe" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "pango" version = "0.18.3" @@ -2394,6 +2435,12 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "pathdiff" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361" + [[package]] name = "percent-encoding" version = "2.3.1" @@ -3227,6 +3274,16 @@ dependencies = [ "digest", ] +[[package]] +name = "shared_child" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fa9338aed9a1df411814a5b2252f7cd206c55ae9bf2fa763f8de84603aa60c" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "shlex" version = "1.3.0" @@ -3565,7 +3622,7 @@ dependencies = [ "tauri-runtime", "tauri-runtime-wry", "tauri-utils", - "thiserror 2.0.2", + "thiserror 2.0.3", "tokio", "tray-icon", "url", @@ -3618,7 +3675,7 @@ dependencies = [ "sha2", "syn 2.0.87", "tauri-utils", - "thiserror 2.0.2", + "thiserror 2.0.3", "time", "url", "uuid", @@ -3639,6 +3696,44 @@ dependencies = [ "tauri-utils", ] +[[package]] +name = "tauri-plugin" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e753f2a30933a9bbf0a202fa47d7cc4a3401f06e8d6dcc53b79aa62954828c79" +dependencies = [ + "anyhow", + "glob", + "plist", + "schemars", + "serde", + "serde_json", + "tauri-utils", + "toml 0.8.2", + "walkdir", +] + +[[package]] +name = "tauri-plugin-shell" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ad7880c5586b6b2104be451e3d7fc0f3800c84bda69e9ba81c828f87cb34267" +dependencies = [ + "encoding_rs", + "log", + "open", + "os_pipe", + "regex", + "schemars", + "serde", + "serde_json", + "shared_child", + "tauri", + "tauri-plugin", + "thiserror 1.0.69", + "tokio", +] + [[package]] name = "tauri-runtime" version = "2.2.0" @@ -3653,7 +3748,7 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "thiserror 2.0.2", + "thiserror 2.0.3", "url", "windows", ] @@ -3713,7 +3808,7 @@ dependencies = [ "serde_json", "serde_with", "swift-rs", - "thiserror 2.0.2", + "thiserror 2.0.3", "toml 0.8.2", "url", "urlpattern", @@ -3772,11 +3867,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.2" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037e29b009aa709f293b974da5cd33b15783c049e07f8435778ce8c4871525d8" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" dependencies = [ - "thiserror-impl 2.0.2", + "thiserror-impl 2.0.3", ] [[package]] @@ -3792,9 +3887,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.2" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4778c7e8ff768bdb32a58a2349903859fe719a320300d7d4ce8636f19a1e69" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" dependencies = [ "proc-macro2", "quote", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index c070ce4..14819a3 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "macos-task-manager" -version = "1.0.8" +version = "1.1.0" description = "A Tauri App" authors = ["you"] edition = "2021" @@ -13,6 +13,7 @@ serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } tauri = { version = "2", features = [] } sysinfo = "0.29.0" +tauri-plugin-shell = "2" # currently needed for tauri by nix, caused by https://github.com/rust-lang/cargo/issues/10801 hyper-tls = "^0.6" reqwest = "^0.12" diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index fbe338b..841a1bf 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -1,11 +1,17 @@ { - "$schema": "../gen/schemas/desktop-schema.json", - "identifier": "default", - "description": "Capability for the main window", - "windows": ["main"], - "permissions": [ - "core:default", - "core:app:allow-version" - ] - } - \ No newline at end of file + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "default", + "description": "Capability for the main window", + "windows": [ + "main" + ], + "permissions": [ + "core:default", + "core:app:allow-version", + "core:window:allow-start-dragging", + "core:window:allow-maximize", + "core:window:allow-minimize", + "core:window:allow-close", + "shell:default" + ] +} \ No newline at end of file diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 0b3e98a..8ab9031 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,20 +1,13 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] +use std::collections::HashMap; +use std::sync::Mutex; +use std::time::{Instant, SystemTime, UNIX_EPOCH}; use sysinfo::{ - System, - ProcessStatus, - NetworksExt, - NetworkExt, - DiskExt, + CpuExt, Disk, DiskExt, NetworkExt, NetworksExt, PidExt, ProcessExt, ProcessStatus, System, SystemExt, - CpuExt, - ProcessExt, - PidExt, }; use tauri::State; -use std::sync::Mutex; -use std::collections::HashMap; -use std::time::Instant; struct AppState { sys: Mutex, @@ -26,11 +19,19 @@ impl AppState { pub fn new() -> Self { let mut sys = System::new(); sys.refresh_all(); - + // Initialize network stats - let initial_rx = sys.networks().iter().map(|(_, data)| data.total_received()).sum(); - let initial_tx = sys.networks().iter().map(|(_, data)| data.total_transmitted()).sum(); - + let initial_rx = sys + .networks() + .iter() + .map(|(_, data)| data.total_received()) + .sum(); + let initial_tx = sys + .networks() + .iter() + .map(|(_, data)| data.total_transmitted()) + .sum(); + Self { sys: Mutex::new(sys), process_cache: Mutex::new(HashMap::new()), @@ -57,6 +58,13 @@ struct ProcessInfo { user: String, command: String, threads: Option, + environ: Vec, + root: String, + virtual_memory: u64, + start_time: u64, + run_time: u64, + disk_usage: (u64, u64), // (read_bytes, written_bytes) + session_id: Option, } #[derive(serde::Serialize)] @@ -75,24 +83,58 @@ pub struct SystemStats { pub disk_free_bytes: u64, } +// Assume MacOS or Linux +#[cfg(not(target_os = "windows"))] +fn filter_disks(disks: &[Disk]) -> Vec<&sysinfo::Disk> { + disks + .iter() + .filter(|disk| { + // Filter for physical disks - typically those mounted at "/" + disk.mount_point() == std::path::Path::new("/") + }) + .collect() +} + +#[cfg(target_os = "windows")] +fn filter_disks(disks: &[Disk]) -> Vec<&sysinfo::Disk> { + disks.iter().collect() +} + #[tauri::command] -async fn get_processes(state: State<'_, AppState>) -> Result<(Vec, SystemStats), String> { +async fn get_processes( + state: State<'_, AppState>, +) -> Result<(Vec, SystemStats), String> { let processes_data; let system_stats; - + + // Get current time once for all calculations + let current_time = SystemTime::now() + .duration_since(UNIX_EPOCH) + .map_err(|e| e.to_string())? + .as_secs(); + // Scope for system lock { - let mut sys = state.sys.lock().map_err(|_| "Failed to lock system state")?; + let mut sys = state + .sys + .lock() + .map_err(|_| "Failed to lock system state")?; sys.refresh_all(); - sys.refresh_networks(); + sys.refresh_networks_list(); sys.refresh_disks_list(); - sys.refresh_disks(); // Collect all the process data we need while holding sys lock processes_data = sys .processes() .iter() .map(|(pid, process)| { + let start_time = process.start_time(); + let run_time = if start_time > 0 { + current_time.saturating_sub(start_time) + } else { + 0 + }; + ( pid.as_u32(), process.name().to_string(), @@ -102,17 +144,36 @@ async fn get_processes(state: State<'_, AppState>) -> Result<(Vec, process.memory(), process.status(), process.parent().map(|p| p.as_u32()), + process.environ().to_vec(), + process.root().to_string_lossy().into_owned(), + process.virtual_memory(), + start_time, + run_time, // Use calculated run_time + process.disk_usage().read_bytes, + process.disk_usage().written_bytes, + process.session_id().map(|id| id.as_u32()), ) }) .collect::>(); // Calculate total network I/O - let mut last_update = state.last_network_update.lock().map_err(|_| "Failed to lock network state")?; + let mut last_update = state + .last_network_update + .lock() + .map_err(|_| "Failed to lock network state")?; let elapsed = last_update.0.elapsed().as_secs_f64(); let current_time = Instant::now(); - let current_rx: u64 = sys.networks().iter().map(|(_, data)| data.total_received()).sum(); - let current_tx: u64 = sys.networks().iter().map(|(_, data)| data.total_transmitted()).sum(); + let current_rx: u64 = sys + .networks() + .iter() + .map(|(_, data)| data.total_received()) + .sum(); + let current_tx: u64 = sys + .networks() + .iter() + .map(|(_, data)| data.total_transmitted()) + .sum(); let network_stats = ( ((current_rx - last_update.1) as f64 / elapsed) as u64, @@ -121,17 +182,14 @@ async fn get_processes(state: State<'_, AppState>) -> Result<(Vec, *last_update = (current_time, current_rx, current_tx); - // Calculate total disk usage - only for physical disks - let disk_stats = sys.disks().iter() - .filter(|disk| { - // Filter for physical disks - typically those mounted at "/" - disk.mount_point() == std::path::Path::new("/") - }) + // Calculate total disk usage + let disk_stats = filter_disks(&sys.disks()) + .iter() .fold((0, 0, 0), |acc, disk| { ( acc.0 + disk.total_space(), acc.1 + disk.total_space() - disk.available_space(), - acc.2 + disk.available_space() + acc.2 + disk.available_space(), ) }); @@ -140,9 +198,14 @@ async fn get_processes(state: State<'_, AppState>) -> Result<(Vec, memory_total: sys.total_memory(), memory_used: sys.used_memory(), memory_free: sys.total_memory() - sys.used_memory(), - memory_cached: sys.total_memory() - (sys.used_memory() + (sys.total_memory() - sys.used_memory())), + memory_cached: sys.total_memory() + - (sys.used_memory() + (sys.total_memory() - sys.used_memory())), uptime: sys.uptime(), - load_avg: [sys.load_average().one, sys.load_average().five, sys.load_average().fifteen], + load_avg: [ + sys.load_average().one, + sys.load_average().five, + sys.load_average().fifteen, + ], network_rx_bytes: network_stats.0, network_tx_bytes: network_stats.1, disk_total_bytes: disk_stats.0, @@ -152,39 +215,68 @@ async fn get_processes(state: State<'_, AppState>) -> Result<(Vec, } // sys lock is automatically dropped here // Now lock the process cache - let mut process_cache = state.process_cache.lock().map_err(|_| "Failed to lock process cache")?; + let mut process_cache = state + .process_cache + .lock() + .map_err(|_| "Failed to lock process cache")?; // Build the process info list let processes = processes_data .into_iter() - .map(|(pid, name, cmd, user_id, cpu_usage, memory, status, ppid)| { - let static_info = process_cache.entry(pid).or_insert_with(|| { - ProcessStaticInfo { - name: name.clone(), - command: cmd.join(" "), - user: user_id.unwrap_or_else(|| "-".to_string()), - } - }); - - let status_str = match status { - ProcessStatus::Run => "Running", - ProcessStatus::Sleep => "Sleeping", - ProcessStatus::Idle => "Idle", - _ => "Unknown" - }; - - ProcessInfo { + .map( + |( pid, - ppid: ppid.unwrap_or(0), - name: static_info.name.clone(), + name, + cmd, + user_id, cpu_usage, - memory_usage: memory, - status: status_str.to_string(), - user: static_info.user.clone(), - command: static_info.command.clone(), - threads: None, - } - }) + memory, + status, + ppid, + environ, + root, + virtual_memory, + start_time, + run_time, + disk_read, + disk_written, + session_id, + )| { + let static_info = process_cache + .entry(pid) + .or_insert_with(|| ProcessStaticInfo { + name: name.clone(), + command: cmd.join(" "), + user: user_id.unwrap_or_else(|| "-".to_string()), + }); + + let status_str = match status { + ProcessStatus::Run => "Running", + ProcessStatus::Sleep => "Sleeping", + ProcessStatus::Idle => "Idle", + _ => "Unknown", + }; + + ProcessInfo { + pid, + ppid: ppid.unwrap_or(0), + name: static_info.name.clone(), + cpu_usage, + memory_usage: memory, + status: status_str.to_string(), + user: static_info.user.clone(), + command: static_info.command.clone(), + threads: None, + environ, + root, + virtual_memory, + start_time, + run_time, + disk_usage: (disk_read, disk_written), + session_id, + } + }, + ) .collect(); Ok((processes, system_stats)) @@ -192,7 +284,10 @@ async fn get_processes(state: State<'_, AppState>) -> Result<(Vec, #[tauri::command] async fn kill_process(pid: u32, state: State<'_, AppState>) -> Result { - let sys = state.sys.lock().map_err(|_| "Failed to lock system state")?; + let sys = state + .sys + .lock() + .map_err(|_| "Failed to lock system state")?; if let Some(process) = sys.process(sysinfo::Pid::from(pid as usize)) { Ok(process.kill()) } else { @@ -202,11 +297,9 @@ async fn kill_process(pid: u32, state: State<'_, AppState>) -> Result + + + + + NeoHtop + %sveltekit.head% + - - - - - NeoHtop - %sveltekit.head% - - - -
%sveltekit.body%
- - - \ No newline at end of file + +
%sveltekit.body%
+ + diff --git a/src/lib/components/AppInfo.svelte b/src/lib/components/AppInfo.svelte index 020ea52..9a4f77d 100644 --- a/src/lib/components/AppInfo.svelte +++ b/src/lib/components/AppInfo.svelte @@ -86,6 +86,7 @@ {#if showInfo} +
(showInfo = false)}>
{ASCII_ART}
diff --git a/src/lib/components/ProcessDetailsModal.svelte b/src/lib/components/ProcessDetailsModal.svelte index d9e7dc2..c1635cf 100644 --- a/src/lib/components/ProcessDetailsModal.svelte +++ b/src/lib/components/ProcessDetailsModal.svelte @@ -1,60 +1,183 @@ - - {#if process} + + {#if currentProcess}
-
- Name: - {process.name} -
-
- PID: - {process.pid} -
-
- Parent PID: - {process.ppid} -
-
- User: - {process.user} -
-
- Status: - - {@html formatStatus(process.status)} - -
-
- CPU Usage: - {process.cpu_usage.toFixed(1)}% -
-
- Memory Usage: - {formatMemory(process.memory_usage)} -
-
- Command: - {process.command} -
+ +
+

Basic Information

+
+
+ Name: + {currentProcess.name} +
+
+ PID: + {currentProcess.pid} +
+
+ Parent PID: + {currentProcess.ppid} +
+
+ User: + {currentProcess.user} +
+
+ Status: + + {@html formatStatus(currentProcess.status)} + +
+
+
+ + +
+

Resource Usage

+
+ +
+
+ + CPU Usage +
+
+
+
50} + class:critical={currentProcess.cpu_usage > 80} + >
+
+ {currentProcess.cpu_usage.toFixed(1)}% +
+
+ + +
+
+ + Memory Usage +
+
+
Physical: {formatBytes(currentProcess.memory_usage)}
+
Virtual: {formatBytes(currentProcess.virtual_memory)}
+
+
+ + +
+
+ + Disk I/O +
+
+
Read: {formatBytes(currentProcess.disk_usage[0])}
+
Written: {formatBytes(currentProcess.disk_usage[1])}
+
+
+ + +
+
+ + Time Information +
+
+
Started: {formatDate(currentProcess.start_time)}
+
Running: {formatUptime(currentProcess.run_time)}
+
+
+
+
+ + +
+

Process Details

+
+
+ Command: + {currentProcess.command} +
+
+ Root: + {currentProcess.root} +
+ {#if currentProcess.environ.length > 0} +
+ Environment: +
+ {#each currentProcess.environ as env} +
{env}
+ {/each} +
+
+ {/if} +
+
{/if}
diff --git a/src/lib/components/ProcessTable.svelte b/src/lib/components/ProcessTable.svelte index b80e7ee..e0d5d2f 100644 --- a/src/lib/components/ProcessTable.svelte +++ b/src/lib/components/ProcessTable.svelte @@ -12,10 +12,10 @@ export let columns: Column[]; export let systemStats: { memory_total: number } | null; export let sortConfig: { field: keyof Process; direction: "asc" | "desc" }; - export let pinnedProcesses: Set; + export let pinnedProcesses: Set; export let onToggleSort: (field: keyof Process) => void; - export let onTogglePin: (pid: number) => void; + export let onTogglePin: (command: string) => void; export let onShowDetails: (process: Process) => void; export let onKillProcess: (process: Process) => void; @@ -111,7 +111,7 @@ 50 || process.memory_usage / (systemStats?.memory_total || 0) > 0.1} - class:pinned={pinnedProcesses.has(process.pid)} + class:pinned={pinnedProcesses.has(process.command)} > {#each columns.filter((col) => col.visible) as column} @@ -138,9 +138,9 @@
diff --git a/src/lib/components/StatsBar.svelte b/src/lib/components/StatsBar.svelte index 326a5f8..33b5762 100644 --- a/src/lib/components/StatsBar.svelte +++ b/src/lib/components/StatsBar.svelte @@ -46,6 +46,12 @@

CPU Usage

+
+ {formatPercentage( + systemStats.cpu_usage.reduce((a, b) => a + b, 0) / + systemStats.cpu_usage.length, + )} +
{#each systemStats.cpu_usage as usage, i} diff --git a/src/lib/components/ThemeSwitcher.svelte b/src/lib/components/ThemeSwitcher.svelte index 4a51259..56f638d 100644 --- a/src/lib/components/ThemeSwitcher.svelte +++ b/src/lib/components/ThemeSwitcher.svelte @@ -2,6 +2,11 @@ import { themeStore } from "$lib/stores"; import { themes } from "$lib/styles"; import { fade } from "svelte/transition"; + import Fa from "svelte-fa"; + import { + faChevronDown, + faChevronRight, + } from "@fortawesome/free-solid-svg-icons"; let showMenu = false; @@ -65,7 +70,13 @@ >
- {showMenu ? "▼" : "▶"} + + {#if showMenu} + + {:else} + + {/if} + {#if showMenu} diff --git a/src/lib/components/TitleBar.svelte b/src/lib/components/TitleBar.svelte new file mode 100644 index 0000000..85cfcec --- /dev/null +++ b/src/lib/components/TitleBar.svelte @@ -0,0 +1,112 @@ + + +
+
+
NeoHtop
+
+
+
+ + diff --git a/src/lib/components/ToolBar.svelte b/src/lib/components/ToolBar.svelte index 70c5f7c..80c16ff 100644 --- a/src/lib/components/ToolBar.svelte +++ b/src/lib/components/ToolBar.svelte @@ -1,6 +1,15 @@
@@ -46,15 +75,25 @@
- + updateBehaviorConfig("defaultStatusFilter", statusFilter)} + class="select-input" + > {#each statusOptions as option} {/each} @@ -67,6 +106,7 @@ + handleColumnVisibilityChange( + column.id, + e.currentTarget.checked, + )} /> {column.label} @@ -143,12 +194,11 @@
@@ -202,7 +252,9 @@ .search-input { width: 240px; - padding: 6px 12px; + height: 28px; + padding: 0 12px; + padding-right: 70px; border: 1px solid var(--surface1); border-radius: 6px; font-size: 12px; @@ -211,6 +263,43 @@ transition: all 0.2s ease; } + .btn-clear { + position: absolute; + right: 4px; + top: 50%; + transform: translateY(-50%); + padding: 4px 8px; + font-size: 11px; + color: var(--subtext0); + background: var(--surface1); + border: none; + border-radius: 4px; + cursor: pointer; + transition: all 0.2s ease; + } + + .btn-clear:hover { + background: var(--surface2); + color: var(--text); + } + + .search-input::-webkit-search-cancel-button { + -webkit-appearance: none; + height: 14px; + width: 14px; + margin-right: 4px; + background: var(--overlay0); + -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E") + no-repeat 50% 50%; + mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E") + no-repeat 50% 50%; + cursor: pointer; + } + + .search-input::-webkit-search-cancel-button:hover { + background: var(--text); + } + .search-input:hover { background-color: var(--surface1); } @@ -221,23 +310,6 @@ box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 25%, transparent); } - .btn-clear { - padding: 6px 12px; - background: var(--surface0); - border: 1px solid var(--surface1); - border-radius: 6px; - color: var(--text); - font-size: 12px; - cursor: pointer; - transition: all 0.2s ease; - white-space: nowrap; - } - - .btn-clear:hover { - background: var(--surface1); - border-color: var(--surface2); - } - .pagination-controls { display: flex; align-items: center; @@ -349,6 +421,27 @@ border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); z-index: 100; + max-height: 300px; + overflow-y: auto; + min-width: 200px; + } + + .column-menu::-webkit-scrollbar { + width: 8px; + } + + .column-menu::-webkit-scrollbar-track { + background: var(--mantle); + border-radius: 4px; + } + + .column-menu::-webkit-scrollbar-thumb { + background: var(--surface2); + border-radius: 4px; + } + + .column-menu::-webkit-scrollbar-thumb:hover { + background: var(--surface1); } .column-option { @@ -403,6 +496,11 @@ align-items: center; } + .refresh-controls :global(svg) { + font-size: 14px; + color: var(--subtext0); + } + .btn-action { display: inline-flex; align-items: center; diff --git a/src/lib/stores/config.ts b/src/lib/stores/config.ts new file mode 100644 index 0000000..55037b9 --- /dev/null +++ b/src/lib/stores/config.ts @@ -0,0 +1,36 @@ +import { writable } from "svelte/store"; +import type { AppConfig } from "$lib/types/config"; +import { DEFAULT_CONFIG } from "$lib/types/config"; + +function createConfigStore() { + const { subscribe, set, update } = writable(DEFAULT_CONFIG); + + return { + subscribe, + init: () => { + if (typeof window !== "undefined") { + const stored = localStorage.getItem("neohtop_config"); + if (stored) { + try { + const config = JSON.parse(stored); + set({ ...DEFAULT_CONFIG, ...config }); + } catch (e) { + console.error("Failed to parse stored config:", e); + set(DEFAULT_CONFIG); + } + } + } + }, + updateConfig: (newConfig: Partial) => { + update((config) => { + const updated = { ...config, ...newConfig }; + if (typeof window !== "undefined") { + localStorage.setItem("neohtop_config", JSON.stringify(updated)); + } + return updated; + }); + }, + }; +} + +export const configStore = createConfigStore(); diff --git a/src/lib/stores/index.ts b/src/lib/stores/index.ts index 35b2a40..3e14eab 100644 --- a/src/lib/stores/index.ts +++ b/src/lib/stores/index.ts @@ -1,36 +1,49 @@ -import { writable } from 'svelte/store'; -import { themes, type Theme } from '$lib/styles'; +import { writable } from "svelte/store"; +import { themes, type Theme } from "$lib/styles"; function createThemeStore() { - // Get initial theme from localStorage or default to catppuccin - const storedTheme = typeof window !== 'undefined' - ? localStorage.getItem('theme') - : 'catppuccin'; - - const { subscribe, set } = writable(themes[storedTheme || 'catppuccin']); + // Default theme + const defaultTheme = themes.catppuccin; + + // Initialize with default theme + const { subscribe, set } = writable(defaultTheme); + + // Initialize theme on client-side only + if (typeof window !== "undefined") { + const storedTheme = localStorage.getItem("theme"); + if (storedTheme && themes[storedTheme]) { + set(themes[storedTheme]); + } + } return { subscribe, setTheme: (themeName: string) => { const theme = themes[themeName]; if (theme) { - localStorage.setItem('theme', themeName); + if (typeof window !== "undefined") { + localStorage.setItem("theme", themeName); + } set(theme); applyTheme(theme); } }, init: () => { - const theme = themes[storedTheme || 'catppuccin']; + const storedTheme = + typeof window !== "undefined" ? localStorage.getItem("theme") : null; + const theme = (storedTheme && themes[storedTheme]) || defaultTheme; applyTheme(theme); - } + }, }; } function applyTheme(theme: Theme) { - const root = document.documentElement; - Object.entries(theme.colors).forEach(([key, value]) => { - root.style.setProperty(`--${key}`, value); - }); + if (typeof window !== "undefined") { + const root = document.documentElement; + Object.entries(theme.colors).forEach(([key, value]) => { + root.style.setProperty(`--${key}`, value); + }); + } } export const themeStore = createThemeStore(); diff --git a/src/lib/styles/index.ts b/src/lib/styles/index.ts index 7a49a20..36cfa70 100644 --- a/src/lib/styles/index.ts +++ b/src/lib/styles/index.ts @@ -28,516 +28,516 @@ export interface Theme { export const themes: Record = { catppuccin: { - name: 'catppuccin', - label: 'Catppuccin', + name: "catppuccin", + label: "Catppuccin", colors: { - base: '#1e1e2e', - mantle: '#181825', - crust: '#11111b', - text: '#cdd6f4', - subtext0: '#a6adc8', - subtext1: '#bac2de', - surface0: '#313244', - surface1: '#45475a', - surface2: '#585b70', - overlay0: '#6c7086', - overlay1: '#7f849c', - blue: '#89b4fa', - lavender: '#b4befe', - sapphire: '#74c7ec', - sky: '#89dceb', - red: '#f38ba8', - maroon: '#eba0ac', - peach: '#fab387', - yellow: '#f9e2af', - green: '#a6e3a1', - teal: '#94e2d5', + base: "#1e1e2e", + mantle: "#181825", + crust: "#11111b", + text: "#cdd6f4", + subtext0: "#a6adc8", + subtext1: "#bac2de", + surface0: "#313244", + surface1: "#45475a", + surface2: "#585b70", + overlay0: "#6c7086", + overlay1: "#7f849c", + blue: "#89b4fa", + lavender: "#b4befe", + sapphire: "#74c7ec", + sky: "#89dceb", + red: "#f38ba8", + maroon: "#eba0ac", + peach: "#fab387", + yellow: "#f9e2af", + green: "#a6e3a1", + teal: "#94e2d5", }, }, dracula: { - name: 'dracula', - label: 'Dracula', + name: "dracula", + label: "Dracula", colors: { - base: '#282a36', - mantle: '#1e1f29', - crust: '#191a21', - text: '#f8f8f2', - subtext0: '#bfbfbf', - subtext1: '#e6e6e6', - surface0: '#44475a', - surface1: '#6272a4', - surface2: '#7970a9', - overlay0: '#6272a4', - overlay1: '#7970a9', - blue: '#8be9fd', - lavender: '#bd93f9', - sapphire: '#62d6e8', - sky: '#89ddff', - red: '#ff5555', - maroon: '#ff6e6e', - peach: '#ffb86c', - yellow: '#f1fa8c', - green: '#50fa7b', - teal: '#8be9fd', + base: "#282a36", + mantle: "#1e1f29", + crust: "#191a21", + text: "#f8f8f2", + subtext0: "#bfbfbf", + subtext1: "#e6e6e6", + surface0: "#44475a", + surface1: "#6272a4", + surface2: "#7970a9", + overlay0: "#6272a4", + overlay1: "#7970a9", + blue: "#8be9fd", + lavender: "#bd93f9", + sapphire: "#62d6e8", + sky: "#89ddff", + red: "#ff5555", + maroon: "#ff6e6e", + peach: "#ffb86c", + yellow: "#f1fa8c", + green: "#50fa7b", + teal: "#8be9fd", }, }, monokaiPro: { - name: 'monokaiPro', - label: 'Monokai Pro', + name: "monokaiPro", + label: "Monokai Pro", colors: { - base: '#2d2a2e', - mantle: '#221f22', - crust: '#1b1b1b', - text: '#fcfcfa', - subtext0: '#939293', - subtext1: '#c1c0c0', - surface0: '#403e41', - surface1: '#565457', - surface2: '#69676c', - overlay0: '#727072', - overlay1: '#848486', - blue: '#78dce8', - lavender: '#ab9df2', - sapphire: '#66d9ef', - sky: '#78dce8', - red: '#ff6188', - maroon: '#ff6188', - peach: '#fc9867', - yellow: '#ffd866', - green: '#a9dc76', - teal: '#78dce8', + base: "#2d2a2e", + mantle: "#221f22", + crust: "#1b1b1b", + text: "#fcfcfa", + subtext0: "#939293", + subtext1: "#c1c0c0", + surface0: "#403e41", + surface1: "#565457", + surface2: "#69676c", + overlay0: "#727072", + overlay1: "#848486", + blue: "#78dce8", + lavender: "#ab9df2", + sapphire: "#66d9ef", + sky: "#78dce8", + red: "#ff6188", + maroon: "#ff6188", + peach: "#fc9867", + yellow: "#ffd866", + green: "#a9dc76", + teal: "#78dce8", }, }, tokyoNight: { - name: 'tokyoNight', - label: 'Tokyo Night', + name: "tokyoNight", + label: "Tokyo Night", colors: { - base: '#1a1b26', - mantle: '#16161e', - crust: '#13131a', - text: '#a9b1d6', - subtext0: '#9aa5ce', - subtext1: '#9aa5ce', - surface0: '#232433', - surface1: '#2a2b3d', - surface2: '#32344a', - overlay0: '#565f89', - overlay1: '#6b7089', - blue: '#7aa2f7', - lavender: '#bb9af7', - sapphire: '#7dcfff', - sky: '#7dcfff', - red: '#f7768e', - maroon: '#ff9e64', - peach: '#ff9e64', - yellow: '#e0af68', - green: '#9ece6a', - teal: '#2ac3de', + base: "#1a1b26", + mantle: "#16161e", + crust: "#13131a", + text: "#a9b1d6", + subtext0: "#9aa5ce", + subtext1: "#9aa5ce", + surface0: "#232433", + surface1: "#2a2b3d", + surface2: "#32344a", + overlay0: "#565f89", + overlay1: "#6b7089", + blue: "#7aa2f7", + lavender: "#bb9af7", + sapphire: "#7dcfff", + sky: "#7dcfff", + red: "#f7768e", + maroon: "#ff9e64", + peach: "#ff9e64", + yellow: "#e0af68", + green: "#9ece6a", + teal: "#2ac3de", }, }, gruvbox: { - name: 'gruvbox', - label: 'Gruvbox Dark', + name: "gruvbox", + label: "Gruvbox Dark", colors: { - base: '#282828', - mantle: '#1d2021', - crust: '#1b1b1b', - text: '#ebdbb2', - subtext0: '#a89984', - subtext1: '#bdae93', - surface0: '#3c3836', - surface1: '#504945', - surface2: '#665c54', - overlay0: '#7c6f64', - overlay1: '#928374', - blue: '#83a598', - lavender: '#d3869b', - sapphire: '#83a598', - sky: '#8ec07c', - red: '#fb4934', - maroon: '#cc241d', - peach: '#fe8019', - yellow: '#fabd2f', - green: '#b8bb26', - teal: '#8ec07c', + base: "#282828", + mantle: "#1d2021", + crust: "#1b1b1b", + text: "#ebdbb2", + subtext0: "#a89984", + subtext1: "#bdae93", + surface0: "#3c3836", + surface1: "#504945", + surface2: "#665c54", + overlay0: "#7c6f64", + overlay1: "#928374", + blue: "#83a598", + lavender: "#d3869b", + sapphire: "#83a598", + sky: "#8ec07c", + red: "#fb4934", + maroon: "#cc241d", + peach: "#fe8019", + yellow: "#fabd2f", + green: "#b8bb26", + teal: "#8ec07c", }, }, nord: { - name: 'nord', - label: 'Nord', + name: "nord", + label: "Nord", colors: { - base: '#2e3440', - mantle: '#272c36', - crust: '#242933', - text: '#eceff4', - subtext0: '#d8dee9', - subtext1: '#e5e9f0', - surface0: '#3b4252', - surface1: '#434c5e', - surface2: '#4c566a', - overlay0: '#616e88', - overlay1: '#7b88a1', - blue: '#88c0d0', - lavender: '#b48ead', - sapphire: '#81a1c1', - sky: '#88c0d0', - red: '#bf616a', - maroon: '#d08770', - peach: '#d08770', - yellow: '#ebcb8b', - green: '#a3be8c', - teal: '#8fbcbb', + base: "#2e3440", + mantle: "#272c36", + crust: "#242933", + text: "#eceff4", + subtext0: "#d8dee9", + subtext1: "#e5e9f0", + surface0: "#3b4252", + surface1: "#434c5e", + surface2: "#4c566a", + overlay0: "#616e88", + overlay1: "#7b88a1", + blue: "#88c0d0", + lavender: "#b48ead", + sapphire: "#81a1c1", + sky: "#88c0d0", + red: "#bf616a", + maroon: "#d08770", + peach: "#d08770", + yellow: "#ebcb8b", + green: "#a3be8c", + teal: "#8fbcbb", }, }, oneDark: { - name: 'oneDark', - label: 'One Dark', + name: "oneDark", + label: "One Dark", colors: { - base: '#282c34', - mantle: '#21252b', - crust: '#1b1f23', - text: '#abb2bf', - subtext0: '#828997', - subtext1: '#9da5b4', - surface0: '#31353f', - surface1: '#393f4a', - surface2: '#4b5263', - overlay0: '#636d83', - overlay1: '#767d8d', - blue: '#61afef', - lavender: '#c678dd', - sapphire: '#56b6c2', - sky: '#56b6c2', - red: '#e06c75', - maroon: '#be5046', - peach: '#d19a66', - yellow: '#e5c07b', - green: '#98c379', - teal: '#56b6c2', + base: "#282c34", + mantle: "#21252b", + crust: "#1b1f23", + text: "#abb2bf", + subtext0: "#828997", + subtext1: "#9da5b4", + surface0: "#31353f", + surface1: "#393f4a", + surface2: "#4b5263", + overlay0: "#636d83", + overlay1: "#767d8d", + blue: "#61afef", + lavender: "#c678dd", + sapphire: "#56b6c2", + sky: "#56b6c2", + red: "#e06c75", + maroon: "#be5046", + peach: "#d19a66", + yellow: "#e5c07b", + green: "#98c379", + teal: "#56b6c2", }, }, highContrast: { - name: 'highContrast', - label: 'High Contrast', + name: "highContrast", + label: "High Contrast", colors: { - base: '#000000', // Pure black background - mantle: '#0a0a0a', // Slightly lighter black for layering - crust: '#141414', // Even lighter black for depth - text: '#ffffff', // Pure white text - subtext0: '#e0e0e0', // Very light grey for secondary text - subtext1: '#f0f0f0', // Almost white for important secondary text - surface0: '#1a1a1a', // Dark surface for contrast - surface1: '#2a2a2a', // Lighter surface for hover states - surface2: '#3a3a3a', // Even lighter surface for active states - overlay0: '#4a4a4a', // Medium grey for overlays - overlay1: '#5a5a5a', // Lighter grey for overlay hover states - blue: '#00ffff', // Cyan for primary actions - lavender: '#ff00ff', // Magenta for accents - sapphire: '#00ccff', // Bright blue for links - sky: '#00ffee', // Bright cyan for highlights - red: '#ff0000', // Pure red for errors/warnings - maroon: '#ff3333', // Lighter red for secondary warnings - peach: '#ffaa00', // Bright orange for notifications - yellow: '#ffff00', // Pure yellow for important highlights - green: '#00ff00', // Pure green for success states - teal: '#00ffcc', // Bright teal for special actions + base: "#000000", // Pure black background + mantle: "#0a0a0a", // Slightly lighter black for layering + crust: "#141414", // Even lighter black for depth + text: "#ffffff", // Pure white text + subtext0: "#e0e0e0", // Very light grey for secondary text + subtext1: "#f0f0f0", // Almost white for important secondary text + surface0: "#1a1a1a", // Dark surface for contrast + surface1: "#2a2a2a", // Lighter surface for hover states + surface2: "#3a3a3a", // Even lighter surface for active states + overlay0: "#4a4a4a", // Medium grey for overlays + overlay1: "#5a5a5a", // Lighter grey for overlay hover states + blue: "#00ffff", // Cyan for primary actions + lavender: "#ff00ff", // Magenta for accents + sapphire: "#00ccff", // Bright blue for links + sky: "#00ffee", // Bright cyan for highlights + red: "#ff0000", // Pure red for errors/warnings + maroon: "#ff3333", // Lighter red for secondary warnings + peach: "#ffaa00", // Bright orange for notifications + yellow: "#ffff00", // Pure yellow for important highlights + green: "#00ff00", // Pure green for success states + teal: "#00ffcc", // Bright teal for special actions }, }, githubLight: { - name: 'githubLight', - label: 'GitHub Light', + name: "githubLight", + label: "GitHub Light", colors: { - base: '#ffffff', - mantle: '#f6f8fa', - crust: '#eaeef2', - text: '#24292f', - subtext0: '#57606a', - subtext1: '#6e7781', - surface0: '#f3f6fa', - surface1: '#eaeef2', - surface2: '#d0d7de', - overlay0: '#8c959f', - overlay1: '#6e7781', - blue: '#0969da', - lavender: '#8250df', - sapphire: '#0550ae', - sky: '#218bff', - red: '#cf222e', - maroon: '#a40e26', - peach: '#bc4c00', - yellow: '#9a6700', - green: '#1a7f37', - teal: '#0969da', + base: "#ffffff", + mantle: "#f6f8fa", + crust: "#eaeef2", + text: "#24292f", + subtext0: "#57606a", + subtext1: "#6e7781", + surface0: "#f3f6fa", + surface1: "#eaeef2", + surface2: "#d0d7de", + overlay0: "#8c959f", + overlay1: "#6e7781", + blue: "#0969da", + lavender: "#8250df", + sapphire: "#0550ae", + sky: "#218bff", + red: "#cf222e", + maroon: "#a40e26", + peach: "#bc4c00", + yellow: "#9a6700", + green: "#1a7f37", + teal: "#0969da", }, }, solarizedLight: { - name: 'solarizedLight', - label: 'Solarized Light', + name: "solarizedLight", + label: "Solarized Light", colors: { - base: '#fdf6e3', - mantle: '#eee8d5', - crust: '#e4dcc9', - text: '#657b83', - subtext0: '#839496', - subtext1: '#93a1a1', - surface0: '#f7f2e4', - surface1: '#eee8d5', - surface2: '#dcd4c4', - overlay0: '#93a1a1', - overlay1: '#839496', - blue: '#268bd2', - lavender: '#6c71c4', - sapphire: '#2aa198', - sky: '#2aa198', - red: '#dc322f', - maroon: '#cb4b16', - peach: '#cb4b16', - yellow: '#b58900', - green: '#859900', - teal: '#2aa198', + base: "#fdf6e3", + mantle: "#eee8d5", + crust: "#e4dcc9", + text: "#657b83", + subtext0: "#839496", + subtext1: "#93a1a1", + surface0: "#f7f2e4", + surface1: "#eee8d5", + surface2: "#dcd4c4", + overlay0: "#93a1a1", + overlay1: "#839496", + blue: "#268bd2", + lavender: "#6c71c4", + sapphire: "#2aa198", + sky: "#2aa198", + red: "#dc322f", + maroon: "#cb4b16", + peach: "#cb4b16", + yellow: "#b58900", + green: "#859900", + teal: "#2aa198", }, }, oneLight: { - name: 'oneLight', - label: 'One Light', + name: "oneLight", + label: "One Light", colors: { - base: '#fafafa', - mantle: '#f0f0f0', - crust: '#e5e5e5', - text: '#383a42', - subtext0: '#4f525e', - subtext1: '#696c77', - surface0: '#f2f2f2', - surface1: '#e5e5e5', - surface2: '#d4d4d4', - overlay0: '#a0a1a7', - overlay1: '#696c77', - blue: '#4078f2', - lavender: '#a626a4', - sapphire: '#0184bc', - sky: '#0997b3', - red: '#e45649', - maroon: '#ca1243', - peach: '#d75f00', - yellow: '#c18401', - green: '#50a14f', - teal: '#0184bc', + base: "#fafafa", + mantle: "#f0f0f0", + crust: "#e5e5e5", + text: "#383a42", + subtext0: "#4f525e", + subtext1: "#696c77", + surface0: "#f2f2f2", + surface1: "#e5e5e5", + surface2: "#d4d4d4", + overlay0: "#a0a1a7", + overlay1: "#696c77", + blue: "#4078f2", + lavender: "#a626a4", + sapphire: "#0184bc", + sky: "#0997b3", + red: "#e45649", + maroon: "#ca1243", + peach: "#d75f00", + yellow: "#c18401", + green: "#50a14f", + teal: "#0184bc", }, }, bubblegum: { - name: 'bubblegum', - label: 'Bubblegum', + name: "bubblegum", + label: "Bubblegum", colors: { - base: '#ff9ac1', // Light pink background - mantle: '#ffa7cc', // Slightly darker pink - crust: '#ffb4d8', // Even darker pink for depth - text: '#2d1c2d', // Dark purple text - subtext0: '#4b384b', // Medium purple for secondary text - subtext1: '#5c465c', // Lighter purple for tertiary text - surface0: '#ffc1e0', // Light pink surface - surface1: '#ffcee7', // Lighter pink surface - surface2: '#ffdaf0', // Even lighter pink surface - overlay0: '#7e5c7e', // Muted purple overlay - overlay1: '#6e4f6e', // Darker purple overlay - blue: '#7287fd', // Soft blue - lavender: '#b4befe', // Soft lavender - sapphire: '#89dceb', // Soft cyan - sky: '#89dceb', // Matching cyan - red: '#ff8089', // Soft red - maroon: '#ff9999', // Soft maroon - peach: '#ffb4a1', // Soft peach - yellow: '#ffe5a0', // Soft yellow - green: '#a6e3a1', // Soft green - teal: '#94e2d5', // Soft teal + base: "#ff9ac1", // Light pink background + mantle: "#ffa7cc", // Slightly darker pink + crust: "#ffb4d8", // Even darker pink for depth + text: "#2d1c2d", // Dark purple text + subtext0: "#4b384b", // Medium purple for secondary text + subtext1: "#5c465c", // Lighter purple for tertiary text + surface0: "#ffc1e0", // Light pink surface + surface1: "#ffcee7", // Lighter pink surface + surface2: "#ffdaf0", // Even lighter pink surface + overlay0: "#7e5c7e", // Muted purple overlay + overlay1: "#6e4f6e", // Darker purple overlay + blue: "#7287fd", // Soft blue + lavender: "#b4befe", // Soft lavender + sapphire: "#89dceb", // Soft cyan + sky: "#89dceb", // Matching cyan + red: "#ff8089", // Soft red + maroon: "#ff9999", // Soft maroon + peach: "#ffb4a1", // Soft peach + yellow: "#ffe5a0", // Soft yellow + green: "#a6e3a1", // Soft green + teal: "#94e2d5", // Soft teal }, }, rosePine: { - name: 'rosePine', - label: 'Rosé Pine', + name: "rosePine", + label: "Rosé Pine", colors: { - base: '#191724', // Deep purple base - mantle: '#1f1d2e', // Slightly lighter purple - crust: '#26233a', // Even lighter purple - text: '#e0def4', // Soft white text - subtext0: '#908caa', // Muted purple text - subtext1: '#6e6a86', // Darker muted text - surface0: '#2a2837', // Surface purple - surface1: '#343145', // Lighter surface - surface2: '#3e3b54', // Even lighter surface - overlay0: '#524f67', // Overlay purple - overlay1: '#6e6a86', // Lighter overlay - blue: '#9ccfd8', // Soft blue - lavender: '#c4a7e7', // Soft lavender - sapphire: '#31748f', // Deep blue - sky: '#9ccfd8', // Light blue - red: '#eb6f92', // Soft pink - maroon: '#ebbcba', // Soft rose - peach: '#f6c177', // Soft peach - yellow: '#f6c177', // Gold - green: '#31748f', // Sage - teal: '#9ccfd8', // Soft teal + base: "#191724", // Deep purple base + mantle: "#1f1d2e", // Slightly lighter purple + crust: "#26233a", // Even lighter purple + text: "#e0def4", // Soft white text + subtext0: "#908caa", // Muted purple text + subtext1: "#6e6a86", // Darker muted text + surface0: "#2a2837", // Surface purple + surface1: "#343145", // Lighter surface + surface2: "#3e3b54", // Even lighter surface + overlay0: "#524f67", // Overlay purple + overlay1: "#6e6a86", // Lighter overlay + blue: "#9ccfd8", // Soft blue + lavender: "#c4a7e7", // Soft lavender + sapphire: "#31748f", // Deep blue + sky: "#9ccfd8", // Light blue + red: "#eb6f92", // Soft pink + maroon: "#ebbcba", // Soft rose + peach: "#f6c177", // Soft peach + yellow: "#f6c177", // Gold + green: "#31748f", // Sage + teal: "#9ccfd8", // Soft teal }, }, cottonCandy: { - name: 'cottonCandy', - label: 'Cotton Candy', + name: "cottonCandy", + label: "Cotton Candy", colors: { - base: '#f5d1eb', // Light pink - mantle: '#f7d7ee', // Slightly darker pink - crust: '#fae1f3', // Even darker pink - text: '#2d0c3a', // Deep purple text - subtext0: '#4a1259', // Medium purple text - subtext1: '#671878', // Light purple text - surface0: '#f9def1', // Surface pink - surface1: '#fde9f5', // Lighter surface - surface2: '#fff2fa', // Even lighter surface - overlay0: '#b87dd3', // Purple overlay - overlay1: '#9c5fb8', // Darker overlay - blue: '#79c7ff', // Baby blue - lavender: '#d5a6ff', // Soft purple - sapphire: '#7cb8ff', // Light blue - sky: '#89dcff', // Bright blue - red: '#ff9ed2', // Soft pink - maroon: '#ff8ac4', // Darker pink - peach: '#ffb2c7', // Peachy pink - yellow: '#ffffc2', // Pastel yellow - green: '#b6ffd7', // Mint green - teal: '#89ffea', // Turquoise + base: "#f5d1eb", // Light pink + mantle: "#f7d7ee", // Slightly darker pink + crust: "#fae1f3", // Even darker pink + text: "#2d0c3a", // Deep purple text + subtext0: "#4a1259", // Medium purple text + subtext1: "#671878", // Light purple text + surface0: "#f9def1", // Surface pink + surface1: "#fde9f5", // Lighter surface + surface2: "#fff2fa", // Even lighter surface + overlay0: "#b87dd3", // Purple overlay + overlay1: "#9c5fb8", // Darker overlay + blue: "#79c7ff", // Baby blue + lavender: "#d5a6ff", // Soft purple + sapphire: "#7cb8ff", // Light blue + sky: "#89dcff", // Bright blue + red: "#ff9ed2", // Soft pink + maroon: "#ff8ac4", // Darker pink + peach: "#ffb2c7", // Peachy pink + yellow: "#ffffc2", // Pastel yellow + green: "#b6ffd7", // Mint green + teal: "#89ffea", // Turquoise }, }, synthwave: { - name: 'synthwave', - label: 'Synthwave', + name: "synthwave", + label: "Synthwave", colors: { - base: '#2b213a', // Deep purple - mantle: '#2f2444', // Slightly lighter purple - crust: '#33274f', // Even lighter purple - text: '#ff7edb', // Neon pink text - subtext0: '#e58ee0', // Softer pink text - subtext1: '#cb9ee6', // Lavender text - surface0: '#392662', // Surface purple - surface1: '#443773', // Lighter surface - surface2: '#504785', // Even lighter surface - overlay0: '#625997', // Purple overlay - overlay1: '#7267aa', // Lighter overlay - blue: '#36f9f6', // Cyan - lavender: '#ff7edb', // Pink - sapphire: '#72f1b8', // Mint - sky: '#36f9f6', // Bright cyan - red: '#fe4450', // Hot red - maroon: '#ff558f', // Hot pink - peach: '#ff8b39', // Orange - yellow: '#fede5d', // Yellow - green: '#72f1b8', // Neon green - teal: '#36f9f6', // Bright teal + base: "#2b213a", // Deep purple + mantle: "#2f2444", // Slightly lighter purple + crust: "#33274f", // Even lighter purple + text: "#ff7edb", // Neon pink text + subtext0: "#e58ee0", // Softer pink text + subtext1: "#cb9ee6", // Lavender text + surface0: "#392662", // Surface purple + surface1: "#443773", // Lighter surface + surface2: "#504785", // Even lighter surface + overlay0: "#625997", // Purple overlay + overlay1: "#7267aa", // Lighter overlay + blue: "#36f9f6", // Cyan + lavender: "#ff7edb", // Pink + sapphire: "#72f1b8", // Mint + sky: "#36f9f6", // Bright cyan + red: "#fe4450", // Hot red + maroon: "#ff558f", // Hot pink + peach: "#ff8b39", // Orange + yellow: "#fede5d", // Yellow + green: "#72f1b8", // Neon green + teal: "#36f9f6", // Bright teal }, }, candyfloss: { - name: 'candyfloss', - label: 'Candyfloss', + name: "candyfloss", + label: "Candyfloss", colors: { - base: '#f8e2ff', // Light purple - mantle: '#ffe2f8', // Pink tint - crust: '#ffe9f3', // Lighter pink - text: '#5c1b99', // Deep purple text - subtext0: '#7a3aaf', // Medium purple text - subtext1: '#944bc6', // Light purple text - surface0: '#ffeaf8', // Surface pink - surface1: '#fff2fb', // Lighter surface - surface2: '#fff7fd', // Even lighter surface - overlay0: '#d59bff', // Purple overlay - overlay1: '#c77dff', // Darker overlay - blue: '#79baff', // Soft blue - lavender: '#cc8fff', // Light purple - sapphire: '#85a5ff', // Periwinkle - sky: '#8aceff', // Light blue - red: '#ff8fab', // Soft red - maroon: '#ff7fa6', // Pink - peach: '#ffb2c7', // Peach - yellow: '#fff3b2', // Soft yellow - green: '#b8ffda', // Mint - teal: '#8affef', // Aqua + base: "#f8e2ff", // Light purple + mantle: "#ffe2f8", // Pink tint + crust: "#ffe9f3", // Lighter pink + text: "#5c1b99", // Deep purple text + subtext0: "#7a3aaf", // Medium purple text + subtext1: "#944bc6", // Light purple text + surface0: "#ffeaf8", // Surface pink + surface1: "#fff2fb", // Lighter surface + surface2: "#fff7fd", // Even lighter surface + overlay0: "#d59bff", // Purple overlay + overlay1: "#c77dff", // Darker overlay + blue: "#79baff", // Soft blue + lavender: "#cc8fff", // Light purple + sapphire: "#85a5ff", // Periwinkle + sky: "#8aceff", // Light blue + red: "#ff8fab", // Soft red + maroon: "#ff7fa6", // Pink + peach: "#ffb2c7", // Peach + yellow: "#fff3b2", // Soft yellow + green: "#b8ffda", // Mint + teal: "#8affef", // Aqua }, }, terminal: { - name: 'terminal', - label: 'Green Terminal', + name: "terminal", + label: "Green Terminal", colors: { - base: '#0D1117', // Deep black background - mantle: '#161B22', // Slightly lighter black - crust: '#1B2127', // Terminal border color - text: '#00FF00', // Classic terminal green - subtext0: '#00D700', // Dimmer green - subtext1: '#00BB00', // Even dimmer green - surface0: '#1C2128', // Slightly lifted surface - surface1: '#21262D', // Terminal input area - surface2: '#282E35', // Selected area - overlay0: '#008800', // Darker green for overlays - overlay1: '#006600', // Even darker green - blue: '#00FF00', // Keep everything in green shades - lavender: '#00FF66', // Slight variation - sapphire: '#00DD88', // Another variation - sky: '#00FFBB', // Lighter green - red: '#FF0000', // Error red (keep for errors) - maroon: '#AA0000', // Darker error - peach: '#00FF99', // Another green variation - yellow: '#FFFF00', // Warning yellow (keep for warnings) - green: '#00FF00', // Main green - teal: '#00FFCC', // Cyan-ish green + base: "#0D1117", // Deep black background + mantle: "#161B22", // Slightly lighter black + crust: "#1B2127", // Terminal border color + text: "#00FF00", // Classic terminal green + subtext0: "#00D700", // Dimmer green + subtext1: "#00BB00", // Even dimmer green + surface0: "#1C2128", // Slightly lifted surface + surface1: "#21262D", // Terminal input area + surface2: "#282E35", // Selected area + overlay0: "#008800", // Darker green for overlays + overlay1: "#006600", // Even darker green + blue: "#00FF00", // Keep everything in green shades + lavender: "#00FF66", // Slight variation + sapphire: "#00DD88", // Another variation + sky: "#00FFBB", // Lighter green + red: "#FF0000", // Error red (keep for errors) + maroon: "#AA0000", // Darker error + peach: "#00FF99", // Another green variation + yellow: "#FFFF00", // Warning yellow (keep for warnings) + green: "#00FF00", // Main green + teal: "#00FFCC", // Cyan-ish green }, }, amber: { - name: 'amber', - label: 'Amber Terminal', + name: "amber", + label: "Amber Terminal", colors: { - base: '#0D0904', // Deep black with amber tint - mantle: '#160E06', // Slightly lighter black - crust: '#1B1109', // Terminal border color - text: '#FFB000', // Classic amber - subtext0: '#CC8800', // Dimmer amber - subtext1: '#995500', // Even dimmer amber - surface0: '#1C1409', // Slightly lifted surface - surface1: '#211909', // Terminal input area - surface2: '#281E0A', // Selected area - overlay0: '#663300', // Darker amber for overlays - overlay1: '#442200', // Even darker amber - blue: '#FFB000', // Keep everything in amber shades - lavender: '#FFAA00', // Slight variation - sapphire: '#FF9500', // Another variation - sky: '#FFB000', // Main amber - red: '#FF3300', // Error red (keep for errors) - maroon: '#CC3300', // Darker error - peach: '#FFAA55', // Lighter amber - yellow: '#FFDD00', // Warning yellow - green: '#FFB000', // Main amber - teal: '#FFC000', // Lighter amber + base: "#0D0904", // Deep black with amber tint + mantle: "#160E06", // Slightly lighter black + crust: "#1B1109", // Terminal border color + text: "#FFB000", // Classic amber + subtext0: "#CC8800", // Dimmer amber + subtext1: "#995500", // Even dimmer amber + surface0: "#1C1409", // Slightly lifted surface + surface1: "#211909", // Terminal input area + surface2: "#281E0A", // Selected area + overlay0: "#663300", // Darker amber for overlays + overlay1: "#442200", // Even darker amber + blue: "#FFB000", // Keep everything in amber shades + lavender: "#FFAA00", // Slight variation + sapphire: "#FF9500", // Another variation + sky: "#FFB000", // Main amber + red: "#FF3300", // Error red (keep for errors) + maroon: "#CC3300", // Darker error + peach: "#FFAA55", // Lighter amber + yellow: "#FFDD00", // Warning yellow + green: "#FFB000", // Main amber + teal: "#FFC000", // Lighter amber }, }, ibmPC: { - name: 'ibmPC', - label: 'IBM PC', + name: "ibmPC", + label: "IBM PC", colors: { - base: '#000000', // Classic black background - mantle: '#0A0A0A', // Slightly lighter black - crust: '#141414', // Border color - text: '#AAAAAA', // Light gray text - subtext0: '#888888', // Dimmer text - subtext1: '#666666', // Even dimmer text - surface0: '#1C1C1C', // Slightly lifted surface - surface1: '#212121', // Input area - surface2: '#282828', // Selected area - overlay0: '#444444', // Overlay - overlay1: '#333333', // Darker overlay - blue: '#5555FF', // CGA blue - lavender: '#FF55FF', // CGA magenta - sapphire: '#5555FF', // Another blue - sky: '#55FFFF', // CGA cyan - red: '#FF5555', // CGA red - maroon: '#AA0000', // Darker red - peach: '#FF5555', // Another red shade - yellow: '#FFFF55', // CGA yellow - green: '#55FF55', // CGA green - teal: '#55FFFF', // Another cyan + base: "#000000", // Classic black background + mantle: "#0A0A0A", // Slightly lighter black + crust: "#141414", // Border color + text: "#AAAAAA", // Light gray text + subtext0: "#888888", // Dimmer text + subtext1: "#666666", // Even dimmer text + surface0: "#1C1C1C", // Slightly lifted surface + surface1: "#212121", // Input area + surface2: "#282828", // Selected area + overlay0: "#444444", // Overlay + overlay1: "#333333", // Darker overlay + blue: "#5555FF", // CGA blue + lavender: "#FF55FF", // CGA magenta + sapphire: "#5555FF", // Another blue + sky: "#55FFFF", // CGA cyan + red: "#FF5555", // CGA red + maroon: "#AA0000", // Darker red + peach: "#FF5555", // Another red shade + yellow: "#FFFF55", // CGA yellow + green: "#55FF55", // CGA green + teal: "#55FFFF", // Another cyan }, }, }; diff --git a/src/lib/types/config.ts b/src/lib/types/config.ts new file mode 100644 index 0000000..9affb5f --- /dev/null +++ b/src/lib/types/config.ts @@ -0,0 +1,37 @@ +export interface AppConfig { + appearance: { + columnVisibility: Record; + }; + behavior: { + itemsPerPage: number; + refreshRate: number; + defaultStatusFilter: string; + }; +} + +export const DEFAULT_CONFIG: AppConfig = { + appearance: { + columnVisibility: { + name: true, + pid: true, + status: true, + user: true, + cpu_usage: true, + memory_usage: true, + virtual_memory: true, + disk_usage: true, + ppid: false, + root: false, + command: false, + environ: false, + session_id: false, + start_time: false, + run_time: true, + }, + }, + behavior: { + itemsPerPage: 15, + refreshRate: 1000, + defaultStatusFilter: "all", + }, +}; diff --git a/src/lib/types/index.ts b/src/lib/types/index.ts index 6704350..d9f3f2d 100644 --- a/src/lib/types/index.ts +++ b/src/lib/types/index.ts @@ -9,6 +9,13 @@ export interface Process { user: string; command: string; threads?: number; + environ: string[]; + root: string; + virtual_memory: number; + start_time: number; + run_time: number; + disk_usage: [number, number]; // [read_bytes, written_bytes] + session_id?: number; } export interface SystemStats { diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index 58c4b93..15dedd1 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -5,22 +5,22 @@ export interface ProcessStatus { } export const statusMap: Record = { - "Running": { + Running: { label: "Running", emoji: "🏃", color: "var(--green)", }, - "Sleeping": { + Sleeping: { label: "Sleeping", emoji: "😴", color: "var(--blue)", }, - "Idle": { + Idle: { label: "Idle", emoji: "⌛", color: "var(--overlay0)", }, - "Unknown": { + Unknown: { label: "Unknown", emoji: "❓", color: "var(--overlay0)", @@ -55,4 +55,4 @@ export function getUsageClass(percentage: number): string { if (percentage >= 60) return "high"; if (percentage >= 30) return "medium"; return "low"; -} \ No newline at end of file +} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index accfa57..e3676e5 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -6,9 +6,11 @@ import ProcessTable from "$lib/components/ProcessTable.svelte"; import ProcessDetailsModal from "$lib/components/ProcessDetailsModal.svelte"; import KillProcessModal from "$lib/components/KillProcessModal.svelte"; - import { formatStatus } from "$lib/utils"; + import { formatMemorySize, formatStatus } from "$lib/utils"; import { themeStore } from "$lib/stores"; import type { Process, SystemStats, Column } from "$lib/types"; + import TitleBar from "$lib/components/TitleBar.svelte"; + import { configStore } from "$lib/stores/config"; let processes: Process[] = []; let systemStats: SystemStats | null = null; @@ -17,18 +19,16 @@ let searchTerm = ""; let isLoading = true; let currentPage = 1; - let itemsPerPage = 15; - let pinnedProcesses: Set = new Set(); + let pinnedProcesses: Set = new Set(); let selectedProcess: Process | null = null; let showInfoModal = false; let showConfirmModal = false; let processToKill: Process | null = null; let isKilling = false; - let statusFilter = "all"; - let refreshRate = 1000; let isFrozen = false; + let selectedProcessPid: number | null = null; - let columns: Column[] = [ + let columnDefinitions: Column[] = [ { id: "name", label: "Process Name", visible: true, required: true }, { id: "pid", label: "PID", visible: true, required: false }, { @@ -46,14 +46,59 @@ }, { id: "memory_usage", - label: "Memory", + label: "RAM", visible: true, format: (v) => (v / (1024 * 1024)).toFixed(1) + " MB", }, - { id: "command", label: "Command", visible: false }, + { + id: "virtual_memory", + label: "VIRT", + visible: true, + format: (v) => formatMemorySize(v), + }, + { + id: "disk_usage", + label: "Disk R/W", + visible: true, + format: (v) => + `${(v[0] / (1024 * 1024)).toFixed(1)} / ${(v[1] / (1024 * 1024)).toFixed(1)} MB`, + }, { id: "ppid", label: "Parent PID", visible: false }, + { id: "root", label: "Root", visible: false }, + { id: "command", label: "Command", visible: false }, + { id: "environ", label: "Environment Variables", visible: false }, + { id: "session_id", label: "Session ID", visible: false }, + { + id: "start_time", + label: "Start Time", + visible: false, + format: (v) => new Date(v * 1000).toLocaleString(), // v is the time where the process was started (in seconds) from epoch + }, + { + id: "run_time", + label: "Run Time", + visible: true, + format: (v) => { + const seconds = v; // v is the time the process has been running in seconds + const hours = Math.floor(seconds / 3600); + const minutes = Math.floor((seconds % 3600) / 60); + const remainingSeconds = seconds % 60; + return `${hours}h ${minutes}m ${remainingSeconds}s`; // Format as HH:MM:SS + }, + }, ]; + // Merge column definitions with stored visibility + $: columns = columnDefinitions.map((col) => ({ + ...col, + visible: + col.required || + ($configStore.appearance.columnVisibility[col.id] ?? col.visible), + })); + $: itemsPerPage = $configStore.behavior.itemsPerPage; + $: refreshRate = $configStore.behavior.refreshRate; + $: statusFilter = $configStore.behavior.defaultStatusFilter; + let sortConfig = { field: "cpu_usage" as keyof Process, direction: "desc" as "asc" | "desc", @@ -90,8 +135,8 @@ }); $: sortedProcesses = filteredProcesses.sort((a, b) => { - const aPin = pinnedProcesses.has(a.pid); - const bPin = pinnedProcesses.has(b.pid); + const aPin = pinnedProcesses.has(a.command); + const bPin = pinnedProcesses.has(b.command); if (aPin && !bPin) return -1; if (!aPin && bPin) return 1; @@ -127,6 +172,11 @@ } } + $: if (selectedProcessPid && processes.length > 0) { + selectedProcess = + processes.find((p) => p.pid === selectedProcessPid) || null; + } + async function getProcesses() { try { const result = await invoke<[Process[], SystemStats]>("get_processes"); @@ -166,16 +216,17 @@ } } - function togglePin(pid: number) { - if (pinnedProcesses.has(pid)) { - pinnedProcesses.delete(pid); + function togglePin(command: string) { + if (pinnedProcesses.has(command)) { + pinnedProcesses.delete(command); } else { - pinnedProcesses.add(pid); + pinnedProcesses.add(command); } pinnedProcesses = pinnedProcesses; // Trigger reactivity } function showProcessDetails(process: Process) { + selectedProcessPid = process.pid; selectedProcess = process; showInfoModal = true; } @@ -198,71 +249,92 @@ } } + function handleModalClose() { + showInfoModal = false; + selectedProcess = null; + selectedProcessPid = null; + } + + let minLoadingTimer: ReturnType; + const MIN_LOADING_TIME = 2000; // Show loading screen for at least 2 seconds + onMount(async () => { + const loadingPromise = Promise.all([getProcesses()]); + const timerPromise = new Promise((resolve) => { + minLoadingTimer = setTimeout(resolve, MIN_LOADING_TIME); + }); + try { - await Promise.all([getProcesses()]); + // Wait for both the data to load AND the minimum time to pass + await Promise.all([loadingPromise, timerPromise]); } finally { isLoading = false; } + configStore.init(); themeStore.init(); }); onDestroy(() => { if (intervalId) clearInterval(intervalId); + if (minLoadingTimer) clearTimeout(minLoadingTimer); }); {#if isLoading}
-
- Loading processes... +
+
NeoHtop
+
+
+
+ System Initialization...
{:else} -
- {#if systemStats} - - {/if} - - - - {#if error} -
{error}
- {/if} - - -
+
+ +
+ {#if systemStats} + + {/if} + + + + {#if error} +
{error}
+ {/if} + + +
+
{/if} { - showInfoModal = false; - selectedProcess = null; - }} + onClose={handleModalClose} /> - - NeoHtop - Modern System Monitor - - - diff --git a/vite.config.js b/vite.config.js index b7b0090..197b87c 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,7 +1,6 @@ import { defineConfig } from "vite"; import { sveltekit } from "@sveltejs/kit/vite"; -// @ts-expect-error process is a nodejs global const host = process.env.TAURI_DEV_HOST; // https://vitejs.dev/config/ From a3a3b165e84da7e7e4b5bd06e04e9bb040026495 Mon Sep 17 00:00:00 2001 From: Hannes <33062605+HannesGitH@users.noreply.github.com> Date: Mon, 11 Nov 2024 00:04:10 +0100 Subject: [PATCH 6/6] flake.nix: make build install and runnable --- flake.nix | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 76d1fe5..e8c8150 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,8 @@ outputs = inputs@{ nixpkgs, ... }: let inherit (nixpkgs) lib; - systems = ["aarch64-darwin"]; + # definitely not tested, but i like it exposed, who knows + systems = lib.systems.flakeExposed; forAllSystems = lib.genAttrs systems; spkgs = system : nixpkgs.legacyPackages.${system}.pkgs; in @@ -29,9 +30,23 @@ npmDeps = importNpmLock { npmRoot = ./.; }; - tauriBuildFlags = "--no-bundle"; + # remove macOS signing + postConfigure = '' + ${jq}/bin/jq 'del(.bundle.macOS.signingIdentity, .bundle.macOS.hardenedRuntime)' src-tauri/tauri.conf.json > tmp.json + mv tmp.json src-tauri/tauri.conf.json + ''; npmConfigHook = importNpmLock.npmConfigHook; - checkPhase = true; + checkPhase = "true"; # idk why checks fail, todo + installPhase = let path = "${cargoRoot}/target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/bundle"; in + if stdenv.isDarwin then '' + mkdir -p $out/bin + mv ${path}/macos $out/Applications + echo "#!${zsh}/bin/zsh" >> $out/bin/${name} + echo "open -a $out/Applications/${name}.app" >> $out/bin/${name} + chmod +x $out/bin/${name} + '' else '' + mv ${path}/deb/*/data/usr $out + ''; }; default = neohtop; });