Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

feat: platform independent core and the new desktop app (#4684)

Shreyasa6147f4ce4b7
diff --git a/.dockerignore b/.dockerignore
index 93efa139f..5b57b57f5 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,2 +1,35 @@
+.devenv*
+.direnv
+.devcontainer
+.git
+.github
+.husky
+.vscode
+
+.envrc
+devenv.yaml
+devenv.nix
+.prettierrc.js
+.prettierignore
+.editorconfig
+.npmrc
+.firebaserc
+
node_modules
+**/node_modules
**/*/node_modules
+
+**/dist
+**/build
+**/target
+
+**/__tests__
+**/*.test.*
+**/coverage
+
+*.md
+LICENSE
+CODEOWNERS
+
+.DS_Store
+*.log
diff --git a/.env.example b/.env.example
index fc8cb758a..aba3decc8 100644
--- a/.env.example
+++ b/.env.example
@@ -20,7 +20,14 @@ DATA_ENCRYPTION_KEY="data encryption key with 32 char"
# Hoppscotch App Domain Config
REDIRECT_URL="http://localhost:3000"
-WHITELISTED_ORIGINS="http://localhost:3170,http://localhost:3000,http://localhost:3100"
+# Whitelisted origins for the Hoppscotch App.
+# This list controls which origins can interact with the app through cross-origin comms.
+# - localhost ports (3170, 3000, 3100): app, backend, development servers and services
+# - app://localhost_3200: Bundle server origin identifier
+# NOTE: `3200` here refers to the bundle server (port 3200) that provides the bundles,
+# NOT where the app runs. The app itself uses the `app://` protocol with dynamic
+# bundle names like `app://{bundle-name}/`
+WHITELISTED_ORIGINS="http://localhost:3170,http://localhost:3000,http://localhost:3100,app://localhost_3200,app://hoppscotch"
VITE_ALLOWED_AUTH_PROVIDERS=GOOGLE,GITHUB,MICROSOFT,EMAIL
# Google Auth Config
diff --git a/.envrc b/.envrc
new file mode 100644
index 000000000..894571bf4
--- /dev/null
+++ b/.envrc
@@ -0,0 +1,3 @@
+source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k="
+
+use devenv
diff --git a/.gitignore b/.gitignore
index bdfa619cd..68c412619 100644
--- a/.gitignore
+++ b/.gitignore
@@ -172,3 +172,13 @@ tests/*/videos
# GQL SDL generated for the frontends
gql-gen/
+
+# Devenv
+.devenv*
+devenv.local.nix
+
+# direnv
+.direnv
+
+# pre-commit
+.pre-commit-config.yaml
diff --git a/aio-subpath-access.Caddyfile b/aio-subpath-access.Caddyfile
index 7318eecd2..10b8bf551 100644
--- a/aio-subpath-access.Caddyfile
+++ b/aio-subpath-access.Caddyfile
@@ -21,6 +21,11 @@
reverse_proxy localhost:8080
}
+ # Handle requests under `/desktop-app-server*` path
+ handle_path /desktop-app-server* {
+ reverse_proxy localhost:3200
+ }
+
# Catch-all route for unknown paths, serves `selfhost-web` SPA
handle {
root * /site/selfhost-web
diff --git a/aio_run.mjs b/aio_run.mjs
index 2690078f7..3dbe7141f 100644
--- a/aio_run.mjs
+++ b/aio_run.mjs
@@ -52,6 +52,7 @@ fs.rmSync("build.env")
const caddyFileName = process.env.ENABLE_SUBPATH_BASED_ACCESS === 'true' ? 'aio-subpath-access.Caddyfile' : 'aio-multiport-setup.Caddyfile'
const caddyProcess = runChildProcessWithPrefix("caddy", ["run", "--config", `/etc/caddy/${caddyFileName}`, "--adapter", "caddyfile"], "App/Admin Dashboard Caddy")
const backendProcess = runChildProcessWithPrefix("node", ["/dist/backend/dist/main.js"], "Backend Server")
+const webappProcess = runChildProcessWithPrefix("webapp-server", [], "Webapp Server")
caddyProcess.on("exit", (code) => {
console.log(`Exiting process because Caddy Server exited with code ${code}`)
@@ -63,11 +64,17 @@ backendProcess.on("exit", (code) => {
process.exit(code)
})
+webappProcess.on("exit", (code) => {
+ console.log(`Exiting process because Webapp Server exited with code ${code}`)
+ process.exit(code)
+})
+
process.on('SIGINT', () => {
console.log("SIGINT received, exiting...")
caddyProcess.kill("SIGINT")
backendProcess.kill("SIGINT")
+ webappProcess.kill("SIGINT")
process.exit(0)
})
diff --git a/devenv.lock b/devenv.lock
new file mode 100644
index 000000000..b22ef4eda
--- /dev/null
+++ b/devenv.lock
@@ -0,0 +1,140 @@
+{
+ "nodes": {
+ "devenv": {
+ "locked": {
+ "dir": "src/modules",
+ "lastModified": 1738772960,
+ "owner": "cachix",
+ "repo": "devenv",
+ "rev": "7f756cdf3fbb01cab243dcec4de0ca94e6aaa2af",
+ "type": "github"
+ },
+ "original": {
+ "dir": "src/modules",
+ "owner": "cachix",
+ "repo": "devenv",
+ "type": "github"
+ }
+ },
+ "fenix": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ],
+ "rust-analyzer-src": "rust-analyzer-src"
+ },
+ "locked": {
+ "lastModified": 1738737274,
+ "owner": "nix-community",
+ "repo": "fenix",
+ "rev": "f82de9980822f3b1efcf54944939b1d514386827",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "fenix",
+ "type": "github"
+ }
+ },
+ "flake-compat": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1733328505,
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
+ "git-hooks": {
+ "inputs": {
+ "flake-compat": "flake-compat",
+ "gitignore": "gitignore",
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1737465171,
+ "owner": "cachix",
+ "repo": "git-hooks.nix",
+ "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
+ "type": "github"
+ },
+ "original": {
+ "owner": "cachix",
+ "repo": "git-hooks.nix",
+ "type": "github"
+ }
+ },
+ "gitignore": {
+ "inputs": {
+ "nixpkgs": [
+ "git-hooks",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1709087332,
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1738734093,
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "5b2753b0356d1c951d7a3ef1d086ba5a71fff43c",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "devenv": "devenv",
+ "fenix": "fenix",
+ "git-hooks": "git-hooks",
+ "nixpkgs": "nixpkgs",
+ "pre-commit-hooks": [
+ "git-hooks"
+ ]
+ }
+ },
+ "rust-analyzer-src": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1738754241,
+ "owner": "rust-lang",
+ "repo": "rust-analyzer",
+ "rev": "ca47cddc31ae76a05e8709ed4aec805c5ef741d3",
+ "type": "github"
+ },
+ "original": {
+ "owner": "rust-lang",
+ "ref": "nightly",
+ "repo": "rust-analyzer",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/devenv.nix b/devenv.nix
new file mode 100644
index 000000000..2b27f2533
--- /dev/null
+++ b/devenv.nix
@@ -0,0 +1,189 @@
+{ pkgs, lib, config, inputs, ... }:
+
+let
+ rosettaPkgs =
+ if pkgs.stdenv.isDarwin && pkgs.stdenv.isAarch64
+ then pkgs.pkgsx86_64Darwin
+ else pkgs;
+
+ darwinPackages = with pkgs; [
+ darwin.apple_sdk.frameworks.Security
+ darwin.apple_sdk.frameworks.CoreServices
+ darwin.apple_sdk.frameworks.CoreFoundation
+ darwin.apple_sdk.frameworks.Foundation
+ darwin.apple_sdk.frameworks.AppKit
+ darwin.apple_sdk.frameworks.WebKit
+ ];
+
+ linuxPackages = with pkgs; [
+ libsoup_3
+ webkitgtk_4_1
+ librsvg
+ libappindicator
+ libayatana-appindicator
+ ];
+
+in {
+ packages = with pkgs; [
+ git
+ lima
+ colima
+ docker
+ jq
+ # NOTE: In case there's `Cannot find module: ... bcrypt ...` error, try `npm rebuild bcrypt`
+ # See: https://github.com/kelektiv/node.bcrypt.js/issues/800
+ # See: https://github.com/kelektiv/node.bcrypt.js/issues/1055
+ nodejs_20
+ nodePackages.typescript-language-server
+ nodePackages."@volar/vue-language-server"
+ nodePackages.prisma
+ prisma-engines
+ cargo-edit
+ ] ++ lib.optionals pkgs.stdenv.isDarwin darwinPackages
+ ++ lib.optionals pkgs.stdenv.isLinux linuxPackages;
+
+ env = {
+ APP_GREET = "Hoppscotch";
+ DATABASE_URL = "postgresql://postgres:testpass@localhost:5432/hoppscotch?connect_timeout=300";
+ DOCKER_BUILDKIT = "1";
+ COMPOSE_DOCKER_CLI_BUILD = "1";
+ } // lib.optionalAttrs pkgs.stdenv.isLinux {
+ # NOTE: Setting these `PRISMA_*` environment variable fixes
+ # "Error: Failed to fetch sha256 checksum at https://binaries.prisma.sh/all_commits/<hash>/linux-nixos/libquery_engine.so.node.gz.sha256 - 404 Not Found"
+ # See: https://github.com/prisma/prisma/discussions/3120
+ PRISMA_QUERY_ENGINE_LIBRARY = "${pkgs.prisma-engines}/lib/libquery_engine.node";
+ PRISMA_QUERY_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/query-engine";
+ PRISMA_SCHEMA_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/schema-engine";
+
+ LD_LIBRARY_PATH = lib.makeLibraryPath [
+ pkgs.libappindicator
+ pkgs.libayatana-appindicator
+ ];
+ } // lib.optionalAttrs pkgs.stdenv.isDarwin {
+ # Place to put macOS-specific environment variables
+ };
+
+ scripts = {
+ hello.exec = "echo hello from $APP_GREET";
+ e.exec = "emacs";
+ lima-setup.exec = "limactl start template://docker";
+ lima-clean.exec = "limactl rm -f $(limactl ls -q)";
+ colima-start.exec = "colima start --cpu 4 --memory 50";
+
+ docker-prune.exec = ''
+ echo "Cleaning up unused Docker resources..."
+ docker system prune -f
+ '';
+
+ docker-logs.exec = "docker logs -f hoppscotch-aio";
+
+ docker-status.exec = ''
+ echo "Container Status:"
+ docker ps -a --filter "name=hoppscotch-aio" --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
+ '';
+
+ db-reset.exec = ''
+ echo "Resetting database..."
+ psql -U postgres -d hoppscotch -c 'DROP SCHEMA public CASCADE; CREATE SCHEMA public;'
+ echo "Database reset complete."
+ '';
+
+ docker-clean-all.exec = ''
+ echo "Starting complete Docker cleanup..."
+
+ echo "1/6: Stopping all running containers..."
+ CONTAINERS=$(docker ps -q)
+ if [ -n "$CONTAINERS" ]; then
+ docker stop $CONTAINERS
+ echo "✓ Containers stopped"
+ else
+ echo "• No running containers found"
+ fi
+
+ echo "2/6: Removing all containers..."
+ CONTAINERS=$(docker ps -aq)
+ if [ -n "$CONTAINERS" ]; then
+ docker rm $CONTAINERS
+ echo "✓ Containers removed"
+ else
+ echo "• No containers to remove"
+ fi
+
+ echo "3/6: Removing all images..."
+ IMAGES=$(docker images -q)
+ if [ -n "$IMAGES" ]; then
+ docker rmi --force $IMAGES
+ echo "✓ Images removed"
+ else
+ echo "• No images to remove"
+ fi
+
+ echo "4/6: Removing all volumes..."
+ VOLUMES=$(docker volume ls -q)
+ if [ -n "$VOLUMES" ]; then
+ docker volume rm $VOLUMES
+ echo "✓ Volumes removed"
+ else
+ echo "• No volumes to remove"
+ fi
+
+ echo "5/6: Removing custom networks..."
+ NETWORKS=$(docker network ls --filter type=custom -q)
+ if [ -n "$NETWORKS" ]; then
+ docker network rm $NETWORKS
+ echo "✓ Networks removed"
+ else
+ echo "• No custom networks to remove"
+ fi
+
+ echo "6/6: Running system prune..."
+ docker system prune --all --force --volumes
+ echo "✓ System pruned"
+
+ echo "Done!"
+ '';
+ };
+
+ enterShell = ''
+ git --version
+ echo "Hoppscotch development environment ready!"
+ ${lib.optionalString pkgs.stdenv.isDarwin ''
+ # Place to put macOS-specific shell initialization
+ ''}
+ ${lib.optionalString pkgs.stdenv.isLinux ''
+ # Place to put Linux-specific shell initialization
+ ''}
+ '';
+
+ enterTest = ''
+ echo "Running tests"
+ '';
+
+ dotenv.enable = true;
+
+ languages = {
+ typescript = {
+ enable = true;
+ };
+ javascript = {
+ package = pkgs.nodejs_20;
+ enable = true;
+ npm.enable = true;
+ pnpm.enable = true;
+ };
+ rust = {
+ enable = true;
+ channel = "nightly";
+ components = [
+ "rustc"
+ "cargo"
+ "clippy"
+ "rustfmt"
+ "rust-analyzer"
+ "llvm-tools-preview"
+ "rust-src"
+ "rustc-codegen-cranelift-preview"
+ ];
+ };
+ };
+}
diff --git a/packages/hoppscotch-agent/devenv.yaml b/devenv.yaml
similarity index 100%
rename from packages/hoppscotch-agent/devenv.yaml
rename to devenv.yaml
diff --git a/docker-compose.yml b/docker-compose.yml
index ee5bd337a..65bdced24 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -2,9 +2,36 @@
# has a container with a Postgres instance running.
# You can tweak around this file to match your instances
+# PROFILES EXPLANATION:
+#
+# We use Docker Compose profiles to manage different deployment scenarios and avoid port conflicts.
+#
+# These are all the available profiles:
+# - default: All-in-one service + database + auto-migration (recommended for most users)
+# - default-no-db: All-in-one service without database (for users with external DB)
+# - backend: The backend service only
+# - app: The main Hoppscotch application only
+# - admin: The self-host admin dashboard only
+# - webapp: The static web app server only
+# - database: Just the PostgreSQL database
+# - just-backend: All services except webapp for local development
+# - deprecated: All deprecated services (not recommended)
+
+# USAGE:
+#
+# To run the default setup: docker compose --profile default up
+# To run without database: docker compose --profile default-no-db up
+# To run specific components: docker compose --profile backend up
+# To run all except webapp: docker compose --profile just-backend up
+# To run deprecated services: docker compose --profile deprecated up
+
+# NOTE: The default and default-no-db profiles should not be mixed with individual service
+# profiles as they would conflict on ports.
+
services:
# This service runs the backend app in the port 3170
hoppscotch-backend:
+ profiles: ["backend", "just-backend"]
container_name: hoppscotch-backend
build:
dockerfile: prod.Dockerfile
@@ -32,6 +59,7 @@ services:
# NOTE: To do TLS or play around with how the app is hosted, you can look into the Caddyfile for
# the SH admin dashboard server at packages/hoppscotch-selfhost-web/Caddyfile
hoppscotch-app:
+ profiles: ["app"]
container_name: hoppscotch-app
build:
dockerfile: prod.Dockerfile
@@ -49,6 +77,7 @@ services:
# NOTE: To do TLS or play around with how the app is hosted, you can look into the Caddyfile for
# the SH admin dashboard server at packages/hoppscotch-sh-admin/Caddyfile
hoppscotch-sh-admin:
+ profiles: ["admin"]
container_name: hoppscotch-sh-admin
build:
dockerfile: prod.Dockerfile
@@ -62,8 +91,22 @@ services:
- "3280:80"
- "3100:3100"
- # The service that spins up all 3 services at once in one container
+ # The static server for serving web content to desktop shell, hosted at port 3200
+ hoppscotch-webapp-server:
+ profiles: ["webapp"]
+ container_name: hoppscotch-webapp-server
+ env_file:
+ - ./.env
+ build:
+ dockerfile: prod.Dockerfile
+ context: .
+ target: webapp_server
+ ports:
+ - "3200:3200"
+
+ # The service that spins up all services at once in one container
hoppscotch-aio:
+ profiles: ["default", "default-no-db"]
container_name: hoppscotch-aio
restart: unless-stopped
build:
@@ -79,12 +122,14 @@ services:
- "3000:3000"
- "3100:3100"
- "3170:3170"
+ - "3200:3200"
- "3080:80"
# The preset DB service, you can delete/comment the below lines if
# you are using an external postgres instance
# This will be exposed at port 5432
hoppscotch-db:
+ profiles: ["default", "database", "just-backend"]
image: postgres:15
ports:
- "5432:5432"
@@ -105,8 +150,24 @@ services:
timeout: 5s
retries: 10
- # All the services listed below are deprececated
+ # Auto-migration service - handles database migrations automatically
+ hoppscotch-migrate:
+ profiles: ["default", "just-backend"]
+ build:
+ dockerfile: prod.Dockerfile
+ context: .
+ target: backend
+ env_file:
+ - ./.env
+ depends_on:
+ hoppscotch-db:
+ condition: service_healthy
+ command: sh -c "pnpx prisma migrate deploy"
+
+ # All the services listed below are deprecated
+ # These services are kept for backward compatibility but should not be used for new deployments
hoppscotch-old-backend:
+ profiles: ["deprecated"]
container_name: hoppscotch-old-backend
build:
dockerfile: packages/hoppscotch-backend/Dockerfile
@@ -130,6 +191,7 @@ services:
- "3170:3000"
hoppscotch-old-app:
+ profiles: ["deprecated"]
container_name: hoppscotch-old-app
build:
dockerfile: packages/hoppscotch-selfhost-web/Dockerfile
@@ -142,6 +204,7 @@ services:
- "3000:8080"
hoppscotch-old-sh-admin:
+ profiles: ["deprecated"]
container_name: hoppscotch-old-sh-admin
build:
dockerfile: packages/hoppscotch-sh-admin/Dockerfile
@@ -152,3 +215,29 @@ services:
- hoppscotch-old-backend
ports:
- "3100:8080"
+
+# DEPLOYMENT SCENARIOS:
+# 1. Default deployment (recommended):
+# docker compose --profile default up
+# This will start: AIO + database + auto-migration
+#
+# 2. Default deployment without database:
+# docker compose --profile default-no-db up
+# This will start: AIO only (use when you have an external database)
+#
+# 3. Individual service deployment:
+# docker compose --profile backend up # Just the backend
+# docker compose --profile app up # Just the app
+# docker compose --profile admin up # Just the admin dashboard
+# docker compose --profile webapp up # Just the static web server
+# docker compose --profile database up # Just the database
+#
+# 4. Development deployment:
+# docker compose --profile just-backend up # All services except webapp
+#
+# 5. Deprecated services:
+# docker compose --profile deprecated up
+# This will start all deprecated services (not recommended for new deployments)
+#
+# Remember: The default and default-no-db profiles should not be mixed with individual service
+# profiles as they would conflict on ports.
diff --git a/packages/codemirror-lang-graphql/tsconfig.json b/packages/codemirror-lang-graphql/tsconfig.json
index b258d4ce0..7c5d26ee9 100644
--- a/packages/codemirror-lang-graphql/tsconfig.json
+++ b/packages/codemirror-lang-graphql/tsconfig.json
@@ -7,6 +7,7 @@
"declaration": true,
"declarationDir": "./dist",
"moduleResolution": "node",
+ "skipLibCheck": true,
"allowJs": true
},
"include": ["src/*"]
diff --git a/packages/hoppscotch-agent/.envrc b/packages/hoppscotch-agent/.envrc
deleted file mode 100644
index 5bf8fc159..000000000
--- a/packages/hoppscotch-agent/.envrc
+++ /dev/null
@@ -1,3 +0,0 @@
-source_url "https://raw.githubusercontent.com/cachix/devenv/95f329d49a8a5289d31e0982652f7058a189bfca/direnvrc" "sha256-d+8cBpDfDBj41inrADaJt+bDWhOktwslgoP5YiGJ1v0="
-
-use devenv
\ No newline at end of file
diff --git a/packages/hoppscotch-agent/package.json b/packages/hoppscotch-agent/package.json
index 19b6f64e1..429849d5c 100644
--- a/packages/hoppscotch-agent/package.json
+++ b/packages/hoppscotch-agent/package.json
@@ -16,6 +16,7 @@
"@vueuse/core": "^11.1.0",
"axios": "^1.7.7",
"fp-ts": "^2.16.9",
+ "lodash-es": "4.17.21",
"vue": "3.3.9"
},
"devDependencies": {
@@ -29,6 +30,7 @@
"typescript": "^5.6.3",
"unplugin-icons": "^0.19.3",
"vite": "^5.4.8",
+ "@types/lodash-es": "4.17.12",
"vue-tsc": "^2.1.6"
}
}
diff --git a/packages/hoppscotch-agent/src-tauri/Cargo.lock b/packages/hoppscotch-agent/src-tauri/Cargo.lock
index 4893f4e86..e4f125bd8 100644
--- a/packages/hoppscotch-agent/src-tauri/Cargo.lock
+++ b/packages/hoppscotch-agent/src-tauri/Cargo.lock
@@ -93,9 +93,9 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.6.15"
+version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
+checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
dependencies = [
"anstyle",
"anstyle-parse",
@@ -108,49 +108,49 @@ dependencies = [
[[package]]
name = "anstyle"
-version = "1.0.8"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
+checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
[[package]]
name = "anstyle-parse"
-version = "0.2.5"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
+checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
-version = "1.1.1"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
+checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
dependencies = [
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
name = "anstyle-wincon"
-version = "3.0.4"
+version = "3.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
+checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125"
dependencies = [
"anstyle",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
name = "anyhow"
-version = "1.0.91"
+version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8"
+checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7"
[[package]]
name = "arbitrary"
-version = "1.3.2"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"
+checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223"
dependencies = [
"derive_arbitrary",
]
@@ -163,9 +163,9 @@ checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16"
[[package]]
name = "ashpd"
-version = "0.9.2"
+version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4d43c03d9e36dd40cab48435be0b09646da362c278223ca535493877b2c1dee9"
+checksum = "e9c39d707614dbcc6bed00015539f488d8e3fe3e66ed60961efc0c90f4b380b3"
dependencies = [
"enumflags2",
"futures-channel",
@@ -179,17 +179,7 @@ dependencies = [
"wayland-backend",
"wayland-client",
"wayland-protocols",
- "zbus",
-]
-
-[[package]]
-name = "assert-json-diff"
-version = "2.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12"
-dependencies = [
- "serde",
- "serde_json",
+ "zbus 5.2.0",
]
[[package]]
@@ -218,9 +208,9 @@ dependencies = [
[[package]]
name = "async-compression"
-version = "0.4.17"
+version = "0.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0cb8f1d480b0ea3783ab015936d2a55c87e219676f0c0b7dec61494043f21857"
+checksum = "df895a515f70646414f4b45c0b79082783b80552b373a68283012928df56f522"
dependencies = [
"flate2",
"futures-core",
@@ -255,9 +245,9 @@ dependencies = [
[[package]]
name = "async-io"
-version = "2.3.4"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8"
+checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059"
dependencies = [
"async-lock",
"cfg-if",
@@ -310,7 +300,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -345,14 +335,14 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
name = "atk"
-version = "0.18.0"
+version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4"
+checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b"
dependencies = [
"atk-sys",
"glib",
@@ -361,9 +351,9 @@ dependencies = [
[[package]]
name = "atk-sys"
-version = "0.18.0"
+version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009"
+checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086"
dependencies = [
"glib-sys",
"gobject-sys",
@@ -384,7 +374,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f012b8cc0c850f34117ec8252a44418f2e34a2cf501de89e29b241ae5f79471"
dependencies = [
"dirs 4.0.0",
- "thiserror",
+ "thiserror 1.0.69",
"winreg 0.10.1",
]
@@ -396,9 +386,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "axum"
-version = "0.7.7"
+version = "0.7.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae"
+checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f"
dependencies = [
"async-trait",
"axum-core",
@@ -409,7 +399,7 @@ dependencies = [
"http-body-util",
"hyper",
"hyper-util",
- "itoa 1.0.11",
+ "itoa 1.0.14",
"matchit",
"memchr",
"mime",
@@ -420,7 +410,7 @@ dependencies = [
"serde_json",
"serde_path_to_error",
"serde_urlencoded",
- "sync_wrapper 1.0.1",
+ "sync_wrapper",
"tokio",
"tower",
"tower-layer",
@@ -443,7 +433,7 @@ dependencies = [
"mime",
"pin-project-lite",
"rustversion",
- "sync_wrapper 1.0.1",
+ "sync_wrapper",
"tower-layer",
"tower-service",
"tracing",
@@ -451,25 +441,26 @@ dependencies = [
[[package]]
name = "axum-extra"
-version = "0.9.4"
+version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73c3220b188aea709cf1b6c5f9b01c3bd936bb08bd2b5184a12b35ac8131b1f9"
+checksum = "c794b30c904f0a1c2fb7740f7df7f7972dfaa14ef6f57cb6178dc63e5dca2f04"
dependencies = [
"axum",
"axum-core",
"bytes",
+ "fastrand",
"futures-util",
"headers",
"http",
"http-body",
"http-body-util",
"mime",
+ "multer",
"pin-project-lite",
"serde",
"tower",
"tower-layer",
"tower-service",
- "tracing",
]
[[package]]
@@ -586,9 +577,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "bytemuck"
-version = "1.19.0"
+version = "1.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d"
+checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a"
[[package]]
name = "byteorder"
@@ -604,9 +595,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
[[package]]
name = "bytes"
-version = "1.8.0"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"
+checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b"
dependencies = [
"serde",
]
@@ -622,7 +613,7 @@ dependencies = [
"glib",
"libc",
"once_cell",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -647,9 +638,9 @@ dependencies = [
[[package]]
name = "cargo-platform"
-version = "0.1.8"
+version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc"
+checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea"
dependencies = [
"serde",
]
@@ -665,7 +656,7 @@ dependencies = [
"semver",
"serde",
"serde_json",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -675,14 +666,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719"
dependencies = [
"serde",
- "toml 0.8.2",
+ "toml 0.8.19",
]
[[package]]
name = "cc"
-version = "1.1.31"
+version = "1.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f"
+checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e"
dependencies = [
"shlex",
]
@@ -728,9 +719,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]]
name = "chrono"
-version = "0.4.38"
+version = "0.4.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
+checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
dependencies = [
"android-tzdata",
"iana-time-zone",
@@ -813,19 +804,9 @@ dependencies = [
[[package]]
name = "colorchoice"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
-
-[[package]]
-name = "colored"
-version = "2.1.0"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8"
-dependencies = [
- "lazy_static",
- "windows-sys 0.48.0",
-]
+checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]]
name = "combine"
@@ -865,12 +846,13 @@ dependencies = [
[[package]]
name = "cookie_store"
-version = "0.21.0"
+version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4934e6b7e8419148b6ef56950d277af8561060b56afd59e2aadf98b59fce6baa"
+checksum = "2eac901828f88a5241ee0600950ab981148a18f2f756900ffba1b125ca6a3ef9"
dependencies = [
"cookie",
- "idna 0.5.0",
+ "document-features",
+ "idna",
"log",
"publicsuffix",
"serde",
@@ -956,9 +938,9 @@ dependencies = [
[[package]]
name = "cpufeatures"
-version = "0.2.14"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0"
+checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3"
dependencies = [
"libc",
]
@@ -974,18 +956,18 @@ dependencies = [
[[package]]
name = "crossbeam-channel"
-version = "0.5.13"
+version = "0.5.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2"
+checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
-version = "0.8.20"
+version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
+checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "crypto-common"
@@ -1022,17 +1004,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
dependencies = [
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
name = "ctor"
-version = "0.2.8"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f"
+checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501"
dependencies = [
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -1092,7 +1074,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -1116,7 +1098,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -1127,7 +1109,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [
"darling_core",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -1161,26 +1143,15 @@ dependencies = [
"serde",
]
-[[package]]
-name = "derivative"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 1.0.109",
-]
-
[[package]]
name = "derive_arbitrary"
-version = "1.3.2"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
+checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -1193,7 +1164,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustc_version",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -1282,7 +1253,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -1291,7 +1262,7 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412"
dependencies = [
- "libloading 0.8.5",
+ "libloading 0.8.6",
]
[[package]]
@@ -1314,7 +1285,16 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "document-features"
+version = "0.2.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb6969eaabd2421f8a2775cfd2471a2b634372b4a25d41e3bd647b79912850a0"
+dependencies = [
+ "litrs",
]
[[package]]
@@ -1367,14 +1347,14 @@ 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",
"rustc_version",
- "toml 0.8.2",
+ "toml 0.8.19",
"vswhom",
"winreg 0.52.0",
]
@@ -1387,9 +1367,9 @@ checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7"
[[package]]
name = "encoding_rs"
-version = "0.8.34"
+version = "0.8.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59"
+checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
dependencies = [
"cfg-if",
]
@@ -1418,7 +1398,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -1462,12 +1442,12 @@ dependencies = [
[[package]]
name = "errno"
-version = "0.3.9"
+version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
+checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
dependencies = [
"libc",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -1483,9 +1463,9 @@ dependencies = [
[[package]]
name = "event-listener-strategy"
-version = "0.5.2"
+version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1"
+checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2"
dependencies = [
"event-listener",
"pin-project-lite",
@@ -1493,15 +1473,15 @@ dependencies = [
[[package]]
name = "fastrand"
-version = "2.1.1"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
+checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
[[package]]
name = "fdeflate"
-version = "0.3.5"
+version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8090f921a24b04994d9929e204f50b498a33ea6ba559ffaa05e04f7ee7fb5ab"
+checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"
dependencies = [
"simd-adler32",
]
@@ -1536,23 +1516,14 @@ dependencies = [
[[package]]
name = "flate2"
-version = "1.0.34"
+version = "1.0.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0"
+checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c"
dependencies = [
"crc32fast",
"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"
@@ -1586,7 +1557,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -1654,9 +1625,9 @@ checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
[[package]]
name = "futures-lite"
-version = "2.3.0"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5"
+checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1"
dependencies = [
"fastrand",
"futures-core",
@@ -1673,7 +1644,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -1716,9 +1687,9 @@ dependencies = [
[[package]]
name = "gdk"
-version = "0.18.0"
+version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646"
+checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691"
dependencies = [
"cairo-rs",
"gdk-pixbuf",
@@ -1757,9 +1728,9 @@ dependencies = [
[[package]]
name = "gdk-sys"
-version = "0.18.0"
+version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2"
+checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7"
dependencies = [
"cairo-sys-rs",
"gdk-pixbuf-sys",
@@ -1774,9 +1745,9 @@ dependencies = [
[[package]]
name = "gdkwayland-sys"
-version = "0.18.0"
+version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a90fbf5c033c65d93792192a49a8efb5bb1e640c419682a58bb96f5ae77f3d4a"
+checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69"
dependencies = [
"gdk-sys",
"glib-sys",
@@ -1788,9 +1759,9 @@ dependencies = [
[[package]]
name = "gdkx11"
-version = "0.18.0"
+version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db2ea8a4909d530f79921290389cbd7c34cb9d623bfe970eaae65ca5f9cd9cce"
+checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe"
dependencies = [
"gdk",
"gdkx11-sys",
@@ -1802,9 +1773,9 @@ dependencies = [
[[package]]
name = "gdkx11-sys"
-version = "0.18.0"
+version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043"
+checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d"
dependencies = [
"gdk-sys",
"glib-sys",
@@ -1841,8 +1812,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
+ "js-sys",
"libc",
"wasi 0.11.0+wasi-snapshot-preview1",
+ "wasm-bindgen",
]
[[package]]
@@ -1877,7 +1850,7 @@ dependencies = [
"once_cell",
"pin-project-lite",
"smallvec",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -1913,7 +1886,7 @@ dependencies = [
"memchr",
"once_cell",
"smallvec",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -1923,11 +1896,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc"
dependencies = [
"heck 0.4.1",
- "proc-macro-crate 2.0.2",
+ "proc-macro-crate 2.0.0",
"proc-macro-error",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -1959,9 +1932,9 @@ dependencies = [
[[package]]
name = "gtk"
-version = "0.18.1"
+version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c"
+checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a"
dependencies = [
"atk",
"cairo-rs",
@@ -1980,9 +1953,9 @@ dependencies = [
[[package]]
name = "gtk-sys"
-version = "0.18.0"
+version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722"
+checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414"
dependencies = [
"atk-sys",
"cairo-sys-rs",
@@ -1998,22 +1971,22 @@ dependencies = [
[[package]]
name = "gtk3-macros"
-version = "0.18.0"
+version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e"
+checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d"
dependencies = [
"proc-macro-crate 1.3.1",
"proc-macro-error",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
name = "h2"
-version = "0.4.6"
+version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205"
+checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e"
dependencies = [
"atomic-waker",
"bytes",
@@ -2021,7 +1994,7 @@ dependencies = [
"futures-core",
"futures-sink",
"http",
- "indexmap 2.6.0",
+ "indexmap 2.7.0",
"slab",
"tokio",
"tokio-util",
@@ -2042,9 +2015,9 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
[[package]]
name = "hashbrown"
-version = "0.15.0"
+version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb"
+checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
[[package]]
name = "headers"
@@ -2082,12 +2055,6 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
-[[package]]
-name = "hermit-abi"
-version = "0.3.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
-
[[package]]
name = "hermit-abi"
version = "0.4.0"
@@ -2102,16 +2069,16 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]]
name = "home"
-version = "0.5.9"
+version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"
+checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf"
dependencies = [
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
name = "hoppscotch-agent"
-version = "0.1.3"
+version = "0.1.4"
dependencies = [
"aes-gcm",
"axum",
@@ -2119,15 +2086,13 @@ dependencies = [
"base16",
"chrono",
"dashmap",
- "env_logger",
- "hoppscotch-relay",
"lazy_static",
- "log",
- "mockito",
"native-dialog",
"rand 0.8.5",
+ "relay",
"serde",
"serde_json",
+ "sha2",
"tauri",
"tauri-build",
"tauri-plugin-autostart",
@@ -2138,32 +2103,18 @@ dependencies = [
"tauri-plugin-store",
"tauri-plugin-updater",
"tempfile",
- "thiserror",
+ "thiserror 1.0.69",
"tokio",
"tokio-util",
"tower-http",
+ "tracing",
+ "tracing-appender",
+ "tracing-subscriber",
"uuid",
"winreg 0.52.0",
"x25519-dalek",
]
-[[package]]
-name = "hoppscotch-relay"
-version = "0.1.1"
-dependencies = [
- "curl",
- "env_logger",
- "http",
- "log",
- "openssl",
- "openssl-sys",
- "serde",
- "serde_json",
- "thiserror",
- "tokio-util",
- "url-escape",
-]
-
[[package]]
name = "html5ever"
version = "0.26.0"
@@ -2180,13 +2131,13 @@ dependencies = [
[[package]]
name = "http"
-version = "1.1.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
+checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea"
dependencies = [
"bytes",
"fnv",
- "itoa 1.0.11",
+ "itoa 1.0.14",
]
[[package]]
@@ -2212,6 +2163,16 @@ dependencies = [
"pin-project-lite",
]
+[[package]]
+name = "http-serde"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f056c8559e3757392c8d091e796416e4649d8e49e88b8d76df6c002f05027fd"
+dependencies = [
+ "http",
+ "serde",
+]
+
[[package]]
name = "httparse"
version = "1.9.5"
@@ -2232,9 +2193,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hyper"
-version = "1.5.0"
+version = "1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a"
+checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0"
dependencies = [
"bytes",
"futures-channel",
@@ -2244,7 +2205,7 @@ dependencies = [
"http-body",
"httparse",
"httpdate",
- "itoa 1.0.11",
+ "itoa 1.0.14",
"pin-project-lite",
"smallvec",
"tokio",
@@ -2253,9 +2214,9 @@ dependencies = [
[[package]]
name = "hyper-rustls"
-version = "0.27.3"
+version = "0.27.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333"
+checksum = "f6884a48c6826ec44f524c7456b163cebe9e55a18d7b5e307cb4f100371cc767"
dependencies = [
"futures-util",
"http",
@@ -2271,9 +2232,9 @@ dependencies = [
[[package]]
name = "hyper-util"
-version = "0.1.9"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b"
+checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"
dependencies = [
"bytes",
"futures-channel",
@@ -2321,6 +2282,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.90",
+]
+
[[package]]
name = "ident_case"
version = "1.0.1"
@@ -2329,29 +2408,30 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]]
name = "idna"
-version = "0.3.0"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
+checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e"
dependencies = [
- "unicode-bidi",
- "unicode-normalization",
+ "idna_adapter",
+ "smallvec",
+ "utf8_iter",
]
[[package]]
-name = "idna"
-version = "0.5.0"
+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]]
name = "image"
-version = "0.25.4"
+version = "0.25.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc144d44a31d753b02ce64093d532f55ff8dc4ebf2ffb8a63c0dda691385acae"
+checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b"
dependencies = [
"bytemuck",
"byteorder-lite",
@@ -2372,12 +2452,12 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "2.6.0"
+version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
+checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f"
dependencies = [
"equivalent",
- "hashbrown 0.15.0",
+ "hashbrown 0.15.2",
"serde",
]
@@ -2456,9 +2536,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
[[package]]
name = "itoa"
-version = "1.0.11"
+version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
+checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
[[package]]
name = "javascriptcore-rs"
@@ -2494,7 +2574,7 @@ dependencies = [
"combine",
"jni-sys",
"log",
- "thiserror",
+ "thiserror 1.0.69",
"walkdir",
"windows-sys 0.45.0",
]
@@ -2507,46 +2587,24 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
[[package]]
name = "js-sys"
-version = "0.3.72"
+version = "0.3.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9"
+checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7"
dependencies = [
+ "once_cell",
"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]]
@@ -2615,9 +2673,9 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.161"
+version = "0.2.169"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1"
+checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
[[package]]
name = "libloading"
@@ -2631,12 +2689,12 @@ dependencies = [
[[package]]
name = "libloading"
-version = "0.8.5"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
+checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
dependencies = [
"cfg-if",
- "windows-targets 0.52.6",
+ "windows-targets 0.48.5",
]
[[package]]
@@ -2668,6 +2726,18 @@ version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
+[[package]]
+name = "litemap"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
+
+[[package]]
+name = "litrs"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5"
+
[[package]]
name = "lock_api"
version = "0.4.12"
@@ -2713,6 +2783,15 @@ dependencies = [
"tendril",
]
+[[package]]
+name = "matchers"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
+dependencies = [
+ "regex-automata 0.1.10",
+]
+
[[package]]
name = "matches"
version = "0.1.10"
@@ -2754,15 +2833,15 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "minisign-verify"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a05b5d0594e0cb1ad8cee3373018d2b84e25905dc75b2468114cc9a8e86cfc20"
+checksum = "6367d84fb54d4242af283086402907277715b8fe46976963af5ebf173f8efba3"
[[package]]
name = "miniz_oxide"
-version = "0.8.0"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
+checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394"
dependencies = [
"adler2",
"simd-adler32",
@@ -2770,45 +2849,20 @@ dependencies = [
[[package]]
name = "mio"
-version = "1.0.2"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
+checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd"
dependencies = [
- "hermit-abi 0.3.9",
"libc",
"wasi 0.11.0+wasi-snapshot-preview1",
"windows-sys 0.52.0",
]
[[package]]
-name = "mockito"
-version = "1.5.0"
+name = "muda"
+version = "0.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09b34bd91b9e5c5b06338d392463e1318d683cf82ec3d3af4014609be6e2108d"
-dependencies = [
- "assert-json-diff",
- "bytes",
- "colored",
- "futures-util",
- "http",
- "http-body",
- "http-body-util",
- "hyper",
- "hyper-util",
- "log",
- "rand 0.8.5",
- "regex",
- "serde_json",
- "serde_urlencoded",
- "similar",
- "tokio",
-]
-
-[[package]]
-name = "muda"
-version = "0.15.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8123dfd4996055ac9b15a60ad263b44b01e539007523ad7a4a533a3d93b0591"
+checksum = "fdae9c00e61cc0579bcac625e8ad22104c60548a025bfc972dc83868a28e1484"
dependencies = [
"crossbeam-channel",
"dpi",
@@ -2820,10 +2874,27 @@ dependencies = [
"once_cell",
"png",
"serde",
- "thiserror",
+ "thiserror 1.0.69",
"windows-sys 0.59.0",
]
+[[package]]
+name = "multer"
+version = "3.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b"
+dependencies = [
+ "bytes",
+ "encoding_rs",
+ "futures-util",
+ "http",
+ "httparse",
+ "memchr",
+ "mime",
+ "spin",
+ "version_check",
+]
+
[[package]]
name = "native-dialog"
version = "0.7.0"
@@ -2840,7 +2911,7 @@ dependencies = [
"objc_id",
"once_cell",
"raw-window-handle 0.5.2",
- "thiserror",
+ "thiserror 1.0.69",
"versions",
"wfd",
"which",
@@ -2859,7 +2930,7 @@ dependencies = [
"ndk-sys",
"num_enum",
"raw-window-handle 0.6.2",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -2885,12 +2956,13 @@ checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
[[package]]
name = "nix"
-version = "0.27.1"
+version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
+checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
dependencies = [
"bitflags 2.6.0",
"cfg-if",
+ "cfg_aliases",
"libc",
"memoffset",
]
@@ -2911,6 +2983,16 @@ dependencies = [
"minimal-lexical",
]
+[[package]]
+name = "nu-ansi-term"
+version = "0.46.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
+dependencies = [
+ "overload",
+ "winapi",
+]
+
[[package]]
name = "num-conv"
version = "0.1.0"
@@ -2941,10 +3023,10 @@ version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
dependencies = [
- "proc-macro-crate 2.0.2",
+ "proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -3218,9 +3300,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
[[package]]
name = "open"
-version = "5.3.0"
+version = "5.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61a877bf6abd716642a53ef1b89fb498923a4afca5c754f9050b4d081c05c4b3"
+checksum = "3ecd52f0b8d15c40ce4820aa251ed5de032e5d91fab27f7db2f40d42a8bdf69c"
dependencies = [
"is-wsl",
"libc",
@@ -3250,7 +3332,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -3261,9 +3343,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "openssl-src"
-version = "300.4.0+3.4.0"
+version = "300.4.1+3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a709e02f2b4aca747929cca5ed248880847c650233cf8b8cdc48f40aaf4898a6"
+checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c"
dependencies = [
"cc",
]
@@ -3307,6 +3389,12 @@ dependencies = [
"windows-sys 0.59.0",
]
+[[package]]
+name = "overload"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
+
[[package]]
name = "pango"
version = "0.18.3"
@@ -3363,9 +3451,9 @@ dependencies = [
[[package]]
name = "pathdiff"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d61c5ce1153ab5b689d0c074c4e7fc613e942dfb7dd9eea5ab202d2ad91fe361"
+checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
[[package]]
name = "percent-encoding"
@@ -3477,7 +3565,7 @@ dependencies = [
"phf_shared 0.11.2",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -3509,9 +3597,9 @@ dependencies = [
[[package]]
name = "pin-project-lite"
-version = "0.2.14"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
+checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
[[package]]
name = "pin-utils"
@@ -3543,7 +3631,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016"
dependencies = [
"base64 0.22.1",
- "indexmap 2.6.0",
+ "indexmap 2.7.0",
"quick-xml 0.32.0",
"serde",
"time",
@@ -3551,9 +3639,9 @@ dependencies = [
[[package]]
name = "png"
-version = "0.17.14"
+version = "0.17.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52f9d46a34a05a6a57566bc2bfae066ef07585a6e3fa30fbbdff5936380623f0"
+checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526"
dependencies = [
"bitflags 1.3.2",
"crc32fast",
@@ -3564,13 +3652,13 @@ dependencies = [
[[package]]
name = "polling"
-version = "3.7.3"
+version = "3.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511"
+checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f"
dependencies = [
"cfg-if",
"concurrent-queue",
- "hermit-abi 0.4.0",
+ "hermit-abi",
"pin-project-lite",
"rustix",
"tracing",
@@ -3622,12 +3710,20 @@ dependencies = [
[[package]]
name = "proc-macro-crate"
-version = "2.0.2"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24"
+checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8"
dependencies = [
- "toml_datetime",
- "toml_edit 0.20.2",
+ "toml_edit 0.20.7",
+]
+
+[[package]]
+name = "proc-macro-crate"
+version = "3.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b"
+dependencies = [
+ "toml_edit 0.22.22",
]
[[package]]
@@ -3662,9 +3758,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
[[package]]
name = "proc-macro2"
-version = "1.0.89"
+version = "1.0.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
+checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
dependencies = [
"unicode-ident",
]
@@ -3677,11 +3773,11 @@ checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac"
[[package]]
name = "publicsuffix"
-version = "2.2.3"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96a8c1bda5ae1af7f99a2962e49df150414a43d62404644d98dd5c3a93d07457"
+checksum = "6f42ea446cab60335f76979ec15e12619a2165b5ae2c12166bef27d283a9fadf"
dependencies = [
- "idna 0.3.0",
+ "idna",
"psl-types",
]
@@ -3705,9 +3801,9 @@ dependencies = [
[[package]]
name = "quinn"
-version = "0.11.5"
+version = "0.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684"
+checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef"
dependencies = [
"bytes",
"pin-project-lite",
@@ -3716,34 +3812,38 @@ dependencies = [
"rustc-hash",
"rustls",
"socket2",
- "thiserror",
+ "thiserror 2.0.8",
"tokio",
"tracing",
]
[[package]]
name = "quinn-proto"
-version = "0.11.8"
+version = "0.11.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6"
+checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d"
dependencies = [
"bytes",
+ "getrandom 0.2.15",
"rand 0.8.5",
"ring",
"rustc-hash",
"rustls",
+ "rustls-pki-types",
"slab",
- "thiserror",
+ "thiserror 2.0.8",
"tinyvec",
"tracing",
+ "web-time",
]
[[package]]
name = "quinn-udp"
-version = "0.5.5"
+version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b"
+checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904"
dependencies = [
+ "cfg_aliases",
"libc",
"once_cell",
"socket2",
@@ -3855,9 +3955,9 @@ checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
[[package]]
name = "redox_syscall"
-version = "0.5.7"
+version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
+checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
dependencies = [
"bitflags 2.6.0",
]
@@ -3870,43 +3970,86 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
dependencies = [
"getrandom 0.2.15",
"libredox",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
name = "regex"
-version = "1.11.0"
+version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
dependencies = [
"aho-corasick",
"memchr",
- "regex-automata",
- "regex-syntax",
+ "regex-automata 0.4.9",
+ "regex-syntax 0.8.5",
]
[[package]]
name = "regex-automata"
-version = "0.4.8"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
+dependencies = [
+ "regex-syntax 0.6.29",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3"
+checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
dependencies = [
"aho-corasick",
"memchr",
- "regex-syntax",
+ "regex-syntax 0.8.5",
]
+[[package]]
+name = "regex-syntax"
+version = "0.6.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
+
[[package]]
name = "regex-syntax"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+[[package]]
+name = "relay"
+version = "0.1.1"
+source = "git+https://github.com/CuriousCorrelation/relay.git#0cab8a64b4c9148c930590f2ad5ad3cc1c6c00ae"
+dependencies = [
+ "bytes",
+ "curl",
+ "dashmap",
+ "env_logger",
+ "http",
+ "http-serde",
+ "infer",
+ "lazy_static",
+ "log",
+ "mime",
+ "openssl",
+ "openssl-sys",
+ "serde",
+ "serde_json",
+ "strum",
+ "thiserror 1.0.69",
+ "time",
+ "tokio-util",
+ "tracing",
+ "url-escape",
+ "urlencoding",
+]
+
[[package]]
name = "reqwest"
-version = "0.12.8"
+version = "0.12.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b"
+checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f"
dependencies = [
"async-compression",
"base64 0.22.1",
@@ -3937,7 +4080,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
- "sync_wrapper 1.0.1",
+ "sync_wrapper",
"system-configuration",
"tokio",
"tokio-rustls",
@@ -3954,9 +4097,9 @@ dependencies = [
[[package]]
name = "rfd"
-version = "0.15.0"
+version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8af382a047821a08aa6bfc09ab0d80ff48d45d8726f7cd8e44891f7cb4a4278e"
+checksum = "46f6f80a9b882647d9014673ca9925d30ffc9750f2eed2b4490e189eaebd01e8"
dependencies = [
"ashpd",
"block2",
@@ -3998,9 +4141,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
[[package]]
name = "rustc-hash"
-version = "2.0.0"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152"
+checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497"
[[package]]
name = "rustc_version"
@@ -4013,22 +4156,22 @@ dependencies = [
[[package]]
name = "rustix"
-version = "0.38.37"
+version = "0.38.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811"
+checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85"
dependencies = [
"bitflags 2.6.0",
"errno",
"libc",
"linux-raw-sys",
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
name = "rustls"
-version = "0.23.15"
+version = "0.23.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993"
+checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b"
dependencies = [
"once_cell",
"ring",
@@ -4049,9 +4192,12 @@ dependencies = [
[[package]]
name = "rustls-pki-types"
-version = "1.10.0"
+version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b"
+checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37"
+dependencies = [
+ "web-time",
+]
[[package]]
name = "rustls-webpki"
@@ -4109,7 +4255,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde_derive_internals",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -4146,18 +4292,18 @@ dependencies = [
[[package]]
name = "semver"
-version = "1.0.23"
+version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
+checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba"
dependencies = [
"serde",
]
[[package]]
name = "serde"
-version = "1.0.213"
+version = "1.0.216"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1"
+checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
dependencies = [
"serde_derive",
]
@@ -4175,13 +4321,13 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.213"
+version = "1.0.216"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5"
+checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -4192,16 +4338,16 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
name = "serde_json"
-version = "1.0.132"
+version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03"
+checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
dependencies = [
- "itoa 1.0.11",
+ "itoa 1.0.14",
"memchr",
"ryu",
"serde",
@@ -4213,7 +4359,7 @@ version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6"
dependencies = [
- "itoa 1.0.11",
+ "itoa 1.0.14",
"serde",
]
@@ -4225,7 +4371,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -4244,7 +4390,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
dependencies = [
"form_urlencoded",
- "itoa 1.0.11",
+ "itoa 1.0.14",
"ryu",
"serde",
]
@@ -4259,7 +4405,7 @@ dependencies = [
"chrono",
"hex",
"indexmap 1.9.3",
- "indexmap 2.6.0",
+ "indexmap 2.7.0",
"serde",
"serde_derive",
"serde_json",
@@ -4276,7 +4422,7 @@ dependencies = [
"darling",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -4333,6 +4479,15 @@ dependencies = [
"digest",
]
+[[package]]
+name = "sharded-slab"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
+dependencies = [
+ "lazy_static",
+]
+
[[package]]
name = "shared_child"
version = "1.0.1"
@@ -4364,12 +4519,6 @@ version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
-[[package]]
-name = "similar"
-version = "2.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e"
-
[[package]]
name = "siphasher"
version = "0.3.11"
@@ -4393,9 +4542,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
[[package]]
name = "socket2"
-version = "0.5.7"
+version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c"
+checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8"
dependencies = [
"libc",
"windows-sys 0.52.0",
@@ -4499,6 +4648,28 @@ version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+[[package]]
+name = "strum"
+version = "0.26.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn 2.0.90",
+]
+
[[package]]
name = "subtle"
version = "2.6.1"
@@ -4529,9 +4700,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.85"
+version = "2.0.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56"
+checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31"
dependencies = [
"proc-macro2",
"quote",
@@ -4540,17 +4711,22 @@ dependencies = [
[[package]]
name = "sync_wrapper"
-version = "0.1.2"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
+checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
+dependencies = [
+ "futures-core",
+]
[[package]]
-name = "sync_wrapper"
-version = "1.0.1"
+name = "synstructure"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"
+checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
- "futures-core",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
]
[[package]]
@@ -4583,15 +4759,15 @@ dependencies = [
"cfg-expr",
"heck 0.5.0",
"pkg-config",
- "toml 0.8.2",
+ "toml 0.8.19",
"version-compare",
]
[[package]]
name = "tao"
-version = "0.30.3"
+version = "0.30.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0dbbebe82d02044dfa481adca1550d6dd7bd16e086bc34fa0fbecceb5a63751"
+checksum = "6682a07cf5bab0b8a2bd20d0a542917ab928b5edb75ebd4eda6b05cbaab872da"
dependencies = [
"bitflags 2.6.0",
"cocoa 0.26.0",
@@ -4634,14 +4810,14 @@ checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
name = "tar"
-version = "0.4.42"
+version = "0.4.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020"
+checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6"
dependencies = [
"filetime",
"libc",
@@ -4656,9 +4832,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "tauri"
-version = "2.0.6"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3889b392db6d32a105d3757230ea0220090b8f94c90d3e60b6c5eb91178ab1b"
+checksum = "e545de0a2dfe296fa67db208266cd397c5a55ae782da77973ef4c4fac90e9f2c"
dependencies = [
"anyhow",
"bytes",
@@ -4694,7 +4870,7 @@ dependencies = [
"tauri-runtime",
"tauri-runtime-wry",
"tauri-utils",
- "thiserror",
+ "thiserror 2.0.8",
"tokio",
"tray-icon",
"url",
@@ -4707,36 +4883,36 @@ 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 5.0.1",
"glob",
"heck 0.5.0",
- "json-patch 3.0.1",
+ "json-patch",
"schemars",
"semver",
"serde",
"serde_json",
"tauri-utils",
"tauri-winres",
- "toml 0.8.2",
+ "toml 0.8.19",
"walkdir",
]
[[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",
@@ -4745,9 +4921,9 @@ dependencies = [
"serde",
"serde_json",
"sha2",
- "syn 2.0.85",
+ "syn 2.0.90",
"tauri-utils",
- "thiserror",
+ "thiserror 2.0.8",
"time",
"url",
"uuid",
@@ -4756,23 +4932,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.90",
"tauri-codegen",
"tauri-utils",
]
[[package]]
name = "tauri-plugin"
-version = "2.0.2"
+version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6fa4e6c94cb1d635f65a770c69e23de1bc054b0e4c554fa037a7cc7676333d39"
+checksum = "e753f2a30933a9bbf0a202fa47d7cc4a3401f06e8d6dcc53b79aa62954828c79"
dependencies = [
"anyhow",
"glob",
@@ -4781,30 +4957,29 @@ dependencies = [
"serde",
"serde_json",
"tauri-utils",
- "toml 0.8.2",
+ "toml 0.8.19",
"walkdir",
]
[[package]]
name = "tauri-plugin-autostart"
-version = "2.0.1"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bba6bb936e0fd0a58ed958b49e2e423dd40949c9d9425cc991be996959e3838e"
+checksum = "a9c13f843e5e5df3eed270fc42b02923cc1a6b5c7e56b0f3ac1d858ab2c8b5fb"
dependencies = [
"auto-launch",
- "log",
"serde",
"serde_json",
"tauri",
"tauri-plugin",
- "thiserror",
+ "thiserror 2.0.8",
]
[[package]]
name = "tauri-plugin-dialog"
-version = "2.0.3"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4307310e1d2c09ab110235834722e7c2b85099b683e1eb7342ab351b0be5ada3"
+checksum = "8b59fd750551b1066744ab956a1cd6b1ea3e1b3763b0b9153ac27a044d596426"
dependencies = [
"log",
"raw-window-handle 0.6.2",
@@ -4814,15 +4989,15 @@ dependencies = [
"tauri",
"tauri-plugin",
"tauri-plugin-fs",
- "thiserror",
+ "thiserror 2.0.8",
"url",
]
[[package]]
name = "tauri-plugin-fs"
-version = "2.0.3"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96ba7d46e86db8c830d143ef90ab5a453328365b0cc834c24edea4267b16aba0"
+checksum = "a1a1edf18000f02903a7c2e5997fb89aca455ecbc0acc15c6535afbb883be223"
dependencies = [
"anyhow",
"dunce",
@@ -4834,16 +5009,18 @@ dependencies = [
"serde_repr",
"tauri",
"tauri-plugin",
- "thiserror",
+ "tauri-utils",
+ "thiserror 2.0.8",
+ "toml 0.8.19",
"url",
"uuid",
]
[[package]]
name = "tauri-plugin-http"
-version = "2.0.3"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c752aee1b00ec3c4d4f440095995d9bd2c640b478f2067d1fba388900b82eb96"
+checksum = "e62a9bde54d6a0218b63f5a248f02056ad4316ba6ad81dfb9e4f73715df5deb1"
dependencies = [
"data-url",
"http",
@@ -4855,7 +5032,7 @@ dependencies = [
"tauri",
"tauri-plugin",
"tauri-plugin-fs",
- "thiserror",
+ "thiserror 2.0.8",
"tokio",
"url",
"urlpattern",
@@ -4863,9 +5040,9 @@ dependencies = [
[[package]]
name = "tauri-plugin-shell"
-version = "2.0.2"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ad7880c5586b6b2104be451e3d7fc0f3800c84bda69e9ba81c828f87cb34267"
+checksum = "bb2c50a63e60fb8925956cc5b7569f4b750ac197a4d39f13b8dd46ea8e2bad79"
dependencies = [
"encoding_rs",
"log",
@@ -4878,46 +5055,46 @@ dependencies = [
"shared_child",
"tauri",
"tauri-plugin",
- "thiserror",
+ "thiserror 2.0.8",
"tokio",
]
[[package]]
name = "tauri-plugin-single-instance"
-version = "2.0.1"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a25ac834491d089699a2bc9266a662faf373c9f779f05a2235bc6e4d9e61769a"
+checksum = "0f36019ee9832dc99e4450bb55a21cfad8633b19c2c18bd17c7741939b070ede"
dependencies = [
- "log",
"serde",
"serde_json",
"tauri",
- "thiserror",
+ "thiserror 2.0.8",
+ "tracing",
"windows-sys 0.59.0",
- "zbus",
+ "zbus 4.4.0",
]
[[package]]
name = "tauri-plugin-store"
-version = "2.1.0"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9a580be53f04bb62422d239aa798e88522877f58a0d4a0e745f030055a51bb4"
+checksum = "1c0c08fae6995909f5e9a0da6038273b750221319f2c0f3b526d6de1cde21505"
dependencies = [
"dunce",
- "log",
"serde",
"serde_json",
"tauri",
"tauri-plugin",
- "thiserror",
+ "thiserror 2.0.8",
"tokio",
+ "tracing",
]
[[package]]
name = "tauri-plugin-updater"
-version = "2.0.2"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1dd3d2fe0f02bf52eebb5a9d23b987fffac6684646ab6fd683d706dafb18da87"
+checksum = "b7351014c140906bcfff59d96e04b1170c8f602557f40eb37f7de356d4e7067b"
dependencies = [
"base64 0.22.1",
"dirs 5.0.1",
@@ -4935,7 +5112,7 @@ dependencies = [
"tauri",
"tauri-plugin",
"tempfile",
- "thiserror",
+ "thiserror 2.0.8",
"time",
"tokio",
"url",
@@ -4945,9 +5122,9 @@ dependencies = [
[[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",
@@ -4957,16 +5134,16 @@ dependencies = [
"serde",
"serde_json",
"tauri-utils",
- "thiserror",
+ "thiserror 2.0.8",
"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",
@@ -4990,9 +5167,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",
@@ -5000,8 +5177,9 @@ dependencies = [
"dunce",
"glob",
"html5ever",
+ "http",
"infer",
- "json-patch 2.0.0",
+ "json-patch",
"kuchikiki",
"log",
"memchr",
@@ -5016,8 +5194,8 @@ dependencies = [
"serde_json",
"serde_with",
"swift-rs",
- "thiserror",
- "toml 0.8.2",
+ "thiserror 2.0.8",
+ "toml 0.8.19",
"url",
"urlpattern",
"uuid",
@@ -5036,9 +5214,9 @@ dependencies = [
[[package]]
name = "tempfile"
-version = "3.13.0"
+version = "3.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b"
+checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
dependencies = [
"cfg-if",
"fastrand",
@@ -5066,32 +5244,62 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
[[package]]
name = "thiserror"
-version = "1.0.65"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl 1.0.69",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5"
+checksum = "08f5383f3e0071702bf93ab5ee99b52d26936be9dedd9413067cbdcddcb6141a"
dependencies = [
- "thiserror-impl",
+ "thiserror-impl 2.0.8",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.65"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602"
+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2f357fcec90b3caef6623a099691be676d033b40a058ac95d2a6ade6fa0c943"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
+dependencies = [
+ "cfg-if",
+ "once_cell",
]
[[package]]
name = "time"
-version = "0.3.36"
+version = "0.3.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
+checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21"
dependencies = [
"deranged",
- "itoa 1.0.11",
+ "itoa 1.0.14",
"num-conv",
"powerfmt",
"serde",
@@ -5107,14 +5315,24 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
-version = "0.2.18"
+version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
+checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de"
dependencies = [
"num-conv",
"time-core",
]
+[[package]]
+name = "tinystr"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
+dependencies = [
+ "displaydoc",
+ "zerovec",
+]
+
[[package]]
name = "tinyvec"
version = "1.8.0"
@@ -5132,9 +5350,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.41.0"
+version = "1.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb"
+checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551"
dependencies = [
"backtrace",
"bytes",
@@ -5157,25 +5375,24 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
name = "tokio-rustls"
-version = "0.26.0"
+version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
+checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37"
dependencies = [
"rustls",
- "rustls-pki-types",
"tokio",
]
[[package]]
name = "tokio-util"
-version = "0.7.12"
+version = "0.7.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a"
+checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078"
dependencies = [
"bytes",
"futures-core",
@@ -5198,21 +5415,21 @@ dependencies = [
[[package]]
name = "toml"
-version = "0.8.2"
+version = "0.8.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d"
+checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e"
dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
- "toml_edit 0.20.2",
+ "toml_edit 0.22.22",
]
[[package]]
name = "toml_datetime"
-version = "0.6.3"
+version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
+checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
dependencies = [
"serde",
]
@@ -5223,36 +5440,47 @@ version = "0.19.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
dependencies = [
- "indexmap 2.6.0",
+ "indexmap 2.7.0",
"serde",
"serde_spanned",
"toml_datetime",
- "winnow",
+ "winnow 0.5.40",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.20.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81"
+dependencies = [
+ "indexmap 2.7.0",
+ "toml_datetime",
+ "winnow 0.5.40",
]
[[package]]
name = "toml_edit"
-version = "0.20.2"
+version = "0.22.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338"
+checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5"
dependencies = [
- "indexmap 2.6.0",
+ "indexmap 2.7.0",
"serde",
"serde_spanned",
"toml_datetime",
- "winnow",
+ "winnow 0.6.20",
]
[[package]]
name = "tower"
-version = "0.5.1"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f"
+checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9"
dependencies = [
"futures-core",
"futures-util",
"pin-project-lite",
- "sync_wrapper 0.1.2",
+ "sync_wrapper",
"tokio",
"tower-layer",
"tower-service",
@@ -5261,9 +5489,9 @@ dependencies = [
[[package]]
name = "tower-http"
-version = "0.6.1"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8437150ab6bbc8c5f0f519e3d5ed4aa883a83dd4cdd3d1b21f9482936046cb97"
+checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697"
dependencies = [
"bitflags 2.6.0",
"bytes",
@@ -5287,9 +5515,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]]
name = "tracing"
-version = "0.1.40"
+version = "0.1.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
+checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
dependencies = [
"log",
"pin-project-lite",
@@ -5297,31 +5525,87 @@ dependencies = [
"tracing-core",
]
+[[package]]
+name = "tracing-appender"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf"
+dependencies = [
+ "crossbeam-channel",
+ "thiserror 1.0.69",
+ "time",
+ "tracing-subscriber",
+]
+
[[package]]
name = "tracing-attributes"
-version = "0.1.27"
+version = "0.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
+checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
name = "tracing-core"
-version = "0.1.32"
+version = "0.1.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c"
+dependencies = [
+ "once_cell",
+ "valuable",
+]
+
+[[package]]
+name = "tracing-log"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
+dependencies = [
+ "log",
+ "once_cell",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-serde"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1"
+dependencies = [
+ "serde",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-subscriber"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
+checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008"
dependencies = [
+ "matchers",
+ "nu-ansi-term",
"once_cell",
+ "regex",
+ "serde",
+ "serde_json",
+ "sharded-slab",
+ "smallvec",
+ "thread_local",
+ "time",
+ "tracing",
+ "tracing-core",
+ "tracing-log",
+ "tracing-serde",
]
[[package]]
name = "tray-icon"
-version = "0.19.1"
+version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c92af36a182b46206723bdf8a7942e20838cde1cf062e5b97854d57eb01763b"
+checksum = "d48a05076dd272615d03033bf04f480199f7d1b66a8ac64d75c625fc4a70c06b"
dependencies = [
"core-graphics 0.24.0",
"crossbeam-channel",
@@ -5334,7 +5618,7 @@ dependencies = [
"once_cell",
"png",
"serde",
- "thiserror",
+ "thiserror 1.0.69",
"windows-sys 0.59.0",
]
@@ -5408,26 +5692,11 @@ 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"
+version = "1.0.14"
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",
-]
+checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]]
name = "unicode-segmentation"
@@ -5453,12 +5722,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "url"
-version = "2.5.2"
+version = "2.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c"
+checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60"
dependencies = [
"form_urlencoded",
- "idna 0.5.0",
+ "idna",
"percent-encoding",
"serde",
]
@@ -5472,6 +5741,12 @@ dependencies = [
"percent-encoding",
]
+[[package]]
+name = "urlencoding"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
+
[[package]]
name = "urlpattern"
version = "0.3.0"
@@ -5490,6 +5765,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 = "utf8parse"
version = "0.2.2"
@@ -5507,6 +5794,12 @@ dependencies = [
"serde",
]
+[[package]]
+name = "valuable"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
+
[[package]]
name = "vcpkg"
version = "0.2.15"
@@ -5588,9 +5881,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
-version = "0.2.95"
+version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"
+checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396"
dependencies = [
"cfg-if",
"once_cell",
@@ -5599,36 +5892,36 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.95"
+version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"
+checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79"
dependencies = [
"bumpalo",
"log",
- "once_cell",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.45"
+version = "0.4.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b"
+checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2"
dependencies = [
"cfg-if",
"js-sys",
+ "once_cell",
"wasm-bindgen",
"web-sys",
]
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.95"
+version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"
+checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -5636,28 +5929,28 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.95"
+version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
+checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.95"
+version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
+checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6"
[[package]]
name = "wasm-streams"
-version = "0.4.1"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd"
+checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65"
dependencies = [
"futures-util",
"js-sys",
@@ -5728,9 +6021,19 @@ dependencies = [
[[package]]
name = "web-sys"
-version = "0.3.72"
+version = "0.3.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112"
+checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "web-time"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -5782,9 +6085,9 @@ dependencies = [
[[package]]
name = "webpki-roots"
-version = "0.26.6"
+version = "0.26.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958"
+checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e"
dependencies = [
"rustls-pki-types",
]
@@ -5811,7 +6114,7 @@ checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -5820,7 +6123,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",
]
@@ -5869,7 +6172,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
- "windows-sys 0.59.0",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -5932,7 +6235,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -5943,7 +6246,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
]
[[package]]
@@ -6208,6 +6511,15 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "winnow"
+version = "0.6.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b"
+dependencies = [
+ "memchr",
+]
+
[[package]]
name = "winreg"
version = "0.10.1"
@@ -6227,14 +6539,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.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd5cdf57c66813d97601181349c63b96994b3074fc3d7a31a8cce96e968e3bbd"
+checksum = "61ce51277d65170f6379d8cda935c80e3c2d1f0ff712a123c8bddb11b31a4b73"
dependencies = [
"base64 0.22.1",
"block2",
+ "cookie",
"crossbeam-channel",
"dpi",
"dunce",
@@ -6258,7 +6583,8 @@ dependencies = [
"sha2",
"soup3",
"tao-macros",
- "thiserror",
+ "thiserror 1.0.69",
+ "url",
"webkit2gtk",
"webkit2gtk-sys",
"webview2-com",
@@ -6322,11 +6648,35 @@ dependencies = [
"windows-sys 0.59.0",
]
+[[package]]
+name = "yoke"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40"
+dependencies = [
+ "serde",
+ "stable_deref_trait",
+ "yoke-derive",
+ "zerofrom",
+]
+
+[[package]]
+name = "yoke-derive"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "synstructure",
+]
+
[[package]]
name = "zbus"
-version = "4.0.1"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030"
+checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725"
dependencies = [
"async-broadcast",
"async-executor",
@@ -6338,7 +6688,6 @@ dependencies = [
"async-task",
"async-trait",
"blocking",
- "derivative",
"enumflags2",
"event-listener",
"futures-core",
@@ -6352,28 +6701,71 @@ dependencies = [
"serde_repr",
"sha1",
"static_assertions",
- "tokio",
"tracing",
"uds_windows",
"windows-sys 0.52.0",
"xdg-home",
- "zbus_macros",
- "zbus_names",
- "zvariant",
+ "zbus_macros 4.4.0",
+ "zbus_names 3.0.0",
+ "zvariant 4.2.0",
+]
+
+[[package]]
+name = "zbus"
+version = "5.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb67eadba43784b6fb14857eba0d8fc518686d3ee537066eb6086dc318e2c8a1"
+dependencies = [
+ "async-broadcast",
+ "async-recursion",
+ "async-trait",
+ "enumflags2",
+ "event-listener",
+ "futures-core",
+ "futures-util",
+ "hex",
+ "nix",
+ "ordered-stream",
+ "serde",
+ "serde_repr",
+ "static_assertions",
+ "tokio",
+ "tracing",
+ "uds_windows",
+ "windows-sys 0.59.0",
+ "winnow 0.6.20",
+ "xdg-home",
+ "zbus_macros 5.2.0",
+ "zbus_names 4.1.0",
+ "zvariant 5.1.0",
]
[[package]]
name = "zbus_macros"
-version = "4.0.1"
+version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7a3e850ff1e7217a3b7a07eba90d37fe9bb9e89a310f718afcde5885ca9b6d7"
+checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e"
dependencies = [
- "proc-macro-crate 1.3.1",
+ "proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
- "regex",
- "syn 1.0.109",
- "zvariant_utils",
+ "syn 2.0.90",
+ "zvariant_utils 2.1.0",
+]
+
+[[package]]
+name = "zbus_macros"
+version = "5.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c9d49ebc960ceb660f2abe40a5904da975de6986f2af0d7884b39eec6528c57"
+dependencies = [
+ "proc-macro-crate 3.2.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "zbus_names 4.1.0",
+ "zvariant 5.1.0",
+ "zvariant_utils 3.0.2",
]
[[package]]
@@ -6384,7 +6776,19 @@ checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c"
dependencies = [
"serde",
"static_assertions",
- "zvariant",
+ "zvariant 4.2.0",
+]
+
+[[package]]
+name = "zbus_names"
+version = "4.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "856b7a38811f71846fd47856ceee8bccaec8399ff53fb370247e66081ace647b"
+dependencies = [
+ "serde",
+ "static_assertions",
+ "winnow 0.6.20",
+ "zvariant 5.1.0",
]
[[package]]
@@ -6405,7 +6809,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "zerofrom"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e"
+dependencies = [
+ "zerofrom-derive",
+]
+
+[[package]]
+name = "zerofrom-derive"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "synstructure",
]
[[package]]
@@ -6425,58 +6850,122 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.90",
+]
+
+[[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.90",
]
[[package]]
name = "zip"
-version = "2.2.0"
+version = "2.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494"
+checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45"
dependencies = [
"arbitrary",
"crc32fast",
"crossbeam-utils",
"displaydoc",
- "indexmap 2.6.0",
+ "indexmap 2.7.0",
"memchr",
- "thiserror",
+ "thiserror 2.0.8",
]
[[package]]
name = "zvariant"
-version = "4.0.0"
+version = "4.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e09e8be97d44eeab994d752f341e67b3b0d80512a8b315a0671d47232ef1b65"
+checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe"
+dependencies = [
+ "endi",
+ "enumflags2",
+ "serde",
+ "static_assertions",
+ "zvariant_derive 4.2.0",
+]
+
+[[package]]
+name = "zvariant"
+version = "5.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1200ee6ac32f1e5a312e455a949a4794855515d34f9909f4a3e082d14e1a56f"
dependencies = [
"endi",
"enumflags2",
"serde",
"static_assertions",
"url",
- "zvariant_derive",
+ "winnow 0.6.20",
+ "zvariant_derive 5.1.0",
+ "zvariant_utils 3.0.2",
]
[[package]]
name = "zvariant_derive"
-version = "4.0.0"
+version = "4.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72a5857e2856435331636a9fbb415b09243df4521a267c5bedcd5289b4d5799e"
+checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449"
dependencies = [
- "proc-macro-crate 1.3.1",
+ "proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
- "syn 1.0.109",
- "zvariant_utils",
+ "syn 2.0.90",
+ "zvariant_utils 2.1.0",
+]
+
+[[package]]
+name = "zvariant_derive"
+version = "5.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "687e3b97fae6c9104fbbd36c73d27d149abf04fb874e2efbd84838763daa8916"
+dependencies = [
+ "proc-macro-crate 3.2.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "zvariant_utils 3.0.2",
]
[[package]]
name = "zvariant_utils"
-version = "1.1.0"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172"
+checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340"
dependencies = [
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "zvariant_utils"
+version = "3.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20d1d011a38f12360e5fcccceeff5e2c42a8eb7f27f0dcba97a0862ede05c9c6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde",
+ "static_assertions",
+ "syn 2.0.90",
+ "winnow 0.6.20",
]
diff --git a/packages/hoppscotch-agent/src-tauri/Cargo.toml b/packages/hoppscotch-agent/src-tauri/Cargo.toml
index 79b8140ac..66fec3252 100644
--- a/packages/hoppscotch-agent/src-tauri/Cargo.toml
+++ b/packages/hoppscotch-agent/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "hoppscotch-agent"
-version = "0.1.3"
+version = "0.1.4"
description = "A cross-platform HTTP request agent for Hoppscotch for advanced request handling including custom headers, certificates, proxies, and local system integration."
authors = ["AndrewBastin", "CuriousCorrelation"]
edition = "2021"
@@ -29,9 +29,10 @@ tokio-util = "0.7.12"
uuid = { version = "1.11.0", features = [ "v4", "fast-rng" ] }
chrono = { version = "0.4", features = ["serde"] }
rand = "0.8.5"
-log = "0.4.22"
-env_logger = "0.11.5"
-hoppscotch-relay = { path = "../../hoppscotch-relay" }
+tracing = "0.1.40"
+tracing-subscriber = { version = "0.3.18", features = ["env-filter", "json", "fmt", "std", "time"] }
+tracing-appender = "0.2.3"
+relay = { git = "https://github.com/CuriousCorrelation/relay.git" }
thiserror = "1.0.64"
tauri-plugin-store = "2.1.0"
x25519-dalek = { version = "2.0.1", features = ["getrandom"] }
@@ -43,14 +44,12 @@ lazy_static = "1.5.0"
tauri-plugin-single-instance = "2.0.1"
tauri-plugin-http = { version = "2.0.1", features = ["gzip"] }
native-dialog = "0.7.0"
+sha2 = "0.10.8"
[target.'cfg(windows)'.dependencies]
tempfile = { version = "3.13.0" }
winreg = { version = "0.52.0" }
-[dev-dependencies]
-mockito = "1.5.0"
-
[features]
default = ["tauri-plugin-autostart"]
portable = []
diff --git a/packages/hoppscotch-agent/src-tauri/capabilities/default.json b/packages/hoppscotch-agent/src-tauri/capabilities/default.json
index fe0f3775c..70c49c1c0 100644
--- a/packages/hoppscotch-agent/src-tauri/capabilities/default.json
+++ b/packages/hoppscotch-agent/src-tauri/capabilities/default.json
@@ -18,6 +18,7 @@
"core:default",
"shell:allow-open",
"core:window:allow-close",
+ "core:window:allow-hide",
"core:window:allow-set-focus",
"core:window:allow-set-always-on-top"
]
diff --git a/packages/hoppscotch-agent/src-tauri/src/command.rs b/packages/hoppscotch-agent/src-tauri/src/command.rs
new file mode 100644
index 000000000..40de8c5bd
--- /dev/null
+++ b/packages/hoppscotch-agent/src-tauri/src/command.rs
@@ -0,0 +1,40 @@
+use std::sync::Arc;
+
+use crate::{
+ model::{MaskedRegistration, RegistrationsList},
+ state::AppState,
+ util::generate_auth_key_hash,
+};
+
+#[tauri::command]
+#[tracing::instrument(skip(state))]
+pub async fn get_otp(state: tauri::State<'_, Arc<AppState>>) -> Result<Option<String>, ()> {
+ tracing::debug!("Retrieving current OTP");
+ let otp = state.active_registration_code.read().await.clone();
+ if otp.is_some() {
+ tracing::debug!("OTP found");
+ } else {
+ tracing::debug!("No active OTP");
+ }
+ Ok(otp)
+}
+
+#[tauri::command]
+#[tracing::instrument(skip(state))]
+pub fn list_registrations(state: tauri::State<'_, Arc<AppState>>) -> Result<RegistrationsList, ()> {
+ tracing::debug!("Retrieving registrations list");
+
+ let masked_registrations = state
+ .get_registrations()
+ .iter()
+ .map(|entry| MaskedRegistration {
+ registered_at: entry.value().registered_at,
+ auth_key_hash: generate_auth_key_hash(entry.key()),
+ })
+ .collect();
+
+ Ok(RegistrationsList {
+ registrations: masked_registrations,
+ total: state.get_registrations().len(),
+ })
+}
diff --git a/packages/hoppscotch-agent/src-tauri/src/controller.rs b/packages/hoppscotch-agent/src-tauri/src/controller.rs
index 00e0006f9..42f26217e 100644
--- a/packages/hoppscotch-agent/src-tauri/src/controller.rs
+++ b/packages/hoppscotch-agent/src-tauri/src/controller.rs
@@ -1,3 +1,5 @@
+use std::sync::Arc;
+
use axum::{
body::Bytes,
extract::{Path, State},
@@ -8,46 +10,57 @@ use axum_extra::{
headers::{authorization::Bearer, Authorization},
TypedHeader,
};
-use hoppscotch_relay::{RequestWithMetadata, ResponseWithMetadata};
-use std::sync::Arc;
+use chrono::Utc;
+use rand::Rng;
+use serde_json::json;
use tauri::{AppHandle, Emitter};
+use uuid::Uuid;
use x25519_dalek::{EphemeralSecret, PublicKey};
use crate::{
error::{AgentError, AgentResult},
- model::{AuthKeyResponse, ConfirmedRegistrationRequest, HandshakeResponse},
- state::{AppState, Registration},
- util::EncryptedJson,
+ global::NONCE,
+ model::{
+ AuthKeyResponse, ConfirmedRegistrationRequest, HandshakeResponse, LogEntry, LogLevel,
+ MaskedRegistration, Registration,
+ },
+ state::AppState,
+ util::{generate_auth_key_hash, EncryptedJson},
};
-use chrono::Utc;
-use rand::Rng;
-use serde_json::json;
-use uuid::Uuid;
+#[tracing::instrument]
fn generate_otp() -> String {
let otp: u32 = rand::thread_rng().gen_range(0..1_000_000);
-
- format!("{:06}", otp)
+ let formatted = format!("{:06}", otp);
+ tracing::debug!("Generated OTP: {}", formatted);
+ formatted
}
+#[tracing::instrument(skip(app_handle))]
pub async fn handshake(
State((_, app_handle)): State<(Arc<AppState>, AppHandle)>,
) -> AgentResult<Json<HandshakeResponse>> {
- Ok(Json(HandshakeResponse {
+ tracing::info!("Processing handshake request");
+ let response = HandshakeResponse {
status: "success".to_string(),
__hoppscotch__agent__: true,
agent_version: app_handle.package_info().version.to_string(),
- }))
+ };
+ tracing::info!("Handshake successful");
+ Ok(Json(response))
}
+#[tracing::instrument(skip(state, app_handle))]
pub async fn receive_registration(
State((state, app_handle)): State<(Arc<AppState>, AppHandle)>,
) -> AgentResult<Json<serde_json::Value>> {
let otp = generate_otp();
+ tracing::info!("Generated new registration OTP");
let mut active_registration_code = state.active_registration_code.write().await;
if !active_registration_code.is_none() {
+ tracing::warn!("Registration attempt while another registration is active");
return Ok(Json(
json!({ "message": "There is already an existing registration happening" }),
));
@@ -55,32 +68,73 @@ pub async fn receive_registration(
*active_registration_code = Some(otp.clone());
- app_handle
- .emit("registration_received", otp)
- .map_err(|_| AgentError::InternalServerError)?;
+ match app_handle.emit("registration-received", otp) {
+ Ok(_) => {
+ tracing::info!("Registration event emitted successfully");
+ Ok(Json(
+ json!({ "message": "Registration received and stored" }),
+ ))
+ }
+ Err(e) => {
+ tracing::error!("Failed to emit registration event: {}", e);
+ Err(AgentError::InternalServerError)
+ }
+ }
+}
+
+#[tracing::instrument(skip(state, _app_handle))]
+pub async fn registration(
+ State((state, _app_handle)): State<(Arc<AppState>, AppHandle)>,
+ TypedHeader(auth_header): TypedHeader<Authorization<Bearer>>,
+) -> AgentResult<EncryptedJson<MaskedRegistration>> {
+ let token = auth_header.token();
+
+ if !state.validate_access(token) {
+ tracing::warn!("Unauthorized attempt to list registrations");
+ return Err(AgentError::Unauthorized);
+ }
+
+ let registration = state
+ .get_registration(token)
+ .ok_or(AgentError::Unauthorized)?;
+
+ let key_b16 = registration.shared_secret_b16;
- Ok(Json(
- json!({ "message": "Registration received and stored" }),
- ))
+ let registration = MaskedRegistration {
+ registered_at: registration.registered_at,
+ auth_key_hash: generate_auth_key_hash(token),
+ };
+
+ tracing::info!("Successfully retrieved registrations list");
+ Ok(EncryptedJson {
+ key_b16,
+ data: registration,
+ })
}
+#[tracing::instrument(skip(state, app_handle), fields(auth_key))]
pub async fn verify_registration(
State((state, app_handle)): State<(Arc<AppState>, AppHandle)>,
Json(confirmed_registration): Json<ConfirmedRegistrationRequest>,
) -> AgentResult<Json<AuthKeyResponse>> {
- state
+ tracing::info!("Verifying registration request");
+
+ if !state
.validate_registration(&confirmed_registration.registration)
.await
- .then_some(())
- .ok_or(AgentError::InvalidRegistration)?;
+ {
+ tracing::warn!("Invalid registration attempt");
+ return Err(AgentError::InvalidRegistration);
+ }
let auth_key = Uuid::new_v4().to_string();
let created_at = Utc::now();
- let auth_key_copy = auth_key.clone();
+ tracing::Span::current().record("auth_key", &auth_key.as_str());
- let agent_secret_key = EphemeralSecret::random();
- let agent_public_key = PublicKey::from(&agent_secret_key);
+ let auth_key_copy = auth_key.clone();
+ let secret_key = EphemeralSecret::random();
+ let public_key = PublicKey::from(&secret_key);
let their_public_key = {
let public_key_slice: &[u8; 32] =
@@ -92,9 +146,9 @@ pub async fn verify_registration(
PublicKey::from(public_key_slice.to_owned())
};
- let shared_secret = agent_secret_key.diffie_hellman(&their_public_key);
+ let shared_secret = secret_key.diffie_hellman(&their_public_key);
- let _ = state.update_registrations(app_handle.clone(), |regs| {
+ if let Err(e) = state.update_registrations(app_handle.clone(), |regs| {
regs.insert(
auth_key_copy,
Registration {
@@ -102,82 +156,102 @@ pub async fn verify_registration(
shared_secret_b16: base16::encode_lower(shared_secret.as_bytes()),
},
);
- })?;
+ }) {
+ tracing::error!("Failed to update registrations: {:?}", e);
+ return Err(e);
+ }
let auth_payload = json!({
"auth_key": auth_key,
"created_at": created_at
});
- app_handle
- .emit("authenticated", &auth_payload)
- .map_err(|_| AgentError::InternalServerError)?;
+ if let Err(e) = app_handle.emit("authenticated", &auth_payload) {
+ tracing::error!("Failed to emit authenticated event: {:?}", e);
+ return Err(AgentError::InternalServerError);
+ }
+
+ let _ = state.clear_active_registration().await;
+ tracing::info!("Registration verified successfully");
Ok(Json(AuthKeyResponse {
auth_key,
created_at,
- agent_public_key_b16: base16::encode_lower(agent_public_key.as_bytes()),
+ agent_public_key_b16: base16::encode_lower(public_key.as_bytes()),
}))
}
-pub async fn run_request<T>(
- State((state, _app_handle)): State<(Arc<AppState>, T)>,
+#[tracing::instrument(skip(state, app_handle), fields(auth_key = %auth_key))]
+pub async fn delete_registration(
+ State((state, app_handle)): State<(Arc<AppState>, AppHandle)>,
TypedHeader(auth_header): TypedHeader<Authorization<Bearer>>,
- headers: HeaderMap,
- body: Bytes,
-) -> AgentResult<EncryptedJson<ResponseWithMetadata>> {
- let nonce = headers
- .get("X-Hopp-Nonce")
- .ok_or(AgentError::Unauthorized)?
- .to_str()
- .map_err(|_| AgentError::Unauthorized)?;
-
- let req: RequestWithMetadata = state
- .validate_access_and_get_data(auth_header.token(), nonce, &body)
- .ok_or(AgentError::Unauthorized)?;
+ Path(auth_key): Path<String>,
+) -> AgentResult<Json<serde_json::Value>> {
+ if !state.validate_access(auth_header.token()) {
+ tracing::warn!("Unauthorized deletion attempt");
+ return Err(AgentError::Unauthorized);
+ }
- let req_id = req.req_id;
+ let _removed = state.update_registrations(app_handle.clone(), |regs| {
+ regs.remove(&auth_key);
+ })?;
- let reg_info = state
- .get_registration_info(auth_header.token())
- .ok_or(AgentError::Unauthorized)?;
+ tracing::info!("Registration deleted successfully");
+ let message = format!("{} registration deleted successfully", auth_key);
+ Ok(Json(json!({ "message": message })))
+}
- let cancel_token = tokio_util::sync::CancellationToken::new();
- state.add_cancellation_token(req.req_id, cancel_token.clone());
-
- let cancel_token_clone = cancel_token.clone();
- // Execute the HTTP request in a blocking thread pool and handles cancellation.
- //
- // It:
- // 1. Uses `spawn_blocking` to run the sync `run_request_task`
- // without blocking the main Tokio runtime.
- // 2. Uses `select!` to concurrently wait for either
- // a. the task to complete,
- // b. or a cancellation signal.
- //
- // Why spawn_blocking?
- // - `run_request_task` uses synchronous curl operations which would block
- // the async runtime if not run in a separate thread.
- // - `spawn_blocking` moves this operation to a thread pool designed for
- // blocking tasks, so other async operations to continue unblocked.
- let result = tokio::select! {
- res = tokio::task::spawn_blocking(move || hoppscotch_relay::run_request_task(&req, cancel_token_clone)) => {
- match res {
- Ok(task_result) => Ok(task_result?),
- Err(_) => Err(AgentError::InternalServerError),
+#[tracing::instrument(skip(state, body, _app_handle), fields(req_id))]
+pub async fn execute(
+ State((state, _app_handle)): State<(Arc<AppState>, AppHandle)>,
+ TypedHeader(auth_header): TypedHeader<Authorization<Bearer>>,
+ headers: HeaderMap,
+ body: Bytes,
+) -> AgentResult<EncryptedJson<relay::Response>> {
+ let nonce = match headers.get(NONCE) {
+ Some(n) => match n.to_str() {
+ Ok(n) => n,
+ Err(_) => {
+ tracing::warn!("Invalid nonce header");
+ return Err(AgentError::Unauthorized);
}
},
- _ = cancel_token.cancelled() => {
- Err(AgentError::RequestCancelled)
+ None => {
+ tracing::warn!("Missing nonce header");
+ return Err(AgentError::Unauthorized);
}
};
- state.remove_cancellation_token(req_id);
+ let request = match state.validate_access_and_get_data::<relay::Request>(
+ auth_header.token(),
+ nonce,
+ &body,
+ ) {
+ Some(r) => r,
+ None => {
+ tracing::warn!("Invalid access or data");
+ return Err(AgentError::Unauthorized);
+ }
+ };
- result.map(|val| EncryptedJson {
- key_b16: reg_info.shared_secret_b16,
- data: val,
- })
+ let request_id = request.id;
+
+ tracing::Span::current().record("request_id", &request_id);
+
+ let reg_info = match state.get_registration(auth_header.token()) {
+ Some(r) => r,
+ None => {
+ tracing::warn!("Registration info not found");
+ return Err(AgentError::Unauthorized);
+ }
+ };
+
+ Ok(relay::execute(request)
+ .await
+ .map(|response| EncryptedJson {
+ key_b16: reg_info.shared_secret_b16,
+ data: response,
+ })?)
}
/// Provides a way for registered clients to check if their
@@ -187,34 +261,139 @@ pub async fn run_request<T>(
/// registration, the client also needs the shared secret to verify
/// if the read fails, or the auth_key didn't validate and this route returns
/// undefined, we can count on the registration not being valid anymore.
+#[tracing::instrument(skip(state, _app_handle))]
pub async fn registered_handshake(
- State((state, _)): State<(Arc<AppState>, AppHandle)>,
+ State((state, _app_handle)): State<(Arc<AppState>, AppHandle)>,
TypedHeader(auth_header): TypedHeader<Authorization<Bearer>>,
) -> AgentResult<EncryptedJson<serde_json::Value>> {
- let reg_info = state.get_registration_info(auth_header.token());
+ let reg_info = state.get_registration(auth_header.token());
match reg_info {
- Some(reg) => Ok(EncryptedJson {
- key_b16: reg.shared_secret_b16,
- data: json!(true),
- }),
- None => Err(AgentError::Unauthorized),
+ Some(reg) => {
+ tracing::info!("Handshake successful");
+ Ok(EncryptedJson {
+ key_b16: reg.shared_secret_b16,
+ data: json!(true),
+ })
+ }
+ None => {
+ tracing::warn!("Unauthorized handshake attempt");
+ Err(AgentError::Unauthorized)
+ }
}
}
-pub async fn cancel_request<T>(
- State((state, _app_handle)): State<(Arc<AppState>, T)>,
+#[tracing::instrument(skip(state, _app_handle), fields(request_id = %request_id))]
+pub async fn cancel(
+ State((state, _app_handle)): State<(Arc<AppState>, AppHandle)>,
TypedHeader(auth_header): TypedHeader<Authorization<Bearer>>,
- Path(req_id): Path<usize>,
+ Path(request_id): Path<usize>,
) -> AgentResult<Json<serde_json::Value>> {
if !state.validate_access(auth_header.token()) {
+ tracing::warn!("Unauthorized cancellation attempt");
return Err(AgentError::Unauthorized);
}
- if let Some((_, token)) = state.remove_cancellation_token(req_id) {
- token.cancel();
+ if let Ok(()) = relay::cancel(request_id.try_into().unwrap()).await {
+ tracing::info!("Request cancelled successfully");
Ok(Json(json!({"message": "Request cancelled successfully"})))
} else {
+ tracing::warn!("Request not found");
Err(AgentError::RequestNotFound)
}
}
+
+#[tracing::instrument(skip_all)]
+pub async fn log_sink(
+ State((state, _app_handle)): State<(Arc<AppState>, AppHandle)>,
+ TypedHeader(auth_header): TypedHeader<Authorization<Bearer>>,
+ headers: HeaderMap,
+ body: Bytes,
+) -> AgentResult<Json<serde_json::Value>> {
+ if !state.validate_access(auth_header.token()) {
+ tracing::warn!("Unauthorized log sink access attempt");
+ return Err(AgentError::Unauthorized);
+ }
+
+ let nonce = match headers.get(NONCE) {
+ Some(n) => match n.to_str() {
+ Ok(n) => n,
+ Err(_) => {
+ tracing::warn!("Invalid nonce header");
+ return Err(AgentError::Unauthorized);
+ }
+ },
+ None => {
+ tracing::warn!("Missing nonce header");
+ return Err(AgentError::Unauthorized);
+ }
+ };
+
+ let log_entry: LogEntry =
+ match state.validate_access_and_get_data(auth_header.token(), nonce, &body) {
+ Some(entry) => entry,
+ None => {
+ tracing::warn!("Failed to decrypt or parse log entry");
+ return Err(AgentError::BadRequest("Invalid log entry format".into()));
+ }
+ };
+
+ let metadata_str = log_entry
+ .metadata
+ .map(|m| m.to_string())
+ .unwrap_or_default();
+
+ let correlation = log_entry.correlation_id.unwrap_or_default();
+
+ match log_entry.level {
+ LogLevel::Debug => {
+ tracing::debug!(
+ timestamp = %log_entry.timestamp,
+ context = %log_entry.context,
+ source = %log_entry.source,
+ metadata = %metadata_str,
+ correlation_id = %correlation,
+ "{}",
+ log_entry.message
+ );
+ }
+ LogLevel::Info => {
+ tracing::info!(
+ timestamp = %log_entry.timestamp,
+ context = %log_entry.context,
+ source = %log_entry.source,
+ metadata = %metadata_str,
+ correlation_id = %correlation,
+ "{}",
+ log_entry.message
+ );
+ }
+ LogLevel::Warn => {
+ tracing::warn!(
+ timestamp = %log_entry.timestamp,
+ context = %log_entry.context,
+ source = %log_entry.source,
+ metadata = %metadata_str,
+ correlation_id = %correlation,
+ "{}",
+ log_entry.message
+ );
+ }
+ LogLevel::Error => {
+ tracing::error!(
+ timestamp = %log_entry.timestamp,
+ context = %log_entry.context,
+ source = %log_entry.source,
+ metadata = %metadata_str,
+ correlation_id = %correlation,
+ "{}",
+ log_entry.message
+ );
+ }
+ }
+
+ Ok(Json(json!({
+ "status": "success",
+ "message": "Log entry processed"
+ })))
+}
diff --git a/packages/hoppscotch-agent/src-tauri/src/dialog.rs b/packages/hoppscotch-agent/src-tauri/src/dialog.rs
index 5b8a19ecc..e4967b43f 100644
--- a/packages/hoppscotch-agent/src-tauri/src/dialog.rs
+++ b/packages/hoppscotch-agent/src-tauri/src/dialog.rs
@@ -10,13 +10,13 @@ pub fn panic(msg: &str) {
.show_alert()
.unwrap_or_default();
- log::error!("{}: {}", FATAL_ERROR, msg);
+ tracing::error!("{}: {}", FATAL_ERROR, msg);
panic!("{}: {}", FATAL_ERROR, msg);
}
pub fn info(msg: &str) {
- log::info!("{}", msg);
+ tracing::info!("{}", msg);
MessageDialog::new()
.set_type(MessageType::Info)
@@ -27,7 +27,7 @@ pub fn info(msg: &str) {
}
pub fn warn(msg: &str) {
- log::warn!("{}", msg);
+ tracing::warn!("{}", msg);
MessageDialog::new()
.set_type(MessageType::Warning)
@@ -38,7 +38,7 @@ pub fn warn(msg: &str) {
}
pub fn error(msg: &str) {
- log::error!("{}", msg);
+ tracing::error!("{}", msg);
MessageDialog::new()
.set_type(MessageType::Error)
diff --git a/packages/hoppscotch-agent/src-tauri/src/error.rs b/packages/hoppscotch-agent/src-tauri/src/error.rs
index 697b3dd3b..638a29f3c 100644
--- a/packages/hoppscotch-agent/src-tauri/src/error.rs
+++ b/packages/hoppscotch-agent/src-tauri/src/error.rs
@@ -8,6 +8,10 @@ use thiserror::Error;
#[derive(Error, Debug)]
pub enum AgentError {
+ #[error("FATAL: No `main` window found")]
+ NoMainWindow,
+ #[error("Tauri error: {0}")]
+ Tauri(#[from] tauri::Error),
#[error("Invalid Registration")]
InvalidRegistration,
#[error("Invalid Client Public Key")]
@@ -45,7 +49,13 @@ pub enum AgentError {
#[error("Store error: {0}")]
TauriPluginStore(#[from] tauri_plugin_store::Error),
#[error("Relay error: {0}")]
- Relay(#[from] hoppscotch_relay::RelayError),
+ Relay(#[from] relay::error::RelayError),
+ #[error("IO error: {0}")]
+ Io(#[from] std::io::Error),
+ #[error("Log init error: {0}")]
+ LogInit(#[from] tracing_appender::rolling::InitError),
+ #[error("Log init global error: {0}")]
+ LogInitGlobal(#[from] tracing::subscriber::SetGlobalDefaultError),
}
impl IntoResponse for AgentError {
@@ -55,7 +65,9 @@ impl IntoResponse for AgentError {
AgentError::InvalidClientPublicKey => (StatusCode::BAD_REQUEST, self.to_string()),
AgentError::Unauthorized => (StatusCode::UNAUTHORIZED, self.to_string()),
AgentError::RequestNotFound => (StatusCode::NOT_FOUND, self.to_string()),
- AgentError::InternalServerError => (StatusCode::INTERNAL_SERVER_ERROR, self.to_string()),
+ AgentError::InternalServerError => {
+ (StatusCode::INTERNAL_SERVER_ERROR, self.to_string())
+ }
AgentError::BadRequest(msg) => (StatusCode::BAD_REQUEST, msg),
AgentError::ClientCertError => (StatusCode::BAD_REQUEST, self.to_string()),
AgentError::RootCertError => (StatusCode::BAD_REQUEST, self.to_string()),
diff --git a/packages/hoppscotch-agent/src-tauri/src/global.rs b/packages/hoppscotch-agent/src-tauri/src/global.rs
index feaf7fe85..002729dbc 100644
--- a/packages/hoppscotch-agent/src-tauri/src/global.rs
+++ b/packages/hoppscotch-agent/src-tauri/src/global.rs
@@ -1,2 +1,3 @@
pub const AGENT_STORE: &str = "app_data.bin";
pub const REGISTRATIONS: &str = "registrations";
+pub const NONCE: &str = "X-Hopp-Nonce";
diff --git a/packages/hoppscotch-agent/src-tauri/src/lib.rs b/packages/hoppscotch-agent/src-tauri/src/lib.rs
index b8312eb0d..e7ead68ff 100644
--- a/packages/hoppscotch-agent/src-tauri/src/lib.rs
+++ b/packages/hoppscotch-agent/src-tauri/src/lib.rs
@@ -1,3 +1,4 @@
+pub mod command;
pub mod controller;
pub mod dialog;
pub mod error;
@@ -11,59 +12,105 @@ pub mod updater;
pub mod util;
pub mod webview;
-use log::{error, info};
use std::sync::Arc;
-use tauri::{Emitter, Listener, Manager, WebviewWindowBuilder};
+use tauri::{AppHandle, Emitter, Listener, Manager, WebviewWindowBuilder};
use tauri_plugin_updater::UpdaterExt;
use tokio_util::sync::CancellationToken;
+use tracing_subscriber::{fmt::format::JsonFields, EnvFilter};
-use model::Payload;
+use error::{AgentError, AgentResult};
+use model::{LogGuard, Payload};
use state::AppState;
-#[tauri::command]
-async fn get_otp(state: tauri::State<'_, Arc<AppState>>) -> Result<Option<String>, ()> {
- Ok(state.active_registration_code.read().await.clone())
+#[tracing::instrument(skip(app_handle))]
+fn create_main_window(app_handle: &AppHandle) -> AgentResult<()> {
+ tracing::info!("Creating main application window");
+
+ let main = &app_handle
+ .config()
+ .app
+ .windows
+ .first()
+ .ok_or(AgentError::NoMainWindow)?;
+
+ tracing::debug!("Building webview window from config");
+ let window = WebviewWindowBuilder::from_config(app_handle, main)?.build()?;
+
+ window.hide()?;
+
+ tracing::info!("Main window created successfully");
+ Ok(())
+}
+
+#[tracing::instrument(skip(app_handle))]
+pub fn show_main_window(app_handle: &AppHandle) -> AgentResult<()> {
+ tracing::debug!("Attempting to show main window");
+ if let Some(window) = app_handle.get_webview_window("main") {
+ window.show()?;
+ window.set_focus()?;
+ tracing::info!("Main window shown and focused");
+ }
+ Ok(())
+}
+
+#[tracing::instrument(skip(app_handle))]
+pub fn hide_main_window(app_handle: &AppHandle) -> AgentResult<()> {
+ tracing::debug!("Attempting to hide main window");
+ if let Some(window) = app_handle.get_webview_window("main") {
+ window.hide()?;
+ tracing::info!("Main window hidden");
+ }
+ Ok(())
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
- env_logger::init();
+ tracing::info!("Initializing Hoppscotch Agent");
// The installer takes care of installing `WebView`,
// this check is only required for portable variant.
#[cfg(all(feature = "portable", windows))]
- webview::init_webview();
+ {
+ tracing::debug!("Checking WebView initialization for portable Windows variant");
+ webview::init_webview();
+ }
let cancellation_token = CancellationToken::new();
let server_cancellation_token = cancellation_token.clone();
- tauri::Builder::default()
+ tracing::debug!("Building Tauri application");
+ let builder = tauri::Builder::default()
// NOTE: Currently, plugins run in the order they were added in to the builder,
// so `tauri_plugin_single_instance` needs to be registered first.
// See: https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/single-instance
.plugin(tauri_plugin_single_instance::init(|app, args, cwd| {
- info!("{}, {args:?}, {cwd}", app.package_info().name);
+ tracing::info!(
+ app_name = %app.package_info().name,
+ "Single instance handler triggered"
+ );
- app.emit("single-instance", Payload::new(args, cwd))
- .unwrap();
+ if let Err(e) = app.emit("single-instance", Payload::new(args, cwd)) {
+ tracing::error!(error = %e, "Failed to emit single-instance event");
+ }
// Application is already running, bring it to foreground.
- if let Some(window) = app.get_webview_window("main") {
- let _ = window.show();
- let _ = window.set_focus();
- } else {
- error!("Failed to get `main` window");
+ if let Err(e) = show_main_window(&app) {
+ tracing::error!(error = %e, "Failed to show window");
}
}))
.plugin(tauri_plugin_store::Builder::new().build())
.setup(move |app| {
- let app_handle = app.app_handle();
+ // let _ = setup_logging(&app.handle())?;
+
+ tracing::info!("Setting up application");
+ let app_handle = app.handle();
#[cfg(all(desktop, not(feature = "portable")))]
{
use tauri_plugin_autostart::MacosLauncher;
use tauri_plugin_autostart::ManagerExt;
+ tracing::debug!("Configuring autostart for desktop variant");
let _ = app.handle().plugin(tauri_plugin_autostart::init(
MacosLauncher::LaunchAgent,
None,
@@ -71,30 +118,29 @@ pub fn run() {
let autostart_manager = app.autolaunch();
- println!(
- "autostart enabled: {}",
- autostart_manager.is_enabled().unwrap()
+ tracing::info!(
+ enabled = autostart_manager.is_enabled().unwrap_or(false),
+ "Checking autostart status"
);
- if !autostart_manager.is_enabled().unwrap() {
- let _ = autostart_manager.enable();
- println!(
- "autostart updated: {}",
- autostart_manager.is_enabled().unwrap()
- );
+ if !autostart_manager.is_enabled().unwrap_or(false) {
+ if let Err(e) = autostart_manager.enable() {
+ tracing::error!(error = %e, "Failed to enable autostart");
+ } else {
+ tracing::info!("Autostart enabled successfully");
+ }
}
};
#[cfg(desktop)]
{
+ tracing::debug!("Initializing desktop-specific features");
let _ = app
.handle()
.plugin(tauri_plugin_updater::Builder::new().build());
-
let _ = app.handle().plugin(tauri_plugin_dialog::init());
let updater = app.updater_builder().build().unwrap();
-
let app_handle_ref = app_handle.clone();
tauri::async_runtime::spawn_blocking(|| {
@@ -104,20 +150,24 @@ pub fn run() {
});
};
- let app_state = Arc::new(AppState::new(app_handle.clone())?);
+ // Create and hide the main window during setup.
+ create_main_window(&app_handle)?;
+ tracing::debug!("Initializing application state");
+ let app_state = Arc::new(AppState::new(app_handle.clone())?);
app.manage(app_state.clone());
let server_cancellation_token = server_cancellation_token.clone();
-
let server_app_handle = app_handle.clone();
+ tracing::debug!("Spawning server process");
tauri::async_runtime::spawn(async move {
server::run_server(app_state, server_cancellation_token, server_app_handle).await;
});
#[cfg(all(desktop))]
{
+ tracing::debug!("Creating system tray");
let handle = app.handle();
tray::create_tray(handle)?;
}
@@ -125,54 +175,116 @@ pub fn run() {
// Blocks the app from populating the macOS dock
#[cfg(target_os = "macos")]
{
+ tracing::debug!("Setting macOS activation policy");
app_handle
.set_activation_policy(tauri::ActivationPolicy::Accessory)
.unwrap();
};
let app_handle_ref = app_handle.clone();
-
- app_handle.listen("registration_received", move |_| {
- WebviewWindowBuilder::from_config(
- &app_handle_ref,
- &app_handle_ref.config().app.windows[0],
- )
- .unwrap()
- .build()
- .unwrap()
- .show()
- .unwrap();
+ app_handle.listen("registration-received", move |_| {
+ tracing::info!("Registration received event triggered");
+ if let Err(e) = show_main_window(&app_handle_ref) {
+ tracing::error!(error = %e, "Failed to show window");
+ }
});
+ tracing::info!("Application setup completed successfully");
Ok(())
})
.manage(cancellation_token)
.on_window_event(|window, event| {
match &event {
- tauri::WindowEvent::CloseRequested { .. } => {
- let app_state = window.state::<Arc<AppState>>();
+ tauri::WindowEvent::CloseRequested { api, .. } => {
+ tracing::info!("Window close requested");
+ api.prevent_close();
- let mut current_code = app_state.active_registration_code.blocking_write();
+ if let Err(e) = window.hide() {
+ tracing::error!(error = %e, "Failed to hide window");
+ }
+ let app_state = window.state::<Arc<AppState>>();
+ let mut current_code = app_state.active_registration_code.blocking_write();
if current_code.is_some() {
+ tracing::debug!("Clearing active registration code");
*current_code = None;
}
+
+ if let Err(e) = window.emit("window-hidden", ()) {
+ tracing::error!(error = %e, "Failed to emit window-hidden event");
+ }
+ }
+ _ => {
+ tracing::debug!(event = ?event, "Window event received");
}
- _ => {}
};
})
- .invoke_handler(tauri::generate_handler![get_otp])
+ .invoke_handler(tauri::generate_handler![
+ command::get_otp,
+ command::list_registrations
+ ]);
+
+ tracing::info!("Building Tauri application with context");
+ let app = builder
.build(tauri::generate_context!())
- .expect("error while building tauri application")
- .run(|app_handle, event| match event {
- tauri::RunEvent::ExitRequested { api, code, .. } => {
- if code.is_none() || matches!(code, Some(0)) {
- api.prevent_exit()
- } else if code.is_some() {
- let state = app_handle.state::<CancellationToken>();
- state.cancel();
- }
+ .expect("error while building tauri application");
+
+ tracing::info!("Running application");
+ app.run(|app_handle, event| match event {
+ tauri::RunEvent::ExitRequested { api, code, .. } => {
+ if code.is_none() || matches!(code, Some(0)) {
+ tracing::info!("Exit requested, preventing immediate exit");
+ api.prevent_exit();
+ } else if code.is_some() {
+ tracing::info!("Exit with non-zero code requested, initiating shutdown");
+ let state = app_handle.state::<CancellationToken>();
+ state.cancel();
}
- _ => {}
- });
+ }
+ _ => {}
+ });
+}
+
+#[tracing::instrument(skip(app_handle))]
+pub fn setup_logging(app_handle: &AppHandle) -> AgentResult<()> {
+ tracing::info!("Setting up logging system");
+
+ let app_data_dir = app_handle.path().app_data_dir()?;
+ tracing::debug!(path = ?app_data_dir, "Creating app data directory");
+ std::fs::create_dir_all(&app_data_dir)?;
+
+ tracing::debug!("Configuring file appender");
+ let file_appender = tracing_appender::rolling::RollingFileAppender::builder()
+ .rotation(tracing_appender::rolling::Rotation::DAILY)
+ .filename_prefix("hoppscotch-agent")
+ .filename_suffix("log")
+ .max_log_files(1)
+ .build(&app_data_dir)?;
+
+ let (non_blocking, _guard) = tracing_appender::non_blocking(file_appender);
+
+ tracing::debug!("Building subscriber with JSON formatting");
+ let subscriber = tracing_subscriber::fmt()
+ .fmt_fields(JsonFields::new())
+ .with_target(false)
+ .with_writer(non_blocking)
+ .with_ansi(false)
+ .with_timer(tracing_subscriber::fmt::time::UtcTime::rfc_3339())
+ .with_env_filter(EnvFilter::try_from_default_env().unwrap_or_else(|_| {
+ if cfg!(debug_assertions) {
+ "debug"
+ } else {
+ "info"
+ }
+ .into()
+ }))
+ .with_filter_reloading()
+ .finish();
+
+ tracing::subscriber::set_global_default(subscriber)?;
+
+ app_handle.manage(LogGuard(_guard));
+
+ tracing::info!("Logging system initialized successfully");
+ Ok(())
}
diff --git a/packages/hoppscotch-agent/src-tauri/src/main.rs b/packages/hoppscotch-agent/src-tauri/src/main.rs
index bf757fbd5..8276f5b5b 100644
--- a/packages/hoppscotch-agent/src-tauri/src/main.rs
+++ b/packages/hoppscotch-agent/src-tauri/src/main.rs
@@ -1,6 +1,18 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
+use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
+
fn main() {
+ tracing_subscriber::registry()
+ .with(
+ tracing_subscriber::EnvFilter::try_from_default_env()
+ .unwrap_or_else(|_| format!("{}=debug", env!("CARGO_CRATE_NAME")).into()),
+ )
+ .with(tracing_subscriber::fmt::layer().without_time())
+ .init();
+
+ tracing::info!("Starting Hoppscotch Agent...");
+
hoppscotch_agent_lib::run()
}
diff --git a/packages/hoppscotch-agent/src-tauri/src/model.rs b/packages/hoppscotch-agent/src-tauri/src/model.rs
index 68589fe93..718422e90 100644
--- a/packages/hoppscotch-agent/src-tauri/src/model.rs
+++ b/packages/hoppscotch-agent/src-tauri/src/model.rs
@@ -1,5 +1,42 @@
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
+use serde_json::Value;
+use sha2::{Digest, Sha256};
+
+/// Describes one registered app instance
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct Registration {
+ pub registered_at: DateTime<Utc>,
+
+ /// base16 (lowercase) encoded shared secret that the client
+ /// and agent established during registration that is used
+ /// to encrypt traffic between them
+ pub shared_secret_b16: String,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MaskedRegistration {
+ pub registered_at: DateTime<Utc>,
+ pub auth_key_hash: String,
+}
+
+impl From<(&String, &Registration)> for MaskedRegistration {
+ fn from((key, registration): (&String, &Registration)) -> Self {
+ let hash = Sha256::digest(key.as_bytes());
+ let short_hash = base16::encode_lower(&hash[..3]);
+
+ Self {
+ registered_at: registration.registered_at,
+ auth_key_hash: short_hash,
+ }
+ }
+}
+
+#[derive(Debug, Serialize)]
+pub struct RegistrationsList {
+ pub registrations: Vec<MaskedRegistration>,
+ pub total: usize,
+}
/// Single instance payload.
#[derive(Clone, Serialize)]
@@ -45,3 +82,29 @@ pub struct AuthKeyResponse {
/// and client after registration
pub agent_public_key_b16: String,
}
+
+/// A logger guard, managed by tauri runtime to make sure
+/// logger doesn't get cleaned up or dropped during app's run time.
+pub struct LogGuard(pub tracing_appender::non_blocking::WorkerGuard);
+
+#[derive(Debug, Deserialize)]
+pub struct LogEntry {
+ pub timestamp: String,
+ pub level: LogLevel,
+ pub context: String,
+ pub message: String,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub metadata: Option<Value>,
+ pub source: String,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub correlation_id: Option<String>,
+}
+
+#[derive(Debug, Deserialize, Clone, Copy)]
+#[serde(rename_all = "UPPERCASE")]
+pub enum LogLevel {
+ Debug,
+ Info,
+ Warn,
+ Error,
+}
diff --git a/packages/hoppscotch-agent/src-tauri/src/route.rs b/packages/hoppscotch-agent/src-tauri/src/route.rs
index 290668129..e6362565f 100644
--- a/packages/hoppscotch-agent/src-tauri/src/route.rs
+++ b/packages/hoppscotch-agent/src-tauri/src/route.rs
@@ -1,5 +1,5 @@
use axum::{
- routing::{get, post},
+ routing::{delete, get, post},
Router,
};
use std::sync::Arc;
@@ -22,7 +22,13 @@ pub fn route(state: Arc<AppState>, app_handle: AppHandle) -> Router {
"/registered-handshake",
get(controller::registered_handshake),
)
- .route("/request", post(controller::run_request))
- .route("/cancel-request/:req_id", post(controller::cancel_request))
+ .route("/registration", get(controller::registration))
+ .route(
+ "/registrations/:auth_key",
+ delete(controller::delete_registration),
+ )
+ .route("/execute", post(controller::execute))
+ .route("/cancel/:req_id", post(controller::cancel))
+ .route("/log-sink", post(controller::log_sink))
.with_state((state, app_handle))
}
diff --git a/packages/hoppscotch-agent/src-tauri/src/server.rs b/packages/hoppscotch-agent/src-tauri/src/server.rs
index 1e9210fae..33818477c 100644
--- a/packages/hoppscotch-agent/src-tauri/src/server.rs
+++ b/packages/hoppscotch-agent/src-tauri/src/server.rs
@@ -6,11 +6,13 @@ use tower_http::cors::CorsLayer;
use crate::route;
use crate::state::AppState;
+#[tracing::instrument(skip(state, cancellation_token, app_handle))]
pub async fn run_server(
state: Arc<AppState>,
cancellation_token: CancellationToken,
app_handle: tauri::AppHandle,
) {
+ tracing::info!("Initializing server");
let cors = CorsLayer::permissive();
let app = Router::new()
@@ -18,17 +20,31 @@ pub async fn run_server(
.layer(cors);
let addr = std::net::SocketAddr::from(([127, 0, 0, 1], 9119));
-
- println!("Server running on http://{}", addr);
-
- let listener = tokio::net::TcpListener::bind(&addr).await.unwrap();
-
- axum::serve(listener, app.into_make_service())
- .with_graceful_shutdown(async move {
- cancellation_token.cancelled().await;
- })
- .await
- .unwrap();
-
- println!("Server shut down");
+ tracing::info!(address = %addr, "Starting server");
+
+ match tokio::net::TcpListener::bind(&addr).await {
+ Ok(listener) => {
+ tracing::info!(address = %addr, "Server bound successfully");
+
+ if let Err(e) = axum::serve(listener, app.into_make_service())
+ .with_graceful_shutdown(async move {
+ cancellation_token.cancelled().await;
+ tracing::info!("Graceful shutdown initiated");
+ })
+ .await
+ {
+ tracing::error!(error = %e, "Server error occurred");
+ return;
+ }
+
+ tracing::info!("Server shut down successfully");
+ }
+ Err(e) => {
+ tracing::error!(
+ error = %e,
+ address = %addr,
+ "Failed to bind server to address"
+ );
+ }
+ }
}
diff --git a/packages/hoppscotch-agent/src-tauri/src/state.rs b/packages/hoppscotch-agent/src-tauri/src/state.rs
index c8e8c928b..4bd211fbe 100644
--- a/packages/hoppscotch-agent/src-tauri/src/state.rs
+++ b/packages/hoppscotch-agent/src-tauri/src/state.rs
@@ -1,8 +1,7 @@
use aes_gcm::{aead::Aead, Aes256Gcm, KeyInit};
use axum::body::Bytes;
-use chrono::{DateTime, Utc};
use dashmap::DashMap;
-use serde::{de::DeserializeOwned, Deserialize, Serialize};
+use serde::de::DeserializeOwned;
use tauri_plugin_store::StoreExt;
use tokio::sync::RwLock;
use tokio_util::sync::CancellationToken;
@@ -10,20 +9,10 @@ use tokio_util::sync::CancellationToken;
use crate::{
error::{AgentError, AgentResult},
global::{AGENT_STORE, REGISTRATIONS},
+ model::Registration,
};
-/// Describes one registered app instance
-#[derive(Debug, Clone, Serialize, Deserialize)]
-pub struct Registration {
- pub registered_at: DateTime<Utc>,
-
- /// base16 (lowercase) encoded shared secret that the client
- /// and agent established during registration that is used
- /// to encrypt traffic between them
- pub shared_secret_b16: String,
-}
-
-#[derive(Default)]
+#[derive(Debug, Default)]
pub struct AppState {
/// The active registration code that is being registered.
pub active_registration_code: RwLock<Option<String>>,
@@ -37,19 +26,36 @@ pub struct AppState {
}
impl AppState {
+ #[tracing::instrument(skip(app_handle))]
pub fn new(app_handle: tauri::AppHandle) -> AgentResult<Self> {
- let store = app_handle.store(AGENT_STORE)?;
+ tracing::info!("Initializing application state");
+ let store = match app_handle.store(AGENT_STORE) {
+ Ok(store) => store,
+ Err(e) => {
+ tracing::error!("Failed to access app store: {}", e);
+ return Err(e.into());
+ }
+ };
// Try loading and parsing registrations from the store, if that failed,
// load the default list
let registrations = store
.get(REGISTRATIONS)
.and_then(|val| serde_json::from_value(val.clone()).ok())
- .unwrap_or_else(|| DashMap::new());
+ .unwrap_or_else(|| {
+ tracing::debug!("No existing registrations found, initializing empty map");
+ DashMap::new()
+ });
// Try to save the latest registrations list
let _ = store.set(REGISTRATIONS, serde_json::to_value(&registrations)?);
- let _ = store.save();
+
+ if let Err(e) = store.save() {
+ tracing::error!("Failed to persist store changes: {}", e);
+ return Err(e.into());
+ }
+
+ tracing::info!("Application state initialized successfully");
Ok(Self {
active_registration_code: RwLock::new(None),
@@ -62,7 +68,9 @@ impl AppState {
/// NOTE: Although DashMap API allows you to update the list from an immutable
/// reference, you shouldn't do it for registrations as `update_registrations`
/// performs save operation that needs to be done and should be used instead
+ #[tracing::instrument]
pub fn get_registrations(&self) -> &DashMap<String, Registration> {
+ tracing::debug!("Retrieving registrations list");
&self.registrations
}
@@ -71,60 +79,117 @@ impl AppState {
/// This function bypasses `store.reload()` to avoid issues from stale or inconsistent
/// data on disk. By relying solely on the in-memory `self.registrations`,
/// we make sure that updates are applied based on the most recent changes in memory.
+ #[tracing::instrument(skip(self, app_handle, update_func))]
pub fn update_registrations(
&self,
app_handle: tauri::AppHandle,
update_func: impl FnOnce(&DashMap<String, Registration>),
) -> Result<(), AgentError> {
+ tracing::info!("Updating registrations");
update_func(&self.registrations);
- let store = app_handle.store(AGENT_STORE)?;
+ let store = match app_handle.store(AGENT_STORE) {
+ Ok(store) => store,
+ Err(e) => {
+ tracing::error!("Failed to access app store: {}", e);
+ return Err(e.into());
+ }
+ };
if store.has(REGISTRATIONS) {
+ tracing::debug!("Clearing existing registrations from store");
// We've confirmed `REGISTRATIONS` exists in the store
- store
- .delete(REGISTRATIONS)
- .then_some(())
- .ok_or(AgentError::RegistrationClearError)?;
+ if !store.delete(REGISTRATIONS) {
+ tracing::error!("Failed to clear existing registrations");
+ return Err(AgentError::RegistrationClearError);
+ }
} else {
- log::debug!("`REGISTRATIONS` key not found in store; continuing with update.");
+ tracing::debug!("`REGISTRATIONS` key not found in store; continuing with update.");
}
// Since we've established `self.registrations` as the source of truth,
// we avoid reloading the store from disk and instead choose to override it.
-
- store.set(
- REGISTRATIONS,
- serde_json::to_value(self.registrations.clone())?,
- );
+ match serde_json::to_value(self.registrations.clone()) {
+ Ok(value) => {
+ let _ = store.set(REGISTRATIONS, value);
+ }
+ Err(e) => {
+ tracing::error!("Failed to serialize registrations: {}", e);
+ return Err(e.into());
+ }
+ }
// Explicitly save the changes
- store.save()?;
+ if let Err(e) = store.save() {
+ tracing::error!("Failed to persist store changes: {}", e);
+ return Err(e.into());
+ }
+ tracing::info!("Registrations updated successfully");
Ok(())
}
/// Clear all the registrations
+ #[tracing::instrument(skip(self, app_handle))]
pub fn clear_registrations(&self, app_handle: tauri::AppHandle) -> Result<(), AgentError> {
- Ok(self.update_registrations(app_handle, |registrations| registrations.clear())?)
+ tracing::info!("Clearing all registrations");
+ self.update_registrations(app_handle, |registrations| registrations.clear())?;
+ tracing::info!("All registrations cleared successfully");
+ Ok(())
+ }
+
+ #[tracing::instrument(skip(self))]
+ pub async fn clear_active_registration(&self) {
+ tracing::debug!("Clearing active registration code");
+ let mut active_registration_code = self.active_registration_code.write().await;
+ *active_registration_code = None;
+ tracing::debug!("Active registration code cleared");
}
+ #[tracing::instrument(skip(self))]
pub async fn validate_registration(&self, registration: &str) -> bool {
- self.active_registration_code.read().await.as_deref() == Some(registration)
+ tracing::debug!("Validating registration code");
+ let is_valid = self.active_registration_code.read().await.as_deref() == Some(registration);
+ if is_valid {
+ tracing::info!("Registration code validated successfully");
+ } else {
+ tracing::warn!("Invalid registration code provided");
+ }
+ is_valid
}
+ #[tracing::instrument(skip(self))]
pub fn remove_cancellation_token(&self, req_id: usize) -> Option<(usize, CancellationToken)> {
- self.cancellation_tokens.remove(&req_id)
+ tracing::debug!(req_id, "Removing cancellation token");
+ let result = self.cancellation_tokens.remove(&req_id);
+ if result.is_some() {
+ tracing::info!(req_id, "Cancellation token removed successfully");
+ } else {
+ tracing::debug!(req_id, "No cancellation token found to remove");
+ }
+ result
}
- pub fn add_cancellation_token(&self, req_id: usize, cancellation_tokens: CancellationToken) {
- self.cancellation_tokens.insert(req_id, cancellation_tokens);
+ #[tracing::instrument(skip(self))]
+ pub fn add_cancellation_token(&self, req_id: usize, cancellation_token: CancellationToken) {
+ tracing::debug!(req_id, "Adding new cancellation token");
+ self.cancellation_tokens.insert(req_id, cancellation_token);
+ tracing::debug!(req_id, "Cancellation token added successfully");
}
+ #[tracing::instrument(skip(self))]
pub fn validate_access(&self, auth_key: &str) -> bool {
- self.registrations.get(auth_key).is_some()
+ tracing::debug!(auth_key, "Validating access");
+ let is_valid = self.registrations.get(auth_key).is_some();
+ if is_valid {
+ tracing::info!(auth_key, "Access validated successfully");
+ } else {
+ tracing::warn!(auth_key, "Invalid access attempt");
+ }
+ is_valid
}
+ #[tracing::instrument(skip(self, data))]
pub fn validate_access_and_get_data<T>(
&self,
auth_key: &str,
@@ -134,28 +199,79 @@ impl AppState {
where
T: DeserializeOwned,
{
- if let Some(registration) = self.registrations.get(auth_key) {
- let key: [u8; 32] = base16::decode(&registration.shared_secret_b16).ok()?[0..32]
- .try_into()
- .ok()?;
+ tracing::debug!(
+ auth_key,
+ nonce_len = nonce.len(),
+ "Validating access and decrypting data"
+ );
- let nonce: [u8; 12] = base16::decode(nonce).ok()?[0..12].try_into().ok()?;
+ let registration = match self.registrations.get(auth_key) {
+ Some(reg) => reg,
+ None => {
+ tracing::warn!(auth_key, "Registration not found");
+ return None;
+ }
+ };
- let cipher = Aes256Gcm::new(&key.into());
+ let key: [u8; 32] = match base16::decode(&registration.shared_secret_b16).ok()?[0..32]
+ .try_into()
+ .ok()
+ {
+ Some(k) => k,
+ None => {
+ tracing::error!(auth_key, "Failed to decode shared secret");
+ return None;
+ }
+ };
- let data = data.iter().cloned().collect::<Vec<u8>>();
+ let nonce: [u8; 12] = match base16::decode(nonce).ok()?[0..12].try_into().ok() {
+ Some(n) => n,
+ None => {
+ tracing::error!(auth_key, "Failed to decode nonce");
+ return None;
+ }
+ };
- let plain_data = cipher.decrypt(&nonce.into(), data.as_slice()).ok()?;
+ let cipher = Aes256Gcm::new(&key.into());
+ let data = data.iter().cloned().collect::<Vec<u8>>();
- serde_json::from_reader(plain_data.as_slice()).ok()
- } else {
- None
+ let plain_data = match cipher.decrypt(&nonce.into(), data.as_slice()) {
+ Ok(d) => d,
+ Err(e) => {
+ tracing::error!(auth_key, error = ?e, "Decryption failed");
+ return None;
+ }
+ };
+
+ match serde_json::from_reader(plain_data.as_slice()) {
+ Ok(result) => {
+ tracing::info!(auth_key, "Data successfully decrypted and parsed");
+ Some(result)
+ }
+ Err(e) => {
+ tracing::error!(auth_key, error = ?e, "Failed to parse decrypted data");
+ None
+ }
}
}
- pub fn get_registration_info(&self, auth_key: &str) -> Option<Registration> {
- self.registrations
+ #[tracing::instrument(skip(self))]
+ pub fn get_registration(&self, auth_key: &str) -> Option<Registration> {
+ tracing::debug!(auth_key, "Retrieving registration tracing::info");
+ let result = self
+ .registrations
.get(auth_key)
- .map(|reference| reference.value().clone())
+ .map(|reference| reference.value().clone());
+
+ if result.is_some() {
+ tracing::info!(
+ auth_key,
+ "Registration tracing::info retrieved successfully"
+ );
+ } else {
+ tracing::debug!(auth_key, "No registration tracing::info found");
+ }
+
+ result
}
}
diff --git a/packages/hoppscotch-agent/src-tauri/src/tray.rs b/packages/hoppscotch-agent/src-tauri/src/tray.rs
index 1b1f62e81..afd084412 100644
--- a/packages/hoppscotch-agent/src-tauri/src/tray.rs
+++ b/packages/hoppscotch-agent/src-tauri/src/tray.rs
@@ -1,11 +1,11 @@
-use crate::state::AppState;
+use crate::{show_main_window, state::AppState};
use lazy_static::lazy_static;
use std::sync::Arc;
use tauri::{
image::Image,
menu::{MenuBuilder, MenuItem},
tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent},
- AppHandle, Manager,
+ AppHandle, Emitter, Manager,
};
const TRAY_ICON_DATA: &'static [u8] = include_bytes!("../icons/tray_icon.png");
@@ -23,6 +23,13 @@ pub fn create_tray(app: &AppHandle) -> tauri::Result<()> {
true,
None::<&str>,
)?;
+ let show_registrations = MenuItem::with_id(
+ app,
+ "show_registrations",
+ "Show Registrations",
+ true,
+ None::<&str>,
+ )?;
let pkg_info = app.package_info();
let app_name = pkg_info.name.clone();
@@ -42,6 +49,8 @@ pub fn create_tray(app: &AppHandle) -> tauri::Result<()> {
.item(&app_version_item)
.separator()
.item(&clear_registrations)
+ .item(&show_registrations)
+ .separator()
.item(&quit_i)
.build()?;
@@ -57,8 +66,9 @@ pub fn create_tray(app: &AppHandle) -> tauri::Result<()> {
.menu_on_left_click(true)
.on_menu_event(move |app, event| match event.id.as_ref() {
"quit" => {
- log::info!("Exiting the agent...");
- app.exit(-1);
+ tracing::info!("Exiting the agent...");
+ // Exit with a specific code to allow actual exit.
+ app.exit(1);
}
"clear_registrations" => {
let app_state = app.state::<Arc<AppState>>();
@@ -67,8 +77,16 @@ pub fn create_tray(app: &AppHandle) -> tauri::Result<()> {
.clear_registrations(app.clone())
.expect("Invariant violation: Failed to clear registrations");
}
+ "show_registrations" => {
+ app.emit("show-registrations", ()).unwrap_or_else(|e| {
+ tracing::error!("Failed to emit show-registrations event: {}", e);
+ });
+ if let Err(e) = show_main_window(&app) {
+ tracing::error!("Failed to show window: {}", e);
+ }
+ }
_ => {
- log::warn!("Unhandled menu event: {:?}", event.id);
+ tracing::warn!("Unhandled menu event: {:?}", event.id);
}
})
.on_tray_icon_event(|tray, event| {
@@ -79,9 +97,8 @@ pub fn create_tray(app: &AppHandle) -> tauri::Result<()> {
} = event
{
let app = tray.app_handle();
- if let Some(window) = app.get_webview_window("main") {
- let _ = window.show();
- let _ = window.set_focus();
+ if let Err(e) = show_main_window(&app) {
+ tracing::error!("Failed to show window from tray: {}", e);
}
}
})
diff --git a/packages/hoppscotch-agent/src-tauri/src/util.rs b/packages/hoppscotch-agent/src-tauri/src/util.rs
index e383f0b93..56b3fb022 100644
--- a/packages/hoppscotch-agent/src-tauri/src/util.rs
+++ b/packages/hoppscotch-agent/src-tauri/src/util.rs
@@ -7,6 +7,14 @@ use axum::{
};
use rand::rngs::OsRng;
use serde::Serialize;
+use sha2::{Digest, Sha256};
+
+use crate::global::NONCE;
+
+pub fn generate_auth_key_hash(auth_key: &str) -> String {
+ let hash = Sha256::digest(auth_key.as_bytes());
+ base16::encode_lower(&hash[..3])
+}
pub fn open_link(link: &str) -> Option<()> {
let null = Stdio::null();
@@ -79,7 +87,7 @@ where
let response_headers = response.headers_mut();
response_headers.insert("Content-Type", "application/octet-stream".parse().unwrap());
- response_headers.insert("X-Hopp-Nonce", nonce_b16.parse().unwrap());
+ response_headers.insert(NONCE, nonce_b16.parse().unwrap());
response
}
diff --git a/packages/hoppscotch-agent/src-tauri/src/webview/mod.rs b/packages/hoppscotch-agent/src-tauri/src/webview/mod.rs
index f66279b44..5758b96c8 100644
--- a/packages/hoppscotch-agent/src-tauri/src/webview/mod.rs
+++ b/packages/hoppscotch-agent/src-tauri/src/webview/mod.rs
@@ -182,7 +182,7 @@ pub fn init_webview() {
)
.not()
{
- log::warn!("Declined to setup WebView.");
+ tracing::warn!("Declined to setup WebView.");
std::process::exit(1);
}
@@ -196,7 +196,7 @@ pub fn init_webview() {
));
if let Err(e) = open_install_website() {
- log::warn!("Failed to launch WebView website:\n{}", e);
+ tracing::warn!("Failed to launch WebView website:\n{}", e);
}
std::process::exit(1);
diff --git a/packages/hoppscotch-agent/src/App.vue b/packages/hoppscotch-agent/src/App.vue
index f58644c25..640a291d8 100644
--- a/packages/hoppscotch-agent/src/App.vue
+++ b/packages/hoppscotch-agent/src/App.vue
@@ -1,71 +1,179 @@
<template>
- <div class="font-sans min-h-screen flex flex-col">
- <div class="p-5 flex flex-col flex-grow gap-y-2">
- <h1 class="font-bold text-lg text-white">Agent Registration Request</h1>
- <p class="tracking-wide">
- An app is trying to register against the Hoppscotch Agent. If this was intentional, copy the given code into
- the app to complete the registration process. Please close the window if you did not initiate this request.
- Do not close this window until the verification code is entered. Once done, this window will close by itself.
- </p>
- <p class="font-bold text-5xl tracking-wider text-center pt-10 text-white">
- {{ otpCode }}
- </p>
- </div>
+ <div class="h-screen p-5 flex flex-col gap-y-2">
+ <h1 class="font-bold text-lg text-white">{{ pipe(state(), getTitle) }}</h1>
+
+ <template v-if="isOtpView(state())">
+ <div v-if="state().otp" class="flex-grow">
+ <p class="tracking-wide">
+ An app is trying to register against the Hoppscotch Agent. If this was intentional, copy the given code into
+ the app to complete the registration process. Please hide the window if you did not initiate this request.
+ Do not hide this window until the verification code is entered. The window will hide automatically once done.
+ </p>
+ <p
+ class="font-bold text-5xl tracking-wider text-center pt-10 text-white"
+ >{{ pipe(state().otp, O.getOrElse(() => "")) }}</p>
+ </div>
+ <div v-else class="text-center pt-10 flex-grow">
+ <p class="tracking-wide">Waiting for registration requests...</p>
+ <p
+ class="text-sm text-gray-400 mt-2"
+ >You can hide this window and access it again from the tray icon.</p>
+ </div>
+ </template>
+
+ <template v-else>
+ <div class="flex-grow overflow-auto">
+ <HoppSmartTable :headings="TABLE_HEADINGS" :list="state().registrations">
+ <template #registered_at="{ item }">{{ formatDate(item.registered_at) }}</template>
+ </HoppSmartTable>
+ </div>
+ </template>
+
<div class="border-t border-divider p-5 flex justify-between">
<HoppButtonSecondary
+ v-if="shouldShowCopy(state())"
label="Copy Code"
outline
filled
:icon="copyIcon"
- @click="copyCode"
- />
- <HoppButtonPrimary
- label="Close"
- outline
- @click="closeWindow"
+ @click="copyOtp"
/>
+ <HoppButtonPrimary label="Hide Window" outline @click="hideWindow" />
</div>
</div>
</template>
-<script setup>
+<script setup lang="ts">
import { ref, markRaw, onMounted } from "vue"
-import { HoppButtonPrimary, HoppButtonSecondary } from "@hoppscotch/ui"
+import {
+ HoppButtonPrimary,
+ HoppButtonSecondary,
+ HoppSmartTable,
+} from "@hoppscotch/ui"
import IconCopy from "~icons/lucide/copy"
import IconCheck from "~icons/lucide/check"
import { useClipboard, refAutoReset } from "@vueuse/core"
import { getCurrentWindow } from "@tauri-apps/api/window"
import { invoke } from "@tauri-apps/api/core"
-import { listen } from '@tauri-apps/api/event'
+import { listen } from "@tauri-apps/api/event"
+import { pipe } from "fp-ts/function"
+import * as O from "fp-ts/Option"
+import * as TE from "fp-ts/TaskEither"
+import { orderBy } from "lodash-es"
+
+interface Registration {
+ auth_key_hash: string
+ registered_at: string
+}
+
+interface AppState {
+ view: "otp" | "registrations"
+ otp: O.Option<string>
+ registrations: Registration[]
+}
+
+const TABLE_HEADINGS = [
+ { key: "auth_key_hash", label: "ID" },
+ { key: "registered_at", label: "Registered At" },
+] as const
const { copy } = useClipboard()
-const otpCode = ref("")
const copyIcon = refAutoReset(markRaw(IconCopy), 3000)
+const appState = ref<AppState>({
+ view: "otp",
+ otp: O.none,
+ registrations: [],
+})
-function copyCode() {
- copyIcon.value = markRaw(IconCheck)
- copy(otpCode.value)
+const state = () => appState.value
+
+const isOtpView = (s: AppState): boolean => s.view === "otp"
+const getTitle = (s: AppState): string =>
+ s.view === "otp" ? "Agent Registration Request" : "Agent Registrations"
+const shouldShowCopy = (s: AppState): boolean => isOtpView(s) && O.isSome(s.otp)
+const formatDate = (date: string): string => new Date(date).toLocaleString()
+
+const getOtp = TE.tryCatch(
+ () => invoke<string>("get_otp", {}),
+ (error: unknown) => new Error(String(error))
+)
+
+const listRegistrations = TE.tryCatch(
+ async () => {
+ const result = await invoke<{ registrations: Registration[] }>(
+ "list_registrations",
+ {}
+ )
+ return orderBy(result.registrations, "registered_at", "desc")
+ },
+ (error: unknown) => new Error(String(error))
+)
+
+const hideWindow = () => {
+ getCurrentWindow().hide()
+ appState.value = { ...state(), otp: O.none }
}
-function closeWindow() {
- const currentWindow = getCurrentWindow()
- currentWindow.close()
+const copyOtp = () => {
+ pipe(
+ state().otp,
+ O.map((otp: string) => {
+ copyIcon.value = markRaw(IconCheck)
+ copy(otp)
+ })
+ )
}
-onMounted(async () => {
- const currentWindow = getCurrentWindow()
+const updateRegistrations = async () => {
+ await pipe(
+ listRegistrations,
+ TE.map((registrations: Registration) => {
+ appState.value = { ...state(), registrations }
+ })
+ )()
+}
- currentWindow.setFocus(true);
- currentWindow.setAlwaysOnTop(true);
+const handleRegistrationReceived = (payload: string) => {
+ appState.value = {
+ ...state(),
+ view: "otp",
+ otp: O.some(payload),
+ }
+ getCurrentWindow().setFocus()
+}
+
+const handleAuthenticated = async () => {
+ appState.value = { ...state(), otp: O.none }
+ await updateRegistrations()
+ hideWindow()
+}
- otpCode.value = await invoke("get_otp", {})
+const handleShowRegistrations = async () => {
+ appState.value = { ...state(), view: "registrations" }
+ await updateRegistrations()
+}
+
+onMounted(async () => {
+ getCurrentWindow().setAlwaysOnTop(true)
- await listen('registration_received', (event) => {
- otpCode.value = event.payload
- })
+ await pipe(
+ getOtp,
+ TE.map((otp: string) => {
+ if (otp) appState.value = { ...state(), otp: O.some(otp) }
+ })
+ )()
- await listen('authenticated', () => {
- closeWindow()
- })
+ await Promise.all([
+ listen<string>(
+ "registration-received",
+ ({ payload }: { payload: string }) => handleRegistrationReceived(payload)
+ ),
+ listen(
+ "window-hidden",
+ () => (appState.value = { ...state(), otp: O.none })
+ ),
+ listen("authenticated", handleAuthenticated),
+ listen("show-registrations", handleShowRegistrations),
+ ])
})
</script>
diff --git a/packages/hoppscotch-agent/src/pages/otp.vue b/packages/hoppscotch-agent/src/pages/otp.vue
new file mode 100644
index 000000000..2265faf76
--- /dev/null
+++ b/packages/hoppscotch-agent/src/pages/otp.vue
@@ -0,0 +1,80 @@
+<template>
+ <div class="p-5 h-full flex flex-col flex-grow gap-y-2 justify-between">
+ <h1 class="font-bold text-lg text-white">Agent Registration Request</h1>
+ <div v-if="otpCode">
+ <p class="tracking-wide">
+ An app is trying to register against the Hoppscotch Agent. If this was intentional, copy the given code into
+ the app to complete the registration process. Please hide the window if you did not initiate this request.
+ Do not hide this window until the verification code is entered. The window will hide automatically once done.
+ </p>
+ <p class="font-bold text-5xl tracking-wider text-center pt-10 text-white">{{ otpCode }}</p>
+ </div>
+ <div v-else class="text-center pt-10">
+ <p class="tracking-wide">Waiting for registration requests...</p>
+ <p
+ class="text-sm text-gray-400 mt-2"
+ >You can hide this window and access it again from the tray icon.</p>
+ </div>
+ <div class="border-t border-divider p-5 flex justify-between">
+ <HoppButtonSecondary
+ v-if="otpCode"
+ label="Copy Code"
+ outline
+ filled
+ :icon="copyIcon"
+ @click="copyCode"
+ />
+ <HoppButtonPrimary label="Hide Window" outline @click="hideWindow" />
+ </div>
+ </div>
+</template>
+
+<script setup>
+import { ref, markRaw, onMounted } from "vue"
+import { HoppButtonPrimary, HoppButtonSecondary } from "@hoppscotch/ui"
+import IconCopy from "~icons/lucide/copy"
+import IconCheck from "~icons/lucide/check"
+import { useClipboard, refAutoReset } from "@vueuse/core"
+import { getCurrentWindow } from "@tauri-apps/api/window"
+import { invoke } from "@tauri-apps/api/core"
+import { listen } from "@tauri-apps/api/event"
+
+const { copy } = useClipboard()
+const otpCode = ref("")
+const copyIcon = refAutoReset(markRaw(IconCopy), 3000)
+
+function copyCode() {
+ copyIcon.value = markRaw(IconCheck)
+ copy(otpCode.value)
+}
+
+function hideWindow() {
+ const currentWindow = getCurrentWindow()
+ currentWindow.hide()
+ otpCode.value = ""
+}
+
+onMounted(async () => {
+ const currentWindow = getCurrentWindow()
+ currentWindow.setAlwaysOnTop(true)
+
+ const initialOtp = await invoke("get_otp", {})
+ if (initialOtp) {
+ otpCode.value = initialOtp
+ }
+
+ await listen("registration-received", (event) => {
+ otpCode.value = event.payload
+ currentWindow.setFocus()
+ })
+
+ await listen("window-hidden", () => {
+ otpCode.value = ""
+ })
+
+ await listen("authenticated", () => {
+ otpCode.value = ""
+ hideWindow()
+ })
+})
+</script>
diff --git a/packages/hoppscotch-agent/src/pages/registrations.vue b/packages/hoppscotch-agent/src/pages/registrations.vue
new file mode 100644
index 000000000..b6936594e
--- /dev/null
+++ b/packages/hoppscotch-agent/src/pages/registrations.vue
@@ -0,0 +1,57 @@
+<template>
+ <div class="p-5 h-full flex flex-col flex-grow gap-y-2 justify-between">
+ <h1 class="font-bold text-lg text-white">Agent Registrations</h1>
+ <div class="overflow-auto">
+ <HoppSmartTable
+ :headings="[
+ { key: 'auth_key_hash', label: 'ID' },
+ { key: 'registered_at', label: 'Registered At' },
+ ]"
+ :list="registrations"
+ >
+ <template #registered_at="{ item }">{{ formatDate(item.registered_at) }}</template>
+ </HoppSmartTable>
+ </div>
+ <div class="border-t border-divider p-5 flex justify-between">
+ <HoppButtonPrimary label="Hide Window" outline @click="hideWindow" />
+ </div>
+ </div>
+</template>
+
+<script setup>
+import { ref, markRaw, onMounted } from "vue"
+import { HoppButtonPrimary, HoppSmartTable } from "@hoppscotch/ui"
+import { getCurrentWindow } from "@tauri-apps/api/window"
+import { invoke } from "@tauri-apps/api/core"
+import { listen } from "@tauri-apps/api/event"
+import { orderBy } from "lodash-es"
+
+const registrations = ref([])
+
+function formatDate(date) {
+ return new Date(date).toLocaleString()
+}
+
+function hideWindow() {
+ const currentWindow = getCurrentWindow()
+ currentWindow.hide()
+}
+
+async function loadRegistrations() {
+ const result = await invoke("list_registrations", {})
+ registrations.value = orderBy(result.registrations, "registered_at", "desc")
+}
+
+onMounted(async () => {
+ const currentWindow = getCurrentWindow()
+ currentWindow.setAlwaysOnTop(true)
+
+ await loadRegistrations()
+ await listen("authenticated", () => {
+ loadRegistrations()
+ })
+ await listen("show-registrations", () => {
+ loadRegistrations()
+ })
+})
+</script>
diff --git a/packages/hoppscotch-backend/src/app.module.ts b/packages/hoppscotch-backend/src/app.module.ts
index f86db38c2..f61bd187d 100644
--- a/packages/hoppscotch-backend/src/app.module.ts
+++ b/packages/hoppscotch-backend/src/app.module.ts
@@ -1,4 +1,4 @@
-import { ForbiddenException, HttpException, Module } from '@nestjs/common';
+import { HttpException, Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import { UserModule } from './user/user.module';
@@ -8,7 +8,7 @@ import { UserSettingsModule } from './user-settings/user-settings.module';
import { UserEnvironmentsModule } from './user-environment/user-environments.module';
import { UserRequestModule } from './user-request/user-request.module';
import { UserHistoryModule } from './user-history/user-history.module';
-import { subscriptionContextCookieParser } from './auth/helper';
+import { subscriptionContextCookieParser, extractAccessTokenFromAuthRecords } from './auth/helper';
import { TeamModule } from './team/team.module';
import { TeamEnvironmentsModule } from './team-environments/team-environments.module';
import { TeamCollectionModule } from './team-collection/team-collection.module';
@@ -52,20 +52,29 @@ import { InfraTokenModule } from './infra-token/infra-token.module';
subscriptions: {
'subscriptions-transport-ws': {
path: '/graphql',
- onConnect: (_, websocket) => {
+ onConnect: (connectionParams, websocket) => {
+ const websocketHeaders = websocket?.upgradeReq?.headers;
+
try {
- const cookies = subscriptionContextCookieParser(
- websocket.upgradeReq.headers.cookie,
- );
- return {
- headers: { ...websocket?.upgradeReq?.headers, cookies },
- };
- } catch (error) {
- throw new HttpException(COOKIES_NOT_FOUND, 400, {
- cause: new Error(COOKIES_NOT_FOUND),
- });
+ const accessToken = extractAccessTokenFromAuthRecords(connectionParams);
+ const authorization = `Bearer ${accessToken}`
+
+ return { headers: { ...websocketHeaders, authorization } };
+ } catch (authError) {
+ const cookiesFromHeader = websocketHeaders?.cookie;
+ const cookies = cookiesFromHeader
+ ? subscriptionContextCookieParser(cookiesFromHeader)
+ : null;
+
+ if (!cookies) {
+ throw new HttpException(COOKIES_NOT_FOUND, 400, {
+ cause: new Error(COOKIES_NOT_FOUND),
+ });
+ }
+
+ return { headers: { ...websocketHeaders, cookies } };
}
- },
+ }
},
},
context: ({ req, res, connection }) => ({
diff --git a/packages/hoppscotch-backend/src/auth/auth.controller.ts b/packages/hoppscotch-backend/src/auth/auth.controller.ts
index 9d652db49..dd7833baa 100644
--- a/packages/hoppscotch-backend/src/auth/auth.controller.ts
+++ b/packages/hoppscotch-backend/src/auth/auth.controller.ts
@@ -193,4 +193,24 @@ export class AuthController {
if (E.isLeft(userInfo)) throwHTTPErr(userInfo.left);
return userInfo.right;
}
+
+ @Get('desktop')
+ @UseGuards(JwtAuthGuard)
+ @UseInterceptors(UserLastLoginInterceptor)
+ async desktopAuthCallback(
+ @GqlUser() user: AuthUser,
+ @Query('redirect_uri') redirectUri: string,
+ ) {
+ if (!redirectUri || !redirectUri.startsWith('http://localhost')) {
+ throwHTTPErr({
+ message: 'Invalid desktop callback URL',
+ statusCode: 400
+ });
+ }
+
+ const tokens = await this.authService.generateAuthTokens(user.uid);
+ if (E.isLeft(tokens)) throwHTTPErr(tokens.left);
+
+ return tokens.right;
+ }
}
diff --git a/packages/hoppscotch-backend/src/auth/helper.ts b/packages/hoppscotch-backend/src/auth/helper.ts
index 9c5c051d6..c3316910e 100644
--- a/packages/hoppscotch-backend/src/auth/helper.ts
+++ b/packages/hoppscotch-backend/src/auth/helper.ts
@@ -3,9 +3,10 @@ import { DateTime } from 'luxon';
import { AuthTokens } from 'src/types/AuthTokens';
import { Response } from 'express';
import * as cookie from 'cookie';
-import { AUTH_PROVIDER_NOT_SPECIFIED, COOKIES_NOT_FOUND } from 'src/errors';
+import { AUTH_HEADER_NOT_FOUND, AUTH_PROVIDER_NOT_SPECIFIED, COOKIES_NOT_FOUND, INVALID_AUTH_HEADER } from 'src/errors';
import { throwErr } from 'src/utils';
import { ConfigService } from '@nestjs/config';
+import { IncomingHttpHeaders } from 'http';
enum AuthTokenType {
ACCESS_TOKEN = 'access_token',
@@ -117,11 +118,102 @@ export function authProviderCheck(
const envVariables = VITE_ALLOWED_AUTH_PROVIDERS
? VITE_ALLOWED_AUTH_PROVIDERS.split(',').map((provider) =>
- provider.trim().toUpperCase(),
- )
+ provider.trim().toUpperCase(),
+ )
: [];
if (!envVariables.includes(provider.toUpperCase())) return false;
return true;
}
+
+/**
+ * Extract cookie as key-value pairs from headers of a request
+ * @param headers HTTP request headers containing auth tokens
+ * @returns Cookie's key-value pairs
+ */
+export const extractCookieAsKeyValuesFromHeaders = (headers: IncomingHttpHeaders) => {
+ const cookieHeader = headers['cookie'] || headers['Cookie'] || headers['COOKIE'];
+
+ if (!cookieHeader) {
+ throw new HttpException(COOKIES_NOT_FOUND, 400, {
+ cause: new Error(COOKIES_NOT_FOUND),
+ });
+ }
+
+ const cookieStr = Array.isArray(cookieHeader) ? cookieHeader[0] : cookieHeader;
+
+ const kv = cookieStr.split(';')
+ .map(cookie => cookie.trim())
+ .reduce((acc, curr) => {
+ const [key, value] = curr.split('=');
+ acc[key] = value;
+ return acc;
+ }, {} as Record<string, string>);
+
+ return kv;
+};
+
+/**
+ * Extract auth tokens from cookie headers of a request
+ * @param headers HTTP request headers containing auth tokens
+ * @returns AuthTokens for JWT strategy to use
+ */
+export const extractAuthTokensFromCookieHeaders = (headers: IncomingHttpHeaders) => {
+ const cookieKV = extractCookieAsKeyValuesFromHeaders(headers);
+
+ if (!cookieKV[AuthTokenType.ACCESS_TOKEN] || !cookieKV[AuthTokenType.REFRESH_TOKEN]) {
+ throw new HttpException(COOKIES_NOT_FOUND, 400, {
+ cause: new Error(COOKIES_NOT_FOUND),
+ });
+ }
+
+ return <AuthTokens>{
+ access_token: cookieKV[AuthTokenType.ACCESS_TOKEN],
+ refresh_token: cookieKV[AuthTokenType.REFRESH_TOKEN],
+ };
+};
+
+/**
+ * Extract access tokens from cookie headers of a request
+ * @param headers HTTP request headers containing access tokens
+ * @returns AccessTokens for JWT strategy to use
+ */
+export const extractAccessTokensFromCookieHeaders = (headers: IncomingHttpHeaders) => {
+ const cookieKV = extractCookieAsKeyValuesFromHeaders(headers);
+
+ if (!cookieKV[AuthTokenType.ACCESS_TOKEN]) {
+ throw new HttpException(COOKIES_NOT_FOUND, 400, {
+ cause: new Error(COOKIES_NOT_FOUND),
+ });
+ }
+
+ return {
+ access_token: cookieKV[AuthTokenType.ACCESS_TOKEN],
+ };
+};
+
+/**
+ * Extract access token from authorization header
+ * @param headers HTTP request headers containing bearer token
+ * @returns AccessTokens for JWT strategy
+ */
+export const extractAccessTokenFromAuthRecords = (headers: IncomingHttpHeaders) => {
+ const authHeader = headers['authorization'] || headers['Authorization'];
+ if (!authHeader) {
+ throw new HttpException(AUTH_HEADER_NOT_FOUND, 400, {
+ cause: new Error(AUTH_HEADER_NOT_FOUND),
+ });
+ }
+
+ const headerValue = Array.isArray(authHeader) ? authHeader[0] : authHeader;
+ const [bearer, access_token] = headerValue.split(' ');
+
+ if (bearer !== 'Bearer' || !access_token) {
+ throw new HttpException(INVALID_AUTH_HEADER, 400, {
+ cause: new Error(INVALID_AUTH_HEADER),
+ });
+ }
+
+ return access_token;
+};
diff --git a/packages/hoppscotch-backend/src/auth/strategies/jwt.strategy.ts b/packages/hoppscotch-backend/src/auth/strategies/jwt.strategy.ts
index d113a47ce..2b7a7d32f 100644
--- a/packages/hoppscotch-backend/src/auth/strategies/jwt.strategy.ts
+++ b/packages/hoppscotch-backend/src/auth/strategies/jwt.strategy.ts
@@ -1,21 +1,66 @@
import { ExtractJwt, Strategy } from 'passport-jwt';
import { PassportStrategy } from '@nestjs/passport';
-import {
- Injectable,
- ForbiddenException,
- UnauthorizedException,
-} from '@nestjs/common';
+import { Injectable, ForbiddenException, UnauthorizedException } from '@nestjs/common';
import { AccessTokenPayload } from 'src/types/AuthTokens';
import { UserService } from 'src/user/user.service';
-import { AuthService } from '../auth.service';
+import { ConfigService } from '@nestjs/config';
import { Request } from 'express';
import * as O from 'fp-ts/Option';
-import {
- COOKIES_NOT_FOUND,
- INVALID_ACCESS_TOKEN,
- USER_NOT_FOUND,
-} from 'src/errors';
-import { ConfigService } from '@nestjs/config';
+import * as E from 'fp-ts/Either';
+import { pipe } from 'fp-ts/function';
+import { COOKIES_NOT_FOUND, INVALID_ACCESS_TOKEN, USER_NOT_FOUND } from 'src/errors';
+
+/**
+ * Extracts an access token from a cookie in the request.
+ *
+ * @param request - Express Request object
+ * @returns Option<string> containing the token if found
+ */
+const extractFromCookie = (request: Request): O.Option<string> =>
+ pipe(
+ O.fromNullable(request.cookies),
+ O.chain(cookies => O.fromNullable(cookies['access_token']))
+ );
+
+/**
+ * Extracts an access token from the Authorization header.
+ * Expects the header to be in the format: 'Bearer <token>'.
+ *
+ * @param request - Express Request object
+ * @returns Option<string> containing the token if found
+ */
+const extractFromAuthHeaders = (request: Request): O.Option<string> =>
+ pipe(
+ // First try headers.authorization, then fall back to root level authorization
+ // see `gql-auth.guard` for more info.
+ O.fromNullable(
+ request?.headers?.authorization ||
+ (request && 'authorization' in request ? request['authorization'] : undefined)
+ ),
+ O.chain(auth =>
+ typeof auth === 'string' && auth.startsWith('Bearer ')
+ ? O.some(auth.slice(7))
+ : O.none
+ )
+ );
+
+/**
+ * Combines cookie and header token extraction strategies.
+ * Attempts to extract from cookie first, then falls back to Authorization header.
+ *
+ * @param request - Express Request object
+ * @returns Either<Error, string> containing the token or an error
+ */
+const extractToken = (request: Request): E.Either<Error, string> =>
+ pipe(
+ extractFromCookie(request),
+ O.alt(() => extractFromAuthHeaders(request)),
+ // Neither `Authorization` header nor `Cookie` were found with the request,
+ // `COOKIES_NOT_FOUND` for backwards compatibility.
+ E.fromOption(() => {
+ return new ForbiddenException(COOKIES_NOT_FOUND);
+ })
+ );
@Injectable()
export class JwtStrategy extends PassportStrategy(Strategy, 'jwt') {
@@ -25,13 +70,14 @@ export class JwtStrategy extends PassportStrategy(Strategy, 'jwt') {
) {
super({
jwtFromRequest: ExtractJwt.fromExtractors([
- (request: Request) => {
- const ATCookie = request.cookies['access_token'];
- if (!ATCookie) {
- throw new ForbiddenException(COOKIES_NOT_FOUND);
- }
- return ATCookie;
- },
+ (request: Request) =>
+ pipe(
+ extractToken(request),
+ E.fold(
+ error => { throw error; },
+ token => { return token }
+ )
+ ),
]),
secretOrKey: configService.get('JWT_SECRET'),
});
diff --git a/packages/hoppscotch-backend/src/auth/strategies/rt-jwt.strategy.ts b/packages/hoppscotch-backend/src/auth/strategies/rt-jwt.strategy.ts
index 8fdf107ab..6f42321fb 100644
--- a/packages/hoppscotch-backend/src/auth/strategies/rt-jwt.strategy.ts
+++ b/packages/hoppscotch-backend/src/auth/strategies/rt-jwt.strategy.ts
@@ -27,6 +27,7 @@ export class RTJwtStrategy extends PassportStrategy(Strategy, 'jwt-refresh') {
(request: Request) => {
const RTCookie = request.cookies['refresh_token'];
if (!RTCookie) {
+ console.error("`refresh_token` not found")
throw new ForbiddenException(COOKIES_NOT_FOUND);
}
return RTCookie;
diff --git a/packages/hoppscotch-backend/src/errors.ts b/packages/hoppscotch-backend/src/errors.ts
index 5279d2bf1..0a52d2476 100644
--- a/packages/hoppscotch-backend/src/errors.ts
+++ b/packages/hoppscotch-backend/src/errors.ts
@@ -593,6 +593,18 @@ export const TOKEN_EXPIRED = 'auth/token_expired' as const;
*/
export const MAGIC_LINK_EXPIRED = 'auth/magic_link_expired' as const;
+/**
+ * Auth header was NOT found in the auth request
+ * (AuthService)
+ */
+export const AUTH_HEADER_NOT_FOUND = 'auth/auth_header_not_found' as const;
+
+/**
+ * Auth header was found but the format was invalid
+ * (AuthService)
+ */
+export const INVALID_AUTH_HEADER = 'auth/invalid_auth_header' as const;
+
/**
* No cookies were found in the auth request
* (AuthService)
diff --git a/packages/hoppscotch-common/locales/en.json b/packages/hoppscotch-common/locales/en.json
index 50545c8d1..6a18bcf1b 100644
--- a/packages/hoppscotch-common/locales/en.json
+++ b/packages/hoppscotch-common/locales/en.json
@@ -9,8 +9,11 @@
"select_workspace": "Select a workspace",
"clear": "Clear",
"clear_all": "Clear all",
+ "clear_cache": "Clear Cache",
"clear_history": "Clear all History",
+ "clear_unpinned": "Clear Unpinned",
"close": "Close",
+ "confirm": "Confirm",
"connect": "Connect",
"connecting": "Connecting",
"copy": "Copy",
@@ -18,6 +21,7 @@
"delete": "Delete",
"disconnect": "Disconnect",
"dismiss": "Dismiss",
+ "done": "Done",
"dont_save": "Don't save",
"download_file": "Download file",
"download_test_report": "Download test report",
@@ -42,6 +46,7 @@
"properties": "Properties",
"register": "Register",
"remove": "Remove",
+ "remove_instance": "Remove instance",
"rename": "Rename",
"restore": "Restore",
"retry": "Retry",
@@ -96,7 +101,6 @@
"enter_otp_instruction": "Please enter the verification code generated by Hoppscotch Agent and complete the registration",
"otp_label": "Verification Code",
"processing": "Processing your request...",
- "not_running": "The Hoppscotch Agent is not running. Please start the agent and click 'Retry'.",
"not_running_title": "Agent not detected",
"registration_title": "Agent registration",
"verify_ssl_certs": "Verify SSL Certificates",
@@ -255,8 +259,7 @@
"nonce_count": "Nonce Count",
"client_nonce": "Client Nonce",
"opaque": "Opaque",
- "disable_retry": "Disable Retrying Request",
- "inspector_warning": "Agent interceptor is recommended when using Digest Authorization."
+ "disable_retry": "Disable Retrying Request"
}
},
"collection": {
@@ -416,6 +419,43 @@
"details": "Details"
},
"error": {
+ "network": {
+ "heading": "Network Error",
+ "description": "Network connection failed. {message}: {cause}"
+ },
+ "timeout": {
+ "heading": "Timeout Error",
+ "description": "Request timed out during {phase}. {message}"
+ },
+ "certificate": {
+ "heading": "Certificate Error",
+ "description": "Invalid certificate. {message}: {cause}"
+ },
+ "auth": {
+ "heading": "Authentication Error",
+ "description": "Access denied. {message}: {cause}"
+ },
+ "proxy": {
+ "heading": "Proxy Error",
+ "description": "Proxy connection failed. {message}: {cause}"
+ },
+ "parse": {
+ "heading": "Parse Error",
+ "description": "Failed to parse response. {message}: {cause}"
+ },
+ "version": {
+ "heading": "Version Error",
+ "description": "Incompatible versions. {message}: {cause}"
+ },
+ "abort": {
+ "heading": "Request Aborted",
+ "description": "Operation cancelled. {message}: {cause}"
+ },
+ "unknown": {
+ "heading": "Unknown Error",
+ "description": "An unknown error occurred.",
+ "cause": "Unknown cause"
+ },
"authproviders_load_error": "Unable to load auth providers",
"browser_support_sse": "This browser doesn't seems to have Server Sent Events support.",
"check_console_details": "Check console log for details.",
@@ -536,7 +576,8 @@
"collection": "Collapse Collection Panel",
"more": "Hide more",
"preview": "Hide Preview",
- "sidebar": "Collapse sidebar"
+ "sidebar": "Collapse sidebar",
+ "password": "Hide Password"
},
"import": {
"collections": "Import collections",
@@ -591,6 +632,17 @@
"import_summary_test_scripts_title": "Test scripts",
"import_summary_not_supported_by_hoppscotch_import": "We do not support importing {featureLabel} from this source right now."
},
+ "instances": {
+ "switch": "Switch Hoppscotch Instance",
+ "enter_server_url": "Connect to a self-hosted instance",
+ "already_connected": "You are already connected to this instance",
+ "recent_connections": "Recent Connections",
+ "add_instance": "Add an instance",
+ "add_new": "Add a new instance",
+ "confirm_remove": "Confirm Removal",
+ "remove_warning": "Are you sure you want to remove this instance?",
+ "clear_cached_bundles": "Clear cached bundles"
+ },
"inspections": {
"description": "Inspect possible errors",
"environment": {
@@ -614,10 +666,36 @@
"extension_not_installed": "Extension not installed.",
"extension_unknown_origin": "Make sure you've added the API endpoint's origin to the Hoppscotch Browser Extension list.",
"extention_enable_action": "Enable Browser Extension",
- "extention_not_enabled": "Extension not enabled."
+ "extention_not_enabled": "Extension not enabled.",
+ "localaccess_unsupported": "Current interceptor does not support local access, please consider using Agent, Extension interceptors or the Desktop App"
},
- "requestBody": {
- "active_interceptor_doesnt_support_binary_body": "Sending binary data via the current interceptor is not supported yet."
+ "auth": {
+ "digest": "Agent interceptor or the Hoppscotch Desktop app are recommended when using Digest Authorization."
+ },
+ "body": {
+ "binary": "Sending binary data via the current interceptor is not supported yet."
+ }
+ },
+ "interceptor": {
+ "native": {
+ "name": "Native",
+ "settings_title": "Native"
+ },
+ "agent": {
+ "name": "Agent",
+ "settings_title": "Agent"
+ },
+ "proxy": {
+ "name": "Proxy",
+ "settings_title": "Proxy"
+ },
+ "browser": {
+ "name": "Browser",
+ "settings_title": "Browser"
+ },
+ "extension": {
+ "name": "Extension",
+ "settings_title": "Extension"
}
},
"layout": {
@@ -797,6 +875,13 @@
"account_email_description": "Your primary email address.",
"account_name_description": "This is your display name.",
"additional": "Additional Settings",
+ "agent_not_running": "Hoppscotch Agent not detected - click `Retry` to check again.",
+ "agent_not_running_short": "Check Agent's status.",
+ "agent_running": "Hoppscotch Agent is live.",
+ "agent_running_short": "Hoppscotch Agent is live.",
+ "agent_reset_registration": "Reset Registration",
+ "agent_registered": "Agent Registered",
+ "agent_registration_successful": "Agent Registered Successfully",
"auto_encode_mode": "Auto",
"auto_encode_mode_tooltip": "Encode the parameters in the request only if some special characters are present",
"background": "Background",
@@ -807,6 +892,7 @@
"delete_account_description": "Once you delete your account, all your data will be permanently deleted. This action cannot be undone.",
"disable_encode_mode_tooltip": "Never encode the parameters in the request",
"enable_encode_mode_tooltip": "Always encode the parameters in the request",
+ "enter_otp": "Enter Agent's code",
"expand_navigation": "Expand navigation",
"experiments": "Experiments",
"experiments_notice": "This is a collection of experiments we're working on that might turn out to be useful, fun, both, or neither. They're not final and may not be stable, so if something overly weird happens, don't panic. Just turn the dang thing off. Jokes aside, ",
@@ -819,6 +905,8 @@
"general_description": " General settings used in the application",
"interceptor": "Interceptor",
"interceptor_description": "Middleware between application and APIs.",
+ "kernel_interceptor": "Interceptor",
+ "kernel_interceptor_description": "Middleware between application and APIs.",
"language": "Language",
"light_mode": "Light",
"official_proxy_hosting": "Official Proxy is hosted by Hoppscotch.",
@@ -858,7 +946,33 @@
"use_experimental_url_bar": "Use experimental URL bar with environment highlighting",
"user": "User",
"verified_email": "Verified email",
- "verify_email": "Verify email"
+ "verify_email": "Verify email",
+ "validate_certificates": "Validate SSL/TLS Certificates",
+ "verify_host": "Verify Host",
+ "verify_peer": "Verify Peer",
+ "client_certificates": "Client Certificates",
+ "certificate_settings": "Certificate Settings",
+ "certificate": "Certificate",
+ "key": "Private Key",
+ "pfx_or_p12": "PFX/PKCS#12",
+ "password": "Password",
+ "select_file": "Select File",
+ "domain": "Domain",
+ "add_certificate": "Add Certificate",
+ "add_cert_file": "Add Certificate File",
+ "add_key_file": "Add Key File",
+ "add_pfx_file": "Add PFX File",
+ "global_defaults": "Global Defaults",
+ "add_domain_override": "Add Domain Override",
+ "domain_override": "Domain Override",
+ "manage_domains_overrides": "Manage Domains Overrides",
+ "add_domain": "Add Domain",
+ "remove_domain": "Remove Domain",
+ "ca_certificate": "CA Certificate",
+ "ca_certificates": "CA Certificates",
+ "ca_certificates_support": "Hoppscotch supports .crt, .cer or .pem files containing one or more certificates.",
+ "proxy_capabilities": "Hoppscotch Agent and Desktop App supports HTTP/HTTPS/SOCKS proxies with NTLM and Basic Auth support.",
+ "proxy_auth": "You can also include username and password in the URL."
},
"shared_requests": {
"button": "Button",
@@ -967,7 +1081,8 @@
"code": "Show code",
"collection": "Expand Collection Panel",
"more": "Show more",
- "sidebar": "Expand sidebar"
+ "sidebar": "Expand sidebar",
+ "password": "Show Password"
},
"socketio": {
"communication": "Communication",
diff --git a/packages/hoppscotch-common/package.json b/packages/hoppscotch-common/package.json
index 50709480d..b9e7fe504 100644
--- a/packages/hoppscotch-common/package.json
+++ b/packages/hoppscotch-common/package.json
@@ -34,16 +34,19 @@
"@codemirror/search": "6.5.6",
"@codemirror/state": "6.4.1",
"@codemirror/view": "6.25.1",
+ "@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload",
"@hoppscotch/codemirror-lang-graphql": "workspace:^",
"@hoppscotch/data": "workspace:^",
"@hoppscotch/httpsnippet": "3.0.7",
"@hoppscotch/js-sandbox": "workspace:^",
+ "@hoppscotch/kernel": "workspace:^",
"@hoppscotch/ui": "0.2.2",
"@hoppscotch/vue-toasted": "0.1.0",
"@lezer/highlight": "1.2.0",
"@noble/curves": "1.6.0",
"@scure/base": "1.1.9",
"@shopify/lang-jsonc": "1.0.0",
+ "@tauri-apps/plugin-store": "2.2.0",
"@types/markdown-it": "14.1.2",
"@unhead/vue": "1.11.10",
"@urql/core": "5.0.6",
@@ -90,6 +93,7 @@
"splitpanes": "3.1.5",
"stream-browserify": "3.0.0",
"subscriptions-transport-ws": "0.11.0",
+ "superjson": "2.2.2",
"tern": "0.24.3",
"timers": "0.1.1",
"tippy.js": "6.3.7",
diff --git a/packages/hoppscotch-common/src/components.d.ts b/packages/hoppscotch-common/src/components.d.ts
index 64eb0910b..68a94d166 100644
--- a/packages/hoppscotch-common/src/components.d.ts
+++ b/packages/hoppscotch-common/src/components.d.ts
@@ -24,6 +24,7 @@ declare module 'vue' {
AppHeader: typeof import('./components/app/Header.vue')['default']
AppInspection: typeof import('./components/app/Inspection.vue')['default']
AppInterceptor: typeof import('./components/app/Interceptor.vue')['default']
+ AppKernelInterceptor: typeof import('./components/app/KernelInterceptor.vue')['default']
AppLogo: typeof import('./components/app/Logo.vue')['default']
AppMarkdown: typeof import('./components/app/Markdown.vue')['default']
AppOptions: typeof import('./components/app/Options.vue')['default']
@@ -230,6 +231,7 @@ declare module 'vue' {
ImportExportImportExportStepsImportSummary: typeof import('./components/importExport/ImportExportSteps/ImportSummary.vue')['default']
ImportExportImportExportStepsMyCollectionImport: typeof import('./components/importExport/ImportExportSteps/MyCollectionImport.vue')['default']
ImportExportImportExportStepsUrlImport: typeof import('./components/importExport/ImportExportSteps/UrlImport.vue')['default']
+ InstanceSwitcher: typeof import('./components/instance/Switcher.vue')['default']
InterceptorsAgentModalNativeCACertificates: typeof import('./components/interceptors/agent/ModalNativeCACertificates.vue')['default']
InterceptorsAgentModalNativeClientCertificates: typeof import('./components/interceptors/agent/ModalNativeClientCertificates.vue')['default']
InterceptorsAgentModalNativeClientCertsAdd: typeof import('./components/interceptors/agent/ModalNativeClientCertsAdd.vue')['default']
@@ -255,7 +257,10 @@ declare module 'vue' {
RealtimeLogEntry: typeof import('./components/realtime/LogEntry.vue')['default']
RealtimeSubscription: typeof import('./components/realtime/Subscription.vue')['default']
SettingsAgent: typeof import('./components/settings/Agent.vue')['default']
+ SettingsAgentSubtitle: typeof import('./components/settings/AgentSubtitle.vue')['default']
SettingsExtension: typeof import('./components/settings/Extension.vue')['default']
+ SettingsExtensionSubtitle: typeof import('./components/settings/ExtensionSubtitle.vue')['default']
+ SettingsNative: typeof import('./components/settings/Native.vue')['default']
SettingsProxy: typeof import('./components/settings/Proxy.vue')['default']
Share: typeof import('./components/share/index.vue')['default']
ShareCreateModal: typeof import('./components/share/CreateModal.vue')['default']
diff --git a/packages/hoppscotch-common/src/components/app/ActionHandler.vue b/packages/hoppscotch-common/src/components/app/ActionHandler.vue
index 9253b0edc..2bcac28f2 100644
--- a/packages/hoppscotch-common/src/components/app/ActionHandler.vue
+++ b/packages/hoppscotch-common/src/components/app/ActionHandler.vue
@@ -2,6 +2,10 @@
<AppShortcuts :show="showShortcuts" @close="showShortcuts = false" />
<AppShare :show="showShare" @hide-modal="showShare = false" />
<FirebaseLogin v-if="showLogin" @hide-modal="showLogin = false" />
+ <InstanceSwitcher
+ v-if="showInstanceSwitcher"
+ @hide-modal="showInstanceSwitcher = false"
+ />
<HttpResponseInterface
v-if="isDrawerOpen"
:show="isDrawerOpen"
@@ -16,6 +20,7 @@ import { defineActionHandler } from "~/helpers/actions"
const showShortcuts = ref(false)
const showShare = ref(false)
const showLogin = ref(false)
+const showInstanceSwitcher = ref(false)
const isDrawerOpen = ref(false)
defineActionHandler("flyouts.keybinds.toggle", () => {
@@ -30,6 +35,10 @@ defineActionHandler("modals.login.toggle", () => {
showLogin.value = !showLogin.value
})
+defineActionHandler("modals.instance-switcher.toggle", () => {
+ showInstanceSwitcher.value = !showInstanceSwitcher.value
+})
+
defineActionHandler("response.schema.toggle", () => {
isDrawerOpen.value = !isDrawerOpen.value
})
diff --git a/packages/hoppscotch-common/src/components/app/Footer.vue b/packages/hoppscotch-common/src/components/app/Footer.vue
index 9cea74eb5..6676e5d8a 100644
--- a/packages/hoppscotch-common/src/components/app/Footer.vue
+++ b/packages/hoppscotch-common/src/components/app/Footer.vue
@@ -17,7 +17,7 @@
:icon="IconShieldCheck"
/>
<template #content>
- <AppInterceptor />
+ <AppKernelInterceptor />
</template>
</tippy>
<HoppButtonSecondary
diff --git a/packages/hoppscotch-common/src/components/app/Header.vue b/packages/hoppscotch-common/src/components/app/Header.vue
index 07ae5e73e..af10a8f06 100644
--- a/packages/hoppscotch-common/src/components/app/Header.vue
+++ b/packages/hoppscotch-common/src/components/app/Header.vue
@@ -2,10 +2,11 @@
<div>
<header
ref="headerRef"
+ data-tauri-drag-region
class="grid grid-cols-5 grid-rows-1 gap-2 overflow-x-auto overflow-y-hidden p-2"
- @mousedown.prevent="platform.ui?.appHeader?.onHeaderAreaClick?.()"
>
<div
+ data-tauri-drag-region
class="col-span-2 flex items-center justify-between space-x-2"
:style="{
paddingTop: platform.ui?.appHeader?.paddingTop?.value,
@@ -13,17 +14,50 @@
}"
>
<div class="flex">
+ <tippy
+ v-if="kernelMode === 'desktop'"
+ interactive
+ trigger="click"
+ theme="popover"
+ :on-shown="() => instanceSwitcherRef.focus()"
+ >
+ <div class="flex items-center cursor-pointer">
+ <span
+ class="!font-bold uppercase tracking-wide !text-secondaryDark pr-1"
+ >
+ {{ instanceDisplayName }}
+ </span>
+ <IconChevronDown class="h-4 w-4 text-secondaryDark" />
+ </div>
+ <template #content="{ hide }">
+ <div
+ ref="instanceSwitcherRef"
+ class="flex flex-col focus:outline-none min-w-64"
+ tabindex="0"
+ @keyup.escape="hide()"
+ >
+ <InstanceSwitcher @close-dropdown="hide()" />
+ </div>
+ </template>
+ </tippy>
<HoppButtonSecondary
+ v-else
class="!font-bold uppercase tracking-wide !text-secondaryDark hover:bg-primaryDark focus-visible:bg-primaryDark"
:label="t('app.name')"
to="/"
/>
</div>
</div>
- <div class="col-span-1 flex items-center justify-between space-x-2">
+ <div
+ data-tauri-drag-region
+ class="col-span-1 flex items-center justify-between space-x-2"
+ >
<AppSpotlightSearch />
</div>
- <div class="col-span-2 flex items-center justify-between space-x-2">
+ <div
+ data-tauri-drag-region
+ class="col-span-2 flex items-center justify-between space-x-2"
+ >
<div class="flex">
<HoppButtonSecondary
v-if="showInstallButton"
@@ -177,9 +211,8 @@
</span>
<span
class="inline-flex truncate text-secondaryLight text-tiny"
+ >{{ currentUser.email }}</span
>
- {{ currentUser.email }}
- </span>
</div>
<hr />
<HoppSmartItem
@@ -241,6 +274,8 @@
</template>
<script setup lang="ts">
+import { getKernelMode } from "@hoppscotch/kernel"
+
import { useI18n } from "@composables/i18n"
import { useReadonlyStream } from "@composables/stream"
import { defineActionHandler, invokeAction } from "@helpers/actions"
@@ -260,6 +295,7 @@ import {
BannerService,
} from "~/services/banner.service"
import { WorkspaceService } from "~/services/workspace.service"
+import { InstanceSwitcherService } from "~/services/instance-switcher.service"
import IconDownload from "~icons/lucide/download"
import IconLifeBuoy from "~icons/lucide/life-buoy"
import IconSettings from "~icons/lucide/settings"
@@ -267,9 +303,33 @@ import IconUploadCloud from "~icons/lucide/upload-cloud"
import IconUser from "~icons/lucide/user"
import IconUserPlus from "~icons/lucide/user-plus"
import IconUsers from "~icons/lucide/users"
+import IconChevronDown from "~icons/lucide/chevron-down"
const t = useI18n()
const toast = useToast()
+const kernelMode = getKernelMode()
+const instanceSwitcherService =
+ kernelMode === "desktop" ? useService(InstanceSwitcherService) : null
+const instanceSwitcherRef =
+ kernelMode === "desktop" ? ref<any | null>(null) : ref(null)
+
+const currentState =
+ kernelMode === "desktop" && instanceSwitcherService
+ ? useReadonlyStream(
+ instanceSwitcherService.getStateStream(),
+ instanceSwitcherService.getCurrentState().value
+ )
+ : ref({
+ status: "disconnected",
+ instance: { displayName: "Hoppscotch" },
+ })
+
+const instanceDisplayName = computed(() => {
+ if (currentState.value.status !== "connected") {
+ return "Hoppscotch"
+ }
+ return currentState.value.instance.displayName
+})
/**
* Feature flag to enable the workspace selector login conversion
diff --git a/packages/hoppscotch-common/src/components/app/KernelInterceptor.vue b/packages/hoppscotch-common/src/components/app/KernelInterceptor.vue
new file mode 100644
index 000000000..a0342c9af
--- /dev/null
+++ b/packages/hoppscotch-common/src/components/app/KernelInterceptor.vue
@@ -0,0 +1,97 @@
+<template>
+ <div class="flex flex-col space-y-2">
+ <div v-if="isTooltipComponent" class="flex flex-col px-4 pt-2">
+ <h2 class="inline-flex pb-1 font-semibold text-secondaryDark">
+ {{ t("settings.kernel_interceptor") }}
+ </h2>
+ <p class="inline-flex text-tiny">
+ {{ t("settings.kernel_interceptor_description") }}
+ </p>
+ </div>
+
+ <div>
+ <div
+ v-for="kernelInterceptor in kernelInterceptors"
+ :key="kernelInterceptor.id"
+ class="flex flex-col"
+ >
+ <HoppSmartRadio
+ :value="kernelInterceptor.id"
+ :label="kernelInterceptor.name(t)"
+ :selected="kernelInterceptorSelection === kernelInterceptor.id"
+ :disabled="kernelInterceptor.selectable.type === 'unselectable'"
+ :class="{
+ '!px-0 hover:bg-transparent': !isTooltipComponent,
+ }"
+ @change="setKernelInterceptor(kernelInterceptor.id)"
+ />
+
+ <div
+ v-if="kernelInterceptor.selectable.type === 'unselectable'"
+ class="px-4 py-1"
+ >
+ <template v-if="kernelInterceptor.selectable.reason.type === 'text'">
+ <p class="text-tiny text-secondaryLight">
+ {{ kernelInterceptor.selectable.reason.text(t) }}
+ </p>
+ <button
+ v-if="kernelInterceptor.selectable.reason.action"
+ class="text-tiny text-accent hover:text-accentDark"
+ @click="kernelInterceptor.selectable.reason.action.onActionClick"
+ >
+ {{ kernelInterceptor.selectable.reason.action.text(t) }}
+ </button>
+ </template>
+
+ <component
+ :is="kernelInterceptor.selectable.reason.component"
+ v-else-if="kernelInterceptor.selectable.reason.type === 'custom'"
+ v-bind="kernelInterceptor.selectable.reason.props ?? {}"
+ />
+ </div>
+
+ <component
+ :is="kernelInterceptor.subtitle"
+ v-if="kernelInterceptor.subtitle"
+ class="ml-8"
+ />
+ </div>
+ </div>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { useI18n } from "@composables/i18n"
+import { useService } from "dioc/vue"
+import { computed } from "vue"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
+
+const t = useI18n()
+
+withDefaults(
+ defineProps<{
+ isTooltipComponent?: boolean
+ }>(),
+ {
+ isTooltipComponent: true,
+ }
+)
+
+const kernelInterceptorService = useService(KernelInterceptorService)
+
+const kernelInterceptorSelection = computed(
+ () => kernelInterceptorService.current.value?.id ?? null
+)
+
+const kernelInterceptors = computed(
+ () => kernelInterceptorService.available.value
+)
+
+const setKernelInterceptor = (id: string) => {
+ if (!kernelInterceptors.value.some((ki) => ki.id === id)) {
+ console.warn("Attempted to set an unknown interceptor:", id)
+ return
+ }
+ kernelInterceptorService.setActive(id)
+}
+</script>
diff --git a/packages/hoppscotch-common/src/components/app/PaneLayout.vue b/packages/hoppscotch-common/src/components/app/PaneLayout.vue
index 6ca2c7a56..8e4a1cfdb 100644
--- a/packages/hoppscotch-common/src/components/app/PaneLayout.vue
+++ b/packages/hoppscotch-common/src/components/app/PaneLayout.vue
@@ -54,7 +54,7 @@ import "splitpanes/dist/splitpanes.css"
import { useSetting } from "@composables/settings"
import { breakpointsTailwind, useBreakpoints } from "@vueuse/core"
import { useService } from "dioc/vue"
-import { computed, ref, useSlots } from "vue"
+import { computed, onMounted, ref, useSlots } from "vue"
import { PersistenceService } from "~/services/persistence"
const SIDEBAR_ON_LEFT = useSetting("SIDEBAR_ON_LEFT")
@@ -104,23 +104,26 @@ if (!COLUMN_LAYOUT.value) {
PANE_MAIN_BOTTOM_SIZE.value = 50
}
-function setPaneEvent(event: PaneEvent[], type: "vertical" | "horizontal") {
+async function setPaneEvent(
+ event: PaneEvent[],
+ type: "vertical" | "horizontal"
+) {
if (!props.layoutId) return
const storageKey = `${props.layoutId}-pane-config-${type}`
- persistenceService.setLocalConfig(storageKey, JSON.stringify(event))
+ await persistenceService.setLocalConfig(storageKey, JSON.stringify(event))
}
-function populatePaneEvent() {
+async function populatePaneEvent() {
if (!props.layoutId) return
- const verticalPaneData = getPaneData("vertical")
+ const verticalPaneData = await getPaneData("vertical")
if (verticalPaneData) {
const [mainPane, sidebarPane] = verticalPaneData
PANE_MAIN_SIZE.value = mainPane?.size
PANE_SIDEBAR_SIZE.value = sidebarPane?.size
}
- const horizontalPaneData = getPaneData("horizontal")
+ const horizontalPaneData = await getPaneData("horizontal")
if (horizontalPaneData) {
const [mainTopPane, mainBottomPane] = horizontalPaneData
PANE_MAIN_TOP_SIZE.value = mainTopPane?.size
@@ -128,12 +131,16 @@ function populatePaneEvent() {
}
}
-function getPaneData(type: "vertical" | "horizontal"): PaneEvent[] | null {
+async function getPaneData(
+ type: "vertical" | "horizontal"
+): Promise<PaneEvent[] | null> {
const storageKey = `${props.layoutId}-pane-config-${type}`
- const paneEvent = persistenceService.getLocalConfig(storageKey)
+ const paneEvent = await persistenceService.getLocalConfig(storageKey)
if (!paneEvent) return null
return JSON.parse(paneEvent)
}
-populatePaneEvent()
+onMounted(async () => {
+ await populatePaneEvent()
+})
</script>
diff --git a/packages/hoppscotch-common/src/components/app/WhatsNewDialog.vue b/packages/hoppscotch-common/src/components/app/WhatsNewDialog.vue
index 9df856ea6..44fb5dced 100644
--- a/packages/hoppscotch-common/src/components/app/WhatsNewDialog.vue
+++ b/packages/hoppscotch-common/src/components/app/WhatsNewDialog.vue
@@ -48,7 +48,7 @@ defineEmits<{
}>()
const openWhatsNew = () => {
- if (props.notesUrl) platform.io.openExternalLink(props.notesUrl)
+ if (props.notesUrl) platform.kernelIO.openExternalLink(props.notesUrl)
}
</script>
diff --git a/packages/hoppscotch-common/src/components/app/spotlight/index.vue b/packages/hoppscotch-common/src/components/app/spotlight/index.vue
index 7da96ea78..e731b29ce 100644
--- a/packages/hoppscotch-common/src/components/app/spotlight/index.vue
+++ b/packages/hoppscotch-common/src/components/app/spotlight/index.vue
@@ -104,7 +104,9 @@ import {
} from "~/services/spotlight/searchers/environment.searcher"
import { GeneralSpotlightSearcherService } from "~/services/spotlight/searchers/general.searcher"
import { HistorySpotlightSearcherService } from "~/services/spotlight/searchers/history.searcher"
-import { InterceptorSpotlightSearcherService } from "~/services/spotlight/searchers/interceptor.searcher"
+// NOTE: Old interceptors
+// import { InterceptorSpotlightSearcherService } from "~/services/spotlight/searchers/interceptor.searcher"
+import { KernelInterceptorSpotlightSearcherService } from "~/services/spotlight/searchers/kernel-interceptor.searcher"
import { MiscellaneousSpotlightSearcherService } from "~/services/spotlight/searchers/miscellaneous.searcher"
import { NavigationSpotlightSearcherService } from "~/services/spotlight/searchers/navigation.searcher"
import { RequestSpotlightSearcherService } from "~/services/spotlight/searchers/request.searcher"
@@ -144,7 +146,9 @@ useService(EnvironmentsSpotlightSearcherService)
useService(SwitchEnvSpotlightSearcherService)
useService(WorkspaceSpotlightSearcherService)
useService(SwitchWorkspaceSpotlightSearcherService)
-useService(InterceptorSpotlightSearcherService)
+// NOTE: Old interceptors
+// useService(InterceptorSpotlightSearcherService)
+useService(KernelInterceptorSpotlightSearcherService)
useService(TeamsSpotlightSearcherService)
platform.spotlight?.additionalSearchers?.forEach((searcher) =>
diff --git a/packages/hoppscotch-common/src/components/collections/ImportExport.vue b/packages/hoppscotch-common/src/components/collections/ImportExport.vue
index 279d18896..ced13a9b3 100644
--- a/packages/hoppscotch-common/src/components/collections/ImportExport.vue
+++ b/packages/hoppscotch-common/src/components/collections/ImportExport.vue
@@ -625,7 +625,7 @@ const HoppGistCollectionsExporter: ImporterOrExporter = {
platform: "rest",
})
- platform.io.openExternalLink(res.right)
+ platform.kernelIO.openExternalLink(res.right)
} else {
toast.error(collectionJSON.left)
}
diff --git a/packages/hoppscotch-common/src/components/collections/Properties.vue b/packages/hoppscotch-common/src/components/collections/Properties.vue
index c79a4140a..ad2def9f8 100644
--- a/packages/hoppscotch-common/src/components/collections/Properties.vue
+++ b/packages/hoppscotch-common/src/components/collections/Properties.vue
@@ -199,7 +199,7 @@ const activeTabIsDetails = computed(() => activeTab.value === "details")
watch(
editableCollection,
- (updatedEditableCollection) => {
+ async (updatedEditableCollection) => {
if (props.show && props.editingProperties) {
const unsavedCollectionProperties: EditingProperties = {
collection: updatedEditableCollection,
@@ -207,7 +207,7 @@ watch(
path: props.editingProperties.path,
inheritedProperties: props.editingProperties.inheritedProperties,
}
- persistenceService.setLocalConfig(
+ await persistenceService.setLocalConfig(
"unsaved_collection_properties",
JSON.stringify(unsavedCollectionProperties)
)
@@ -222,7 +222,7 @@ const activeTab = useVModel(props, "modelValue", emit)
watch(
() => props.show,
- (show) => {
+ async (show) => {
// `Details` tab doesn't exist for personal workspace, hence switching to the `Headers` tab
// The modal can appear empty while switching from a team workspace with `Details` as the active tab
if (activeTab.value === "details" && !props.showDetails) {
@@ -245,12 +245,14 @@ watch(
},
}
- persistenceService.removeLocalConfig("unsaved_collection_properties")
+ await persistenceService.removeLocalConfig(
+ "unsaved_collection_properties"
+ )
}
}
)
-const saveEditedCollection = () => {
+const saveEditedCollection = async () => {
if (!props.editingProperties) return
const finalCollection = clone(editableCollection.value)
const collection = {
@@ -262,11 +264,11 @@ const saveEditedCollection = () => {
isRootCollection: props.editingProperties.isRootCollection,
}
emit("set-collection-properties", collection as EditingProperties)
- persistenceService.removeLocalConfig("unsaved_collection_properties")
+ await persistenceService.removeLocalConfig("unsaved_collection_properties")
}
-const hideModal = () => {
- persistenceService.removeLocalConfig("unsaved_collection_properties")
+const hideModal = async () => {
+ await persistenceService.removeLocalConfig("unsaved_collection_properties")
emit("hide-modal")
}
diff --git a/packages/hoppscotch-common/src/components/collections/graphql/ImportExport.vue b/packages/hoppscotch-common/src/components/collections/graphql/ImportExport.vue
index b0759eabe..2934197dc 100644
--- a/packages/hoppscotch-common/src/components/collections/graphql/ImportExport.vue
+++ b/packages/hoppscotch-common/src/components/collections/graphql/ImportExport.vue
@@ -208,7 +208,7 @@ const GqlCollectionsGistExporter: ImporterOrExporter = {
exporter: "gist",
})
- platform.io.openExternalLink(res.right)
+ platform.kernelIO.openExternalLink(res.right)
}
isGqlCollectionGistExportInProgress.value = false
diff --git a/packages/hoppscotch-common/src/components/collections/graphql/index.vue b/packages/hoppscotch-common/src/components/collections/graphql/index.vue
index 406cade55..bb5917df0 100644
--- a/packages/hoppscotch-common/src/components/collections/graphql/index.vue
+++ b/packages/hoppscotch-common/src/components/collections/graphql/index.vue
@@ -243,9 +243,9 @@ const persistenceService = useService(PersistenceService)
const collectionPropertiesModalActiveTab = ref<GQLOptionTabs>("headers")
-onMounted(() => {
+onMounted(async () => {
const localOAuthTempConfig =
- persistenceService.getLocalConfig("oauth_temp_config")
+ await persistenceService.getLocalConfig("oauth_temp_config")
if (!localOAuthTempConfig) {
return
@@ -260,9 +260,8 @@ onMounted(() => {
if (context?.type === "collection-properties") {
// load the unsaved editing properties
- const unsavedCollectionPropertiesString = persistenceService.getLocalConfig(
- "unsaved_collection_properties"
- )
+ const unsavedCollectionPropertiesString =
+ await persistenceService.getLocalConfig("unsaved_collection_properties")
if (unsavedCollectionPropertiesString) {
const unsavedCollectionProperties: EditingProperties = JSON.parse(
@@ -284,7 +283,7 @@ onMounted(() => {
editingProperties.value = unsavedCollectionProperties
}
- persistenceService.removeLocalConfig("oauth_temp_config")
+ await persistenceService.removeLocalConfig("oauth_temp_config")
collectionPropertiesModalActiveTab.value = "authorization"
showModalEditProperties.value = true
}
diff --git a/packages/hoppscotch-common/src/components/collections/index.vue b/packages/hoppscotch-common/src/components/collections/index.vue
index f0656c38b..89d6da947 100644
--- a/packages/hoppscotch-common/src/components/collections/index.vue
+++ b/packages/hoppscotch-common/src/components/collections/index.vue
@@ -440,9 +440,9 @@ const persistenceService = useService(PersistenceService)
const collectionPropertiesModalActiveTab = ref<RESTOptionTabs>("headers")
-onMounted(() => {
+onMounted(async () => {
const localOAuthTempConfig =
- persistenceService.getLocalConfig("oauth_temp_config")
+ await persistenceService.getLocalConfig("oauth_temp_config")
if (!localOAuthTempConfig) {
return
@@ -457,9 +457,8 @@ onMounted(() => {
if (context?.type === "collection-properties") {
// load the unsaved editing properties
- const unsavedCollectionPropertiesString = persistenceService.getLocalConfig(
- "unsaved_collection_properties"
- )
+ const unsavedCollectionPropertiesString =
+ await persistenceService.getLocalConfig("unsaved_collection_properties")
if (unsavedCollectionPropertiesString) {
const unsavedCollectionProperties: EditingProperties = JSON.parse(
@@ -481,7 +480,7 @@ onMounted(() => {
editingProperties.value = unsavedCollectionProperties
}
- persistenceService.removeLocalConfig("oauth_temp_config")
+ await persistenceService.removeLocalConfig("oauth_temp_config")
collectionPropertiesModalActiveTab.value = "authorization"
showModalEditProperties.value = true
}
@@ -2642,7 +2641,7 @@ const initializeDownloadCollection = async (
collectionJSON: string,
name: string | null
) => {
- const result = await platform.io.saveFileWithDialog({
+ const result = await platform.kernelIO.saveFileWithDialog({
data: collectionJSON,
contentType: "application/json",
suggestedFilename: `${name ?? "collection"}.json`,
diff --git a/packages/hoppscotch-common/src/components/cookies/AllModal.vue b/packages/hoppscotch-common/src/components/cookies/AllModal.vue
index 565394933..6d6618f4e 100644
--- a/packages/hoppscotch-common/src/components/cookies/AllModal.vue
+++ b/packages/hoppscotch-common/src/components/cookies/AllModal.vue
@@ -149,10 +149,10 @@ import IconTrash2 from "~icons/lucide/trash-2"
import IconPlus from "~icons/lucide/plus"
import { cloneDeep } from "lodash-es"
import { ref, watch, computed } from "vue"
-import { InterceptorService } from "~/services/interceptor.service"
import { EditCookieConfig } from "./EditCookie.vue"
import { useColorMode } from "@composables/theming"
import { useToast } from "@composables/toast"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
const props = defineProps<{
show: boolean
@@ -168,17 +168,16 @@ const toast = useToast()
const newDomainText = ref("")
-const interceptorService = useService(InterceptorService)
+const interceptorService = useService(KernelInterceptorService)
const cookieJarService = useService(CookieJarService)
const workingCookieJar = ref(cloneDeep(cookieJarService.cookieJar.value))
const currentInterceptorSupportsCookies = computed(() => {
- const currentInterceptor = interceptorService.currentInterceptor.value
+ const capabilities = interceptorService.current.value?.capabilities
+ const supportsCookies = capabilities["advanced"].has("cookies")
- if (!currentInterceptor) return true
-
- return currentInterceptor.supportsCookies ?? false
+ return supportsCookies ?? false
})
function addNewDomain() {
diff --git a/packages/hoppscotch-common/src/components/environments/ImportExport.vue b/packages/hoppscotch-common/src/components/environments/ImportExport.vue
index 337c2aac3..12210863b 100644
--- a/packages/hoppscotch-common/src/components/environments/ImportExport.vue
+++ b/packages/hoppscotch-common/src/components/environments/ImportExport.vue
@@ -328,7 +328,7 @@ const HoppEnvironmentsGistExporter: ImporterOrExporter = {
platform: "rest",
})
- platform.io.openExternalLink(res.right)
+ platform.kernelIO.openExternalLink(res.right)
}
isEnvironmentGistExportInProgress.value = false
diff --git a/packages/hoppscotch-common/src/components/firebase/Login.vue b/packages/hoppscotch-common/src/components/firebase/Login.vue
index a0bef338b..c3a4bd124 100644
--- a/packages/hoppscotch-common/src/components/firebase/Login.vue
+++ b/packages/hoppscotch-common/src/components/firebase/Login.vue
@@ -316,9 +316,9 @@ const signInWithEmail = async () => {
await platform.auth
.signInWithEmail(form.email)
- .then(() => {
+ .then(async () => {
mode.value = "email-sent"
- persistenceService.setLocalConfig("emailForSignIn", form.email)
+ await persistenceService.setLocalConfig("emailForSignIn", form.email)
})
.catch((e) => {
console.error(e)
diff --git a/packages/hoppscotch-common/src/components/graphql/Request.vue b/packages/hoppscotch-common/src/components/graphql/Request.vue
index e9632b748..ce06d5cf5 100644
--- a/packages/hoppscotch-common/src/components/graphql/Request.vue
+++ b/packages/hoppscotch-common/src/components/graphql/Request.vue
@@ -68,7 +68,7 @@ import { computed, ref, watch } from "vue"
import { connection } from "~/helpers/graphql/connection"
import { connect } from "~/helpers/graphql/connection"
import { disconnect } from "~/helpers/graphql/connection"
-import { InterceptorService } from "~/services/interceptor.service"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
import { useService } from "dioc/vue"
import { defineActionHandler } from "~/helpers/actions"
import { GQLTabService } from "~/services/tab/graphql"
@@ -77,7 +77,7 @@ import { HoppGQLAuth, HoppGQLRequest } from "@hoppscotch/data"
const t = useI18n()
const tabs = useService(GQLTabService)
-const interceptorService = useService(InterceptorService)
+const interceptorService = useService(KernelInterceptorService)
const connectionSwitchModal = ref(false)
@@ -120,7 +120,7 @@ const gqlConnect = () => {
platform.analytics?.logEvent({
type: "HOPP_REQUEST_RUN",
platform: "graphql-schema",
- strategy: interceptorService.currentInterceptorID.value!,
+ strategy: interceptorService.current.value!.id,
})
}
diff --git a/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue b/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue
index 1f0ab9c4c..111a2f2ad 100644
--- a/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue
+++ b/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue
@@ -74,7 +74,7 @@ import { HoppInheritedProperty } from "~/helpers/types/HoppInheritedProperties"
import { completePageProgress, startPageProgress } from "~/modules/loadingbar"
import { editGraphqlRequest } from "~/newstore/collections"
import { platform } from "~/platform"
-import { InterceptorService } from "~/services/interceptor.service"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
import { GQLTabService } from "~/services/tab/graphql"
const VALID_GQL_OPERATIONS = [
@@ -86,7 +86,7 @@ const VALID_GQL_OPERATIONS = [
export type GQLOptionTabs = (typeof VALID_GQL_OPERATIONS)[number]
-const interceptorService = useService(InterceptorService)
+const interceptorService = useService(KernelInterceptorService)
const t = useI18n()
const toast = useToast()
@@ -174,7 +174,7 @@ const runQuery = async (
platform.analytics?.logEvent({
type: "HOPP_REQUEST_RUN",
platform: "graphql-query",
- strategy: interceptorService.currentInterceptorID.value!,
+ strategy: interceptorService.current.value!.id,
})
}
diff --git a/packages/hoppscotch-common/src/components/graphql/Sidebar.vue b/packages/hoppscotch-common/src/components/graphql/Sidebar.vue
index e31e0632b..a1f13610f 100644
--- a/packages/hoppscotch-common/src/components/graphql/Sidebar.vue
+++ b/packages/hoppscotch-common/src/components/graphql/Sidebar.vue
@@ -147,7 +147,7 @@ const downloadSchema = async () => {
URL.revokeObjectURL(url)
- const result = await platform.io.saveFileWithDialog({
+ const result = await platform.kernelIO.saveFileWithDialog({
data: dataToWrite,
contentType: "application/graphql",
suggestedFilename: filename,
diff --git a/packages/hoppscotch-common/src/components/http/Request.vue b/packages/hoppscotch-common/src/components/http/Request.vue
index e84360fed..2ee8951f3 100644
--- a/packages/hoppscotch-common/src/components/http/Request.vue
+++ b/packages/hoppscotch-common/src/components/http/Request.vue
@@ -261,15 +261,15 @@ import { platform } from "~/platform"
import { HoppRESTRequest } from "@hoppscotch/data"
import { useService } from "dioc/vue"
import { InspectionService } from "~/services/inspection"
-import { InterceptorService } from "~/services/interceptor.service"
import { HoppTab } from "~/services/tab"
import { HoppRequestDocument } from "~/helpers/rest/document"
import { RESTTabService } from "~/services/tab/rest"
import { getMethodLabelColor } from "~/helpers/rest/labelColoring"
import { WorkspaceService } from "~/services/workspace.service"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
const t = useI18n()
-const interceptorService = useService(InterceptorService)
+const interceptorService = useService(KernelInterceptorService)
const methods = [
"GET",
@@ -348,7 +348,7 @@ const newSendRequest = async () => {
platform.analytics?.logEvent({
type: "HOPP_REQUEST_RUN",
platform: "rest",
- strategy: interceptorService.currentInterceptorID.value!,
+ strategy: interceptorService.current.value!.id,
workspaceType: workspaceService.currentWorkspace.value.type,
})
diff --git a/packages/hoppscotch-common/src/components/http/ResponseMeta.vue b/packages/hoppscotch-common/src/components/http/ResponseMeta.vue
index dcfbe0946..8bb9b848f 100644
--- a/packages/hoppscotch-common/src/components/http/ResponseMeta.vue
+++ b/packages/hoppscotch-common/src/components/http/ResponseMeta.vue
@@ -29,6 +29,26 @@
v-if="response.type === 'extension_error'"
class="flex-1"
/>
+ <HoppSmartPlaceholder
+ v-if="response.type === 'interceptor_error'"
+ :src="`/images/states/${colorMode.value}/upload_error.svg`"
+ :alt="
+ response.error?.humanMessage?.heading?.(t) || t('error.network_fail')
+ "
+ :heading="
+ response.error?.humanMessage?.heading?.(t) || t('error.network_fail')
+ "
+ :text="
+ response.error?.humanMessage?.description?.(t) ||
+ t('error.network_fail')
+ "
+ >
+ <template #body>
+ <AppKernelInterceptor
+ class="rounded border border-dividerLight p-2"
+ />
+ </template>
+ </HoppSmartPlaceholder>
<HoppSmartPlaceholder
v-if="response.type === 'network_fail'"
:src="`/images/states/${colorMode.value}/upload_error.svg`"
diff --git a/packages/hoppscotch-common/src/components/http/authorization/OAuth2.vue b/packages/hoppscotch-common/src/components/http/authorization/OAuth2.vue
index b6165c022..ac126ee9b 100644
--- a/packages/hoppscotch-common/src/components/http/authorization/OAuth2.vue
+++ b/packages/hoppscotch-common/src/components/http/authorization/OAuth2.vue
@@ -1084,7 +1084,7 @@ const generateOAuthToken = async () => {
: { type: "request-tab", metadata: {} },
grant_type: auth.value.grantTypeInfo.grantType,
}
- persistenceService.setLocalConfig(
+ await persistenceService.setLocalConfig(
"oauth_temp_config",
JSON.stringify(authConfig)
)
diff --git a/packages/hoppscotch-common/src/components/importExport/ImportExportSteps/UrlImport.vue b/packages/hoppscotch-common/src/components/importExport/ImportExportSteps/UrlImport.vue
index e91211de5..cc9a5a337 100644
--- a/packages/hoppscotch-common/src/components/importExport/ImportExportSteps/UrlImport.vue
+++ b/packages/hoppscotch-common/src/components/importExport/ImportExportSteps/UrlImport.vue
@@ -45,11 +45,13 @@
import { computed, ref, watch } from "vue"
import { useI18n } from "@composables/i18n"
import { useToast } from "~/composables/toast"
-import { InterceptorService } from "~/services/interceptor.service"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
import { useService } from "dioc/vue"
import * as E from "fp-ts/Either"
+import * as O from "fp-ts/Option"
+import { parseBodyAsJSON } from "~/helpers/functional/json"
-const interceptorService = useService(InterceptorService)
+const interceptorService = useService(KernelInterceptorService)
const t = useI18n()
@@ -83,33 +85,26 @@ const disableImportCTA = computed(() => !hasURL.value || props.loading)
const urlFetchLogic =
props.fetchLogic ??
async function (url: string) {
- const res = await interceptorService.runRequest({
+ const { response } = interceptorService.execute({
+ id: Date.now(),
url: url,
- transitional: {
- forcedJSONParsing: false,
- silentJSONParsing: false,
- clarifyTimeoutError: true,
- },
+ method: "GET",
+ version: "HTTP/1.1",
})
- const response = await res.response
+ const res = await response
- if (E.isLeft(response)) {
+ if (E.isLeft(res)) {
return E.left("REQUEST_FAILED")
}
- // convert ArrayBuffer to string
- if (!(response.right.data instanceof ArrayBuffer)) {
- return E.left("REQUEST_FAILED")
- }
+ const responsePayload = parseBodyAsJSON<unknown>(res.right.body)
- try {
- return E.right(
- InterceptorService.convertArrayBufferToString(response.right.data)
- )
- } catch (e) {
- return E.left("REQUEST_FAILED")
+ if (O.isSome(responsePayload)) {
+ return E.right(responsePayload)
}
+
+ return E.left("REQUEST_FAILED")
}
async function fetchUrlData() {
diff --git a/packages/hoppscotch-common/src/components/instance/Switcher.vue b/packages/hoppscotch-common/src/components/instance/Switcher.vue
new file mode 100644
index 000000000..9fe359f73
--- /dev/null
+++ b/packages/hoppscotch-common/src/components/instance/Switcher.vue
@@ -0,0 +1,380 @@
+<template>
+ <div class="flex flex-col space-y-1 w-full">
+ <div
+ class="flex items-center justify-between px-4 py-3 hover:accent-primaryLight rounded-md"
+ :class="{
+ 'cursor-pointer': !isVendored,
+ 'bg-accent text-accentContrast': isVendored,
+ }"
+ @click="!isVendored && connectToVendored()"
+ >
+ <div class="flex items-center gap-4">
+ <IconLucidePackage />
+ <div class="flex flex-col">
+ <span class="font-semibold uppercase">Hoppscotch</span>
+ <div class="flex items-center gap-1">
+ <span class="text-xs">On-prem</span>
+ <span class="text-xs"> app </span>
+ </div>
+ </div>
+ </div>
+ <IconLucideCheck v-if="isVendored" />
+ </div>
+
+ <div class="flex flex-col space-y-1">
+ <div
+ v-for="instance in recentInstances"
+ :key="instance.serverUrl"
+ class="flex items-center justify-between px-4 py-2 rounded-md group"
+ :class="{
+ 'bg-accent text-accentContrast':
+ currentInstance &&
+ currentInstance.type === 'server' &&
+ currentInstance.serverUrl ===
+ instanceService.normalizeUrl(instance.serverUrl),
+ 'hover:bg-primaryLight': !(
+ currentInstance &&
+ currentInstance.type === 'server' &&
+ currentInstance.serverUrl ===
+ instanceService.normalizeUrl(instance.serverUrl)
+ ),
+ }"
+ >
+ <div
+ class="flex items-center gap-4 flex-1 cursor-pointer"
+ @click="
+ !isConnectedTo(instance.serverUrl) &&
+ connectToServer(instance.serverUrl)
+ "
+ >
+ <IconLucideServer />
+ <div class="flex flex-col">
+ <span
+ v-tippy="{
+ content: instance.serverUrl,
+ theme: 'tooltip',
+ }"
+ class="font-semibold uppercase"
+ >{{ getHostname(instance.displayName) }}</span
+ >
+ <div class="flex items-center gap-1">
+ <span v-if="isOnPrem(instance.serverUrl)" class="text-xs"
+ >On-prem</span
+ >
+ <span v-if="instance.version" class="text-xs">
+ v{{ instance.version }}
+ </span>
+ </div>
+ </div>
+ </div>
+ <div class="flex items-center">
+ <div class="w-8 flex justify-center">
+ <IconLucideCheck
+ v-if="isConnectedTo(instance.serverUrl)"
+ class="text-current"
+ />
+ <HoppButtonSecondary
+ v-if="!isConnectedTo(instance.serverUrl)"
+ v-tippy="{
+ content: t('action.remove_instance') || 'Remove instance',
+ theme: 'tooltip',
+ }"
+ class="!p-0 ml-4 opacity-0 group-hover:opacity-100 transition-opacity"
+ :icon="IconLucideTrash"
+ @click.stop="
+ confirmRemove(instance.serverUrl, instance.displayName)
+ "
+ />
+ </div>
+ </div>
+ </div>
+ </div>
+ <hr />
+
+ <HoppButtonSecondary
+ :label="t('instances.add_instance') || 'Add an instance'"
+ :icon="IconLucidePlus"
+ filled
+ outline
+ @click="
+ () => {
+ showAddModal = true
+ $emit('close-dropdown')
+ }
+ "
+ />
+
+ <HoppSmartModal
+ v-if="showAddModal"
+ dialog
+ :title="t('instances.add_new') || 'Add New Instance'"
+ styles="sm:max-w-md"
+ @close="showAddModal = false"
+ >
+ <template #body>
+ <form class="flex flex-col space-y-4" @submit.prevent="handleConnect">
+ <div class="flex flex-col space-y-2">
+ <HoppSmartInput
+ v-model="newInstanceUrl"
+ :disabled="isConnecting"
+ placeholder="hoppscotch.company.com"
+ :error="!!connectionError"
+ type="text"
+ autofocus
+ styles="bg-primaryLight border-divider text-secondaryDark"
+ input-styles="floating-input peer w-full px-4 py-2 bg-primaryDark border border-divider rounded text-secondaryDark font-medium transition focus:border-dividerDark disabled:opacity-75"
+ @submit="handleConnect"
+ >
+ <template #prefix>
+ <IconLucideGlobe />
+ </template>
+ <HoppSmartInput>
+ <template #suffix>
+ <IconLucideCheck
+ v-if="
+ !isConnecting &&
+ !connectionError &&
+ newInstanceUrl &&
+ isValidUrl &&
+ !isCurrentUrl
+ "
+ class="text-green-500"
+ />
+ <IconLucideAlertCircle
+ v-else-if="
+ !isConnecting && !connectionError && isCurrentUrl
+ "
+ class="text-amber-500"
+ />
+ </template>
+ </HoppSmartInput>
+ </HoppSmartInput>
+ <span v-if="connectionError" class="text-red-500 text-tiny">
+ {{ connectionError }}
+ </span>
+ <span v-else-if="isCurrentUrl" class="text-amber-500 text-tiny">
+ {{
+ t("instances.already_connected") ||
+ "You are already connected to this instance"
+ }}
+ </span>
+ </div>
+
+ <HoppButtonPrimary
+ type="submit"
+ :disabled="isConnecting || !isValidUrl || isCurrentUrl"
+ :loading="isConnecting"
+ :label="t('action.connect')"
+ class="h-10"
+ />
+ </form>
+ </template>
+
+ <template #footer>
+ <div class="flex justify-end w-full">
+ <HoppButtonSecondary
+ v-tippy="{
+ content: t('instances.clear_cached_bundles'),
+ theme: 'tooltip',
+ }"
+ :icon="IconLucideTrash2"
+ :label="t('action.clear_cache')"
+ :loading="isClearingCache"
+ :disabled="isClearingCache"
+ class="!text-red-500 hover:!text-red-600"
+ @click="handleClearCache"
+ />
+ </div>
+ </template>
+ </HoppSmartModal>
+ <HoppSmartModal
+ v-if="showRemoveModal"
+ dialog
+ :title="t('instances.confirm_remove') || 'Confirm Removal'"
+ styles="sm:max-w-md"
+ @close="showRemoveModal = false"
+ >
+ <template #body>
+ <p>
+ {{
+ t("instances.remove_warning") ||
+ "Are you sure you want to remove this instance?"
+ }}
+
+ <span class="font-bold">
+ {{ confirmedRemoveDisplayName }}
+ </span>
+ </p>
+ </template>
+ <template #footer>
+ <div class="flex justify-end w-full space-x-2">
+ <HoppButtonSecondary
+ :label="t('action.cancel') || 'Cancel'"
+ outline
+ filled
+ @click="showRemoveModal = false"
+ />
+ <HoppButtonPrimary
+ :label="t('action.remove') || 'Remove'"
+ filled
+ outline
+ @click="removeInstance(confirmedRemoveUrl)"
+ />
+ </div>
+ </template>
+ </HoppSmartModal>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref, computed } from "vue"
+import { useService } from "dioc/vue"
+import { useI18n } from "@composables/i18n"
+import { useReadonlyStream } from "@composables/stream"
+import {
+ InstanceSwitcherService,
+ InstanceType,
+} from "~/services/instance-switcher.service"
+
+import IconLucideGlobe from "~icons/lucide/globe"
+import IconLucideCheck from "~icons/lucide/check"
+import IconLucideServer from "~icons/lucide/server"
+import IconLucideTrash from "~icons/lucide/trash"
+import IconLucideTrash2 from "~icons/lucide/trash-2"
+import IconLucideAlertCircle from "~icons/lucide/alert-circle"
+import IconLucidePlus from "~icons/lucide/plus"
+import IconLucidePackage from "~icons/lucide/package"
+
+const t = useI18n()
+const instanceService = useService(InstanceSwitcherService)
+
+const emit = defineEmits(["close-dropdown"])
+
+const showAddModal = ref(false)
+const newInstanceUrl = ref("")
+const isClearingCache = ref(false)
+const showRemoveModal = ref(false)
+const confirmedRemoveUrl = ref("")
+const confirmedRemoveDisplayName = ref("")
+
+const confirmRemove = (url: string, displayName: string) => {
+ confirmedRemoveUrl.value = url
+ confirmedRemoveDisplayName.value = displayName || getHostname(url)
+ showRemoveModal.value = true
+ emit("close-dropdown")
+}
+
+const state = useReadonlyStream(
+ instanceService.getStateStream(),
+ instanceService.getCurrentState().value
+)
+
+const recentInstances = useReadonlyStream(
+ instanceService.getRecentInstancesStream(),
+ []
+)
+
+const currentInstance = computed<InstanceType | null>(() => {
+ return state.value.status === "connected" ? state.value.instance : null
+})
+
+const isConnecting = computed(() => state.value.status === "connecting")
+
+const connectionError = computed(() => {
+ return state.value.status === "error" ? state.value.message : null
+})
+
+const isVendored = computed(() => {
+ return currentInstance.value?.type === "vendored"
+})
+
+const isValidUrl = computed(() => {
+ if (!newInstanceUrl.value) return false
+
+ try {
+ const normalizedUrl = newInstanceUrl.value.startsWith("http")
+ ? newInstanceUrl.value
+ : `http://${newInstanceUrl.value}`
+ const url = new URL(normalizedUrl)
+ console.info("url", url)
+ return true
+ } catch {
+ return false
+ }
+})
+
+const isCurrentUrl = computed(() => {
+ if (!newInstanceUrl.value) return false
+ if (currentInstance.value?.type !== "server") return false
+
+ try {
+ return instanceService.isCurrentlyConnectedTo(newInstanceUrl.value)
+ } catch {
+ return false
+ }
+})
+
+const isConnectedTo = (url: string): boolean => {
+ return instanceService.isCurrentlyConnectedTo(url)
+}
+
+const getHostname = (url: string): string => {
+ try {
+ if (!url.startsWith("http")) {
+ return url.toUpperCase()
+ }
+ const hostname = new URL(url).hostname
+ return hostname.toUpperCase()
+ } catch {
+ return url.toUpperCase()
+ }
+}
+
+const isOnPrem = (url: string): boolean => {
+ try {
+ const hostname = new URL(url.startsWith("http") ? url : `http://${url}`)
+ .hostname
+ return hostname !== "hoppscotch.com"
+ } catch {
+ return false
+ }
+}
+
+const connectToVendored = async () => {
+ if (isVendored.value) return
+ await instanceService.connectToVendoredInstance()
+ if (showAddModal.value) showAddModal.value = false
+ emit("close-dropdown")
+}
+
+const connectToServer = async (url: string) => {
+ await instanceService.connectToServerInstance(url)
+ emit("close-dropdown")
+}
+
+const removeInstance = async (url: string) => {
+ await instanceService.removeInstance(url)
+ showRemoveModal.value = false
+}
+
+const handleConnect = async () => {
+ if (!newInstanceUrl.value || !isValidUrl.value || isCurrentUrl.value) return
+
+ const success = await instanceService.connectToServerInstance(
+ newInstanceUrl.value
+ )
+
+ if (success) {
+ newInstanceUrl.value = ""
+ showAddModal.value = false
+ }
+}
+
+const handleClearCache = async () => {
+ if (isClearingCache.value) return
+
+ isClearingCache.value = true
+ await instanceService.clearCache()
+ isClearingCache.value = false
+}
+</script>
diff --git a/packages/hoppscotch-common/src/components/lenses/renderers/HTMLLensRenderer.vue b/packages/hoppscotch-common/src/components/lenses/renderers/HTMLLensRenderer.vue
index 2d54445c9..9abc0bbd2 100644
--- a/packages/hoppscotch-common/src/components/lenses/renderers/HTMLLensRenderer.vue
+++ b/packages/hoppscotch-common/src/components/lenses/renderers/HTMLLensRenderer.vue
@@ -137,15 +137,15 @@ const { downloadIcon, downloadResponse } = useDownloadResponse(
})
)
const defaultPreview =
- persistenceService.getLocalConfig("lens_html_preview") === "true"
+ (await persistenceService.getLocalConfig("lens_html_preview")) === "true"
const { previewFrame, previewEnabled, togglePreview } = usePreview(
defaultPreview,
responseBodyText
)
-const doTogglePreview = () => {
- persistenceService.setLocalConfig(
+const doTogglePreview = async () => {
+ await persistenceService.setLocalConfig(
"lens_html_preview",
previewEnabled.value ? "false" : "true"
)
diff --git a/packages/hoppscotch-common/src/components/settings/Agent.vue b/packages/hoppscotch-common/src/components/settings/Agent.vue
index c4d8bbee5..886404de0 100644
--- a/packages/hoppscotch-common/src/components/settings/Agent.vue
+++ b/packages/hoppscotch-common/src/components/settings/Agent.vue
@@ -1,106 +1,661 @@
<template>
- <div class="py-4 space-y-4">
- <div class="flex items-center">
- <HoppSmartToggle
- :on="allowSSLVerification"
- @change="allowSSLVerification = !allowSSLVerification"
- />
- {{ t("agent.verify_ssl_certs") }}
- </div>
-
- <div class="flex space-x-4">
- <HoppButtonSecondary
- :icon="IconLucideFileBadge"
- :label="'CA Certificates'"
- outline
- @click="showCACertificatesModal = true"
- />
+ <div class="flex flex-col">
+ <div class="flex items-center space-x-2 py-4">
+ <h2 class="font-semibold flex-1 truncate">{{ selectedDomainDisplay }}</h2>
<HoppButtonSecondary
- :icon="IconLucideFileKey"
- :label="t('agent.client_certs')"
+ v-tippy="{
+ theme: 'tooltip',
+ content: t('settings.manage_domains_overrides'),
+ }"
+ :icon="IconSettings"
outline
- @click="showClientCertificatesModal = true"
+ class="rounded"
+ @click="showDomainModal = true"
/>
</div>
- <InterceptorsAgentModalNativeCACertificates
- :show="showCACertificatesModal"
- @hide-modal="showCACertificatesModal = false"
- />
-
- <InterceptorsAgentModalNativeClientCertificates
- :show="showClientCertificatesModal"
- @hide-modal="showClientCertificatesModal = false"
- />
+ <div class="flex flex-col space-y-4">
+ <div class="flex items-center">
+ <HoppSmartToggle
+ :on="domainSettings[selectedDomain]?.security?.verifyHost"
+ @change="toggleVerifyHost"
+ />
+ {{ t("settings.verify_host") }}
+ </div>
- <div class="pt-4 space-y-4">
<div class="flex items-center">
- <HoppSmartToggle :on="allowProxy" @change="allowProxy = !allowProxy" />
- {{ t("agent.use_http_proxy") }}
+ <HoppSmartToggle
+ :on="domainSettings[selectedDomain]?.security?.verifyPeer"
+ @change="toggleVerifyPeer"
+ />
+ {{ t("settings.verify_peer") }}
</div>
- <HoppSmartInput
- v-if="allowProxy"
- v-model="proxyURL"
- :autofocus="false"
- styles="flex-1"
- placeholder=" "
- :label="t('settings.proxy_url')"
- input-styles="input floating-input"
- />
+ <div class="flex space-x-4">
+ <HoppButtonSecondary
+ :icon="IconFileBadge"
+ :label="t('settings.ca_certificates')"
+ outline
+ @click="showCACertModal = true"
+ />
+ <HoppButtonSecondary
+ :icon="IconFileKey"
+ :label="t('settings.client_certificates')"
+ outline
+ @click="showClientCertModal = true"
+ />
+ </div>
+ <div class="flex items-center">
+ <HoppSmartToggle
+ :on="!!domainSettings[selectedDomain]?.proxy"
+ @change="toggleProxy"
+ />
+ {{ t("settings.proxy") }}
+ </div>
<p class="my-1 text-secondaryLight">
- {{ t("agent.proxy_capabilities") }}
+ {{ t("settings.proxy_capabilities") }}
</p>
+ <div
+ v-if="domainSettings[selectedDomain]?.proxy"
+ class="flex flex-col space-y-2"
+ >
+ <HoppSmartInput
+ :model-value="domainSettings[selectedDomain].proxy.url"
+ :placeholder="' '"
+ :label="t('settings.proxy_url')"
+ input-styles="floating-input !border-0"
+ @update:model-value="updateProxyUrl"
+ />
+ <p class="my-1 text-secondaryLight">
+ {{ t("settings.proxy_auth") }}
+ </p>
+ <div class="flex">
+ <HoppSmartInput
+ :model-value="domainSettings[selectedDomain].proxy.username"
+ :placeholder="' '"
+ :label="t('authorization.username')"
+ input-styles="floating-input !border-0"
+ @update:model-value="updateProxyUsername"
+ />
+ <HoppSmartInput
+ :model-value="domainSettings[selectedDomain].proxy.password"
+ :placeholder="' '"
+ :label="t('authorization.password')"
+ input-styles="floating-input !border-0"
+ :type="showProxyPassword ? 'text' : 'password'"
+ @update:model-value="updateProxyPassword"
+ >
+ <template #button>
+ <HoppButtonSecondary
+ v-tippy="{ theme: 'tooltip' }"
+ :title="
+ showProxyPassword ? t('hide.password') : t('show.password')
+ "
+ :icon="showProxyPassword ? IconEye : IconEyeOff"
+ @click="showProxyPassword = !showProxyPassword"
+ />
+ </template>
+ </HoppSmartInput>
+ </div>
+ </div>
</div>
+
+ <HoppSmartModal
+ v-if="showDomainModal"
+ :title="t('settings.manage_domains_overrides')"
+ @close="showDomainModal = false"
+ >
+ <template #body>
+ <div class="space-y-4 p-4">
+ <div class="flex space-x-2">
+ <HoppSmartInput
+ v-model="newDomain"
+ :placeholder="'example.com'"
+ class="flex-1"
+ />
+ <HoppButtonSecondary
+ v-tippy="{ theme: 'tooltip', content: t('settings.add_domain') }"
+ :icon="IconPlus"
+ outline
+ class="rounded"
+ @click="addDomain"
+ />
+ </div>
+ <div class="space-y-2">
+ <div
+ v-for="domain in domains"
+ :key="domain"
+ class="flex items-center justify-between p-2 rounded opacity-50 hover:bg-primaryLight hover:cursor-pointer hover:opacity-100"
+ :class="{ 'bg-primaryLight': domain === selectedDomain }"
+ @click="selectDomain(domain)"
+ >
+ <span class="py-2.5 truncate max-w-[80%]">{{
+ domain === "*" ? t("settings.global_defaults") : domain
+ }}</span>
+ <HoppButtonSecondary
+ v-if="domain !== '*'"
+ v-tippy="{
+ theme: 'tooltip',
+ content: t('settings.remove_domain'),
+ }"
+ :icon="IconTrash"
+ outline
+ class="rounded"
+ @click.stop="removeDomain(domain)"
+ />
+ </div>
+ </div>
+ </div>
+ </template>
+ </HoppSmartModal>
+
+ <HoppSmartModal
+ v-if="showClientCertModal"
+ dialog
+ :title="t('settings.client_certificates')"
+ @close="showClientCertModal = false"
+ >
+ <template #body>
+ <HoppSmartTabs v-model="certType">
+ <HoppSmartTab id="pem" :label="t('PEM')">
+ <div class="p-4 space-y-4">
+ <div class="flex flex-col space-y-2">
+ <label>{{ t("settings.certificate") }}</label>
+ <HoppButtonSecondary
+ :icon="
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.kind === 'pem' &&
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.cert
+ ? IconFile
+ : IconPlus
+ "
+ :label="
+ (domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.kind === 'pem' &&
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.cert?.name) ||
+ t('settings.select_file')
+ "
+ outline
+ @click="pickPEMCertificate"
+ />
+ </div>
+ <div class="flex flex-col space-y-2">
+ <label>{{ t("settings.key") }}</label>
+ <HoppButtonSecondary
+ :icon="
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.kind === 'pem' &&
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.key
+ ? IconFile
+ : IconPlus
+ "
+ :label="
+ (domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.kind === 'pem' &&
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.key?.name) ||
+ t('settings.select_file')
+ "
+ outline
+ @click="pickPEMKey"
+ />
+ </div>
+ </div>
+ </HoppSmartTab>
+ <HoppSmartTab id="pfx" :label="t('PFX')">
+ <div class="p-4 space-y-4">
+ <div class="flex flex-col space-y-2">
+ <label>{{ t("settings.certificate") }}</label>
+ <HoppButtonSecondary
+ :icon="
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.kind === 'pfx' &&
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.data
+ ? IconFile
+ : IconPlus
+ "
+ :label="
+ (domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.kind === 'pfx' &&
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.data?.name) ||
+ t('settings.select_file')
+ "
+ outline
+ @click="pickPFXCertificate"
+ />
+ </div>
+ <div class="border border-divider rounded">
+ <HoppSmartInput
+ v-model="pfxPassword"
+ type="password"
+ :label="t('settings.password')"
+ input-styles="floating-input !border-0"
+ :placeholder="' '"
+ @update:model-value="updatePFXPassword"
+ />
+ </div>
+ </div>
+ </HoppSmartTab>
+ </HoppSmartTabs>
+ </template>
+ <template #footer>
+ <div class="flex justify-end">
+ <HoppButtonPrimary
+ :label="t('action.done')"
+ :disabled="isClientCertIncomplete"
+ @click="showClientCertModal = false"
+ />
+ <HoppButtonSecondary
+ :label="t('action.clear')"
+ @click="clearClientCerts"
+ />
+ </div>
+ </template>
+ </HoppSmartModal>
+
+ <HoppSmartModal
+ v-if="showCACertModal"
+ dialog
+ :title="t('settings.ca_certificates')"
+ @close="showCACertModal = false"
+ >
+ <template #body>
+ <div class="flex flex-col space-y-4">
+ <ul class="mx-4 border border-divider rounded">
+ <li
+ v-for="(cert, index) in domainSettings[selectedDomain]?.security
+ ?.certificates?.ca"
+ :key="index"
+ class="flex border-dividerDark px-2 items-center justify-between"
+ :class="{ 'border-t border-dividerDark': index !== 0 }"
+ >
+ <div class="truncate">{{ cert.name }}</div>
+ <div class="flex items-center">
+ <HoppButtonSecondary
+ v-tippy="{ theme: 'tooltip' }"
+ :icon="cert.include ? IconCheckCircle : IconCircle"
+ :title="
+ cert.include ? t('action.turn_off') : t('action.turn_on')
+ "
+ color="green"
+ @click="toggleCACertFromStore(index)"
+ />
+ <HoppButtonSecondary
+ v-tippy="{ theme: 'tooltip' }"
+ :icon="IconTrash"
+ :title="t('action.remove')"
+ @click="clearCACert(index)"
+ />
+ </div>
+ </li>
+ </ul>
+
+ <div class="flex flex-col space-y-2 mx-4">
+ <HoppButtonSecondary
+ :icon="IconPlus"
+ :label="t('settings.add_cert_file')"
+ outline
+ @click="pickCACertificate"
+ />
+ </div>
+ <p class="text-center text-secondaryLight">
+ {{ t("settings.ca_certificates_support") }}
+ </p>
+ </div>
+ </template>
+ <template #footer>
+ <div class="flex justify-end">
+ <HoppButtonPrimary
+ :label="t('action.done')"
+ @click="showCACertModal = false"
+ />
+ </div>
+ </template>
+ </HoppSmartModal>
</div>
</template>
<script setup lang="ts">
-import { computed, ref } from "vue"
-import { useI18n } from "@composables/i18n"
-import IconLucideFileKey from "~icons/lucide/file-key"
-import IconLucideFileBadge from "~icons/lucide/file-badge"
+import { ref, reactive, computed, onMounted } from "vue"
import { useService } from "dioc/vue"
-import {
- RequestDef,
- AgentInterceptorService,
-} from "~/platform/std/interceptors/agent"
-import { syncRef } from "@vueuse/core"
+import { useI18n } from "@composables/i18n"
+import { useToast } from "@composables/toast"
+import { useCertificatePicker } from "@composables/picker"
+import { KernelInterceptorAgentStore } from "~/platform/std/kernel-interceptors/agent/store"
-type RequestProxyInfo = RequestDef["proxy"]
+import IconTrash from "~icons/lucide/trash"
+import IconCheckCircle from "~icons/lucide/check-circle"
+import IconCircle from "~icons/lucide/circle"
+import IconFile from "~icons/lucide/file"
+import IconPlus from "~icons/lucide/plus"
+import IconEye from "~icons/lucide/eye"
+import IconEyeOff from "~icons/lucide/eye-off"
+import IconSettings from "~icons/lucide/settings"
+import IconFileKey from "~icons/lucide/file-key"
+import IconFileBadge from "~icons/lucide/file-badge"
const t = useI18n()
+const toast = useToast()
+const store = useService(KernelInterceptorAgentStore)
+
+const maskedAuthKey = ref("")
+
+const selectedDomain = ref("*")
+const domainSettings = reactive<Record<string, any>>({})
+const showDomainModal = ref(false)
+const showProxyPassword = ref(false)
+const newDomain = ref("")
+const domains = ref<string[]>(store.getDomains())
-const agentInterceptorService = useService(AgentInterceptorService)
+const showClientCertModal = ref(false)
+const showCACertModal = ref(false)
+const isClientCertIncomplete = computed(() => {
+ const client =
+ domainSettings[selectedDomain.value]?.security?.certificates?.client
+ if (!client) return false
-const allowSSLVerification = agentInterceptorService.validateCerts
+ return client.kind === "pem"
+ ? !client.cert || !client.key
+ : !client.data || !client.password
+})
+
+const {
+ certType,
+ pfxPassword,
+ pickPEMCertificate,
+ pickPEMKey,
+ pickPFXCertificate,
+ pickCACertificate,
+} = useCertificatePicker({
+ async onPEMCertChange(file) {
+ if (!file) return
-const showCACertificatesModal = ref(false)
-const showClientCertificatesModal = ref(false)
+ const cert = {
+ include: true,
+ name: file.name,
+ size: file.size,
+ lastModified: file.lastModified,
+ content: new Uint8Array(await file.arrayBuffer()),
+ }
-const allowProxy = ref(false)
-const proxyURL = ref("")
+ updateDomainSettings({
+ security: {
+ certificates: {
+ client: {
+ kind: "pem",
+ cert,
+ key: domainSettings[selectedDomain.value]?.security?.certificates
+ ?.client?.key,
+ },
+ },
+ },
+ })
+ },
+ async onPEMKeyChange(file) {
+ if (!file) return
-const proxyInfo = computed<RequestProxyInfo>({
- get() {
- if (allowProxy.value) {
- return {
- url: proxyURL.value,
- }
+ const key = {
+ include: true,
+ name: file.name,
+ size: file.size,
+ lastModified: file.lastModified,
+ content: new Uint8Array(await file.arrayBuffer()),
}
- return undefined
+ updateDomainSettings({
+ security: {
+ certificates: {
+ client: {
+ kind: "pem",
+ key,
+ cert: domainSettings[selectedDomain.value]?.security?.certificates
+ ?.client?.cert,
+ },
+ },
+ },
+ })
},
- set(newData) {
- if (newData) {
- allowProxy.value = true
- proxyURL.value = newData.url
- } else {
- allowProxy.value = false
+ async onPFXChange(file) {
+ if (!file) return
+
+ const data = {
+ include: true,
+ name: file.name,
+ size: file.size,
+ lastModified: file.lastModified,
+ content: new Uint8Array(await file.arrayBuffer()),
}
+
+ updateDomainSettings({
+ security: {
+ certificates: {
+ client: {
+ kind: "pfx",
+ data,
+ password: pfxPassword.value,
+ },
+ },
+ },
+ })
+ },
+ async onCACertAdd(file) {
+ const cert = {
+ include: true,
+ name: file.name,
+ size: file.size,
+ lastModified: file.lastModified,
+ content: new Uint8Array(await file.arrayBuffer()),
+ }
+
+ const currentCerts =
+ domainSettings[selectedDomain.value]?.security?.certificates?.ca || []
+
+ updateDomainSettings({
+ security: {
+ certificates: {
+ ca: [...currentCerts, cert],
+ },
+ },
+ })
},
})
-syncRef(agentInterceptorService.proxyInfo, proxyInfo, { direction: "both" })
+const selectedDomainDisplay = computed(() =>
+ selectedDomain.value === "*"
+ ? t("settings.global_defaults")
+ : selectedDomain.value
+)
+
+function addDomain() {
+ if (newDomain.value) {
+ const domain = newDomain.value.toLowerCase()
+ store.saveDomainSettings(domain, { version: "v1" })
+ domains.value.push(domain)
+ newDomain.value = ""
+ }
+}
+
+function removeDomain(domain: string) {
+ store.clearDomainSettings(domain)
+ domains.value = domains.value.filter((d) => d !== domain)
+ if (selectedDomain.value === domain) {
+ selectedDomain.value = "*"
+ }
+}
+
+function selectDomain(domain: string) {
+ selectedDomain.value = domain
+ if (!domainSettings[domain]) {
+ const settings = store.getDomainSettings(domain)
+ domainSettings[domain] = settings
+ }
+ showDomainModal.value = false
+}
+
+function updateDomainSettings(newSettings: any) {
+ const domain = selectedDomain.value
+ if (!domainSettings[domain]) {
+ domainSettings[domain] = { version: "v1" }
+ }
+
+ const currentSettings = domainSettings[domain]
+
+ domainSettings[domain] = {
+ ...currentSettings,
+ ...newSettings,
+ security: {
+ ...currentSettings?.security,
+ ...newSettings.security,
+ certificates: {
+ ...currentSettings?.security?.certificates,
+ ...newSettings.security?.certificates,
+ },
+ },
+ }
+
+ store.saveDomainSettings(domain, domainSettings[domain])
+}
+
+function toggleVerifyHost() {
+ updateDomainSettings({
+ security: {
+ verifyHost: !domainSettings[selectedDomain.value]?.security?.verifyHost,
+ },
+ })
+}
+
+function toggleVerifyPeer() {
+ updateDomainSettings({
+ security: {
+ verifyPeer: !domainSettings[selectedDomain.value]?.security?.verifyPeer,
+ },
+ })
+}
+
+function toggleProxy() {
+ updateDomainSettings({
+ proxy: domainSettings[selectedDomain.value]?.proxy
+ ? undefined
+ : { url: "" },
+ })
+}
+
+function updateProxyUrl(value: string) {
+ const current = domainSettings[selectedDomain.value]?.proxy
+ updateDomainSettings({
+ proxy: { ...current, url: value },
+ })
+}
+
+function updateProxyUsername(value: string) {
+ const current = domainSettings[selectedDomain.value]?.proxy
+ updateDomainSettings({
+ proxy: {
+ ...current,
+ auth: {
+ ...(current?.auth ?? {}),
+ username: value,
+ },
+ },
+ })
+}
+
+function updateProxyPassword(value: string) {
+ const current = domainSettings[selectedDomain.value]?.proxy
+ updateDomainSettings({
+ proxy: {
+ ...current,
+ auth: {
+ ...(current?.auth ?? {}),
+ password: value,
+ },
+ },
+ })
+}
+
+function updatePFXPassword(value: string) {
+ const currentClient =
+ domainSettings[selectedDomain.value]?.security?.certificates?.client
+ if (currentClient?.kind !== "pfx") return
+
+ updateDomainSettings({
+ security: {
+ certificates: {
+ client: {
+ ...currentClient,
+ password: value,
+ },
+ },
+ },
+ })
+}
+
+function toggleCACertFromStore(index: number) {
+ const currentCerts =
+ domainSettings[selectedDomain.value]?.security?.certificates?.ca || []
+ const newCerts = [...currentCerts]
+ newCerts[index] = {
+ ...newCerts[index],
+ include: !newCerts[index].include,
+ }
+
+ updateDomainSettings({
+ security: {
+ certificates: {
+ ca: newCerts,
+ },
+ },
+ })
+}
+
+function clearCACert(index: number) {
+ const currentCerts =
+ domainSettings[selectedDomain.value]?.security?.certificates?.ca || []
+ const newCerts = [...currentCerts]
+ newCerts.splice(index, 1)
+
+ updateDomainSettings({
+ security: {
+ certificates: {
+ ca: newCerts.length ? newCerts : undefined,
+ },
+ },
+ })
+}
+
+function clearClientCerts() {
+ updateDomainSettings({
+ security: {
+ certificates: {
+ client: undefined,
+ },
+ },
+ })
+}
+
+async function updateMaskedAuthKey() {
+ if (!store.authKey.value) return
+
+ try {
+ const registration = await store.fetchRegistrationInfo()
+ maskedAuthKey.value = registration.auth_key_hash
+ } catch (e) {
+ toast.error(t("settings.registration_fetch_failed"))
+ }
+}
+
+onMounted(async () => {
+ const initialSettings = store.getDomainSettings("*")
+ domainSettings["*"] = initialSettings
+
+ if (store.authKey.value) {
+ await updateMaskedAuthKey()
+ }
+})
</script>
diff --git a/packages/hoppscotch-common/src/components/settings/AgentSubtitle.vue b/packages/hoppscotch-common/src/components/settings/AgentSubtitle.vue
new file mode 100644
index 000000000..5b52abb18
--- /dev/null
+++ b/packages/hoppscotch-common/src/components/settings/AgentSubtitle.vue
@@ -0,0 +1,179 @@
+<template>
+ <div
+ v-if="isSelected"
+ class="flex flex-col items-left my-2 text-secondaryLight"
+ >
+ <div
+ v-if="
+ !store.authKey.value &&
+ (!store.isAgentRunning.value || !hasCheckedAgent)
+ "
+ class="flex flex-1 items-center space-x-2"
+ >
+ <div class="relative flex-1 border border-divider rounded p-2">
+ <span>{{ t("settings.agent_not_running_short") }}</span>
+ </div>
+ <HoppButtonSecondary
+ v-tippy="{ theme: 'tooltip' }"
+ :title="t('action.retry')"
+ :icon="IconRefresh"
+ outline
+ class="rounded"
+ @click="handleAgentCheck"
+ />
+ </div>
+
+ <div
+ v-else-if="!store.authKey.value && !hasInitiatedRegistration"
+ class="flex flex-1 items-center space-x-2"
+ >
+ <div
+ class="relative flex-1 border border-divider rounded p-2 text-accent"
+ >
+ <span>{{ t("settings.agent_running") }}</span>
+ </div>
+ <HoppButtonSecondary
+ v-tippy="{ theme: 'tooltip' }"
+ :title="t('action.register')"
+ :icon="IconPlus"
+ outline
+ class="rounded"
+ @click="initiateRegistration"
+ />
+ </div>
+
+ <div
+ v-else-if="!store.authKey.value"
+ class="flex flex-1 items-center space-x-2"
+ >
+ <HoppSmartInput
+ v-model="registrationOTP"
+ :autofocus="false"
+ :placeholder="' '"
+ :disabled="isRegistering"
+ :label="t('settings.enter_otp')"
+ input-styles="input floating-input"
+ class="flex-1"
+ />
+ <HoppButtonSecondary
+ v-tippy="{ theme: 'tooltip' }"
+ :title="t('action.confirm')"
+ :icon="IconCheck"
+ :loading="isRegistering"
+ outline
+ class="rounded"
+ @click="register"
+ />
+ </div>
+
+ <div v-else class="flex relative flex-1 items-center space-x-2">
+ <label
+ class="text-secondaryLight text-tiny absolute -top-2 left-2 px-1 bg-primary"
+ >{{ t("settings.agent_registered") }}</label
+ >
+ <div
+ class="w-full p-2 border border-dividerLight rounded bg-primary text-secondaryDark cursor-text select-all"
+ >
+ {{ maskedAuthKey }}
+ </div>
+ <HoppButtonSecondary
+ v-tippy="{ theme: 'tooltip' }"
+ :title="t('settings.agent_reset_registration')"
+ :icon="iconClear"
+ outline
+ class="rounded"
+ @click="resetRegistration"
+ />
+ </div>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref, computed, onMounted } from "vue"
+import { refAutoReset } from "@vueuse/core"
+import { useService } from "dioc/vue"
+import { useI18n } from "@composables/i18n"
+import { useToast } from "@composables/toast"
+import { KernelInterceptorAgentStore } from "~/platform/std/kernel-interceptors/agent/store"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
+
+import IconPlus from "~icons/lucide/plus"
+import IconRotateCCW from "~icons/lucide/rotate-ccw"
+import IconCheck from "~icons/lucide/check"
+import IconRefresh from "~icons/lucide/refresh-cw"
+
+const t = useI18n()
+const toast = useToast()
+const store = useService(KernelInterceptorAgentStore)
+const interceptorService = useService(KernelInterceptorService)
+const iconClear = refAutoReset<typeof IconRotateCCW | typeof IconCheck>(
+ IconRotateCCW,
+ 1000
+)
+
+const isSelected = computed(
+ () => interceptorService.current.value?.id === "agent"
+)
+
+const hasInitiatedRegistration = ref(false)
+const maskedAuthKey = ref("")
+const hasCheckedAgent = ref(false)
+const registrationOTP = ref(store.authKey.value ? null : "")
+const isRegistering = ref(false)
+
+async function handleAgentCheck() {
+ try {
+ await store.checkAgentStatus()
+ hasCheckedAgent.value = true
+ if (!store.isAgentRunning.value) {
+ toast.error(t("settings.agent_not_running"))
+ }
+ } catch (e) {
+ hasCheckedAgent.value = false
+ toast.error(t("settings.agent_check_failed"))
+ }
+}
+
+async function initiateRegistration() {
+ try {
+ await store.initiateRegistration()
+ hasInitiatedRegistration.value = true
+ } catch (e) {}
+}
+
+async function register() {
+ if (!registrationOTP.value) return
+ isRegistering.value = true
+ try {
+ await store.verifyRegistration(registrationOTP.value)
+ await updateMaskedAuthKey()
+ toast.success(t("settings.agent_registration_successful"))
+ registrationOTP.value = ""
+ } catch (e) {
+ } finally {
+ isRegistering.value = false
+ }
+}
+
+function resetRegistration() {
+ store.authKey.value = null
+ maskedAuthKey.value = ""
+ registrationOTP.value = ""
+ hasInitiatedRegistration.value = false
+}
+
+async function updateMaskedAuthKey() {
+ if (!store.authKey.value) return
+
+ try {
+ const registration = await store.fetchRegistrationInfo()
+ maskedAuthKey.value = registration.auth_key_hash
+ } catch (e) {}
+}
+
+onMounted(async () => {
+ if (store.authKey.value) {
+ await updateMaskedAuthKey()
+ }
+})
+</script>
diff --git a/packages/hoppscotch-common/src/components/settings/Extension.vue b/packages/hoppscotch-common/src/components/settings/Extension.vue
index b136854eb..742eea264 100644
--- a/packages/hoppscotch-common/src/components/settings/Extension.vue
+++ b/packages/hoppscotch-common/src/components/settings/Extension.vue
@@ -12,29 +12,25 @@
{{ t("settings.extension_ver_not_reported") }}
</span>
</div>
- <div class="flex flex-col space-y-2 py-4">
- <span>
- <HoppSmartItem
- to="https://chrome.google.com/webstore/detail/hoppscotch-browser-extens/amknoiejhlmhancpahfcfcfhllgkpbld"
- blank
- :icon="IconChrome"
- label="Chrome"
- :info-icon="hasChromeExtInstalled ? IconCheckCircle : null"
- :active-info-icon="hasChromeExtInstalled"
- outline
- />
- </span>
- <span>
- <HoppSmartItem
- to="https://addons.mozilla.org/en-US/firefox/addon/hoppscotch"
- blank
- :icon="IconFirefox"
- label="Firefox"
- :info-icon="hasFirefoxExtInstalled ? IconCheckCircle : null"
- :active-info-icon="hasFirefoxExtInstalled"
- outline
- />
- </span>
+ <div class="flex gap-2 py-2 w-fit">
+ <HoppSmartItem
+ to="https://chrome.google.com/webstore/detail/hoppscotch-browser-extens/amknoiejhlmhancpahfcfcfhllgkpbld"
+ blank
+ :icon="IconChrome"
+ label="Chrome"
+ :info-icon="hasChromeExtInstalled ? IconCheckCircle : undefined"
+ :active-info-icon="hasChromeExtInstalled"
+ outline
+ />
+ <HoppSmartItem
+ to="https://addons.mozilla.org/en-US/firefox/addon/hoppscotch"
+ blank
+ :icon="IconFirefox"
+ label="Firefox"
+ :info-icon="hasFirefoxExtInstalled ? IconCheckCircle : undefined"
+ :active-info-icon="hasFirefoxExtInstalled"
+ outline
+ />
</div>
</template>
diff --git a/packages/hoppscotch-common/src/components/settings/ExtensionSubtitle.vue b/packages/hoppscotch-common/src/components/settings/ExtensionSubtitle.vue
new file mode 100644
index 000000000..ac211eb8e
--- /dev/null
+++ b/packages/hoppscotch-common/src/components/settings/ExtensionSubtitle.vue
@@ -0,0 +1,64 @@
+<template>
+ <div
+ v-if="isSelected && isNotAvailable"
+ class="flex flex-col items-left my-2 text-secondaryLight"
+ >
+ <div class="text-secondaryLight">
+ <span v-if="O.isSome(extensionVersion)">
+ {{
+ `${t("settings.extension_version")}: v${extensionVersion.value.major}.${
+ extensionVersion.value.minor
+ }`
+ }}
+ </span>
+ <span v-else>
+ {{ t("settings.extension_version") }}:
+ {{ t("settings.extension_ver_not_reported") }}
+ </span>
+ </div>
+ <div class="flex gap-2 py-2 w-fit">
+ <HoppSmartItem
+ to="https://chrome.google.com/webstore/detail/hoppscotch-browser-extens/amknoiejhlmhancpahfcfcfhllgkpbld"
+ blank
+ :icon="IconChrome"
+ label="Chrome"
+ outline
+ class="w-28"
+ />
+ <HoppSmartItem
+ to="https://addons.mozilla.org/en-US/firefox/addon/hoppscotch"
+ blank
+ :icon="IconFirefox"
+ label="Firefox"
+ outline
+ class="w-28"
+ />
+ </div>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { computed } from "vue"
+import { useService } from "dioc/vue"
+import * as O from "fp-ts/Option"
+import { useI18n } from "@composables/i18n"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
+import { KernelInterceptorExtensionStore } from "~/platform/std/kernel-interceptors/extension/store"
+
+import IconChrome from "~icons/brands/chrome"
+import IconFirefox from "~icons/brands/firefox"
+
+const t = useI18n()
+const store = useService(KernelInterceptorExtensionStore)
+const interceptorService = useService(KernelInterceptorService)
+
+const isSelected = computed(
+ () => interceptorService.current.value?.id === "extension"
+)
+
+const isNotAvailable = computed(
+ () => store.getExtensionStatus() !== "available"
+)
+
+const extensionVersion = computed(() => store.getExtensionVersion())
+</script>
diff --git a/packages/hoppscotch-common/src/components/settings/Native.vue b/packages/hoppscotch-common/src/components/settings/Native.vue
new file mode 100644
index 000000000..2c266d4fe
--- /dev/null
+++ b/packages/hoppscotch-common/src/components/settings/Native.vue
@@ -0,0 +1,642 @@
+<template>
+ <div class="flex flex-col">
+ <div class="flex items-center space-x-2 py-4">
+ <h2 class="font-semibold flex-1 truncate">{{ selectedDomainDisplay }}</h2>
+ <HoppButtonSecondary
+ v-tippy="{
+ theme: 'tooltip',
+ content: t('settings.manage_domains_overrides'),
+ }"
+ :icon="IconSettings"
+ outline
+ class="rounded"
+ @click="showDomainModal = true"
+ />
+ </div>
+
+ <div class="flex flex-col space-y-4">
+ <div class="flex items-center">
+ <HoppSmartToggle
+ :on="domainSettings[selectedDomain]?.security?.verifyHost"
+ @change="toggleVerifyHost"
+ />
+ {{ t("settings.verify_host") }}
+ </div>
+
+ <div class="flex items-center">
+ <HoppSmartToggle
+ :on="domainSettings[selectedDomain]?.security?.verifyPeer"
+ @change="toggleVerifyPeer"
+ />
+ {{ t("settings.verify_peer") }}
+ </div>
+
+ <div class="flex space-x-4">
+ <HoppButtonSecondary
+ :icon="IconFileBadge"
+ :label="t('settings.ca_certificates')"
+ outline
+ @click="showCACertModal = true"
+ />
+ <HoppButtonSecondary
+ :icon="IconFileKey"
+ :label="t('settings.client_certificates')"
+ outline
+ @click="showClientCertModal = true"
+ />
+ </div>
+
+ <div class="flex items-center">
+ <HoppSmartToggle
+ :on="!!domainSettings[selectedDomain]?.proxy"
+ @change="toggleProxy"
+ />
+ {{ t("settings.proxy") }}
+ </div>
+ <p class="my-1 text-secondaryLight">
+ {{ t("settings.proxy_capabilities") }}
+ </p>
+ <div
+ v-if="domainSettings[selectedDomain]?.proxy"
+ class="flex flex-col space-y-2"
+ >
+ <HoppSmartInput
+ :model-value="domainSettings[selectedDomain].proxy.url"
+ :placeholder="' '"
+ :label="t('settings.proxy_url')"
+ input-styles="floating-input !border-0"
+ @update:model-value="updateProxyUrl"
+ />
+ <p class="my-1 text-secondaryLight">
+ {{ t("settings.proxy_auth") }}
+ </p>
+ <div class="flex">
+ <HoppSmartInput
+ :model-value="domainSettings[selectedDomain].proxy.username"
+ :placeholder="' '"
+ :label="t('authorization.username')"
+ input-styles="floating-input !border-0"
+ @update:model-value="updateProxyUsername"
+ />
+ <HoppSmartInput
+ :model-value="domainSettings[selectedDomain].proxy.password"
+ :placeholder="' '"
+ :label="t('authorization.password')"
+ input-styles="floating-input !border-0"
+ :type="showProxyPassword ? 'text' : 'password'"
+ @update:model-value="updateProxyPassword"
+ >
+ <template #button>
+ <HoppButtonSecondary
+ v-tippy="{ theme: 'tooltip' }"
+ :title="
+ showProxyPassword ? t('hide.password') : t('show.password')
+ "
+ :icon="showProxyPassword ? IconEye : IconEyeOff"
+ @click="showProxyPassword = !showProxyPassword"
+ />
+ </template>
+ </HoppSmartInput>
+ </div>
+ </div>
+ </div>
+
+ <HoppSmartModal
+ v-if="showDomainModal"
+ :title="t('settings.manage_domains_overrides')"
+ @close="showDomainModal = false"
+ >
+ <template #body>
+ <div class="space-y-4 p-4">
+ <div class="flex space-x-2">
+ <HoppSmartInput
+ v-model="newDomain"
+ :placeholder="'example.com'"
+ class="flex-1"
+ />
+ <HoppButtonSecondary
+ v-tippy="{ theme: 'tooltip', content: t('settings.add_domain') }"
+ :icon="IconPlus"
+ outline
+ class="rounded"
+ @click="addDomain"
+ />
+ </div>
+ <div class="space-y-2">
+ <div
+ v-for="domain in domains"
+ :key="domain"
+ class="flex items-center justify-between p-2 rounded opacity-50 hover:bg-primaryLight hover:cursor-pointer hover:opacity-100"
+ :class="{ 'bg-primaryLight': domain === selectedDomain }"
+ @click="selectDomain(domain)"
+ >
+ <span class="py-2.5 truncate max-w-[80%]">{{
+ domain === "*" ? t("settings.global_defaults") : domain
+ }}</span>
+ <HoppButtonSecondary
+ v-if="domain !== '*'"
+ v-tippy="{
+ theme: 'tooltip',
+ content: t('settings.remove_domain'),
+ }"
+ :icon="IconTrash"
+ outline
+ class="rounded"
+ @click.stop="removeDomain(domain)"
+ />
+ </div>
+ </div>
+ </div>
+ </template>
+ </HoppSmartModal>
+
+ <HoppSmartModal
+ v-if="showClientCertModal"
+ dialog
+ :title="t('settings.client_certificates')"
+ @close="showClientCertModal = false"
+ >
+ <template #body>
+ <HoppSmartTabs v-model="certType">
+ <HoppSmartTab id="pem" :label="t('PEM')">
+ <div class="p-4 space-y-4">
+ <div class="flex flex-col space-y-2">
+ <label>{{ t("settings.certificate") }}</label>
+ <HoppButtonSecondary
+ :icon="
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.kind === 'pem' &&
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.cert
+ ? IconFile
+ : IconPlus
+ "
+ :label="
+ (domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.kind === 'pem' &&
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.cert?.name) ||
+ t('settings.select_file')
+ "
+ outline
+ @click="pickPEMCertificate"
+ />
+ </div>
+ <div class="flex flex-col space-y-2">
+ <label>{{ t("settings.key") }}</label>
+ <HoppButtonSecondary
+ :icon="
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.kind === 'pem' &&
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.key
+ ? IconFile
+ : IconPlus
+ "
+ :label="
+ (domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.kind === 'pem' &&
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.key?.name) ||
+ t('settings.select_file')
+ "
+ outline
+ @click="pickPEMKey"
+ />
+ </div>
+ </div>
+ </HoppSmartTab>
+ <HoppSmartTab id="pfx" :label="t('PFX')">
+ <div class="p-4 space-y-4">
+ <div class="flex flex-col space-y-2">
+ <label>{{ t("settings.certificate") }}</label>
+ <HoppButtonSecondary
+ :icon="
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.kind === 'pfx' &&
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.data
+ ? IconFile
+ : IconPlus
+ "
+ :label="
+ (domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.kind === 'pfx' &&
+ domainSettings[selectedDomain]?.security?.certificates
+ ?.client?.data?.name) ||
+ t('settings.select_file')
+ "
+ outline
+ @click="pickPFXCertificate"
+ />
+ </div>
+ <div class="border border-divider rounded">
+ <HoppSmartInput
+ v-model="pfxPassword"
+ type="password"
+ :label="t('settings.password')"
+ input-styles="floating-input !border-0"
+ :placeholder="' '"
+ @update:model-value="updatePFXPassword"
+ />
+ </div>
+ </div>
+ </HoppSmartTab>
+ </HoppSmartTabs>
+ </template>
+ <template #footer>
+ <div class="flex justify-end">
+ <HoppButtonPrimary
+ :label="t('action.done')"
+ :disabled="isClientCertIncomplete"
+ @click="showClientCertModal = false"
+ />
+ <HoppButtonSecondary
+ :label="t('action.clear')"
+ @click="clearClientCerts"
+ />
+ </div>
+ </template>
+ </HoppSmartModal>
+
+ <HoppSmartModal
+ v-if="showCACertModal"
+ dialog
+ :title="t('settings.ca_certificates')"
+ @close="showCACertModal = false"
+ >
+ <template #body>
+ <div class="flex flex-col space-y-4">
+ <ul class="mx-4 border border-divider rounded">
+ <li
+ v-for="(cert, index) in domainSettings[selectedDomain]?.security
+ ?.certificates?.ca"
+ :key="index"
+ class="flex border-dividerDark px-2 items-center justify-between"
+ :class="{ 'border-t border-dividerDark': index !== 0 }"
+ >
+ <div class="truncate">{{ cert.name }}</div>
+ <div class="flex items-center">
+ <HoppButtonSecondary
+ v-tippy="{ theme: 'tooltip' }"
+ :icon="cert.include ? IconCheckCircle : IconCircle"
+ :title="
+ cert.include ? t('action.turn_off') : t('action.turn_on')
+ "
+ color="green"
+ @click="toggleCACertFromStore(index)"
+ />
+ <HoppButtonSecondary
+ v-tippy="{ theme: 'tooltip' }"
+ :icon="IconTrash"
+ :title="t('action.remove')"
+ @click="clearCACert(index)"
+ />
+ </div>
+ </li>
+ </ul>
+
+ <div class="flex flex-col space-y-2 mx-4">
+ <HoppButtonSecondary
+ :icon="IconPlus"
+ :label="t('settings.add_cert_file')"
+ outline
+ @click="pickCACertificate"
+ />
+ </div>
+ <p class="text-center text-secondaryLight">
+ {{ t("settings.ca_certificates_support") }}
+ </p>
+ </div>
+ </template>
+ <template #footer>
+ <div class="flex justify-end">
+ <HoppButtonPrimary
+ :label="t('action.done')"
+ @click="showCACertModal = false"
+ />
+ </div>
+ </template>
+ </HoppSmartModal>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref, reactive, computed, onMounted } from "vue"
+import { useService } from "dioc/vue"
+import { useI18n } from "@composables/i18n"
+import { useCertificatePicker } from "@composables/picker"
+import { KernelInterceptorNativeStore } from "~/platform/std/kernel-interceptors/native/store"
+
+import IconTrash from "~icons/lucide/trash"
+import IconCheckCircle from "~icons/lucide/check-circle"
+import IconCircle from "~icons/lucide/circle"
+import IconFile from "~icons/lucide/file"
+import IconPlus from "~icons/lucide/plus"
+import IconEye from "~icons/lucide/eye"
+import IconEyeOff from "~icons/lucide/eye-off"
+import IconSettings from "~icons/lucide/settings"
+import IconFileKey from "~icons/lucide/file-key"
+import IconFileBadge from "~icons/lucide/file-badge"
+
+const t = useI18n()
+const store = useService(KernelInterceptorNativeStore)
+
+const selectedDomain = ref("*")
+const domainSettings = reactive<Record<string, any>>({})
+const showDomainModal = ref(false)
+const showProxyPassword = ref(false)
+const newDomain = ref("")
+const domains = ref<string[]>(store.getDomains())
+
+const showClientCertModal = ref(false)
+const showCACertModal = ref(false)
+const isClientCertIncomplete = computed(() => {
+ const client =
+ domainSettings[selectedDomain.value]?.security?.certificates?.client
+ if (!client) return false
+
+ return client.kind === "pem"
+ ? !client.cert || !client.key
+ : !client.data || !client.password
+})
+
+const {
+ certType,
+ pfxPassword,
+ pickPEMCertificate,
+ pickPEMKey,
+ pickPFXCertificate,
+ pickCACertificate,
+} = useCertificatePicker({
+ async onPEMCertChange(file) {
+ if (!file) return
+
+ const cert = {
+ include: true,
+ name: file.name,
+ size: file.size,
+ lastModified: file.lastModified,
+ content: new Uint8Array(await file.arrayBuffer()),
+ }
+
+ updateDomainSettings({
+ security: {
+ certificates: {
+ client: {
+ kind: "pem",
+ cert,
+ key: domainSettings[selectedDomain.value]?.security?.certificates
+ ?.client?.key,
+ },
+ },
+ },
+ })
+ },
+ async onPEMKeyChange(file) {
+ if (!file) return
+
+ const key = {
+ include: true,
+ name: file.name,
+ size: file.size,
+ lastModified: file.lastModified,
+ content: new Uint8Array(await file.arrayBuffer()),
+ }
+
+ updateDomainSettings({
+ security: {
+ certificates: {
+ client: {
+ kind: "pem",
+ key,
+ cert: domainSettings[selectedDomain.value]?.security?.certificates
+ ?.client?.cert,
+ },
+ },
+ },
+ })
+ },
+ async onPFXChange(file) {
+ if (!file) return
+
+ const data = {
+ include: true,
+ name: file.name,
+ size: file.size,
+ lastModified: file.lastModified,
+ content: new Uint8Array(await file.arrayBuffer()),
+ }
+
+ updateDomainSettings({
+ security: {
+ certificates: {
+ client: {
+ kind: "pfx",
+ data,
+ password: pfxPassword.value,
+ },
+ },
+ },
+ })
+ },
+ async onCACertAdd(file) {
+ const cert = {
+ include: true,
+ name: file.name,
+ size: file.size,
+ lastModified: file.lastModified,
+ content: new Uint8Array(await file.arrayBuffer()),
+ }
+
+ const currentCerts =
+ domainSettings[selectedDomain.value]?.security?.certificates?.ca || []
+
+ updateDomainSettings({
+ security: {
+ certificates: {
+ ca: [...currentCerts, cert],
+ },
+ },
+ })
+ },
+})
+
+const selectedDomainDisplay = computed(() =>
+ selectedDomain.value === "*"
+ ? t("settings.global_defaults")
+ : selectedDomain.value
+)
+
+function addDomain() {
+ if (newDomain.value) {
+ const domain = newDomain.value.toLowerCase()
+ store.saveDomainSettings(domain, { version: "v1" })
+ domains.value.push(domain)
+ newDomain.value = ""
+ }
+}
+
+function removeDomain(domain: string) {
+ store.clearDomainSettings(domain)
+ domains.value = domains.value.filter((d) => d !== domain)
+ if (selectedDomain.value === domain) {
+ selectedDomain.value = "*"
+ }
+}
+
+function selectDomain(domain: string) {
+ selectedDomain.value = domain
+ if (!domainSettings[domain]) {
+ const settings = store.getDomainSettings(domain)
+ domainSettings[domain] = settings
+ }
+ showDomainModal.value = false
+}
+
+function updateDomainSettings(newSettings: any) {
+ const domain = selectedDomain.value
+ if (!domainSettings[domain]) {
+ domainSettings[domain] = { version: "v1" }
+ }
+
+ const currentSettings = domainSettings[domain]
+
+ domainSettings[domain] = {
+ ...currentSettings,
+ ...newSettings,
+ security: {
+ ...currentSettings?.security,
+ ...newSettings.security,
+ certificates: {
+ ...currentSettings?.security?.certificates,
+ ...newSettings.security?.certificates,
+ },
+ },
+ }
+
+ store.saveDomainSettings(domain, domainSettings[domain])
+}
+
+function toggleVerifyHost() {
+ updateDomainSettings({
+ security: {
+ verifyHost: !domainSettings[selectedDomain.value]?.security?.verifyHost,
+ },
+ })
+}
+
+function toggleVerifyPeer() {
+ updateDomainSettings({
+ security: {
+ verifyPeer: !domainSettings[selectedDomain.value]?.security?.verifyPeer,
+ },
+ })
+}
+
+function toggleProxy() {
+ updateDomainSettings({
+ proxy: domainSettings[selectedDomain.value]?.proxy
+ ? undefined
+ : { url: "" },
+ })
+}
+
+function updateProxyUrl(value: string) {
+ const current = domainSettings[selectedDomain.value]?.proxy
+ updateDomainSettings({
+ proxy: { ...current, url: value },
+ })
+}
+
+function updateProxyUsername(value: string) {
+ const current = domainSettings[selectedDomain.value]?.proxy
+ updateDomainSettings({
+ proxy: {
+ ...current,
+ auth: {
+ ...(current?.auth ?? {}),
+ username: value,
+ },
+ },
+ })
+}
+
+function updateProxyPassword(value: string) {
+ const current = domainSettings[selectedDomain.value]?.proxy
+ updateDomainSettings({
+ proxy: {
+ ...current,
+ auth: {
+ ...(current?.auth ?? {}),
+ password: value,
+ },
+ },
+ })
+}
+
+function updatePFXPassword(value: string) {
+ const currentClient =
+ domainSettings[selectedDomain.value]?.security?.certificates?.client
+ if (currentClient?.kind !== "pfx") return
+
+ updateDomainSettings({
+ security: {
+ certificates: {
+ client: {
+ ...currentClient,
+ password: value,
+ },
+ },
+ },
+ })
+}
+
+function toggleCACertFromStore(index: number) {
+ const currentCerts =
+ domainSettings[selectedDomain.value]?.security?.certificates?.ca || []
+ const newCerts = [...currentCerts]
+ newCerts[index] = {
+ ...newCerts[index],
+ include: !newCerts[index].include,
+ }
+
+ updateDomainSettings({
+ security: {
+ certificates: {
+ ca: newCerts,
+ },
+ },
+ })
+}
+
+function clearCACert(index: number) {
+ const currentCerts =
+ domainSettings[selectedDomain.value]?.security?.certificates?.ca || []
+ const newCerts = [...currentCerts]
+ newCerts.splice(index, 1)
+
+ updateDomainSettings({
+ security: {
+ certificates: {
+ ca: newCerts.length ? newCerts : undefined,
+ },
+ },
+ })
+}
+
+function clearClientCerts() {
+ updateDomainSettings({
+ security: {
+ certificates: {
+ client: undefined,
+ },
+ },
+ })
+}
+
+onMounted(() => {
+ const initialSettings = store.getDomainSettings("*")
+ domainSettings["*"] = initialSettings
+})
+</script>
diff --git a/packages/hoppscotch-common/src/components/settings/Proxy.vue b/packages/hoppscotch-common/src/components/settings/Proxy.vue
index a0de5a4cf..6c136ea5f 100644
--- a/packages/hoppscotch-common/src/components/settings/Proxy.vue
+++ b/packages/hoppscotch-common/src/components/settings/Proxy.vue
@@ -10,13 +10,14 @@
</div>
<div class="flex items-center space-x-2 py-4">
<HoppSmartInput
- v-model="PROXY_URL"
+ v-model="proxyUrl"
:autofocus="false"
styles="flex-1"
- placeholder=" "
+ :placeholder="' '"
:label="t('settings.proxy_url')"
input-styles="input floating-input"
- :disabled="!proxyEnabled"
+ :disabled="!enabled"
+ @change="updateProxyUrl"
/>
<HoppButtonSecondary
v-tippy="{ theme: 'tooltip' }"
@@ -24,50 +25,61 @@
:icon="clearIcon"
outline
class="rounded"
- @click="resetProxy"
+ @click="resetSettings"
/>
</div>
</template>
<script setup lang="ts">
+import { ref, onMounted, computed, watch } from "vue"
import { refAutoReset } from "@vueuse/core"
+
+import { useService } from "dioc/vue"
+
import { useI18n } from "~/composables/i18n"
-import { useSetting } from "~/composables/settings"
-import IconRotateCCW from "~icons/lucide/rotate-ccw"
-import IconCheck from "~icons/lucide/check"
import { useToast } from "~/composables/toast"
-import { computed, watch } from "vue"
-import { useService } from "dioc/vue"
-import { InterceptorService } from "~/services/interceptor.service"
-import { proxyInterceptor } from "~/platform/std/interceptors/proxy"
import { useReadonlyStream } from "~/composables/stream"
-import { platform } from "~/platform"
import { getDefaultProxyUrl } from "~/helpers/proxyUrl"
+import { platform } from "~/platform"
+
+import { KernelInterceptorProxyStore } from "~/platform/std/kernel-interceptors/proxy/store"
+import { ProxyKernelInterceptorService } from "~/platform/std/kernel-interceptors/proxy/index"
+
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
+
+import IconRotateCCW from "~icons/lucide/rotate-ccw"
+import IconCheck from "~icons/lucide/check"
const t = useI18n()
const toast = useToast()
-const interceptorService = useService(InterceptorService)
+const store = useService(KernelInterceptorProxyStore)
+const interceptorService = useService(KernelInterceptorService)
+const proxyInterceptorService = useService(ProxyKernelInterceptorService)
-const PROXY_URL = useSetting("PROXY_URL")
+const proxyUrl = ref("")
const currentUser = useReadonlyStream(
platform.auth.getCurrentUserStream(),
platform.auth.getCurrentUser()
)
+async function updateProxyUrl() {
+ await store.updateSettings({ proxyUrl: proxyUrl.value })
+ toast.success(t("state.saved"))
+}
+
watch(
() => currentUser.value,
async () => {
if (!currentUser.value) {
- PROXY_URL.value = await getDefaultProxyUrl()
+ proxyUrl.value = await getDefaultProxyUrl()
}
}
)
-const proxyEnabled = computed(
- () =>
- interceptorService.currentInterceptorID.value ===
- proxyInterceptor.interceptorID
+
+const enabled = computed(
+ () => interceptorService.getCurrentId() === proxyInterceptorService.id
)
const clearIcon = refAutoReset<typeof IconRotateCCW | typeof IconCheck>(
@@ -75,9 +87,16 @@ const clearIcon = refAutoReset<typeof IconRotateCCW | typeof IconCheck>(
1000
)
-const resetProxy = async () => {
- PROXY_URL.value = await getDefaultProxyUrl()
+async function resetSettings() {
+ await store.resetSettings()
+ const settings = store.getSettings()
+ proxyUrl.value = settings.proxyUrl
clearIcon.value = IconCheck
- toast.success(`${t("state.cleared")}`)
+ toast.success(t("state.cleared"))
}
+
+onMounted(async () => {
+ const settings = store.getSettings()
+ proxyUrl.value = settings.proxyUrl
+})
</script>
diff --git a/packages/hoppscotch-common/src/composables/lens-actions.ts b/packages/hoppscotch-common/src/composables/lens-actions.ts
index 5d56dcacc..6af3d9e0e 100644
--- a/packages/hoppscotch-common/src/composables/lens-actions.ts
+++ b/packages/hoppscotch-common/src/composables/lens-actions.ts
@@ -68,7 +68,7 @@ export function useDownloadResponse(
const dataToWrite = responseBody.value
// TODO: Look at the mime type and determine extension ?
- const result = await platform.io.saveFileWithDialog({
+ const result = await platform.kernelIO.saveFileWithDialog({
data: dataToWrite,
contentType: contentType,
suggestedFilename: filename,
diff --git a/packages/hoppscotch-common/src/composables/picker.ts b/packages/hoppscotch-common/src/composables/picker.ts
new file mode 100644
index 000000000..690fb7da5
--- /dev/null
+++ b/packages/hoppscotch-common/src/composables/picker.ts
@@ -0,0 +1,138 @@
+import { ref, reactive, computed } from "vue"
+import { useFileDialog } from "@vueuse/core"
+
+export interface CertFiles {
+ pem_cert: File | null
+ pem_key: File | null
+ pfx: File | null
+ ca: File[]
+}
+
+export interface CertPickerOptions {
+ onPEMCertChange?: (file: File | null) => void
+ onPEMKeyChange?: (file: File | null) => void
+ onPFXChange?: (file: File | null) => void
+ onCACertAdd?: (file: File) => void
+ onCACertRemove?: (index: number) => void
+}
+
+export function useCertificatePicker(options: CertPickerOptions = {}) {
+ const certFiles = reactive<CertFiles>({
+ pem_cert: null,
+ pem_key: null,
+ pfx: null,
+ ca: [],
+ })
+
+ const certType = ref<"pem" | "pfx">("pem")
+ const pfxPassword = ref("")
+
+ const pemCertPicker = useFileDialog({
+ accept: ".pem,.crt",
+ reset: true,
+ multiple: false,
+ })
+
+ const pemKeyPicker = useFileDialog({
+ accept: ".pem,.key",
+ reset: true,
+ multiple: false,
+ })
+
+ const pfxPicker = useFileDialog({
+ accept: ".pfx,.p12",
+ reset: true,
+ multiple: false,
+ })
+
+ const caCertPicker = useFileDialog({
+ accept: ".pem,.crt",
+ reset: true,
+ multiple: false,
+ })
+
+ function pickPEMCertificate() {
+ pemCertPicker.onChange((files) => {
+ const selectedFile = files?.item(0)
+ if (selectedFile) {
+ certFiles.pem_cert = selectedFile
+ certFiles.pfx = null
+ options.onPEMCertChange?.(selectedFile)
+ }
+ pemCertPicker.reset()
+ })
+ pemCertPicker.open()
+ }
+
+ function pickPEMKey() {
+ pemKeyPicker.onChange((files) => {
+ const selectedFile = files?.item(0)
+ if (selectedFile) {
+ certFiles.pem_key = selectedFile
+ certFiles.pfx = null
+ options.onPEMKeyChange?.(selectedFile)
+ }
+ pemKeyPicker.reset()
+ })
+ pemKeyPicker.open()
+ }
+
+ function pickPFXCertificate() {
+ pfxPicker.onChange((files) => {
+ const selectedFile = files?.item(0)
+ if (selectedFile) {
+ certFiles.pfx = selectedFile
+ certFiles.pem_cert = null
+ certFiles.pem_key = null
+ options.onPFXChange?.(selectedFile)
+ }
+ pfxPicker.reset()
+ })
+ pfxPicker.open()
+ }
+
+ function pickCACertificate() {
+ caCertPicker.onChange((files) => {
+ const selectedFile = files?.item(0)
+ if (selectedFile) {
+ certFiles.ca.push(selectedFile)
+ options.onCACertAdd?.(selectedFile)
+ }
+ caCertPicker.reset()
+ })
+ caCertPicker.open()
+ }
+
+ function removeCACertificate(index: number) {
+ certFiles.ca.splice(index, 1)
+ options.onCACertRemove?.(index)
+ }
+
+ function reset() {
+ certFiles.pem_cert = null
+ certFiles.pem_key = null
+ certFiles.pfx = null
+ certFiles.ca = []
+ pfxPassword.value = ""
+ certType.value = "pem"
+ }
+
+ const isValidCertConfig = computed(() =>
+ certType.value === "pem"
+ ? !!(certFiles.pem_cert && certFiles.pem_key)
+ : !!(certFiles.pfx && pfxPassword.value)
+ )
+
+ return {
+ certFiles,
+ certType,
+ pfxPassword,
+ pickPEMCertificate,
+ pickPEMKey,
+ pickPFXCertificate,
+ pickCACertificate,
+ removeCACertificate,
+ reset,
+ isValidCertConfig,
+ }
+}
diff --git a/packages/hoppscotch-common/src/composables/whats-new.ts b/packages/hoppscotch-common/src/composables/whats-new.ts
index 36d147097..547cd708a 100644
--- a/packages/hoppscotch-common/src/composables/whats-new.ts
+++ b/packages/hoppscotch-common/src/composables/whats-new.ts
@@ -5,14 +5,18 @@ import { getService } from "~/modules/dioc"
import { PersistenceService } from "~/services/persistence"
import { version as hoppscotchCommonPkgVersion } from "./../../package.json"
-export function useWhatsNewDialog() {
+export async function useWhatsNewDialog() {
const persistenceService = getService(PersistenceService)
- const versionFromLocalStorage = persistenceService.getLocalConfig("hopp_v")
+ const versionFromLocalStorage =
+ await persistenceService.getLocalConfig("hopp_v")
// Set new entry `hopp_v` under `localStorage` if not present
if (!versionFromLocalStorage) {
- persistenceService.setLocalConfig("hopp_v", hoppscotchCommonPkgVersion)
+ await persistenceService.setLocalConfig(
+ "hopp_v",
+ hoppscotchCommonPkgVersion
+ )
return
}
@@ -53,7 +57,7 @@ export function useWhatsNewDialog() {
}, 10000)
}
- persistenceService.setLocalConfig("hopp_v", hoppscotchCommonPkgVersion)
+ await persistenceService.setLocalConfig("hopp_v", hoppscotchCommonPkgVersion)
}
async function getReleaseNotes(v: string): Promise<string | undefined> {
diff --git a/packages/hoppscotch-common/src/helpers/RequestRunner.ts b/packages/hoppscotch-common/src/helpers/RequestRunner.ts
index 4f9f4f95e..66ea291e3 100644
--- a/packages/hoppscotch-common/src/helpers/RequestRunner.ts
+++ b/packages/hoppscotch-common/src/helpers/RequestRunner.ts
@@ -261,9 +261,8 @@ export function runRESTRequest$(
variables: finalEnvsWithNonEmptyValues,
})
- const [stream, cancelRun] = createRESTNetworkRequestStream(
- await effectiveRequest
- )
+ const [stream, cancelRun] =
+ await createRESTNetworkRequestStream(effectiveRequest)
cancelFunc = cancelRun
const subscription = stream
diff --git a/packages/hoppscotch-common/src/helpers/actions.ts b/packages/hoppscotch-common/src/helpers/actions.ts
index 10d4a38d7..c6887a1b4 100644
--- a/packages/hoppscotch-common/src/helpers/actions.ts
+++ b/packages/hoppscotch-common/src/helpers/actions.ts
@@ -67,6 +67,7 @@ export type HoppAction =
| "response.save" // Save response
| "response.save-as-example" // Save response as example
| "modals.login.toggle" // Login to Hoppscotch
+ | "modals.instance-switcher.toggle" // Switch Hoppscotch instances (self-hosted)
| "history.clear" // Clear REST History
| "user.login" // Login to Hoppscotch
| "user.logout" // Log out of Hoppscotch
diff --git a/packages/hoppscotch-common/src/helpers/auth/digest.ts b/packages/hoppscotch-common/src/helpers/auth/digest.ts
index c74f92d71..a61b1c035 100644
--- a/packages/hoppscotch-common/src/helpers/auth/digest.ts
+++ b/packages/hoppscotch-common/src/helpers/auth/digest.ts
@@ -3,7 +3,7 @@ import { md5 } from "js-md5"
import { getService } from "~/modules/dioc"
import { getI18n } from "~/modules/i18n"
-import { InterceptorService } from "~/services/interceptor.service"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
export interface DigestAuthParams {
username: string
@@ -85,11 +85,15 @@ export async function fetchInitialDigestAuthInfo(
const t = getI18n()
try {
- const service = getService(InterceptorService)
- const initialResponse = await service.runRequest({
+ const interceptorService = getService(KernelInterceptorService)
+ const exec = await interceptorService.execute({
+ id: Date.now(),
url,
method,
- }).response
+ version: "HTTP/1.1",
+ })
+
+ const initialResponse = await exec.response
if (E.isLeft(initialResponse)) {
const initialFetchFailureReason =
diff --git a/packages/hoppscotch-common/src/helpers/functional/domain-settings.ts b/packages/hoppscotch-common/src/helpers/functional/domain-settings.ts
new file mode 100644
index 000000000..052c426ca
--- /dev/null
+++ b/packages/hoppscotch-common/src/helpers/functional/domain-settings.ts
@@ -0,0 +1,228 @@
+import { pipe } from "fp-ts/function"
+import * as O from "fp-ts/Option"
+import * as E from "fp-ts/Either"
+import { StoreFile, RelayRequest } from "@hoppscotch/kernel"
+
+export type InputDomainSetting = {
+ version: "v1"
+ security?: {
+ certificates?: {
+ client?:
+ | {
+ kind: "pem"
+ cert?: StoreFile
+ key?: StoreFile
+ }
+ | {
+ kind: "pfx"
+ data?: StoreFile
+ password?: string
+ }
+ ca?: StoreFile[]
+ }
+ verifyHost?: boolean
+ verifyPeer?: boolean
+ }
+ proxy?: {
+ url: string
+ auth?: {
+ username?: string
+ password?: string
+ }
+ certificates?: {
+ ca?: StoreFile[]
+ client?:
+ | {
+ kind: "pem"
+ cert?: StoreFile
+ key?: StoreFile
+ }
+ | {
+ kind: "pfx"
+ data?: StoreFile
+ password?: string
+ }
+ }
+ }
+}
+
+const convertStoreFile = (file: StoreFile): O.Option<Uint8Array> =>
+ file.include === false ? O.none : O.some(file.content)
+
+const convertClientCert = (
+ cert?:
+ | {
+ kind: "pem"
+ cert?: StoreFile
+ key?: StoreFile
+ }
+ | {
+ kind: "pfx"
+ data?: StoreFile
+ password?: string
+ }
+): O.Option<
+ NonNullable<
+ NonNullable<
+ Pick<RelayRequest, "proxy" | "security">["security"]
+ >["certificates"]
+ >["client"]
+> => {
+ if (!cert) return O.none
+
+ switch (cert.kind) {
+ case "pem": {
+ const certContent = pipe(
+ O.fromNullable(cert.cert),
+ O.chain(convertStoreFile)
+ )
+ const keyContent = pipe(
+ O.fromNullable(cert.key),
+ O.chain(convertStoreFile)
+ )
+
+ return pipe(
+ O.Do,
+ O.bind("cert", () => certContent),
+ O.bind("key", () => keyContent),
+ O.map(({ cert, key }) => ({
+ kind: "pem" as const,
+ cert,
+ key,
+ }))
+ )
+ }
+ case "pfx": {
+ const dataContent = pipe(
+ O.fromNullable(cert.data),
+ O.chain(convertStoreFile)
+ )
+
+ return pipe(
+ O.Do,
+ O.bind("data", () => dataContent),
+ O.bind("password", () => O.fromNullable(cert.password)),
+ O.map(({ data, password }) => ({
+ kind: "pfx" as const,
+ data,
+ password,
+ }))
+ )
+ }
+ }
+}
+
+const convertCaCerts = (certs?: StoreFile[]): O.Option<Uint8Array[]> =>
+ pipe(
+ O.fromNullable(certs),
+ O.chain((certs: StoreFile[]) => {
+ const converted = certs
+ .map(convertStoreFile)
+ .filter(O.isSome)
+ .map((opt) => opt.value)
+ return converted.length > 0 ? O.some(converted) : O.none
+ })
+ )
+
+const convertSecurity = (
+ security?: InputDomainSetting["security"]
+): O.Option<Pick<RelayRequest, "proxy" | "security">["security"]> =>
+ pipe(
+ O.fromNullable(security),
+ O.chain((security) => {
+ return pipe(
+ O.fromNullable(security.certificates),
+ O.chain((certificates) =>
+ pipe(
+ O.Do,
+ O.bind("client", () => convertClientCert(certificates.client)),
+ O.bind("ca", () => convertCaCerts(certificates.ca)),
+ O.map((convertedCerts) => ({
+ certificates: {
+ client: convertedCerts.client,
+ ca: convertedCerts.ca,
+ },
+ // Default to `false` if not explicitly set
+ verifyHost: security.verifyHost ?? false,
+ verifyPeer: security.verifyPeer ?? false,
+ }))
+ )
+ ),
+ // If no certificates but security object exists, still return verify settings
+ O.alt(() =>
+ O.some({
+ verifyHost: security.verifyHost ?? false,
+ verifyPeer: security.verifyPeer ?? false,
+ })
+ )
+ )
+ }),
+ // If no security object at all, return default settings
+ O.alt(() =>
+ O.some({
+ verifyHost: false,
+ verifyPeer: false,
+ })
+ )
+ )
+
+const convertProxy = (
+ proxy?: InputDomainSetting["proxy"]
+): O.Option<Pick<RelayRequest, "proxy" | "security">["proxy"]> =>
+ pipe(
+ O.fromNullable(proxy),
+ O.chain((proxy) => {
+ if (!proxy.url) return O.none
+
+ const auth = proxy.auth && {
+ username: proxy.auth.username || "",
+ password: proxy.auth.password || "",
+ }
+
+ return pipe(
+ O.fromNullable(proxy.certificates),
+ O.chain((certificates) =>
+ pipe(
+ O.Do,
+ O.bind("client", () => convertClientCert(certificates.client)),
+ O.bind("ca", () => convertCaCerts(certificates.ca)),
+ O.map((certs) => ({
+ client: certs.client,
+ ca: certs.ca,
+ }))
+ )
+ ),
+ O.fold(
+ () =>
+ O.some({
+ url: proxy.url,
+ ...(auth && { auth }),
+ }),
+ (certificates) =>
+ O.some({
+ url: proxy.url,
+ ...(auth && { auth }),
+ certificates,
+ })
+ )
+ )
+ })
+ )
+
+export const convertDomainSetting = (
+ input: InputDomainSetting
+): E.Either<Error, Pick<RelayRequest, "proxy" | "security">> => {
+ if (input.version !== "v1") {
+ return E.left(new Error("Invalid version"))
+ }
+
+ const security = convertSecurity(input.security)
+ const proxy = convertProxy(input.proxy)
+
+ const result: Pick<RelayRequest, "proxy" | "security"> = {
+ proxy: O.isSome(proxy) ? proxy.value : undefined,
+ security: O.isSome(security) ? security.value : undefined,
+ }
+
+ return E.right(result)
+}
diff --git a/packages/hoppscotch-common/src/helpers/functional/filter-active.ts b/packages/hoppscotch-common/src/helpers/functional/filter-active.ts
new file mode 100644
index 000000000..568701bf3
--- /dev/null
+++ b/packages/hoppscotch-common/src/helpers/functional/filter-active.ts
@@ -0,0 +1,13 @@
+import { HoppRESTRequestVariables } from "@hoppscotch/data"
+import { pipe } from "fp-ts/function"
+import * as A from "fp-ts/Array"
+
+export const filterActiveToRecord = (
+ headers: HoppRESTRequestVariables
+): Record<string, string> =>
+ pipe(
+ headers,
+ A.filter((header) => header.active),
+ A.map((header): [string, string] => [header.key, header.value]),
+ (entries) => Object.fromEntries(entries)
+ )
diff --git a/packages/hoppscotch-common/src/helpers/functional/json.ts b/packages/hoppscotch-common/src/helpers/functional/json.ts
index 2bf63ea88..bf4b3f32f 100644
--- a/packages/hoppscotch-common/src/helpers/functional/json.ts
+++ b/packages/hoppscotch-common/src/helpers/functional/json.ts
@@ -1,5 +1,10 @@
import * as O from "fp-ts/Option"
-import { flow } from "fp-ts/function"
+import * as E from "fp-ts/Either"
+import { pipe, flow } from "fp-ts/function"
+
+import { MediaType, RelayResponseBody } from "@hoppscotch/kernel"
+
+import { decodeToString } from "~/helpers/functional/parse"
type SafeParseJSON = {
(str: string, convertToArray: true): O.Option<Array<unknown>>
@@ -26,3 +31,21 @@ export const safeParseJSON: SafeParseJSON = (str, convertToArray = false) =>
* @returns If string is a JSON string
*/
export const isJSON = flow(safeParseJSON, O.isSome)
+
+export const parseBytesToJSON = <T>(content: Uint8Array): O.Option<T> =>
+ pipe(
+ content,
+ decodeToString,
+ E.chain(parseJSONAs<T>),
+ E.fold(() => O.none, O.some)
+ )
+
+export const parseJSONAs = <T>(str: string): E.Either<Error, T> =>
+ E.tryCatch(() => JSON.parse(str) as T, E.toError)
+
+export const parseBodyAsJSON = <T>(body: RelayResponseBody): O.Option<T> =>
+ pipe(
+ O.fromNullable(body.mediaType),
+ O.filter((type) => type.includes(MediaType.APPLICATION_JSON)),
+ O.chain(() => parseBytesToJSON<T>(body.body))
+ )
diff --git a/packages/hoppscotch-common/src/helpers/functional/parse.ts b/packages/hoppscotch-common/src/helpers/functional/parse.ts
new file mode 100644
index 000000000..01f12239f
--- /dev/null
+++ b/packages/hoppscotch-common/src/helpers/functional/parse.ts
@@ -0,0 +1,7 @@
+import * as E from "fp-ts/Either"
+
+export const decodeToString = (content: Uint8Array): E.Either<Error, string> =>
+ E.tryCatch(
+ () => new TextDecoder("utf-8").decode(content).replace(/\x00/g, ""),
+ E.toError
+ )
diff --git a/packages/hoppscotch-common/src/helpers/functional/preprocess.ts b/packages/hoppscotch-common/src/helpers/functional/preprocess.ts
new file mode 100644
index 000000000..e70835a4d
--- /dev/null
+++ b/packages/hoppscotch-common/src/helpers/functional/preprocess.ts
@@ -0,0 +1,69 @@
+import { pipe } from "fp-ts/function"
+import * as O from "fp-ts/Option"
+import * as E from "fp-ts/Either"
+import * as R from "fp-ts/Record"
+import { cloneDeep } from "lodash-es"
+import { useSetting } from "~/composables/settings"
+import type { RelayRequest } from "@hoppscotch/kernel"
+
+const isEncoded = (value: string): boolean =>
+ pipe(
+ E.tryCatch(
+ () => value !== decodeURIComponent(value),
+ () => false
+ ),
+ E.getOrElse(() => false)
+ )
+
+const encodeParam = (value: string): string =>
+ pipe(
+ O.some(value),
+ O.filter((v) => !isEncoded(v)),
+ O.map(encodeURIComponent),
+ O.getOrElse(() => value)
+ )
+
+const processParams = (
+ params: Record<string, string>
+): Record<string, string> => {
+ const encodeMode = useSetting("ENCODE_MODE").value
+ const needsEncoding = (v: string) =>
+ /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]+/.test(v)
+
+ return pipe(
+ params,
+ R.map((value) =>
+ encodeMode === "enable" || (encodeMode === "auto" && needsEncoding(value))
+ ? encodeParam(value)
+ : value
+ )
+ )
+}
+
+const updateUrl = (
+ url: string,
+ params: Record<string, string>
+): E.Either<Error, string> =>
+ pipe(
+ E.tryCatch(
+ () => new URL(url),
+ (e) => new Error(`Invalid URL: ${e}`)
+ ),
+ E.map((u) => {
+ Object.entries(processParams(params)).forEach(([k, v]) =>
+ u.searchParams.append(k, v)
+ )
+ return decodeURIComponent(u.toString())
+ })
+ )
+
+export const preProcessRelayRequest = (req: RelayRequest): RelayRequest =>
+ pipe(cloneDeep(req), (req) =>
+ req.params
+ ? pipe(
+ updateUrl(req.url, req.params),
+ E.map((url) => ({ ...req, url, params: {} })),
+ E.getOrElse(() => req)
+ )
+ : req
+ )
diff --git a/packages/hoppscotch-common/src/helpers/graphql/connection.ts b/packages/hoppscotch-common/src/helpers/graphql/connection.ts
index ce9dd8598..5286a75d7 100644
--- a/packages/hoppscotch-common/src/helpers/graphql/connection.ts
+++ b/packages/hoppscotch-common/src/helpers/graphql/connection.ts
@@ -25,9 +25,13 @@ import { getI18n } from "~/modules/i18n"
import { addGraphqlHistoryEntry, makeGQLHistoryEntry } from "~/newstore/history"
-import { InterceptorService } from "~/services/interceptor.service"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
import { GQLTabService } from "~/services/tab/graphql"
+import { MediaType, content, Method, RelayRequest } from "@hoppscotch/kernel"
+import { GQLRequest } from "~/helpers/kernel/gql/request"
+import { GQLResponse } from "~/helpers/kernel/gql/response"
+
const GQL_SCHEMA_POLL_INTERVAL = 7000
type ConnectionRequestOptions = {
@@ -111,49 +115,44 @@ export const connection = reactive<Connection>({
})
export const schema = computed(() => connection.schema)
-export const subscriptionState = computed(() => {
- return connection.subscriptionState.get(currentTabID.value)
-})
+export const subscriptionState = computed(() =>
+ connection.subscriptionState.get(currentTabID.value)
+)
export const gqlMessageEvent = ref<GQLResponseEvent | "reset">()
export const schemaString = computed(() => {
- if (!connection.schema) return ""
+ if (!connection.schema || !(connection.schema instanceof GraphQLSchema))
+ return ""
return printSchema(connection.schema)
})
export const queryFields = computed(() => {
- if (!connection.schema) return []
-
+ if (!connection.schema || !(connection.schema instanceof GraphQLSchema))
+ return []
const fields = connection.schema.getQueryType()?.getFields()
- if (!fields) return []
-
- return Object.values(fields)
+ return fields ? Object.values(fields) : []
})
export const mutationFields = computed(() => {
- if (!connection.schema) return []
-
+ if (!connection.schema || !(connection.schema instanceof GraphQLSchema))
+ return []
const fields = connection.schema.getMutationType()?.getFields()
- if (!fields) return []
-
- return Object.values(fields)
+ return fields ? Object.values(fields) : []
})
export const subscriptionFields = computed(() => {
- if (!connection.schema) return []
-
+ if (!connection.schema || !(connection.schema instanceof GraphQLSchema))
+ return []
const fields = connection.schema.getSubscriptionType()?.getFields()
- if (!fields) return []
-
- return Object.values(fields)
+ return fields ? Object.values(fields) : []
})
export const graphqlTypes = computed(() => {
- if (!connection.schema) return []
+ if (!connection.schema || !(connection.schema instanceof GraphQLSchema))
+ return []
const typeMap = connection.schema.getTypeMap()
-
const queryTypeName = connection.schema.getQueryType()?.name ?? ""
const mutationTypeName = connection.schema.getMutationType()?.name ?? ""
const subscriptionTypeName =
@@ -193,7 +192,6 @@ export const connect = async (
const poll = async () => {
try {
await getSchema(options)
- // polling for schema
if (connection.state !== "CONNECTED") connection.state = "CONNECTED"
timeoutSubscription = setTimeout(() => {
poll()
@@ -201,7 +199,6 @@ export const connect = async (
} catch (error) {
connection.state = "ERROR"
- // Show an error toast if the introspection attempt failed and not while sending a request
if (!isRunGQLOperation) {
toast.error(t("graphql.connection_error_http"))
}
@@ -232,10 +229,6 @@ export const reset = () => {
const getSchema = async (options: ConnectionRequestOptions) => {
try {
- const introspectionQuery = JSON.stringify({
- query: getIntrospectionQuery(),
- })
-
const { url, request, inheritedHeaders, inheritedAuth } = options
const headers = request?.headers || []
@@ -271,62 +264,60 @@ const getSchema = async (options: ConnectionRequestOptions) => {
.filter((item) => item.active && item.key !== "")
.forEach(({ key, value }) => (finalHeaders[key] = value))
- const reqOptions = {
- method: "POST",
+ const kernelRequest: RelayRequest = {
+ id: Date.now(),
url: options.url,
+ method: "POST" as Method,
+ version: "HTTP/1.1",
headers: {
...finalHeaders,
"content-type": "application/json",
},
- data: introspectionQuery,
+ content: content.json(
+ { query: getIntrospectionQuery() },
+ MediaType.APPLICATION_JSON
+ ),
}
- const interceptorService = getService(InterceptorService)
+ const kernelInterceptorService = getService(KernelInterceptorService)
+ const { response } = kernelInterceptorService.execute(kernelRequest)
- const res = await interceptorService.runRequest(reqOptions).response
+ const res = await response
if (E.isLeft(res)) {
connection.state = "ERROR"
- if (
- res.left !== "cancellation" &&
- res.left.error === "NO_PW_EXT_HOOK" &&
- res.left.humanMessage
- ) {
+ if (res.left !== "cancellation" && typeof res.left === "object") {
connection.error = {
- type: res.left.error,
- message: (t: ReturnType<typeof getI18n>) =>
- res.left.humanMessage.description(t),
+ type: res.left.error?.kind || "error",
+ message: (t: ReturnType<typeof getI18n>) => {
+ if (res.left !== "cancellation" && typeof res.left === "object") {
+ return (
+ res.left.humanMessage?.description(t) ||
+ t("graphql.connection_error_http")
+ )
+ }
+ return "Unknown"
+ },
component: res.left.component,
}
}
- throw new Error(res.left.toString())
- }
-
- if (res.right.status !== 200) {
- connection.state = "ERROR"
- connection.error = {
- type: "HTTP_ERROR",
- message: (t: ReturnType<typeof getI18n>) =>
- t("graphql.connection_error_http"),
- component: undefined,
- }
- throw new Error("Failed to fetch schema. Status: " + res.right.status)
+ throw new Error(
+ typeof res.left === "string" ? res.left : res.left.error.message
+ )
}
const data = res.right
- // HACK : Temporary trailing null character issue from the extension fix
- const response = new TextDecoder("utf-8")
- .decode(data.data as any)
- .replace(/\0+$/, "")
+ const decoder = new TextDecoder("utf-8")
+ const responseText = decoder.decode(data.body.body)
- const introspectResponse = JSON.parse(response)
+ const introspectResponse = JSON.parse(responseText)
- const schema = buildClientSchema(introspectResponse.data)
+ const schemaData = buildClientSchema(introspectResponse.data)
- connection.schema = schema
+ connection.schema = schemaData
connection.error = null
} catch (e: any) {
console.error(e)
@@ -380,6 +371,15 @@ export const runGQLOperation = async (options: RunQueryOptions) => {
const { authHeaders, authParams } = await generateAuthHeader(url, auth)
+ let finalUrl = url
+ if (Object.keys(authParams).length > 0) {
+ const urlObj = new URL(url)
+ for (const [key, value] of Object.entries(authParams)) {
+ urlObj.searchParams.append(key, value)
+ }
+ finalUrl = urlObj.toString()
+ }
+
runHeaders.forEach((header) => {
if (header.active && header.key !== "") {
finalHeaders[header.key] = header.value
@@ -387,74 +387,91 @@ export const runGQLOperation = async (options: RunQueryOptions) => {
})
Object.assign(finalHeaders, authHeaders)
- const parsedVariables = JSON.parse(variables || "{}")
-
- const params: Record<string, string> = {}
-
headers
.filter((item) => item.active && item.key !== "")
.forEach(({ key, value }) => (finalHeaders[key] = value))
- const reqOptions = {
- method: "POST",
- url,
- headers: {
- ...finalHeaders,
- "content-type": "application/json",
- },
- data: JSON.stringify({
- query,
- variables: parsedVariables,
- operationName,
- }),
- params: {
- ...params,
- ...authParams,
- },
+ const gqlRequest: HoppGQLRequest = {
+ v: 8,
+ name: options.name || "Untitled Request",
+ url: finalUrl,
+ headers: request.headers,
+ query,
+ variables,
+ auth: request.auth as HoppGQLAuth,
}
if (operationType === "subscription") {
return runSubscription(options, finalHeaders)
}
- const interceptorService = getService(InterceptorService)
- const result = await interceptorService.runRequest(reqOptions).response
-
- if (E.isLeft(result)) {
- if (
- result.left !== "cancellation" &&
- result.left.error === "NO_PW_EXT_HOOK" &&
- result.left.humanMessage
- ) {
- connection.error = {
- type: result.left.error,
- message: (t: ReturnType<typeof getI18n>) =>
- result.left.humanMessage.description(t),
- component: result.left.component,
+ try {
+ const kernelRequest = await GQLRequest.toRequest(gqlRequest)
+
+ if (operationName) {
+ if (kernelRequest.content?.kind === "json") {
+ const content = kernelRequest.content.content as any
+ content.operationName = operationName
+ kernelRequest.content.content = content
}
}
- throw new Error(result.left.toString())
- }
- const res = result.right
+ const kernelInterceptorService = getService(KernelInterceptorService)
+ const { response } = kernelInterceptorService.execute(kernelRequest)
- // HACK: Temporary trailing null character issue from the extension fix
- const responseText = new TextDecoder("utf-8")
- .decode(res.data as any)
- .replace(/\0+$/, "")
+ const result = await response
- gqlMessageEvent.value = {
- type: "response",
- time: Date.now(),
- operationName: operationName ?? "query",
- data: responseText,
- rawQuery: options,
- operationType,
- }
+ if (E.isLeft(result)) {
+ if (result.left !== "cancellation" && typeof result.left === "object") {
+ connection.error = {
+ type: result.left.error?.kind || "error",
+ message: (t: ReturnType<typeof getI18n>) => {
+ if (
+ result.left !== "cancellation" &&
+ typeof result.left === "object"
+ ) {
+ return (
+ result.left.humanMessage?.description(t) ||
+ t("graphql.operation_error")
+ )
+ }
+ return "Unknown"
+ },
+ component: result.left.component,
+ }
+ }
+
+ throw new Error(
+ typeof result.left === "string"
+ ? result.left
+ : result.left.error.message
+ )
+ }
+
+ const relayResponse = result.right
+
+ const parsedResponse = await GQLResponse.toResponse(relayResponse, options)
+
+ if (parsedResponse.type === "error") {
+ throw new Error(parsedResponse.error.message)
+ }
+
+ gqlMessageEvent.value = parsedResponse
- addQueryToHistory(options, responseText)
+ addQueryToHistory(options, parsedResponse.data)
- return responseText
+ return parsedResponse.data
+ } catch (error: any) {
+ gqlMessageEvent.value = {
+ type: "error",
+ error: {
+ type: "network_error",
+ message: error.message || "An unknown error occurred",
+ },
+ }
+
+ throw error
+ }
}
const generateAuthHeader = async (
diff --git a/packages/hoppscotch-common/src/helpers/import-export/export/index.ts b/packages/hoppscotch-common/src/helpers/import-export/export/index.ts
index 84a14348a..06b25c568 100644
--- a/packages/hoppscotch-common/src/helpers/import-export/export/index.ts
+++ b/packages/hoppscotch-common/src/helpers/import-export/export/index.ts
@@ -16,7 +16,7 @@ export const initializeDownloadFile = async (
const fileName = name ?? url.split("/").pop()!.split("#")[0].split("?")[0]
- const result = await platform.io.saveFileWithDialog({
+ const result = await platform.kernelIO.saveFileWithDialog({
data: contentsJSON,
contentType: "application/json",
suggestedFilename: `${fileName}.json`,
diff --git a/packages/hoppscotch-common/src/helpers/import-export/export/testResults.ts b/packages/hoppscotch-common/src/helpers/import-export/export/testResults.ts
index 6c9bea652..a86b92696 100644
--- a/packages/hoppscotch-common/src/helpers/import-export/export/testResults.ts
+++ b/packages/hoppscotch-common/src/helpers/import-export/export/testResults.ts
@@ -9,7 +9,7 @@ export const exportTestResults = async (testResults: HoppTestResult) => {
const fileName = url.split("/").pop()!.split("#")[0].split("?")[0]
- const result = await platform.io.saveFileWithDialog({
+ const result = await platform.kernelIO.saveFileWithDialog({
data: contentsJSON,
contentType: "application/json",
suggestedFilename: `${fileName}.json`,
diff --git a/packages/hoppscotch-common/src/helpers/import-export/import/import-sources/GistSource.ts b/packages/hoppscotch-common/src/helpers/import-export/import/import-sources/GistSource.ts
index b7486783f..7a37f5fb7 100644
--- a/packages/hoppscotch-common/src/helpers/import-export/import/import-sources/GistSource.ts
+++ b/packages/hoppscotch-common/src/helpers/import-export/import/import-sources/GistSource.ts
@@ -2,14 +2,16 @@ import UrlImport from "~/components/importExport/ImportExportSteps/UrlImport.vue
import { defineStep } from "~/composables/step-components"
import * as E from "fp-ts/Either"
+import * as O from "fp-ts/Option"
import { z } from "zod"
import { v4 as uuidv4 } from "uuid"
import { Ref } from "vue"
import { getService } from "~/modules/dioc"
-import { InterceptorService } from "~/services/interceptor.service"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
+import { parseBodyAsJSON } from "~/helpers/functional/json"
-const interceptorService = getService(InterceptorService)
+const interceptorService = getService(KernelInterceptorService)
export function GistSource(metadata: {
caption: string
@@ -48,31 +50,27 @@ export function GistSource(metadata: {
}
const fetchGistFromUrl = async (url: string) => {
- const res = await interceptorService.runRequest({
+ const { response } = interceptorService.execute({
+ id: Date.now(),
url: `https://api.github.com/gists/${url.split("/").pop()}`,
+ method: "GET",
+ version: "HTTP/1.1",
headers: {
Accept: "application/vnd.github.v3+json",
},
})
- const response = await res.response
+ const res = await response
- if (E.isLeft(response)) {
+ if (E.isLeft(res)) {
return E.left("REQUEST_FAILED")
}
- // convert ArrayBuffer to string
- if (!(response.right.data instanceof ArrayBuffer)) {
- return E.left("REQUEST_FAILED")
- }
+ const responsePayload = parseBodyAsJSON<unknown>(res.right.body)
- try {
- return E.right(
- JSON.parse(
- InterceptorService.convertArrayBufferToString(response.right.data)
- )
- )
- } catch (e) {
- return E.left("REQUEST_FAILED")
+ if (O.isSome(responsePayload)) {
+ return E.right(responsePayload)
}
+
+ return E.left("REQUEST_FAILED")
}
diff --git a/packages/hoppscotch-common/src/helpers/kernel/__tests__/kernel.spec.ts b/packages/hoppscotch-common/src/helpers/kernel/__tests__/kernel.spec.ts
new file mode 100644
index 000000000..de00eec4b
--- /dev/null
+++ b/packages/hoppscotch-common/src/helpers/kernel/__tests__/kernel.spec.ts
@@ -0,0 +1,353 @@
+import { describe, expect, it } from "vitest"
+import { GQLResponse } from "../gql/response"
+import { GQLRequest } from "../gql/request"
+import { RESTResponse } from "../rest/response"
+import { RESTRequest } from "../rest/request"
+import { HoppRESTRequest } from "@hoppscotch/data"
+import { RunQueryOptions } from "~/helpers/graphql/connection"
+import { MediaType } from "@hoppscotch/kernel"
+import { HoppGQLRequest } from "@hoppscotch/data"
+import { EffectiveHoppRESTRequest } from "~/helpers/utils/EffectiveURL"
+import { RelayResponse } from "@hoppscotch/kernel"
+
+describe("GraphQL Response Transformation", () => {
+ const baseOptions: RunQueryOptions = {
+ url: "https://api.example.com/graphql",
+ headers: [],
+ query: "",
+ variables: "",
+ auth: { authType: "none", authActive: true },
+ operationName: "TestQuery",
+ operationType: "query",
+ }
+
+ it("successfully transforms a valid GraphQL response with data", async () => {
+ const json = JSON.stringify({ data: { hello: "world" } })
+ const mockResponse: RelayResponse = {
+ status: 200,
+ headers: {},
+ body: {
+ mediaType: "application/json",
+ body: new Uint8Array(Buffer.from(json)),
+ },
+ meta: {
+ timing: {
+ start: 100,
+ end: 200,
+ },
+ },
+ }
+
+ const options = {
+ ...baseOptions,
+ query: "query TestQuery { hello }",
+ }
+
+ const result = await GQLResponse.toResponse(
+ mockResponse as RelayResponse,
+ options
+ )
+
+ expect(result).toHaveProperty("type", "response")
+ if (result.type === "response") {
+ expect(result.operationName).toBe("TestQuery")
+ expect(result.time).toBe(100)
+ expect(JSON.parse(result.data)).toHaveProperty("data.hello", "world")
+ }
+ })
+
+ it("successfully transforms a GraphQL response with errors", async () => {
+ const mockResponse: RelayResponse = {
+ status: 200,
+ headers: {},
+ body: {
+ mediaType: "application/json",
+ body: new Uint8Array(
+ Buffer.from(
+ JSON.stringify({
+ errors: [
+ { message: "Field 'invalid' does not exist" },
+ { message: "Syntax error" },
+ ],
+ })
+ )
+ ),
+ },
+ meta: {
+ timing: {
+ start: 0,
+ end: 150,
+ },
+ },
+ }
+
+ const options = {
+ ...baseOptions,
+ query: "query TestQuery { invalid }",
+ }
+
+ const result = await GQLResponse.toResponse(
+ mockResponse as RelayResponse,
+ options
+ )
+
+ expect(result).toHaveProperty("type", "response")
+ if (result.type === "response") {
+ const parsedData = JSON.parse(result.data)
+ expect(parsedData.errors).toHaveLength(2)
+ expect(parsedData.errors[0].message).toBe(
+ "Field 'invalid' does not exist"
+ )
+ }
+ })
+
+ it("returns transform error for non-GraphQL JSON response", async () => {
+ const mockResponse: RelayResponse = {
+ status: 200,
+ headers: {},
+ body: {
+ mediaType: "application/json",
+ body: new Uint8Array(
+ Buffer.from(
+ JSON.stringify({
+ someField: "not a graphql response",
+ })
+ )
+ ),
+ },
+ }
+
+ const options = {
+ ...baseOptions,
+ query: "query TestQuery { hello }",
+ }
+
+ const result = await GQLResponse.toResponse(
+ mockResponse as RelayResponse,
+ options
+ )
+
+ expect(result).toHaveProperty("type", "error")
+ if (result.type === "error") {
+ expect(result.error.message).toBe("Invalid GraphQL response structure")
+ }
+ })
+})
+
+describe("GraphQL Request Transformation", () => {
+ const baseRequest: HoppGQLRequest = {
+ v: 8,
+ name: "Test Query",
+ url: "https://api.example.com/graphql",
+ headers: [],
+ query: "",
+ variables: "",
+ auth: { authType: "none", authActive: true },
+ }
+
+ it("transforms a basic GraphQL request correctly", async () => {
+ const request: HoppGQLRequest = {
+ ...baseRequest,
+ query: "query { hello }",
+ }
+
+ const result = await GQLRequest.toRequest(request)
+
+ expect(result).toMatchObject({
+ url: "https://api.example.com/graphql",
+ method: "POST",
+ version: "HTTP/1.1",
+ headers: { "content-type": "application/json" },
+ auth: { kind: "none" },
+ content: {
+ kind: "json",
+ content: { query: "query { hello }", variables: undefined },
+ mediaType: "application/json",
+ },
+ })
+
+ expect(result.content?.mediaType).toBe(MediaType.APPLICATION_JSON)
+ expect(result.content?.content).toBeDefined()
+ if (result.content?.body) {
+ const parsedBody =
+ typeof result.content.body === "string"
+ ? JSON.parse(result.content.body)
+ : JSON.parse(new TextDecoder().decode(result.content.body))
+
+ expect(parsedBody).toEqual({
+ query: request.query,
+ variables: undefined,
+ })
+ }
+ })
+
+ it("properly parses and includes variables when provided", async () => {
+ const request: HoppGQLRequest = {
+ ...baseRequest,
+ query: "query($id: ID!) { item(id: $id) { name } }",
+ variables: '{ "id": "123" }',
+ }
+
+ const result = await GQLRequest.toRequest(request)
+
+ expect(result.content?.kind).toBe("json")
+ expect(result.content?.content).toBeDefined()
+ if (result.content?.content) {
+ expect(result.content?.content).toEqual({
+ query: request.query,
+ variables: { id: "123" },
+ })
+ }
+ })
+
+ it("throws error for invalid JSON in variables", async () => {
+ const request: HoppGQLRequest = {
+ ...baseRequest,
+ query: "query($id: ID!) { item(id: $id) { name } }",
+ variables: "{ invalid json }",
+ }
+
+ await expect(GQLRequest.toRequest(request)).rejects.toThrow("Invalid JSON")
+ })
+})
+
+describe("REST Response Transformation", () => {
+ it("transforms a successful REST response", async () => {
+ const mockResponse = {
+ body: {
+ body: new Uint8Array([72, 101, 108, 108, 111]),
+ },
+ headers: {
+ "content-type": "text/plain",
+ "x-custom": "test",
+ },
+ status: 200,
+ statusText: "OK",
+ meta: {
+ timing: {
+ start: 100,
+ end: 200,
+ },
+ size: {
+ total: 5,
+ },
+ },
+ }
+
+ const originalRequest: HoppRESTRequest = {
+ v: "11",
+ endpoint: "https://api.example.com",
+ name: "Test Request",
+ method: "GET",
+ params: [],
+ headers: [],
+ preRequestScript: "",
+ testScript: "",
+ auth: { authType: "none", authActive: true },
+ body: { contentmediaType: null, body: null },
+ requestVariables: [],
+ responses: {},
+ }
+
+ const result = await RESTResponse.toResponse(
+ mockResponse as any,
+ originalRequest
+ )
+
+ expect(result).toHaveProperty("type", "success")
+ if (result.type === "success") {
+ expect(result.statusCode).toBe(200)
+ expect(result.meta.responseDuration).toBe(100)
+ expect(result.meta.responseSize).toBe(5)
+ expect(result.headers).toHaveLength(2)
+ }
+ })
+
+ it("returns transform error for invalid response body", async () => {
+ const mockResponse = {
+ body: {
+ body: "invalid body format",
+ },
+ }
+
+ const originalRequest: HoppRESTRequest = {
+ v: "11",
+ endpoint: "https://api.example.com",
+ name: "Test Request",
+ method: "GET",
+ params: [],
+ headers: [],
+ preRequestScript: "",
+ testScript: "",
+ auth: { authType: "none", authActive: true },
+ body: { contentmediaType: null, body: null },
+ requestVariables: [],
+ responses: {},
+ }
+
+ const result = await RESTResponse.toResponse(
+ mockResponse as any,
+ originalRequest
+ )
+
+ expect(result).toHaveProperty("type", "fail")
+ if (result.type === "fail") {
+ expect(result.error.type).toBe("transform_error")
+ expect(result.error.message).toBe("Invalid response body format")
+ }
+ })
+})
+
+describe("REST Request Transformation", () => {
+ const baseEffectiveRequest: EffectiveHoppRESTRequest = {
+ v: "11",
+ name: "Test Request",
+ method: "GET",
+ endpoint: "https://api.example.com",
+ effectiveFinalURL: "https://api.example.com",
+ params: [],
+ headers: [],
+ preRequestScript: "",
+ testScript: "",
+ auth: { authType: "none", authActive: true },
+ body: { contentmediaType: null, body: null },
+ requestVariables: [],
+ responses: {},
+ effectiveFinalHeaders: [],
+ effectiveFinalParams: [],
+ effectiveFinalBody: null,
+ effectiveFinalRequestVariables: [],
+ }
+
+ it("transforms a basic REST request correctly", async () => {
+ const result = await RESTRequest.toRequest(baseEffectiveRequest)
+
+ expect(result).toMatchObject({
+ url: baseEffectiveRequest.effectiveFinalURL,
+ method: "GET",
+ headers: {},
+ params: {},
+ auth: { kind: "none" },
+ })
+ })
+
+ it("includes auth parameters when basic auth is active", async () => {
+ const request: EffectiveHoppRESTRequest = {
+ ...baseEffectiveRequest,
+ auth: {
+ authType: "basic",
+ authActive: true,
+ username: "testuser",
+ password: "testpass",
+ },
+ }
+
+ const result = await RESTRequest.toRequest(request)
+
+ expect(result.auth).toMatchObject({
+ kind: "basic",
+ username: "testuser",
+ password: "testpass",
+ })
+ })
+})
diff --git a/packages/hoppscotch-common/src/helpers/kernel/common/auth.ts b/packages/hoppscotch-common/src/helpers/kernel/common/auth.ts
new file mode 100644
index 000000000..dd6861796
--- /dev/null
+++ b/packages/hoppscotch-common/src/helpers/kernel/common/auth.ts
@@ -0,0 +1,286 @@
+import { HoppRESTRequest, HoppRESTAuthOAuth2 } from "@hoppscotch/data"
+import { AuthType } from "@hoppscotch/kernel"
+import * as E from "fp-ts/Either"
+import * as O from "fp-ts/Option"
+import * as TE from "fp-ts/TaskEither"
+import { flow, pipe } from "fp-ts/function"
+
+type HoppAuth = HoppRESTRequest["auth"]
+type OAuth2GrantType = HoppRESTAuthOAuth2["grantTypeInfo"]
+type GrantType = Extract<AuthType, { kind: "oauth2" }>["grantType"]
+
+export const defaultAuth: AuthType = { kind: "none" }
+
+const isAuthActive = (auth: HoppAuth): boolean =>
+ auth.authActive && auth.authType !== "none" && auth.authType !== "inherit"
+
+const Guards = {
+ basic: flow(
+ O.fromPredicate(
+ (auth: HoppAuth): auth is HoppAuth & { authType: "basic" } =>
+ auth.authType === "basic"
+ )
+ ),
+ bearer: flow(
+ O.fromPredicate(
+ (auth: HoppAuth): auth is HoppAuth & { authType: "bearer" } =>
+ auth.authType === "bearer"
+ )
+ ),
+ apiKey: flow(
+ O.fromPredicate(
+ (auth: HoppAuth): auth is HoppAuth & { authType: "api-key" } =>
+ auth.authType === "api-key"
+ )
+ ),
+ aws: flow(
+ O.fromPredicate(
+ (auth: HoppAuth): auth is HoppAuth & { authType: "aws-signature" } =>
+ auth.authType === "aws-signature"
+ )
+ ),
+ digest: flow(
+ O.fromPredicate(
+ (auth: HoppAuth): auth is HoppAuth & { authType: "digest" } =>
+ auth.authType === "digest"
+ )
+ ),
+ oauth2: flow(
+ O.fromPredicate(
+ (auth: HoppAuth): auth is HoppAuth & { authType: "oauth-2" } =>
+ auth.authType === "oauth-2"
+ )
+ ),
+ grants: {
+ authCode: flow(
+ O.fromPredicate(
+ (
+ g: OAuth2GrantType
+ ): g is Extract<OAuth2GrantType, { grantType: "AUTHORIZATION_CODE" }> =>
+ g.grantType === "AUTHORIZATION_CODE"
+ )
+ ),
+ clientCreds: flow(
+ O.fromPredicate(
+ (
+ g: OAuth2GrantType
+ ): g is Extract<OAuth2GrantType, { grantType: "CLIENT_CREDENTIALS" }> =>
+ g.grantType === "CLIENT_CREDENTIALS"
+ )
+ ),
+ password: flow(
+ O.fromPredicate(
+ (
+ g: OAuth2GrantType
+ ): g is Extract<OAuth2GrantType, { grantType: "PASSWORD" }> =>
+ g.grantType === "PASSWORD"
+ )
+ ),
+ implicit: flow(
+ O.fromPredicate(
+ (
+ g: OAuth2GrantType
+ ): g is Extract<OAuth2GrantType, { grantType: "IMPLICIT" }> =>
+ g.grantType === "IMPLICIT"
+ )
+ ),
+ },
+}
+
+type AuthProcessor<T extends HoppAuth = HoppAuth> = (
+ auth: T
+) => E.Either<Error, AuthType>
+
+const Processors: {
+ basic: AuthProcessor
+ bearer: AuthProcessor
+ apiKey: AuthProcessor
+ aws: AuthProcessor
+ digest: AuthProcessor
+ oauth2: {
+ processGrant: (
+ grant: OAuth2GrantType
+ ) => E.Either<Error, AuthType["grantType"]>
+ process: AuthProcessor
+ }
+} = {
+ basic: flow(
+ Guards.basic,
+ O.map((a) => ({
+ kind: "basic" as const,
+ username: a.username,
+ password: a.password,
+ })),
+ E.fromOption(() => new Error("Invalid basic auth"))
+ ),
+
+ bearer: flow(
+ Guards.bearer,
+ O.map((a) => ({
+ kind: "bearer" as const,
+ token: a.token,
+ })),
+ E.fromOption(() => new Error("Invalid bearer auth"))
+ ),
+
+ apiKey: flow(
+ Guards.apiKey,
+ O.map((a) => ({
+ kind: "apikey" as const,
+ key: a.key,
+ value: a.value,
+ in: a.addTo === "HEADERS" ? "header" : "query",
+ })),
+ E.fromOption(() => new Error("Invalid API key auth"))
+ ),
+
+ aws: flow(
+ Guards.aws,
+ O.map((a) => ({
+ kind: "aws" as const,
+ accessKey: a.accessKey,
+ secretKey: a.secretKey,
+ region: a.region,
+ service: a.serviceName,
+ sessionToken: a.serviceToken,
+ in: a.addTo === "HEADERS" ? "header" : "query",
+ })),
+ E.fromOption(() => new Error("Invalid AWS auth"))
+ ),
+
+ digest: flow(
+ Guards.digest,
+ O.map((a) => ({
+ kind: "digest" as const,
+ username: a.username,
+ password: a.password,
+ realm: a.realm,
+ nonce: a.nonce,
+ algorithm: a.algorithm === "MD5" ? "MD5" : "SHA-256",
+ qop: a.qop,
+ nc: a.nc,
+ cnonce: a.cnonce,
+ opaque: a.opaque,
+ })),
+ E.fromOption(() => new Error("Invalid digest auth"))
+ ),
+
+ oauth2: {
+ processGrant: (
+ grant: OAuth2GrantType
+ ): E.Either<Error, AuthType["grantType"]> =>
+ pipe(
+ grant,
+ (g) =>
+ pipe(
+ O.none as O.Option<GrantType>,
+ O.alt(() =>
+ pipe(
+ Guards.grants.authCode(g),
+ O.map(
+ (g): GrantType => ({
+ kind: "authorization_code",
+ authEndpoint: g.authEndpoint,
+ tokenEndpoint: g.tokenEndpoint,
+ clientId: g.clientID,
+ clientSecret: g.clientSecret,
+ })
+ )
+ )
+ ),
+ O.alt(() =>
+ pipe(
+ Guards.grants.clientCreds(g),
+ O.map(
+ (g): GrantType => ({
+ kind: "client_credentials",
+ tokenEndpoint: g.authEndpoint,
+ clientId: g.clientID,
+ clientSecret: g.clientSecret,
+ })
+ )
+ )
+ ),
+ O.alt(() =>
+ pipe(
+ Guards.grants.password(g),
+ O.map(
+ (g): GrantType => ({
+ kind: "password",
+ tokenEndpoint: g.authEndpoint,
+ username: g.username,
+ password: g.password,
+ })
+ )
+ )
+ ),
+ O.alt(() =>
+ pipe(
+ Guards.grants.implicit(g),
+ O.map(
+ (g): GrantType => ({
+ kind: "implicit",
+ authEndpoint: g.authEndpoint,
+ clientId: g.clientID,
+ })
+ )
+ )
+ )
+ ),
+ E.fromOption(() => new Error("Invalid grant type"))
+ ),
+ process: flow(
+ Guards.oauth2,
+ E.fromOption(() => new Error("Invalid OAuth2 auth")),
+ E.chain((a) =>
+ pipe(
+ Processors.oauth2.processGrant(a.grantTypeInfo),
+ E.map((grantType) => ({
+ kind: "oauth2" as const,
+ accessToken: a.grantTypeInfo.token,
+ refreshToken:
+ "refreshToken" in a.grantTypeInfo
+ ? a.grantTypeInfo.refreshToken
+ : undefined,
+ grantType,
+ }))
+ )
+ )
+ ),
+ },
+}
+
+const getProcessor = (
+ auth: HoppAuth
+): O.Option<(auth: HoppAuth) => E.Either<Error, AuthType>> =>
+ pipe(
+ O.fromNullable(auth.authType),
+ O.chain((type) => {
+ switch (type) {
+ case "basic":
+ return O.some(Processors.basic)
+ case "bearer":
+ return O.some(Processors.bearer)
+ case "api-key":
+ return O.some(Processors.apiKey)
+ case "aws-signature":
+ return O.some(Processors.aws)
+ case "digest":
+ return O.some(Processors.digest)
+ case "oauth-2":
+ return O.some(Processors.oauth2.process)
+ default:
+ return O.none
+ }
+ })
+ )
+
+export const transformAuth = (auth: HoppAuth): TE.TaskEither<Error, AuthType> =>
+ pipe(
+ auth,
+ O.fromPredicate(isAuthActive),
+ O.chain(getProcessor),
+ O.map((processor) => processor(auth)),
+ O.getOrElse(() => E.right(defaultAuth)),
+ TE.fromEither
+ )
diff --git a/packages/hoppscotch-common/src/helpers/kernel/common/content.ts b/packages/hoppscotch-common/src/helpers/kernel/common/content.ts
new file mode 100644
index 000000000..1aa54629c
--- /dev/null
+++ b/packages/hoppscotch-common/src/helpers/kernel/common/content.ts
@@ -0,0 +1,192 @@
+import * as E from "fp-ts/Either"
+import * as TE from "fp-ts/TaskEither"
+import * as O from "fp-ts/Option"
+import * as A from "fp-ts/Array"
+import { pipe } from "fp-ts/function"
+
+import { parseJSONAs } from "~/helpers/functional/json"
+import { ContentType, MediaType, content } from "@hoppscotch/kernel"
+import { EffectiveHoppRESTRequest } from "~/helpers/utils/EffectiveURL"
+
+type FormDataValue = {
+ kind: "file"
+ filename: string
+ contentType: string
+ data: Uint8Array
+}
+
+const Processors = {
+ json: {
+ process: (body: string): E.Either<Error, ContentType> =>
+ pipe(
+ parseJSONAs<unknown>(body),
+ E.map((json) => content.json(json, MediaType.APPLICATION_JSON)),
+ E.orElse(() => E.right(content.text(body, MediaType.TEXT_PLAIN)))
+ ),
+ },
+
+ multipart: {
+ processFile: (entry: {
+ key: string
+ file: Blob
+ contentType?: string
+ }): TE.TaskEither<Error, { key: string; value: FormDataValue[] }> =>
+ pipe(
+ TE.tryCatch(
+ () => entry.file.arrayBuffer(),
+ () => new Error("File read failed")
+ ),
+ TE.map((buffer) => ({
+ key: entry.key,
+ value: [
+ {
+ kind: "file",
+ filename:
+ entry.file instanceof File ? entry.file.name : "unknown",
+ contentType:
+ entry.contentType ??
+ (entry.file instanceof File
+ ? entry.file.type
+ : "application/octet-stream"),
+ data: new Uint8Array(buffer),
+ },
+ ],
+ }))
+ ),
+
+ process: (formData: FormData): TE.TaskEither<Error, ContentType> =>
+ pipe(
+ TE.tryCatch(
+ async () => {
+ const entries = [] as {
+ key: string
+ file: Blob
+ contentType?: string
+ }[]
+ // @ts-expect-error: `formData.entries` does exist but isn't visible,
+ // see `"lib": ["ESNext", "DOM"],` in `tsconfig.json`
+ for (const [key, value] of formData.entries()) {
+ if (value instanceof Blob) {
+ entries.push({
+ key,
+ file: value,
+ contentType: value.type || undefined,
+ })
+ }
+ }
+ return entries
+ },
+ () => new Error("FormData processing failed")
+ ),
+ TE.chain((entries) =>
+ pipe(
+ entries,
+ A.traverse(TE.ApplicativePar)(Processors.multipart.processFile),
+ TE.map(
+ A.reduce(
+ new Map<string, FormDataValue[]>(),
+ (acc, { key, value }) => {
+ acc.set(key, value)
+ return acc
+ }
+ )
+ )
+ )
+ ),
+ TE.map((entries) => content.multipart(entries))
+ ),
+ },
+
+ binary: {
+ process: (file: Blob): TE.TaskEither<Error, ContentType> =>
+ pipe(
+ TE.tryCatch(
+ () => file.arrayBuffer(),
+ () => new Error("Binary read failed")
+ ),
+ TE.map((buffer) =>
+ content.binary(
+ new Uint8Array(buffer),
+ file.type || "application/octet-stream",
+ file instanceof File ? file.name : "unknown"
+ )
+ )
+ ),
+ },
+
+ urlencoded: {
+ process: (body: string): E.Either<Error, ContentType> =>
+ pipe(
+ E.right(body),
+ E.map((contents) => {
+ return content.urlencoded(contents)
+ })
+ ),
+ },
+
+ xml: {
+ process: (body: string): E.Either<Error, ContentType> =>
+ E.right(content.xml(body, MediaType.APPLICATION_XML)),
+ },
+
+ text: {
+ process: (body: string): E.Either<Error, ContentType> =>
+ E.right(content.text(body, MediaType.TEXT_PLAIN)),
+ },
+}
+
+const getProcessor = (contentType: string) => {
+ switch (contentType) {
+ case "application/json":
+ case "application/ld+json":
+ case "application/hal+json":
+ case "application/vnd.api+json":
+ return Processors.json.process
+ case "application/xml":
+ case "text/xml":
+ return Processors.xml.process
+ case "application/x-www-form-urlencoded":
+ return Processors.urlencoded.process
+ case "text/html":
+ case "text/plain":
+ return Processors.text.process
+ default:
+ return Processors.text.process
+ }
+}
+
+export const transformContent = (
+ request: EffectiveHoppRESTRequest
+): TE.TaskEither<Error, O.Option<ContentType>> => {
+ const { body, effectiveFinalBody } = request
+
+ if (!body.contentType || !effectiveFinalBody) {
+ return TE.right(O.none)
+ }
+
+ switch (body.contentType) {
+ case "multipart/form-data":
+ if (!(effectiveFinalBody instanceof FormData)) {
+ return TE.right(O.none)
+ }
+ return pipe(
+ Processors.multipart.process(effectiveFinalBody),
+ TE.map(O.some)
+ )
+
+ case "application/octet-stream":
+ if (!(effectiveFinalBody instanceof Blob)) {
+ return TE.right(O.none)
+ }
+ return pipe(Processors.binary.process(effectiveFinalBody), TE.map(O.some))
+
+ default:
+ if (typeof effectiveFinalBody !== "string") {
+ return TE.right(O.none)
+ }
+ return pipe(
+ TE.fromEither(getProcessor(body.contentType)(effectiveFinalBody)),
+ TE.map(O.some)
+ )
+ }
+}
diff --git a/packages/hoppscotch-common/src/helpers/kernel/common/index.ts b/packages/hoppscotch-common/src/helpers/kernel/common/index.ts
new file mode 100644
index 000000000..f7e55e519
--- /dev/null
+++ b/packages/hoppscotch-common/src/helpers/kernel/common/index.ts
@@ -0,0 +1,2 @@
+export { transformContent } from "./content"
+export { transformAuth } from "./auth"
diff --git a/packages/hoppscotch-common/src/helpers/kernel/gql/request.ts b/packages/hoppscotch-common/src/helpers/kernel/gql/request.ts
new file mode 100644
index 000000000..d153cce05
--- /dev/null
+++ b/packages/hoppscotch-common/src/helpers/kernel/gql/request.ts
@@ -0,0 +1,48 @@
+import * as TE from "fp-ts/TaskEither"
+import * as T from "fp-ts/Task"
+import { pipe } from "fp-ts/function"
+
+import { AuthType, MediaType, content } from "@hoppscotch/kernel"
+import { HoppGQLRequest } from "@hoppscotch/data"
+
+import { transformAuth } from "~/helpers/kernel/common"
+import { defaultAuth } from "~/helpers/kernel/common/auth"
+import { filterActiveToRecord } from "~/helpers/functional/filter-active"
+
+const parseVariables = async (variables: string | null): Promise<unknown> => {
+ if (!variables) return undefined
+ try {
+ return JSON.parse(variables)
+ } catch {
+ throw new Error("Invalid JSON")
+ }
+}
+
+export const GQLRequest = {
+ async toRequest(request: HoppGQLRequest) {
+ const headers = {
+ ...filterActiveToRecord(request.headers),
+ "content-type": "application/json",
+ }
+
+ const auth = await pipe(
+ transformAuth(request.auth),
+ TE.getOrElse(() => T.of<AuthType>(defaultAuth))
+ )()
+
+ const variables = await parseVariables(request.variables)
+
+ return {
+ id: Date.now(),
+ url: request.url,
+ method: "POST", // GQL specs
+ version: "HTTP/1.1",
+ headers,
+ auth,
+ content: content.json(
+ { query: request.query, variables },
+ MediaType.APPLICATION_JSON
+ ),
+ }
+ },
+}
diff --git a/packages/hoppscotch-common/src/helpers/kernel/gql/response.ts b/packages/hoppscotch-common/src/helpers/kernel/gql/response.ts
new file mode 100644
index 000000000..e194a273d
--- /dev/null
+++ b/packages/hoppscotch-common/src/helpers/kernel/gql/response.ts
@@ -0,0 +1,89 @@
+import * as O from "fp-ts/Option"
+import { pipe } from "fp-ts/function"
+import { RelayResponse } from "@hoppscotch/kernel"
+import { RunQueryOptions } from "~/helpers/graphql/connection"
+import { OperationType } from "@urql/core"
+import { parseBodyAsJSON } from "~/helpers/functional/json"
+
+export type HoppGQLSuccessResponse = {
+ type: "response"
+ time: number
+ operationName: string | undefined
+ operationType: OperationType
+ data: string
+ rawQuery?: RunQueryOptions
+}
+
+export type GQLTransformError = {
+ type: "error"
+ error: {
+ type: "transform_error"
+ message: string
+ }
+}
+
+type GQLParsedResponse = {
+ data?: unknown
+ errors?: Array<{ message: string }>
+}
+
+const determineOperationType = (query: string): OperationType => {
+ const trimmed = query.trim().toLowerCase()
+ if (trimmed.startsWith("mutation")) return "mutation"
+ if (trimmed.startsWith("subscription")) return "subscription"
+ return "query"
+}
+
+const createTransformError = (message: string): GQLTransformError => ({
+ type: "error",
+ error: {
+ type: "transform_error" as const,
+ message,
+ },
+})
+
+const validateResponse = (data: unknown): GQLParsedResponse | null => {
+ if (typeof data !== "object" || data === null) return null
+
+ const hasValidData = "data" in data && data.data !== undefined
+ const hasValidErrors =
+ "errors" in data &&
+ Array.isArray(data.errors) &&
+ data.errors.every(
+ (e) => typeof e === "object" && e !== null && "message" in e
+ )
+
+ return hasValidData || hasValidErrors ? (data as GQLParsedResponse) : null
+}
+
+export const GQLResponse = {
+ async toResponse(
+ response: RelayResponse,
+ options: RunQueryOptions
+ ): Promise<HoppGQLSuccessResponse | GQLTransformError> {
+ const parsedJSON = pipe(
+ response.body,
+ parseBodyAsJSON<unknown>,
+ O.fold(
+ () => createTransformError("Invalid JSON response"),
+ (json) => {
+ const validBody = validateResponse(json)
+ return validBody
+ ? {
+ type: "response" as const,
+ time: response.meta?.timing
+ ? response.meta.timing.end - response.meta.timing.start
+ : 0,
+ operationName: options.operationName,
+ operationType: determineOperationType(options.query),
+ data: JSON.stringify(validBody, null, 2),
+ rawQuery: options,
+ }
+ : createTransformError("Invalid GraphQL response structure")
+ }
+ )
+ )
+
+ return parsedJSON
+ },
+}
diff --git a/packages/hoppscotch-common/src/helpers/kernel/rest/index.ts b/packages/hoppscotch-common/src/helpers/kernel/rest/index.ts
new file mode 100644
index 000000000..6e2e2a7eb
--- /dev/null
+++ b/packages/hoppscotch-common/src/helpers/kernel/rest/index.ts
@@ -0,0 +1,2 @@
+export { RESTRequest } from "./request"
+export { RESTResponse } from "./response"
diff --git a/packages/hoppscotch-common/src/helpers/kernel/rest/request.ts b/packages/hoppscotch-common/src/helpers/kernel/rest/request.ts
new file mode 100644
index 000000000..bba7fa8f2
--- /dev/null
+++ b/packages/hoppscotch-common/src/helpers/kernel/rest/request.ts
@@ -0,0 +1,40 @@
+import * as TE from "fp-ts/TaskEither"
+import * as T from "fp-ts/Task"
+import * as O from "fp-ts/Option"
+import { pipe } from "fp-ts/function"
+
+import { Method, RelayRequest, ContentType, AuthType } from "@hoppscotch/kernel"
+import { EffectiveHoppRESTRequest } from "~/helpers/utils/EffectiveURL"
+
+import { transformAuth, transformContent } from "~/helpers/kernel/common"
+import { defaultAuth } from "~/helpers/kernel/common/auth"
+import { filterActiveToRecord } from "~/helpers/functional/filter-active"
+
+export const RESTRequest = {
+ async toRequest(request: EffectiveHoppRESTRequest): Promise<RelayRequest> {
+ const auth = await pipe(
+ transformAuth(request.auth),
+ TE.getOrElse(() => T.of<AuthType>(defaultAuth))
+ )()
+
+ const content = await pipe(
+ transformContent(request),
+ TE.getOrElse(() => T.of<O.Option<ContentType>>(O.none)),
+ T.map(O.toUndefined)
+ )()
+
+ const headers = filterActiveToRecord(request.effectiveFinalHeaders)
+ const params = filterActiveToRecord(request.effectiveFinalParams)
+
+ return {
+ id: Date.now(),
+ url: request.effectiveFinalURL,
+ method: request.method.toUpperCase() as Method,
+ version: "HTTP/1.1",
+ headers,
+ params,
+ auth,
+ content,
+ }
+ },
+}
diff --git a/packages/hoppscotch-common/src/helpers/kernel/rest/response.ts b/packages/hoppscotch-common/src/helpers/kernel/rest/response.ts
new file mode 100644
index 000000000..338f54a19
--- /dev/null
+++ b/packages/hoppscotch-common/src/helpers/kernel/rest/response.ts
@@ -0,0 +1,54 @@
+import { RelayResponse } from "@hoppscotch/kernel"
+import { HoppRESTRequest } from "@hoppscotch/data"
+import {
+ HoppRESTResponseHeader,
+ HoppRESTSuccessResponse,
+} from "~/helpers/types/HoppRESTResponse"
+
+export type HoppRESTTransformError = {
+ type: "fail"
+ error: {
+ type: "transform_error"
+ message: string
+ }
+}
+
+const extractTiming = (response: RelayResponse): number =>
+ response.meta?.timing
+ ? response.meta.timing.end - response.meta.timing.start
+ : 0
+
+const extractSize = (response: RelayResponse): number =>
+ response.meta?.size?.total ?? 0
+
+export const RESTResponse = {
+ async toResponse(
+ response: RelayResponse,
+ originalRequest: HoppRESTRequest
+ ): Promise<HoppRESTSuccessResponse | HoppRESTTransformError> {
+ if (!response.body.body || !(response.body.body instanceof Uint8Array)) {
+ return {
+ type: "fail",
+ error: {
+ type: "transform_error",
+ message: "Invalid response body format",
+ },
+ }
+ }
+
+ return {
+ type: "success",
+ headers: Object.entries(response.headers ?? {}).map(
+ ([key, value]) => ({ key, value }) as HoppRESTResponseHeader
+ ),
+ body: response.body.body.buffer,
+ statusCode: response.status,
+ statusText: response.statusText ?? "",
+ meta: {
+ responseSize: extractSize(response),
+ responseDuration: extractTiming(response),
+ },
+ req: originalRequest,
+ }
+ },
+}
diff --git a/packages/hoppscotch-common/src/helpers/network.ts b/packages/hoppscotch-common/src/helpers/network.ts
index 1c0b07e57..d8808be90 100644
--- a/packages/hoppscotch-common/src/helpers/network.ts
+++ b/packages/hoppscotch-common/src/helpers/network.ts
@@ -1,49 +1,16 @@
-import { AxiosRequestConfig } from "axios"
+import * as TE from "fp-ts/TaskEither"
import { BehaviorSubject, Observable } from "rxjs"
import { cloneDeep } from "lodash-es"
-import * as E from "fp-ts/Either"
-import * as TE from "fp-ts/TaskEither"
import { HoppRESTResponse } from "./types/HoppRESTResponse"
import { EffectiveHoppRESTRequest } from "./utils/EffectiveURL"
import { getService } from "~/modules/dioc"
-import {
- InterceptorService,
- NetworkResponse,
-} from "~/services/interceptor.service"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
+import { RESTRequest, RESTResponse } from "~/helpers/kernel/rest"
+import { RelayError } from "@hoppscotch/kernel"
export type NetworkStrategy = (
- req: AxiosRequestConfig
-) => TE.TaskEither<any, NetworkResponse>
-
-function processResponse(
- res: NetworkResponse,
- req: EffectiveHoppRESTRequest,
- backupTimeStart: number,
- backupTimeEnd: number,
- successState: HoppRESTResponse["type"]
-) {
- const contentLength = res.headers["content-length"]
- ? parseInt(res.headers["content-length"])
- : (res.data as ArrayBuffer).byteLength
- return <HoppRESTResponse>{
- type: successState,
- statusCode: res.status,
- statusText: res.statusText,
- body: res.data,
- // If multi headers are present, then we can just use that, else fallback to Axios type
- headers:
- res.additional?.multiHeaders ??
- Object.keys(res.headers).map((x) => ({
- key: x,
- value: res.headers[x],
- })),
- meta: {
- responseSize: contentLength,
- responseDuration: backupTimeEnd - backupTimeStart,
- },
- req,
- }
-}
+ req: EffectiveHoppRESTRequest
+) => TE.TaskEither<RelayError, HoppRESTResponse>
export function createRESTNetworkRequestStream(
request: EffectiveHoppRESTRequest
@@ -55,52 +22,58 @@ export function createRESTNetworkRequestStream(
const req = cloneDeep(request)
- const headers = req.effectiveFinalHeaders.reduce((acc, { key, value }) => {
- return Object.assign(acc, { [key]: value })
- }, {})
+ console.info("[helpers/network]: req", req)
- const params = new URLSearchParams()
- for (const param of req.effectiveFinalParams) {
- params.append(param.key, param.value)
- }
+ const execResult = RESTRequest.toRequest(req).then((kernelRequest) => {
+ console.info("[helpers/network]: kernelRequest", kernelRequest)
- const backupTimeStart = Date.now()
-
- const service = getService(InterceptorService)
+ if (!kernelRequest) {
+ response.next({
+ type: "network_fail",
+ req,
+ error: new Error("Failed to create kernel request"),
+ })
+ response.complete()
+ return
+ }
- const res = service.runRequest({
- method: req.method as any,
- url: req.effectiveFinalURL.trim(),
- headers,
- params,
- data: req.effectiveFinalBody,
+ return service.execute(kernelRequest)
})
- res.response.then((res) => {
- const backupTimeEnd = Date.now()
-
- if (E.isRight(res)) {
- const processedRes = processResponse(
- res.right,
- req,
- backupTimeStart,
- backupTimeEnd,
- "success"
- )
+ const service = getService(KernelInterceptorService)
- response.next(processedRes)
- response.complete()
+ execResult.then((result) => {
+ if (!result) return
- return
- }
+ result.response.then(async (res) => {
+ if (res._tag === "Right") {
+ const processedRes = await RESTResponse.toResponse(res.right, req)
- response.next({
- type: "network_fail",
- req,
- error: res.left,
+ if (processedRes.type === "success") {
+ response.next(processedRes)
+ } else {
+ response.next({
+ type: "network_fail",
+ req,
+ error: processedRes.error,
+ })
+ }
+ } else {
+ response.next({
+ type: "interceptor_error",
+ req,
+ error: res.left,
+ })
+ }
+ response.complete()
})
- response.complete()
})
- return [response, () => res.cancel()]
+ return [
+ response,
+ async () => {
+ const result = await execResult
+ if (result) await result.cancel()
+ },
+ ]
}
diff --git a/packages/hoppscotch-common/src/helpers/oauth.ts b/packages/hoppscotch-common/src/helpers/oauth.ts
index 7c630d4b1..d0daa3db0 100644
--- a/packages/hoppscotch-common/src/helpers/oauth.ts
+++ b/packages/hoppscotch-common/src/helpers/oauth.ts
@@ -1,74 +1,45 @@
-import { getService } from "~/modules/dioc"
-import { PersistenceService } from "~/services/persistence"
-
import * as E from "fp-ts/Either"
import { z } from "zod"
-import { InterceptorService } from "~/services/interceptor.service"
-import { AxiosRequestConfig } from "axios"
-
-const redirectUri = `${window.location.origin}/oauth`
+import { getService } from "~/modules/dioc"
+import { PersistenceService } from "~/services/persistence"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
+import { content } from "@hoppscotch/kernel"
-const interceptorService = getService(InterceptorService)
+const kernelInterceptor = getService(KernelInterceptorService)
const persistenceService = getService(PersistenceService)
-// GENERAL HELPER FUNCTIONS
-
-/**
- * Parse a query string into an object
- *
- * @param {String} searchQuery - The search query params
- * @returns {Object}
- */
+const redirectUri = `${window.location.origin}/oauth`
-const parseQueryString = (searchQuery: string): Record<string, string> => {
- if (searchQuery === "") {
- return {}
- }
- const segments = searchQuery.split("&").map((s) => s.split("="))
- const queryString = segments.reduce(
- (obj, el) => ({ ...obj, [el[0]]: el[1] }),
- {}
- )
- return queryString
+export type TokenRequestParams = {
+ oidcDiscoveryUrl: string
+ grantType: string
+ authUrl: string
+ accessTokenUrl: string
+ clientId: string
+ clientSecret: string
+ scope: string
}
-/**
- * Get OAuth configuration from OpenID Discovery endpoint
- *
- * @returns {Object}
- */
-
-const getTokenConfiguration = async (endpoint: string) => {
- const options = {
+async function getTokenConfiguration(endpoint: string) {
+ const { response } = kernelInterceptor.execute({
+ id: Date.now(),
+ url: endpoint,
method: "GET",
+ version: "HTTP/1.1",
headers: {
- "Content-type": "application/json",
+ "Content-Type": ["application/json"],
},
- }
- try {
- const res = await runRequestThroughInterceptor({
- url: endpoint,
- ...options,
- })
+ })
- if (E.isLeft(res)) {
- return E.left("OIDC_DISCOVERY_FAILED")
- }
+ const result = await response
+ if (E.isLeft(result)) return E.left("OIDC_DISCOVERY_FAILED")
- return E.right(JSON.parse(res.right))
- } catch (e) {
- return E.left("OIDC_DISCOVERY_FAILED")
- }
-}
+ const jsonContent = result.right.content
+ if (jsonContent.kind !== "json") return E.left("OIDC_DISCOVERY_FAILED")
-// PKCE HELPER FUNCTIONS
-
-/**
- * Generates a secure random string using the browser crypto functions
- *
- * @returns {Object}
- */
+ return E.right(jsonContent.content)
+}
const generateRandomString = () => {
const array = new Uint32Array(28)
@@ -76,71 +47,22 @@ const generateRandomString = () => {
return Array.from(array, (dec) => `0${dec.toString(16)}`.slice(-2)).join("")
}
-/**
- * Calculate the SHA256 hash of the input text
- *
- * @returns {Promise<ArrayBuffer>}
- */
-
-const sha256 = (plain: string) => {
- const encoder = new TextEncoder()
- const data = encoder.encode(plain)
- return window.crypto.subtle.digest("SHA-256", data)
-}
-
-/**
- * Encodes the input string into Base64 format
- *
- * @param {String} str - The string to be converted
- * @returns {Promise<ArrayBuffer>}
- */
-
-const base64urlencode = (
- str: ArrayBuffer // Converts the ArrayBuffer to string using Uint8 array to convert to what btoa accepts.
-) => {
+const base64urlencode = (str: ArrayBuffer) => {
const hashArray = Array.from(new Uint8Array(str))
-
- // btoa accepts chars only within ascii 0-255 and base64 encodes them.
- // Then convert the base64 encoded to base64url encoded
- // (replace + with -, replace / with _, trim trailing =)
return btoa(String.fromCharCode.apply(null, hashArray))
.replace(/\+/g, "-")
.replace(/\//g, "_")
.replace(/=+$/, "")
}
-/**
- * Return the base64-urlencoded sha256 hash for the PKCE challenge
- *
- * @param {String} v - The randomly generated string
- * @returns {String}
- */
-
const pkceChallengeFromVerifier = async (v: string) => {
- const hashed = await sha256(v)
+ const encoder = new TextEncoder()
+ const data = encoder.encode(v)
+ const hashed = await window.crypto.subtle.digest("SHA-256", data)
return base64urlencode(hashed)
}
-// OAUTH REQUEST
-
-type TokenRequestParams = {
- oidcDiscoveryUrl: string
- grantType: string
- authUrl: string
- accessTokenUrl: string
- clientId: string
- clientSecret: string
- scope: string
-}
-
-/**
- * Initiates PKCE Auth Code flow when requested
- *
- * @param {Object} - The necessary params
- * @returns {Void}
- */
-
-const tokenRequest = async ({
+export const tokenRequest = async ({
oidcDiscoveryUrl,
grantType,
authUrl,
@@ -157,123 +79,91 @@ const tokenRequest = async ({
token_endpoint: z.string(),
})
- if (E.isLeft(res)) {
- return E.left("OIDC_DISCOVERY_FAILED" as const)
- }
+ if (E.isLeft(res)) return E.left("OIDC_DISCOVERY_FAILED")
const parsedOIDCConfiguration = OIDCConfigurationSchema.safeParse(res.right)
-
- if (!parsedOIDCConfiguration.success) {
- return E.left("OIDC_DISCOVERY_FAILED" as const)
- }
+ if (!parsedOIDCConfiguration.success) return E.left("OIDC_DISCOVERY_FAILED")
authUrl = parsedOIDCConfiguration.data.authorization_endpoint
accessTokenUrl = parsedOIDCConfiguration.data.token_endpoint
}
- // Store oauth information
- persistenceService.setLocalConfig("tokenEndpoint", accessTokenUrl)
- persistenceService.setLocalConfig("client_id", clientId)
- persistenceService.setLocalConfig("client_secret", clientSecret)
- // Create and store a random state value
+ await persistenceService.setLocalConfig("tokenEndpoint", accessTokenUrl)
+ await persistenceService.setLocalConfig("client_id", clientId)
+ await persistenceService.setLocalConfig("client_secret", clientSecret)
+
const state = generateRandomString()
- persistenceService.setLocalConfig("pkce_state", state)
+ await persistenceService.setLocalConfig("pkce_state", state)
- // Create and store a new PKCE codeVerifier (the plaintext random secret)
const codeVerifier = generateRandomString()
- persistenceService.setLocalConfig("pkce_codeVerifier", codeVerifier)
+ await persistenceService.setLocalConfig("pkce_codeVerifier", codeVerifier)
- // Hash and base64-urlencode the secret to use as the challenge
const codeChallenge = await pkceChallengeFromVerifier(codeVerifier)
- // Build the authorization URL
- const buildUrl = () =>
- `${authUrl + `?response_type=${grantType}`}&client_id=${encodeURIComponent(
- clientId
- )}&state=${encodeURIComponent(state)}&scope=${encodeURIComponent(
- scope
- )}&redirect_uri=${encodeURIComponent(
- redirectUri
- )}&code_challenge=${encodeURIComponent(
- codeChallenge
- )}&code_challenge_method=S256`
-
- // Redirect to the authorization server
- window.location.assign(buildUrl())
-}
-
-// OAUTH REDIRECT HANDLING
-
-/**
- * Handle the redirect back from the authorization server and
- * get an access token from the token endpoint
- *
- * @returns {Promise<any | void>}
- */
-
-const handleOAuthRedirect = async () => {
- const queryParams = parseQueryString(window.location.search.substring(1))
-
- // Check if the server returned an error string
- if (queryParams.error) {
- return E.left("AUTH_SERVER_RETURNED_ERROR" as const)
- }
-
- if (!queryParams.code) {
- return E.left("NO_AUTH_CODE" as const)
- }
-
- // If the server returned an authorization code, attempt to exchange it for an access token
- // Verify state matches what we set at the beginning
- if (persistenceService.getLocalConfig("pkce_state") !== queryParams.state) {
- return E.left("INVALID_STATE" as const)
- }
+ const url = new URL(authUrl)
+ url.searchParams.set("response_type", grantType)
+ url.searchParams.set("client_id", clientId)
+ url.searchParams.set("state", state)
+ url.searchParams.set("scope", scope)
+ url.searchParams.set("redirect_uri", redirectUri)
+ url.searchParams.set("code_challenge", codeChallenge)
+ url.searchParams.set("code_challenge_method", "S256")
- const tokenEndpoint = persistenceService.getLocalConfig("tokenEndpoint")
- const clientID = persistenceService.getLocalConfig("client_id")
- const clientSecret = persistenceService.getLocalConfig("client_secret")
- const codeVerifier = persistenceService.getLocalConfig("pkce_codeVerifier")
+ window.location.assign(url.toString())
+}
- if (!tokenEndpoint) {
- return E.left("NO_TOKEN_ENDPOINT" as const)
- }
+export const handleOAuthRedirect = async () => {
+ const queryParams = Object.fromEntries(
+ new URLSearchParams(window.location.search)
+ )
- if (!clientID) {
- return E.left("NO_CLIENT_ID" as const)
+ if (queryParams.error) return E.left("AUTH_SERVER_RETURNED_ERROR")
+ if (!queryParams.code) return E.left("NO_AUTH_CODE")
+ if (
+ (await persistenceService.getLocalConfig("pkce_state")) !==
+ queryParams.state
+ ) {
+ return E.left("INVALID_STATE")
}
- if (!clientSecret) {
- return E.left("NO_CLIENT_SECRET" as const)
- }
+ const tokenEndpoint = await persistenceService.getLocalConfig("tokenEndpoint")
+ const clientID = await persistenceService.getLocalConfig("client_id")
+ const clientSecret = await persistenceService.getLocalConfig("client_secret")
+ const codeVerifier =
+ await persistenceService.getLocalConfig("pkce_codeVerifier")
- if (!codeVerifier) {
- return E.left("NO_CODE_VERIFIER" as const)
- }
+ if (!tokenEndpoint) return E.left("NO_TOKEN_ENDPOINT")
+ if (!clientID) return E.left("NO_CLIENT_ID")
+ if (!clientSecret) return E.left("NO_CLIENT_SECRET")
+ if (!codeVerifier) return E.left("NO_CODE_VERIFIER")
- const data = new URLSearchParams({
+ const requestParams = {
grant_type: "authorization_code",
code: queryParams.code,
client_id: clientID,
client_secret: clientSecret,
redirect_uri: redirectUri,
code_verifier: codeVerifier,
- })
+ }
- // Exchange the authorization code for an access token
- const tokenResponse = await runRequestThroughInterceptor({
+ const { response } = kernelInterceptor.execute({
+ id: Date.now(),
url: tokenEndpoint,
- data: data.toString(),
method: "POST",
+ version: "HTTP/1.1",
headers: {
- "Content-Type": "application/x-www-form-urlencoded",
+ "Content-Type": ["application/x-www-form-urlencoded"],
},
+ content: content.urlencoded(requestParams),
})
- // Clean these up since we don't need them anymore
clearPKCEState()
- if (E.isLeft(tokenResponse)) {
- return E.left("AUTH_TOKEN_REQUEST_FAILED" as const)
+ const result = await response
+ if (E.isLeft(result)) return E.left("AUTH_TOKEN_REQUEST_FAILED")
+
+ if (result.right.content.kind !== "json") {
+ return E.left("AUTH_TOKEN_REQUEST_FAILED")
}
const withAccessTokenSchema = z.object({
@@ -281,36 +171,18 @@ const handleOAuthRedirect = async () => {
})
const parsedTokenResponse = withAccessTokenSchema.safeParse(
- JSON.parse(tokenResponse.right)
+ result.right.content.content
)
return parsedTokenResponse.success
? E.right(parsedTokenResponse.data)
- : E.left("AUTH_TOKEN_REQUEST_INVALID_RESPONSE" as const)
+ : E.left("AUTH_TOKEN_REQUEST_INVALID_RESPONSE")
}
-const clearPKCEState = () => {
- persistenceService.removeLocalConfig("pkce_state")
- persistenceService.removeLocalConfig("pkce_codeVerifier")
- persistenceService.removeLocalConfig("tokenEndpoint")
- persistenceService.removeLocalConfig("client_id")
- persistenceService.removeLocalConfig("client_secret")
+const clearPKCEState = async () => {
+ await persistenceService.removeLocalConfig("pkce_state")
+ await persistenceService.removeLocalConfig("pkce_codeVerifier")
+ await persistenceService.removeLocalConfig("tokenEndpoint")
+ await persistenceService.removeLocalConfig("client_id")
+ await persistenceService.removeLocalConfig("client_secret")
}
-
-async function runRequestThroughInterceptor(config: AxiosRequestConfig) {
- const res = await interceptorService.runRequest(config).response
-
- if (E.isLeft(res)) {
- return E.left("REQUEST_FAILED")
- }
-
- // convert ArrayBuffer to string
- if (!(res.right.data instanceof ArrayBuffer)) {
- return E.left("REQUEST_FAILED")
- }
-
- const data = new TextDecoder().decode(res.right.data).replace(/\0+$/, "")
- return E.right(data)
-}
-
-export { tokenRequest, handleOAuthRedirect }
diff --git a/packages/hoppscotch-common/src/helpers/teams/TeamsSearch.service.ts b/packages/hoppscotch-common/src/helpers/teams/TeamsSearch.service.ts
index 0f6c7e1ea..e72a1a378 100644
--- a/packages/hoppscotch-common/src/helpers/teams/TeamsSearch.service.ts
+++ b/packages/hoppscotch-common/src/helpers/teams/TeamsSearch.service.ts
@@ -211,7 +211,12 @@ export class TeamSearchService extends Service {
this.searchResultsRequests = {}
this.expandedCollections.value = []
- const axiosPlatformConfig = platform.auth.axiosPlatformConfig?.() ?? {}
+ const getAxiosPlatformConfig = async () => {
+ await platform.auth.waitProbableLoginToConfirm()
+ return platform.auth.axiosPlatformConfig?.() ?? {}
+ }
+
+ const axiosPlatformConfig = await getAxiosPlatformConfig()
try {
const searchResponse = await axios.get(
diff --git a/packages/hoppscotch-common/src/helpers/types/HoppRESTResponse.ts b/packages/hoppscotch-common/src/helpers/types/HoppRESTResponse.ts
index f5032d4d2..a1036b24f 100644
--- a/packages/hoppscotch-common/src/helpers/types/HoppRESTResponse.ts
+++ b/packages/hoppscotch-common/src/helpers/types/HoppRESTResponse.ts
@@ -1,49 +1,69 @@
import { HoppRESTRequest } from "@hoppscotch/data"
import { Component } from "vue"
+import { KernelInterceptorError } from "~/services/kernel-interceptor.service"
export type HoppRESTResponseHeader = { key: string; value: string }
+export type HoppRESTSuccessResponse = {
+ type: "success"
+ headers: HoppRESTResponseHeader[]
+ body: ArrayBuffer
+ statusCode: number
+ statusText: string
+ meta: {
+ responseSize: number // in bytes
+ responseDuration: number // in millis
+ }
+ req: HoppRESTRequest
+}
+
+export type HoppRESTFailureResponse = {
+ type: "failure"
+ headers: HoppRESTResponseHeader[]
+ body: ArrayBuffer
+ statusCode: number
+ statusText: string
+ meta: {
+ responseSize: number // in bytes
+ responseDuration: number // in millis
+ }
+ req: HoppRESTRequest
+}
+
+export type HoppRESTFailureNetwork = {
+ type: "network_fail"
+ error: unknown
+ req: HoppRESTRequest
+}
+
+export type HoppRESTFailureScript = {
+ type: "script_fail"
+ error: Error
+}
+
+export type HoppRESTErrorExtension = {
+ type: "extension_error"
+ error: string
+ component: Component
+ req: HoppRESTRequest
+}
+
+export type HoppRESTErrorInterceptor = {
+ type: "interceptor_error"
+ error: KernelInterceptorError
+ req: HoppRESTRequest
+}
+
+export type HoppRESTLoadingResponse = {
+ type: "loading"
+ req: HoppRESTRequest
+}
+
export type HoppRESTResponse =
- | { type: "loading"; req: HoppRESTRequest }
- | {
- type: "fail"
- headers: HoppRESTResponseHeader[]
- body: ArrayBuffer
- statusCode: number
- statusText: string
- meta: {
- responseSize: number // in bytes
- responseDuration: number // in millis
- }
-
- req: HoppRESTRequest
- }
- | {
- type: "network_fail"
- error: unknown
-
- req: HoppRESTRequest
- }
- | {
- type: "script_fail"
- error: Error
- }
- | {
- type: "success"
- headers: HoppRESTResponseHeader[]
- body: ArrayBuffer
- statusCode: number
- statusText: string
- meta: {
- responseSize: number // in bytes
- responseDuration: number // in millis
- }
-
- req: HoppRESTRequest
- }
- | {
- type: "extension_error"
- error: string
- component: Component
- req: HoppRESTRequest
- }
+ | HoppRESTLoadingResponse
+ | HoppRESTSuccessResponse
+ | HoppRESTFailureResponse
+ | HoppRESTFailureNetwork
+ | HoppRESTFailureScript
+ | HoppRESTFailureExtension
+ | HoppRESTFailureInterceptor
diff --git a/packages/hoppscotch-common/src/index.ts b/packages/hoppscotch-common/src/index.ts
index db618d9ad..dff7b9f8e 100644
--- a/packages/hoppscotch-common/src/index.ts
+++ b/packages/hoppscotch-common/src/index.ts
@@ -1,9 +1,7 @@
import { HOPP_MODULES } from "@modules/."
import { createApp } from "vue"
-import { initializeApp } from "./helpers/app"
-import { initBackendGQLClient } from "./helpers/backend/GQLClient"
-import { performMigrations } from "./helpers/migrations"
import { PlatformDef, setPlatformDef } from "./platform"
+import { initKernel, getKernelMode } from "@hoppscotch/kernel"
import "../assets/scss/tailwind.scss"
import "../assets/themes/themes.scss"
@@ -14,27 +12,37 @@ import "unfonts.css"
import App from "./App.vue"
import { getService } from "./modules/dioc"
-import { PersistenceService } from "./services/persistence"
+import { InitializationService } from "./services/initialization.service"
-export function createHoppApp(el: string | Element, platformDef: PlatformDef) {
+export async function createHoppApp(
+ el: string | Element,
+ platformDef: PlatformDef
+) {
+ initKernel(getKernelMode())
setPlatformDef(platformDef)
const app = createApp(App)
- // Some basic work that needs to be done before module inits even
- initBackendGQLClient()
- initializeApp()
+ // Initialize core services before app mounting
+ const initService = getService(InitializationService)
+
+ await initService.initPre()
+
+ try {
+ await initService.initAuthAndSync()
+ } catch {
+ console.error(
+ "Failed connecting to the backend, make sure the service is running and accessible on the network"
+ )
+ }
HOPP_MODULES.forEach((mod) => mod.onVueAppInit?.(app))
platformDef.addedHoppModules?.forEach((mod) => mod.onVueAppInit?.(app))
- // TODO: Explore possibilities of moving this invocation to the service constructor
- // `toast` was coming up as `null` in the previous attempts
- getService(PersistenceService).setupLocalPersistence()
- performMigrations()
-
app.mount(el)
+ await initService.initPost()
+
console.info(
"%cWE ♥️ OPEN SOURCE",
"margin:8px 0;font-family:sans-serif;font-weight:600;font-size:60px;color:violet;"
diff --git a/packages/hoppscotch-common/src/kernel/index.ts b/packages/hoppscotch-common/src/kernel/index.ts
new file mode 100644
index 000000000..add8a56fd
--- /dev/null
+++ b/packages/hoppscotch-common/src/kernel/index.ts
@@ -0,0 +1,13 @@
+import { KernelAPI } from "@hoppscotch/kernel"
+
+export { Io } from "./io"
+export { Relay } from "./relay"
+export { Store } from "./store"
+
+export const getModule = <K extends keyof KernelAPI>(
+ name: K
+): NonNullable<KernelAPI[K]> => {
+ const kernel = window.__KERNEL__
+ if (!kernel?.[name]) throw new Error(`Kernel ${name} not initialized`)
+ return kernel[name]
+}
diff --git a/packages/hoppscotch-common/src/kernel/io.ts b/packages/hoppscotch-common/src/kernel/io.ts
new file mode 100644
index 000000000..bf55cf8d2
--- /dev/null
+++ b/packages/hoppscotch-common/src/kernel/io.ts
@@ -0,0 +1,34 @@
+import type {
+ SaveFileWithDialogOptions,
+ OpenExternalLinkOptions,
+ SaveFileResponse,
+ OpenExternalLinkResponse,
+ EventCallback,
+ UnlistenFn,
+} from "@hoppscotch/kernel"
+import { getModule } from "."
+
+export const Io = (() => {
+ const module = () => getModule("io")
+
+ return {
+ saveFileWithDialog: (
+ opts: SaveFileWithDialogOptions
+ ): Promise<SaveFileResponse> => module().saveFileWithDialog(opts),
+
+ openExternalLink: (
+ opts: OpenExternalLinkOptions
+ ): Promise<OpenExternalLinkResponse> => module().openExternalLink(opts),
+
+ listen: <T>(
+ event: string,
+ handler: EventCallback<T>
+ ): Promise<UnlistenFn> => module().listen(event, handler),
+
+ once: <T>(event: string, handler: EventCallback<T>): Promise<UnlistenFn> =>
+ module().once(event, handler),
+
+ emit: (event: string, payload?: unknown): Promise<void> =>
+ module().emit(event, payload),
+ } as const
+})()
diff --git a/packages/hoppscotch-common/src/kernel/relay.ts b/packages/hoppscotch-common/src/kernel/relay.ts
new file mode 100644
index 000000000..46a8d4ea4
--- /dev/null
+++ b/packages/hoppscotch-common/src/kernel/relay.ts
@@ -0,0 +1,26 @@
+import type {
+ RelayRequest,
+ RelayRequestEvents,
+ RelayError,
+ RelayResponse,
+ RelayEventEmitter,
+} from "@hoppscotch/kernel"
+import * as E from "fp-ts/Either"
+import { getModule } from "."
+
+export const Relay = (() => {
+ const module = () => getModule("relay")
+
+ return {
+ capabilities: () => module().capabilities,
+ canHandle: (request: RelayRequest): E.Either<RelayError, true> =>
+ module().canHandle(request),
+ execute: (
+ request: RelayRequest
+ ): {
+ cancel: () => Promise<void>
+ emitter: RelayEventEmitter<RelayRequestEvents>
+ response: Promise<E.Either<RelayError, RelayResponse>>
+ } => module().execute(request),
+ } as const
+})()
diff --git a/packages/hoppscotch-common/src/kernel/store.ts b/packages/hoppscotch-common/src/kernel/store.ts
new file mode 100644
index 000000000..fa0756bce
--- /dev/null
+++ b/packages/hoppscotch-common/src/kernel/store.ts
@@ -0,0 +1,46 @@
+import type {
+ StorageOptions,
+ StoreError,
+ StoreEvents,
+ StoreEventEmitter,
+} from "@hoppscotch/kernel"
+import * as E from "fp-ts/Either"
+import { getModule } from "."
+
+export const Store = (() => {
+ const module = () => getModule("store")
+
+ return {
+ capabilities: () => module().capabilities,
+ init: () => module().init(),
+ set: (
+ namespace: string,
+ key: string,
+ value: unknown,
+ options?: StorageOptions
+ ): Promise<E.Either<StoreError, void>> =>
+ module().set(namespace, key, value, options),
+ get: <T>(
+ namespace: string,
+ key: string
+ ): Promise<E.Either<StoreError, T | undefined>> =>
+ module().get<T>(namespace, key),
+ remove: (
+ namespace: string,
+ key: string
+ ): Promise<E.Either<StoreError, boolean>> =>
+ module().remove(namespace, key),
+ clear: (namespace?: string): Promise<E.Either<StoreError, void>> =>
+ module().clear(namespace),
+ has: (
+ namespace: string,
+ key: string
+ ): Promise<E.Either<StoreError, boolean>> => module().has(namespace, key),
+ listNamespaces: (): Promise<E.Either<StoreError, string[]>> =>
+ module().listNamespaces(),
+ listKeys: (namespace: string): Promise<E.Either<StoreError, string[]>> =>
+ module().listKeys(namespace),
+ watch: (namespace: string, key: string): StoreEventEmitter<StoreEvents> =>
+ module().watch(namespace, key),
+ } as const
+})()
diff --git a/packages/hoppscotch-common/src/layouts/default.vue b/packages/hoppscotch-common/src/layouts/default.vue
index 8edb88a5d..2959b8502 100644
--- a/packages/hoppscotch-common/src/layouts/default.vue
+++ b/packages/hoppscotch-common/src/layouts/default.vue
@@ -118,9 +118,9 @@ onBeforeMount(() => {
}
})
-onMounted(() => {
+onMounted(async () => {
const cookiesAllowed =
- persistenceService.getLocalConfig("cookiesAllowed") === "yes"
+ (await persistenceService.getLocalConfig("cookiesAllowed")) === "yes"
const platformAllowsCookiePrompts =
platform.platformFeatureFlags.promptAsUsingCookies ?? true
@@ -130,8 +130,8 @@ onMounted(() => {
action: [
{
text: `${t("action.learn_more")}`,
- onClick: (_, toastObject) => {
- persistenceService.setLocalConfig("cookiesAllowed", "yes")
+ onClick: async (_, toastObject) => {
+ await persistenceService.setLocalConfig("cookiesAllowed", "yes")
toastObject.goAway(0)
window
.open("https://docs.hoppscotch.io/support/privacy", "_blank")
@@ -140,8 +140,8 @@ onMounted(() => {
},
{
text: `${t("action.dismiss")}`,
- onClick: (_, toastObject) => {
- persistenceService.setLocalConfig("cookiesAllowed", "yes")
+ onClick: async (_, toastObject) => {
+ await persistenceService.setLocalConfig("cookiesAllowed", "yes")
toastObject.goAway(0)
},
},
diff --git a/packages/hoppscotch-common/src/modules/i18n.ts b/packages/hoppscotch-common/src/modules/i18n.ts
index 3bdde0fb5..c56096436 100644
--- a/packages/hoppscotch-common/src/modules/i18n.ts
+++ b/packages/hoppscotch-common/src/modules/i18n.ts
@@ -71,10 +71,10 @@ let i18nInstance: I18n<
true
> | null = null
-const resolveCurrentLocale = () =>
+const resolveCurrentLocale = async () =>
pipe(
// Resolve from locale and make sure it is in languages
- persistenceService.getLocalConfig("locale"),
+ await persistenceService.getLocalConfig("locale"),
O.fromNullable,
O.filter((locale) =>
pipe(
@@ -123,7 +123,7 @@ export const changeAppLanguage = async (locale: string) => {
// TODO: Look into the type issues here
i18nInstance.global.locale.value = locale
- persistenceService.setLocalConfig("locale", locale)
+ await persistenceService.setLocalConfig("locale", locale)
}
/**
@@ -134,7 +134,7 @@ export function getI18n() {
}
export default <HoppModule>{
- onVueAppInit(app) {
+ async onVueAppInit(app) {
const i18n = createI18n(<I18nOptions>{
locale: "en", // TODO: i18n system!
fallbackLocale: "en",
@@ -153,10 +153,10 @@ export default <HoppModule>{
)
// TODO: Global loading state to hide the resolved lang loading
- const currentLocale = resolveCurrentLocale()
+ const currentLocale = await resolveCurrentLocale()
changeAppLanguage(currentLocale)
- persistenceService.setLocalConfig("locale", currentLocale)
+ await persistenceService.setLocalConfig("locale", currentLocale)
},
onBeforeRouteChange(to, _, router) {
// Convert old locale path format to new format
diff --git a/packages/hoppscotch-common/src/modules/index.ts b/packages/hoppscotch-common/src/modules/index.ts
index b4c63f694..0c5037b89 100644
--- a/packages/hoppscotch-common/src/modules/index.ts
+++ b/packages/hoppscotch-common/src/modules/index.ts
@@ -4,6 +4,12 @@ import * as A from "fp-ts/Array"
import { RouteLocationNormalized, Router } from "vue-router"
export type HoppModule = {
+ /**
+ * Optional flag to mark a module as deprecated.
+ * Deprecated modules will be filtered out during initialization.
+ */
+ deprecated?: boolean
+
/**
* Define this function to get access to Vue App instance and augment
* it (installing components, directives and plugins). Also useful for
@@ -48,5 +54,6 @@ export type HoppModule = {
export const HOPP_MODULES = pipe(
import.meta.glob("@modules/*.ts", { eager: true }),
Object.values,
- A.map(({ default: defaultVal }) => defaultVal as HoppModule)
+ A.map(({ default: defaultVal }) => defaultVal as HoppModule),
+ A.filter((module) => !module.deprecated)
)
diff --git a/packages/hoppscotch-common/src/modules/interceptors.ts b/packages/hoppscotch-common/src/modules/interceptors.ts
index 43d71a322..286702964 100644
--- a/packages/hoppscotch-common/src/modules/interceptors.ts
+++ b/packages/hoppscotch-common/src/modules/interceptors.ts
@@ -7,6 +7,7 @@ import { applySetting } from "~/newstore/settings"
import { useSettingStatic } from "~/composables/settings"
export default <HoppModule>{
+ deprecated: true,
onVueAppInit() {
const interceptorService = getService(InterceptorService)
diff --git a/packages/hoppscotch-common/src/modules/kernel-interceptors.ts b/packages/hoppscotch-common/src/modules/kernel-interceptors.ts
new file mode 100644
index 000000000..636b7c81f
--- /dev/null
+++ b/packages/hoppscotch-common/src/modules/kernel-interceptors.ts
@@ -0,0 +1,68 @@
+import { watch } from "vue"
+import { HoppModule } from "."
+import { getService } from "./dioc"
+import { platform } from "~/platform"
+import { applySetting } from "~/newstore/settings"
+import { useSettingStatic } from "~/composables/settings"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
+
+export default <HoppModule>{
+ onVueAppInit() {
+ const kernelInterceptorService = initKernelInterceptorService()
+ setupInterceptorSync(kernelInterceptorService)
+ },
+}
+
+function initKernelInterceptorService(): KernelInterceptorService {
+ const service = getService(KernelInterceptorService)
+
+ registerInterceptors(service)
+ initializeDefaultInterceptor(service)
+
+ return service
+}
+
+function registerInterceptors(service: KernelInterceptorService): void {
+ platform.kernelInterceptors.interceptors.forEach((interceptorDef) => {
+ if (interceptorDef.type === "standalone") {
+ service.register(interceptorDef.interceptor)
+ } else {
+ const interceptorService = getService(interceptorDef.service)
+ service.register(interceptorService)
+ }
+ })
+}
+
+function initializeDefaultInterceptor(service: KernelInterceptorService): void {
+ service.setActive(platform.kernelInterceptors.default)
+}
+
+function setupInterceptorSync(service: KernelInterceptorService): void {
+ syncServiceToSettings(service)
+ syncSettingsToService(service)
+}
+
+function syncServiceToSettings(service: KernelInterceptorService): void {
+ watch(
+ () => service.current.value?.id,
+ (id) => {
+ applySetting(
+ "CURRENT_KERNEL_INTERCEPTOR_ID",
+ id ?? platform.kernelInterceptors.default
+ )
+ }
+ )
+}
+
+function syncSettingsToService(service: KernelInterceptorService): void {
+ const [setting] = useSettingStatic("CURRENT_KERNEL_INTERCEPTOR_ID")
+
+ watch(
+ setting,
+ () => {
+ const fallback = setting.value ?? platform.kernelInterceptors.default
+ service.setActive(fallback)
+ },
+ { immediate: true }
+ )
+}
diff --git a/packages/hoppscotch-common/src/newstore/MQTTSession.ts b/packages/hoppscotch-common/src/newstore/MQTTSession.ts
index d328901bb..4657da670 100644
--- a/packages/hoppscotch-common/src/newstore/MQTTSession.ts
+++ b/packages/hoppscotch-common/src/newstore/MQTTSession.ts
@@ -16,7 +16,7 @@ type MQTTTab = {
type HoppMQTTRequest = {
endpoint: string
- clientID: string
+ clientID?: string
}
type HoppMQTTSession = {
diff --git a/packages/hoppscotch-common/src/newstore/settings.ts b/packages/hoppscotch-common/src/newstore/settings.ts
index 3028af6c8..eeb28d034 100644
--- a/packages/hoppscotch-common/src/newstore/settings.ts
+++ b/packages/hoppscotch-common/src/newstore/settings.ts
@@ -55,6 +55,7 @@ export type SettingsDef = {
}
CURRENT_INTERCEPTOR_ID: string
+ CURRENT_KERNEL_INTERCEPTOR_ID: string
URL_EXCLUDES: {
auth: boolean
@@ -117,6 +118,7 @@ export const getDefaultSettings = (): SettingsDef => {
// Set empty because interceptor module will set the default value
CURRENT_INTERCEPTOR_ID: "",
+ CURRENT_KERNEL_INTERCEPTOR_ID: "",
// TODO: Interceptor related settings should move under the interceptor systems
PROXY_URL: defaultProxyURL,
diff --git a/packages/hoppscotch-common/src/pages/index.vue b/packages/hoppscotch-common/src/pages/index.vue
index 53c949c58..fff26994c 100644
--- a/packages/hoppscotch-common/src/pages/index.vue
+++ b/packages/hoppscotch-common/src/pages/index.vue
@@ -144,15 +144,13 @@ import { platform } from "~/platform"
import { useReadonlyStream } from "~/composables/stream"
import { useService } from "dioc/vue"
import { InspectionService } from "~/services/inspection"
-import { HeaderInspectorService } from "~/services/inspection/inspectors/header.inspector"
+import { RequestInspectorService } from "~/services/inspection/inspectors/request.inspector"
import { EnvironmentInspectorService } from "~/services/inspection/inspectors/environment.inspector"
-import { InterceptorsInspectorService } from "~/services/inspection/inspectors/interceptors.inspector"
import { ResponseInspectorService } from "~/services/inspection/inspectors/response.inspector"
import { cloneDeep } from "lodash-es"
import { RESTTabService } from "~/services/tab/rest"
import { HoppTab } from "~/services/tab"
import { HoppRequestDocument, HoppTabDocument } from "~/helpers/rest/document"
-import { AuthorizationInspectorService } from "~/services/inspection/inspectors/authorization.inspector"
const savingRequest = ref(false)
const confirmingCloseForTabID = ref<string | null>(null)
@@ -414,11 +412,9 @@ defineActionHandler("tab.close-other", () => {
})
defineActionHandler("tab.open-new", addNewTab)
-useService(HeaderInspectorService)
+useService(RequestInspectorService)
useService(EnvironmentInspectorService)
useService(ResponseInspectorService)
-useService(AuthorizationInspectorService)
-useService(InterceptorsInspectorService)
for (const inspectorDef of platform.additionalInspectors ?? []) {
useService(inspectorDef.service)
diff --git a/packages/hoppscotch-common/src/pages/oauth.vue b/packages/hoppscotch-common/src/pages/oauth.vue
index 5a94bc6d0..6b2f7a2e3 100644
--- a/packages/hoppscotch-common/src/pages/oauth.vue
+++ b/packages/hoppscotch-common/src/pages/oauth.vue
@@ -69,7 +69,7 @@ function translateOAuthRedirectError(error: string) {
onMounted(async () => {
const localOAuthTempConfig =
- persistenceService.getLocalConfig("oauth_temp_config")
+ await persistenceService.getLocalConfig("oauth_temp_config")
if (!localOAuthTempConfig) {
toast.error(t("authorization.oauth.something_went_wrong_on_oauth_redirect"))
@@ -102,7 +102,7 @@ onMounted(async () => {
authConfig.refresh_token = tokenInfo.right.refresh_token
}
- persistenceService.setLocalConfig(
+ await persistenceService.setLocalConfig(
"oauth_temp_config",
JSON.stringify(authConfig)
)
diff --git a/packages/hoppscotch-common/src/pages/settings.vue b/packages/hoppscotch-common/src/pages/settings.vue
index 5b88e71ef..b7cbc3a12 100644
--- a/packages/hoppscotch-common/src/pages/settings.vue
+++ b/packages/hoppscotch-common/src/pages/settings.vue
@@ -197,6 +197,7 @@
</div>
</div>
+ <!-- NOTE: Old interceptors
<div class="md:grid md:grid-cols-3 md:gap-4">
<div class="p-8 md:col-span-1">
<h3 class="heading">
@@ -221,6 +222,35 @@
</section>
</div>
</div>
+ -->
+
+ <div class="md:grid md:grid-cols-3 md:gap-4">
+ <div class="p-8 md:col-span-1">
+ <h3 class="heading">
+ {{ t("settings.kernel_interceptor") }}
+ </h3>
+ <p class="my-1 text-secondaryLight">
+ {{ t("settings.kernel_interceptor_description") }}
+ </p>
+ </div>
+ <div class="space-y-8 p-8 md:col-span-2">
+ <section class="flex flex-col space-y-2">
+ <h4 class="font-semibold text-secondaryDark">
+ {{ t("settings.kernel_interceptor") }}
+ </h4>
+ <AppKernelInterceptor :is-tooltip-component="false" />
+ </section>
+ <section
+ v-for="[id, settings] in kernelInterceptorsWithSettings"
+ :key="id"
+ >
+ <h4 class="font-semibold text-secondaryDark">
+ {{ settings.title(t) }}
+ </h4>
+ <component :is="settings.component" />
+ </section>
+ </div>
+ </div>
<template v-if="platform.ui?.additionalSettingsSections?.length">
<template
@@ -255,12 +285,14 @@ import { useI18n } from "@composables/i18n"
import { useColorMode } from "@composables/theming"
import { usePageHead } from "@composables/head"
import { useService } from "dioc/vue"
-import { InterceptorService } from "~/services/interceptor.service"
+// NOTE: Old interceptors
+// import { InterceptorService } from "~/services/interceptor.service"
import { pipe } from "fp-ts/function"
import * as O from "fp-ts/Option"
import * as A from "fp-ts/Array"
import { platform } from "~/platform"
import IconDone from "~icons/lucide/check"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
const t = useI18n()
const colorMode = useColorMode()
@@ -269,21 +301,39 @@ usePageHead({
title: computed(() => t("navigation.settings")),
})
-const interceptorService = useService(InterceptorService)
-const interceptorsWithSettings = computed(() =>
+const kernelInterceptorService: KernelInterceptorService = useService(
+ KernelInterceptorService
+)
+const kernelInterceptorsWithSettings = computed(() =>
pipe(
- interceptorService.availableInterceptors.value,
- A.filterMap((interceptor) =>
- interceptor.settingsPageEntry
+ kernelInterceptorService.available.value,
+ A.filterMap((kernelInterceptor) =>
+ kernelInterceptor.settingsEntry
? O.some([
- interceptor.interceptorID,
- interceptor.settingsPageEntry,
+ kernelInterceptor.id,
+ kernelInterceptor.settingsEntry,
] as const)
: O.none
)
)
)
+// NOTE: Old interceptors
+// const interceptorService: InterceptorService = useService(InterceptorService)
+// const interceptorsWithSettings = computed(() =>
+// pipe(
+// interceptorService.availableInterceptors.value,
+// A.filterMap((interceptor) =>
+// interceptor.settingsPageEntry
+// ? O.some([
+// interceptor.interceptorID,
+// interceptor.settingsPageEntry,
+// ] as const)
+// : O.none
+// )
+// )
+// )
+
const ACCENT_COLOR = useSetting("THEME_COLOR")
const TELEMETRY_ENABLED = useSetting("TELEMETRY_ENABLED")
const EXPAND_NAVIGATION = useSetting("EXPAND_NAVIGATION")
diff --git a/packages/hoppscotch-common/src/platform/auth.ts b/packages/hoppscotch-common/src/platform/auth.ts
index 883f8e473..82d96f92a 100644
--- a/packages/hoppscotch-common/src/platform/auth.ts
+++ b/packages/hoppscotch-common/src/platform/auth.ts
@@ -108,7 +108,7 @@ export type AuthPlatformDef = {
* Called by Common when it is time to perform initialization activities for authentication.
* (This is the best place to do init work for the auth subsystem in the platform).
*/
- performAuthInit: () => void
+ performAuthInit: () => Promise<void>
/**
* Returns the headers that should be applied by the backend GQL API client (see GQLClient)
diff --git a/packages/hoppscotch-common/src/platform/index.ts b/packages/hoppscotch-common/src/platform/index.ts
index 44c93785d..765782bd2 100644
--- a/packages/hoppscotch-common/src/platform/index.ts
+++ b/packages/hoppscotch-common/src/platform/index.ts
@@ -9,14 +9,17 @@ import { ExperimentsPlatformDef } from "./experiments"
import { HistoryPlatformDef } from "./history"
import { InfraPlatformDef } from "./infra"
import { InspectorsPlatformDef } from "./inspectors"
-import { InterceptorsPlatformDef } from "./interceptors"
-import { IOPlatformDef } from "./io"
+import { KernelInterceptorsPlatformDef } from "./kernel-interceptors"
+// NOTE: To be deprecated
+// import { InterceptorsPlatformDef } from "./interceptors"
+// import { IOPlatformDef } from "./io"
import { LimitsPlatformDef } from "./limits"
import { SettingsPlatformDef } from "./settings"
import { SpotlightPlatformDef } from "./spotlight"
import { UIPlatformDef } from "./ui"
import { BackendPlatformDef } from "./backend"
import { OrganizationPlatformDef } from "./organization"
+import { KernelIO } from "./kernel-io"
export type PlatformDef = {
ui?: UIPlatformDef
@@ -24,14 +27,18 @@ export type PlatformDef = {
addedServices?: Array<ServiceClassInstance<unknown>>
auth: AuthPlatformDef
analytics?: AnalyticsPlatformDef
- io: IOPlatformDef
+ // NOTE: To be deprecated
+ // io: IOPlatformDef
+ kernelIO: KernelIO
sync: {
environments: EnvironmentsPlatformDef
collections: CollectionsPlatformDef
settings: SettingsPlatformDef
history: HistoryPlatformDef
}
- interceptors: InterceptorsPlatformDef
+ // NOTE: To be deprecated
+ // interceptors: InterceptorsPlatformDef
+ kernelInterceptors: KernelInterceptorsPlatformDef
additionalInspectors?: InspectorsPlatformDef
spotlight?: SpotlightPlatformDef
platformFeatureFlags: {
diff --git a/packages/hoppscotch-common/src/platform/kernel-interceptors.ts b/packages/hoppscotch-common/src/platform/kernel-interceptors.ts
new file mode 100644
index 000000000..1ec8abebe
--- /dev/null
+++ b/packages/hoppscotch-common/src/platform/kernel-interceptors.ts
@@ -0,0 +1,19 @@
+import { Container, ServiceClassInstance } from "dioc"
+import { KernelInterceptor } from "~/services/kernel-interceptor.service"
+
+export type KernelInterceptorDef =
+ | {
+ type: "standalone"
+ interceptor: KernelInterceptor
+ }
+ | {
+ type: "service"
+ service: ServiceClassInstance<unknown> & {
+ new (container: Container): KernelInterceptor
+ }
+ }
+
+export type KernelInterceptorsPlatformDef = {
+ default: string
+ interceptors: KernelInterceptorDef[]
+}
diff --git a/packages/hoppscotch-common/src/platform/kernel-io.ts b/packages/hoppscotch-common/src/platform/kernel-io.ts
new file mode 100644
index 000000000..be1689406
--- /dev/null
+++ b/packages/hoppscotch-common/src/platform/kernel-io.ts
@@ -0,0 +1,91 @@
+/**
+ * Defines how to save a file to the user's filesystem.
+ */
+export type SaveFileWithDialogOptions = {
+ /**
+ * The data to be saved
+ */
+ data: string | ArrayBuffer
+
+ /**
+ * The suggested filename for the file. This name will be shown in the
+ * save dialog by default when a save is initiated.
+ */
+ suggestedFilename: string
+
+ /**
+ * The content type mime type of the data to be saved.
+ *
+ * NOTE: The usage of this data might be platform dependent.
+ * For example, this field is used in the web, but not in the desktop app.
+ */
+ contentType: string
+
+ /**
+ * Defines the filters (like in Windows, on the right side, where you can
+ * select the file type) for the file dialog.
+ *
+ * NOTE: The usage of this data might be platform dependent.
+ * For example, this field is used in the web, but not in the desktop app.
+ */
+ filters?: Array<{
+ /**
+ * The name of the filter (in Windows, if the filter looks
+ * like "Images (*.png, *.jpg)", the name would be "Images")
+ */
+ name: string
+
+ /**
+ * The array of extensions that are supported, without the dot.
+ */
+ extensions: string[]
+ }>
+}
+
+export type SaveFileResponse =
+ | {
+ /**
+ * The implementation was unable to determine the status of the save operation.
+ * This cannot be considered a success or a failure and should be handled as an uncertainity.
+ * The browser standard implementation (std) returns this value as there is no way to
+ * check if the user downloaded the file or not.
+ */
+ type: "unknown"
+ }
+ | {
+ /**
+ * The result is known and the user cancelled the save.
+ */
+ type: "cancelled"
+ }
+ | {
+ /**
+ * The result is known and the user saved the file.
+ */
+ type: "saved"
+
+ /**
+ * The full path of where the file was saved
+ */
+ path: string
+ }
+
+/**
+ * Platform definitions for how to handle IO operations.
+ */
+export type KernelIO = {
+ /**
+ * Defines how to save a file to the user's filesystem.
+ * The expected behaviour is for the browser to show a prompt to save the file.
+ */
+ saveFileWithDialog: (
+ opts: SaveFileWithDialogOptions
+ ) => Promise<SaveFileResponse>
+
+ /**
+ * Opens a link in the user's browser.
+ * The expected behaviour is for the browser to open a new tab/window (for example in desktop app) with the given URL.
+ * @param url The URL to open
+ */
+ openExternalLink: (url: string) => Promise<void>
+}
diff --git a/packages/hoppscotch-common/src/platform/std/interceptors/agent/index.ts b/packages/hoppscotch-common/src/platform/std/interceptors/agent/index.ts
index d6017beb0..dc1a0b961 100644
--- a/packages/hoppscotch-common/src/platform/std/interceptors/agent/index.ts
+++ b/packages/hoppscotch-common/src/platform/std/interceptors/agent/index.ts
@@ -819,8 +819,6 @@ export class AgentInterceptorService extends Service implements Interceptor {
},
})
} catch (e) {
- console.log(e)
-
if (typeof e === "object" && (e as any)["RequestCancelled"]) {
return E.left("cancellation" as const)
}
diff --git a/packages/hoppscotch-common/src/platform/std/interceptors/browser.ts b/packages/hoppscotch-common/src/platform/std/interceptors/browser.ts
deleted file mode 100644
index 7551f285a..000000000
--- a/packages/hoppscotch-common/src/platform/std/interceptors/browser.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-import * as E from "fp-ts/Either"
-import {
- Interceptor,
- InterceptorError,
- NetworkResponse,
- RequestRunResult,
-} from "../../../services/interceptor.service"
-import axios, { AxiosRequestConfig, CancelToken } from "axios"
-import { preProcessRequest } from "./helpers"
-
-async function runRequest(
- req: AxiosRequestConfig,
- cancelToken: CancelToken
-): RequestRunResult["response"] {
- const timeStart = Date.now()
-
- try {
- const res = await axios({
- ...req,
- cancelToken,
- responseType: "arraybuffer",
- })
-
- const timeEnd = Date.now()
-
- return E.right(<NetworkResponse>{
- ...res,
- config: {
- timeData: {
- startTime: timeStart,
- endTime: timeEnd,
- },
- },
- })
- } catch (e) {
- const timeEnd = Date.now()
-
- if (axios.isAxiosError(e) && e.response) {
- return E.right(<NetworkResponse>{
- ...e.response,
- config: {
- timeData: {
- startTime: timeStart,
- endTime: timeEnd,
- },
- },
- })
- } else if (axios.isCancel(e)) {
- return E.left("cancellation")
- }
- return E.left(<InterceptorError>{
- humanMessage: {
- heading: (t) => t("error.network_fail"),
- description: (t) => t("helpers.network_fail"),
- },
- error: e,
- })
- }
-}
-
-export const browserInterceptor: Interceptor = {
- interceptorID: "browser",
- name: (t) => t("state.none"),
- selectable: { type: "selectable" },
- runRequest(req) {
- const cancelToken = axios.CancelToken.source()
-
- const processedReq = preProcessRequest(req)
-
- const promise = runRequest(processedReq, cancelToken.token)
-
- return {
- cancel: () => cancelToken.cancel(),
- response: promise,
- }
- },
-}
diff --git a/packages/hoppscotch-common/src/platform/std/kernel-interceptors/agent/index.ts b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/agent/index.ts
new file mode 100644
index 000000000..4ed1acbc5
--- /dev/null
+++ b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/agent/index.ts
@@ -0,0 +1,179 @@
+import { Service } from "dioc"
+import { markRaw } from "vue"
+import { body } from "@hoppscotch/kernel"
+import * as E from "fp-ts/Either"
+import { pipe } from "fp-ts/function"
+import axios, { CancelTokenSource } from "axios"
+import { preProcessRelayRequest } from "~/helpers/functional/preprocess"
+import {
+ RelayRequest,
+ RelayResponse,
+ RelayCapabilities,
+} from "@hoppscotch/kernel"
+import type { getI18n } from "~/modules/i18n"
+import {
+ KernelInterceptor,
+ KernelInterceptorError,
+ ExecutionResult,
+} from "~/services/kernel-interceptor.service"
+import { KernelInterceptorAgentStore } from "./store"
+import SettingsAgent from "~/components/settings/Agent.vue"
+import SettingsAgentSubtitle from "~/components/settings/AgentSubtitle.vue"
+import InterceptorsErrorPlaceholder from "~/components/interceptors/ErrorPlaceholder.vue"
+import { CookieJarService } from "~/services/cookie-jar.service"
+
+export class AgentKernelInterceptorService
+ extends Service
+ implements KernelInterceptor
+{
+ public static readonly ID = "AGENT_KERNEL_INTERCEPTOR_SERVICE"
+
+ private store = this.bind(KernelInterceptorAgentStore)
+ private readonly cookieJar = this.bind(CookieJarService)
+
+ public readonly id = "agent"
+ public readonly name = (t: ReturnType<typeof getI18n>) =>
+ t("interceptor.agent.name")
+ public readonly settingsEntry = markRaw({
+ title: (t: ReturnType<typeof getI18n>) =>
+ t("interceptor.agent.settings_title"),
+ component: SettingsAgent,
+ })
+ public readonly subtitle = markRaw(SettingsAgentSubtitle)
+ public selectable = { type: "selectable" as const }
+ public readonly capabilities: RelayCapabilities = {
+ method: new Set([
+ "GET",
+ "POST",
+ "PUT",
+ "DELETE",
+ "PATCH",
+ "HEAD",
+ "OPTIONS",
+ ]),
+ header: new Set(["stringvalue", "arrayvalue", "multivalue"]),
+ content: new Set([
+ "text",
+ "json",
+ "xml",
+ "form",
+ "binary",
+ "multipart",
+ "urlencoded",
+ "compression",
+ ]),
+ auth: new Set(["basic", "bearer", "apikey", "digest", "aws"]),
+ security: new Set([
+ "clientcertificates",
+ "cacertificates",
+ "certificatevalidation",
+ "hostverification",
+ "peerverification",
+ ]),
+ proxy: new Set(["http", "https", "authentication", "certificates"]),
+ advanced: new Set(["redirects", "cookies", "localaccess"]),
+ } as const
+
+ public execute(request: RelayRequest): ExecutionResult {
+ const reqID = Date.now()
+ const cancelToken = axios.CancelToken.source()
+
+ return {
+ cancel: async () => {
+ cancelToken.cancel()
+ await this.store.cancelRequest(reqID)
+ },
+ response: pipe(
+ this.executeRequest(request, reqID, cancelToken),
+ (promise) =>
+ promise.then((either) =>
+ pipe(
+ either,
+ E.mapLeft((error): KernelInterceptorError => {
+ if (error === "cancellation") return "cancellation"
+
+ return {
+ humanMessage: {
+ heading: (t) => t("error.network_fail"),
+ description: (t) => t("helpers.network_fail"),
+ },
+ error,
+ component: InterceptorsErrorPlaceholder,
+ }
+ })
+ )
+ )
+ ),
+ }
+ }
+
+ private async executeRequest(
+ request: RelayRequest,
+ reqID: number,
+ cancelToken: CancelTokenSource
+ ): Promise<E.Either<"cancellation" | Error, RelayResponse>> {
+ try {
+ await this.store.checkAgentStatus()
+
+ if (!this.store.isAgentRunning.value || !this.store.isAuthKeyPresent()) {
+ throw new Error("Agent not running")
+ }
+
+ const effectiveRequest = this.store.completeRequest(
+ preProcessRelayRequest(request)
+ )
+ const relevantCookies = this.cookieJar.getCookiesForURL(
+ new URL(effectiveRequest.url!)
+ )
+
+ if (relevantCookies.length > 0) {
+ effectiveRequest.headers!["Cookie"] = relevantCookies
+ .map((cookie) => `${cookie.name!}=${cookie.value!}`)
+ .join(";")
+ }
+
+ console.log("[AGENT]: effectiveRequest", effectiveRequest)
+ const [nonceB16, encryptedReq] = await this.store.encryptRequest(
+ effectiveRequest,
+ reqID
+ )
+
+ const response = await axios.post(
+ "http://localhost:9119/execute",
+ encryptedReq,
+ {
+ headers: {
+ Authorization: `Bearer ${this.store.authKey.value}`,
+ "X-Hopp-Nonce": nonceB16,
+ "Content-Type": "application/octet-stream",
+ },
+ cancelToken: cancelToken.token,
+ responseType: "arraybuffer",
+ }
+ )
+
+ const responseNonceB16 = response.headers["x-hopp-nonce"]
+ const decryptedResponse = await this.store.decryptResponse(
+ responseNonceB16,
+ response.data
+ )
+
+ const transformedBody = body.body(
+ decryptedResponse.body.body,
+ decryptedResponse.body.mediaType
+ )
+ const transformedResponse = {
+ ...decryptedResponse,
+ body: { ...transformedBody },
+ }
+
+ return E.right(transformedResponse)
+ } catch (e) {
+ if (axios.isCancel(e)) {
+ return E.left("cancellation")
+ }
+
+ return E.left(e instanceof Error ? e : new Error("Unknown error"))
+ }
+ }
+}
diff --git a/packages/hoppscotch-common/src/platform/std/kernel-interceptors/agent/store.ts b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/agent/store.ts
new file mode 100644
index 000000000..e5e804d7f
--- /dev/null
+++ b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/agent/store.ts
@@ -0,0 +1,367 @@
+import { Service } from "dioc"
+import { ref } from "vue"
+import * as E from "fp-ts/Either"
+import axios from "axios"
+import superjson from "superjson"
+import { Store } from "~/kernel/store"
+import type { RelayRequest, RelayResponse } from "@hoppscotch/kernel"
+import { x25519 } from "@noble/curves/ed25519"
+import { base16 } from "@scure/base"
+import {
+ InputDomainSetting,
+ convertDomainSetting,
+} from "~/helpers/functional/domain-settings"
+
+const STORE_NAMESPACE = "interceptors.agent.v1"
+
+const STORE_KEYS = {
+ SETTINGS: "settings",
+} as const
+
+interface StoredData {
+ version: string
+ auth: {
+ key: string | null
+ sharedSecret: string | null
+ }
+ domains: Record<string, InputDomainSetting>
+ lastUpdated: string
+}
+
+const defaultDomainConfig: InputDomainSetting = {
+ version: "v1",
+ security: {
+ verifyHost: true,
+ verifyPeer: true,
+ },
+ proxy: undefined,
+}
+
+export class KernelInterceptorAgentStore extends Service {
+ public static readonly ID = "AGENT_INTERCEPTOR_STORE"
+ private static readonly GLOBAL_DOMAIN = "*"
+ private static readonly DEFAULT_GLOBAL_SETTINGS: InputDomainSetting = {
+ ...defaultDomainConfig,
+ version: "v1",
+ }
+
+ private domainSettings = new Map<string, InputDomainSetting>()
+
+ public isAgentRunning = ref(false)
+ public authKey = ref<string | null>(null)
+ private sharedSecretB16 = ref<string | null>(null)
+
+ override async onServiceInit() {
+ const initResult = await Store.init()
+ if (E.isLeft(initResult)) {
+ console.error("[AgentStore] Failed to initialize store:", initResult.left)
+ return
+ }
+
+ await this.loadStore()
+ this.setupWatchers()
+ }
+
+ private async loadStore(): Promise<void> {
+ const loadResult = await Store.get<StoredData>(
+ STORE_NAMESPACE,
+ STORE_KEYS.SETTINGS
+ )
+
+ if (E.isRight(loadResult) && loadResult.right) {
+ const store = loadResult.right
+ this.domainSettings = new Map(Object.entries(store.domains))
+ this.authKey.value = store.auth.key
+ this.sharedSecretB16.value = store.auth.sharedSecret
+ }
+
+ if (!this.domainSettings.has(KernelInterceptorAgentStore.GLOBAL_DOMAIN)) {
+ this.domainSettings.set(
+ KernelInterceptorAgentStore.GLOBAL_DOMAIN,
+ KernelInterceptorAgentStore.DEFAULT_GLOBAL_SETTINGS
+ )
+ await this.persistStore()
+ }
+ }
+
+ private setupWatchers() {
+ Store.watch(STORE_NAMESPACE, STORE_KEYS.SETTINGS).on(
+ "change",
+ async ({ value }) => {
+ if (value) {
+ const store = value as StoredData
+ this.domainSettings = new Map(Object.entries(store.domains))
+ this.authKey.value = store.auth.key
+ this.sharedSecretB16.value = store.auth.sharedSecret
+ }
+ }
+ )
+ }
+
+ private async persistStore(): Promise<void> {
+ const store: StoredData = {
+ version: "v1",
+ auth: {
+ key: this.authKey.value,
+ sharedSecret: this.sharedSecretB16.value,
+ },
+ domains: Object.fromEntries(this.domainSettings),
+ lastUpdated: new Date().toISOString(),
+ }
+
+ const saveResult = await Store.set(
+ STORE_NAMESPACE,
+ STORE_KEYS.SETTINGS,
+ store
+ )
+ if (E.isLeft(saveResult)) {
+ console.error("[AgentStore] Failed to save store:", saveResult.left)
+ }
+ }
+
+ private mergeSecurity(
+ ...settings: (Required<InputDomainSetting>["security"] | undefined)[]
+ ): Required<InputDomainSetting>["security"] | undefined {
+ return settings.reduce(
+ (acc, setting) => (setting ? { ...acc, ...setting } : acc),
+ undefined as Required<InputDomainSetting>["security"] | undefined
+ )
+ }
+
+ private mergeProxy(
+ ...settings: (Required<InputDomainSetting>["proxy"] | undefined)[]
+ ): Required<InputDomainSetting>["proxy"] | undefined {
+ return settings.reduce(
+ (acc, setting) => (setting ? { ...acc, ...setting } : acc),
+ undefined as Required<InputDomainSetting>["proxy"] | undefined
+ )
+ }
+
+ private getMergedSettings(domain: string): InputDomainSetting {
+ const domainSettings = this.domainSettings.get(domain)
+ const globalSettings =
+ domain !== KernelInterceptorAgentStore.GLOBAL_DOMAIN
+ ? this.domainSettings.get(KernelInterceptorAgentStore.GLOBAL_DOMAIN)
+ : undefined
+
+ const result = {
+ security: this.mergeSecurity(
+ globalSettings?.security,
+ domainSettings?.security
+ ),
+ proxy: this.mergeProxy(globalSettings?.proxy, domainSettings?.proxy),
+ }
+
+ return { version: "v1", ...result }
+ }
+
+ public completeRequest(
+ request: Omit<RelayRequest, "proxy" | "security">
+ ): RelayRequest {
+ const host = new URL(request.url).host
+ const settings = this.getMergedSettings(host)
+ const effective = convertDomainSetting(settings)
+
+ if (E.isLeft(effective)) {
+ throw effective.left
+ }
+
+ return { ...request, ...effective.right }
+ }
+
+ public async checkAgentStatus(): Promise<void> {
+ try {
+ const handshakeResponse = await axios.get(
+ "http://localhost:9119/handshake"
+ )
+ this.isAgentRunning.value =
+ handshakeResponse.data.status === "success" &&
+ handshakeResponse.data.__hoppscotch__agent__ === true
+ } catch {
+ this.isAgentRunning.value = false
+ }
+ }
+
+ public isAuthKeyPresent(): boolean {
+ return this.authKey.value !== null
+ }
+
+ public async initiateRegistration() {
+ const otp = Math.floor(100000 + Math.random() * 900000).toString()
+
+ const response = await axios.post(
+ "http://localhost:9119/receive-registration",
+ { registration: otp }
+ )
+
+ if (response.data.message !== "Registration received and stored") {
+ throw new Error("Registration failed")
+ }
+
+ return otp
+ }
+
+ public async verifyRegistration(otp: string): Promise<void> {
+ const myPrivateKey = x25519.utils.randomPrivateKey()
+ const myPublicKey = x25519.getPublicKey(myPrivateKey)
+ const myPublicKeyB16 = base16.encode(myPublicKey).toLowerCase()
+
+ const response = await axios.post(
+ "http://localhost:9119/verify-registration",
+ {
+ registration: otp,
+ client_public_key_b16: myPublicKeyB16,
+ }
+ )
+
+ const { auth_key: newAuthKey, agent_public_key_b16: agentPublicKeyB16 } =
+ response.data
+
+ if (typeof newAuthKey !== "string")
+ throw new Error("Invalid auth key received")
+
+ const agentPublicKey = base16.decode(agentPublicKeyB16.toUpperCase())
+ const sharedSecret = x25519.getSharedSecret(myPrivateKey, agentPublicKey)
+ const sharedSecretB16 = base16.encode(sharedSecret).toLowerCase()
+
+ this.authKey.value = newAuthKey
+ this.sharedSecretB16.value = sharedSecretB16
+ await this.persistStore()
+ }
+
+ public async fetchRegistrationInfo(): Promise<{
+ registered_at: Date
+ auth_key_hash: string
+ }> {
+ try {
+ const response = await axios.get("http://localhost:9119/registration", {
+ headers: {
+ Authorization: `Bearer ${this.authKey.value}`,
+ },
+ responseType: "arraybuffer",
+ })
+
+ const nonceB16 = response.headers["x-hopp-nonce"]
+ if (!nonceB16) {
+ throw new Error("No nonce received from server")
+ }
+
+ return await this.decryptResponse(nonceB16, response.data)
+ } catch (error) {
+ if (axios.isAxiosError(error)) {
+ if (error.response?.status === 401) {
+ this.authKey.value = null
+ }
+ }
+ throw error
+ }
+ }
+
+ public async encryptRequest(
+ request: RelayRequest,
+ reqID: number
+ ): Promise<[string, ArrayBuffer]> {
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ const { json, meta: _ } = superjson.serialize({ ...request, id: reqID })
+ const reqJSON = JSON.stringify(json)
+ const reqJSONBytes = new TextEncoder().encode(reqJSON)
+ const nonce = window.crypto.getRandomValues(new Uint8Array(12))
+ const nonceB16 = base16.encode(nonce).toLowerCase()
+
+ const sharedSecretKeyBytes = base16.decode(
+ this.sharedSecretB16.value!.toUpperCase()
+ )
+ const sharedSecretKey = await window.crypto.subtle.importKey(
+ "raw",
+ sharedSecretKeyBytes,
+ "AES-GCM",
+ true,
+ ["encrypt", "decrypt"]
+ )
+
+ const encryptedReq = await window.crypto.subtle.encrypt(
+ { name: "AES-GCM", iv: nonce },
+ sharedSecretKey,
+ reqJSONBytes
+ )
+
+ return [nonceB16, encryptedReq]
+ }
+
+ public async decryptResponse(
+ nonceB16: string,
+ encryptedResponse: ArrayBuffer
+ ): Promise<RelayResponse> {
+ const nonce = base16.decode(nonceB16.toUpperCase())
+ const sharedSecretKeyBytes = base16.decode(
+ this.sharedSecretB16.value!.toUpperCase()
+ )
+
+ const sharedSecretKey = await window.crypto.subtle.importKey(
+ "raw",
+ sharedSecretKeyBytes,
+ "AES-GCM",
+ true,
+ ["encrypt", "decrypt"]
+ )
+
+ const decryptedBytes = await window.crypto.subtle.decrypt(
+ { name: "AES-GCM", iv: nonce },
+ sharedSecretKey,
+ encryptedResponse
+ )
+
+ return JSON.parse(new TextDecoder().decode(decryptedBytes))
+ }
+
+ public async cancelRequest(reqId: number): Promise<void> {
+ try {
+ await axios.post(
+ `http://localhost:9119/cancel/${reqId}`,
+ {},
+ {
+ headers: {
+ Authorization: `Bearer ${this.authKey.value}`,
+ },
+ }
+ )
+ } catch (error) {
+ console.error("Error cancelling request:", error)
+ }
+ }
+
+ public getDomainSettings(domain: string): InputDomainSetting {
+ return (
+ this.domainSettings.get(domain) ?? {
+ ...defaultDomainConfig,
+ version: "v1",
+ }
+ )
+ }
+
+ public async saveDomainSettings(
+ domain: string,
+ settings: Partial<InputDomainSetting>
+ ): Promise<void> {
+ const updatedSettings: InputDomainSetting = {
+ ...settings,
+ version: "v1",
+ }
+
+ this.domainSettings.set(domain, updatedSettings)
+ await this.persistStore()
+ }
+
+ public async clearDomainSettings(domain: string): Promise<void> {
+ this.domainSettings.delete(domain)
+ await this.persistStore()
+ }
+
+ public getDomains(): string[] {
+ return Array.from(this.domainSettings.keys())
+ }
+
+ public getAllDomainSettings(): Map<string, InputDomainSetting> {
+ return new Map(this.domainSettings)
+ }
+}
diff --git a/packages/hoppscotch-common/src/platform/std/kernel-interceptors/browser/index.ts b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/browser/index.ts
new file mode 100644
index 000000000..90d40af50
--- /dev/null
+++ b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/browser/index.ts
@@ -0,0 +1,149 @@
+import { pipe } from "fp-ts/function"
+import * as E from "fp-ts/Either"
+
+import { Service } from "dioc"
+import type { RelayRequest } from "@hoppscotch/kernel"
+
+import { Relay } from "~/kernel/relay"
+import type {
+ KernelInterceptor,
+ ExecutionResult,
+ KernelInterceptorError,
+} from "~/services/kernel-interceptor.service"
+
+import { getI18n } from "~/modules/i18n"
+import { preProcessRelayRequest } from "~/helpers/functional/preprocess"
+
+import InterceptorsErrorPlaceholder from "~/components/interceptors/ErrorPlaceholder.vue"
+
+export class BrowserKernelInterceptorService
+ extends Service
+ implements KernelInterceptor
+{
+ public static readonly ID = "BROWSER_KERNEL_INTERCEPTOR_SERVICE"
+
+ public readonly id = "browser"
+ public readonly name = (t: ReturnType<typeof getI18n>) =>
+ t("interceptor.browser.name")
+ public readonly selectable = { type: "selectable" as const }
+ public readonly capabilities = {
+ method: new Set([
+ "GET",
+ "POST",
+ "PUT",
+ "DELETE",
+ "PATCH",
+ "HEAD",
+ "OPTIONS",
+ ]),
+ header: new Set(["stringvalue"]),
+ content: new Set([
+ "text",
+ "json",
+ "xml",
+ "form",
+ "multipart",
+ "urlencoded",
+ ]),
+ auth: new Set(["basic", "bearer", "apikey"]),
+ security: new Set([]),
+ proxy: new Set([]),
+ advanced: new Set([]),
+ } as const
+
+ public execute(
+ request: RelayRequest
+ ): ExecutionResult<KernelInterceptorError> {
+ const processedRequest = preProcessRelayRequest(request)
+ const relayExecution = Relay.execute(processedRequest)
+
+ const response = pipe(relayExecution.response, (promise) =>
+ promise.then((either) =>
+ pipe(
+ either,
+ E.mapLeft((error): KernelInterceptorError => {
+ const humanMessage = {
+ heading: (t: ReturnType<typeof getI18n>) => {
+ switch (error.kind) {
+ case "network":
+ return t("error.network.heading")
+ case "timeout":
+ return t("error.timeout.heading")
+ case "certificate":
+ return t("error.certificate.heading")
+ case "auth":
+ return t("error.auth.heading")
+ case "proxy":
+ return t("error.proxy.heading")
+ case "parse":
+ return t("error.parse.heading")
+ case "version":
+ return t("error.version.heading")
+ case "abort":
+ return t("error.aborted.heading")
+ default:
+ return t("error.unknown.heading")
+ }
+ },
+ description: (t: ReturnType<typeof getI18n>) => {
+ switch (error.kind) {
+ case "network":
+ return t("error.network.description", {
+ message: error.message,
+ cause: error.cause ?? t("error.unknown.cause"),
+ })
+ case "timeout":
+ return t("error.timeout.description", {
+ message: error.message,
+ phase: error.phase ?? t("error.unknown.phase"),
+ })
+ case "certificate":
+ return t("error.certificate.description", {
+ message: error.message,
+ cause: error.cause ?? t("error.unknown.cause"),
+ })
+ case "auth":
+ return t("error.auth.description", {
+ message: error.message,
+ cause: error.cause ?? t("error.unknown.cause"),
+ })
+ case "proxy":
+ return t("error.proxy.description", {
+ message: error.message,
+ cause: error.cause ?? t("error.unknown.cause"),
+ })
+ case "parse":
+ return t("error.parse.description", {
+ message: error.message,
+ cause: error.cause ?? t("error.unknown.cause"),
+ })
+ case "version":
+ return t("error.version.description", {
+ message: error.message,
+ cause: error.cause ?? t("error.unknown.cause"),
+ })
+ case "abort":
+ return t("error.aborted.description", {
+ message: error.message,
+ })
+ default:
+ return t("error.unknown.description")
+ }
+ },
+ }
+ return {
+ humanMessage,
+ error,
+ component: InterceptorsErrorPlaceholder,
+ }
+ })
+ )
+ )
+ )
+
+ return {
+ cancel: relayExecution.cancel,
+ response,
+ }
+ }
+}
diff --git a/packages/hoppscotch-common/src/platform/std/kernel-interceptors/browser/store.ts b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/browser/store.ts
new file mode 100644
index 000000000..1ad08da92
--- /dev/null
+++ b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/browser/store.ts
@@ -0,0 +1,57 @@
+import { Service } from "dioc"
+import { Store } from "~/kernel/store"
+import * as E from "fp-ts/Either"
+
+const STORE_NAMESPACE = "interceptors.browser.v1"
+const SETTINGS_KEY = "settings"
+
+type BrowserSettings = {
+ version: "v1"
+}
+
+interface StoredData {
+ version: string
+ settings: BrowserSettings
+ lastUpdated: string
+}
+
+const DEFAULT_SETTINGS: BrowserSettings = {
+ version: "v1",
+}
+
+export class KernelInterceptorBrowserStore extends Service {
+ public static readonly ID = "KERNEL_BROWSER_INTERCEPTOR_STORE"
+ private settings: BrowserSettings = { ...DEFAULT_SETTINGS }
+
+ async onServiceInit(): Promise<void> {
+ const initResult = await Store.init()
+ if (E.isLeft(initResult)) {
+ console.error(
+ "[BrowserStore] Failed to initialize store:",
+ initResult.left
+ )
+ return
+ }
+
+ await this.loadSettings()
+ }
+
+ private async loadSettings(): Promise<void> {
+ const loadResult = await Store.get<StoredData>(
+ STORE_NAMESPACE,
+ SETTINGS_KEY
+ )
+
+ if (E.isRight(loadResult) && loadResult.right) {
+ const storedData = loadResult.right
+ this.settings = {
+ ...DEFAULT_SETTINGS,
+ ...storedData.settings,
+ }
+ }
+ }
+
+ public getSettings(): BrowserSettings {
+ return { ...this.settings }
+ }
+}
diff --git a/packages/hoppscotch-common/src/platform/std/kernel-interceptors/extension/index.ts b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/extension/index.ts
new file mode 100644
index 000000000..9767ad659
--- /dev/null
+++ b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/extension/index.ts
@@ -0,0 +1,139 @@
+import { computed, markRaw } from "vue"
+import { Service } from "dioc"
+import type { RelayRequest, RelayResponse } from "@hoppscotch/kernel"
+import { body } from "@hoppscotch/kernel"
+import SettingsExtension from "~/components/settings/Extension.vue"
+import SettingsExtensionSubtitle from "~/components/settings/ExtensionSubtitle.vue"
+import { KernelInterceptorExtensionStore } from "./store"
+import type {
+ KernelInterceptor,
+ ExecutionResult,
+ KernelInterceptorError,
+} from "~/services/kernel-interceptor.service"
+import * as E from "fp-ts/Either"
+import { getI18n } from "~/modules/i18n"
+import { until } from "@vueuse/core"
+import { preProcessRelayRequest } from "~/helpers/functional/preprocess"
+
+export class ExtensionKernelInterceptorService
+ extends Service
+ implements KernelInterceptor
+{
+ public static readonly ID = "KERNEL_EXTENSION_INTERCEPTOR_SERVICE"
+ private readonly store = this.bind(KernelInterceptorExtensionStore)
+
+ public readonly id = "extension"
+ public readonly name = (t: ReturnType<typeof getI18n>) =>
+ t("interceptor.extension.name")
+ public readonly selectable = { type: "selectable" as const }
+ public readonly capabilities = {
+ method: new Set([
+ "GET",
+ "POST",
+ "PUT",
+ "DELETE",
+ "PATCH",
+ "HEAD",
+ "OPTIONS",
+ ]),
+ header: new Set(["stringvalue", "arrayvalue", "multivalue"]),
+ content: new Set([
+ "text",
+ "json",
+ "xml",
+ "form",
+ "binary",
+ "multipart",
+ "urlencoded",
+ "compression",
+ ]),
+ auth: new Set(["basic", "bearer", "apikey"]),
+ security: new Set([
+ "clientcertificates",
+ "cacertificates",
+ "certificatevalidation",
+ "hostverification",
+ "peerverification",
+ ]),
+ proxy: new Set(["http", "https", "authentication", "certificates"]),
+ advanced: new Set(["localaccess"]),
+ } as const
+
+ public readonly settingsEntry = markRaw({
+ title: (t: ReturnType<typeof getI18n>) =>
+ t("interceptor.extension.settings_title"),
+ component: SettingsExtension,
+ })
+
+ public readonly subtitle = markRaw(SettingsExtensionSubtitle)
+ public readonly extensionStatus = computed(
+ () => this.store.getSettings().status
+ )
+ public readonly extensionVersion = computed(
+ () => this.store.getSettings().extensionVersion
+ )
+
+ private async executeExtensionRequest(
+ request: RelayRequest
+ ): Promise<E.Either<KernelInterceptorError, RelayResponse>> {
+ await until(() => this.store.getSettings().status).not.toBe("waiting")
+
+ if (!window.__POSTWOMAN_EXTENSION_HOOK__) {
+ return E.left({
+ humanMessage: {
+ heading: (t) => t("error.extension_not_found.heading"),
+ description: (t) => t("error.extension_not_found.description"),
+ },
+ error: {
+ kind: "extension",
+ message: "Extension hook not found",
+ },
+ })
+ }
+
+ try {
+ const extensionResponse =
+ await window.__POSTWOMAN_EXTENSION_HOOK__.sendRequest({
+ url: request.url,
+ method: request.method,
+ headers: request.headers,
+ data: request.content?.content,
+ wantsBinary: true,
+ })
+
+ return E.right({
+ status: extensionResponse.status,
+ statusText: extensionResponse.statusText,
+ headers: extensionResponse.headers,
+ body: body.body(
+ extensionResponse.data,
+ extensionResponse.headers["content-type"]
+ ),
+ })
+ } catch (e) {
+ return E.left({
+ humanMessage: {
+ heading: (t) => t("error.extension.heading"),
+ description: (t) => t("error.extension.description"),
+ },
+ error: {
+ kind: "extension",
+ message: e instanceof Error ? e.message : "Unknown error",
+ },
+ })
+ }
+ }
+
+ public execute(
+ request: RelayRequest
+ ): ExecutionResult<KernelInterceptorError> {
+ const extensionExecution = {
+ cancel: async () => {
+ window.__POSTWOMAN_EXTENSION_HOOK__?.cancelRequest()
+ },
+ response: this.executeExtensionRequest(preProcessRelayRequest(request)),
+ }
+
+ return extensionExecution
+ }
+}
diff --git a/packages/hoppscotch-common/src/platform/std/kernel-interceptors/extension/store.ts b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/extension/store.ts
new file mode 100644
index 000000000..a127d5583
--- /dev/null
+++ b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/extension/store.ts
@@ -0,0 +1,134 @@
+import { Service } from "dioc"
+import { Store } from "~/kernel/store"
+import * as E from "fp-ts/Either"
+import * as O from "fp-ts/Option"
+
+const STORE_NAMESPACE = "interceptors.extension.v1"
+const SETTINGS_KEY = "settings"
+
+export type ExtensionStatus = "available" | "unknown-origin" | "waiting"
+
+export type ExtensionVersion = {
+ major: number
+ minor: number
+}
+
+type ExtensionSettings = {
+ version: "v1"
+ status: ExtensionStatus
+ extensionVersion?: ExtensionVersion
+}
+
+interface StoredData {
+ version: string
+ settings: ExtensionSettings
+ lastUpdated: string
+}
+
+const DEFAULT_SETTINGS: ExtensionSettings = {
+ version: "v1",
+ status: "waiting",
+}
+
+export class KernelInterceptorExtensionStore extends Service {
+ public static readonly ID = "KERNEL_EXTENSION_INTERCEPTOR_STORE"
+
+ private settings: ExtensionSettings = { ...DEFAULT_SETTINGS }
+
+ async onServiceInit(): Promise<void> {
+ const initResult = await Store.init()
+ if (E.isLeft(initResult)) {
+ console.error(
+ "[ExtensionStore] Failed to initialize store:",
+ initResult.left
+ )
+ return
+ }
+
+ await this.loadSettings()
+ this.setupExtensionStatusListener()
+
+ Store.watch(STORE_NAMESPACE, SETTINGS_KEY).on(
+ "change",
+ async ({ value }) => {
+ if (value) {
+ const storedData = value as StoredData
+ this.settings = storedData.settings
+ }
+ }
+ )
+ }
+
+ public getExtensionVersion(): O.Option<ExtensionVersion> {
+ return O.fromNullable(this.settings.extensionVersion)
+ }
+
+ public getExtensionStatus(): ExtensionStatus {
+ return this.settings.status
+ }
+
+ private setupExtensionStatusListener(): void {
+ if (window.__HOPP_EXTENSION_STATUS_PROXY__) {
+ this.settings.status = window.__HOPP_EXTENSION_STATUS_PROXY__.status
+ window.__HOPP_EXTENSION_STATUS_PROXY__.subscribe(
+ "status",
+ (status: ExtensionStatus) => {
+ this.updateSettings({ status })
+ }
+ )
+ }
+ }
+
+ private async loadSettings(): Promise<void> {
+ const loadResult = await Store.get<StoredData>(
+ STORE_NAMESPACE,
+ SETTINGS_KEY
+ )
+
+ if (E.isRight(loadResult) && loadResult.right) {
+ const storedData = loadResult.right
+ this.settings = {
+ ...DEFAULT_SETTINGS,
+ ...storedData.settings,
+ }
+ } else {
+ await this.persistSettings()
+ }
+ }
+
+ private async persistSettings(): Promise<void> {
+ const storedData: StoredData = {
+ version: "v1",
+ settings: this.settings,
+ lastUpdated: new Date().toISOString(),
+ }
+
+ const saveResult = await Store.set(
+ STORE_NAMESPACE,
+ SETTINGS_KEY,
+ storedData
+ )
+
+ if (E.isLeft(saveResult)) {
+ console.error(
+ "[ExtensionStore] Failed to save settings:",
+ saveResult.left
+ )
+ }
+ }
+
+ public async updateSettings(
+ settings: Partial<ExtensionSettings>
+ ): Promise<void> {
+ this.settings = {
+ ...this.settings,
+ ...settings,
+ }
+
+ await this.persistSettings()
+ }
+
+ public getSettings(): ExtensionSettings {
+ return { ...this.settings }
+ }
+}
diff --git a/packages/hoppscotch-common/src/platform/std/kernel-interceptors/native/index.ts b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/native/index.ts
new file mode 100644
index 000000000..cf419c8a6
--- /dev/null
+++ b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/native/index.ts
@@ -0,0 +1,182 @@
+import { markRaw } from "vue"
+import * as E from "fp-ts/Either"
+import { pipe } from "fp-ts/function"
+import { getI18n } from "~/modules/i18n"
+import { preProcessRelayRequest } from "~/helpers/functional/preprocess"
+import type { RelayCapabilities, RelayRequest } from "@hoppscotch/kernel"
+import { Relay } from "~/kernel/relay"
+import { Service } from "dioc"
+import type {
+ KernelInterceptor,
+ ExecutionResult,
+ KernelInterceptorError,
+} from "~/services/kernel-interceptor.service"
+import { CookieJarService } from "~/services/cookie-jar.service"
+import InterceptorsErrorPlaceholder from "~/components/interceptors/ErrorPlaceholder.vue"
+import SettingsNative from "~/components/settings/Native.vue"
+import { KernelInterceptorNativeStore } from "./store"
+
+export class NativeKernelInterceptorService
+ extends Service
+ implements KernelInterceptor
+{
+ public static readonly ID = "NATIVE_KERNEL_INTERCEPTOR_SERVICE"
+
+ private readonly store = this.bind(KernelInterceptorNativeStore)
+ private readonly cookieJar = this.bind(CookieJarService)
+
+ public readonly id = "native"
+ public readonly name = (t: ReturnType<typeof getI18n>) =>
+ t("interceptor.native.name")
+ public readonly selectable = { type: "selectable" as const }
+ public readonly capabilities: RelayCapabilities = {
+ method: new Set([
+ "GET",
+ "POST",
+ "PUT",
+ "DELETE",
+ "PATCH",
+ "HEAD",
+ "OPTIONS",
+ ]),
+ header: new Set(["stringvalue", "arrayvalue", "multivalue"]),
+ content: new Set([
+ "text",
+ "json",
+ "xml",
+ "form",
+ "binary",
+ "multipart",
+ "urlencoded",
+ "compression",
+ ]),
+ auth: new Set(["basic", "bearer", "apikey", "digest", "aws"]),
+ security: new Set([
+ "clientcertificates",
+ "cacertificates",
+ "certificatevalidation",
+ "hostverification",
+ "peerverification",
+ ]),
+ proxy: new Set(["http", "https", "authentication", "certificates"]),
+ advanced: new Set(["redirects", "cookies", "localaccess"]),
+ } as const
+ public readonly settingsEntry = markRaw({
+ title: (t: ReturnType<typeof getI18n>) =>
+ t("interceptor.native.settings_title"),
+ component: SettingsNative,
+ })
+
+ public execute(
+ request: RelayRequest
+ ): ExecutionResult<KernelInterceptorError> {
+ const effectiveRequest = this.store.completeRequest(
+ preProcessRelayRequest(request)
+ )
+ const relevantCookies = this.cookieJar.getCookiesForURL(
+ new URL(effectiveRequest.url!)
+ )
+
+ if (relevantCookies.length > 0) {
+ effectiveRequest.headers!["Cookie"] = relevantCookies
+ .map((cookie) => `${cookie.name!}=${cookie.value!}`)
+ .join(";")
+ }
+
+ console.info(
+ "[platform/std/kernel-interceptor/native/index]: effectiveRequest",
+ effectiveRequest
+ )
+
+ const relayExecution = Relay.execute(effectiveRequest)
+
+ const response = pipe(relayExecution.response, (promise) =>
+ promise.then((either) =>
+ pipe(
+ either,
+ E.mapLeft((error): KernelInterceptorError => {
+ const humanMessage = {
+ heading: (t: ReturnType<typeof getI18n>) => {
+ switch (error.kind) {
+ case "network":
+ return t("error.network.heading")
+ case "timeout":
+ return t("error.timeout.heading")
+ case "certificate":
+ return t("error.certificate.heading")
+ case "auth":
+ return t("error.auth.heading")
+ case "proxy":
+ return t("error.proxy.heading")
+ case "parse":
+ return t("error.parse.heading")
+ case "version":
+ return t("error.version.heading")
+ case "abort":
+ return t("error.aborted.heading")
+ default:
+ return t("error.unknown.heading")
+ }
+ },
+ description: (t: ReturnType<typeof getI18n>) => {
+ switch (error.kind) {
+ case "network":
+ return t("error.network.description", {
+ message: error.message,
+ cause: error.cause ?? t("error.unknown.cause"),
+ })
+ case "timeout":
+ return t("error.timeout.description", {
+ message: error.message,
+ phase: error.phase ?? t("error.unknown.phase"),
+ })
+ case "certificate":
+ return t("error.certificate.description", {
+ message: error.message,
+ cause: error.cause ?? t("error.unknown.cause"),
+ })
+ case "auth":
+ return t("error.auth.description", {
+ message: error.message,
+ cause: error.cause ?? t("error.unknown.cause"),
+ })
+ case "proxy":
+ return t("error.proxy.description", {
+ message: error.message,
+ cause: error.cause ?? t("error.unknown.cause"),
+ })
+ case "parse":
+ return t("error.parse.description", {
+ message: error.message,
+ cause: error.cause ?? t("error.unknown.cause"),
+ })
+ case "version":
+ return t("error.version.description", {
+ message: error.message,
+ cause: error.cause ?? t("error.unknown.cause"),
+ })
+ case "abort":
+ return t("error.aborted.description", {
+ message: error.message,
+ })
+ default:
+ return t("error.unknown.description")
+ }
+ },
+ }
+ return {
+ humanMessage,
+ error,
+ component: InterceptorsErrorPlaceholder,
+ }
+ })
+ )
+ )
+ )
+
+ return {
+ cancel: relayExecution.cancel,
+ response,
+ }
+ }
+}
diff --git a/packages/hoppscotch-common/src/platform/std/kernel-interceptors/native/store.ts b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/native/store.ts
new file mode 100644
index 000000000..b9198b94b
--- /dev/null
+++ b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/native/store.ts
@@ -0,0 +1,188 @@
+import { Service } from "dioc"
+import type { RelayRequest } from "@hoppscotch/kernel"
+import { Store } from "~/kernel/store"
+import * as E from "fp-ts/Either"
+import {
+ InputDomainSetting,
+ convertDomainSetting,
+} from "~/helpers/functional/domain-settings"
+
+const STORE_NAMESPACE = "interceptors.native.v1"
+
+const STORE_KEYS = {
+ SETTINGS: "settings",
+} as const
+
+interface StoredData {
+ version: string
+ domains: Record<string, InputDomainSetting>
+ lastUpdated: string
+}
+
+const defaultDomainConfig: InputDomainSetting = {
+ version: "v1",
+ security: {
+ verifyHost: true,
+ verifyPeer: true,
+ },
+ proxy: undefined,
+}
+
+export class KernelInterceptorNativeStore extends Service {
+ public static readonly ID = "KERNEL_NATIVE_INTERCEPTOR_STORE"
+ private static readonly GLOBAL_DOMAIN = "*"
+ private static readonly DEFAULT_GLOBAL_SETTINGS: InputDomainSetting = {
+ ...defaultDomainConfig,
+ version: "v1",
+ }
+
+ private domainSettings = new Map<string, InputDomainSetting>()
+
+ async onServiceInit(): Promise<void> {
+ const initResult = await Store.init()
+ if (E.isLeft(initResult)) {
+ console.error(
+ "[NativeStore] Failed to initialize store:",
+ initResult.left
+ )
+ return
+ }
+
+ await this.loadStore()
+ this.setupWatchers()
+ }
+
+ private async loadStore(): Promise<void> {
+ const loadResult = await Store.get<StoredData>(
+ STORE_NAMESPACE,
+ STORE_KEYS.SETTINGS
+ )
+
+ if (E.isRight(loadResult) && loadResult.right) {
+ const storedData = loadResult.right
+ this.domainSettings = new Map(Object.entries(storedData.domains))
+ }
+
+ if (!this.domainSettings.has(KernelInterceptorNativeStore.GLOBAL_DOMAIN)) {
+ this.domainSettings.set(
+ KernelInterceptorNativeStore.GLOBAL_DOMAIN,
+ KernelInterceptorNativeStore.DEFAULT_GLOBAL_SETTINGS
+ )
+ await this.persistStore()
+ }
+ }
+
+ private setupWatchers() {
+ Store.watch(STORE_NAMESPACE, STORE_KEYS.SETTINGS).on(
+ "change",
+ async ({ value }) => {
+ if (value) {
+ const store = value as StoredData
+ this.domainSettings = new Map(Object.entries(store.domains))
+ }
+ }
+ )
+ }
+
+ private async persistStore(): Promise<void> {
+ const store: StoredData = {
+ version: "v1",
+ domains: Object.fromEntries(this.domainSettings),
+ lastUpdated: new Date().toISOString(),
+ }
+
+ const saveResult = await Store.set(
+ STORE_NAMESPACE,
+ STORE_KEYS.SETTINGS,
+ store
+ )
+ if (E.isLeft(saveResult)) {
+ console.error("[AgentStore] Failed to save store:", saveResult.left)
+ }
+ }
+
+ private mergeSecurity(
+ ...settings: (Required<InputDomainSetting>["security"] | undefined)[]
+ ): Required<InputDomainSetting>["security"] | undefined {
+ return settings.reduce(
+ (acc, setting) => (setting ? { ...acc, ...setting } : acc),
+ undefined as Required<RelayRequest>["security"] | undefined
+ )
+ }
+
+ private mergeProxy(
+ ...settings: (Required<InputDomainSetting>["proxy"] | undefined)[]
+ ): Required<InputDomainSetting>["proxy"] | undefined {
+ return settings.reduce(
+ (acc, setting) => (setting ? { ...acc, ...setting } : acc),
+ undefined as Required<InputDomainSetting>["proxy"] | undefined
+ )
+ }
+
+ private getMergedSettings(domain: string): InputDomainSetting {
+ const domainSettings = this.domainSettings.get(domain)
+ const globalSettings =
+ domain !== KernelInterceptorNativeStore.GLOBAL_DOMAIN
+ ? this.domainSettings.get(KernelInterceptorNativeStore.GLOBAL_DOMAIN)
+ : undefined
+
+ const result = {
+ security: this.mergeSecurity(
+ globalSettings?.security,
+ domainSettings?.security
+ ),
+ proxy: this.mergeProxy(globalSettings?.proxy, domainSettings?.proxy),
+ }
+
+ return { version: "v1", ...result }
+ }
+
+ public completeRequest(
+ request: Omit<RelayRequest, "proxy" | "security">
+ ): RelayRequest {
+ const host = new URL(request.url).host
+ const settings = this.getMergedSettings(host)
+ const effective = convertDomainSetting(settings)
+
+ if (E.isLeft(effective)) {
+ throw effective.left
+ }
+
+ return { ...request, ...effective.right }
+ }
+
+ public getDomainSettings(domain: string): InputDomainSetting {
+ return (
+ this.domainSettings.get(domain) ?? {
+ ...defaultDomainConfig,
+ version: "v1",
+ }
+ )
+ }
+
+ public async saveDomainSettings(
+ domain: string,
+ settings: Partial<InputDomainSetting>
+ ): Promise<void> {
+ const updatedSettings: InputDomainSetting = {
+ ...settings,
+ version: "v1",
+ }
+
+ this.domainSettings.set(domain, updatedSettings)
+ await this.persistStore()
+ }
+
+ public async clearDomainSettings(domain: string): Promise<void> {
+ this.domainSettings.delete(domain)
+ await this.persistStore()
+ }
+
+ public getDomains(): string[] {
+ return Array.from(this.domainSettings.keys())
+ }
+
+ public getAllDomainSettings(): Map<string, InputDomainSetting> {
+ return new Map(this.domainSettings)
+ }
+}
diff --git a/packages/hoppscotch-common/src/platform/std/kernel-interceptors/proxy/index.ts b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/proxy/index.ts
new file mode 100644
index 000000000..de2708790
--- /dev/null
+++ b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/proxy/index.ts
@@ -0,0 +1,300 @@
+import { markRaw } from "vue"
+import type {
+ FormDataValue,
+ RelayRequest,
+ ContentType,
+ Method,
+ Version,
+} from "@hoppscotch/kernel"
+import { MediaType } from "@hoppscotch/kernel"
+import { Service } from "dioc"
+import { Relay } from "~/kernel/relay"
+import SettingsProxy from "~/components/settings/Proxy.vue"
+import { KernelInterceptorProxyStore } from "./store"
+import type {
+ KernelInterceptor,
+ ExecutionResult,
+ KernelInterceptorError,
+} from "~/services/kernel-interceptor.service"
+import * as E from "fp-ts/Either"
+import { pipe } from "fp-ts/function"
+import { getI18n } from "~/modules/i18n"
+import { v4 } from "uuid"
+import { preProcessRelayRequest } from "~/helpers/functional/preprocess"
+
+type ProxyRequest = {
+ url: string
+ method: string
+ headers: Record<string, string>
+ params: Record<string, string>
+ data: string
+ wantsBinary: boolean
+ accessToken: string
+ auth?: {
+ username: string
+ password: string
+ }
+}
+
+type ProxyResponse = {
+ success: boolean
+ isBinary: boolean
+ status: number
+ data: string
+ statusText: string
+ headers: Record<string, string>
+}
+
+export class ProxyKernelInterceptorService
+ extends Service
+ implements KernelInterceptor
+{
+ public static readonly ID = "KERNEL_PROXY_INTERCEPTOR_SERVICE"
+ private readonly store = this.bind(KernelInterceptorProxyStore)
+
+ public readonly id = "proxy"
+ public readonly name = (t: ReturnType<typeof getI18n>) =>
+ t("interceptor.proxy.name")
+ public readonly selectable = { type: "selectable" as const }
+ public readonly capabilities = {
+ method: new Set([
+ "GET",
+ "POST",
+ "PUT",
+ "DELETE",
+ "PATCH",
+ "HEAD",
+ "OPTIONS",
+ ]),
+ header: new Set(["stringvalue"]),
+ content: new Set(["text"]),
+ auth: new Set(["basic"]),
+ security: new Set([]),
+ proxy: new Set([]),
+ advanced: new Set([]),
+ } as const
+ public readonly settingsEntry = markRaw({
+ title: (t: ReturnType<typeof getI18n>) =>
+ t("interceptor.proxy.settings_title"),
+ component: SettingsProxy,
+ })
+
+ private constructProxyRequest(
+ request: RelayRequest,
+ accessToken: string
+ ): ProxyRequest {
+ let wantsBinary = false
+ let requestData = ""
+ if (request.content) {
+ if (request.content.kind === "text" || request.content.kind === "xml") {
+ requestData = request.content.content
+ } else if (request.content.kind === "json") {
+ requestData = JSON.stringify(request.content.content)
+ } else if (
+ request.content.kind === "multipart" ||
+ request.content.kind === "form"
+ ) {
+ wantsBinary = true
+ const formData = new FormData()
+ request.content.content.forEach(
+ (values: FormDataValue[], key: string) => {
+ values.forEach((value: FormDataValue) => {
+ if (value.kind === "text") {
+ formData.append(key, value.value)
+ } else {
+ const blob = new Blob([value.data], { type: value.contentType })
+ formData.append(key, blob, value.filename)
+ }
+ })
+ }
+ )
+ requestData = formData.toString()
+ }
+ }
+
+ return {
+ accessToken,
+ wantsBinary,
+ url: request.url,
+ method: request.method,
+ headers: request.headers,
+ params: request.params,
+ data: requestData,
+ auth:
+ request.auth?.kind === "basic"
+ ? {
+ username: request.auth.username,
+ password: request.auth.password,
+ }
+ : undefined,
+ }
+ }
+
+ public execute(
+ request: RelayRequest
+ ): ExecutionResult<KernelInterceptorError> {
+ const settings = this.store.getSettings()
+ const accessToken = settings.accessToken
+ const proxyUrl = settings.proxyUrl
+
+ const proxyRequest = this.constructProxyRequest(
+ preProcessRelayRequest(request),
+ accessToken
+ )
+
+ const content: ContentType = {
+ kind: "json",
+ content: proxyRequest,
+ mediaType: MediaType.APPLICATION_JSON,
+ }
+
+ const proxyRelayRequest: RelayRequest = {
+ id: Date.now(),
+ url: proxyUrl,
+ method: "POST" as Method,
+ version: "HTTP/1.1" as Version,
+ headers: {
+ "content-type": content.mediaType,
+ ...(content.kind === "multipart"
+ ? {
+ "multipart-part-key": `proxyRequestData-${v4()}`,
+ }
+ : {}),
+ },
+ content,
+ }
+
+ const relayExecution = Relay.execute(proxyRelayRequest)
+
+ const response = pipe(relayExecution.response, (promise) =>
+ promise.then((either) =>
+ pipe(
+ either,
+ E.mapLeft((error): KernelInterceptorError => {
+ const humanMessage = {
+ heading: (t: ReturnType<typeof getI18n>) => {
+ switch (error.kind) {
+ case "network":
+ return t("error.network.heading")
+ case "timeout":
+ return t("error.timeout.heading")
+ case "certificate":
+ return t("error.certificate.heading")
+ case "auth":
+ return t("error.auth.heading")
+ case "proxy":
+ return t("error.proxy.heading")
+ case "parse":
+ return t("error.parse.heading")
+ case "version":
+ return t("error.version.heading")
+ case "abort":
+ return t("error.aborted.heading")
+ default:
+ return t("error.unknown.heading")
+ }
+ },
+ description: (t: ReturnType<typeof getI18n>) => {
+ switch (error.kind) {
+ case "network":
+ return t("error.network.description", {
+ message: error.message,
+ })
+ case "timeout":
+ return t("error.timeout.description", {
+ phase: error.phase ?? t("error.unknown.phase"),
+ })
+ case "certificate":
+ return t("error.certificate.description", {
+ message: error.message,
+ })
+ case "auth":
+ return t("error.auth.description", {
+ message: error.message,
+ })
+ case "proxy":
+ return t("error.proxy.description", {
+ message: error.message,
+ })
+ case "parse":
+ return t("error.parse.description", {
+ message: error.message,
+ })
+ case "version":
+ return t("error.version.description", {
+ message: error.message,
+ })
+ case "abort":
+ return t("error.aborted.description", {
+ message: error.message,
+ })
+ default:
+ return t("error.unknown.description")
+ }
+ },
+ }
+ return { humanMessage, error }
+ }),
+ E.chain((res) => {
+ const proxyBody =
+ res.body.mediaType === MediaType.TEXT_PLAIN
+ ? new Uint8Array(res.body.body)
+ : null
+
+ // NOTE: This will become obsolete if we use native interceptor like error propogation.
+ const proxyResponse = proxyBody
+ ? (JSON.parse(
+ new TextDecoder().decode(proxyBody)
+ ) as ProxyResponse)
+ : null
+
+ if (!proxyResponse?.success) {
+ return E.left({
+ humanMessage: {
+ heading: (t) => t("error.network.heading"),
+ description: (t) =>
+ t("error.network.description", {
+ message: "Proxy request failed",
+ cause: "Proxy server may be unresponsive",
+ }),
+ },
+ error: {
+ kind: "network",
+ message: "Proxy request failed",
+ },
+ })
+ }
+
+ if (proxyResponse.isBinary) {
+ return E.right({
+ ...res,
+ body: {
+ body: proxyBody,
+ mediaType:
+ proxyResponse.headers["content-type"] ||
+ "application/octet-stream",
+ },
+ })
+ }
+
+ return E.right({
+ ...res,
+ status: proxyResponse.status,
+ statusText: proxyResponse.statusText,
+ headers: proxyResponse.headers,
+ body: {
+ body: proxyBody,
+ mediaType: "text/plain",
+ },
+ })
+ })
+ )
+ )
+ )
+
+ return {
+ cancel: relayExecution.cancel,
+ response,
+ }
+ }
+}
diff --git a/packages/hoppscotch-common/src/platform/std/kernel-interceptors/proxy/store.ts b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/proxy/store.ts
new file mode 100644
index 000000000..9101701b6
--- /dev/null
+++ b/packages/hoppscotch-common/src/platform/std/kernel-interceptors/proxy/store.ts
@@ -0,0 +1,104 @@
+import { Service } from "dioc"
+import { Store } from "~/kernel/store"
+import { settingsStore } from "~/newstore/settings"
+import * as E from "fp-ts/Either"
+
+const STORE_NAMESPACE = "interceptors.proxy.v1"
+const SETTINGS_KEY = "settings"
+
+type ProxySettings = {
+ version: "v1"
+ proxyUrl: string
+ accessToken: string
+}
+
+interface StoredData {
+ version: string
+ settings: ProxySettings
+ lastUpdated: string
+}
+
+const DEFAULT_SETTINGS: ProxySettings = {
+ version: "v1",
+ proxyUrl: settingsStore.value.PROXY_URL ?? "https://proxy.hoppscotch.io",
+ accessToken: import.meta.env.VITE_PROXYSCOTCH_ACCESS_TOKEN ?? "",
+}
+
+export class KernelInterceptorProxyStore extends Service {
+ public static readonly ID = "KERNEL_PROXY_INTERCEPTOR_STORE"
+
+ private settings: ProxySettings = { ...DEFAULT_SETTINGS }
+
+ async onServiceInit(): Promise<void> {
+ const initResult = await Store.init()
+ if (E.isLeft(initResult)) {
+ console.error("[ProxyStore] Failed to initialize store:", initResult.left)
+ return
+ }
+
+ await this.loadSettings()
+
+ Store.watch(STORE_NAMESPACE, SETTINGS_KEY).on(
+ "change",
+ async ({ value }) => {
+ if (value) {
+ const storedData = value as StoredData
+ this.settings = storedData.settings
+ }
+ }
+ )
+ }
+
+ private async loadSettings(): Promise<void> {
+ const loadResult = await Store.get<StoredData>(
+ STORE_NAMESPACE,
+ SETTINGS_KEY
+ )
+
+ if (E.isRight(loadResult) && loadResult.right) {
+ const storedData = loadResult.right
+ this.settings = {
+ ...DEFAULT_SETTINGS,
+ ...storedData.settings,
+ }
+ } else {
+ await this.persistSettings()
+ }
+ }
+
+ private async persistSettings(): Promise<void> {
+ const storedData: StoredData = {
+ version: "v1",
+ settings: this.settings,
+ lastUpdated: new Date().toISOString(),
+ }
+
+ const saveResult = await Store.set(
+ STORE_NAMESPACE,
+ SETTINGS_KEY,
+ storedData
+ )
+
+ if (E.isLeft(saveResult)) {
+ console.error("[ProxyStore] Failed to save settings:", saveResult.left)
+ }
+ }
+
+ public async updateSettings(settings: Partial<ProxySettings>): Promise<void> {
+ this.settings = {
+ ...this.settings,
+ ...settings,
+ }
+
+ await this.persistSettings()
+ }
+
+ public getSettings(): ProxySettings {
+ return { ...this.settings }
+ }
+
+ public async resetSettings(): Promise<void> {
+ this.settings = { ...DEFAULT_SETTINGS }
+ await this.persistSettings()
+ }
+}
diff --git a/packages/hoppscotch-common/src/platform/std/kernel-io.ts b/packages/hoppscotch-common/src/platform/std/kernel-io.ts
new file mode 100644
index 000000000..5e7803a50
--- /dev/null
+++ b/packages/hoppscotch-common/src/platform/std/kernel-io.ts
@@ -0,0 +1,11 @@
+import { KernelIO } from "~/platform/kernel-io"
+import { Io } from "~/kernel/io"
+
+export const kernelIO: KernelIO = {
+ saveFileWithDialog(opts) {
+ return Io.saveFileWithDialog(opts)
+ },
+ openExternalLink(url) {
+ return Io.openExternalLink(url)
+ },
+}
diff --git a/packages/hoppscotch-common/src/services/__tests__/kernel-interceptor.service.spec.ts b/packages/hoppscotch-common/src/services/__tests__/kernel-interceptor.service.spec.ts
new file mode 100644
index 000000000..d23053174
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/__tests__/kernel-interceptor.service.spec.ts
@@ -0,0 +1,201 @@
+import { describe, expect, it, vi } from "vitest"
+import {
+ KernelInterceptor,
+ KernelInterceptorService,
+} from "../kernel-interceptor.service"
+import { TestContainer } from "dioc/testing"
+import { RelayRequest } from "@hoppscotch/kernel"
+
+describe("KernelInterceptorService", () => {
+ it("initially has no interceptors defined", () => {
+ const container = new TestContainer()
+ const service = container.bind(KernelInterceptorService)
+
+ expect(service.available.value).toEqual([])
+ })
+
+ it("current is null if no interceptors are defined", () => {
+ const container = new TestContainer()
+ const service = container.bind(KernelInterceptorService)
+
+ expect(service.current.value).toBeNull()
+ })
+
+ it("current points to active interceptor after registration", () => {
+ const container = new TestContainer()
+ const service = container.bind(KernelInterceptorService)
+
+ const interceptor: KernelInterceptor = {
+ id: "test",
+ name: () => "Test Interceptor",
+ selectable: { type: "selectable" },
+ capabilities: {},
+ execute: () => {
+ throw new Error("Not implemented")
+ },
+ }
+
+ service.register(interceptor)
+ expect(service.current.value).toBe(interceptor)
+ })
+
+ describe("register", () => {
+ it("adds interceptor to available list", () => {
+ const container = new TestContainer()
+ const service = container.bind(KernelInterceptorService)
+
+ const interceptor: KernelInterceptor = {
+ id: "test",
+ name: () => "Test Interceptor",
+ selectable: { type: "selectable" },
+ capabilities: {},
+ execute: () => {
+ throw new Error("Not implemented")
+ },
+ }
+
+ service.register(interceptor)
+ expect(service.available.value).toEqual([interceptor])
+ })
+
+ it("sets first registered interceptor as active", () => {
+ const container = new TestContainer()
+ const service = container.bind(KernelInterceptorService)
+
+ const interceptor: KernelInterceptor = {
+ id: "test",
+ name: () => "Test Interceptor",
+ selectable: { type: "selectable" },
+ capabilities: {},
+ execute: () => {
+ throw new Error("Not implemented")
+ },
+ }
+
+ service.register(interceptor)
+ expect(service.current.value?.id).toBe("test")
+ })
+ })
+
+ describe("setActive", () => {
+ it("cannot set unknown interceptor as active", () => {
+ const container = new TestContainer()
+ const service = container.bind(KernelInterceptorService)
+
+ service.register({
+ id: "test",
+ name: () => "Test Interceptor",
+ selectable: { type: "selectable" },
+ capabilities: {},
+ execute: () => {
+ throw new Error("Not implemented")
+ },
+ })
+
+ service.setActive("unknown")
+ expect(service.current.value?.id).toBe("test")
+ })
+
+ it("updates current when setting valid interceptor", () => {
+ const container = new TestContainer()
+ const service = container.bind(KernelInterceptorService)
+
+ const interceptor1: KernelInterceptor = {
+ id: "test1",
+ name: () => "Test 1",
+ selectable: { type: "selectable" },
+ capabilities: {},
+ execute: () => {
+ throw new Error("Not implemented")
+ },
+ }
+
+ const interceptor2: KernelInterceptor = {
+ id: "test2",
+ name: () => "Test 2",
+ selectable: { type: "selectable" },
+ capabilities: {},
+ execute: () => {
+ throw new Error("Not implemented")
+ },
+ }
+
+ service.register(interceptor1)
+ service.register(interceptor2)
+
+ service.setActive("test2")
+ expect(service.current.value).toBe(interceptor2)
+ })
+ })
+
+ describe("execute", () => {
+ it("throws error if no interceptor is active", () => {
+ const container = new TestContainer()
+ const service = container.bind(KernelInterceptorService)
+
+ expect(() => service.execute({} as RelayRequest)).toThrow(
+ "No active interceptor"
+ )
+ })
+
+ it("calls execute on current interceptor", () => {
+ const container = new TestContainer()
+ const service = container.bind(KernelInterceptorService)
+
+ const interceptor: KernelInterceptor = {
+ id: "test",
+ name: () => "Test Interceptor",
+ selectable: { type: "selectable" },
+ capabilities: {},
+ execute: vi.fn(),
+ }
+
+ service.register(interceptor)
+
+ const request = {} as RelayRequest
+ service.execute(request)
+
+ expect(interceptor.execute).toHaveBeenCalledWith(request)
+ })
+ })
+
+ describe("validation", () => {
+ it("resets to selectable interceptor if current becomes unselectable", async () => {
+ const container = new TestContainer()
+ const service = container.bind(KernelInterceptorService)
+
+ const interceptor1: KernelInterceptor = {
+ id: "test1",
+ name: () => "Test 1",
+ selectable: {
+ type: "unselectable",
+ reason: {
+ type: "text",
+ text: () => "Not available",
+ },
+ },
+ capabilities: {},
+ execute: () => {
+ throw new Error("Not implemented")
+ },
+ }
+
+ const interceptor2: KernelInterceptor = {
+ id: "test2",
+ name: () => "Test 2",
+ selectable: { type: "selectable" },
+ capabilities: {},
+ execute: () => {
+ throw new Error("Not implemented")
+ },
+ }
+
+ service.register(interceptor2)
+ service.register(interceptor1)
+
+ await new Promise((resolve) => setTimeout(resolve, 0))
+
+ expect(service.current.value?.id).toBe("test2")
+ })
+ })
+})
diff --git a/packages/hoppscotch-common/src/services/initialization.service.ts b/packages/hoppscotch-common/src/services/initialization.service.ts
new file mode 100644
index 000000000..d46e9e072
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/initialization.service.ts
@@ -0,0 +1,173 @@
+import { Service } from "dioc"
+import * as E from "fp-ts/Either"
+import { getService } from "~/modules/dioc"
+
+import { PersistenceService } from "~/services/persistence"
+import { RESTTabService } from "~/services/tab/rest"
+import { GQLTabService } from "~/services/tab/graphql"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
+
+import { platform } from "~/platform"
+import { NativeKernelInterceptorService } from "~/platform/std/kernel-interceptors/native"
+
+import { performMigrations } from "~/helpers/migrations"
+import { initBackendGQLClient } from "~/helpers/backend/GQLClient"
+import { getKernelMode } from "@hoppscotch/kernel"
+
+type InitEvent =
+ | { type: "STORE_READY" }
+ | { type: "PERSISTENCE_FIRST_READY" }
+ | { type: "PERSISTENCE_LATER_READY" }
+ | { type: "TABS_READY" }
+ | { type: "NATIVE_KERNEL_NETWORKING_READY" }
+ | { type: "AUTH_READY" }
+ | { type: "BACKEND_CLIENT_READY" }
+ | { type: "SYNC_READY" }
+ | { type: "ALL_READY" }
+
+/**
+ * Service responsible for coordinating the initialization sequence.
+ */
+export class InitializationService extends Service<InitEvent> {
+ public static readonly ID = "INITIALIZATION_SERVICE"
+
+ private initState = {
+ store: false,
+ persistenceFirst: false,
+ tabs: false,
+ nativeKernelNetworking: false,
+ auth: false,
+ sync: false,
+ persistenceLater: false,
+ backendClient: false,
+ }
+
+ private async initStore() {
+ const persistenceService = getService(PersistenceService)
+ const result = await persistenceService.init()
+
+ if (E.isLeft(result)) {
+ throw new Error(`Store initialization failed: ${result.left.message}`)
+ }
+
+ this.initState.store = true
+ this.emit({ type: "STORE_READY" })
+ }
+
+ private async initPersistenceFirst() {
+ if (!this.initState.store) {
+ throw new Error("Cannot initialize persistence before store")
+ }
+
+ const persistenceService = getService(PersistenceService)
+ await persistenceService.setupFirst()
+
+ this.initState.persistenceFirst = true
+ this.emit({ type: "PERSISTENCE_FIRST_READY" })
+ }
+
+ private async initTabs() {
+ if (!this.initState.persistenceFirst) {
+ throw new Error("Cannot initialize tabs before persistence")
+ }
+
+ const restTabService = getService(RESTTabService)
+ const gqlTabService = getService(GQLTabService)
+
+ await Promise.all([restTabService.init(), gqlTabService.init()])
+
+ this.initState.tabs = true
+ this.emit({ type: "TABS_READY" })
+ }
+
+ private async initNativeKernelNetworking() {
+ const interceptorService = getService(KernelInterceptorService)
+ const nativeInterceptorService = getService(NativeKernelInterceptorService)
+ interceptorService.register(nativeInterceptorService)
+ interceptorService.setActive("native")
+
+ this.initState.nativeKernelNetworking = true
+ this.emit({ type: "NATIVE_KERNEL_NETWORKING_READY" })
+ }
+
+ private async initAuth() {
+ if (
+ getKernelMode() === "desktop" &&
+ !this.initState.nativeKernelNetworking
+ ) {
+ throw new Error(
+ "Cannot initialize auth on desktop before native networking"
+ )
+ }
+
+ if (!this.initState.persistenceFirst || !this.initState.tabs) {
+ throw new Error("Cannot initialize auth before persistence and tabs")
+ }
+
+ await platform.auth.performAuthInit()
+
+ this.initState.auth = true
+ this.emit({ type: "AUTH_READY" })
+ }
+
+ private async initBackendClient() {
+ initBackendGQLClient()
+
+ this.initState.backendClient = true
+ this.emit({ type: "BACKEND_CLIENT_READY" })
+ }
+
+ private async initPersistenceLater() {
+ if (!this.initState.persistenceFirst) {
+ throw new Error("Cannot initialize persistence before store")
+ }
+
+ const persistenceService = getService(PersistenceService)
+ await persistenceService.setupLater()
+
+ this.initState.persistenceLater = true
+ this.emit({ type: "PERSISTENCE_LATER_READY" })
+ }
+
+ private async initSync() {
+ if (!this.initState.auth) {
+ throw new Error("Cannot initialize remaining services before auth")
+ }
+
+ await Promise.all([
+ platform.sync.settings.initSettingsSync(),
+ platform.sync.collections.initCollectionsSync(),
+ platform.sync.history.initHistorySync(),
+ platform.sync.environments.initEnvironmentsSync(),
+ platform.analytics?.initAnalytics(),
+ ])
+
+ this.emit({ type: "SYNC_READY" })
+ }
+
+ public async initPre() {
+ await this.initStore()
+ await this.initPersistenceFirst()
+
+ if (getKernelMode() === "desktop") {
+ await this.initNativeKernelNetworking()
+ }
+
+ await this.initBackendClient()
+ await this.initTabs()
+ }
+
+ public async initAuthAndSync() {
+ await this.initAuth()
+ await this.initSync()
+ }
+
+ public async initPost() {
+ await this.initPersistenceLater()
+ performMigrations()
+ }
+
+ public isInitialized() {
+ return Object.values(this.initState).every(Boolean)
+ }
+}
diff --git a/packages/hoppscotch-common/src/services/inspection/__tests__/index.spec.ts b/packages/hoppscotch-common/src/services/inspection/__tests__/index.spec.ts
index 8205fd335..9ec138f43 100644
--- a/packages/hoppscotch-common/src/services/inspection/__tests__/index.spec.ts
+++ b/packages/hoppscotch-common/src/services/inspection/__tests__/index.spec.ts
@@ -1,7 +1,13 @@
-import { describe, it, expect } from "vitest"
+import { describe, it, expect, vi } from "vitest"
import { Inspector, InspectionService, InspectorResult } from "../"
import { TestContainer } from "dioc/testing"
import { ref } from "vue"
+import { RESTTabService } from "~/services/tab/rest"
+
+vi.mock("~/modules/i18n", () => ({
+ __esModule: true,
+ getI18n: () => (x: string) => x,
+}))
const inspectorResultMock: InspectorResult[] = [
{
@@ -29,6 +35,36 @@ describe("InspectionService", () => {
describe("registerInspector", () => {
it("should register an inspector", () => {
const container = new TestContainer()
+
+ container.bindMock(RESTTabService, {
+ currentActiveTab: ref({
+ id: "test",
+ document: {
+ type: "request",
+ request: {},
+ response: null,
+ isDirty: false,
+ optionTabPreference: "params",
+ },
+ }),
+ tabMap: new Map([
+ [
+ "test",
+ {
+ id: "test",
+ document: {
+ type: "request",
+ request: {},
+ isDirty: false,
+ optionTabPreference: "params",
+ },
+ },
+ ],
+ ]),
+ tabOrdering: ref(["test"]),
+ currentTabID: ref("test"),
+ })
+
const service = container.bind(InspectionService)
service.registerInspector(testInspector)
@@ -40,6 +76,36 @@ describe("InspectionService", () => {
describe("deleteTabInspectorResult", () => {
it("should delete a tab's inspector results", () => {
const container = new TestContainer()
+
+ container.bindMock(RESTTabService, {
+ currentActiveTab: ref({
+ id: "test",
+ document: {
+ type: "request",
+ request: {},
+ response: null,
+ isDirty: false,
+ optionTabPreference: "params",
+ },
+ }),
+ tabMap: new Map([
+ [
+ "test",
+ {
+ id: "test",
+ document: {
+ type: "request",
+ request: {},
+ isDirty: false,
+ optionTabPreference: "params",
+ },
+ },
+ ],
+ ]),
+ tabOrdering: ref(["test"]),
+ currentTabID: ref("test"),
+ })
+
const service = container.bind(InspectionService)
const tabID = "testTab"
diff --git a/packages/hoppscotch-common/src/services/inspection/inspectors/__tests__/header.inspector.spec.ts b/packages/hoppscotch-common/src/services/inspection/inspectors/__tests__/header.inspector.spec.ts
deleted file mode 100644
index db05fe573..000000000
--- a/packages/hoppscotch-common/src/services/inspection/inspectors/__tests__/header.inspector.spec.ts
+++ /dev/null
@@ -1,106 +0,0 @@
-import { TestContainer } from "dioc/testing"
-import { describe, expect, it, vi } from "vitest"
-import { HeaderInspectorService } from "../header.inspector"
-import { InspectionService } from "../../index"
-import { getDefaultRESTRequest } from "~/helpers/rest/default"
-import { ref } from "vue"
-import { InterceptorService } from "~/services/interceptor.service"
-
-vi.mock("~/modules/i18n", () => ({
- __esModule: true,
- getI18n: () => (x: string) => x,
-}))
-
-describe("HeaderInspectorService", () => {
- it("registers with the inspection service upon initialization", () => {
- const container = new TestContainer()
-
- const registerInspectorFn = vi.fn()
-
- container.bindMock(InspectionService, {
- registerInspector: registerInspectorFn,
- })
-
- const headerInspector = container.bind(HeaderInspectorService)
-
- expect(registerInspectorFn).toHaveBeenCalledOnce()
- expect(registerInspectorFn).toHaveBeenCalledWith(headerInspector)
- })
-
- describe("getInspectorFor", () => {
- it("should return an inspector result when headers contain cookies", () => {
- const container = new TestContainer()
- const headerInspector = container.bind(HeaderInspectorService)
-
- const req = ref({
- ...getDefaultRESTRequest(),
- endpoint: "http://example.com/api/data",
- headers: [{ key: "Cookie", value: "some-cookie", active: true }],
- })
-
- const result = headerInspector.getInspections(req)
-
- expect(result.value).toContainEqual(
- expect.objectContaining({ id: "header", isApplicable: true })
- )
- })
-
- it("should return an empty array when headers do not contain cookies", () => {
- const container = new TestContainer()
- const headerInspector = container.bind(HeaderInspectorService)
-
- const req = ref({
- ...getDefaultRESTRequest(),
- endpoint: "http://example.com/api/data",
- headers: [{ key: "Authorization", value: "Bearer abcd", active: true }],
- })
-
- const result = headerInspector.getInspections(req)
-
- expect(result.value).toHaveLength(0)
- })
-
- it("should return an empty array when headers contain cookies but interceptor supports cookies", () => {
- const container = new TestContainer()
-
- container.bindMock(InterceptorService, {
- currentInterceptor: ref({ supportsCookies: true }) as any,
- })
-
- const headerInspector = container.bind(HeaderInspectorService)
-
- const req = ref({
- ...getDefaultRESTRequest(),
- endpoint: "http://example.com/api/data",
- headers: [{ key: "Cookie", value: "some-cookie", active: true }],
- })
-
- const result = headerInspector.getInspections(req)
-
- expect(result.value).toHaveLength(0)
- })
-
- it("should return an inspector result when headers contain cookies and the current interceptor doesn't support cookies", () => {
- const container = new TestContainer()
-
- container.bindMock(InterceptorService, {
- currentInterceptor: ref({ supportsCookies: false }) as any,
- })
-
- const headerInspector = container.bind(HeaderInspectorService)
-
- const req = ref({
- ...getDefaultRESTRequest(),
- endpoint: "http://example.com/api/data",
- headers: [{ key: "Cookie", value: "some-cookie", active: true }],
- })
-
- const result = headerInspector.getInspections(req)
-
- expect(result.value).not.toHaveLength(0)
- expect(result.value).toContainEqual(
- expect.objectContaining({ id: "header", isApplicable: true })
- )
- })
- })
-})
diff --git a/packages/hoppscotch-common/src/services/inspection/inspectors/__tests__/request.inspector.spec.ts b/packages/hoppscotch-common/src/services/inspection/inspectors/__tests__/request.inspector.spec.ts
new file mode 100644
index 000000000..54410697f
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/inspection/inspectors/__tests__/request.inspector.spec.ts
@@ -0,0 +1,290 @@
+import { TestContainer } from "dioc/testing"
+import { describe, expect, it, vi } from "vitest"
+import { RequestInspectorService } from "../request.inspector"
+import { InspectionService } from "../../index"
+import { getDefaultRESTRequest } from "~/helpers/rest/default"
+import { ref } from "vue"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
+
+vi.mock("~/modules/i18n", () => ({
+ __esModule: true,
+ getI18n: () => (x: string) => x,
+}))
+
+describe("RequestInspectorService", () => {
+ it("registers with the inspection service upon initialization", () => {
+ const container = new TestContainer()
+
+ const registerInspectorFn = vi.fn()
+
+ container.bindMock(InspectionService, {
+ registerInspector: registerInspectorFn,
+ })
+
+ const requestInspector = container.bind(RequestInspectorService)
+
+ expect(registerInspectorFn).toHaveBeenCalledOnce()
+ expect(registerInspectorFn).toHaveBeenCalledWith(requestInspector)
+ })
+
+ describe("cookie header inspection", () => {
+ it("should return an inspector result when headers contain cookies and interceptor doesn't support cookies", () => {
+ const container = new TestContainer()
+
+ container.bindMock(KernelInterceptorService, {
+ current: ref({
+ capabilities: {
+ auth: new Set(),
+ content: new Set(),
+ advanced: new Set(),
+ },
+ }),
+ })
+
+ const requestInspector = container.bind(RequestInspectorService)
+
+ const req = ref({
+ ...getDefaultRESTRequest(),
+ endpoint: "http://example.com/api/data",
+ headers: [{ key: "Cookie", value: "some-cookie", active: true }],
+ })
+
+ const result = requestInspector.getInspections(req)
+
+ expect(result.value).toContainEqual(
+ expect.objectContaining({
+ id: "cookie-header",
+ isApplicable: true,
+ locations: {
+ type: "header",
+ position: "key",
+ key: "Cookie",
+ index: 0,
+ },
+ })
+ )
+ })
+
+ it("should return no inspector result when headers contain cookies and interceptor supports cookies", () => {
+ const container = new TestContainer()
+
+ container.bindMock(KernelInterceptorService, {
+ current: ref({
+ capabilities: {
+ auth: new Set(),
+ content: new Set(),
+ advanced: new Set(["cookies"]),
+ },
+ }),
+ })
+
+ const requestInspector = container.bind(RequestInspectorService)
+
+ const req = ref({
+ ...getDefaultRESTRequest(),
+ endpoint: "http://example.com/api/data",
+ headers: [{ key: "Cookie", value: "some-cookie", active: true }],
+ })
+
+ const result = requestInspector.getInspections(req)
+
+ expect(result.value).not.toContainEqual(
+ expect.objectContaining({
+ id: "cookie-header",
+ })
+ )
+ })
+ })
+
+ describe("localhost access inspection", () => {
+ it("should return an inspector result when URL contains localhost and interceptor doesn't support local access", () => {
+ const container = new TestContainer()
+
+ container.bindMock(KernelInterceptorService, {
+ current: ref({
+ capabilities: {
+ auth: new Set(),
+ content: new Set(),
+ advanced: new Set(),
+ },
+ }),
+ })
+
+ const requestInspector = container.bind(RequestInspectorService)
+
+ const req = ref({
+ ...getDefaultRESTRequest(),
+ endpoint: "http://localhost:3000/api",
+ })
+
+ const result = requestInspector.getInspections(req)
+
+ expect(result.value).toContainEqual(
+ expect.objectContaining({
+ id: "localaccess",
+ isApplicable: true,
+ locations: {
+ type: "url",
+ },
+ })
+ )
+ })
+
+ it("should return no inspector result when URL contains localhost and interceptor supports local access", () => {
+ const container = new TestContainer()
+
+ container.bindMock(KernelInterceptorService, {
+ current: ref({
+ capabilities: {
+ auth: new Set(),
+ content: new Set(),
+ advanced: new Set(["localaccess"]),
+ },
+ }),
+ })
+
+ const requestInspector = container.bind(RequestInspectorService)
+
+ const req = ref({
+ ...getDefaultRESTRequest(),
+ endpoint: "http://localhost:3000/api",
+ })
+
+ const result = requestInspector.getInspections(req)
+
+ expect(result.value).not.toContainEqual(
+ expect.objectContaining({
+ id: "localaccess",
+ })
+ )
+ })
+ })
+
+ describe("digest auth inspection", () => {
+ it("should return an inspector result when using digest auth and interceptor doesn't support it", () => {
+ const container = new TestContainer()
+
+ container.bindMock(KernelInterceptorService, {
+ current: ref({
+ capabilities: {
+ auth: new Set(),
+ content: new Set(),
+ advanced: new Set(),
+ },
+ }),
+ })
+
+ const requestInspector = container.bind(RequestInspectorService)
+
+ const req = ref({
+ ...getDefaultRESTRequest(),
+ auth: { authType: "digest", authActive: true },
+ })
+
+ const result = requestInspector.getInspections(req)
+
+ expect(result.value).toContainEqual(
+ expect.objectContaining({
+ id: "digest-auth",
+ isApplicable: true,
+ locations: {
+ type: "url",
+ },
+ })
+ )
+ })
+
+ it("should return no inspector result when using digest auth and interceptor supports it", () => {
+ const container = new TestContainer()
+
+ container.bindMock(KernelInterceptorService, {
+ current: ref({
+ capabilities: {
+ auth: new Set(["digest"]),
+ content: new Set(),
+ advanced: new Set(),
+ },
+ }),
+ })
+
+ const requestInspector = container.bind(RequestInspectorService)
+
+ const req = ref({
+ ...getDefaultRESTRequest(),
+ auth: { authType: "digest", authActive: true },
+ })
+
+ const result = requestInspector.getInspections(req)
+
+ expect(result.value).not.toContainEqual(
+ expect.objectContaining({
+ id: "digest-auth",
+ })
+ )
+ })
+ })
+
+ describe("binary body inspection", () => {
+ it("should return an inspector result when using binary body and interceptor doesn't support it", () => {
+ const container = new TestContainer()
+
+ container.bindMock(KernelInterceptorService, {
+ current: ref({
+ capabilities: {
+ auth: new Set(),
+ content: new Set(),
+ advanced: new Set(),
+ },
+ }),
+ })
+
+ const requestInspector = container.bind(RequestInspectorService)
+
+ const req = ref({
+ ...getDefaultRESTRequest(),
+ body: { contentType: "application/octet-stream", body: null },
+ })
+
+ const result = requestInspector.getInspections(req)
+
+ expect(result.value).toContainEqual(
+ expect.objectContaining({
+ id: "binary-body",
+ isApplicable: true,
+ locations: {
+ type: "body-content-type-header",
+ },
+ })
+ )
+ })
+
+ it("should return no inspector result when using binary body and interceptor supports it", () => {
+ const container = new TestContainer()
+
+ container.bindMock(KernelInterceptorService, {
+ current: ref({
+ capabilities: {
+ auth: new Set(),
+ content: new Set(["binary"]),
+ advanced: new Set(),
+ },
+ }),
+ })
+
+ const requestInspector = container.bind(RequestInspectorService)
+
+ const req = ref({
+ ...getDefaultRESTRequest(),
+ body: { contentType: "application/octet-stream", body: null },
+ })
+
+ const result = requestInspector.getInspections(req)
+
+ expect(result.value).not.toContainEqual(
+ expect.objectContaining({
+ id: "binary-body",
+ })
+ )
+ })
+ })
+})
diff --git a/packages/hoppscotch-common/src/services/inspection/inspectors/authorization.inspector.ts b/packages/hoppscotch-common/src/services/inspection/inspectors/authorization.inspector.ts
deleted file mode 100644
index 38159f858..000000000
--- a/packages/hoppscotch-common/src/services/inspection/inspectors/authorization.inspector.ts
+++ /dev/null
@@ -1,106 +0,0 @@
-import {
- HoppRESTRequest,
- HoppRESTResponseOriginalRequest,
-} from "@hoppscotch/data"
-import { Service } from "dioc"
-import { computed, markRaw, Ref } from "vue"
-
-import { getI18n } from "~/modules/i18n"
-import { InterceptorService } from "~/services/interceptor.service"
-import { RESTTabService } from "~/services/tab/rest"
-import IconAlertTriangle from "~icons/lucide/alert-triangle"
-import { InspectionService, Inspector, InspectorResult } from ".."
-
-/**
- * This inspector is responsible for inspecting the authorization properties of a request.
- * Only applies to REST tabs currently.
- *
- * NOTE: Initializing this service registers it as a inspector with the Inspection Service.
- */
-export class AuthorizationInspectorService
- extends Service
- implements Inspector
-{
- public static readonly ID = "AUTHORIZATION_INSPECTOR_SERVICE"
-
- private t = getI18n()
-
- public readonly inspectorID = "authorization"
-
- private readonly inspection = this.bind(InspectionService)
- private readonly interceptorService = this.bind(InterceptorService)
- private readonly restTabService = this.bind(RESTTabService)
-
- override onServiceInit() {
- this.inspection.registerInspector(this)
- }
-
- private resolveAuthType(auth: HoppRESTRequest["auth"]) {
- if (auth.authType !== "inherit") {
- return auth.authType
- }
-
- const activeTabDocument =
- this.restTabService.currentActiveTab.value.document
-
- if (
- activeTabDocument.type === "example-response" ||
- activeTabDocument.type === "test-runner"
- ) {
- return null
- }
-
- const { inheritedProperties } = activeTabDocument
-
- if (!inheritedProperties) {
- return null
- }
-
- return inheritedProperties.auth.inheritedAuth.authType
- }
-
- getInspections(
- req: Readonly<Ref<HoppRESTRequest | HoppRESTResponseOriginalRequest>>
- ) {
- return computed(() => {
- if (!req.value) return []
- const currentInterceptorIDValue =
- this.interceptorService.currentInterceptorID.value
-
- if (!currentInterceptorIDValue) {
- return []
- }
-
- const auth = req.value.auth
-
- const results: InspectorResult[] = []
-
- const resolvedAuthType = this.resolveAuthType(auth)
-
- if (
- resolvedAuthType === "digest" &&
- !this.interceptorService.currentInterceptor.value?.supportsDigestAuth
- ) {
- results.push({
- id: "url",
- icon: markRaw(IconAlertTriangle),
- text: {
- type: "text",
- text: this.t("authorization.digest.inspector_warning"),
- },
- severity: 2,
- isApplicable: true,
- locations: {
- type: "url",
- },
- doc: {
- text: this.t("action.learn_more"),
- link: "https://docs.hoppscotch.io/documentation/features/inspections",
- },
- })
- }
-
- return results
- })
- }
-}
diff --git a/packages/hoppscotch-common/src/services/inspection/inspectors/header.inspector.ts b/packages/hoppscotch-common/src/services/inspection/inspectors/header.inspector.ts
deleted file mode 100644
index cfcb48a03..000000000
--- a/packages/hoppscotch-common/src/services/inspection/inspectors/header.inspector.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-import { Service } from "dioc"
-import { InspectionService, Inspector, InspectorResult } from ".."
-import { getI18n } from "~/modules/i18n"
-import {
- HoppRESTRequest,
- HoppRESTResponseOriginalRequest,
-} from "@hoppscotch/data"
-import { Ref, computed, markRaw } from "vue"
-import IconAlertTriangle from "~icons/lucide/alert-triangle"
-import { InterceptorService } from "~/services/interceptor.service"
-
-/**
- * This inspector is responsible for inspecting the header of a request.
- * It checks if the header contains cookies.
- *
- * NOTE: Initializing this service registers it as a inspector with the Inspection Service.
- */
-export class HeaderInspectorService extends Service implements Inspector {
- public static readonly ID = "HEADER_INSPECTOR_SERVICE"
-
- private t = getI18n()
-
- public readonly inspectorID = "header"
-
- private readonly inspection = this.bind(InspectionService)
- private readonly interceptorService = this.bind(InterceptorService)
-
- override onServiceInit() {
- this.inspection.registerInspector(this)
- }
-
- private cookiesCheck(headerKey: string) {
- const cookieKeywords = ["Cookie", "Set-Cookie", "Cookie2", "Set-Cookie2"]
-
- return cookieKeywords.includes(headerKey)
- }
-
- getInspections(
- req: Readonly<Ref<HoppRESTRequest | HoppRESTResponseOriginalRequest>>
- ) {
- return computed(() => {
- const results: InspectorResult[] = []
-
- if (!req.value) return results
-
- const headers = req.value.headers
-
- const headerKeys = Object.values(headers).map((header) => header.key)
-
- const isContainCookies = headerKeys.includes("Cookie")
-
- if (
- isContainCookies &&
- !this.interceptorService.currentInterceptor.value?.supportsCookies
- ) {
- headerKeys.forEach((headerKey, index) => {
- if (this.cookiesCheck(headerKey)) {
- results.push({
- id: "header",
- icon: markRaw(IconAlertTriangle),
- text: {
- type: "text",
- text: this.t("inspections.header.cookie"),
- },
- severity: 2,
- isApplicable: true,
- locations: {
- type: "header",
- position: "key",
- key: headerKey,
- index: index,
- },
- doc: {
- text: this.t("action.download_here"),
- link: "https://hoppscotch.com/download",
- },
- })
- }
- })
- }
-
- return results
- })
- }
-}
diff --git a/packages/hoppscotch-common/src/services/inspection/inspectors/interceptors.inspector.ts b/packages/hoppscotch-common/src/services/inspection/inspectors/interceptors.inspector.ts
deleted file mode 100644
index 140c72bbc..000000000
--- a/packages/hoppscotch-common/src/services/inspection/inspectors/interceptors.inspector.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-import { Service } from "dioc"
-import { InspectionService, Inspector, InspectorResult } from ".."
-import { computed, Ref } from "vue"
-import {
- HoppRESTRequest,
- HoppRESTResponseOriginalRequest,
-} from "@hoppscotch/data"
-
-import IconAlertCircle from "~icons/lucide/alert-circle"
-import { InterceptorService } from "~/services/interceptor.service"
-import { getI18n } from "~/modules/i18n"
-
-/**
- * This inspector is responsible for inspecting the interceptor usage.
- *
- * NOTE: Initializing this service registers it as a inspector with the Inspection Service.
- */
-export class InterceptorsInspectorService extends Service implements Inspector {
- public static readonly ID = "INTERCEPTORS_INSPECTOR_SERVICE"
-
- inspectorID = "interceptors"
-
- private t = getI18n()
-
- private readonly inspection = this.bind(InspectionService)
- private readonly interceptors = this.bind(InterceptorService)
-
- onServiceInit() {
- this.inspection.registerInspector(this)
- }
-
- getInspections(
- req: Readonly<Ref<HoppRESTRequest | HoppRESTResponseOriginalRequest>>
- ) {
- return computed((): InspectorResult[] => {
- if (!req.value) {
- return []
- }
-
- const isBinaryBody =
- req.value.body.contentType === "application/octet-stream"
-
- const currentInterceptor = this.interceptors.currentInterceptor.value
-
- // TODO: Maybe move feature determination/checking related things to interceptor system.
- if (
- isBinaryBody &&
- currentInterceptor &&
- currentInterceptor.supportsBinaryContentType === false
- ) {
- return [
- {
- isApplicable: true,
- icon: IconAlertCircle,
- severity: 2,
- text: {
- type: "text",
- text: this.t(
- "inspections.requestBody.active_interceptor_doesnt_support_binary_body"
- ),
- },
- locations: {
- type: "body-content-type-header",
- },
- id: "interceptors-inspector-binary-agent-body-content-type-header",
- },
- ]
- }
-
- return []
- })
- }
-}
diff --git a/packages/hoppscotch-common/src/services/inspection/inspectors/request.inspector.ts b/packages/hoppscotch-common/src/services/inspection/inspectors/request.inspector.ts
new file mode 100644
index 000000000..272721645
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/inspection/inspectors/request.inspector.ts
@@ -0,0 +1,151 @@
+import { Service } from "dioc"
+import { InspectionService, Inspector, InspectorResult } from ".."
+import { computed, markRaw, Ref } from "vue"
+import {
+ HoppRESTRequest,
+ HoppRESTResponseOriginalRequest,
+} from "@hoppscotch/data"
+import IconAlertTriangle from "~icons/lucide/alert-triangle"
+import { getI18n } from "~/modules/i18n"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
+import { RelayCapabilities } from "@hoppscotch/kernel"
+
+type CapabilityRequirement<K extends keyof RelayCapabilities> = {
+ type: K
+ name: string & RelayCapabilities[K] extends Set<infer T> ? T : never
+}
+
+interface InspectionMatch {
+ index?: number
+ key?: string
+}
+
+interface CapabilityCheck {
+ matcher: (
+ req: HoppRESTRequest | HoppRESTResponseOriginalRequest
+ ) => InspectionMatch | null
+ requires: CapabilityRequirement<keyof RelayCapabilities>
+ createInspection: (match: InspectionMatch) => InspectorResult
+}
+
+export class RequestInspectorService extends Service implements Inspector {
+ public static readonly ID = "REQUEST_INSPECTOR_SERVICE"
+ public readonly inspectorID = "request"
+
+ private readonly t = getI18n()
+ private readonly inspection = this.bind(InspectionService)
+ private readonly kernelInterceptor = this.bind(KernelInterceptorService)
+
+ private readonly inspectionChecks: CapabilityCheck[] = [
+ {
+ matcher: (req) => {
+ const localHostURLs = ["localhost", "127.0.0.1"]
+ return localHostURLs.some((host) => req.endpoint.includes(host))
+ ? {}
+ : null
+ },
+ requires: {
+ type: "advanced",
+ name: "localaccess",
+ },
+ createInspection: () => ({
+ id: "localaccess",
+ icon: markRaw(IconAlertTriangle),
+ text: {
+ type: "text",
+ text: this.t("inspections.url.localaccess_unsupported"),
+ },
+ severity: 2,
+ isApplicable: true,
+ locations: { type: "url" },
+ }),
+ },
+ {
+ matcher: (req) => (req.auth.authType === "digest" ? {} : null),
+ requires: { type: "auth", name: "digest" },
+ createInspection: () => ({
+ id: "digest-auth",
+ icon: markRaw(IconAlertTriangle),
+ text: { type: "text", text: this.t("inspections.auth.digest") },
+ severity: 2,
+ isApplicable: true,
+ locations: { type: "url" },
+ doc: {
+ text: this.t("action.learn_more"),
+ link: "https://docs.hoppscotch.io/documentation/features/inspections",
+ },
+ }),
+ },
+ {
+ matcher: (req) => {
+ const index = req.headers.findIndex((h) =>
+ h.key.toLowerCase().includes("cookie")
+ )
+ return index !== -1 ? { index, key: req.headers[index].key } : null
+ },
+ requires: { type: "advanced", name: "cookies" },
+ createInspection: (match) => ({
+ id: "cookie-header",
+ icon: markRaw(IconAlertTriangle),
+ text: { type: "text", text: this.t("inspections.header.cookie") },
+ severity: 2,
+ isApplicable: true,
+ locations: {
+ type: "header",
+ position: "key",
+ ...match,
+ },
+ doc: {
+ text: this.t("action.learn_more"),
+ link: "https://hoppscotch.com/download",
+ },
+ }),
+ },
+ {
+ matcher: (req) =>
+ req.body.contentType === "application/octet-stream" ? {} : null,
+ requires: { type: "content", name: "binary" },
+ createInspection: () => ({
+ id: "binary-body",
+ icon: markRaw(IconAlertTriangle),
+ text: { type: "text", text: this.t("inspections.body.binary") },
+ severity: 2,
+ isApplicable: true,
+ locations: { type: "body-content-type-header" },
+ doc: {
+ text: this.t("action.learn_more"),
+ link: "https://docs.hoppscotch.io/documentation/features/inspections",
+ },
+ }),
+ },
+ ]
+
+ override onServiceInit() {
+ this.inspection.registerInspector(this)
+ }
+
+ private validateCapability(
+ req: HoppRESTRequest | HoppRESTResponseOriginalRequest,
+ { matcher, requires, createInspection }: CapabilityCheck
+ ): InspectorResult[] {
+ const match = matcher(req)
+ if (!match) return []
+
+ const capabilities = this.kernelInterceptor.current.value?.capabilities
+ const supports = capabilities[requires.type].has(requires.name)
+
+ return !supports ? [createInspection(match)] : []
+ }
+
+ getInspections(
+ req: Readonly<Ref<HoppRESTRequest | HoppRESTResponseOriginalRequest>>
+ ) {
+ return computed(() =>
+ !req.value
+ ? []
+ : this.inspectionChecks.flatMap((check) =>
+ this.validateCapability(req.value, check)
+ )
+ )
+ }
+}
diff --git a/packages/hoppscotch-common/src/services/instance-switcher.service.ts b/packages/hoppscotch-common/src/services/instance-switcher.service.ts
new file mode 100644
index 000000000..d65be9d76
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/instance-switcher.service.ts
@@ -0,0 +1,448 @@
+import { Service } from "dioc"
+import { BehaviorSubject, Observable } from "rxjs"
+import { computed } from "vue"
+import { LazyStore } from "@tauri-apps/plugin-store"
+import { download, load, clear, remove } from "@hoppscotch/plugin-appload"
+import { useToast } from "~/composables/toast"
+
+const STORE_PATH = "hopp.store.json"
+const MAX_RECENT_INSTANCES = 10
+
+type ServerInstance = {
+ type: "server"
+ serverUrl: string
+ displayName: string
+ version: string
+ lastUsed: string
+ bundleName?: string
+}
+
+type VendoredInstance = {
+ type: "vendored"
+ displayName: string
+ version: string
+}
+
+export type InstanceType = ServerInstance | VendoredInstance
+
+export type ConnectionState =
+ | { status: "idle" }
+ | { status: "connecting"; target: string }
+ | { status: "connected"; instance: InstanceType }
+ | { status: "error"; target: string; message: string }
+
+export class InstanceSwitcherService extends Service<ConnectionState> {
+ public static readonly ID = "INSTANCE_SWITCHER_SERVICE"
+
+ private state$ = new BehaviorSubject<ConnectionState>({ status: "idle" })
+ private recentInstances$ = new BehaviorSubject<ServerInstance[]>([])
+ private store!: LazyStore
+ private toast = useToast()
+
+ override async onServiceInit(): Promise<void> {
+ this.store = new LazyStore(STORE_PATH)
+ await this.store.init()
+ await this.loadRecentInstances()
+
+ if (this.inVendoredEnvironment()) {
+ const instance: VendoredInstance = {
+ type: "vendored",
+ displayName: "Hoppscotch",
+ version: "25.2.0",
+ }
+
+ this.state$.next({
+ status: "connected",
+ instance,
+ })
+ this.emit(this.state$.value)
+ } else {
+ await this.loadSavedState()
+ }
+ }
+
+ private inVendoredEnvironment(): boolean {
+ try {
+ return (
+ window.location.hostname === "hoppscotch" &&
+ window.location.protocol === "app:"
+ )
+ } catch {
+ return false
+ }
+ }
+
+ public getStateStream(): Observable<ConnectionState> {
+ return this.state$
+ }
+
+ public getRecentInstancesStream(): Observable<ServerInstance[]> {
+ return this.recentInstances$
+ }
+
+ public getCurrentState() {
+ return computed(() => this.state$.value)
+ }
+
+ public getCurrentInstance() {
+ return computed(() => {
+ const state = this.state$.value
+ return state.status === "connected" ? state.instance : null
+ })
+ }
+
+ public getRecentInstances() {
+ return computed(() => this.recentInstances$.value)
+ }
+
+ public isConnecting() {
+ return computed(() => this.state$.value.status === "connecting")
+ }
+
+ public getConnectionError() {
+ return computed(() => {
+ const state = this.state$.value
+ return state.status === "error" ? state.message : null
+ })
+ }
+
+ public async connectToVendoredInstance(): Promise<boolean> {
+ if (this.isCurrentlyVendored()) {
+ return true
+ }
+
+ this.state$.next({
+ status: "connecting",
+ target: "Vendored",
+ })
+ this.emit(this.state$.value)
+
+ try {
+ const instance: VendoredInstance = {
+ type: "vendored",
+ displayName: "Hoppscotch",
+ version: "25.2.0",
+ }
+
+ this.state$.next({
+ status: "connected",
+ instance,
+ })
+ this.emit(this.state$.value)
+
+ await this.saveCurrentState()
+
+ this.toast.success("Connecting to Vendored")
+
+ const loadResponse = await load({
+ bundleName: "Hoppscotch",
+ window: { title: "Hoppscotch" },
+ })
+
+ if (!loadResponse.success) {
+ throw new Error("Failed to load vendored bundle")
+ }
+
+ this.toast.success("Connected to Vendored")
+ return true
+ } catch (error) {
+ const errorMessage =
+ error instanceof Error ? error.message : String(error)
+ this.state$.next({
+ status: "error",
+ target: "Vendored",
+ message: errorMessage,
+ })
+ this.emit(this.state$.value)
+
+ this.toast.error(`Failed to connect: ${errorMessage}`)
+ return false
+ }
+ }
+
+ public async connectToServerInstance(serverUrl: string): Promise<boolean> {
+ if (this.isCurrentlyConnectedTo(serverUrl)) {
+ const currentState = this.state$.value
+ if (
+ currentState.status === "connected" &&
+ currentState.instance.type === "server"
+ ) {
+ const updatedInstance: ServerInstance = {
+ ...currentState.instance,
+ lastUsed: new Date().toISOString(),
+ }
+
+ await this.updateRecentInstance(updatedInstance)
+ }
+ return true
+ }
+
+ const normalizedUrl = this.normalizeUrl(serverUrl)
+ const displayName = this.getDisplayNameFromUrl(normalizedUrl)
+
+ this.state$.next({
+ status: "connecting",
+ target: displayName,
+ })
+ this.emit(this.state$.value)
+
+ try {
+ const downloadResponse = await download({ serverUrl: normalizedUrl })
+ if (!downloadResponse.success) {
+ throw new Error("Failed to download bundle")
+ }
+
+ const instance: ServerInstance = {
+ type: "server",
+ serverUrl: normalizedUrl,
+ displayName,
+ version: downloadResponse.version,
+ lastUsed: new Date().toISOString(),
+ bundleName: downloadResponse.bundleName,
+ }
+
+ await this.updateRecentInstance(instance)
+
+ this.state$.next({
+ status: "connected",
+ instance,
+ })
+ this.emit(this.state$.value)
+
+ await this.saveCurrentState()
+
+ this.toast.success(`Connecting to ${displayName}`)
+
+ const loadResponse = await load({
+ bundleName: downloadResponse.bundleName,
+ window: { title: "Hoppscotch" },
+ })
+
+ if (!loadResponse.success) {
+ throw new Error("Failed to load bundle")
+ }
+
+ this.toast.success(`Connected to ${displayName}`)
+ return true
+ } catch (error) {
+ const errorMessage =
+ error instanceof Error ? error.message : String(error)
+ this.state$.next({
+ status: "error",
+ target: displayName,
+ message: errorMessage,
+ })
+ this.emit(this.state$.value)
+
+ this.toast.error(`Connection failed: ${errorMessage}`)
+ return false
+ }
+ }
+
+ public async removeInstance(serverUrl: string): Promise<boolean> {
+ try {
+ const normalizedUrl = this.normalizeUrl(serverUrl)
+
+ const instanceToRemove = this.recentInstances$.value.find(
+ (instance) => instance.serverUrl === normalizedUrl
+ )
+
+ if (!instanceToRemove) {
+ return false
+ }
+
+ if (instanceToRemove.bundleName) {
+ try {
+ await remove({
+ bundleName: instanceToRemove.bundleName,
+ serverUrl: normalizedUrl,
+ })
+ } catch (error) {
+ console.error("Failed to remove bundle from storage:", error)
+ // Continue with instance removal even if bundle removal fails
+ }
+ }
+
+ const instances = this.recentInstances$.value.filter(
+ (instance) => instance.serverUrl !== normalizedUrl
+ )
+
+ this.recentInstances$.next(instances)
+ await this.saveRecentInstances()
+
+ const displayName = this.getDisplayNameFromUrl(serverUrl)
+ this.toast.success(`Removed ${displayName}`)
+
+ // If we're currently connected to this instance, go back to idle state
+ if (this.isCurrentlyConnectedTo(serverUrl)) {
+ this.state$.next({ status: "idle" })
+ this.emit(this.state$.value)
+ await this.saveCurrentState()
+ }
+
+ return true
+ } catch (error) {
+ this.toast.error("Failed to remove instance")
+ return false
+ }
+ }
+
+ public async clearCache(): Promise<boolean> {
+ try {
+ await clear()
+ this.toast.success("Cache cleared successfully")
+ return true
+ } catch (error) {
+ this.toast.error("Failed to clear cache")
+ return false
+ }
+ }
+
+ public getCurrentInstanceDisplayName(): string {
+ const state = this.state$.value
+ if (state.status !== "connected") {
+ return "Hoppscotch"
+ }
+ return state.instance.displayName
+ }
+
+ public getDisplayNameFromUrl(url: string): string {
+ try {
+ const urlObj = new URL(url)
+ // We don't want entire hostname, only the specific org
+ const hostnameParts = urlObj.hostname.split(".")
+ const mainDomain = hostnameParts.slice(-2).join(".")
+
+ if (mainDomain === "hoppscotch") {
+ return "Hoppscotch"
+ }
+
+ return mainDomain || urlObj.hostname.replace(/^www\./, "")
+ } catch {
+ return url
+ }
+ }
+
+ public isCurrentlyVendored(): boolean {
+ const state = this.state$.value
+ return state.status === "connected" && state.instance.type === "vendored"
+ }
+
+ public isCurrentlyConnectedTo(serverUrl: string): boolean {
+ const state = this.state$.value
+ if (state.status !== "connected") return false
+
+ const instance = state.instance
+ if (instance.type !== "server") return false
+
+ return instance.serverUrl === this.normalizeUrl(serverUrl)
+ }
+
+ public normalizeUrl(url: string): string {
+ try {
+ const withProtocol = url.startsWith("http") ? url : `http://${url}`
+ const urlObj = new URL(withProtocol)
+
+ const pathSegments = urlObj.pathname.split("/").filter(Boolean)
+
+ if (!pathSegments.includes("desktop-app-server")) {
+ // We try `desktop-app-server` subpath first
+ const withSubpath = new URL(withProtocol)
+ withSubpath.pathname = `/desktop-app-server${urlObj.pathname}`
+
+ // If it fails, fall back to the original URL with default port
+ try {
+ const re = withSubpath.toString().replace(/\/$/, "")
+ return re
+ } catch {
+ if (!urlObj.port) {
+ urlObj.port = "3200"
+ }
+ const re = urlObj.toString().replace(/\/$/, "")
+ return re
+ }
+ }
+
+ const re = urlObj.toString().replace(/\/$/, "")
+ return re
+ } catch (error) {
+ return url
+ }
+ }
+
+ private async loadSavedState(): Promise<void> {
+ try {
+ const savedState =
+ await this.store.get<ConnectionState>("connectionState")
+
+ if (savedState && savedState.status === "connected") {
+ if (savedState.instance.type === "server") {
+ this.state$.next(savedState)
+ this.emit(this.state$.value)
+ }
+ }
+ } catch (error) {
+ console.error("Failed to load saved state:", error)
+ this.state$.next({ status: "idle" })
+ }
+ }
+
+ private async saveCurrentState(): Promise<void> {
+ try {
+ await this.store.set("connectionState", this.state$.value)
+ await this.store.save()
+ } catch (error) {
+ console.error("Failed to save current state:", error)
+ }
+ }
+
+ private async loadRecentInstances(): Promise<void> {
+ try {
+ const instances =
+ (await this.store.get<ServerInstance[]>("recentInstances")) || []
+
+ const sortedInstances = instances.sort(
+ (a, b) =>
+ new Date(b.lastUsed).getTime() - new Date(a.lastUsed).getTime()
+ )
+
+ this.recentInstances$.next(sortedInstances)
+ } catch (error) {
+ console.error("Failed to load recent instances:", error)
+ this.recentInstances$.next([])
+ }
+ }
+
+ private async saveRecentInstances(): Promise<void> {
+ try {
+ await this.store.set("recentInstances", this.recentInstances$.value)
+ await this.store.save()
+ } catch (error) {
+ console.error("Failed to save recent instances:", error)
+ }
+ }
+
+ private async updateRecentInstance(instance: ServerInstance): Promise<void> {
+ try {
+ const currentInstances = [...this.recentInstances$.value]
+ const instances = currentInstances.filter(
+ (item) => item.serverUrl !== instance.serverUrl
+ )
+
+ instances.unshift(instance)
+
+ if (instances.length > MAX_RECENT_INSTANCES) {
+ instances.length = MAX_RECENT_INSTANCES
+ }
+
+ this.recentInstances$.next(instances)
+ await this.saveRecentInstances()
+
+ console.log(
+ `Updated recent instances. Current count: ${instances.length}`
+ )
+ } catch (error) {
+ console.error("Failed to update recent instance:", error)
+ }
+ }
+}
diff --git a/packages/hoppscotch-common/src/services/kernel-interceptor.service.ts b/packages/hoppscotch-common/src/services/kernel-interceptor.service.ts
new file mode 100644
index 000000000..4da8a7bab
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/kernel-interceptor.service.ts
@@ -0,0 +1,173 @@
+import * as E from "fp-ts/Either"
+import { Service } from "dioc"
+import { Component, computed, reactive, watchEffect, markRaw } from "vue"
+import type { getI18n } from "~/modules/i18n"
+import {
+ RelayRequest,
+ RelayResponse,
+ RelayError,
+ RelayCapabilities,
+} from "@hoppscotch/kernel"
+
+export function isCancellationError(
+ error: KernelInterceptorError
+): error is "cancellation" {
+ return error === "cancellation"
+}
+
+export type SelectableStatus<Props = unknown> =
+ | { type: "selectable" }
+ | {
+ type: "unselectable"
+ reason:
+ | {
+ type: "text"
+ text: (t: ReturnType<typeof getI18n>) => string
+ action?: {
+ text: (t: ReturnType<typeof getI18n>) => string
+ onActionClick: () => void
+ }
+ }
+ | {
+ type: "custom"
+ component: Component<Props>
+ props: Props
+ }
+ }
+
+export type KernelInterceptorError =
+ | "cancellation"
+ | {
+ humanMessage: {
+ heading: (t: ReturnType<typeof getI18n>) => string
+ description: (t: ReturnType<typeof getI18n>) => string
+ }
+ error: RelayError
+ component?: Component<RelayError>
+ }
+
+export type ExecutionResult<
+ Err extends KernelInterceptorError = KernelInterceptorError,
+> = {
+ cancel: () => Promise<void>
+ response: Promise<E.Either<Err, RelayResponse>>
+}
+
+export type KernelInterceptor<
+ Err extends KernelInterceptorError = KernelInterceptorError,
+> = {
+ id: string
+ name: (t: ReturnType<typeof getI18n>) => string
+ settingsEntry?: {
+ title: (t: ReturnType<typeof getI18n>) => string
+ component: Component
+ }
+ subtitle?: Component
+ selectable: SelectableStatus
+ capabilities: RelayCapabilities
+ execute: (request: RelayRequest) => ExecutionResult<Err>
+}
+
+export class KernelInterceptorService extends Service {
+ public static readonly ID = "KERNEL_INTERCEPTOR_SERVICE"
+
+ private readonly state = reactive({
+ interceptors: new Map<string, KernelInterceptor>(),
+ currentId: null as string | null,
+ })
+
+ public readonly current = computed(() =>
+ this.state.currentId
+ ? this.state.interceptors.get(this.state.currentId)
+ : null
+ )
+
+ public readonly available = computed(() =>
+ Array.from(this.state.interceptors.values())
+ )
+
+ public getCurrentId(): string | null {
+ return this.state.currentId
+ }
+
+ override onServiceInit(): void {
+ this.setupInterceptorValidation()
+ }
+
+ private setupInterceptorValidation(): void {
+ watchEffect(() => {
+ if (!this.state.currentId) return
+
+ const currentInterceptor = this.state.interceptors.get(
+ this.state.currentId
+ )
+
+ if (!this.validateCurrentInterceptor(currentInterceptor)) {
+ this.resetToSelectableInterceptor()
+ }
+ })
+ }
+
+ private validateCurrentInterceptor(
+ interceptor: KernelInterceptor | undefined
+ ): boolean {
+ if (!interceptor) {
+ this.state.currentId = null
+ return false
+ }
+
+ return interceptor.selectable.type === "selectable"
+ }
+
+ private resetToSelectableInterceptor(): void {
+ const selectableInterceptor = this.available.value.find(
+ (int) => int.selectable.type === "selectable"
+ )
+ this.state.currentId = selectableInterceptor?.id ?? null
+ }
+
+ public register(interceptor: KernelInterceptor): void {
+ this.state.interceptors.set(interceptor.id, markRaw(interceptor))
+
+ if (!this.state.currentId) {
+ this.state.currentId = interceptor.id
+ }
+ }
+
+ public setActive(id: string | null): void {
+ if (!id) {
+ this.handleNullIdActivation()
+ return
+ }
+
+ if (!this.state.interceptors.has(id)) {
+ console.warn("Attempted to set unknown interceptor as active", id)
+ return
+ }
+
+ this.state.currentId = id
+ }
+
+ private handleNullIdActivation(): void {
+ this.state.currentId =
+ this.available.value.length === 0 ? null : this.state.currentId
+ }
+
+ public execute(req: RelayRequest): ExecutionResult {
+ const interceptor = this.validateAndGetActiveInterceptor()
+ return interceptor.execute(req)
+ }
+
+ private validateAndGetActiveInterceptor(): KernelInterceptor {
+ if (!this.state.currentId) {
+ throw new Error("No active interceptor")
+ }
+
+ const interceptor = this.state.interceptors.get(this.state.currentId)
+ if (!interceptor) {
+ throw new Error("Active interceptor not found")
+ }
+
+ return interceptor
+ }
+}
diff --git a/packages/hoppscotch-common/src/services/oauth/flows/authCode.ts b/packages/hoppscotch-common/src/services/oauth/flows/authCode.ts
index 0e426fd8f..9ba7b6989 100644
--- a/packages/hoppscotch-common/src/services/oauth/flows/authCode.ts
+++ b/packages/hoppscotch-common/src/services/oauth/flows/authCode.ts
@@ -9,11 +9,12 @@ import {
import { z } from "zod"
import { getService } from "~/modules/dioc"
import * as E from "fp-ts/Either"
-import { InterceptorService } from "~/services/interceptor.service"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
import { AuthCodeGrantTypeParams } from "@hoppscotch/data"
+import { content } from "@hoppscotch/kernel"
const persistenceService = getService(PersistenceService)
-const interceptorService = getService(InterceptorService)
+const interceptorService = getService(KernelInterceptorService)
const AuthCodeOauthFlowParamsSchema = AuthCodeGrantTypeParams.pick({
authEndpoint: true,
@@ -119,7 +120,7 @@ const initAuthCodeOauthFlow = async ({
}
const localOAuthTempConfig =
- persistenceService.getLocalConfig("oauth_temp_config")
+ await persistenceService.getLocalConfig("oauth_temp_config")
const persistedOAuthConfig: PersistedOAuthConfig = localOAuthTempConfig
? { ...JSON.parse(localOAuthTempConfig) }
@@ -129,7 +130,7 @@ const initAuthCodeOauthFlow = async ({
// persist the state so we can compare it when we get redirected back
// also persist the grant_type,tokenEndpoint and clientSecret so we can use them when we get redirected back
- persistenceService.setLocalConfig(
+ await persistenceService.setLocalConfig(
"oauth_temp_config",
JSON.stringify(<PersistedOAuthConfig>{
...persistedOAuthConfig,
@@ -205,25 +206,25 @@ const handleRedirectForAuthCodeOauthFlow = async (localConfig: string) => {
}
// exchange the code for a token
- const formData = new URLSearchParams()
- formData.append("grant_type", "authorization_code")
- formData.append("code", code)
- formData.append("client_id", decodedLocalConfig.data.clientID)
- formData.append("client_secret", decodedLocalConfig.data.clientSecret)
- formData.append("redirect_uri", OauthAuthService.redirectURI)
-
- if (decodedLocalConfig.data.codeVerifier) {
- formData.append("code_verifier", decodedLocalConfig.data.codeVerifier)
- }
-
- const { response } = interceptorService.runRequest({
+ const { response } = interceptorService.execute({
+ id: Date.now(),
url: decodedLocalConfig.data.tokenEndpoint,
method: "POST",
+ version: "HTTP/1.1",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Accept: "application/json",
},
- data: formData.toString(),
+ content: content.urlencoded({
+ code,
+ grant_type: "authorization_code",
+ client_id: decodedLocalConfig.data.clientID,
+ client_secret: decodedLocalConfig.data.clientSecret,
+ redirect_uri: OauthAuthService.redirectURI,
+ ...(decodedLocalConfig.data.codeVerifier && {
+ code_verifier: decodedLocalConfig.data.codeVerifier,
+ }),
+ }),
})
const res = await response
@@ -298,22 +299,22 @@ const refreshToken = async ({
refreshToken,
clientSecret,
}: AuthCodeOauthRefreshParams) => {
- const formData = new URLSearchParams()
- formData.append("grant_type", "refresh_token")
- formData.append("refresh_token", refreshToken)
- formData.append("client_id", clientID)
- if (clientSecret) {
- formData.append("client_secret", clientSecret)
- }
-
- const { response } = interceptorService.runRequest({
+ const { response } = interceptorService.execute({
+ id: Date.now(),
url: tokenEndpoint,
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Accept: "application/json",
},
- data: formData.toString(),
+ content: content.urlencoded({
+ grant_type: "refresh_token",
+ refresh_token: refreshToken,
+ client_id: clientID,
+ ...(clientSecret && {
+ client_secret: clientSecret,
+ }),
+ }),
})
const res = await response
diff --git a/packages/hoppscotch-common/src/services/oauth/flows/clientCredentials.ts b/packages/hoppscotch-common/src/services/oauth/flows/clientCredentials.ts
index 1301a2de6..3329cfde6 100644
--- a/packages/hoppscotch-common/src/services/oauth/flows/clientCredentials.ts
+++ b/packages/hoppscotch-common/src/services/oauth/flows/clientCredentials.ts
@@ -6,12 +6,14 @@ import {
import { z } from "zod"
import { getService } from "~/modules/dioc"
import * as E from "fp-ts/Either"
-import { InterceptorService } from "~/services/interceptor.service"
+import * as O from "fp-ts/Option"
import { useToast } from "~/composables/toast"
import { ClientCredentialsGrantTypeParams } from "@hoppscotch/data"
-import { AxiosRequestConfig } from "axios"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
+import { RelayRequest, content } from "@hoppscotch/kernel"
+import { parseBytesToJSON } from "~/helpers/functional/json"
-const interceptorService = getService(InterceptorService)
+const interceptorService = getService(KernelInterceptorService)
const ClientCredentialsFlowParamsSchema = ClientCredentialsGrantTypeParams.pick(
{
@@ -57,7 +59,7 @@ const initClientCredentialsOAuthFlow = async (
? getPayloadForViaBasicAuthHeader(payload)
: getPayloadForViaBody(payload)
- const { response } = interceptorService.runRequest(requestPayload)
+ const { response } = interceptorService.execute(requestPayload)
const res = await response
@@ -65,18 +67,16 @@ const initClientCredentialsOAuthFlow = async (
return E.left("AUTH_TOKEN_REQUEST_FAILED" as const)
}
- const responsePayload = decodeResponseAsJSON(res.right)
+ const jsonResponse = decodeResponseAsJSON(res.right)
- if (E.isLeft(responsePayload)) {
- return E.left("AUTH_TOKEN_REQUEST_FAILED" as const)
- }
+ if (E.isLeft(jsonResponse)) return E.left("AUTH_TOKEN_REQUEST_FAILED")
const withAccessTokenSchema = z.object({
access_token: z.string(),
})
const parsedTokenResponse = withAccessTokenSchema.safeParse(
- responsePayload.right
+ jsonResponse.right
)
if (!parsedTokenResponse.success) {
@@ -122,21 +122,20 @@ const handleRedirectForAuthCodeOauthFlow = async (localConfig: string) => {
return E.left("INVALID_STATE")
}
- // exchange the code for a token
- const formData = new URLSearchParams()
- formData.append("code", code)
- formData.append("client_id", decodedLocalConfig.data.clientID)
- formData.append("client_secret", decodedLocalConfig.data.clientSecret)
- formData.append("redirect_uri", OauthAuthService.redirectURI)
-
- const { response } = interceptorService.runRequest({
+ const { response } = interceptorService.execute({
+ id: Date.now(),
url: decodedLocalConfig.data.tokenEndpoint,
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Accept: "application/json",
},
- data: formData.toString(),
+ content: content.urlencoded({
+ code,
+ client_id: decodedLocalConfig.data.clientID,
+ client_secret: decodedLocalConfig.data.clientSecret,
+ redirect_uri: OauthAuthService.redirectURI,
+ }),
})
const res = await response
@@ -145,21 +144,24 @@ const handleRedirectForAuthCodeOauthFlow = async (localConfig: string) => {
return E.left("AUTH_TOKEN_REQUEST_FAILED" as const)
}
- const responsePayload = new TextDecoder("utf-8")
- .decode(res.right.data as any)
- .replaceAll("\x00", "")
-
const withAccessTokenSchema = z.object({
access_token: z.string(),
})
- const parsedTokenResponse = withAccessTokenSchema.safeParse(
- JSON.parse(responsePayload)
+ const responsePayload = parseBytesToJSON<{ access_token: string }>(
+ res.right.body.body
)
- return parsedTokenResponse.success
- ? E.right(parsedTokenResponse.data)
- : E.left("AUTH_TOKEN_REQUEST_INVALID_RESPONSE" as const)
+ if (O.isSome(responsePayload)) {
+ const parsedTokenResponse = withAccessTokenSchema.safeParse(
+ responsePayload.value
+ )
+ return parsedTokenResponse.success
+ ? E.right(parsedTokenResponse.data)
+ : E.left("AUTH_TOKEN_REQUEST_INVALID_RESPONSE" as const)
+ }
+
+ return E.left("AUTH_TOKEN_REQUEST_INVALID_RESPONSE" as const)
}
export default createFlowConfig(
@@ -171,55 +173,47 @@ export default createFlowConfig(
const getPayloadForViaBasicAuthHeader = (
payload: Omit<ClientCredentialsFlowParams, "clientAuthentication">
-): AxiosRequestConfig => {
+): RelayRequest => {
const { clientID, clientSecret, scopes, authEndpoint } = payload
const basicAuthToken = btoa(`${clientID}:${clientSecret}`)
- const formData = new URLSearchParams()
-
- formData.append("grant_type", "client_credentials")
-
- if (scopes) {
- formData.append("scope", scopes)
- }
-
return {
- method: "POST",
+ id: Date.now(),
url: authEndpoint,
+ method: "POST",
+ version: "HTTP/1.1",
headers: {
Authorization: `Basic ${basicAuthToken}`,
"Content-Type": "application/x-www-form-urlencoded",
Accept: "application/json",
},
- data: formData.toString(),
+ content: content.urlencoded({
+ grant_type: "client_credentials",
+ ...(scopes && { scope: scopes }),
+ }),
}
}
const getPayloadForViaBody = (
payload: Omit<ClientCredentialsFlowParams, "clientAuthentication">
-) => {
+): RelayRequest => {
const { clientID, clientSecret, scopes, authEndpoint } = payload
- const formData = new URLSearchParams()
- formData.append("grant_type", "client_credentials")
- formData.append("client_id", clientID)
-
- if (clientSecret) {
- formData.append("client_secret", clientSecret)
- }
-
- if (scopes) {
- formData.append("scope", scopes)
- }
-
return {
- method: "POST",
+ id: Date.now(),
url: authEndpoint,
+ method: "POST",
+ version: "HTTP/1.1",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Accept: "application/json",
},
- data: formData.toString(),
+ content: content.urlencoded({
+ grant_type: "client_credentials",
+ client_id: clientID,
+ ...(clientSecret && { client_secret: clientSecret }),
+ ...(scopes && { scope: scopes }),
+ }),
}
}
diff --git a/packages/hoppscotch-common/src/services/oauth/flows/implicit.ts b/packages/hoppscotch-common/src/services/oauth/flows/implicit.ts
index 08293c604..4ea0d7d78 100644
--- a/packages/hoppscotch-common/src/services/oauth/flows/implicit.ts
+++ b/packages/hoppscotch-common/src/services/oauth/flows/implicit.ts
@@ -43,14 +43,14 @@ const initImplicitOauthFlow = async ({
const state = generateRandomString()
const localOAuthTempConfig =
- persistenceService.getLocalConfig("oauth_temp_config")
+ await persistenceService.getLocalConfig("oauth_temp_config")
const persistedOAuthConfig: PersistedOAuthConfig = localOAuthTempConfig
? { ...JSON.parse(localOAuthTempConfig) }
: {}
// Persist the necessary information for retrieval while getting redirected back
- persistenceService.setLocalConfig(
+ await persistenceService.setLocalConfig(
"oauth_temp_config",
JSON.stringify(<PersistedOAuthConfig>{
...persistedOAuthConfig,
diff --git a/packages/hoppscotch-common/src/services/oauth/flows/password.ts b/packages/hoppscotch-common/src/services/oauth/flows/password.ts
index 22875bc71..20060ed52 100644
--- a/packages/hoppscotch-common/src/services/oauth/flows/password.ts
+++ b/packages/hoppscotch-common/src/services/oauth/flows/password.ts
@@ -1,3 +1,5 @@
+import * as E from "fp-ts/Either"
+import * as O from "fp-ts/Option"
import {
OauthAuthService,
createFlowConfig,
@@ -5,12 +7,13 @@ import {
} from "../oauth.service"
import { z } from "zod"
import { getService } from "~/modules/dioc"
-import * as E from "fp-ts/Either"
-import { InterceptorService } from "~/services/interceptor.service"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
import { useToast } from "~/composables/toast"
import { PasswordGrantTypeParams } from "@hoppscotch/data"
+import { content } from "@hoppscotch/kernel"
+import { parseBytesToJSON } from "~/helpers/functional/json"
-const interceptorService = getService(InterceptorService)
+const interceptorService = getService(KernelInterceptorService)
const PasswordFlowParamsSchema = PasswordGrantTypeParams.pick({
authEndpoint: true,
@@ -55,28 +58,27 @@ const initPasswordOauthFlow = async ({
}: PasswordFlowParams) => {
const toast = useToast()
- const formData = new URLSearchParams()
- formData.append("grant_type", "password")
- formData.append("client_id", clientID)
- formData.append("username", username)
- formData.append("password", password)
-
- if (clientSecret) {
- formData.append("client_secret", clientSecret)
- }
-
- if (scopes) {
- formData.append("scope", scopes)
- }
-
- const { response } = interceptorService.runRequest({
+ const { response } = interceptorService.execute({
+ id: Date.now(),
url: authEndpoint,
method: "POST",
+ version: "HTTP/1.1",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Accept: "application/json",
},
- data: formData.toString(),
+ content: content.urlencoded({
+ grant_type: "password",
+ client_id: clientID,
+ username,
+ password,
+ ...(clientSecret && {
+ client_secret: clientSecret,
+ }),
+ ...(scopes && {
+ scopes: scopes,
+ }),
+ }),
})
const res = await response
@@ -86,25 +88,24 @@ const initPasswordOauthFlow = async ({
return E.left("AUTH_TOKEN_REQUEST_FAILED" as const)
}
- const responsePayload = new TextDecoder("utf-8")
- .decode(res.right.data as any)
- .replaceAll("\x00", "")
-
const withAccessTokenSchema = z.object({
access_token: z.string(),
})
- const parsedTokenResponse = withAccessTokenSchema.safeParse(
- JSON.parse(responsePayload)
+ const responsePayload = parseBytesToJSON<{ access_token: string }>(
+ res.right.body.body
)
- if (!parsedTokenResponse.success) {
- toast.error("AUTH_TOKEN_REQUEST_INVALID_RESPONSE")
+ if (O.isSome(responsePayload)) {
+ const parsedTokenResponse = withAccessTokenSchema.safeParse(
+ responsePayload.value
+ )
+ return parsedTokenResponse.success
+ ? E.right(parsedTokenResponse.data)
+ : E.left("AUTH_TOKEN_REQUEST_INVALID_RESPONSE" as const)
}
- return parsedTokenResponse.success
- ? E.right(parsedTokenResponse.data)
- : E.left("AUTH_TOKEN_REQUEST_INVALID_RESPONSE" as const)
+ return E.left("AUTH_TOKEN_REQUEST_INVALID_RESPONSE" as const)
}
const handleRedirectForAuthCodeOauthFlow = async (localConfig: string) => {
@@ -142,20 +143,22 @@ const handleRedirectForAuthCodeOauthFlow = async (localConfig: string) => {
}
// exchange the code for a token
- const formData = new URLSearchParams()
- formData.append("code", code)
- formData.append("client_id", decodedLocalConfig.data.clientID)
- formData.append("client_secret", decodedLocalConfig.data.clientSecret)
- formData.append("redirect_uri", OauthAuthService.redirectURI)
+ const config = {
+ code,
+ client_id: decodedLocalConfig.data.clientID,
+ client_secret: decodedLocalConfig.data.clientSecret,
+ redirect_uri: OauthAuthService.redirectURI,
+ }
- const { response } = interceptorService.runRequest({
+ const { response } = interceptorService.execute({
+ id: Date.now(),
url: decodedLocalConfig.data.tokenEndpoint,
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Accept: "application/json",
},
- data: formData.toString(),
+ content: content.urlencoded(config),
})
const res = await response
diff --git a/packages/hoppscotch-common/src/services/oauth/oauth.service.ts b/packages/hoppscotch-common/src/services/oauth/oauth.service.ts
index e5bd13132..23808534a 100644
--- a/packages/hoppscotch-common/src/services/oauth/oauth.service.ts
+++ b/packages/hoppscotch-common/src/services/oauth/oauth.service.ts
@@ -1,12 +1,18 @@
+import { pipe } from "fp-ts/function"
+import * as O from "fp-ts/Option"
+import * as E from "fp-ts/Either"
import { Service } from "dioc"
import { PersistenceService } from "../persistence"
import { ZodType, z } from "zod"
-import * as E from "fp-ts/Either"
import authCode, { AuthCodeOauthFlowParams } from "./flows/authCode"
import implicit, { ImplicitOauthFlowParams } from "./flows/implicit"
import { getService } from "~/modules/dioc"
import { HoppCollection } from "@hoppscotch/data"
import { TeamCollection } from "~/helpers/backend/graphql"
+import { parseBytesToJSON } from "~/helpers/functional/json"
+import { MediaType } from "@hoppscotch/kernel"
+
+const persistenceService = getService(PersistenceService)
export type PersistedOAuthConfig = {
source: "REST" | "GraphQL"
@@ -25,14 +31,12 @@ export type PersistedOAuthConfig = {
refresh_token?: string
}
-const persistenceService = getService(PersistenceService)
-
export const grantTypesInvolvingRedirect = ["AUTHORIZATION_CODE", "IMPLICIT"]
export const routeOAuthRedirect = async () => {
// get the temp data from the local storage
const localOAuthTempConfig =
- persistenceService.getLocalConfig("oauth_temp_config")
+ await persistenceService.getLocalConfig("oauth_temp_config")
if (!localOAuthTempConfig) {
return E.left("INVALID_STATE")
@@ -102,17 +106,17 @@ export function createFlowConfig<
}
}
-export const decodeResponseAsJSON = (response: { data: any }) => {
- try {
- const responsePayload = new TextDecoder("utf-8")
- .decode(response.data as any)
- .replaceAll("\x00", "")
-
- return E.right(JSON.parse(responsePayload) as Record<string, unknown>)
- } catch (error) {
- return E.left("AUTH_TOKEN_REQUEST_FAILED" as const)
- }
-}
+export const decodeResponseAsJSON = (response: {
+ body: { body: Uint8Array; mediaType: MediaType }
+}): E.Either<"AUTH_TOKEN_REQUEST_FAILED", Record<string, unknown>> =>
+ pipe(
+ response.body.body,
+ parseBytesToJSON<Record<string, unknown>>,
+ O.fold(
+ () => E.left("AUTH_TOKEN_REQUEST_FAILED" as const),
+ (data) => E.right(data)
+ )
+ )
export class OauthAuthService extends Service {
public static readonly ID = "OAUTH_AUTH_SERVICE"
diff --git a/packages/hoppscotch-common/src/services/persistence/__tests__/__mocks__/index.ts b/packages/hoppscotch-common/src/services/persistence/__tests__/__mocks__/index.ts
index 5d13fd84f..612f477b2 100644
--- a/packages/hoppscotch-common/src/services/persistence/__tests__/__mocks__/index.ts
+++ b/packages/hoppscotch-common/src/services/persistence/__tests__/__mocks__/index.ts
@@ -237,10 +237,12 @@ export const REST_TAB_STATE_MOCK: PersistableTabState<HoppRequestDocument> = {
],
}
-export const SECRET_ENVIRONMENTS_MOCK: Record<string, SecretVariable> = {
- clryz7ir7002al4162bsj0azg: {
- key: "test-key",
- value: "test-value",
- varIndex: 1,
- },
+export const SECRET_ENVIRONMENTS_MOCK: Record<string, SecretVariable[]> = {
+ clryz7ir7002al4162bsj0azg: [
+ {
+ key: "test-key",
+ value: "test-value",
+ varIndex: 1,
+ },
+ ],
}
diff --git a/packages/hoppscotch-common/src/services/persistence/__tests__/index.spec.ts b/packages/hoppscotch-common/src/services/persistence/__tests__/index.spec.ts
index 94261775e..4a9927163 100644
--- a/packages/hoppscotch-common/src/services/persistence/__tests__/index.spec.ts
+++ b/packages/hoppscotch-common/src/services/persistence/__tests__/index.spec.ts
@@ -7,7 +7,8 @@ import {
import { watchDebounced } from "@vueuse/core"
import { TestContainer } from "dioc/testing"
import { cloneDeep } from "lodash-es"
-import { afterAll, describe, expect, it, vi } from "vitest"
+import superjson from "superjson"
+import { afterAll, beforeEach, describe, expect, it, vi } from "vitest"
import { MQTTRequest$, setMQTTRequest } from "~/newstore/MQTTSession"
import { SSERequest$, setSSERequest } from "~/newstore/SSESession"
@@ -45,7 +46,11 @@ import {
} from "~/newstore/settings"
import { GQLTabService } from "~/services/tab/graphql"
import { RESTTabService } from "~/services/tab/rest"
-import { PersistenceService } from "../../persistence"
+import {
+ PersistenceService,
+ STORE_KEYS,
+ STORE_NAMESPACE,
+} from "../../persistence"
import {
ENVIRONMENTS_MOCK,
GLOBAL_ENV_MOCK,
@@ -64,6 +69,10 @@ import {
WEBSOCKET_REQUEST_MOCK,
} from "./__mocks__"
import { SecretEnvironmentService } from "~/services/secret-environment.service"
+import { getKernelMode, initKernel } from "@hoppscotch/kernel"
+import { Store } from "~/kernel"
+
+initKernel(getKernelMode())
vi.mock("~/modules/i18n", () => {
return {
@@ -121,6 +130,34 @@ const spyOnGetItem = () => vi.spyOn(Storage.prototype, "getItem")
const spyOnRemoveItem = () => vi.spyOn(Storage.prototype, "removeItem")
const spyOnSetItem = () => vi.spyOn(Storage.prototype, "setItem")
+const schemaVersionKey = `${STORE_NAMESPACE}:${STORE_KEYS.SCHEMA_VERSION}`
+
+const getStoreItem = async (key: string) => {
+ const storedData = window.localStorage.getItem(key)
+
+ if (!storedData) return
+
+ const parsedData = superjson.parse<{ data: string }>(storedData)
+
+ return JSON.stringify(parsedData.data)
+}
+
+const setStoreItem = async <T>(key: string, value: T) => {
+ const storedData = {
+ schemaVersion: 1,
+ metadata: {
+ createdAt: new Date().toISOString(),
+ updatedAt: new Date().toISOString(),
+ namespace: STORE_NAMESPACE,
+ encrypted: false,
+ compressed: false,
+ },
+ data: value,
+ }
+
+ window.localStorage.setItem(key, superjson.stringify(storedData))
+}
+
const bindPersistenceService = ({
mockGQLTabService = false,
mockRESTTabService = false,
@@ -152,14 +189,23 @@ const bindPersistenceService = ({
return service
}
-const invokeSetupLocalPersistence = (
+const invokeSetupLocalPersistence = async (
serviceBindMock?: Record<string, unknown>
) => {
const service = bindPersistenceService(serviceBindMock)
- service.setupLocalPersistence()
+ await service.setupFirst()
+ await service.setupLater()
}
describe("PersistenceService", () => {
+ beforeEach(() => {
+ window.localStorage.clear()
+ })
+
+ beforeEach(async () => {
+ await Store.remove(STORE_NAMESPACE, STORE_KEYS.SCHEMA_VERSION)
+ })
+
afterAll(() => {
// Clear all mocks
vi.clearAllMocks()
@@ -168,7 +214,7 @@ describe("PersistenceService", () => {
vi.restoreAllMocks()
})
- describe("setupLocalPersistence", () => {
+ describe("setup", () => {
describe("Check and migrate old settings", () => {
// Set of keys read from localStorage across test cases
const bgColorKey = "BG_COLOR"
@@ -176,57 +222,73 @@ describe("PersistenceService", () => {
const selectedEnvIndexKey = "selectedEnvIndex"
const themeColorKey = "THEME_COLOR"
const vuexKey = "vuex"
+ const storagePrefix = "persistence.v1:"
- it(`sets the selected environment index type as "NO_ENV" in localStorage if the value retrieved for ${selectedEnvIndexKey} is "-1"`, () => {
+ beforeEach(() => {
+ window.localStorage.clear()
+ })
+
+ beforeEach(async () => {
+ await Store.remove(STORE_NAMESPACE, STORE_KEYS.SCHEMA_VERSION)
+ })
+
+ it(`sets the selected environment index type as "NO_ENV" in localStorage if the value retrieved for ${selectedEnvIndexKey} is "-1"`, async () => {
window.localStorage.setItem(selectedEnvIndexKey, "-1")
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(selectedEnvIndexKey)
expect(setItemSpy).toHaveBeenCalledWith(
- selectedEnvIndexKey,
- JSON.stringify({
- type: "NO_ENV_SELECTED",
- })
+ `${storagePrefix}selectedEnv`,
+ expect.stringContaining(
+ JSON.stringify({
+ type: "NO_ENV_SELECTED",
+ })
+ )
)
})
- it(`sets the selected environment index type as "MY_ENV" in localStorage if the value retrieved for "${selectedEnvIndexKey}" is greater than "0"`, () => {
+ it(`sets the selected environment index type as "MY_ENV" in localStorage if the value retrieved for "${selectedEnvIndexKey}" is greater than "0"`, async () => {
window.localStorage.setItem(selectedEnvIndexKey, "1")
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(selectedEnvIndexKey)
expect(setItemSpy).toHaveBeenCalledWith(
- selectedEnvIndexKey,
- JSON.stringify({
- type: "MY_ENV",
- index: 1,
- })
+ `${storagePrefix}selectedEnv`,
+ expect.stringContaining(
+ JSON.stringify({
+ type: "MY_ENV",
+ index: 1,
+ })
+ )
)
})
- it(`skips schema parsing and setting other properties if ${vuexKey} read from localStorage is an empty entity`, () => {
+ it(`skips schema parsing and setting other properties if ${vuexKey} read from localStorage is an empty entity`, async () => {
window.localStorage.setItem(vuexKey, JSON.stringify({}))
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(vuexKey)
-
expect(toastErrorFn).not.toHaveBeenCalled()
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ `${storagePrefix}schema_version`,
+ expect.stringMatching(/"schemaVersion":1/)
+ )
})
- it(`shows an error and sets the entry as a backup in localStorage if "${vuexKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${vuexKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `vuex`
// `postwoman.settings.CURRENT_INTERCEPTOR_ID` -> `string`
const vuexData = {
@@ -245,7 +307,7 @@ describe("PersistenceService", () => {
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(vuexKey)
expect(toastErrorFn).toHaveBeenCalledWith(
@@ -253,11 +315,11 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${vuexKey}-backup`,
- JSON.stringify(vuexData)
+ expect.stringContaining(JSON.stringify(vuexData))
)
})
- it(`shows an error and sets the entry as a backup in localStorage if "${themeColorKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${themeColorKey}" read from localStorage doesn't match the schema`, async () => {
const vuexData = cloneDeep(VUEX_DATA_MOCK)
window.localStorage.setItem(vuexKey, JSON.stringify(vuexData))
@@ -268,10 +330,9 @@ describe("PersistenceService", () => {
const removeItemSpy = spyOnRemoveItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(vuexKey)
-
expect(toastErrorFn).toHaveBeenCalledWith(
expect.stringContaining(themeColorKey)
)
@@ -279,15 +340,14 @@ describe("PersistenceService", () => {
`${themeColorKey}-backup`,
themeColorValue
)
-
- expect(applySetting).toHaveBeenCalledWith(
+ expect(applySetting).not.toHaveBeenCalledWith(
themeColorKey,
themeColorValue
)
expect(removeItemSpy).toHaveBeenCalledWith(themeColorKey)
})
- it(`shows an error and sets the entry as a backup in localStorage if "${nuxtColorModeKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${nuxtColorModeKey}" read from localStorage doesn't match the schema`, async () => {
const vuexData = cloneDeep(VUEX_DATA_MOCK)
window.localStorage.setItem(vuexKey, JSON.stringify(vuexData))
@@ -298,10 +358,9 @@ describe("PersistenceService", () => {
const removeItemSpy = spyOnRemoveItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(vuexKey)
-
expect(toastErrorFn).toHaveBeenCalledWith(
expect.stringContaining(nuxtColorModeKey)
)
@@ -309,15 +368,14 @@ describe("PersistenceService", () => {
`${nuxtColorModeKey}-backup`,
nuxtColorModeValue
)
-
- expect(applySetting).toHaveBeenCalledWith(
+ expect(applySetting).not.toHaveBeenCalledWith(
bgColorKey,
nuxtColorModeValue
)
expect(removeItemSpy).toHaveBeenCalledWith(nuxtColorModeKey)
})
- it(`extracts individual properties from the key "${vuexKey}" and sets them in localStorage`, () => {
+ it(`extracts individual properties from the key "${vuexKey}" and sets them in localStorage`, async () => {
const vuexData = cloneDeep(VUEX_DATA_MOCK)
window.localStorage.setItem(vuexKey, JSON.stringify(vuexData))
@@ -331,73 +389,54 @@ describe("PersistenceService", () => {
const removeItemSpy = spyOnRemoveItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(vuexKey)
-
expect(toastErrorFn).not.toHaveBeenCalledWith(nuxtColorModeKey)
expect(setItemSpy).not.toHaveBeenCalledWith(
`${nuxtColorModeKey}-backup`
)
+ // Check settings is saved with new format
expect(setItemSpy).toHaveBeenCalledWith(
- "settings",
- JSON.stringify(vuexData.postwoman.settings)
+ `${storagePrefix}settings`,
+ expect.stringContaining(JSON.stringify(vuexData.postwoman.settings))
)
const { postwoman } = vuexData
delete postwoman.settings
+ // Check collections is saved with new format
expect(setItemSpy).toHaveBeenCalledWith(
- vuexKey,
- JSON.stringify(vuexData)
- )
-
- // Excluding `settings`
- expect(setItemSpy).toHaveBeenCalledWith(
- "collections",
- JSON.stringify(postwoman.collections)
+ `${storagePrefix}restCollections`,
+ expect.stringContaining(JSON.stringify(postwoman.collections))
)
delete postwoman.collections
- // Excluding `settings` & `collections`
- expect(setItemSpy).toHaveBeenCalledWith(
- vuexKey,
- JSON.stringify(vuexData)
- )
-
+ // Check graphql collections is saved with new format
expect(setItemSpy).toHaveBeenCalledWith(
- "collectionsGraphql",
- JSON.stringify(postwoman.collectionsGraphql)
+ `${storagePrefix}gqlCollections`,
+ expect.stringContaining(JSON.stringify(postwoman.collectionsGraphql))
)
delete postwoman.collectionsGraphql
- // Excluding `settings, `collections` & `collectionsGraphql`
+ // Check environments is saved with new format
expect(setItemSpy).toHaveBeenCalledWith(
- vuexKey,
- JSON.stringify(vuexData)
- )
-
- expect(setItemSpy).toHaveBeenCalledWith(
- "environments",
- JSON.stringify(postwoman.environments)
+ `${storagePrefix}environments`,
+ expect.stringContaining(JSON.stringify(postwoman.environments))
)
delete postwoman.environments
- // Excluding `settings, `collections`, `collectionsGraphql` & `environments`
- expect(setItemSpy).toHaveBeenCalledWith(
- vuexKey,
- JSON.stringify(vuexData)
- )
-
+ // Check theme color handling
expect(getItemSpy).toHaveBeenCalledWith(themeColorKey)
expect(applySetting).toHaveBeenCalledWith(themeColorKey, themeColor)
expect(removeItemSpy).toHaveBeenCalledWith(themeColorKey)
expect(window.localStorage.getItem(themeColorKey)).toBe(null)
+ // Check color mode handling
expect(getItemSpy).toHaveBeenCalledWith(nuxtColorModeKey)
expect(applySetting).toHaveBeenCalledWith(bgColorKey, nuxtColorMode)
expect(removeItemSpy).toHaveBeenCalledWith(nuxtColorModeKey)
@@ -407,21 +446,18 @@ describe("PersistenceService", () => {
describe("Setup local state persistence", () => {
// Key read from localStorage across test cases
- const localStateKey = "localState"
+ const localStateKey = `${STORE_NAMESPACE}:${STORE_KEYS.LOCAL_STATE}`
- it(`shows an error and sets the entry as a backup in localStorage if "${localStateKey}" read from localStorage has a value which is not a "string" or "undefined"`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${localStateKey}" read from localStorage has a value which is not a "string" or "undefined"`, async () => {
const localStateData = {
REMEMBERED_TEAM_ID: null,
}
- window.localStorage.setItem(
- localStateKey,
- JSON.stringify(localStateData)
- )
+ await setStoreItem(localStateKey, localStateData)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(localStateKey)
@@ -430,23 +466,20 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${localStateKey}-backup`,
- JSON.stringify(localStateData)
+ expect.stringContaining(JSON.stringify(localStateData))
)
})
- it(`shows an error and sets the entry as a backup in localStorage if "${localStateKey}" read from localStorage has an invalid key`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${localStateKey}" read from localStorage has an invalid key`, async () => {
const localStateData = {
INVALID_KEY: null,
}
- window.localStorage.setItem(
- localStateKey,
- JSON.stringify(localStateData)
- )
+ await setStoreItem(localStateKey, localStateData)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(localStateKey)
@@ -455,25 +488,29 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${localStateKey}-backup`,
- JSON.stringify(localStateData)
+ expect.stringContaining(JSON.stringify(localStateData))
)
})
- it(`schema parsing succeeds if there is no "${localStateKey}" key present in localStorage where the fallback of "{}" is chosen`, () => {
+ it(`schema parsing succeeds if there is no "${localStateKey}" key present in localStorage where the fallback of "{}" is chosen`, async () => {
window.localStorage.removeItem(localStateKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(localStateKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(localStateKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringMatching(/"schemaVersion":1/)
+ )
})
- it(`reads the value for "${localStateKey}" key from localStorage, invokes "bulkApplyLocalState" function if a value is yielded and subscribes to "localStateStore" updates`, () => {
+ it(`reads the value for "${localStateKey}" key from localStorage, invokes "bulkApplyLocalState" function if a value is yielded and subscribes to "localStateStore" updates`, async () => {
vi.mock("~/newstore/localstate", () => {
return {
bulkApplyLocalState: vi.fn(),
@@ -488,20 +525,21 @@ describe("PersistenceService", () => {
const localStateData = {
REMEMBERED_TEAM_ID: "test-id",
}
- window.localStorage.setItem(
- localStateKey,
- JSON.stringify(localStateData)
- )
+ await setStoreItem(localStateKey, localStateData)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(localStateKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(localStateKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringMatching(/"schemaVersion":1/)
+ )
expect(bulkApplyLocalState).toHaveBeenCalledWith(localStateData)
expect(localStateStore.subject$.subscribe).toHaveBeenCalledWith(
@@ -510,23 +548,23 @@ describe("PersistenceService", () => {
})
})
- describe("Setup settings persistence", () => {
+ describe("setup settings persistence", () => {
// Key read from localStorage across test cases
- const settingsKey = "settings"
+ const settingsKey = `${STORE_NAMESPACE}:${STORE_KEYS.SETTINGS}`
- it(`shows an error and sets the entry as a backup in localStorage if "${settingsKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${settingsKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `settings`
- // Expected value are booleans
+ // Expected values are booleans
const settings = {
EXTENSIONS_ENABLED: "true",
PROXY_ENABLED: "true",
}
- window.localStorage.setItem(settingsKey, JSON.stringify(settings))
+ await setStoreItem(settingsKey, settings)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(settingsKey)
@@ -535,25 +573,29 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${settingsKey}-backup`,
- JSON.stringify(settings)
+ expect.stringContaining(JSON.stringify(settings))
)
})
- it(`schema parsing succeeds if there is no "${settingsKey}" key present in localStorage where the fallback of "{}" is chosen`, () => {
+ it(`schema parsing succeeds if there is no "${settingsKey}" key present in localStorage where the fallback of "{}" is chosen`, async () => {
window.localStorage.removeItem(settingsKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(settingsKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(settingsKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringMatching(/"schemaVersion":1/)
+ )
})
- it(`reads the value for "${settingsKey}" from localStorage, invokes "performSettingsDataMigrations" and "bulkApplySettings" functions as required and subscribes to "settingsStore" updates`, () => {
+ it(`reads the value for "${settingsKey}" from localStorage, invokes "performSettingsDataMigrations" and "bulkApplySettings" functions as required and subscribes to "settingsStore" updates`, async () => {
vi.mock("~/newstore/settings", async (importOriginal) => {
const actualModule: Record<string, unknown> = await importOriginal()
@@ -573,19 +615,21 @@ describe("PersistenceService", () => {
})
const { settings } = VUEX_DATA_MOCK.postwoman
- window.localStorage.setItem(settingsKey, JSON.stringify(settings))
+ await setStoreItem(settingsKey, settings)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
-
- // toastErrorFn = vi.fn()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(settingsKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(settingsKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringMatching(/"schemaVersion":1/)
+ )
expect(performSettingsDataMigrations).toHaveBeenCalledWith(settings)
expect(bulkApplySettings).toHaveBeenCalledWith(settings)
@@ -596,21 +640,21 @@ describe("PersistenceService", () => {
})
})
- describe("Setup history persistence", () => {
+ describe("setup history persistence", () => {
// Keys read from localStorage across test cases
- const historyKey = "history"
- const graphqlHistoryKey = "graphqlHistory"
+ const historyKey = `${STORE_NAMESPACE}:${STORE_KEYS.REST_HISTORY}`
+ const graphqlHistoryKey = `${STORE_NAMESPACE}:${STORE_KEYS.GQL_HISTORY}`
- it(`shows an error and sets the entry as a backup in localStorage if "${historyKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${historyKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `history`
// `v` -> `number`
const restHistoryData = [{ ...REST_HISTORY_MOCK, v: "1" }]
- window.localStorage.setItem(historyKey, JSON.stringify(restHistoryData))
+ await setStoreItem(historyKey, restHistoryData)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(historyKey)
@@ -619,61 +663,69 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${historyKey}-backup`,
- JSON.stringify(restHistoryData)
+ expect.stringContaining(JSON.stringify(restHistoryData))
)
})
- it(`REST history schema parsing succeeds if there is no "${historyKey}" key present in localStorage where the fallback of "[]" is chosen`, () => {
+ it(`REST history schema parsing succeeds if there is no "${historyKey}" key present in localStorage where the fallback of "[]" is chosen`, async () => {
window.localStorage.removeItem(historyKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(historyKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(historyKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringMatching(/"schemaVersion":1/)
+ )
})
- it(`shows an error and sets the entry as a backup in localStorage if "${graphqlHistoryKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${graphqlHistoryKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `graphqlHistory`
// `v` -> `number`
const graphqlHistoryData = [{ ...GQL_HISTORY_MOCK, v: "1" }]
- window.localStorage.setItem(
- graphqlHistoryKey,
- JSON.stringify(graphqlHistoryData)
- )
+ await setStoreItem(graphqlHistoryKey, graphqlHistoryData)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(graphqlHistoryKey)
+ expect(toastErrorFn).toHaveBeenCalledWith(
+ expect.stringContaining(graphqlHistoryKey)
+ )
expect(setItemSpy).toHaveBeenCalledWith(
`${graphqlHistoryKey}-backup`,
- JSON.stringify(graphqlHistoryData)
+ expect.stringContaining(JSON.stringify(graphqlHistoryData))
)
})
- it(`GQL history schema parsing succeeds if there is no "${graphqlHistoryKey}" key present in localStorage where the fallback of "[]" is chosen`, () => {
+ it(`GQL history schema parsing succeeds if there is no "${graphqlHistoryKey}" key present in localStorage where the fallback of "[]" is chosen`, async () => {
window.localStorage.removeItem(graphqlHistoryKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(graphqlHistoryKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(graphqlHistoryKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringMatching(/"schemaVersion":1/)
+ )
})
- it("reads REST and GQL history entries from localStorage, translates them to the new format, writes back the updates and subscribes to the respective store for updates", () => {
+ it("reads REST and GQL history entries from localStorage, translates them to the new format, writes back the updates and subscribes to the respective store for updates", async () => {
vi.mock("~/newstore/history", () => {
return {
setGraphqlHistoryEntries: vi.fn(),
@@ -697,16 +749,16 @@ describe("PersistenceService", () => {
}
})
- const stringifiedRestHistory = JSON.stringify(REST_HISTORY_MOCK)
- const stringifiedGqlHistory = JSON.stringify(GQL_HISTORY_MOCK)
+ const restHistory = REST_HISTORY_MOCK
+ const gqlHistory = GQL_HISTORY_MOCK
- window.localStorage.setItem(historyKey, stringifiedRestHistory)
- window.localStorage.setItem(graphqlHistoryKey, stringifiedGqlHistory)
+ await setStoreItem(historyKey, restHistory)
+ await setStoreItem(graphqlHistoryKey, gqlHistory)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(historyKey)
expect(getItemSpy).toHaveBeenCalledWith(graphqlHistoryKey)
@@ -715,17 +767,17 @@ describe("PersistenceService", () => {
historyKey,
graphqlHistoryKey
)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringMatching(/"schemaVersion":1/)
+ )
expect(translateToNewRESTHistory).toHaveBeenCalled()
expect(translateToNewGQLHistory).toHaveBeenCalled()
- // This ensures `updatedOn` field is treated as a `string`
- const parsedRestHistory = JSON.parse(stringifiedRestHistory)
- const parsedGqlHistory = JSON.parse(stringifiedGqlHistory)
-
- expect(setRESTHistoryEntries).toHaveBeenCalledWith(parsedRestHistory)
- expect(setGraphqlHistoryEntries).toHaveBeenCalledWith(parsedGqlHistory)
+ expect(setRESTHistoryEntries).toHaveBeenCalledWith(restHistory)
+ expect(setGraphqlHistoryEntries).toHaveBeenCalledWith(gqlHistory)
expect(restHistoryStore.subject$.subscribe).toHaveBeenCalledWith(
expect.any(Function)
@@ -736,63 +788,61 @@ describe("PersistenceService", () => {
})
})
- describe("Setup collections persistence", () => {
+ describe("setup collections persistence", () => {
// Keys read from localStorage across test cases
- const collectionsKey = "collections"
- const collectionsGraphqlKey = "collectionsGraphql"
+ const collectionsRESTKey = `${STORE_NAMESPACE}:${STORE_KEYS.REST_COLLECTIONS}`
+ const collectionsGraphqlKey = `${STORE_NAMESPACE}:${STORE_KEYS.GQL_COLLECTIONS}`
- it(`shows an error and sets the entry as a backup in localStorage if "${collectionsKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${collectionsRESTKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `collections`
// `v` -> `number`
const restCollectionsData = [{ ...REST_COLLECTIONS_MOCK, v: "1" }]
- window.localStorage.setItem(
- collectionsKey,
- JSON.stringify(restCollectionsData)
- )
+ await setStoreItem(collectionsRESTKey, restCollectionsData)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
- expect(getItemSpy).toHaveBeenCalledWith(collectionsKey)
+ expect(getItemSpy).toHaveBeenCalledWith(collectionsRESTKey)
expect(toastErrorFn).toHaveBeenCalledWith(
- expect.stringContaining(collectionsKey)
+ expect.stringContaining(collectionsRESTKey)
)
expect(setItemSpy).toHaveBeenCalledWith(
- `${collectionsKey}-backup`,
- JSON.stringify(restCollectionsData)
+ `${collectionsRESTKey}-backup`,
+ expect.stringContaining(JSON.stringify(restCollectionsData))
)
})
- it(`REST collections schema parsing succeeds if there is no "${collectionsKey}" key present in localStorage where the fallback of "[]" is chosen`, () => {
- window.localStorage.removeItem(collectionsKey)
+ it(`REST collections schema parsing succeeds if there is no "${collectionsRESTKey}" key present in localStorage where the fallback of "[]" is chosen`, async () => {
+ window.localStorage.removeItem(collectionsRESTKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
- expect(getItemSpy).toHaveBeenCalledWith(collectionsKey)
+ expect(getItemSpy).toHaveBeenCalledWith(collectionsRESTKey)
- expect(toastErrorFn).not.toHaveBeenCalledWith(collectionsKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(toastErrorFn).not.toHaveBeenCalledWith(collectionsRESTKey)
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
})
- it(`shows an error and sets the entry as a backup in localStorage if "${collectionsGraphqlKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${collectionsGraphqlKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `collectionsGraphql`
// `v` -> `number`
const graphqlCollectionsData = [{ ...GQL_COLLECTIONS_MOCK, v: "1" }]
- window.localStorage.setItem(
- collectionsGraphqlKey,
- JSON.stringify(graphqlCollectionsData)
- )
+ await setStoreItem(collectionsGraphqlKey, graphqlCollectionsData)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(collectionsGraphqlKey)
@@ -801,25 +851,29 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${collectionsGraphqlKey}-backup`,
- JSON.stringify(graphqlCollectionsData)
+ expect.stringContaining(JSON.stringify(graphqlCollectionsData))
)
})
- it(`GQL history schema parsing succeeds if there is no "${collectionsGraphqlKey}" key present in localStorage where the fallback of "[]" is chosen`, () => {
+ it(`GQL collections schema parsing succeeds if there is no "${collectionsGraphqlKey}" key present in localStorage where the fallback of "[]" is chosen`, async () => {
window.localStorage.removeItem(collectionsGraphqlKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(collectionsGraphqlKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(collectionsGraphqlKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
})
- it("reads REST and GQL collection entries from localStorage, translates them to the new format, writes back the updates and subscribes to the respective store for updates", () => {
+ it("reads REST and GQL collection entries from localStorage, translates them to the new format, writes back the updates and subscribes to the respective store for updates", async () => {
vi.mock("@hoppscotch/data", async (importOriginal) => {
const actualModule: Record<string, unknown> = await importOriginal()
@@ -854,29 +908,26 @@ describe("PersistenceService", () => {
const restCollections = REST_COLLECTIONS_MOCK
const gqlCollections = GQL_COLLECTIONS_MOCK
- window.localStorage.setItem(
- collectionsKey,
- JSON.stringify(restCollections)
- )
-
- window.localStorage.setItem(
- collectionsGraphqlKey,
- JSON.stringify(gqlCollections)
- )
+ await setStoreItem(collectionsRESTKey, restCollections)
+ await setStoreItem(collectionsGraphqlKey, gqlCollections)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
- expect(getItemSpy).toHaveBeenCalledWith(collectionsKey)
+ expect(getItemSpy).toHaveBeenCalledWith(collectionsRESTKey)
expect(getItemSpy).toHaveBeenCalledWith(collectionsGraphqlKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(
- collectionsKey,
+ collectionsRESTKey,
collectionsGraphqlKey
)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
expect(translateToNewGQLCollection).toHaveBeenCalled()
expect(translateToNewRESTCollection).toHaveBeenCalled()
@@ -893,11 +944,11 @@ describe("PersistenceService", () => {
})
})
- describe("Setup environments persistence", () => {
+ describe("setup environments persistence", () => {
// Key read from localStorage across test cases
- const environmentsKey = "environments"
+ const environmentsKey = `${STORE_NAMESPACE}:${STORE_KEYS.ENVIRONMENTS}`
- it(`shows an error and sets the entry as a backup in localStorage if "${environmentsKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${environmentsKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `environments`
const environments = [
// `entries` -> `variables`
@@ -909,15 +960,12 @@ describe("PersistenceService", () => {
},
]
- window.localStorage.setItem(
- environmentsKey,
- JSON.stringify(environments)
- )
+ await setStoreItem(environmentsKey, environments)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(environmentsKey)
@@ -926,24 +974,20 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${environmentsKey}-backup`,
- JSON.stringify(environments)
+ expect.stringContaining(JSON.stringify(environments))
)
})
- it(`separates "globals" entries from "${environmentsKey}", subscribes to the "environmentStore" and updates localStorage entries`, () => {
+ it(`separates "globals" entries from "${environmentsKey}", subscribes to the "environmentStore" and updates localStorage entries`, async () => {
const environments = cloneDeep(ENVIRONMENTS_MOCK)
- window.localStorage.setItem(
- "environments",
- JSON.stringify(environments)
- )
+ await setStoreItem(environmentsKey, environments)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(environmentsKey)
-
expect(toastErrorFn).not.toHaveBeenCalledWith(environmentsKey)
expect(setItemSpy).not.toHaveBeenCalledWith(`${environmentsKey}-backup`)
@@ -954,9 +998,10 @@ describe("PersistenceService", () => {
// Removes `globals` from environments
environments.splice(0, 1)
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
expect(setItemSpy).toHaveBeenCalledWith(
- environmentsKey,
- JSON.stringify(environments)
+ schemaVersionKey,
+ expect.stringMatching(/"schemaVersion":1/)
)
expect(replaceEnvironments).toBeCalledWith(environments)
expect(environments$.subscribe).toHaveBeenCalledWith(
@@ -965,24 +1010,21 @@ describe("PersistenceService", () => {
})
})
- describe("Setup selected environment persistence", () => {
+ describe("setup selected environment persistence", () => {
// Key read from localStorage across test cases
- const selectedEnvIndexKey = "selectedEnvIndex"
+ const selectedEnvIndexKey = `${STORE_NAMESPACE}:${STORE_KEYS.SELECTED_ENV}`
- it(`shows an error and sets the entry as a backup in localStorage if "${selectedEnvIndexKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${selectedEnvIndexKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `selectedEnvIndex`
// `index` -> `number`
const selectedEnvIndex = { ...SELECTED_ENV_INDEX_MOCK, index: "1" }
- window.localStorage.setItem(
- selectedEnvIndexKey,
- JSON.stringify(selectedEnvIndex)
- )
+ await setStoreItem(selectedEnvIndexKey, selectedEnvIndex)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(selectedEnvIndexKey)
@@ -991,41 +1033,46 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${selectedEnvIndexKey}-backup`,
- JSON.stringify(selectedEnvIndex)
+ expect.stringContaining(JSON.stringify(selectedEnvIndex))
)
})
- it(`schema parsing succeeds if there is no "${selectedEnvIndexKey}" key present in localStorage where the fallback of "null" is chosen`, () => {
+ it(`schema parsing succeeds if there is no "${selectedEnvIndexKey}" key present in localStorage where the fallback of "null" is chosen`, async () => {
window.localStorage.removeItem(selectedEnvIndexKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(selectedEnvIndexKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(selectedEnvIndexKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
})
- it(`sets it to the store if there is a value associated with the "${selectedEnvIndexKey}" key in localStorage`, () => {
+ it(`sets it to the store if there is a value associated with the "${selectedEnvIndexKey}" key in localStorage`, async () => {
const selectedEnvIndex = SELECTED_ENV_INDEX_MOCK
- window.localStorage.setItem(
- selectedEnvIndexKey,
- JSON.stringify(selectedEnvIndex)
- )
+ await setStoreItem(selectedEnvIndexKey, selectedEnvIndex)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(selectedEnvIndexKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(selectedEnvIndexKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
expect(setSelectedEnvironmentIndex).toHaveBeenCalledWith(
selectedEnvIndex
@@ -1035,18 +1082,22 @@ describe("PersistenceService", () => {
)
})
- it(`sets it to "NO_ENV_SELECTED" if there is no value associated with the "${selectedEnvIndexKey}" in localStorage`, () => {
+ it(`sets it to "NO_ENV_SELECTED" if there is no value associated with the "${selectedEnvIndexKey}" in localStorage`, async () => {
window.localStorage.removeItem(selectedEnvIndexKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(selectedEnvIndexKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(selectedEnvIndexKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
expect(setSelectedEnvironmentIndex).toHaveBeenCalledWith({
type: "NO_ENV_SELECTED",
@@ -1057,9 +1108,9 @@ describe("PersistenceService", () => {
})
})
- describe("Setup secret Environments persistence", () => {
+ describe("setup secret Environments persistence", () => {
// Key read from localStorage across test cases
- const secretEnvironmentsKey = "secretEnvironments"
+ const secretEnvironmentsKey = `${STORE_NAMESPACE}:${STORE_KEYS.SECRET_ENVIRONMENTS}`
const loadSecretEnvironmentsFromPersistedStateFn = vi.fn()
const mock = {
@@ -1067,7 +1118,7 @@ describe("PersistenceService", () => {
loadSecretEnvironmentsFromPersistedStateFn,
}
- it(`shows an error and sets the entry as a backup in localStorage if "${secretEnvironmentsKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${secretEnvironmentsKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `secretEnvironments`
const secretEnvironments = {
clryz7ir7002al4162bsj0azg: {
@@ -1076,15 +1127,12 @@ describe("PersistenceService", () => {
},
}
- window.localStorage.setItem(
- secretEnvironmentsKey,
- JSON.stringify(secretEnvironments)
- )
+ await setStoreItem(secretEnvironmentsKey, secretEnvironments)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(secretEnvironmentsKey)
@@ -1093,20 +1141,18 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${secretEnvironmentsKey}-backup`,
- JSON.stringify(secretEnvironments)
+ expect.stringContaining(JSON.stringify(secretEnvironments))
)
})
- it("loads secret environments from the state persisted in localStorage and sets watcher for `persistableSecretEnvironment`", () => {
+ it("loads secret environments from the state persisted in localStorage and sets watcher for `persistableSecretEnvironment`", async () => {
const secretEnvironment = SECRET_ENVIRONMENTS_MOCK
- window.localStorage.setItem(
- secretEnvironmentsKey,
- JSON.stringify(secretEnvironment)
- )
+ await setStoreItem(secretEnvironmentsKey, secretEnvironment)
const getItemSpy = spyOnGetItem()
+ const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence({
+ await invokeSetupLocalPersistence({
mockSecretEnvironmentsService: true,
mock,
})
@@ -1114,24 +1160,24 @@ describe("PersistenceService", () => {
expect(getItemSpy).toHaveBeenCalledWith(secretEnvironmentsKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(secretEnvironmentsKey)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
expect(loadSecretEnvironmentsFromPersistedStateFn).toHaveBeenCalledWith(
secretEnvironment
)
- expect(watchDebounced).toHaveBeenCalledWith(
- expect.any(Object),
- expect.any(Function),
- { debounce: 500 }
- )
+ expect(watchDebounced).toHaveBeenCalled()
})
- it(`skips schema parsing and the loading of persisted secret environments if there is no "${secretEnvironmentsKey}" key present in localStorage`, () => {
+ it(`skips schema parsing and the loading of persisted secret environments if there is no "${secretEnvironmentsKey}" key present in localStorage`, async () => {
window.localStorage.removeItem(secretEnvironmentsKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence({
+ await invokeSetupLocalPersistence({
mockSecretEnvironmentsService: true,
mock,
})
@@ -1139,29 +1185,36 @@ describe("PersistenceService", () => {
expect(getItemSpy).toHaveBeenCalledWith(secretEnvironmentsKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(secretEnvironmentsKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
expect(watchDebounced).toHaveBeenCalled()
})
- it("logs an error to the console on failing to parse persisted secret environments", () => {
- window.localStorage.setItem(secretEnvironmentsKey, "invalid-json")
+ it("logs an error to the console on failing to parse persisted secret environments", async () => {
+ await setStoreItem(secretEnvironmentsKey, "invalid-json")
console.error = vi.fn()
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(secretEnvironmentsKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(secretEnvironmentsKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
expect(console.error).toHaveBeenCalledWith(
- `Failed parsing persisted secret environment, state:`,
- window.localStorage.getItem(secretEnvironmentsKey)
+ `Failed parsing persisted SECRET_ENVIRONMENTS:`,
+ await getStoreItem(secretEnvironmentsKey)
)
+
expect(watchDebounced).toHaveBeenCalledWith(
expect.any(Object),
expect.any(Function),
@@ -1172,9 +1225,9 @@ describe("PersistenceService", () => {
describe("setup WebSocket persistence", () => {
// Key read from localStorage across test cases
- const wsRequestKey = "WebsocketRequest"
+ const wsRequestKey = `${STORE_NAMESPACE}:${STORE_KEYS.WEBSOCKET}`
- it(`shows an error and sets the entry as a backup in localStorage if "${wsRequestKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${wsRequestKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `WebsocketRequest`
const request = {
...WEBSOCKET_REQUEST_MOCK,
@@ -1182,12 +1235,12 @@ describe("PersistenceService", () => {
protocols: {},
}
- window.localStorage.setItem(wsRequestKey, JSON.stringify(request))
+ await setStoreItem(wsRequestKey, request)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(wsRequestKey)
@@ -1196,25 +1249,29 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${wsRequestKey}-backup`,
- JSON.stringify(request)
+ expect.stringContaining(JSON.stringify(request))
)
})
- it(`schema parsing succeeds if there is no "${wsRequestKey}" key present in localStorage where the fallback of "null" is chosen`, () => {
+ it(`schema parsing succeeds if there is no "${wsRequestKey}" key present in localStorage where the fallback of "null" is chosen`, async () => {
window.localStorage.removeItem(wsRequestKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(wsRequestKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(wsRequestKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
})
- it(`reads the "${wsRequestKey}" entry from localStorage, sets it as the new request, subscribes to the "WSSessionStore" and updates localStorage entries`, () => {
+ it(`reads the "${wsRequestKey}" entry from localStorage, sets it as the new request, subscribes to the "WSSessionStore" and updates localStorage entries`, async () => {
vi.mock("~/newstore/WebSocketSession", () => {
return {
setWSRequest: vi.fn(),
@@ -1225,17 +1282,21 @@ describe("PersistenceService", () => {
})
const request = WEBSOCKET_REQUEST_MOCK
- window.localStorage.setItem(wsRequestKey, JSON.stringify(request))
+ await setStoreItem(wsRequestKey, request)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(wsRequestKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(wsRequestKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
expect(setWSRequest).toHaveBeenCalledWith(request)
expect(WSRequest$.subscribe).toHaveBeenCalledWith(expect.any(Function))
@@ -1244,9 +1305,9 @@ describe("PersistenceService", () => {
describe("setup Socket.IO persistence", () => {
// Key read from localStorage across test cases
- const sioRequestKey = "SocketIORequest"
+ const sioRequestKey = `${STORE_NAMESPACE}:${STORE_KEYS.SOCKETIO}`
- it(`shows an error and sets the entry as a backup in localStorage if "${sioRequestKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${sioRequestKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `SocketIORequest`
const request = {
...SOCKET_IO_REQUEST_MOCK,
@@ -1254,12 +1315,12 @@ describe("PersistenceService", () => {
v: "4",
}
- window.localStorage.setItem(sioRequestKey, JSON.stringify(request))
+ await setStoreItem(sioRequestKey, request)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(sioRequestKey)
@@ -1268,25 +1329,29 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${sioRequestKey}-backup`,
- JSON.stringify(request)
+ expect.stringContaining(JSON.stringify(request))
)
})
- it(`schema parsing succeeds if there is no "${sioRequestKey}" key present in localStorage where the fallback of "null" is chosen`, () => {
+ it(`schema parsing succeeds if there is no "${sioRequestKey}" key present in localStorage where the fallback of "null" is chosen`, async () => {
window.localStorage.removeItem(sioRequestKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(sioRequestKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(sioRequestKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
})
- it(`reads the "${sioRequestKey}" entry from localStorage, sets it as the new request, subscribes to the "SIOSessionStore" and updates localStorage entries`, () => {
+ it(`reads the "${sioRequestKey}" entry from localStorage, sets it as the new request, subscribes to the "SIOSessionStore" and updates localStorage entries`, async () => {
vi.mock("~/newstore/SocketIOSession", () => {
return {
setSIORequest: vi.fn(),
@@ -1297,29 +1362,32 @@ describe("PersistenceService", () => {
})
const request = SOCKET_IO_REQUEST_MOCK
-
- window.localStorage.setItem(sioRequestKey, JSON.stringify(request))
+ await setStoreItem(sioRequestKey, request)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(sioRequestKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(sioRequestKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
expect(setSIORequest).toHaveBeenCalledWith(request)
expect(SIORequest$.subscribe).toHaveBeenCalledWith(expect.any(Function))
})
})
- describe("setup SSE Persistence", () => {
+ describe("setup SSE persistence", () => {
// Key read from localStorage across test cases
- const sseRequestKey = "SSERequest"
+ const sseRequestKey = `${STORE_NAMESPACE}:${STORE_KEYS.SSE}`
- it(`shows an error and sets the entry as a backup in localStorage if "${sseRequestKey}" read from localStorage doesn't match the versioned schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${sseRequestKey}" read from localStorage doesn't match the versioned schema`, async () => {
// Invalid shape for `SSERequest`
const request = {
...SSE_REQUEST_MOCK,
@@ -1327,12 +1395,12 @@ describe("PersistenceService", () => {
url: "https://express-eventsource.herokuapp.com/events",
}
- window.localStorage.setItem(sseRequestKey, JSON.stringify(request))
+ await setStoreItem(sseRequestKey, request)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(sseRequestKey)
@@ -1341,25 +1409,29 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${sseRequestKey}-backup`,
- JSON.stringify(request)
+ expect.stringContaining(JSON.stringify(request))
)
})
- it(`schema parsing succeeds if there is no "${sseRequestKey}" key present in localStorage where the fallback of "null" is chosen`, () => {
+ it(`schema parsing succeeds if there is no "${sseRequestKey}" key present in localStorage where the fallback of "null" is chosen`, async () => {
window.localStorage.removeItem(sseRequestKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(sseRequestKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(sseRequestKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
})
- it(`reads the "${sseRequestKey}" entry from localStorage, sets it as the new request, subscribes to the "SSESessionStore" and updates localStorage entries`, () => {
+ it(`reads the "${sseRequestKey}" entry from localStorage, sets it as the new request, subscribes to the "SSESessionStore" and updates localStorage entries`, async () => {
vi.mock("~/newstore/SSESession", () => {
return {
setSSERequest: vi.fn(),
@@ -1370,28 +1442,32 @@ describe("PersistenceService", () => {
})
const request = SSE_REQUEST_MOCK
- window.localStorage.setItem(sseRequestKey, JSON.stringify(request))
+ await setStoreItem(sseRequestKey, request)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(sseRequestKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(sseRequestKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
expect(setSSERequest).toHaveBeenCalledWith(request)
expect(SSERequest$.subscribe).toHaveBeenCalledWith(expect.any(Function))
})
})
- describe("setup MQTT Persistence", () => {
+ describe("setup MQTT persistence", () => {
// Key read from localStorage across test cases
- const mqttRequestKey = "MQTTRequest"
+ const mqttRequestKey = `${STORE_NAMESPACE}:${STORE_KEYS.MQTT}`
- it(`shows an error and sets the entry as a backup in localStorage if "${mqttRequestKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${mqttRequestKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `MQTTRequest`
const request = {
...MQTT_REQUEST_MOCK,
@@ -1399,12 +1475,12 @@ describe("PersistenceService", () => {
url: "wss://test.mosquitto.org:8081",
}
- window.localStorage.setItem(mqttRequestKey, JSON.stringify(request))
+ await setStoreItem(mqttRequestKey, request)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(mqttRequestKey)
@@ -1413,25 +1489,29 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${mqttRequestKey}-backup`,
- JSON.stringify(request)
+ expect.stringContaining(JSON.stringify(request))
)
})
- it(`schema parsing succeeds if there is no "${mqttRequestKey}" key present in localStorage where the fallback of "null" is chosen`, () => {
+ it(`schema parsing succeeds if there is no "${mqttRequestKey}" key present in localStorage where the fallback of "null" is chosen`, async () => {
window.localStorage.removeItem(mqttRequestKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(mqttRequestKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(mqttRequestKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
})
- it(`reads the ${mqttRequestKey}" entry from localStorage, sets it as the new request, subscribes to the "MQTTSessionStore" and updates localStorage entries`, () => {
+ it(`reads the ${mqttRequestKey}" entry from localStorage, sets it as the new request, subscribes to the "MQTTSessionStore" and updates localStorage entries`, async () => {
vi.mock("~/newstore/MQTTSession", () => {
return {
setMQTTRequest: vi.fn(),
@@ -1442,17 +1522,21 @@ describe("PersistenceService", () => {
})
const request = MQTT_REQUEST_MOCK
- window.localStorage.setItem(mqttRequestKey, JSON.stringify(request))
+ await setStoreItem(mqttRequestKey, request)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(mqttRequestKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(mqttRequestKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
expect(setMQTTRequest).toHaveBeenCalledWith(request)
expect(MQTTRequest$.subscribe).toHaveBeenCalledWith(
@@ -1463,9 +1547,9 @@ describe("PersistenceService", () => {
describe("setup global environments persistence", () => {
// Key read from localStorage across test cases
- const globalEnvKey = "globalEnv"
+ const globalEnvKey = `${STORE_NAMESPACE}:${STORE_KEYS.GLOBAL_ENV}`
- it(`shows an error and sets the entry as a backup in localStorage if "${globalEnvKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${globalEnvKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `globalEnv`
const globalEnv = [
{
@@ -1475,12 +1559,12 @@ describe("PersistenceService", () => {
},
]
- window.localStorage.setItem(globalEnvKey, JSON.stringify(globalEnv))
+ await setStoreItem(globalEnvKey, globalEnv)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(globalEnvKey)
@@ -1489,37 +1573,45 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${globalEnvKey}-backup`,
- JSON.stringify(globalEnv)
+ expect.stringContaining(JSON.stringify(globalEnv))
)
})
- it(`schema parsing succeeds if there is no "${globalEnvKey}" key present in localStorage where the fallback of "[]" is chosen`, () => {
+ it(`schema parsing succeeds if there is no "${globalEnvKey}" key present in localStorage where the fallback of "[]" is chosen`, async () => {
window.localStorage.removeItem(globalEnvKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(globalEnvKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(globalEnvKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
})
- it(`reads the "globalEnv" entry from localStorage, dispatches the new value, subscribes to the "environmentsStore" and updates localStorage entries`, () => {
+ it(`reads the "globalEnv" entry from localStorage, dispatches the new value, subscribes to the "environmentsStore" and updates localStorage entries`, async () => {
const globalEnv = GLOBAL_ENV_MOCK
- window.localStorage.setItem(globalEnvKey, JSON.stringify(globalEnv))
+ await setStoreItem(globalEnvKey, globalEnv)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(globalEnvKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(globalEnvKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringContaining('"schemaVersion":1')
+ )
expect(setGlobalEnvVariables).toHaveBeenCalledWith(globalEnv)
expect(globalEnv$.subscribe).toHaveBeenCalledWith(expect.any(Function))
@@ -1528,22 +1620,22 @@ describe("PersistenceService", () => {
describe("setup GQL tabs persistence", () => {
// Key read from localStorage across test cases
- const gqlTabStateKey = "gqlTabState"
+ const gqlTabStateKey = `${STORE_NAMESPACE}:${STORE_KEYS.GQL_TABS}`
const loadTabsFromPersistedStateFn = vi.fn()
const mock = { loadTabsFromPersistedState: loadTabsFromPersistedStateFn }
- it(`shows an error and sets the entry as a backup in localStorage if "${gqlTabStateKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${gqlTabStateKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `gqlTabState`
// `lastActiveTabID` -> `string`
const gqlTabState = { ...GQL_TAB_STATE_MOCK, lastActiveTabID: 1234 }
- window.localStorage.setItem(gqlTabStateKey, JSON.stringify(gqlTabState))
+ await setStoreItem(gqlTabStateKey, gqlTabState)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(gqlTabStateKey)
@@ -1552,40 +1644,49 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${gqlTabStateKey}-backup`,
- JSON.stringify(gqlTabState)
+ expect.stringContaining(JSON.stringify(gqlTabState))
)
})
- it(`skips schema parsing and the loading of persisted tabs if there is no "${gqlTabStateKey}" key present in localStorage`, () => {
+ it(`skips schema parsing and the loading of persisted tabs if there is no "${gqlTabStateKey}" key present in localStorage`, async () => {
window.localStorage.removeItem(gqlTabStateKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence({ mockGQLTabService: true, mock })
+ await invokeSetupLocalPersistence({ mockGQLTabService: true, mock })
expect(getItemSpy).toHaveBeenCalledWith(gqlTabStateKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(gqlTabStateKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringMatching(/"schemaVersion":1/)
+ )
+
expect(loadTabsFromPersistedStateFn).not.toHaveBeenCalled()
expect(watchDebounced).toHaveBeenCalled()
})
- it("loads tabs from the state persisted in localStorage and sets watcher for `persistableTabState`", () => {
+ it("loads tabs from the state persisted in localStorage and sets watcher for `persistableTabState`", async () => {
const tabState = GQL_TAB_STATE_MOCK
- window.localStorage.setItem(gqlTabStateKey, JSON.stringify(tabState))
+ await setStoreItem(gqlTabStateKey, tabState)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence({ mockGQLTabService: true, mock })
+ await invokeSetupLocalPersistence({ mockGQLTabService: true, mock })
expect(getItemSpy).toHaveBeenCalledWith(gqlTabStateKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(gqlTabStateKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringMatching(/"schemaVersion":1/)
+ )
expect(loadTabsFromPersistedStateFn).toHaveBeenCalledWith(tabState)
expect(watchDebounced).toHaveBeenCalledWith(
@@ -1595,23 +1696,21 @@ describe("PersistenceService", () => {
)
})
- it("logs an error to the console on failing to parse persisted tab state", () => {
- window.localStorage.setItem(gqlTabStateKey, "invalid-json")
+ it("logs an error to the console on failing to parse persisted gql tab state", async () => {
+ await setStoreItem(gqlTabStateKey, "invalid-json")
console.error = vi.fn()
const getItemSpy = spyOnGetItem()
- const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(gqlTabStateKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(gqlTabStateKey)
- expect(setItemSpy).not.toHaveBeenCalled()
expect(console.error).toHaveBeenCalledWith(
- `Failed parsing persisted tab state, state:`,
- window.localStorage.getItem(gqlTabStateKey)
+ `Failed parsing persisted GQL_TABS:`,
+ await getStoreItem(gqlTabStateKey)
)
expect(watchDebounced).toHaveBeenCalledWith(
expect.any(Object),
@@ -1623,25 +1722,22 @@ describe("PersistenceService", () => {
describe("setup REST tabs persistence", () => {
// Key read from localStorage across test cases
- const restTabStateKey = "restTabState"
+ const restTabStateKey = `${STORE_NAMESPACE}:${STORE_KEYS.REST_TABS}`
const loadTabsFromPersistedStateFn = vi.fn()
const mock = { loadTabsFromPersistedState: loadTabsFromPersistedStateFn }
- it(`shows an error and sets the entry as a backup in localStorage if "${restTabStateKey}" read from localStorage doesn't match the schema`, () => {
+ it(`shows an error and sets the entry as a backup in localStorage if "${restTabStateKey}" read from localStorage doesn't match the schema`, async () => {
// Invalid shape for `restTabState`
// `lastActiveTabID` -> `string`
const restTabState = { ...REST_TAB_STATE_MOCK, lastActiveTabID: 1234 }
- window.localStorage.setItem(
- restTabStateKey,
- JSON.stringify(restTabState)
- )
+ await setStoreItem(restTabStateKey, restTabState)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(restTabStateKey)
@@ -1650,40 +1746,48 @@ describe("PersistenceService", () => {
)
expect(setItemSpy).toHaveBeenCalledWith(
`${restTabStateKey}-backup`,
- JSON.stringify(restTabState)
+ expect.stringContaining(JSON.stringify(restTabState))
)
})
- it(`skips schema parsing and the loading of persisted tabs if there is no "${restTabStateKey}" key present in localStorage`, () => {
+ it(`skips schema parsing and the loading of persisted tabs if there is no "${restTabStateKey}" key present in localStorage`, async () => {
window.localStorage.removeItem(restTabStateKey)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence({ mockRESTTabService: true, mock })
+ await invokeSetupLocalPersistence({ mockRESTTabService: true, mock })
expect(getItemSpy).toHaveBeenCalledWith(restTabStateKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(restTabStateKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringMatching(/"schemaVersion":1/)
+ )
expect(loadTabsFromPersistedStateFn).not.toHaveBeenCalled()
expect(watchDebounced).toHaveBeenCalled()
})
- it("loads tabs from the state persisted in localStorage and sets watcher for `persistableTabState`", () => {
+ it("loads tabs from the state persisted in localStorage and sets watcher for `persistableTabState`", async () => {
const tabState = REST_TAB_STATE_MOCK
- window.localStorage.setItem(restTabStateKey, JSON.stringify(tabState))
+ await setStoreItem(restTabStateKey, tabState)
const getItemSpy = spyOnGetItem()
const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence({ mockRESTTabService: true, mock })
+ await invokeSetupLocalPersistence({ mockRESTTabService: true, mock })
expect(getItemSpy).toHaveBeenCalledWith(restTabStateKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(restTabStateKey)
- expect(setItemSpy).not.toHaveBeenCalled()
+ expect(setItemSpy).toHaveBeenCalledTimes(1)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ schemaVersionKey,
+ expect.stringMatching(/"schemaVersion":1/)
+ )
expect(loadTabsFromPersistedStateFn).toHaveBeenCalledWith(tabState)
expect(watchDebounced).toHaveBeenCalledWith(
@@ -1693,23 +1797,21 @@ describe("PersistenceService", () => {
)
})
- it("logs an error to the console on failing to parse persisted tab state", () => {
- window.localStorage.setItem(restTabStateKey, "invalid-json")
+ it("logs an error to the console on failing to parse persisted rest tab state", async () => {
+ await setStoreItem(restTabStateKey, "invalid-json")
console.error = vi.fn()
const getItemSpy = spyOnGetItem()
- const setItemSpy = spyOnSetItem()
- invokeSetupLocalPersistence()
+ await invokeSetupLocalPersistence()
expect(getItemSpy).toHaveBeenCalledWith(restTabStateKey)
expect(toastErrorFn).not.toHaveBeenCalledWith(restTabStateKey)
- expect(setItemSpy).not.toHaveBeenCalled()
expect(console.error).toHaveBeenCalledWith(
- `Failed parsing persisted tab state, state:`,
- window.localStorage.getItem(restTabStateKey)
+ `Failed parsing persisted REST_TABS:`,
+ await getStoreItem(restTabStateKey)
)
expect(watchDebounced).toHaveBeenCalledWith(
expect.any(Object),
@@ -1720,7 +1822,7 @@ describe("PersistenceService", () => {
})
})
- it("`setLocalConfig` method sets a value in localStorage", () => {
+ it("`setLocalConfig` method sets a value in localStorage", async () => {
const testKey = "test-key"
const testValue = "test-value"
@@ -1728,11 +1830,14 @@ describe("PersistenceService", () => {
const service = bindPersistenceService()
- service.setLocalConfig(testKey, testValue)
- expect(setItemSpy).toHaveBeenCalledWith(testKey, testValue)
+ await service.setLocalConfig(testKey, testValue)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ `${STORE_NAMESPACE}:${testKey}`,
+ expect.stringContaining(testValue)
+ )
})
- it("`getLocalConfig` method gets a value from localStorage", () => {
+ it("`getLocalConfig` method gets a value from localStorage", async () => {
const testKey = "test-key"
const testValue = "test-value"
@@ -1741,15 +1846,18 @@ describe("PersistenceService", () => {
const service = bindPersistenceService()
- service.setLocalConfig(testKey, testValue)
- const retrievedValue = service.getLocalConfig(testKey)
+ await service.setLocalConfig(testKey, testValue)
+ const retrievedValue = await service.getLocalConfig(testKey)
- expect(setItemSpy).toHaveBeenCalledWith(testKey, testValue)
- expect(getItemSpy).toHaveBeenCalledWith(testKey)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ `${STORE_NAMESPACE}:${testKey}`,
+ expect.stringContaining(testValue)
+ )
+ expect(getItemSpy).toHaveBeenCalledWith(`${STORE_NAMESPACE}:${testKey}`)
expect(retrievedValue).toBe(testValue)
})
- it("`removeLocalConfig` method clears a value in localStorage", () => {
+ it("`removeLocalConfig` method clears a value in localStorage", async () => {
const testKey = "test-key"
const testValue = "test-value"
@@ -1758,10 +1866,13 @@ describe("PersistenceService", () => {
const service = bindPersistenceService()
- service.setLocalConfig(testKey, testValue)
- service.removeLocalConfig(testKey)
+ await service.setLocalConfig(testKey, testValue)
+ await service.removeLocalConfig(testKey)
- expect(setItemSpy).toHaveBeenCalledWith(testKey, testValue)
- expect(removeItemSpy).toHaveBeenCalledWith(testKey)
+ expect(setItemSpy).toHaveBeenCalledWith(
+ `${STORE_NAMESPACE}:${testKey}`,
+ expect.stringContaining(testValue)
+ )
+ expect(removeItemSpy).toHaveBeenCalledWith(`${STORE_NAMESPACE}:${testKey}`)
})
})
diff --git a/packages/hoppscotch-common/src/services/persistence/index.ts b/packages/hoppscotch-common/src/services/persistence/index.ts
index dcd462ba0..5c8f83131 100644
--- a/packages/hoppscotch-common/src/services/persistence/index.ts
+++ b/packages/hoppscotch-common/src/services/persistence/index.ts
@@ -1,31 +1,37 @@
/* eslint-disable no-restricted-globals, no-restricted-syntax */
+import * as E from "fp-ts/Either"
+import { z } from "zod"
+
+import { Service } from "dioc"
+import { watchDebounced } from "@vueuse/core"
+import { assign, clone, isEmpty } from "lodash-es"
+
import {
- Environment,
- GlobalEnvironment,
GlobalEnvironmentVariable,
translateToNewGQLCollection,
translateToNewRESTCollection,
} from "@hoppscotch/data"
-import { StorageLike, watchDebounced } from "@vueuse/core"
-import { Service } from "dioc"
-import { assign, clone, isEmpty } from "lodash-es"
-import { z } from "zod"
+import { StoreError } from "@hoppscotch/kernel"
+
+import { Store } from "~/kernel/store"
import { GQLTabService } from "~/services/tab/graphql"
import { RESTTabService } from "~/services/tab/rest"
+import {
+ SecretEnvironmentService,
+ SecretVariable,
+} from "../secret-environment.service"
import { useToast } from "~/composables/toast"
-import { MQTTRequest$, setMQTTRequest } from "../../newstore/MQTTSession"
-import { SSERequest$, setSSERequest } from "../../newstore/SSESession"
-import { SIORequest$, setSIORequest } from "../../newstore/SocketIOSession"
-import { WSRequest$, setWSRequest } from "../../newstore/WebSocketSession"
+
import {
graphqlCollectionStore,
restCollectionStore,
setGraphqlCollections,
setRESTCollections,
} from "../../newstore/collections"
+
import {
addGlobalEnvVariable,
environments$,
@@ -35,6 +41,7 @@ import {
setGlobalEnvVariables,
setSelectedEnvironmentIndex,
} from "../../newstore/environments"
+
import {
graphqlHistoryStore,
restHistoryStore,
@@ -43,7 +50,9 @@ import {
translateToNewGQLHistory,
translateToNewRESTHistory,
} from "../../newstore/history"
+
import { bulkApplyLocalState, localStateStore } from "../../newstore/localstate"
+
import {
HoppAccentColor,
HoppBgColor,
@@ -53,9 +62,15 @@ import {
performSettingsDataMigrations,
settingsStore,
} from "../../newstore/settings"
-import { SecretEnvironmentService } from "../secret-environment.service"
+
+import { MQTTRequest$, setMQTTRequest } from "../../newstore/MQTTSession"
+import { SSERequest$, setSSERequest } from "../../newstore/SSESession"
+import { SIORequest$, setSIORequest } from "../../newstore/SocketIOSession"
+import { WSRequest$, setWSRequest } from "../../newstore/WebSocketSession"
+
import {
ENVIRONMENTS_SCHEMA,
+ GLOBAL_ENVIRONMENT_SCHEMA,
GQL_COLLECTION_SCHEMA,
GQL_HISTORY_ENTRY_SCHEMA,
GQL_TAB_STATE_SCHEMA,
@@ -74,712 +89,856 @@ import {
VUEX_SCHEMA,
WEBSOCKET_REQUEST_SCHEMA,
} from "./validation-schemas"
+import { PersistableTabState } from "../tab"
+import { HoppTabDocument } from "~/helpers/rest/document"
+import { HoppGQLDocument } from "~/helpers/graphql/document"
+
+export const STORE_NAMESPACE = "persistence.v1"
+
+export const STORE_KEYS = {
+ VUEX: "vuex",
+ SETTINGS: "settings",
+ LOCAL_STATE: "localState",
+ REST_HISTORY: "restHistory",
+ GQL_HISTORY: "gqlHistory",
+ REST_COLLECTIONS: "restCollections",
+ GQL_COLLECTIONS: "gqlCollections",
+ ENVIRONMENTS: "environments",
+ SELECTED_ENV: "selectedEnv",
+ WEBSOCKET: "websocket",
+ SOCKETIO: "socketio",
+ SSE: "sse",
+ MQTT: "mqtt",
+ GLOBAL_ENV: "globalEnv",
+ REST_TABS: "restTabs",
+ GQL_TABS: "gqlTabs",
+ SECRET_ENVIRONMENTS: "secretEnvironments",
+ SCHEMA_VERSION: "schema_version",
+} as const
+
+interface Migration {
+ version: number
+ migrate: () => Promise<void>
+}
+
+const migrations: Migration[] = [
+ {
+ version: 1,
+ migrate: async () => {
+ const keyMappings = {
+ settings: STORE_KEYS.SETTINGS,
+ collections: STORE_KEYS.REST_COLLECTIONS,
+ collectionsGraphql: STORE_KEYS.GQL_COLLECTIONS,
+ environments: STORE_KEYS.ENVIRONMENTS,
+ history: STORE_KEYS.REST_HISTORY,
+ graphqlHistory: STORE_KEYS.GQL_HISTORY,
+ WebsocketRequest: STORE_KEYS.WEBSOCKET,
+ SocketIORequest: STORE_KEYS.SOCKETIO,
+ SSERequest: STORE_KEYS.SSE,
+ MQTTRequest: STORE_KEYS.MQTT,
+ globalEnv: STORE_KEYS.GLOBAL_ENV,
+ restTabState: STORE_KEYS.REST_TABS,
+ gqlTabState: STORE_KEYS.GQL_TABS,
+ secretEnvironments: STORE_KEYS.SECRET_ENVIRONMENTS,
+ }
+
+ for (const [oldKey, newKey] of Object.entries(keyMappings)) {
+ const data = localStorage.getItem(oldKey)
+ if (data) {
+ try {
+ await Store.set(STORE_NAMESPACE, newKey, JSON.parse(data))
+ localStorage.removeItem(oldKey)
+ } catch (err) {
+ console.error(err)
+ console.error(
+ `Failed parsing persisted ${oldKey}:`,
+ JSON.stringify(data)
+ )
+ }
+ }
+ }
+ },
+ },
+]
/**
- * This service compiles persistence logic across the codebase
+ * Service that manages persistence of app state using the kernel store
*/
export class PersistenceService extends Service {
public static readonly ID = "PERSISTENCE_SERVICE"
private readonly restTabService = this.bind(RESTTabService)
private readonly gqlTabService = this.bind(GQLTabService)
-
private readonly secretEnvironmentService = this.bind(
SecretEnvironmentService
)
- public hoppLocalConfigStorage: StorageLike = localStorage
-
- private showErrorToast(localStorageKey: string) {
+ private showErrorToast(key: string) {
const toast = useToast()
toast.error(
- `There's a mismatch with the expected schema for the value corresponding to ${localStorageKey} read from localStorage, keeping a backup in ${localStorageKey}-backup`
+ `Schema validation failed for ${STORE_NAMESPACE}:${key}. A backup has been created with suffix '-backup'`
)
}
- private checkAndMigrateOldSettings() {
- if (window.localStorage.getItem("selectedEnvIndex")) {
- const index = window.localStorage.getItem("selectedEnvIndex")
- if (index) {
- if (index === "-1") {
- window.localStorage.setItem(
- "selectedEnvIndex",
- JSON.stringify({
- type: "NO_ENV_SELECTED",
- })
- )
- } else if (Number(index) >= 0) {
- window.localStorage.setItem(
- "selectedEnvIndex",
- JSON.stringify({
- type: "MY_ENV",
- index: parseInt(index),
- })
- )
- }
- }
- }
-
- const vuexKey = "vuex"
- let vuexData = JSON.parse(window.localStorage.getItem(vuexKey) || "{}")
-
- if (isEmpty(vuexData)) return
-
- // Validate data read from localStorage
- const result = VUEX_SCHEMA.safeParse(vuexData)
- if (result.success) {
- vuexData = result.data
- } else {
- this.showErrorToast(vuexKey)
- window.localStorage.setItem(`${vuexKey}-backup`, JSON.stringify(vuexData))
- }
-
- const { postwoman } = vuexData
-
- if (!isEmpty(postwoman?.settings)) {
- const settingsData = assign(
- clone(getDefaultSettings()),
- postwoman.settings
+ async init(): Promise<E.Either<StoreError, void>> {
+ const initResult = await Store.init()
+ if (E.isLeft(initResult)) {
+ console.error(
+ "[PersistenceService] Failed to initialize store:",
+ initResult.left
)
-
- window.localStorage.setItem("settings", JSON.stringify(settingsData))
-
- delete postwoman.settings
- window.localStorage.setItem(vuexKey, JSON.stringify(vuexData))
+ return initResult
}
+ return initResult
+ }
- if (postwoman?.collections) {
- window.localStorage.setItem(
- "collections",
- JSON.stringify(postwoman.collections)
- )
+ private async runMigrations() {
+ const versionResult = await Store.get<string>(
+ STORE_NAMESPACE,
+ STORE_KEYS.SCHEMA_VERSION
+ )
+ const currentVersion = E.isRight(versionResult)
+ ? versionResult.right || "0"
+ : "0"
+ const targetVersion = "1"
+
+ if (currentVersion !== targetVersion) {
+ for (const migration of migrations) {
+ if (migration.version > parseInt(currentVersion)) {
+ await migration.migrate()
+ }
+ }
- delete postwoman.collections
- window.localStorage.setItem(vuexKey, JSON.stringify(vuexData))
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.SCHEMA_VERSION, targetVersion)
}
+ }
- if (postwoman?.collectionsGraphql) {
- window.localStorage.setItem(
- "collectionsGraphql",
- JSON.stringify(postwoman.collectionsGraphql)
- )
-
- delete postwoman.collectionsGraphql
- window.localStorage.setItem(vuexKey, JSON.stringify(vuexData))
+ /**
+ * Private method to migrate settings from older versions
+ */
+ private async checkAndMigrateOldSettings() {
+ const oldSelectedEnvIndex = window.localStorage.getItem("selectedEnvIndex")
+ if (oldSelectedEnvIndex) {
+ if (oldSelectedEnvIndex === "-1") {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.SELECTED_ENV, {
+ type: "NO_ENV_SELECTED" as const,
+ })
+ } else if (Number(oldSelectedEnvIndex) >= 0) {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.SELECTED_ENV, {
+ type: "MY_ENV" as const,
+ index: parseInt(oldSelectedEnvIndex),
+ })
+ }
+ window.localStorage.removeItem("selectedEnvIndex")
}
- if (postwoman?.environments) {
- window.localStorage.setItem(
- "environments",
- JSON.stringify(postwoman.environments)
- )
+ const vuexKey = "vuex"
+ const vuexData = JSON.parse(window.localStorage.getItem(vuexKey) || "{}")
- delete postwoman.environments
- window.localStorage.setItem(vuexKey, JSON.stringify(vuexData))
+ if (!isEmpty(vuexData)) {
+ const result = VUEX_SCHEMA.safeParse(vuexData)
+ if (result.success) {
+ const { postwoman } = result.data
+ if (!isEmpty(postwoman?.settings)) {
+ const settingsData = assign(
+ clone(getDefaultSettings()),
+ postwoman.settings
+ )
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.SETTINGS, settingsData)
+ delete postwoman.settings
+ }
+ if (postwoman?.collections) {
+ await Store.set(
+ STORE_NAMESPACE,
+ STORE_KEYS.REST_COLLECTIONS,
+ postwoman.collections
+ )
+ delete postwoman.collections
+ }
+ if (postwoman?.collectionsGraphql) {
+ await Store.set(
+ STORE_NAMESPACE,
+ STORE_KEYS.GQL_COLLECTIONS,
+ postwoman.collectionsGraphql
+ )
+ delete postwoman.collectionsGraphql
+ }
+ if (postwoman?.environments) {
+ await Store.set(
+ STORE_NAMESPACE,
+ STORE_KEYS.ENVIRONMENTS,
+ postwoman.environments
+ )
+ delete postwoman.environments
+ }
+ } else {
+ this.showErrorToast(vuexKey)
+ window.localStorage.setItem(
+ `${vuexKey}-backup`,
+ JSON.stringify(vuexData)
+ )
+ }
+ window.localStorage.removeItem(vuexKey)
}
+ // Handle old theme color
const themeColorKey = "THEME_COLOR"
- let themeColorValue = window.localStorage.getItem(themeColorKey)
-
- if (themeColorValue) {
- // Validate data read from localStorage
- const result = THEME_COLOR_SCHEMA.safeParse(themeColorValue)
-
+ const themeColor = window.localStorage.getItem(themeColorKey)
+ if (themeColor) {
+ const result = THEME_COLOR_SCHEMA.safeParse(themeColor)
if (result.success) {
- themeColorValue = result.data
+ applySetting("THEME_COLOR", result.data as HoppAccentColor)
} else {
this.showErrorToast(themeColorKey)
- window.localStorage.setItem(`${themeColorKey}-backup`, themeColorValue)
+ window.localStorage.setItem(`${themeColorKey}-backup`, themeColor)
}
-
- applySetting(themeColorKey, themeColorValue as HoppAccentColor)
window.localStorage.removeItem(themeColorKey)
}
+ // Handle old color mode
const nuxtColorModeKey = "nuxt-color-mode"
- let nuxtColorModeValue = window.localStorage.getItem(nuxtColorModeKey)
-
- if (nuxtColorModeValue) {
- // Validate data read from localStorage
- const result = NUXT_COLOR_MODE_SCHEMA.safeParse(nuxtColorModeValue)
-
+ const nuxtColorMode = window.localStorage.getItem(nuxtColorModeKey)
+ if (nuxtColorMode) {
+ const result = NUXT_COLOR_MODE_SCHEMA.safeParse(nuxtColorMode)
if (result.success) {
- nuxtColorModeValue = result.data
+ applySetting("BG_COLOR", result.data as HoppBgColor)
} else {
this.showErrorToast(nuxtColorModeKey)
- window.localStorage.setItem(
- `${nuxtColorModeKey}-backup`,
- nuxtColorModeValue
- )
+ window.localStorage.setItem(`${nuxtColorModeKey}-backup`, nuxtColorMode)
}
-
- applySetting("BG_COLOR", nuxtColorModeValue as HoppBgColor)
window.localStorage.removeItem(nuxtColorModeKey)
}
}
- public setupLocalStatePersistence() {
- const localStateKey = "localState"
- let localStateData = JSON.parse(
- window.localStorage.getItem(localStateKey) ?? "{}"
+ private async setupLocalStatePersistence() {
+ const loadResult = await Store.get<any>(
+ STORE_NAMESPACE,
+ STORE_KEYS.LOCAL_STATE
)
- // Validate data read from localStorage
- const result = LOCAL_STATE_SCHEMA.safeParse(localStateData)
+ try {
+ if (E.isRight(loadResult)) {
+ const data = loadResult.right ?? {}
+ const result = LOCAL_STATE_SCHEMA.safeParse(data)
- if (result.success) {
- localStateData = result.data
- } else {
- this.showErrorToast(localStateKey)
- window.localStorage.setItem(
- `${localStateKey}-backup`,
- JSON.stringify(localStateData)
- )
+ if (result.success) {
+ bulkApplyLocalState(result.data)
+ } else {
+ this.showErrorToast(STORE_KEYS.LOCAL_STATE)
+ await Store.set(
+ STORE_NAMESPACE,
+ `${STORE_KEYS.LOCAL_STATE}-backup`,
+ data
+ )
+ }
+ }
+ } catch (e) {
+ console.error(`Failed parsing persisted LOCAL_STATE:`, loadResult)
}
- if (localStateData) bulkApplyLocalState(localStateData)
-
- localStateStore.subject$.subscribe((state) => {
- window.localStorage.setItem(localStateKey, JSON.stringify(state))
+ localStateStore.subject$.subscribe(async (state) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.LOCAL_STATE, state)
})
}
- private setupSettingsPersistence() {
- const settingsKey = "settings"
- let settingsData = JSON.parse(
- window.localStorage.getItem(settingsKey) ?? "null"
+ private async setupSettingsPersistence() {
+ const loadResult = await Store.get<any>(
+ STORE_NAMESPACE,
+ STORE_KEYS.SETTINGS
)
- if (!settingsData) {
- settingsData = getDefaultSettings()
- }
-
- // Validate data read from localStorage
- const result = SETTINGS_SCHEMA.safeParse(settingsData)
- if (result.success) {
- settingsData = result.data
- } else {
- this.showErrorToast(settingsKey)
- window.localStorage.setItem(
- `${settingsKey}-backup`,
- JSON.stringify(settingsData)
- )
- }
-
- const updatedSettings = settingsData
- ? performSettingsDataMigrations(settingsData)
- : settingsData
+ try {
+ if (E.isRight(loadResult)) {
+ const data = loadResult.right ?? getDefaultSettings()
+ const result = SETTINGS_SCHEMA.safeParse(data)
- if (updatedSettings) {
- bulkApplySettings(updatedSettings)
+ if (result.success) {
+ const migratedSettings = performSettingsDataMigrations(result.data)
+ bulkApplySettings(migratedSettings)
+ } else {
+ this.showErrorToast(STORE_KEYS.SETTINGS)
+ await Store.set(
+ STORE_NAMESPACE,
+ `${STORE_KEYS.SETTINGS}-backup`,
+ data
+ )
+ }
+ }
+ } catch (e) {
+ console.error(`Failed parsing persisted SETTINGS:`, loadResult)
}
- settingsStore.subject$.subscribe((settings) => {
- window.localStorage.setItem(settingsKey, JSON.stringify(settings))
+ settingsStore.subject$.subscribe(async (settings) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.SETTINGS, settings)
})
}
- private setupHistoryPersistence() {
- const restHistoryKey = "history"
- let restHistoryData = JSON.parse(
- window.localStorage.getItem(restHistoryKey) || "[]"
+ private async setupRESTHistoryPersistence() {
+ const restLoadResult = await Store.get<any>(
+ STORE_NAMESPACE,
+ STORE_KEYS.REST_HISTORY
)
- const graphqlHistoryKey = "graphqlHistory"
- let graphqlHistoryData = JSON.parse(
- window.localStorage.getItem(graphqlHistoryKey) || "[]"
- )
+ try {
+ if (E.isRight(restLoadResult)) {
+ const data = restLoadResult.right ?? []
+ const result = z.array(REST_HISTORY_ENTRY_SCHEMA).safeParse(data)
- // Validate data read from localStorage
- const restHistorySchemaParsedresult = z
- .array(REST_HISTORY_ENTRY_SCHEMA)
- .safeParse(restHistoryData)
-
- if (restHistorySchemaParsedresult.success) {
- restHistoryData = restHistorySchemaParsedresult.data
- } else {
- this.showErrorToast(restHistoryKey)
- window.localStorage.setItem(
- `${restHistoryKey}-backup`,
- JSON.stringify(restHistoryData)
- )
+ if (result.success) {
+ const translatedData = result.data.map(translateToNewRESTHistory)
+ setRESTHistoryEntries(translatedData)
+ } else {
+ this.showErrorToast(STORE_KEYS.REST_HISTORY)
+ await Store.set(
+ STORE_NAMESPACE,
+ `${STORE_KEYS.REST_HISTORY}-backup`,
+ data
+ )
+ }
+ }
+ } catch (e) {
+ console.error(`Failed parsing persisted REST_HISTORY:`, restLoadResult)
}
- const gqlHistorySchemaParsedresult = z
- .array(GQL_HISTORY_ENTRY_SCHEMA)
- .safeParse(graphqlHistoryData)
-
- if (gqlHistorySchemaParsedresult.success) {
- graphqlHistoryData = gqlHistorySchemaParsedresult.data
- } else {
- this.showErrorToast(graphqlHistoryKey)
- window.localStorage.setItem(
- `${graphqlHistoryKey}-backup`,
- JSON.stringify(graphqlHistoryData)
- )
- }
+ restHistoryStore.subject$.subscribe(async ({ state }) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.REST_HISTORY, state)
+ })
+ }
- const translatedRestHistoryData = restHistoryData.map(
- translateToNewRESTHistory
- )
- const translatedGraphqlHistoryData = graphqlHistoryData.map(
- translateToNewGQLHistory
+ private async setupGQLHistoryPersistence() {
+ const gqlLoadResult = await Store.get<any>(
+ STORE_NAMESPACE,
+ STORE_KEYS.GQL_HISTORY
)
- setRESTHistoryEntries(translatedRestHistoryData)
- setGraphqlHistoryEntries(translatedGraphqlHistoryData)
+ try {
+ if (E.isRight(gqlLoadResult)) {
+ const data = gqlLoadResult.right ?? []
+ const result = z.array(GQL_HISTORY_ENTRY_SCHEMA).safeParse(data)
- restHistoryStore.subject$.subscribe(({ state }) => {
- window.localStorage.setItem(restHistoryKey, JSON.stringify(state))
- })
+ if (result.success) {
+ const translatedData = result.data.map(translateToNewGQLHistory)
+ setGraphqlHistoryEntries(translatedData)
+ } else {
+ this.showErrorToast(STORE_KEYS.GQL_HISTORY)
+ await Store.set(
+ STORE_NAMESPACE,
+ `${STORE_KEYS.GQL_HISTORY}-backup`,
+ data
+ )
+ }
+ }
+ } catch (e) {
+ console.error(`Failed parsing persisted GQL_HISTORY:`, gqlLoadResult)
+ }
- graphqlHistoryStore.subject$.subscribe(({ state }) => {
- window.localStorage.setItem(graphqlHistoryKey, JSON.stringify(state))
+ graphqlHistoryStore.subject$.subscribe(async ({ state }) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.GQL_HISTORY, state)
})
}
- private setupCollectionsPersistence() {
- const restCollectionsKey = "collections"
- let restCollectionsData = JSON.parse(
- window.localStorage.getItem(restCollectionsKey) || "[]"
+ private async setupRESTCollectionsPersistence() {
+ const restLoadResult = await Store.get<any>(
+ STORE_NAMESPACE,
+ STORE_KEYS.REST_COLLECTIONS
)
- const graphqlCollectionsKey = "collectionsGraphql"
- let graphqlCollectionsData = JSON.parse(
- window.localStorage.getItem(graphqlCollectionsKey) || "[]"
- )
+ try {
+ if (E.isRight(restLoadResult)) {
+ const data = restLoadResult.right ?? []
+ const result = z.array(REST_COLLECTION_SCHEMA).safeParse(data)
- // Validate data read from localStorage
- const restCollectionsSchemaParsedresult = z
- .array(REST_COLLECTION_SCHEMA)
- .safeParse(restCollectionsData)
-
- if (restCollectionsSchemaParsedresult.success) {
- restCollectionsData = restCollectionsSchemaParsedresult.data
- } else {
- this.showErrorToast(restCollectionsKey)
- window.localStorage.setItem(
- `${restCollectionsKey}-backup`,
- JSON.stringify(restCollectionsData)
+ if (result.success) {
+ const translatedData = result.data.map(translateToNewRESTCollection)
+ setRESTCollections(translatedData)
+ } else {
+ this.showErrorToast(STORE_KEYS.REST_COLLECTIONS)
+ await Store.set(
+ STORE_NAMESPACE,
+ `${STORE_KEYS.REST_COLLECTIONS}-backup`,
+ data
+ )
+ // NOTE: Still loading data to match legacy behavior
+ setRESTCollections(data)
+ }
+ }
+ } catch (e) {
+ console.error(
+ `Failed parsing persisted REST_COLLECTIONS:`,
+ restLoadResult
)
}
- const gqlCollectionsSchemaParsedresult = z
- .array(GQL_COLLECTION_SCHEMA)
- .safeParse(graphqlCollectionsData)
-
- if (gqlCollectionsSchemaParsedresult.success) {
- graphqlCollectionsData = gqlCollectionsSchemaParsedresult.data
- } else {
- this.showErrorToast(graphqlCollectionsKey)
- window.localStorage.setItem(
- `${graphqlCollectionsKey}-backup`,
- JSON.stringify(graphqlCollectionsData)
- )
- }
+ restCollectionStore.subject$.subscribe(async ({ state }) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.REST_COLLECTIONS, state)
+ })
+ }
- const translatedRestCollectionsData = restCollectionsData.map(
- translateToNewRESTCollection
- )
- const translatedGraphqlCollectionsData = graphqlCollectionsData.map(
- translateToNewGQLCollection
+ private async setupGQLCollectionsPersistence() {
+ const gqlLoadResult = await Store.get<any>(
+ STORE_NAMESPACE,
+ STORE_KEYS.GQL_COLLECTIONS
)
- setRESTCollections(translatedRestCollectionsData)
- setGraphqlCollections(translatedGraphqlCollectionsData)
+ try {
+ if (E.isRight(gqlLoadResult)) {
+ const data = gqlLoadResult.right ?? []
+ const result = z.array(GQL_COLLECTION_SCHEMA).safeParse(data)
- restCollectionStore.subject$.subscribe(({ state }) => {
- window.localStorage.setItem(restCollectionsKey, JSON.stringify(state))
- })
+ if (result.success) {
+ const translatedData = result.data.map(translateToNewGQLCollection)
+ setGraphqlCollections(translatedData)
+ } else {
+ this.showErrorToast(STORE_KEYS.GQL_COLLECTIONS)
+ await Store.set(
+ STORE_NAMESPACE,
+ `${STORE_KEYS.GQL_COLLECTIONS}-backup`,
+ data
+ )
+ // NOTE: Still loading data to match legacy behavior
+ setGraphqlCollections(data)
+ }
+ }
+ } catch (e) {
+ console.error(`Failed parsing persisted GQL_COLLECTIONS:`, gqlLoadResult)
+ }
- graphqlCollectionStore.subject$.subscribe(({ state }) => {
- window.localStorage.setItem(graphqlCollectionsKey, JSON.stringify(state))
+ graphqlCollectionStore.subject$.subscribe(async ({ state }) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.GQL_COLLECTIONS, state)
})
}
- private setupEnvironmentsPersistence() {
- const environmentsKey = "environments"
- let environmentsData: Environment[] = JSON.parse(
- window.localStorage.getItem(environmentsKey) || "[]"
+ private async setupEnvironmentsPersistence() {
+ const loadResult = await Store.get<any>(
+ STORE_NAMESPACE,
+ STORE_KEYS.ENVIRONMENTS
)
- // Validate data read from localStorage
- const result = ENVIRONMENTS_SCHEMA.safeParse(environmentsData)
- if (result.success) {
- environmentsData = result.data
- } else {
- this.showErrorToast(environmentsKey)
- window.localStorage.setItem(
- `${environmentsKey}-backup`,
- JSON.stringify(environmentsData)
- )
- }
-
- // Check if a global env is defined and if so move that to globals
- const globalIndex = environmentsData.findIndex(
- (x) => x.name.toLowerCase() === "globals"
- )
+ try {
+ if (E.isRight(loadResult)) {
+ const data = loadResult.right ?? []
+ const result = ENVIRONMENTS_SCHEMA.safeParse(data)
- if (globalIndex !== -1) {
- const globalEnv = environmentsData[globalIndex]
- globalEnv.variables.forEach((variable: GlobalEnvironmentVariable) =>
- addGlobalEnvVariable(variable)
- )
+ if (result.success) {
+ // Check for and handle globals
+ const globalIndex = result.data.findIndex(
+ (x) => x.name.toLowerCase() === "globals"
+ )
- // Remove global from environments
- environmentsData.splice(globalIndex, 1)
+ if (globalIndex !== -1) {
+ const globalEnv = result.data[globalIndex]
+ globalEnv.variables.forEach((variable: GlobalEnvironmentVariable) =>
+ addGlobalEnvVariable(variable)
+ )
+ result.data.splice(globalIndex, 1)
+ }
- // Just sync the changes manually
- window.localStorage.setItem(
- environmentsKey,
- JSON.stringify(environmentsData)
- )
+ replaceEnvironments(result.data)
+ } else {
+ this.showErrorToast(STORE_KEYS.ENVIRONMENTS)
+ await Store.set(
+ STORE_NAMESPACE,
+ `${STORE_KEYS.ENVIRONMENTS}-backup`,
+ data
+ )
+ }
+ }
+ } catch (e) {
+ console.error(`Failed parsing persisted ENVIRONMENTS:`, loadResult)
}
- replaceEnvironments(environmentsData)
-
- environments$.subscribe((envs) => {
- window.localStorage.setItem(environmentsKey, JSON.stringify(envs))
+ environments$.subscribe(async (envs) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.ENVIRONMENTS, envs)
})
}
- private setupSecretEnvironmentsPersistence() {
- const secretEnvironmentsKey = "secretEnvironments"
- const secretEnvironmentsData = window.localStorage.getItem(
- secretEnvironmentsKey
+ private async setupSecretEnvironmentsPersistence() {
+ const loadResult = await Store.get<any>(
+ STORE_NAMESPACE,
+ STORE_KEYS.SECRET_ENVIRONMENTS
)
try {
- if (secretEnvironmentsData) {
- let parsedSecretEnvironmentsData = JSON.parse(secretEnvironmentsData)
-
- // Validate data read from localStorage
+ if (E.isRight(loadResult) && loadResult.right) {
const result = SECRET_ENVIRONMENT_VARIABLE_SCHEMA.safeParse(
- parsedSecretEnvironmentsData
+ loadResult.right
)
if (result.success) {
- parsedSecretEnvironmentsData = result.data
+ this.secretEnvironmentService.loadSecretEnvironmentsFromPersistedState(
+ result.data
+ )
} else {
- this.showErrorToast(secretEnvironmentsKey)
- window.localStorage.setItem(
- `${secretEnvironmentsKey}-backup`,
- JSON.stringify(parsedSecretEnvironmentsData)
+ this.showErrorToast(STORE_KEYS.SECRET_ENVIRONMENTS)
+ await Store.set(
+ STORE_NAMESPACE,
+ `${STORE_KEYS.SECRET_ENVIRONMENTS}-backup`,
+ loadResult.right
+ )
+ console.error(
+ `Failed parsing persisted SECRET_ENVIRONMENTS:`,
+ JSON.stringify(loadResult.right)
)
}
-
- this.secretEnvironmentService.loadSecretEnvironmentsFromPersistedState(
- parsedSecretEnvironmentsData
- )
}
} catch (e) {
- console.error(
- `Failed parsing persisted secret environment, state:`,
- secretEnvironmentsData
- )
+ console.error(`Failed parsing persisted SECRET_ENVIRONMENTS:`, loadResult)
}
watchDebounced(
this.secretEnvironmentService.persistableSecretEnvironments,
- (newSecretEnvironment) => {
- window.localStorage.setItem(
- secretEnvironmentsKey,
- JSON.stringify(newSecretEnvironment)
+ async (newData: Record<string, SecretVariable[]>) => {
+ await Store.set(
+ STORE_NAMESPACE,
+ STORE_KEYS.SECRET_ENVIRONMENTS,
+ newData
)
},
- {
- debounce: 500,
- }
+ { debounce: 500 }
)
}
- private setupSelectedEnvPersistence() {
- const selectedEnvIndexKey = "selectedEnvIndex"
- let selectedEnvIndexValue = JSON.parse(
- window.localStorage.getItem(selectedEnvIndexKey) ?? "null"
+ private async setupSelectedEnvPersistence() {
+ const loadResult = await Store.get<any>(
+ STORE_NAMESPACE,
+ STORE_KEYS.SELECTED_ENV
)
- // Validate data read from localStorage
- const result = SELECTED_ENV_INDEX_SCHEMA.safeParse(selectedEnvIndexValue)
- if (result.success) {
- selectedEnvIndexValue = result.data
- } else {
- this.showErrorToast(selectedEnvIndexKey)
- window.localStorage.setItem(
- `${selectedEnvIndexKey}-backup`,
- JSON.stringify(selectedEnvIndexValue)
- )
- }
+ try {
+ if (E.isRight(loadResult)) {
+ const data = loadResult.right ?? { type: "NO_ENV_SELECTED" as const }
+ const result = SELECTED_ENV_INDEX_SCHEMA.safeParse(data)
- // If there is a selected env index, set it to the store else set it to null
- if (selectedEnvIndexValue) {
- setSelectedEnvironmentIndex(selectedEnvIndexValue)
- } else {
- setSelectedEnvironmentIndex({
- type: "NO_ENV_SELECTED",
- })
+ if (result.success) {
+ if (result.data !== null) {
+ setSelectedEnvironmentIndex(result.data)
+ } else {
+ setSelectedEnvironmentIndex({ type: "NO_ENV_SELECTED" })
+ }
+ } else {
+ this.showErrorToast(STORE_KEYS.SELECTED_ENV)
+ await Store.set(
+ STORE_NAMESPACE,
+ `${STORE_KEYS.SELECTED_ENV}-backup`,
+ data
+ )
+ }
+ }
+ } catch (e) {
+ console.error(`Failed parsing persisted SELECTED_ENV:`, loadResult)
}
- selectedEnvironmentIndex$.subscribe((envIndex) => {
- window.localStorage.setItem(selectedEnvIndexKey, JSON.stringify(envIndex))
+ selectedEnvironmentIndex$.subscribe(async (index) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.SELECTED_ENV, index)
})
}
- private setupWebsocketPersistence() {
- const wsRequestKey = "WebsocketRequest"
- let wsRequestData = JSON.parse(
- window.localStorage.getItem(wsRequestKey) || "null"
+ private async setupWebsocketPersistence() {
+ const loadResult = await Store.get<any>(
+ STORE_NAMESPACE,
+ STORE_KEYS.WEBSOCKET
)
- // Validate data read from localStorage
- const result = WEBSOCKET_REQUEST_SCHEMA.safeParse(wsRequestData)
- if (result.success) {
- wsRequestData = result.data
- } else {
- this.showErrorToast(wsRequestKey)
- window.localStorage.setItem(
- `${wsRequestKey}-backup`,
- JSON.stringify(wsRequestData)
- )
+ try {
+ if (E.isRight(loadResult)) {
+ const data = loadResult.right
+ if (data) {
+ const result = WEBSOCKET_REQUEST_SCHEMA.safeParse(data)
+
+ if (result.success) {
+ if (result.data !== null) {
+ setWSRequest(result.data)
+ } else {
+ setWSRequest(undefined)
+ }
+ } else {
+ this.showErrorToast(STORE_KEYS.WEBSOCKET)
+ await Store.set(
+ STORE_NAMESPACE,
+ `${STORE_KEYS.WEBSOCKET}-backup`,
+ data
+ )
+ }
+ }
+ }
+ } catch (e) {
+ console.error(`Failed parsing persisted WEBSOCKET:`, loadResult)
}
- setWSRequest(wsRequestData)
-
- WSRequest$.subscribe((req) => {
- window.localStorage.setItem(wsRequestKey, JSON.stringify(req))
+ WSRequest$.subscribe(async (req) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.WEBSOCKET, req)
})
}
- private setupSocketIOPersistence() {
- const sioRequestKey = "SocketIORequest"
- let sioRequestData = JSON.parse(
- window.localStorage.getItem(sioRequestKey) || "null"
+ private async setupSocketIOPersistence() {
+ const loadResult = await Store.get<any>(
+ STORE_NAMESPACE,
+ STORE_KEYS.SOCKETIO
)
- // Validate data read from localStorage
- const result = SOCKET_IO_REQUEST_SCHEMA.safeParse(sioRequestData)
- if (result.success) {
- sioRequestData = result.data
- } else {
- this.showErrorToast(sioRequestKey)
- window.localStorage.setItem(
- `${sioRequestKey}-backup`,
- JSON.stringify(sioRequestData)
- )
+ try {
+ if (E.isRight(loadResult)) {
+ const data = loadResult.right
+ if (data) {
+ const result = SOCKET_IO_REQUEST_SCHEMA.safeParse(data)
+
+ if (result.success) {
+ if (result.data !== null) {
+ setSIORequest(result.data)
+ } else {
+ setSIORequest(undefined)
+ }
+ } else {
+ this.showErrorToast(STORE_KEYS.SOCKETIO)
+ await Store.set(
+ STORE_NAMESPACE,
+ `${STORE_KEYS.SOCKETIO}-backup`,
+ data
+ )
+ }
+ }
+ }
+ } catch (e) {
+ console.error(`Failed parsing persisted SOCKETIO:`, loadResult)
}
- setSIORequest(sioRequestData)
-
- SIORequest$.subscribe((req) => {
- window.localStorage.setItem(sioRequestKey, JSON.stringify(req))
+ SIORequest$.subscribe(async (req) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.SOCKETIO, req)
})
}
- private setupSSEPersistence() {
- const sseRequestKey = "SSERequest"
- let sseRequestData = JSON.parse(
- window.localStorage.getItem(sseRequestKey) || "null"
- )
+ private async setupSSEPersistence() {
+ const loadResult = await Store.get<any>(STORE_NAMESPACE, STORE_KEYS.SSE)
- // Validate data read from localStorage
- const result = SSE_REQUEST_SCHEMA.safeParse(sseRequestData)
- if (result.success) {
- sseRequestData = result.data
- } else {
- this.showErrorToast(sseRequestKey)
- window.localStorage.setItem(
- `${sseRequestKey}-backup`,
- JSON.stringify(sseRequestData)
- )
+ try {
+ if (E.isRight(loadResult)) {
+ const data = loadResult.right
+ if (data) {
+ const result = SSE_REQUEST_SCHEMA.safeParse(data)
+
+ if (result.success) {
+ if (result.data !== null) {
+ setSSERequest(result.data)
+ } else {
+ setSSERequest(undefined)
+ }
+ } else {
+ this.showErrorToast(STORE_KEYS.SSE)
+ await Store.set(STORE_NAMESPACE, `${STORE_KEYS.SSE}-backup`, data)
+ }
+ }
+ }
+ } catch (e) {
+ console.error(`Failed parsing persisted SSE:`, loadResult)
}
- setSSERequest(sseRequestData)
-
- SSERequest$.subscribe((req) => {
- window.localStorage.setItem(sseRequestKey, JSON.stringify(req))
+ SSERequest$.subscribe(async (req) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.SSE, req)
})
}
- private setupMQTTPersistence() {
- const mqttRequestKey = "MQTTRequest"
- let mqttRequestData = JSON.parse(
- window.localStorage.getItem(mqttRequestKey) || "null"
- )
+ private async setupMQTTPersistence() {
+ const loadResult = await Store.get<any>(STORE_NAMESPACE, STORE_KEYS.MQTT)
- // Validate data read from localStorage
- const result = MQTT_REQUEST_SCHEMA.safeParse(mqttRequestData)
- if (result.success) {
- mqttRequestData = result.data
- } else {
- this.showErrorToast(mqttRequestKey)
- window.localStorage.setItem(
- `${mqttRequestKey}-backup`,
- JSON.stringify(mqttRequestData)
- )
+ try {
+ if (E.isRight(loadResult)) {
+ const data = loadResult.right
+ if (data) {
+ const result = MQTT_REQUEST_SCHEMA.safeParse(data)
+
+ if (result.success) {
+ if (result.data !== null) {
+ setMQTTRequest(result.data)
+ } else {
+ setMQTTRequest(undefined)
+ }
+ } else {
+ this.showErrorToast(STORE_KEYS.MQTT)
+ await Store.set(STORE_NAMESPACE, `${STORE_KEYS.MQTT}-backup`, data)
+ }
+ }
+ }
+ } catch (e) {
+ console.error(`Failed parsing persisted MQTT:`, loadResult)
}
- setMQTTRequest(mqttRequestData)
-
- MQTTRequest$.subscribe((req) => {
- window.localStorage.setItem(mqttRequestKey, JSON.stringify(req))
+ MQTTRequest$.subscribe(async (req) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.MQTT, req)
})
}
- private setupGlobalEnvsPersistence() {
- const globalEnvKey = "globalEnv"
- let globalEnvData: GlobalEnvironment = JSON.parse(
- window.localStorage.getItem(globalEnvKey) || "[]"
+ private async setupGlobalEnvsPersistence() {
+ const loadResult = await Store.get<any>(
+ STORE_NAMESPACE,
+ STORE_KEYS.GLOBAL_ENV
)
- // Validate data read from localStorage
- const result = GlobalEnvironment.safeParse(globalEnvData)
- if (result.type === "ok") {
- globalEnvData = result.value
- } else {
- this.showErrorToast(globalEnvKey)
- window.localStorage.setItem(
- `${globalEnvKey}-backup`,
- JSON.stringify(globalEnvData)
- )
- }
+ try {
+ if (E.isRight(loadResult)) {
+ const data = loadResult.right ?? []
+ const result = GLOBAL_ENVIRONMENT_SCHEMA.safeParse(data)
- setGlobalEnvVariables(globalEnvData)
+ if (result.success) {
+ setGlobalEnvVariables(result.data)
+ } else {
+ this.showErrorToast(STORE_KEYS.GLOBAL_ENV)
+ await Store.set(
+ STORE_NAMESPACE,
+ `${STORE_KEYS.GLOBAL_ENV}-backup`,
+ data
+ )
+ }
+ }
+ } catch (e) {
+ console.error(`Failed parsing persisted GLOBAL_ENV:`, loadResult)
+ }
- globalEnv$.subscribe((vars) => {
- window.localStorage.setItem(globalEnvKey, JSON.stringify(vars))
+ globalEnv$.subscribe(async (vars) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.GLOBAL_ENV, vars)
})
}
- private setupGQLTabsPersistence() {
- const gqlTabStateKey = "gqlTabState"
- const gqlTabStateData = window.localStorage.getItem(gqlTabStateKey)
+ private async setupRESTTabsPersistence() {
+ const loadResult = await Store.get<any>(
+ STORE_NAMESPACE,
+ STORE_KEYS.REST_TABS
+ )
try {
- if (gqlTabStateData) {
- let parsedGqlTabStateData = JSON.parse(gqlTabStateData)
-
- // Validate data read from localStorage
- const result = GQL_TAB_STATE_SCHEMA.safeParse(parsedGqlTabStateData)
+ if (E.isRight(loadResult) && loadResult.right) {
+ const result = REST_TAB_STATE_SCHEMA.safeParse(loadResult.right)
if (result.success) {
- parsedGqlTabStateData = result.data
+ // SAFETY: We know the schema matches
+ this.restTabService.loadTabsFromPersistedState(
+ result.data as PersistableTabState<HoppTabDocument>
+ )
} else {
- this.showErrorToast(gqlTabStateKey)
- window.localStorage.setItem(
- `${gqlTabStateKey}-backup`,
- JSON.stringify(parsedGqlTabStateData)
+ this.showErrorToast(STORE_KEYS.REST_TABS)
+ await Store.set(
+ STORE_NAMESPACE,
+ `${STORE_KEYS.REST_TABS}-backup`,
+ loadResult.right
)
+ console.error(
+ `Failed parsing persisted REST_TABS:`,
+ JSON.stringify(loadResult.right)
+ )
+ // NOTE: Still loading data to match legacy behavior
+ this.restTabService.loadTabsFromPersistedState(loadResult.right)
}
-
- this.gqlTabService.loadTabsFromPersistedState(parsedGqlTabStateData)
}
} catch (e) {
- console.error(
- `Failed parsing persisted tab state, state:`,
- gqlTabStateData
- )
+ console.error(`Failed parsing persisted REST_TABS:`, loadResult)
}
watchDebounced(
- this.gqlTabService.persistableTabState,
- (newGqlTabStateData) => {
- window.localStorage.setItem(
- gqlTabStateKey,
- JSON.stringify(newGqlTabStateData)
- )
+ this.restTabService.persistableTabState,
+ async (newData) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.REST_TABS, newData)
},
{ debounce: 500, deep: true }
)
}
- private setupRESTTabsPersistence() {
- const restTabStateKey = "restTabState"
- const restTabStateData = window.localStorage.getItem(restTabStateKey)
+ private async setupGQLTabsPersistence() {
+ const loadResult = await Store.get<any>(
+ STORE_NAMESPACE,
+ STORE_KEYS.GQL_TABS
+ )
try {
- if (restTabStateData) {
- let parsedRESTTabStateData = JSON.parse(restTabStateData)
-
- // Validate data read from localStorage
- const result = REST_TAB_STATE_SCHEMA.safeParse(parsedRESTTabStateData)
+ if (E.isRight(loadResult) && loadResult.right) {
+ const result = GQL_TAB_STATE_SCHEMA.safeParse(loadResult.right)
if (result.success) {
- parsedRESTTabStateData = result.data
+ // SAFETY: We know the schema matches
+ this.gqlTabService.loadTabsFromPersistedState(
+ result.data as PersistableTabState<HoppGQLDocument>
+ )
} else {
- this.showErrorToast(restTabStateKey)
- window.localStorage.setItem(
- `${restTabStateKey}-backup`,
- JSON.stringify(parsedRESTTabStateData)
+ this.showErrorToast(STORE_KEYS.GQL_TABS)
+ await Store.set(
+ STORE_NAMESPACE,
+ `${STORE_KEYS.GQL_TABS}-backup`,
+ loadResult.right
)
+ console.error(
+ `Failed parsing persisted GQL_TABS:`,
+ JSON.stringify(loadResult.right)
+ )
+ // NOTE: Still loading data to match legacy behavior
+ this.gqlTabService.loadTabsFromPersistedState(loadResult.right)
}
-
- this.restTabService.loadTabsFromPersistedState(parsedRESTTabStateData)
}
} catch (e) {
- console.error(
- `Failed parsing persisted tab state, state:`,
- restTabStateData
- )
+ console.error(`Failed parsing persisted GQL_TABS:`, loadResult)
}
watchDebounced(
- this.restTabService.persistableTabState,
- (newRestTabStateData) => {
- window.localStorage.setItem(
- restTabStateKey,
- JSON.stringify(newRestTabStateData)
- )
+ this.gqlTabService.persistableTabState,
+ async (newData) => {
+ await Store.set(STORE_NAMESPACE, STORE_KEYS.GQL_TABS, newData)
},
{ debounce: 500, deep: true }
)
}
- public setupLocalPersistence() {
- this.checkAndMigrateOldSettings()
-
- this.setupLocalStatePersistence()
- this.setupSettingsPersistence()
- this.setupRESTTabsPersistence()
-
- this.setupGQLTabsPersistence()
-
- this.setupHistoryPersistence()
- this.setupCollectionsPersistence()
- this.setupGlobalEnvsPersistence()
- this.setupEnvironmentsPersistence()
- this.setupSelectedEnvPersistence()
- this.setupWebsocketPersistence()
- this.setupSocketIOPersistence()
- this.setupSSEPersistence()
- this.setupMQTTPersistence()
+ public async setupFirst() {
+ await this.init()
+ await this.runMigrations()
+ await this.checkAndMigrateOldSettings()
+ }
- this.setupSecretEnvironmentsPersistence()
+ public async setupLater() {
+ await Promise.all([
+ this.setupLocalStatePersistence(),
+
+ this.setupSettingsPersistence(),
+ this.setupRESTHistoryPersistence(),
+ this.setupGQLHistoryPersistence(),
+ this.setupRESTCollectionsPersistence(),
+ this.setupGQLCollectionsPersistence(),
+
+ this.setupEnvironmentsPersistence(),
+ this.setupGlobalEnvsPersistence(),
+ this.setupSelectedEnvPersistence(),
+
+ this.setupWebsocketPersistence(),
+ this.setupSocketIOPersistence(),
+ this.setupSSEPersistence(),
+ this.setupMQTTPersistence(),
+ this.setupRESTTabsPersistence(),
+ this.setupGQLTabsPersistence(),
+
+ this.setupSecretEnvironmentsPersistence(),
+ ])
}
/**
- * Gets a value from localStorage
- *
- * NOTE: Use localStorage to only store non-reactive simple data
- * For more complex data, use stores and connect it to `PersistenceService`
+ * Gets a value from persistence
*/
- public getLocalConfig(name: string) {
- return window.localStorage.getItem(name)
+ public async getLocalConfig(
+ name: string
+ ): Promise<string | null | undefined> {
+ const result = await Store.get<string>(STORE_NAMESPACE, name)
+ if (E.isRight(result)) {
+ return result.right
+ }
+ return null
}
/**
- * Sets a value in localStorage
- *
- * NOTE: Use localStorage to only store non-reactive simple data
- * For more complex data, use stores and connect it to `PersistenceService`
+ * Sets a value in persistence
*/
- public setLocalConfig(key: string, value: string) {
- window.localStorage.setItem(key, value)
+ public async setLocalConfig(key: string, value: string): Promise<void> {
+ await Store.set(STORE_NAMESPACE, key, value)
}
/**
- * Clear config value in localStorage
+ * Clear config value from persistence
*/
- public removeLocalConfig(key: string) {
- window.localStorage.removeItem(key)
+ public async removeLocalConfig(key: string): Promise<void> {
+ await Store.remove(STORE_NAMESPACE, key)
}
}
diff --git a/packages/hoppscotch-common/src/services/persistence/validation-schemas/index.ts b/packages/hoppscotch-common/src/services/persistence/validation-schemas/index.ts
index 6a9e13824..8d4aa8819 100644
--- a/packages/hoppscotch-common/src/services/persistence/validation-schemas/index.ts
+++ b/packages/hoppscotch-common/src/services/persistence/validation-schemas/index.ts
@@ -8,6 +8,7 @@ import {
HoppRESTHeaders,
HoppRESTRequestResponse,
HoppCollection,
+ GlobalEnvironment,
} from "@hoppscotch/data"
import { entityReference } from "verzod"
import { z } from "zod"
@@ -35,6 +36,7 @@ const SettingsDefSchema = z.object({
syncEnvironments: z.boolean(),
PROXY_URL: z.string(),
CURRENT_INTERCEPTOR_ID: z.string(),
+ CURRENT_KERNEL_INTERCEPTOR_ID: z.string(),
URL_EXCLUDES: z.object({
auth: z.boolean(),
httpUser: z.boolean(),
@@ -155,6 +157,8 @@ export const GQL_COLLECTION_SCHEMA = HoppGQLCollectionSchema
export const ENVIRONMENTS_SCHEMA = z.array(entityReference(Environment))
+export const GLOBAL_ENVIRONMENT_SCHEMA = entityReference(GlobalEnvironment)
+
export const SELECTED_ENV_INDEX_SCHEMA = z.nullable(
z.discriminatedUnion("type", [
z
diff --git a/packages/hoppscotch-common/src/services/spotlight/searchers/general.searcher.ts b/packages/hoppscotch-common/src/services/spotlight/searchers/general.searcher.ts
index a6c298a04..6369e6729 100644
--- a/packages/hoppscotch-common/src/services/spotlight/searchers/general.searcher.ts
+++ b/packages/hoppscotch-common/src/services/spotlight/searchers/general.searcher.ts
@@ -118,7 +118,7 @@ export class GeneralSpotlightSearcherService extends StaticSpotlightSearcherServ
}
private openURL(url: string) {
- platform.io.openExternalLink(url)
+ platform.kernelIO.openExternalLink(url)
}
public onDocSelected(id: string): void {
diff --git a/packages/hoppscotch-common/src/services/spotlight/searchers/kernel-interceptor.searcher.ts b/packages/hoppscotch-common/src/services/spotlight/searchers/kernel-interceptor.searcher.ts
new file mode 100644
index 000000000..24f08ed33
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/spotlight/searchers/kernel-interceptor.searcher.ts
@@ -0,0 +1,123 @@
+import { Ref, computed, effectScope, markRaw, ref, unref, watch } from "vue"
+import { getI18n } from "~/modules/i18n"
+import {
+ SpotlightSearcher,
+ SpotlightSearcherResult,
+ SpotlightSearcherSessionState,
+ SpotlightService,
+} from ".."
+
+import { Service } from "dioc"
+import MiniSearch from "minisearch"
+import IconCheckCircle from "~/components/app/spotlight/entry/IconSelected.vue"
+import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
+import IconCircle from "~icons/lucide/circle"
+
+/**
+ * This searcher is responsible for searching through the kernel-interceptor.
+ * And switching between them.
+ */
+export class KernelInterceptorSpotlightSearcherService
+ extends Service
+ implements SpotlightSearcher
+{
+ public static readonly ID = "KERNEL_INTERCEPTOR_SPOTLIGHT_SEARCHER_SERVICE"
+
+ private t = getI18n()
+
+ public searcherID = "kernel-interceptor"
+ public searcherSectionTitle = this.t("settings.interceptor")
+
+ private readonly spotlight = this.bind(SpotlightService)
+ private kernelInterceptorService = this.bind(KernelInterceptorService)
+
+ override onServiceInit() {
+ this.spotlight.registerSearcher(this)
+ }
+
+ createSearchSession(
+ query: Readonly<Ref<string>>
+ ): [Ref<SpotlightSearcherSessionState>, () => void] {
+ const loading = ref(false)
+ const results = ref<SpotlightSearcherResult[]>([])
+
+ const minisearch = new MiniSearch({
+ fields: ["name", "alternates"],
+ storeFields: ["name"],
+ })
+
+ const kernelInterceptorSelection = this.kernelInterceptorService.current
+
+ const kernelInterceptors = this.kernelInterceptorService.available
+
+ minisearch.addAll(
+ kernelInterceptors.value.map((entry) => {
+ const id =
+ entry.id === kernelInterceptorSelection.value?.id
+ ? `kernelInterceptor-${entry.id}-selected`
+ : `kernelInterceptor-${entry.id}`
+ const name = unref(entry.name(this.t))
+ const alternates = ["interceptor", "change", name]
+
+ return {
+ id,
+ name,
+ alternates,
+ }
+ })
+ )
+
+ const scopeHandle = effectScope()
+
+ scopeHandle.run(() => {
+ watch(
+ [query],
+ ([query]) => {
+ results.value = minisearch
+ .search(query, {
+ prefix: true,
+ fuzzy: true,
+ boost: {
+ reltime: 2,
+ },
+ weights: {
+ fuzzy: 0.2,
+ prefix: 0.8,
+ },
+ })
+ .map((x) => {
+ return {
+ id: x.id,
+ icon: markRaw(
+ x.id.endsWith("-selected") ? IconCheckCircle : IconCircle
+ ),
+ score: x.score,
+ text: {
+ type: "text",
+ text: [this.t("spotlight.section.interceptor"), x.name],
+ },
+ }
+ })
+ },
+ { immediate: true }
+ )
+ })
+
+ const onSessionEnd = () => {
+ scopeHandle.stop()
+ minisearch.removeAll()
+ }
+
+ const resultObj = computed<SpotlightSearcherSessionState>(() => ({
+ loading: loading.value,
+ results: results.value,
+ }))
+
+ return [resultObj, onSessionEnd]
+ }
+
+ onResultSelect(result: SpotlightSearcherResult): void {
+ const selectedInterceptor = result.id.split("-")[1]
+ this.kernelInterceptorService.setActive(selectedInterceptor)
+ }
+}
diff --git a/packages/hoppscotch-common/src/services/tab/graphql.ts b/packages/hoppscotch-common/src/services/tab/graphql.ts
index c88d619fe..5741ed099 100644
--- a/packages/hoppscotch-common/src/services/tab/graphql.ts
+++ b/packages/hoppscotch-common/src/services/tab/graphql.ts
@@ -4,6 +4,9 @@ import { HoppGQLDocument, HoppGQLSaveContext } from "~/helpers/graphql/document"
import { TabService } from "./tab"
import { computed } from "vue"
import { Container } from "dioc"
+import { getService } from "~/modules/dioc"
+import { PersistenceService } from "../persistence"
+import { PersistableTabState } from "."
export class GQLTabService extends TabService<HoppGQLDocument> {
public static readonly ID = "GQL_TAB_SERVICE"
@@ -41,6 +44,20 @@ export class GQLTabService extends TabService<HoppGQLDocument> {
}),
}))
+ protected async loadPersistedState(): Promise<PersistableTabState<HoppGQLDocument> | null> {
+ const persistenceService = getService(PersistenceService)
+ const savedState = await persistenceService.getLocalConfig("gqlTabs")
+
+ if (savedState) {
+ try {
+ return JSON.parse(savedState) as PersistableTabState<HoppGQLDocument>
+ } catch {
+ return null
+ }
+ }
+ return null
+ }
+
public getTabRefWithSaveContext(ctx: HoppGQLSaveContext) {
for (const tab of this.tabMap.values()) {
// For `team-collection` request id can be considered unique
diff --git a/packages/hoppscotch-common/src/services/tab/rest.ts b/packages/hoppscotch-common/src/services/tab/rest.ts
index f7bc9ce6f..1a4e62659 100644
--- a/packages/hoppscotch-common/src/services/tab/rest.ts
+++ b/packages/hoppscotch-common/src/services/tab/rest.ts
@@ -3,7 +3,10 @@ import { isEqual } from "lodash-es"
import { computed } from "vue"
import { getDefaultRESTRequest } from "~/helpers/rest/default"
import { HoppRESTSaveContext, HoppTabDocument } from "~/helpers/rest/document"
+import { getService } from "~/modules/dioc"
+import { PersistenceService } from "../persistence"
import { TabService } from "./tab"
+import { PersistableTabState } from "."
export class RESTTabService extends TabService<HoppTabDocument> {
public static readonly ID = "REST_TAB_SERVICE"
@@ -60,6 +63,20 @@ export class RESTTabService extends TabService<HoppTabDocument> {
}),
}))
+ protected async loadPersistedState(): Promise<PersistableTabState<HoppTabDocument> | null> {
+ const persistenceService = getService(PersistenceService)
+ const savedState = await persistenceService.getLocalConfig("restTabs")
+
+ if (savedState) {
+ try {
+ return JSON.parse(savedState) as PersistableTabState<HoppTabDocument>
+ } catch {
+ return null
+ }
+ }
+ return null
+ }
+
public getTabRefWithSaveContext(ctx: HoppRESTSaveContext) {
for (const tab of this.tabMap.values()) {
// For `team-collection` request id can be considered unique
diff --git a/packages/hoppscotch-common/src/services/tab/tab.ts b/packages/hoppscotch-common/src/services/tab/tab.ts
index 53da2a626..927336fb3 100644
--- a/packages/hoppscotch-common/src/services/tab/tab.ts
+++ b/packages/hoppscotch-common/src/services/tab/tab.ts
@@ -58,6 +58,15 @@ export abstract class TabService<Doc>
)
}
+ public async init() {
+ const persistedState = await this.loadPersistedState()
+ if (persistedState) {
+ this.loadTabsFromPersistedState(persistedState)
+ }
+ }
+
+ protected abstract loadPersistedState(): Promise<PersistableTabState<Doc> | null>
+
public createNewTab(document: Doc, switchToIt = true): HoppTab<Doc> {
const id = this.generateNewTabID()
diff --git a/packages/hoppscotch-common/src/types/kernel.d.ts b/packages/hoppscotch-common/src/types/kernel.d.ts
new file mode 100644
index 000000000..a4c43a340
--- /dev/null
+++ b/packages/hoppscotch-common/src/types/kernel.d.ts
@@ -0,0 +1,9 @@
+import type { KernelAPI } from "@hoppscotch/kernel"
+
+declare global {
+ interface Window {
+ __KERNEL__?: KernelAPI
+ }
+}
+
+export {}
diff --git a/packages/hoppscotch-common/tsconfig.json b/packages/hoppscotch-common/tsconfig.json
index 2e3b43005..d8f3afc52 100644
--- a/packages/hoppscotch-common/tsconfig.json
+++ b/packages/hoppscotch-common/tsconfig.json
@@ -29,7 +29,8 @@
"unplugin-fonts/client",
"vite-plugin-pages/client",
"vite-plugin-vue-layouts/client",
- "vite-plugin-pwa/client"
+ "vite-plugin-pwa/client",
+ "./src/types/kernel.d.ts"
]
},
"include": [
diff --git a/packages/hoppscotch-desktop/.gitignore b/packages/hoppscotch-desktop/.gitignore
new file mode 100644
index 000000000..e9280c27b
--- /dev/null
+++ b/packages/hoppscotch-desktop/.gitignore
@@ -0,0 +1,36 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+
+bundle.zip
+manifest.json
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
+# Devenv
+.devenv*
+devenv.local.nix
+
+# direnv
+.direnv
+
+# pre-commit
+.pre-commit-config.yaml
diff --git a/packages/hoppscotch-desktop/README.md b/packages/hoppscotch-desktop/README.md
new file mode 100644
index 000000000..569db34fd
--- /dev/null
+++ b/packages/hoppscotch-desktop/README.md
@@ -0,0 +1,9 @@
+# Hoppscotch Desktop App
+
+## Notes
+
+- Remember to `pnpm build` in `tauri-plugin-appload` before running the `pnpm tauri dev` server. Those exports needs to be built in `tauri-plugin-appload/dist-js` before they can be used.
+
+- Remember to build `hoppscotch-selfhost-web` with `HOPP_ALLOW_RUNTIME_ENV=true pnpm generate` to enable `import-meta-env` runtime env var injections into the built files.
+
+- Always check `build.rs` file in the plugin directory to make sure newly added commands are defined in the `COMMANDS` static str, these are used to generate permissions. This should regenerate `permissions` directory contents. Default permissions can be set with `default.toml` in the same directory.
diff --git a/packages/hoppscotch-desktop/crates/webapp-bundler/.gitignore b/packages/hoppscotch-desktop/crates/webapp-bundler/.gitignore
new file mode 100644
index 000000000..6cf4d6811
--- /dev/null
+++ b/packages/hoppscotch-desktop/crates/webapp-bundler/.gitignore
@@ -0,0 +1,21 @@
+# Devenv
+.devenv*
+devenv.local.nix
+
+# direnv
+.direnv
+
+# pre-commit
+.pre-commit-config.yaml
+
+/target/
+
+/gen/schemas
+
+.env
+
+bundles
+
+trust/
+
+site/
diff --git a/packages/hoppscotch-desktop/crates/webapp-bundler/Cargo.lock b/packages/hoppscotch-desktop/crates/webapp-bundler/Cargo.lock
new file mode 100644
index 000000000..ccfe9de6a
--- /dev/null
+++ b/packages/hoppscotch-desktop/crates/webapp-bundler/Cargo.lock
@@ -0,0 +1,1169 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "adler2"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
+
+[[package]]
+name = "aes"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
+dependencies = [
+ "cfg-if",
+ "cipher",
+ "cpufeatures",
+]
+
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "anstream"
+version = "0.6.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is_terminal_polyfill",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
+dependencies = [
+ "anstyle",
+ "once_cell",
+ "windows-sys",
+]
+
+[[package]]
+name = "arbitrary"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223"
+dependencies = [
+ "derive_arbitrary",
+]
+
+[[package]]
+name = "arrayref"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"
+
+[[package]]
+name = "arrayvec"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
+
+[[package]]
+name = "autocfg"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
+[[package]]
+name = "blake3"
+version = "1.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e"
+dependencies = [
+ "arrayref",
+ "arrayvec",
+ "cc",
+ "cfg-if",
+ "constant_time_eq",
+ "serde",
+]
+
+[[package]]
+name = "block-buffer"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "bzip2"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
+dependencies = [
+ "bzip2-sys",
+ "libc",
+]
+
+[[package]]
+name = "bzip2-sys"
+version = "0.1.11+1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+]
+
+[[package]]
+name = "cc"
+version = "1.2.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7777341816418c02e033934a09f20dc0ccaf65a5201ef8a450ae0105a573fda"
+dependencies = [
+ "jobserver",
+ "libc",
+ "shlex",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "chrono"
+version = "0.4.39"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "serde",
+ "wasm-bindgen",
+ "windows-targets",
+]
+
+[[package]]
+name = "cipher"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
+dependencies = [
+ "crypto-common",
+ "inout",
+]
+
+[[package]]
+name = "clap"
+version = "4.5.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3e77c3243bd94243c03672cb5154667347c457ca271254724f9f393aee1c05ff"
+dependencies = [
+ "clap_builder",
+ "clap_derive",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.5.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "clap_lex",
+ "strsim",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.5.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
+
+[[package]]
+name = "colorchoice"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
+
+[[package]]
+name = "constant_time_eq"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6"
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc"
+version = "3.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
+dependencies = [
+ "crc-catalog",
+]
+
+[[package]]
+name = "crc-catalog"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
+
+[[package]]
+name = "crc32fast"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
+dependencies = [
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "deflate64"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b"
+
+[[package]]
+name = "deranged"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+dependencies = [
+ "powerfmt",
+]
+
+[[package]]
+name = "derive_arbitrary"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+dependencies = [
+ "block-buffer",
+ "crypto-common",
+ "subtle",
+]
+
+[[package]]
+name = "displaydoc"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "either"
+version = "1.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
+
+[[package]]
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
+name = "flate2"
+version = "1.0.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.15.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
+
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "hmac"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
+dependencies = [
+ "digest",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.61"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows-core",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "indexmap"
+version = "2.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652"
+dependencies = [
+ "equivalent",
+ "hashbrown",
+]
+
+[[package]]
+name = "inout"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
+
+[[package]]
+name = "itoa"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
+
+[[package]]
+name = "jobserver"
+version = "0.1.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "js-sys"
+version = "0.3.77"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
+dependencies = [
+ "once_cell",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.169"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
+
+[[package]]
+name = "lockfree-object-pool"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e"
+
+[[package]]
+name = "log"
+version = "0.4.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
+
+[[package]]
+name = "lzma-rs"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e"
+dependencies = [
+ "byteorder",
+ "crc",
+]
+
+[[package]]
+name = "memchr"
+version = "2.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+
+[[package]]
+name = "mime"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
+
+[[package]]
+name = "mime_guess"
+version = "2.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
+dependencies = [
+ "mime",
+ "unicase",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924"
+dependencies = [
+ "adler2",
+]
+
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.20.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
+
+[[package]]
+name = "pbkdf2"
+version = "0.12.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
+dependencies = [
+ "digest",
+ "hmac",
+]
+
+[[package]]
+name = "pkg-config"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
+
+[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
+dependencies = [
+ "zerocopy",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.93"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.38"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom",
+]
+
+[[package]]
+name = "rayon"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
+dependencies = [
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
+dependencies = [
+ "crossbeam-deque",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
+
+[[package]]
+name = "ryu"
+version = "1.0.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.217"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.217"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.138"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949"
+dependencies = [
+ "itoa",
+ "memchr",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "sha1"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
+name = "simd-adler32"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
+
+[[package]]
+name = "strsim"
+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 = "syn"
+version = "2.0.98"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "time"
+version = "0.3.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21"
+dependencies = [
+ "deranged",
+ "num-conv",
+ "powerfmt",
+ "serde",
+ "time-core",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
+
+[[package]]
+name = "typenum"
+version = "1.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+
+[[package]]
+name = "unicase"
+version = "2.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034"
+
+[[package]]
+name = "utf8parse"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
+
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[package]]
+name = "walkdir"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "rustversion",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
+dependencies = [
+ "bumpalo",
+ "log",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "webapp-bundler"
+version = "0.1.0"
+dependencies = [
+ "base64",
+ "blake3",
+ "chrono",
+ "clap",
+ "mime_guess",
+ "rayon",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "walkdir",
+ "zip",
+ "zstd",
+]
+
+[[package]]
+name = "winapi-util"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.59.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "zerocopy"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
+dependencies = [
+ "byteorder",
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "zeroize"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
+dependencies = [
+ "zeroize_derive",
+]
+
+[[package]]
+name = "zeroize_derive"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "zip"
+version = "2.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45"
+dependencies = [
+ "aes",
+ "arbitrary",
+ "bzip2",
+ "constant_time_eq",
+ "crc32fast",
+ "crossbeam-utils",
+ "deflate64",
+ "displaydoc",
+ "flate2",
+ "hmac",
+ "indexmap",
+ "lzma-rs",
+ "memchr",
+ "pbkdf2",
+ "rand",
+ "sha1",
+ "thiserror",
+ "time",
+ "zeroize",
+ "zopfli",
+ "zstd",
+]
+
+[[package]]
+name = "zopfli"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946"
+dependencies = [
+ "bumpalo",
+ "crc32fast",
+ "lockfree-object-pool",
+ "log",
+ "once_cell",
+ "simd-adler32",
+]
+
+[[package]]
+name = "zstd"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9"
+dependencies = [
+ "zstd-safe",
+]
+
+[[package]]
+name = "zstd-safe"
+version = "7.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059"
+dependencies = [
+ "zstd-sys",
+]
+
+[[package]]
+name = "zstd-sys"
+version = "2.0.13+zstd.1.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa"
+dependencies = [
+ "cc",
+ "pkg-config",
+]
diff --git a/packages/hoppscotch-desktop/crates/webapp-bundler/Cargo.toml b/packages/hoppscotch-desktop/crates/webapp-bundler/Cargo.toml
new file mode 100644
index 000000000..5bd7685c9
--- /dev/null
+++ b/packages/hoppscotch-desktop/crates/webapp-bundler/Cargo.toml
@@ -0,0 +1,20 @@
+[package]
+name = "webapp-bundler"
+version = "0.1.0"
+authors = ["CuriousCorrelation"]
+edition = "2024"
+publish = false
+
+[dependencies]
+base64 = "0.22.1"
+blake3 = { version = "1.5.4", features = ["serde"] }
+chrono = { version = "0.4.39", features = ["serde"] }
+clap = { version = "4.5.28", features = ["derive"] }
+mime_guess = "2.0.5"
+rayon = "1.10.0"
+serde = { version = "1.0.215", features = ["derive"] }
+serde_json = "1.0.133"
+thiserror = "2.0.3"
+walkdir = "2.5.0"
+zip = "2.2.0"
+zstd = "0.13.2"
diff --git a/packages/hoppscotch-desktop/crates/webapp-bundler/src/main.rs b/packages/hoppscotch-desktop/crates/webapp-bundler/src/main.rs
new file mode 100644
index 000000000..05204fdb8
--- /dev/null
+++ b/packages/hoppscotch-desktop/crates/webapp-bundler/src/main.rs
@@ -0,0 +1,221 @@
+/// This is just `webapp-server`'s bundler part as a CLI
+use std::fs::File;
+use std::io::{Cursor, Write};
+use std::path::PathBuf;
+
+use clap::Parser;
+use rayon::prelude::*;
+use thiserror::Error;
+use walkdir::WalkDir;
+use zip::{ZipWriter, write::SimpleFileOptions};
+
+#[derive(Error, Debug)]
+pub enum BundlerError {
+ #[error("IO error: {0}")]
+ Io(#[from] std::io::Error),
+
+ #[error("ZIP error: {0}")]
+ Zip(#[from] zip::result::ZipError),
+
+ #[error("JSON error: {0}")]
+ Json(#[from] serde_json::Error),
+
+ #[error("Invalid path: {0}")]
+ InvalidPath(String),
+
+ #[error("Configuration error: {0}")]
+ Config(String),
+}
+
+type Result<T> = std::result::Result<T, BundlerError>;
+
+#[derive(Parser, Debug)]
+#[command(author, version, about = "Creates a bundle from a directory")]
+struct Args {
+ /// Path to the directory to bundle
+ #[arg(short, long)]
+ input: PathBuf,
+
+ /// Output path for the bundle
+ #[arg(short, long)]
+ output: PathBuf,
+
+ /// Path to save the manifest file (optional)
+ #[arg(short, long)]
+ manifest: Option<PathBuf>,
+
+ /// Custom version for the bundle (defaults to CLI tool version)
+ #[arg(short, long)]
+ version: Option<String>,
+}
+
+#[derive(serde::Serialize)]
+struct FileEntry {
+ path: String,
+ size: u64,
+ #[serde(with = "hash_serde")]
+ hash: blake3::Hash,
+ mime_type: Option<String>,
+}
+
+#[derive(serde::Serialize)]
+struct Manifest {
+ files: Vec<FileEntry>,
+ version: String,
+ created_at: chrono::DateTime<chrono::Utc>,
+}
+
+mod hash_serde {
+ use base64::{Engine, engine::general_purpose::STANDARD};
+ use serde::Serializer;
+
+ pub fn serialize<S>(hash: &blake3::Hash, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ serializer.serialize_str(&STANDARD.encode(hash.as_bytes()))
+ }
+}
+
+struct BundleBuilder {
+ writer: ZipWriter<Cursor<Vec<u8>>>,
+ files: Vec<FileEntry>,
+}
+
+impl BundleBuilder {
+ fn new<P: AsRef<std::path::Path>>(input_path: P) -> Result<Self> {
+ let input_path = input_path.as_ref();
+
+ if !input_path.exists() {
+ return Err(BundlerError::Config(format!(
+ "Input path {} does not exist",
+ input_path.display()
+ )));
+ }
+
+ struct FileInfo {
+ relative_path: String,
+ content: Vec<u8>,
+ hash: blake3::Hash,
+ size: u64,
+ mime_type: Option<String>,
+ }
+
+ let file_infos: Vec<FileInfo> = WalkDir::new(input_path)
+ .into_iter()
+ .filter_map(|entry| entry.ok())
+ .filter(|entry| entry.file_type().is_file())
+ .par_bridge()
+ .map(|entry| {
+ let path = entry.path();
+ let relative_path = path
+ .strip_prefix(input_path)
+ .unwrap()
+ .components()
+ .map(|comp| comp.as_os_str().to_string_lossy())
+ .collect::<Vec<_>>()
+ .join("/");
+
+ let content = std::fs::read(path).map_err(|e| {
+ BundlerError::Config(format!("Failed to read file {}: {}", path.display(), e))
+ })?;
+
+ let hash = blake3::hash(&content);
+ let size = content.len() as u64;
+
+ let mime_type = mime_guess::from_path(path)
+ .first()
+ .map(|mime| mime.to_string());
+
+ Ok(FileInfo {
+ relative_path,
+ content,
+ hash,
+ size,
+ mime_type,
+ })
+ })
+ .collect::<Result<Vec<_>>>()?;
+
+ let mut builder = Self {
+ writer: ZipWriter::new(Cursor::new(Vec::new())),
+ files: Vec::with_capacity(file_infos.len()),
+ };
+
+ for file_info in file_infos {
+ let options = SimpleFileOptions::default().unix_permissions(0o644);
+
+ builder
+ .writer
+ .start_file(&file_info.relative_path, options)
+ .map_err(|e| BundlerError::Config(format!("Failed to start file in zip: {}", e)))?;
+
+ builder
+ .writer
+ .write_all(&file_info.content)
+ .map_err(|e| BundlerError::Config(format!("Failed to write file to zip: {}", e)))?;
+
+ builder.files.push(FileEntry {
+ path: file_info.relative_path,
+ size: file_info.size,
+ hash: file_info.hash,
+ mime_type: file_info.mime_type,
+ });
+ }
+
+ Ok(builder)
+ }
+
+ fn finish(self) -> Result<(Vec<u8>, Vec<FileEntry>)> {
+ let writer = self
+ .writer
+ .finish()
+ .map_err(|e| BundlerError::Config(format!("Failed to finish zip archive: {}", e)))?;
+
+ Ok((writer.into_inner(), self.files))
+ }
+}
+
+fn main() -> Result<()> {
+ let args = Args::parse();
+
+ if !args.input.exists() {
+ return Err(BundlerError::InvalidPath(format!(
+ "Input path does not exist: {}",
+ args.input.display()
+ )));
+ }
+
+ println!("Creating bundle from directory: {}", args.input.display());
+
+ let builder = BundleBuilder::new(&args.input)?;
+ let (content, files) = builder.finish()?;
+
+ let version = args.version
+ .or_else(|| std::env::var("WEBAPP_BUNDLE_VERSION").ok())
+ .unwrap_or_else(|| env!("CARGO_PKG_VERSION").to_string());
+ println!("Using bundle version: {}", version);
+
+ let mut output_file = File::create(&args.output)?;
+ output_file.write_all(&content)?;
+ println!("Bundle written to: {}", args.output.display());
+
+ let manifest = Manifest {
+ files,
+ version,
+ created_at: chrono::Utc::now(),
+ };
+
+ if let Some(manifest_path) = args.manifest {
+ let manifest_json = serde_json::to_string_pretty(&manifest)?;
+ std::fs::write(manifest_path.clone(), manifest_json)?;
+ println!("Manifest written to: {}", manifest_path.display());
+ }
+
+ println!(
+ "Bundle created successfully with {} files",
+ manifest.files.len()
+ );
+
+ Ok(())
+}
diff --git a/packages/hoppscotch-desktop/index.html b/packages/hoppscotch-desktop/index.html
new file mode 100644
index 000000000..6baef1216
--- /dev/null
+++ b/packages/hoppscotch-desktop/index.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Hoppscotch Desktop App</title>
+ </head>
+
+ <body>
+ <div id="app"></div>
+ <script type="module" src="/src/main.ts"></script>
+ </body>
+</html>
diff --git a/packages/hoppscotch-desktop/package.json b/packages/hoppscotch-desktop/package.json
new file mode 100644
index 000000000..0d50168ab
--- /dev/null
+++ b/packages/hoppscotch-desktop/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "hoppscotch-desktop",
+ "private": true,
+ "version": "0.1.0",
+ "type": "module",
+ "scripts": {
+ "dev": "vite",
+ "build": "vue-tsc --noEmit && vite build",
+ "preview": "vite preview",
+ "tauri": "tauri",
+ "dev:full": "(cd ../hoppscotch-selfhost-web && pnpm install && pnpm generate) && (cd crates/webapp-bundler && cargo build --release && cd target/release && ./webapp-bundler --input ../../../../../hoppscotch-selfhost-web/dist --output ../../../../bundle.zip --manifest ../../../../manifest.json) && (cd src-tauri && pnpm tauri dev)",
+ "build:full": "(cd ../hoppscotch-selfhost-web && pnpm install && pnpm generate) && (cd crates/webapp-bundler && cargo build --release && cd target/release && ./webapp-bundler --input ../../../../../hoppscotch-selfhost-web/dist --output ../../../../bundle.zip --manifest ../../../../manifest.json) && (cd src-tauri && pnpm tauri build)"
+ },
+ "dependencies": {
+ "@fontsource-variable/inter": "5.1.0",
+ "@fontsource-variable/material-symbols-rounded": "5.1.3",
+ "@fontsource-variable/roboto-mono": "5.1.0",
+ "@hoppscotch/kernel": "workspace:^",
+ "@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload",
+ "@hoppscotch/ui": "0.2.1",
+ "@tauri-apps/api": "2.1.1",
+ "@tauri-apps/plugin-shell": "2.0.1",
+ "@tauri-apps/plugin-store": "2.2.0",
+ "@vueuse/core": "11.1.0",
+ "fp-ts": "2.16.9",
+ "vue": "^3.3.4",
+ "vue-router": "4.4.5",
+ "vue-tippy": "6.5.0"
+ },
+ "devDependencies": {
+ "@iconify-json/lucide": "1.2.10",
+ "@tauri-apps/cli": "^2",
+ "@vitejs/plugin-vue": "^5.0.5",
+ "autoprefixer": "10.4.20",
+ "postcss": "8.4.49",
+ "sass": "1.80.3",
+ "tailwindcss": "3.4.14",
+ "typescript": "^5.2.2",
+ "unplugin-icons": "0.19.3",
+ "unplugin-vue-components": "0.27.4",
+ "vite": "^5.3.1",
+ "vue-tsc": "^2.2.0"
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/.envrc b/packages/hoppscotch-desktop/plugin-workspace/relay/.envrc
new file mode 100644
index 000000000..894571bf4
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/.envrc
@@ -0,0 +1,3 @@
+source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k="
+
+use devenv
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/.gitignore b/packages/hoppscotch-desktop/plugin-workspace/relay/.gitignore
new file mode 100644
index 000000000..e6f42efb0
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/.gitignore
@@ -0,0 +1,19 @@
+/target
+# Devenv
+.devenv*
+devenv.local.nix
+
+# direnv
+.direnv
+
+# pre-commit
+.pre-commit-config.yaml
+# Devenv
+.devenv*
+devenv.local.nix
+
+# direnv
+.direnv
+
+# pre-commit
+.pre-commit-config.yaml
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/Cargo.lock b/packages/hoppscotch-desktop/plugin-workspace/relay/Cargo.lock
new file mode 100644
index 000000000..d6f0c58cb
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/Cargo.lock
@@ -0,0 +1,919 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "addr2line"
+version = "0.24.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler2"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "anstream"
+version = "0.6.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is_terminal_polyfill",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
+dependencies = [
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125"
+dependencies = [
+ "anstyle",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+
+[[package]]
+name = "backtrace"
+version = "0.3.74"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"
+dependencies = [
+ "addr2line",
+ "cfg-if",
+ "libc",
+ "miniz_oxide",
+ "object",
+ "rustc-demangle",
+ "windows-targets",
+]
+
+[[package]]
+name = "bitflags"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "bytes"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "cc"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc"
+dependencies = [
+ "shlex",
+]
+
+[[package]]
+name = "cfb"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f"
+dependencies = [
+ "byteorder",
+ "fnv",
+ "uuid",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "colorchoice"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
+
+[[package]]
+name = "curl"
+version = "0.4.47"
+source = "git+https://github.com/CuriousCorrelation/curl-rust.git#1ec8079cf527b9cf47cc7a48c68b458affdae273"
+dependencies = [
+ "curl-sys",
+ "libc",
+ "openssl-probe",
+ "openssl-sys",
+ "socket2",
+]
+
+[[package]]
+name = "curl-sys"
+version = "0.4.77+curl-8.10.1"
+source = "git+https://github.com/CuriousCorrelation/curl-rust.git#1ec8079cf527b9cf47cc7a48c68b458affdae273"
+dependencies = [
+ "cc",
+ "libc",
+ "libz-sys",
+ "openssl-sys",
+ "pkg-config",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "dashmap"
+version = "6.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf"
+dependencies = [
+ "cfg-if",
+ "crossbeam-utils",
+ "hashbrown",
+ "lock_api",
+ "once_cell",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "deranged"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+dependencies = [
+ "powerfmt",
+ "serde",
+]
+
+[[package]]
+name = "env_filter"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab"
+dependencies = [
+ "log",
+ "regex",
+]
+
+[[package]]
+name = "env_logger"
+version = "0.11.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "env_filter",
+ "humantime",
+ "log",
+]
+
+[[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",
+]
+
+[[package]]
+name = "foreign-types-shared"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
+
+[[package]]
+name = "futures-core"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
+
+[[package]]
+name = "futures-sink"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
+
+[[package]]
+name = "gimli"
+version = "0.31.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
+
+[[package]]
+name = "hashbrown"
+version = "0.14.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
+
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "http"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa",
+]
+
+[[package]]
+name = "http-serde"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f056c8559e3757392c8d091e796416e4649d8e49e88b8d76df6c002f05027fd"
+dependencies = [
+ "http",
+ "serde",
+]
+
+[[package]]
+name = "humantime"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
+
+[[package]]
+name = "infer"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc150e5ce2330295b8616ce0e3f53250e53af31759a9dbedad1621ba29151847"
+dependencies = [
+ "cfb",
+]
+
+[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
+
+[[package]]
+name = "itoa"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
+
+[[package]]
+name = "lazy_static"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+
+[[package]]
+name = "libc"
+version = "0.2.167"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc"
+
+[[package]]
+name = "libz-sys"
+version = "1.1.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "lock_api"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
+
+[[package]]
+name = "memchr"
+version = "2.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+
+[[package]]
+name = "mime"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
+dependencies = [
+ "adler2",
+]
+
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
+[[package]]
+name = "object"
+version = "0.36.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "once_cell"
+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",
+ "cfg-if",
+ "foreign-types",
+ "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",
+]
+
+[[package]]
+name = "openssl-probe"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
+
+[[package]]
+name = "openssl-src"
+version = "300.4.1+3.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "openssl-sys"
+version = "0.9.104"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741"
+dependencies = [
+ "cc",
+ "libc",
+ "openssl-src",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "windows-targets",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
+
+[[package]]
+name = "pkg-config"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
+
+[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.92"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "regex"
+version = "1.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+
+[[package]]
+name = "relay"
+version = "0.1.1"
+dependencies = [
+ "bytes",
+ "curl",
+ "dashmap",
+ "env_logger",
+ "http",
+ "http-serde",
+ "infer",
+ "lazy_static",
+ "log",
+ "mime",
+ "openssl",
+ "openssl-sys",
+ "serde",
+ "serde_json",
+ "strum",
+ "thiserror",
+ "time",
+ "tokio-util",
+ "tracing",
+ "url-escape",
+ "urlencoding",
+]
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+
+[[package]]
+name = "rustversion"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"
+
+[[package]]
+name = "ryu"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "serde"
+version = "1.0.215"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.215"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.133"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
+dependencies = [
+ "itoa",
+ "memchr",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
+name = "smallvec"
+version = "1.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
+
+[[package]]
+name = "socket2"
+version = "0.5.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8"
+dependencies = [
+ "libc",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "strum"
+version = "0.26.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.90"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "thiserror"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[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",
+]
+
+[[package]]
+name = "time"
+version = "0.3.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21"
+dependencies = [
+ "deranged",
+ "num-conv",
+ "powerfmt",
+ "serde",
+ "time-core",
+ "time-macros",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
+
+[[package]]
+name = "time-macros"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de"
+dependencies = [
+ "num-conv",
+ "time-core",
+]
+
+[[package]]
+name = "tokio"
+version = "1.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551"
+dependencies = [
+ "backtrace",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "tracing"
+version = "0.1.41"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
+dependencies = [
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c"
+dependencies = [
+ "once_cell",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
+
+[[package]]
+name = "url-escape"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44e0ce4d1246d075ca5abec4b41d33e87a6054d08e2366b63205665e950db218"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "urlencoding"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
+
+[[package]]
+name = "utf8parse"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
+
+[[package]]
+name = "uuid"
+version = "1.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a"
+
+[[package]]
+name = "vcpkg"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
+
+[[package]]
+name = "windows-sys"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.59.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/Cargo.toml b/packages/hoppscotch-desktop/plugin-workspace/relay/Cargo.toml
new file mode 100644
index 000000000..f9f72f389
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/Cargo.toml
@@ -0,0 +1,31 @@
+[package]
+name = "relay"
+version = "0.1.1"
+description = "A HTTP request-response relay used by Hoppscotch Desktop and Hoppscotch Agent for more advanced request handling including custom headers, certificates, proxies, and local system integration."
+authors = ["CuriousCorrelation"]
+edition = "2021"
+
+[dependencies]
+curl = { git = "https://github.com/CuriousCorrelation/curl-rust.git", features = ["ntlm"] }
+tokio-util = "0.7.12"
+lazy_static = "1.5.0"
+time = { version = "0.3.37", features = ["serde"] }
+openssl = { version = "0.10.66", features = ["vendored"] }
+# NOTE: This crate follows `openssl-sys` from https://github.com/CuriousCorrelation/curl-rust.git
+# to avoid issues from version mismatch when compiling from source.
+openssl-sys = { version = "0.9.64", features = ["vendored"] }
+log = "0.4.22"
+env_logger = "0.11.5"
+thiserror = "1.0.64"
+http = "1.1.0"
+http-serde = "2.1.1"
+url-escape = "0.1.1"
+serde = { version = "1", features = ["derive"] }
+serde_json = "1"
+urlencoding = "2.1.3"
+dashmap = "6.1.0"
+tracing = "0.1.41"
+infer = "0.16.0"
+strum = { version = "0.26.3", features = ["derive"] }
+bytes = { version = "1.9.0", features = ["serde"] }
+mime = "0.3.17"
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/LICENSE.md b/packages/hoppscotch-desktop/plugin-workspace/relay/LICENSE.md
new file mode 100644
index 000000000..24bfc7fe1
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/LICENSE.md
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 - CuriousCorrelation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/README.md b/packages/hoppscotch-desktop/plugin-workspace/relay/README.md
new file mode 100644
index 000000000..5035fae2e
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/README.md
@@ -0,0 +1,101 @@
+# Relay
+
+A HTTP request-response relay used by Hoppscotch Desktop and Hoppscotch Agent for more advanced request handling including custom headers, certificates, proxies, and local system integration.
+
+> [!IMPORTANT]
+> This crate is only available via GitHub and not published on crates.io right now.
+
+<div align="center">
+
+![GitHub License MIT](https://img.shields.io/github/license/CuriousCorrelation/relay)
+[![Rust](https://img.shields.io/badge/Rust-1.77.2+-orange)](https://www.rust-lang.org)
+
+</div>
+
+## Installation
+
+Add to your `Cargo.toml`:
+
+```toml
+[dependencies]
+relay = { git = "https://github.com/CuriousCorrelation/relay.git" }
+```
+
+## Features
+
+- 🦀 Blazingly fast!
+- HTTP client built on libcurl
+- HTTP/1.1, HTTP/2.0, HTTP/3.0 support
+- Security with SSL/TLS certificate management
+- Proxy support with authentication
+- Multiple authentication methods (Basic, Bearer, Digest)
+- Content handling (JSON, Form Data, Binary)
+- Custom security configurations
+- Async request execution with cancellation support
+
+## Usage
+
+```rust
+use relay::{Request, Response, execute};
+
+let request = Request {
+ id: 1,
+ url: "https://api.example.com".to_string(),
+ method: Method::Get,
+ version: Version::Http2,
+ // ... configure other options
+};
+
+let response = execute(request).await?;
+```
+
+> [!NOTE]
+> All requests are executed asynchronously and can be cancelled using the `cancel(request_id)` function.
+
+## Security Features
+
+> [!TIP]
+> You can configure certificate validation, host verification, and custom certificates:
+
+```rust
+let security_config = SecurityConfig {
+ validate_certificates: Some(true),
+ verify_host: Some(true),
+ certificates: Some(CertificateConfig {
+ client: Some(CertificateType::Pem {
+ cert: cert_data,
+ key: key_data
+ }),
+ ca: Some(vec![ca_cert_data])
+ })
+};
+```
+
+## Error Handling
+
+The crate uses a custom error type `RelayError` that provides information about failures:
+
+```rust
+#[derive(Error)]
+pub enum RelayError {
+ Network { message: String, cause: Option<String> },
+ Certificate { message: String, cause: Option<String> },
+ Parse { message: String, cause: Option<String> },
+ // ... other variants
+}
+```
+
+## Requirements
+
+- Rust 1.77.2 or later
+- OpenSSL development libraries
+- libcurl with SSL and HTTP/2.0 support
+
+> [!WARNING]
+> This crate uses custom forks of some dependencies for NTLM support and consistent OpenSSL backend across platforms.
+
+## License
+
+Code: (c) 2024 - CuriousCorrelation
+
+MIT or MIT/Apache 2.0 where applicable.
diff --git a/packages/hoppscotch-agent/devenv.lock b/packages/hoppscotch-desktop/plugin-workspace/relay/devenv.lock
similarity index 84%
rename from packages/hoppscotch-agent/devenv.lock
rename to packages/hoppscotch-desktop/plugin-workspace/relay/devenv.lock
index d8303eb72..748752263 100644
--- a/packages/hoppscotch-agent/devenv.lock
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/devenv.lock
@@ -3,10 +3,10 @@
"devenv": {
"locked": {
"dir": "src/modules",
- "lastModified": 1729277673,
+ "lastModified": 1732585607,
"owner": "cachix",
"repo": "devenv",
- "rev": "3c3ab087b53d3e4699a43018ac71b5e1091ed73d",
+ "rev": "a520f05c40ebecaf5e17064b27e28ba8e70c49fb",
"type": "github"
},
"original": {
@@ -24,10 +24,10 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
- "lastModified": 1728973961,
+ "lastModified": 1732602776,
"owner": "nix-community",
"repo": "fenix",
- "rev": "d6a9ff4d1e60c347a23bc96ccdb058d37a810541",
+ "rev": "e0d44b70dcd2b98dd77857b4c5c7b1dc6b1ef56d",
"type": "github"
},
"original": {
@@ -73,10 +73,10 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1729265718,
+ "lastModified": 1732238832,
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "ccc0c2126893dd20963580b6478d1a10a4512185",
+ "rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d",
"type": "github"
},
"original": {
@@ -88,10 +88,10 @@
},
"nixpkgs-stable": {
"locked": {
- "lastModified": 1729181673,
+ "lastModified": 1731797254,
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "4eb33fe664af7b41a4c446f87d20c9a0a6321fa3",
+ "rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59",
"type": "github"
},
"original": {
@@ -111,10 +111,10 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
- "lastModified": 1729104314,
+ "lastModified": 1732021966,
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
- "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6",
+ "rev": "3308484d1a443fc5bc92012435d79e80458fe43c",
"type": "github"
},
"original": {
@@ -134,10 +134,10 @@
"rust-analyzer-src": {
"flake": false,
"locked": {
- "lastModified": 1729259624,
+ "lastModified": 1732562640,
"owner": "rust-lang",
"repo": "rust-analyzer",
- "rev": "3ddfb0da474bdf243a655a5d785de9b59c7f1397",
+ "rev": "157c7d01149e9be7179c5724b89d8d073e923bd8",
"type": "github"
},
"original": {
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/devenv.nix b/packages/hoppscotch-desktop/plugin-workspace/relay/devenv.nix
new file mode 100644
index 000000000..391767203
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/devenv.nix
@@ -0,0 +1,72 @@
+{ pkgs, lib, config, inputs, ... }:
+
+let
+ rosettaPkgs =
+ if pkgs.stdenv.isDarwin && pkgs.stdenv.isAarch64
+ then pkgs.pkgsx86_64Darwin
+ else pkgs;
+
+ darwinPackages = with pkgs; [
+ darwin.apple_sdk.frameworks.Security
+ darwin.apple_sdk.frameworks.CoreServices
+ darwin.apple_sdk.frameworks.CoreFoundation
+ darwin.apple_sdk.frameworks.Foundation
+ ];
+
+ linuxPackages = with pkgs; [
+ ];
+
+in {
+ packages = with pkgs; [
+ git
+ cargo-edit
+ ] ++ lib.optionals pkgs.stdenv.isDarwin darwinPackages
+ ++ lib.optionals pkgs.stdenv.isLinux linuxPackages;
+
+ env = {
+ APP_GREET = "Relay";
+ } // lib.optionalAttrs pkgs.stdenv.isLinux {
+ LD_LIBRARY_PATH = lib.makeLibraryPath [
+ ];
+ } // lib.optionalAttrs pkgs.stdenv.isDarwin {
+ # Place to put macOS-specific environment variables
+ };
+
+ scripts = {
+ hello.exec = "echo hello from $APP_GREET";
+ e.exec = "emacs";
+ };
+
+ enterShell = ''
+ git --version
+ ${lib.optionalString pkgs.stdenv.isDarwin ''
+ # Place to put macOS-specific shell initialization
+ ''}
+ ${lib.optionalString pkgs.stdenv.isLinux ''
+ # Place to put Linux-specific shell initialization
+ ''}
+ '';
+
+ enterTest = ''
+ echo "Running tests"
+ '';
+
+ dotenv.enable = true;
+
+ languages = {
+ rust = {
+ enable = true;
+ channel = "nightly";
+ components = [
+ "rustc"
+ "cargo"
+ "clippy"
+ "rustfmt"
+ "rust-analyzer"
+ "llvm-tools-preview"
+ "rust-src"
+ "rustc-codegen-cranelift-preview"
+ ];
+ };
+ };
+}
diff --git a/packages/hoppscotch-relay/devenv.yaml b/packages/hoppscotch-desktop/plugin-workspace/relay/devenv.yaml
similarity index 100%
rename from packages/hoppscotch-relay/devenv.yaml
rename to packages/hoppscotch-desktop/plugin-workspace/relay/devenv.yaml
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/src/auth.rs b/packages/hoppscotch-desktop/plugin-workspace/relay/src/auth.rs
new file mode 100644
index 000000000..da58e5178
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/src/auth.rs
@@ -0,0 +1,268 @@
+use curl::easy::Easy;
+use std::collections::HashMap;
+
+use crate::{
+ error::{RelayError, Result},
+ interop::{AuthType, GrantType, TokenResponse},
+};
+
+pub(crate) struct AuthHandler<'a> {
+ handle: &'a mut Easy,
+ headers: &'a mut HashMap<String, String>,
+}
+
+impl<'a> AuthHandler<'a> {
+ pub(crate) fn new(handle: &'a mut Easy, headers: &'a mut HashMap<String, String>) -> Self {
+ Self { handle, headers }
+ }
+
+ #[tracing::instrument(skip(self), level = "debug")]
+ pub(crate) fn set_auth(&mut self, auth: &AuthType) -> Result<()> {
+ match auth {
+ AuthType::Basic { username, password } => {
+ tracing::info!(username = %username, "Setting basic auth");
+ self.set_basic_auth(username, password)
+ }
+ AuthType::Bearer { token } => {
+ tracing::info!("Setting bearer auth");
+ self.set_bearer_auth(token)
+ }
+ AuthType::Digest {
+ username, password, ..
+ } => {
+ tracing::info!(username = %username, "Setting digest auth");
+ self.set_digest_auth(username, password)
+ }
+ AuthType::OAuth2 {
+ grant_type,
+ access_token,
+ refresh_token,
+ } => {
+ if let Some(token) = access_token {
+ tracing::info!("Using existing OAuth2 access token");
+ self.set_bearer_auth(token)
+ } else if let Some(refresh_token) = refresh_token {
+ tracing::info!("Refreshing OAuth2 token");
+ self.refresh_oauth2_token(grant_type, refresh_token)
+ } else {
+ tracing::info!("Initiating OAuth2 flow");
+ self.handle_oauth2_flow(grant_type)
+ }
+ }
+ AuthType::None => {
+ tracing::info!("No authentication required");
+ Ok(())
+ }
+ }
+ }
+
+ fn set_basic_auth(&mut self, username: &str, password: &str) -> Result<()> {
+ tracing::debug!(username = %username, "Setting basic auth credentials");
+
+ self.handle.username(username).map_err(|e| {
+ tracing::error!(error = %e, "Failed to set username");
+ RelayError::Network {
+ message: "Failed to set username".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ self.handle.password(password).map_err(|e| {
+ tracing::error!(error = %e, "Failed to set password");
+ RelayError::Network {
+ message: "Failed to set password".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::debug!("Basic auth credentials set successfully");
+ Ok(())
+ }
+
+ fn set_bearer_auth(&mut self, token: &str) -> Result<()> {
+ self.headers
+ .insert("Authorization".to_string(), format!("Bearer {}", token));
+ Ok(())
+ }
+
+ fn set_digest_auth(&mut self, username: &str, password: &str) -> Result<()> {
+ tracing::debug!("Setting up digest authentication");
+ self.set_basic_auth(username, password)?;
+
+ let mut auth = curl::easy::Auth::new();
+ auth.digest(true);
+
+ tracing::info!("Configuring digest auth mode");
+ self.handle.http_auth(&auth).map_err(|e| {
+ tracing::error!(error = %e, "Failed to set digest authentication");
+ RelayError::Network {
+ message: "Failed to set digest authentication".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::debug!("Digest auth configured successfully");
+ Ok(())
+ }
+
+ fn handle_oauth2_flow(&mut self, grant_type: &GrantType) -> Result<()> {
+ match grant_type {
+ GrantType::ClientCredentials {
+ token_endpoint,
+ client_id,
+ client_secret,
+ } => {
+ tracing::info!("Initiating client credentials flow");
+ self.client_credentials_flow(token_endpoint, client_id, client_secret.as_deref())
+ }
+ GrantType::Password {
+ token_endpoint,
+ username,
+ password,
+ } => {
+ tracing::info!("Initiating password flow");
+ self.password_flow(token_endpoint, username, password)
+ }
+ GrantType::AuthorizationCode { .. } => {
+ tracing::warn!("Authorization Code flow not supported");
+ Err(RelayError::UnsupportedFeature {
+ feature: "Authorization Code Grant".into(),
+ message: "Authorization Code flow requires browser interaction".into(),
+ relay: "curl".into(),
+ })
+ }
+ GrantType::Implicit { .. } => {
+ tracing::warn!("Implicit flow not supported");
+ Err(RelayError::UnsupportedFeature {
+ feature: "Implicit Grant".into(),
+ message: "Implicit flow requires browser interaction".into(),
+ relay: "curl".into(),
+ })
+ }
+ }
+ }
+
+ fn refresh_oauth2_token(&mut self, grant_type: &GrantType, refresh_token: &str) -> Result<()> {
+ let token_endpoint = match grant_type {
+ GrantType::ClientCredentials { token_endpoint, .. }
+ | GrantType::Password { token_endpoint, .. }
+ | GrantType::AuthorizationCode { token_endpoint, .. } => token_endpoint,
+ GrantType::Implicit { .. } => {
+ tracing::error!("Attempted to refresh token with implicit grant");
+ return Err(RelayError::UnsupportedFeature {
+ feature: "Token Refresh".into(),
+ message: "Implicit grant does not support refresh tokens".into(),
+ relay: "curl".into(),
+ });
+ }
+ };
+
+ let params = vec![
+ ("grant_type", "refresh_token"),
+ ("refresh_token", refresh_token),
+ ];
+
+ self.request_token(token_endpoint, &params)
+ }
+
+ fn client_credentials_flow(
+ &mut self,
+ token_endpoint: &str,
+ client_id: &str,
+ client_secret: Option<&str>,
+ ) -> Result<()> {
+ tracing::info!("Performing client credentials flow");
+
+ let mut params = vec![
+ ("grant_type", "client_credentials"),
+ ("client_id", client_id),
+ ];
+
+ if let Some(secret) = client_secret {
+ params.push(("client_secret", secret));
+ }
+
+ self.request_token(token_endpoint, &params)
+ }
+
+ fn password_flow(
+ &mut self,
+ token_endpoint: &str,
+ username: &str,
+ password: &str,
+ ) -> Result<()> {
+ tracing::info!("Performing password flow");
+
+ let params = vec![
+ ("grant_type", "password"),
+ ("username", username),
+ ("password", password),
+ ];
+
+ self.request_token(token_endpoint, &params)
+ }
+
+ fn request_token(&mut self, token_endpoint: &str, params: &[(&str, &str)]) -> Result<()> {
+ let mut handle = Easy::new();
+ tracing::debug!(endpoint = %token_endpoint, "Requesting OAuth2 token");
+
+ handle.url(token_endpoint).map_err(|e| {
+ tracing::error!(error = %e, "Failed to set token endpoint URL");
+ RelayError::Network {
+ message: "Failed to set token endpoint URL".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ let form_data: String = params
+ .iter()
+ .map(|(k, v)| format!("{}={}", urlencoding::encode(k), urlencoding::encode(v)))
+ .collect::<Vec<_>>()
+ .join("&");
+
+ handle.post_fields_copy(form_data.as_bytes()).map_err(|e| {
+ tracing::error!(error = %e, "Failed to set form data");
+ RelayError::Network {
+ message: "Failed to set form data".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ let mut response = Vec::new();
+ {
+ let mut transfer = handle.transfer();
+ transfer
+ .write_function(|data| {
+ response.extend_from_slice(data);
+ Ok(data.len())
+ })
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to set write callback");
+ RelayError::Network {
+ message: "Failed to set write callback".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::debug!("Performing token request");
+ transfer.perform().map_err(|e| {
+ tracing::error!(error = %e, "Failed to perform token request");
+ RelayError::Network {
+ message: "Failed to perform token request".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+ }
+
+ let token_response: TokenResponse = serde_json::from_slice(&response).map_err(|e| {
+ tracing::error!(error = %e, "Failed to parse token response");
+ RelayError::Parse {
+ message: "Failed to parse token response".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::info!("Successfully obtained OAuth2 token");
+ self.set_bearer_auth(&token_response.access_token)
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/src/content.rs b/packages/hoppscotch-desktop/plugin-workspace/relay/src/content.rs
new file mode 100644
index 000000000..659becbb1
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/src/content.rs
@@ -0,0 +1,294 @@
+use curl::easy::Easy;
+use http::HeaderName;
+use std::{collections::HashMap, path::Path};
+
+use crate::{
+ error::{RelayError, Result},
+ interop::{ContentType, FormValue, MediaType},
+};
+
+pub(crate) struct ContentHandler<'a> {
+ handle: &'a mut Easy,
+ headers: &'a mut HashMap<String, String>,
+}
+
+impl<'a> ContentHandler<'a> {
+ pub(crate) fn new(handle: &'a mut Easy, headers: &'a mut HashMap<String, String>) -> Self {
+ tracing::debug!("Creating new ContentHandler with headers: {:?}", headers);
+ Self { handle, headers }
+ }
+
+ fn merge_headers(&mut self, new_headers: HashMap<String, String>) {
+ tracing::info!(
+ original_headers = ?self.headers,
+ new_headers = ?new_headers,
+ "Merging headers"
+ );
+
+ for (key, value) in new_headers {
+ if let Ok(header_name) = HeaderName::from_bytes(key.as_bytes()) {
+ let canonical_name = header_name.to_string();
+ self.headers.insert(canonical_name, value);
+ } else {
+ self.headers.insert(key, value);
+ }
+ }
+
+ tracing::info!(merged_headers = ?self.headers, "Headers merged");
+ }
+
+ #[tracing::instrument(skip(self), level = "debug")]
+ pub(crate) fn set_content(&mut self, content: &ContentType) -> Result<()> {
+ match content {
+ ContentType::Text {
+ content,
+ media_type,
+ } => {
+ tracing::info!(content_length = content.len(), "Setting text content");
+ self.set_text_content(content, media_type)
+ }
+ ContentType::Json {
+ content,
+ media_type,
+ } => {
+ tracing::info!("Setting JSON content");
+ self.set_json_content(content, media_type)
+ }
+ ContentType::Form {
+ content,
+ media_type,
+ } => {
+ tracing::info!(field_count = content.len(), "Setting form content");
+ self.set_form_content(content, media_type)
+ }
+ ContentType::Binary {
+ content,
+ media_type,
+ filename,
+ } => {
+ tracing::info!(
+ content_length = content.len(),
+ filename = ?filename,
+ "Setting binary content"
+ );
+ self.set_binary_content(content, media_type, filename.as_deref())
+ }
+ ContentType::Multipart {
+ content,
+ media_type,
+ } => {
+ tracing::info!(field_count = content.len(), "Setting multipart content");
+ self.set_multipart_content(content, media_type)
+ }
+ ContentType::Xml {
+ content,
+ media_type,
+ } => {
+ tracing::info!("Setting XML content");
+ self.set_text_content(content, media_type)
+ }
+ ContentType::Urlencoded {
+ content,
+ media_type,
+ } => {
+ tracing::info!(field_count = content.len(), "Setting URL-encoded content");
+ self.set_urlencoded_content(content, media_type)
+ }
+ }
+ }
+
+ fn set_text_content(&mut self, content: &str, media_type: &MediaType) -> Result<()> {
+ let mut headers = HashMap::new();
+ headers.insert("content-type".to_string(), media_type.to_string());
+
+ self.merge_headers(headers);
+
+ self.handle
+ .post_fields_copy(content.as_bytes())
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to set text content");
+ RelayError::Network {
+ message: "Failed to set text content".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::debug!("Text content set successfully");
+ Ok(())
+ }
+
+ fn set_json_content(
+ &mut self,
+ content: &serde_json::Value,
+ media_type: &MediaType,
+ ) -> Result<()> {
+ let json_str = serde_json::to_string(content).map_err(|e| {
+ tracing::error!(error = %e, "Failed to serialize JSON");
+ RelayError::Parse {
+ message: "Failed to serialize JSON".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ let mut headers = HashMap::new();
+ headers.insert("content-type".to_string(), media_type.to_string());
+
+ self.merge_headers(headers);
+
+ self.handle
+ .post_fields_copy(json_str.as_bytes())
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to set JSON content");
+ RelayError::Network {
+ message: "Failed to set JSON content".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::debug!("JSON content set successfully");
+ Ok(())
+ }
+
+ fn set_binary_content(
+ &mut self,
+ content: &[u8],
+ media_type: &MediaType,
+ filename: Option<&str>,
+ ) -> Result<()> {
+ let mut headers = HashMap::new();
+
+ if let Some(name) = filename {
+ let safe_name = Path::new(name)
+ .file_name()
+ .and_then(|n| n.to_str())
+ .unwrap_or(name);
+
+ headers.insert("content-type".to_string(), media_type.to_string());
+ headers.insert(
+ "Content-Disposition".to_string(),
+ format!("attachment; filename=\"{}\"", safe_name),
+ );
+ } else {
+ headers.insert("content-type".to_string(), media_type.to_string());
+ }
+
+ self.merge_headers(headers);
+
+ self.handle.post_fields_copy(content).map_err(|e| {
+ tracing::error!(error = %e, "Failed to set binary content");
+ RelayError::Network {
+ message: "Failed to set binary content".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::debug!("Binary content set successfully");
+ Ok(())
+ }
+
+ fn set_form_content(
+ &mut self,
+ content: &HashMap<String, Vec<FormValue>>,
+ media_type: &MediaType,
+ ) -> Result<()> {
+ let mut headers = HashMap::new();
+ headers.insert("content-type".to_string(), media_type.to_string());
+
+ self.merge_headers(headers);
+
+ let mut form = curl::easy::Form::new();
+
+ for (key, values) in content {
+ for value in values {
+ match value {
+ FormValue::Text(text) => {
+ tracing::debug!(key = %key, text_length = text.len(), "Adding form text field");
+ form.part(key)
+ .contents(text.as_bytes())
+ .add()
+ .map_err(|e| {
+ tracing::error!(error = %e, key = %key, "Failed to add form text field");
+ RelayError::Network {
+ message: format!("Failed to add form text field: {}", key),
+ cause: Some(e.to_string()),
+ }
+ })?;
+ }
+ FormValue::File {
+ filename,
+ content_type,
+ data,
+ } => {
+ tracing::debug!(
+ key = %key,
+ filename = %filename,
+ content_type = ?content_type,
+ data_length = data.len(),
+ "Adding form file field"
+ );
+ form.part(key)
+ .buffer(&filename, data.to_vec())
+ .content_type(&content_type.to_string())
+ .add()
+ .map_err(|e| {
+ tracing::error!(
+ error = %e,
+ key = %key,
+ filename = %filename,
+ "Failed to add form file field"
+ );
+ RelayError::Network {
+ message: format!(
+ "Failed to add form file field: {} ({})",
+ key, filename
+ ),
+ cause: Some(e.to_string()),
+ }
+ })?;
+ }
+ }
+ }
+ }
+
+ self.handle.httppost(form).map_err(|e| {
+ tracing::error!(error = %e, "Failed to set form data");
+ RelayError::Network {
+ message: "Failed to set form data".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::debug!("Form content set successfully");
+ Ok(())
+ }
+
+ fn set_multipart_content(
+ &mut self,
+ content: &HashMap<String, Vec<FormValue>>,
+ media_type: &MediaType,
+ ) -> Result<()> {
+ self.set_form_content(content, media_type)
+ }
+
+ fn set_urlencoded_content(&mut self, content: &String, media_type: &MediaType) -> Result<()> {
+ let mut headers = HashMap::new();
+ headers.insert("content-type".to_string(), media_type.to_string());
+
+ self.merge_headers(headers);
+
+ tracing::debug!(content_length = content.len(), "URL-encoded form data");
+
+ self.handle
+ .post_fields_copy(content.as_bytes())
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to set urlencoded content");
+ RelayError::Network {
+ message: "Failed to set urlencoded content".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::debug!("URL-encoded content set successfully");
+ Ok(())
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/src/error.rs b/packages/hoppscotch-desktop/plugin-workspace/relay/src/error.rs
new file mode 100644
index 000000000..959b74a34
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/src/error.rs
@@ -0,0 +1,70 @@
+use serde::{Deserialize, Serialize};
+use thiserror::Error;
+
+#[derive(Debug, Error, Serialize, Deserialize)]
+#[serde(tag = "kind", rename_all = "snake_case")]
+pub enum RelayError {
+ #[error("Unsupported feature '{feature}' in relay '{relay}': {message}")]
+ UnsupportedFeature {
+ feature: String,
+ message: String,
+ relay: String,
+ },
+
+ #[error("Network error: {message}")]
+ Network {
+ message: String,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ cause: Option<String>,
+ },
+
+ #[error("Request timed out during {}", .phase.as_ref().map_or("execution", TimeoutPhase::as_str))]
+ Timeout {
+ message: String,
+ phase: Option<TimeoutPhase>,
+ },
+
+ #[error("Certificate error: {message}")]
+ Certificate {
+ message: String,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ cause: Option<String>,
+ },
+
+ #[error("Failed to parse response: {message}")]
+ Parse {
+ message: String,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ cause: Option<String>,
+ },
+
+ #[error("Request aborted: {message}")]
+ Abort { message: String },
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
+#[serde(rename_all = "snake_case")]
+pub enum TimeoutPhase {
+ Connect,
+ Tls,
+ Response,
+}
+
+impl TimeoutPhase {
+ fn as_str(&self) -> &'static str {
+ match self {
+ TimeoutPhase::Connect => "connection establishment",
+ TimeoutPhase::Tls => "TLS handshake",
+ TimeoutPhase::Response => "response waiting",
+ }
+ }
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(tag = "kind", rename_all = "snake_case")]
+pub enum RequestResult<T> {
+ Success { response: T },
+ Error { error: RelayError },
+}
+
+pub type Result<T> = std::result::Result<T, RelayError>;
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/src/header.rs b/packages/hoppscotch-desktop/plugin-workspace/relay/src/header.rs
new file mode 100644
index 000000000..4ef926e7e
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/src/header.rs
@@ -0,0 +1,66 @@
+use std::collections::HashMap;
+
+use curl::easy::{Easy, List};
+
+use crate::error::{RelayError, Result};
+
+pub(crate) struct HeadersBuilder<'a> {
+ handle: &'a mut Easy,
+}
+
+impl<'a> HeadersBuilder<'a> {
+ pub(crate) fn new(handle: &'a mut Easy) -> Self {
+ Self { handle }
+ }
+
+ #[tracing::instrument(skip(self), level = "debug")]
+ pub(crate) fn add_headers(&mut self, headers: Option<&HashMap<String, String>>) -> Result<()> {
+ let Some(headers) = headers else {
+ tracing::debug!("No headers provided");
+ return Ok(());
+ };
+
+ let header_count = headers.len();
+ tracing::info!(header_count, "Building header list");
+
+ let list = headers
+ .iter()
+ .map(|(key, value)| {
+ tracing::debug!(
+ ?key,
+ value_count = value.len(),
+ ?value,
+ "Processing headers"
+ );
+ let header = format!("{key}: {value}");
+ tracing::debug!(%header, "Adding header");
+ header
+ })
+ .try_fold(List::new(), |mut list, header| {
+ list.append(&header).map_err(|e| {
+ tracing::error!(%e, "Failed to append header: {header}");
+ RelayError::Network {
+ message: format!("Failed to append header: {header}"),
+ cause: Some(e.to_string()),
+ }
+ })?;
+ Ok(list)
+ })?;
+
+ self.handle.http_headers(list).map_err(|e| {
+ tracing::error!(%e, "Failed to set headers");
+ RelayError::Network {
+ message: "Failed to set headers".into(),
+ cause: Some(e.to_string()),
+ }
+ })
+ }
+
+ #[tracing::instrument(skip(self), level = "debug")]
+ pub(crate) fn add_content_type(&mut self, content_type: &str) -> Result<()> {
+ tracing::info!(content_type = %content_type, "Adding content-type header");
+ let mut headers = HashMap::new();
+ headers.insert("Content-Type".to_string(), content_type.to_string());
+ self.add_headers(Some(&headers))
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/src/interop.rs b/packages/hoppscotch-desktop/plugin-workspace/relay/src/interop.rs
new file mode 100644
index 000000000..3404f7e57
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/src/interop.rs
@@ -0,0 +1,299 @@
+use std::collections::HashMap;
+
+use bytes::Bytes;
+use http::{Method, StatusCode, Version};
+use serde::{Deserialize, Serialize};
+use strum::{Display, EnumString};
+use time::OffsetDateTime;
+
+#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Display, EnumString)]
+pub enum MediaType {
+ #[serde(rename = "text/plain")]
+ #[strum(to_string = "text/plain")]
+ TextPlain,
+ #[serde(rename = "text/html")]
+ #[strum(to_string = "text/html")]
+ TextHtml,
+ #[serde(rename = "text/css")]
+ #[strum(to_string = "text/css")]
+ TextCss,
+ #[serde(rename = "text/csv")]
+ #[strum(to_string = "text/csv")]
+ TextCsv,
+ #[serde(rename = "application/json")]
+ #[strum(to_string = "application/json")]
+ Json,
+ #[serde(rename = "application/ld+json")]
+ #[strum(to_string = "application/ld+json")]
+ JsonLd,
+ #[serde(rename = "application/xml")]
+ #[strum(to_string = "application/xml")]
+ Xml,
+ #[serde(rename = "text/xml")]
+ #[strum(to_string = "text/xml")]
+ TextXml,
+ #[serde(rename = "application/x-www-form-urlencoded")]
+ #[strum(to_string = "application/x-www-form-urlencoded")]
+ FormUrlEncoded,
+ #[serde(rename = "multipart/form-data")]
+ #[strum(to_string = "multipart/form-data")]
+ MultipartFormData,
+ #[serde(rename = "application/octet-stream")]
+ #[strum(to_string = "application/octet-stream")]
+ OctetStream,
+ #[serde(other)]
+ Other,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+#[serde(tag = "kind", rename_all = "camelCase")]
+pub enum FormValue {
+ Text(String),
+ #[serde(rename_all = "camelCase")]
+ File {
+ filename: String,
+ content_type: MediaType,
+ data: Bytes,
+ },
+}
+
+pub type FormData = HashMap<String, Vec<FormValue>>;
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+#[serde(tag = "kind", rename_all = "camelCase")]
+pub enum ContentType {
+ #[serde(rename_all = "camelCase")]
+ Text {
+ content: String,
+ media_type: MediaType,
+ },
+ #[serde(rename_all = "camelCase")]
+ Json {
+ content: serde_json::Value,
+ media_type: MediaType,
+ },
+ #[serde(rename_all = "camelCase")]
+ Xml {
+ content: String,
+ media_type: MediaType,
+ },
+ #[serde(rename_all = "camelCase")]
+ Form {
+ content: FormData,
+ media_type: MediaType,
+ },
+ #[serde(rename_all = "camelCase")]
+ Binary {
+ content: Bytes,
+ media_type: MediaType,
+ filename: Option<String>,
+ },
+ #[serde(rename_all = "camelCase")]
+ Multipart {
+ content: FormData,
+ media_type: MediaType,
+ },
+ #[serde(rename_all = "camelCase")]
+ Urlencoded {
+ content: String,
+ media_type: MediaType,
+ },
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TokenResponse {
+ pub access_token: String,
+ pub token_type: String,
+ pub expires_in: Option<u64>,
+ pub refresh_token: Option<String>,
+ pub scope: Option<String>,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+#[serde(tag = "kind", rename_all = "snake_case")]
+pub enum GrantType {
+ #[serde(rename_all = "camelCase")]
+ AuthorizationCode {
+ auth_endpoint: String,
+ token_endpoint: String,
+ client_id: String,
+ client_secret: Option<String>,
+ },
+ #[serde(rename_all = "camelCase")]
+ ClientCredentials {
+ token_endpoint: String,
+ client_id: String,
+ client_secret: Option<String>,
+ },
+ #[serde(rename_all = "camelCase")]
+ Password {
+ token_endpoint: String,
+ username: String,
+ password: String,
+ },
+ #[serde(rename_all = "camelCase")]
+ Implicit {
+ auth_endpoint: String,
+ client_id: String,
+ },
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+#[serde(tag = "kind", rename_all = "lowercase")]
+pub enum AuthType {
+ None,
+ #[serde(rename_all = "camelCase")]
+ Basic {
+ username: String,
+ password: String,
+ },
+ #[serde(rename_all = "camelCase")]
+ Bearer {
+ token: String,
+ },
+ #[serde(rename_all = "camelCase")]
+ Digest {
+ username: String,
+ password: String,
+ realm: Option<String>,
+ nonce: Option<String>,
+ opaque: Option<String>,
+ algorithm: Option<DigestAlgorithm>,
+ qop: Option<DigestQop>,
+ nc: Option<String>,
+ cnonce: Option<String>,
+ },
+ #[serde(rename_all = "camelCase")]
+ OAuth2 {
+ grant_type: GrantType,
+ access_token: Option<String>,
+ refresh_token: Option<String>,
+ },
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
+#[serde(rename_all = "SCREAMING-KEBAB-CASE")]
+pub enum DigestAlgorithm {
+ Md5,
+ Sha256,
+ Sha512,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
+#[serde(rename_all = "kebab-case")]
+pub enum DigestQop {
+ Auth,
+ AuthInt,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+#[serde(tag = "kind", rename_all = "camelCase")]
+pub enum CertificateType {
+ Pem { cert: Bytes, key: Bytes },
+ Pfx { data: Bytes, password: String },
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct SecurityConfig {
+ pub certificates: Option<CertificateConfig>,
+ #[serde(rename = "verifyHost")]
+ pub verify_host: Option<bool>,
+ #[serde(rename = "verifyPeer")]
+ pub verify_peer: Option<bool>,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct CertificateConfig {
+ pub client: Option<CertificateType>,
+ pub ca: Option<Vec<Bytes>>,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct Request {
+ pub id: i64,
+ pub url: String,
+ #[serde(with = "http_serde::method")]
+ pub method: Method,
+ #[serde(with = "http_serde::version")]
+ pub version: Version,
+ pub headers: Option<HashMap<String, String>>,
+ pub params: Option<HashMap<String, String>>,
+ pub content: Option<ContentType>,
+ pub auth: Option<AuthType>,
+ pub security: Option<SecurityConfig>,
+ pub proxy: Option<ProxyConfig>,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+#[serde(rename_all = "camelCase")]
+pub struct ResponseBody {
+ pub body: Bytes,
+ pub media_type: MediaType,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct Response {
+ pub id: i64,
+ #[serde(with = "http_serde::status_code")]
+ pub status: StatusCode,
+ #[serde(rename = "statusText")]
+ pub status_text: String,
+ #[serde(with = "http_serde::version")]
+ pub version: Version,
+ pub headers: HashMap<String, String>,
+ pub cookies: Option<Vec<Cookie>>,
+ pub body: ResponseBody,
+ pub meta: ResponseMeta,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct ProxyConfig {
+ pub url: String,
+ pub auth: Option<ProxyAuth>,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct ProxyAuth {
+ pub username: String,
+ pub password: String,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct Cookie {
+ pub name: String,
+ pub value: String,
+ pub domain: Option<String>,
+ pub path: Option<String>,
+ pub expires: Option<OffsetDateTime>,
+ pub secure: Option<bool>,
+ #[serde(rename = "httpOnly")]
+ pub http_only: Option<bool>,
+ #[serde(rename = "sameSite")]
+ pub same_site: Option<SameSite>,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
+pub enum SameSite {
+ Strict,
+ Lax,
+ None,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct ResponseMeta {
+ pub timing: TimingInfo,
+ pub size: SizeInfo,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct TimingInfo {
+ pub start: u64,
+ pub end: u64,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct SizeInfo {
+ pub headers: u64,
+ pub body: u64,
+ pub total: u64,
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/src/lib.rs b/packages/hoppscotch-desktop/plugin-workspace/relay/src/lib.rs
new file mode 100644
index 000000000..91270057c
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/src/lib.rs
@@ -0,0 +1,14 @@
+mod auth;
+mod content;
+pub mod error;
+mod header;
+mod interop;
+mod relay;
+mod request;
+mod response;
+mod security;
+mod transfer;
+mod util;
+
+pub use interop::{Request, Response};
+pub use relay::{cancel, execute};
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/src/relay.rs b/packages/hoppscotch-desktop/plugin-workspace/relay/src/relay.rs
new file mode 100644
index 000000000..424a670c4
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/src/relay.rs
@@ -0,0 +1,175 @@
+use std::{
+ sync::{
+ atomic::{AtomicBool, Ordering},
+ Arc,
+ },
+ time::SystemTime,
+};
+
+use curl::easy::Easy;
+use dashmap::DashMap;
+use http::StatusCode;
+use tokio_util::sync::CancellationToken;
+
+use crate::{
+ error::{RelayError, Result},
+ interop::{Request, Response},
+ request::CurlRequest,
+ response::ResponseHandler,
+ transfer::TransferHandler,
+};
+
+lazy_static::lazy_static! {
+ static ref ACTIVE_REQUESTS: DashMap<i64, Arc<AtomicBool>> = DashMap::new();
+}
+
+#[tracing::instrument(skip(request), fields(request_id = request.id), level = "debug")]
+fn execute_request(request: &Request, cancel_token: &CancellationToken) -> Result<Response> {
+ tracing::info!(
+ method = %request.method,
+ url = %request.url,
+ "Executing request"
+ );
+
+ let id = request.id;
+ let mut handle = Easy::new();
+ let start_time = SystemTime::now();
+
+ let mut curl_request = CurlRequest::new(&mut handle, request);
+ curl_request.prepare()?;
+
+ tracing::debug!(request = ?request, "Full request details before sending");
+
+ handle.verbose(true).map_err(|e| RelayError::Network {
+ message: "Failed to set verbose mode".into(),
+ cause: Some(e.to_string()),
+ })?;
+
+ handle
+ .debug_function(|info_type, data| {
+ if let Ok(s) = std::str::from_utf8(data) {
+ tracing::debug!(info_type = ?info_type, s = ?s, "cURL debug fn");
+ }
+ })
+ .map_err(|e| RelayError::Network {
+ message: "Failed to set debug function".into(),
+ cause: Some(e.to_string()),
+ })?;
+
+ let mut transfer_handler = TransferHandler::new();
+ transfer_handler.handle_transfer(&mut handle, cancel_token)?;
+
+ let status = handle.response_code().map_err(|e| {
+ tracing::error!(error = %e, "Failed to get response code");
+ RelayError::Network {
+ message: "Failed to get response code".into(),
+ cause: Some(e.to_string()),
+ }
+ })? as u16;
+
+ let header_size = handle.header_size().map_err(|e| {
+ tracing::error!(error = %e, "Failed to get header size");
+ RelayError::Network {
+ message: "Failed to get header size".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ let (body, headers) = transfer_handler.into_parts();
+
+ tracing::info!(
+ status = status,
+ body_size = body.len(),
+ header_size = header_size,
+ "Request completed"
+ );
+
+ // NOTE: If this fails, something has gone very wrong.
+ let status_code = StatusCode::from_u16(status).unwrap();
+
+ ResponseHandler::new(
+ id,
+ headers,
+ body,
+ status_code,
+ header_size,
+ start_time,
+ SystemTime::now(),
+ request.version.clone(),
+ )
+ .build()
+}
+
+#[tracing::instrument(skip(request), fields(request_id = request.id), level = "debug")]
+pub async fn execute(request: Request) -> Result<Response> {
+ let request_id = request.id;
+ let cancelled = Arc::new(AtomicBool::new(false));
+
+ tracing::info!(
+ method = %request.method,
+ url = %request.url,
+ "Starting request execution"
+ );
+
+ ACTIVE_REQUESTS.insert(request_id, Arc::clone(&cancelled));
+
+ let cancel_token = CancellationToken::new();
+ let cancel_token_clone = cancel_token.clone();
+ let cancelled_clone = Arc::clone(&cancelled);
+
+ let handle = std::thread::spawn(move || {
+ let result = execute_request(&request, &cancel_token);
+ if cancel_token_clone.is_cancelled() {
+ cancelled_clone.store(true, Ordering::SeqCst);
+ }
+ result
+ });
+
+ let result = match handle.join() {
+ Ok(result) => {
+ if cancelled.load(Ordering::SeqCst) {
+ tracing::info!("Request was cancelled by user");
+ Err(RelayError::Abort {
+ message: "Request cancelled by user".into(),
+ })
+ } else {
+ tracing::debug!("Request completed normally");
+ result
+ }
+ }
+ Err(_) => {
+ tracing::error!("Request thread panicked");
+ Err(RelayError::Network {
+ message: "Request thread panicked".into(),
+ cause: None,
+ })
+ }
+ };
+
+ ACTIVE_REQUESTS.remove(&request_id);
+ tracing::debug!("Request execution completed");
+
+ tracing::debug!("Result {:#?}", result);
+
+ result
+}
+
+#[tracing::instrument(level = "debug")]
+pub async fn cancel(request_id: i64) -> Result<()> {
+ tracing::debug!(request_id = request_id, "Attempting to cancel request");
+
+ if let Some(cancelled) = ACTIVE_REQUESTS.get(&request_id) {
+ cancelled.store(true, Ordering::SeqCst);
+ tracing::info!(request_id = request_id, "Request cancelled successfully");
+ Ok(())
+ } else {
+ tracing::warn!(
+ request_id = request_id,
+ "Request not found for cancellation"
+ );
+ Err(RelayError::Network {
+ message: "Request not found".into(),
+ cause: None,
+ })
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/src/request.rs b/packages/hoppscotch-desktop/plugin-workspace/relay/src/request.rs
new file mode 100644
index 000000000..1c190e855
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/src/request.rs
@@ -0,0 +1,145 @@
+use curl::easy::Easy;
+use std::{collections::HashMap, ops::Not};
+
+use crate::{
+ auth::AuthHandler,
+ content::ContentHandler,
+ error::{RelayError, Result},
+ header::HeadersBuilder,
+ interop::Request,
+ security::SecurityHandler,
+ util::ToCurlVersion,
+};
+
+pub(crate) struct CurlRequest<'a> {
+ handle: &'a mut Easy,
+ request: &'a Request,
+}
+
+impl<'a> CurlRequest<'a> {
+ pub(crate) fn new(handle: &'a mut Easy, request: &'a Request) -> Self {
+ tracing::debug!(
+ request_id = request.id,
+ url = %request.url,
+ method = %request.method,
+ "Creating new curl request"
+ );
+ Self { handle, request }
+ }
+
+ #[tracing::instrument(skip(self), fields(request_id = self.request.id), level = "debug")]
+ fn setup_basics(&mut self) -> Result<()> {
+ tracing::debug!("Setting up basic request parameters");
+
+ self.handle
+ .custom_request(&self.request.method.to_string())
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to set request method");
+ RelayError::Network {
+ message: "Failed to set request method".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ self.handle.url(&self.request.url).map_err(|e| {
+ tracing::error!(error = %e, "Failed to set URL");
+ RelayError::Network {
+ message: "Failed to set URL".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ self.handle
+ .http_version(self.request.version.to_curl_version())
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to set HTTP version");
+ RelayError::Network {
+ message: "Failed to set HTTP version".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ // NOTE: `""` corresponds to accept all,
+ // see: https://curl.se/libcurl/c/CURLOPT_ACCEPT_ENCODING.html
+ self.handle.accept_encoding("").map_err(|e| {
+ tracing::error!(error = %e, "Failed to set accept-encoding");
+ RelayError::Network {
+ message: "Failed to set accept-encoding".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::debug!("Basic request parameters set successfully");
+ Ok(())
+ }
+
+ #[tracing::instrument(skip(self), fields(request_id = self.request.id), level = "debug")]
+ pub(crate) fn prepare(&mut self) -> Result<()> {
+ tracing::debug!("Preparing request");
+ self.setup_basics()?;
+
+ let mut headers = HashMap::new();
+
+ if let Some(ref content) = self.request.content {
+ tracing::trace!(content_type = ?content, "Setting request content");
+ ContentHandler::new(self.handle, &mut headers).set_content(content)?;
+ }
+
+ if let Some(ref auth) = self.request.auth {
+ tracing::trace!(auth_type = ?auth, "Configuring authentication");
+ AuthHandler::new(self.handle, &mut headers).set_auth(auth)?;
+ }
+
+ if let Some(ref security) = self.request.security {
+ tracing::trace!(
+ verify_peer = ?security.verify_peer,
+ verify_host = ?security.verify_host,
+ "Configuring security settings"
+ );
+ SecurityHandler::new(self.handle).configure(security)?;
+ }
+
+ if let Some(ref proxy) = self.request.proxy {
+ tracing::trace!(proxy_url = %proxy.url, "Setting up proxy");
+
+ self.handle
+ .proxy(&proxy.url)
+ .map_err(|e| RelayError::Network {
+ message: "Failed to set proxy".into(),
+ cause: Some(e.to_string()),
+ })?;
+
+ self.handle
+ .proxy_auth(curl::easy::Auth::new().auto(true))
+ .map_err(|e| RelayError::Network {
+ message: "Failed to set proxy authentication to auto".into(),
+ cause: Some(e.to_string()),
+ })?;
+
+ if let Some(ref auth) = proxy.auth {
+ if (auth.username.trim().is_empty() || auth.password.trim().is_empty()).not() {
+ self.handle.proxy_username(&auth.username).map_err(|e| {
+ RelayError::Network {
+ message: "Failed to set proxy username".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ self.handle.proxy_password(&auth.password).map_err(|e| {
+ RelayError::Network {
+ message: "Failed to set proxy password".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+ }
+ }
+ }
+
+ if let Some(ref request_headers) = self.request.headers {
+ headers.extend(request_headers.clone());
+ HeadersBuilder::new(self.handle).add_headers(Some(&headers))?;
+ }
+
+ Ok(())
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/src/response.rs b/packages/hoppscotch-desktop/plugin-workspace/relay/src/response.rs
new file mode 100644
index 000000000..6c43d3a5d
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/src/response.rs
@@ -0,0 +1,149 @@
+use std::{collections::HashMap, str::FromStr, time::SystemTime};
+
+use bytes::Bytes;
+use http::{StatusCode, Version};
+use mime::Mime;
+
+use crate::{
+ error::{RelayError, Result},
+ interop::{MediaType, Response, ResponseBody, ResponseMeta, SizeInfo, TimingInfo},
+};
+
+pub(crate) struct ResponseHandler {
+ id: i64,
+ headers: HashMap<String, String>,
+ body: Bytes,
+ status: StatusCode,
+ header_size: u64,
+ start_time: SystemTime,
+ end_time: SystemTime,
+ version: Version,
+}
+
+impl ResponseHandler {
+ pub(crate) fn new(
+ id: i64,
+ headers: HashMap<String, String>,
+ body: Bytes,
+ status: StatusCode,
+ header_size: u64,
+ start_time: SystemTime,
+ end_time: SystemTime,
+ version: Version,
+ ) -> Self {
+ Self {
+ id,
+ headers,
+ body,
+ status,
+ header_size,
+ start_time,
+ end_time,
+ version,
+ }
+ }
+
+ #[tracing::instrument(skip(self), fields(request_id = self.id), level = "debug")]
+ pub(crate) fn build(self) -> Result<Response> {
+ tracing::debug!(status = %self.status, "Building response");
+ let media_type = self.determine_media_type();
+ let timing = self.calculate_timing()?;
+ let size = SizeInfo {
+ headers: self.header_size,
+ body: self.body.len() as u64,
+ total: self.header_size + self.body.len() as u64,
+ };
+
+ tracing::debug!(
+ status = ?self.status,
+ media_type = ?media_type,
+ body_size = size.body,
+ total_size = size.total,
+ version = ?self.version,
+ "Response built successfully"
+ );
+
+ let body = ResponseBody {
+ body: self.body,
+ media_type,
+ };
+
+ Ok(Response {
+ id: self.id,
+ status: self.status,
+ status_text: self.status.to_string(),
+ version: self.version,
+ headers: self.headers,
+ cookies: None,
+ meta: ResponseMeta { timing, size },
+ body,
+ })
+ }
+
+ fn determine_media_type(&self) -> MediaType {
+ tracing::trace!("Determining response content type");
+
+ // TODO: Check for other capitalizations, `content-type` or `CONTENT-TYPE`
+ self.headers
+ .get("Content-Type")
+ .and_then(|content_type| content_type.parse::<Mime>().ok())
+ .and_then(|mime| match (mime.type_(), mime.subtype()) {
+ (mime::APPLICATION, mime::JSON) => Some(MediaType::Json),
+ (mime::APPLICATION, name) if name == "ld+json" => Some(MediaType::JsonLd),
+ (mime::APPLICATION, mime::XML) => Some(MediaType::Xml),
+ (mime::APPLICATION, mime::WWW_FORM_URLENCODED) => Some(MediaType::FormUrlEncoded),
+ (mime::APPLICATION, mime::OCTET_STREAM) => Some(MediaType::OctetStream),
+ (mime::TEXT, mime::PLAIN) => Some(MediaType::TextPlain),
+ (mime::TEXT, mime::HTML) => Some(MediaType::TextHtml),
+ (mime::TEXT, mime::CSS) => Some(MediaType::TextCss),
+ (mime::TEXT, mime::CSV) => Some(MediaType::TextCsv),
+ (mime::TEXT, mime::XML) => Some(MediaType::TextXml),
+ (mime::MULTIPART, name) if name == "form-data" => {
+ Some(MediaType::MultipartFormData)
+ }
+ _ => None,
+ })
+ .or(infer::get(&self.body)
+ .map(|kind| MediaType::from_str(kind.mime_type()).ok())
+ .flatten())
+ .unwrap_or(MediaType::TextPlain)
+ }
+
+ fn calculate_timing(&self) -> Result<TimingInfo> {
+ let start_ms = self
+ .start_time
+ .duration_since(SystemTime::UNIX_EPOCH)
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to get start time");
+ RelayError::Parse {
+ message: "Failed to get start time".into(),
+ cause: Some(e.to_string()),
+ }
+ })?
+ .as_millis() as u64;
+
+ let end_ms = self
+ .end_time
+ .duration_since(SystemTime::UNIX_EPOCH)
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to get end time");
+ RelayError::Parse {
+ message: "Failed to get end time".into(),
+ cause: Some(e.to_string()),
+ }
+ })?
+ .as_millis() as u64;
+
+ tracing::trace!(
+ start_ms = start_ms,
+ end_ms = end_ms,
+ duration_ms = end_ms - start_ms,
+ "Calculated request timing"
+ );
+
+ Ok(TimingInfo {
+ start: start_ms,
+ end: end_ms,
+ })
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/src/security.rs b/packages/hoppscotch-desktop/plugin-workspace/relay/src/security.rs
new file mode 100644
index 000000000..6a2e4dec1
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/src/security.rs
@@ -0,0 +1,173 @@
+use bytes::Bytes;
+use curl::easy::Easy;
+
+use openssl::pkcs12::Pkcs12;
+
+use crate::{
+ error::{RelayError, Result},
+ interop::{CertificateConfig, CertificateType, SecurityConfig},
+};
+
+pub(crate) struct SecurityHandler<'a> {
+ handle: &'a mut Easy,
+}
+
+impl<'a> SecurityHandler<'a> {
+ pub(crate) fn new(handle: &'a mut Easy) -> Self {
+ Self { handle }
+ }
+
+ #[tracing::instrument(skip(self), level = "debug")]
+ pub(crate) fn configure(&mut self, security: &SecurityConfig) -> Result<()> {
+ tracing::info!("Configuring security settings");
+
+ if let Some(verify) = security.verify_peer {
+ tracing::debug!(verify = verify, "Setting SSL verify peer");
+ self.handle.ssl_verify_peer(verify).map_err(|e| {
+ tracing::error!(error = %e, "Failed to set SSL verify peer");
+ RelayError::Certificate {
+ message: "Failed to set SSL verify peer".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+ }
+
+ if let Some(verify) = security.verify_host {
+ tracing::debug!(verify = verify, "Setting SSL verify host");
+ self.handle.ssl_verify_host(verify).map_err(|e| {
+ tracing::error!(error = %e, "Failed to set SSL verify host");
+ RelayError::Certificate {
+ message: "Failed to set SSL verify host".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+ }
+
+ if let Some(ref certs) = security.certificates {
+ self.configure_certificates(certs)?;
+ }
+
+ tracing::debug!("Security configuration complete");
+ Ok(())
+ }
+
+ #[tracing::instrument(skip(self), level = "debug")]
+ fn configure_certificates(&mut self, certs: &CertificateConfig) -> Result<()> {
+ if let Some(ref client_cert) = certs.client {
+ match client_cert {
+ CertificateType::Pem { cert, key } => {
+ tracing::info!("Configuring PEM certificate");
+ self.configure_pem_certificate(cert, key)?;
+ }
+ CertificateType::Pfx { data, password } => {
+ tracing::info!("Configuring PKCS#12 certificate");
+ self.configure_pfx_certificate(data, password)?;
+ }
+ }
+ }
+
+ if let Some(ref ca_certs) = certs.ca {
+ self.configure_ca_certificates(ca_certs)?;
+ }
+
+ Ok(())
+ }
+
+ fn configure_pem_certificate(&mut self, cert: &[u8], key: &[u8]) -> Result<()> {
+ tracing::debug!("Setting PEM certificate type");
+ self.handle.ssl_cert_type("PEM").map_err(|e| {
+ tracing::error!(error = %e, "Failed to set certificate type");
+ RelayError::Certificate {
+ message: "Failed to set certificate type".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::debug!("Setting PEM certificate data");
+ self.handle.ssl_cert_blob(cert).map_err(|e| {
+ tracing::error!(error = %e, "Failed to set client certificate");
+ RelayError::Certificate {
+ message: "Failed to set client certificate".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::debug!("Setting PEM key type");
+ self.handle.ssl_key_type("PEM").map_err(|e| {
+ tracing::error!(error = %e, "Failed to set key type");
+ RelayError::Certificate {
+ message: "Failed to set key type".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::debug!("Setting PEM key data");
+ self.handle.ssl_key_blob(key).map_err(|e| {
+ tracing::error!(error = %e, "Failed to set client key");
+ RelayError::Certificate {
+ message: "Failed to set client key".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ Ok(())
+ }
+
+ fn configure_pfx_certificate(&mut self, data: &[u8], password: &str) -> Result<()> {
+ let pkcs12 = Pkcs12::from_der(data).map_err(|e| {
+ tracing::error!(error = %e, "Failed to parse PKCS#12 data");
+ RelayError::Certificate {
+ message: "Failed to parse PKCS#12 data".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ let parsed = pkcs12.parse2(password).map_err(|e| {
+ tracing::error!(error = %e, "Failed to parse PKCS#12 password");
+ RelayError::Certificate {
+ message: "Failed to parse PKCS#12 password".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ if let (Some(cert), Some(key)) = (parsed.cert, parsed.pkey) {
+ let cert_pem = cert.to_pem().map_err(|e| {
+ tracing::error!(error = %e, "Failed to convert certificate to PEM");
+ RelayError::Certificate {
+ message: "Failed to convert certificate to PEM".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ let key_pem = key.private_key_to_pem_pkcs8().map_err(|e| {
+ tracing::error!(error = %e, "Failed to convert private key to PEM");
+ RelayError::Certificate {
+ message: "Failed to convert private key to PEM".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ self.configure_pem_certificate(&cert_pem, &key_pem)
+ } else {
+ tracing::error!("PKCS#12 file missing certificate or private key");
+ Err(RelayError::Certificate {
+ message: "PKCS#12 file missing certificate or private key".into(),
+ cause: None,
+ })
+ }
+ }
+
+ fn configure_ca_certificates(&mut self, ca_certs: &[Bytes]) -> Result<()> {
+ for (index, cert) in ca_certs.iter().enumerate() {
+ tracing::debug!(cert_index = index, "Setting CA certificate");
+ self.handle.ssl_cainfo_blob(cert).map_err(|e| {
+ tracing::error!(error = %e, cert_index = index, "Failed to set CA certificate");
+ RelayError::Certificate {
+ message: format!("Failed to set CA certificate at index {}", index),
+ cause: Some(e.to_string()),
+ }
+ })?;
+ }
+ Ok(())
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/src/transfer.rs b/packages/hoppscotch-desktop/plugin-workspace/relay/src/transfer.rs
new file mode 100644
index 000000000..f0f1bf2d4
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/src/transfer.rs
@@ -0,0 +1,101 @@
+use std::collections::HashMap;
+
+use bytes::{Bytes, BytesMut};
+use curl::easy::Easy;
+use tokio_util::sync::CancellationToken;
+
+use crate::error::{RelayError, Result};
+
+pub(crate) struct TransferHandler {
+ body: BytesMut,
+ headers: HashMap<String, String>,
+}
+
+impl TransferHandler {
+ pub(crate) fn new() -> Self {
+ Self {
+ body: BytesMut::new(),
+ headers: HashMap::new(),
+ }
+ }
+
+ #[tracing::instrument(skip(self, handle), level = "debug")]
+ pub(crate) fn handle_transfer(
+ &mut self,
+ handle: &mut Easy,
+ cancel_token: &CancellationToken,
+ ) -> Result<()> {
+ tracing::debug!("Setting up transfer handlers");
+ let mut transfer = handle.transfer();
+
+ let body = &mut self.body;
+ let headers = &mut self.headers;
+
+ transfer
+ .write_function(move |data| {
+ body.extend_from_slice(data);
+ tracing::trace!(bytes = data.len(), "Received response data chunk");
+ Ok(data.len())
+ })
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to set write callback");
+ RelayError::Network {
+ message: "Failed to set write callback".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ transfer
+ .header_function(move |header| {
+ if let Ok(header_str) = String::from_utf8(header.to_vec()) {
+ if let Some(idx) = header_str.find(':') {
+ let (key, value) = header_str.split_at(idx);
+ let key = key.trim().to_string();
+ let value = value[1..].trim().to_string();
+
+ headers.entry(key).or_insert(value);
+ }
+ }
+ true
+ })
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to set header callback");
+ RelayError::Network {
+ message: "Failed to set header callback".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ transfer
+ .progress_function(|_, _, _, _| {
+ let cancelled = cancel_token.is_cancelled();
+ if cancelled {
+ tracing::warn!("Request cancelled by user");
+ }
+ !cancelled
+ })
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to set progress callback");
+ RelayError::Network {
+ message: "Failed to set progress callback".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::debug!("Starting transfer");
+ transfer.perform().map_err(|e| {
+ tracing::error!(error = %e, "Failed to perform request");
+ RelayError::Network {
+ message: "Failed to perform request".into(),
+ cause: Some(e.to_string()),
+ }
+ })?;
+
+ tracing::debug!("Transfer completed successfully");
+ Ok(())
+ }
+
+ pub(crate) fn into_parts(self) -> (Bytes, HashMap<String, String>) {
+ (self.body.into(), self.headers)
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/relay/src/util.rs b/packages/hoppscotch-desktop/plugin-workspace/relay/src/util.rs
new file mode 100644
index 000000000..6e1c5ecb6
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/relay/src/util.rs
@@ -0,0 +1,15 @@
+pub trait ToCurlVersion {
+ fn to_curl_version(self) -> curl::easy::HttpVersion;
+}
+
+impl ToCurlVersion for http::Version {
+ fn to_curl_version(self) -> curl::easy::HttpVersion {
+ match self {
+ http::Version::HTTP_10 => curl::easy::HttpVersion::V10,
+ http::Version::HTTP_11 => curl::easy::HttpVersion::V11,
+ http::Version::HTTP_2 => curl::easy::HttpVersion::V2,
+ http::Version::HTTP_3 => curl::easy::HttpVersion::V3,
+ _ => panic!("Unsupported"),
+ }
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/.envrc b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/.envrc
new file mode 100644
index 000000000..894571bf4
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/.envrc
@@ -0,0 +1,3 @@
+source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k="
+
+use devenv
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/.gitignore b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/.gitignore
new file mode 100644
index 000000000..c387dc9f2
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/.gitignore
@@ -0,0 +1,22 @@
+/.vs
+.DS_Store
+.Thumbs.db
+*.sublime*
+.idea/
+debug.log
+package-lock.json
+.vscode/settings.json
+yarn.lock
+
+/.tauri
+/target
+node_modules/
+# Devenv
+.devenv*
+devenv.local.nix
+
+# direnv
+.direnv
+
+# pre-commit
+.pre-commit-config.yaml
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/Cargo.lock b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/Cargo.lock
new file mode 100644
index 000000000..301c20e94
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/Cargo.lock
@@ -0,0 +1,5456 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "addr2line"
+version = "0.24.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler2"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
+
+[[package]]
+name = "aes"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
+dependencies = [
+ "cfg-if",
+ "cipher",
+ "cpufeatures",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "alloc-no-stdlib"
+version = "2.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
+
+[[package]]
+name = "alloc-stdlib"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
+dependencies = [
+ "alloc-no-stdlib",
+]
+
+[[package]]
+name = "allocator-api2"
+version = "0.2.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9"
+
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.93"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775"
+
+[[package]]
+name = "arbitrary"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223"
+dependencies = [
+ "derive_arbitrary",
+]
+
+[[package]]
+name = "arrayref"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"
+
+[[package]]
+name = "arrayvec"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
+
+[[package]]
+name = "atk"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4"
+dependencies = [
+ "atk-sys",
+ "glib",
+ "libc",
+]
+
+[[package]]
+name = "atk-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+
+[[package]]
+name = "backtrace"
+version = "0.3.74"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"
+dependencies = [
+ "addr2line",
+ "cfg-if",
+ "libc",
+ "miniz_oxide",
+ "object",
+ "rustc-demangle",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "base64"
+version = "0.21.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
+
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
+[[package]]
+name = "base64ct"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "blake3"
+version = "1.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e"
+dependencies = [
+ "arrayref",
+ "arrayvec",
+ "cc",
+ "cfg-if",
+ "constant_time_eq",
+ "serde",
+]
+
+[[package]]
+name = "block"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
+
+[[package]]
+name = "block-buffer"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "block2"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f"
+dependencies = [
+ "objc2",
+]
+
+[[package]]
+name = "brotli"
+version = "7.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd"
+dependencies = [
+ "alloc-no-stdlib",
+ "alloc-stdlib",
+ "brotli-decompressor",
+]
+
+[[package]]
+name = "brotli-decompressor"
+version = "4.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362"
+dependencies = [
+ "alloc-no-stdlib",
+ "alloc-stdlib",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
+
+[[package]]
+name = "bytemuck"
+version = "1.20.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "bytes"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "bzip2"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
+dependencies = [
+ "bzip2-sys",
+ "libc",
+]
+
+[[package]]
+name = "bzip2-sys"
+version = "0.1.11+1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+]
+
+[[package]]
+name = "cairo-rs"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2"
+dependencies = [
+ "bitflags 2.6.0",
+ "cairo-sys-rs",
+ "glib",
+ "libc",
+ "once_cell",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "cairo-sys-rs"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51"
+dependencies = [
+ "glib-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "camino"
+version = "1.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "cargo-platform"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "cargo_metadata"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037"
+dependencies = [
+ "camino",
+ "cargo-platform",
+ "semver",
+ "serde",
+ "serde_json",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "cargo_toml"
+version = "0.17.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719"
+dependencies = [
+ "serde",
+ "toml 0.8.2",
+]
+
+[[package]]
+name = "cc"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc"
+dependencies = [
+ "jobserver",
+ "libc",
+ "shlex",
+]
+
+[[package]]
+name = "cesu8"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
+
+[[package]]
+name = "cfb"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f"
+dependencies = [
+ "byteorder",
+ "fnv",
+ "uuid",
+]
+
+[[package]]
+name = "cfg-expr"
+version = "0.15.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
+dependencies = [
+ "smallvec",
+ "target-lexicon",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "cfg_aliases"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
+
+[[package]]
+name = "chrono"
+version = "0.4.38"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "serde",
+ "wasm-bindgen",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "cipher"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
+dependencies = [
+ "crypto-common",
+ "inout",
+]
+
+[[package]]
+name = "cocoa"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2"
+dependencies = [
+ "bitflags 2.6.0",
+ "block",
+ "cocoa-foundation",
+ "core-foundation 0.10.0",
+ "core-graphics",
+ "foreign-types 0.5.0",
+ "libc",
+ "objc",
+]
+
+[[package]]
+name = "cocoa-foundation"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d"
+dependencies = [
+ "bitflags 2.6.0",
+ "block",
+ "core-foundation 0.10.0",
+ "core-graphics-types",
+ "libc",
+ "objc",
+]
+
+[[package]]
+name = "combine"
+version = "4.6.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd"
+dependencies = [
+ "bytes",
+ "memchr",
+]
+
+[[package]]
+name = "const-oid"
+version = "0.9.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
+
+[[package]]
+name = "constant_time_eq"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6"
+
+[[package]]
+name = "convert_case"
+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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+
+[[package]]
+name = "core-graphics"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1"
+dependencies = [
+ "bitflags 2.6.0",
+ "core-foundation 0.10.0",
+ "core-graphics-types",
+ "foreign-types 0.5.0",
+ "libc",
+]
+
+[[package]]
+name = "core-graphics-types"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb"
+dependencies = [
+ "bitflags 2.6.0",
+ "core-foundation 0.10.0",
+ "libc",
+]
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc"
+version = "3.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
+dependencies = [
+ "crc-catalog",
+]
+
+[[package]]
+name = "crc-catalog"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
+
+[[package]]
+name = "crc32fast"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crossbeam-channel"
+version = "0.5.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
+dependencies = [
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "cssparser"
+version = "0.27.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a"
+dependencies = [
+ "cssparser-macros",
+ "dtoa-short",
+ "itoa 0.4.8",
+ "matches",
+ "phf 0.8.0",
+ "proc-macro2",
+ "quote",
+ "smallvec",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "cssparser-macros"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
+dependencies = [
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "ctor"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501"
+dependencies = [
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "curve25519-dalek"
+version = "4.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "curve25519-dalek-derive",
+ "digest",
+ "fiat-crypto",
+ "rustc_version",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "curve25519-dalek-derive"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "darling"
+version = "0.20.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
+dependencies = [
+ "darling_core",
+ "darling_macro",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.20.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
+dependencies = [
+ "fnv",
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.20.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
+dependencies = [
+ "darling_core",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "dashmap"
+version = "6.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf"
+dependencies = [
+ "cfg-if",
+ "crossbeam-utils",
+ "hashbrown 0.14.5",
+ "lock_api",
+ "once_cell",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "deflate64"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b"
+
+[[package]]
+name = "der"
+version = "0.7.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0"
+dependencies = [
+ "const-oid",
+ "zeroize",
+]
+
+[[package]]
+name = "deranged"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+dependencies = [
+ "powerfmt",
+ "serde",
+]
+
+[[package]]
+name = "derive_arbitrary"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "derive_more"
+version = "0.99.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce"
+dependencies = [
+ "convert_case",
+ "proc-macro2",
+ "quote",
+ "rustc_version",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+dependencies = [
+ "block-buffer",
+ "crypto-common",
+ "subtle",
+]
+
+[[package]]
+name = "dirs"
+version = "5.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
+dependencies = [
+ "dirs-sys",
+]
+
+[[package]]
+name = "dirs-sys"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
+dependencies = [
+ "libc",
+ "option-ext",
+ "redox_users",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "dispatch"
+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.89",
+]
+
+[[package]]
+name = "dlopen2"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e1297103d2bbaea85724fcee6294c2d50b1081f9ad47d0f6f6f61eda65315a6"
+dependencies = [
+ "dlopen2_derive",
+ "libc",
+ "once_cell",
+ "winapi",
+]
+
+[[package]]
+name = "dlopen2_derive"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "dpi"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "dtoa"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653"
+
+[[package]]
+name = "dtoa-short"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87"
+dependencies = [
+ "dtoa",
+]
+
+[[package]]
+name = "dunce"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
+
+[[package]]
+name = "dyn-clone"
+version = "1.0.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
+
+[[package]]
+name = "ed25519"
+version = "2.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53"
+dependencies = [
+ "pkcs8",
+ "serde",
+ "signature",
+]
+
+[[package]]
+name = "ed25519-dalek"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871"
+dependencies = [
+ "curve25519-dalek",
+ "ed25519",
+ "rand_core 0.6.4",
+ "serde",
+ "sha2",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "either"
+version = "1.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
+
+[[package]]
+name = "embed-resource"
+version = "2.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b68b6f9f63a0b6a38bc447d4ce84e2b388f3ec95c99c641c8ff0dd3ef89a6379"
+dependencies = [
+ "cc",
+ "memchr",
+ "rustc_version",
+ "toml 0.8.2",
+ "vswhom",
+ "winreg",
+]
+
+[[package]]
+name = "embed_plist"
+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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
+name = "erased-serde"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d"
+dependencies = [
+ "serde",
+ "typeid",
+]
+
+[[package]]
+name = "errno"
+version = "0.3.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
+dependencies = [
+ "libc",
+ "windows-sys 0.59.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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07c6f4c64c1d33a3111c4466f7365ebdcc37c5bd1ea0d62aae2e3d722aacbedb"
+dependencies = [
+ "simd-adler32",
+]
+
+[[package]]
+name = "fiat-crypto"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
+
+[[package]]
+name = "field-offset"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
+dependencies = [
+ "memoffset",
+ "rustc_version",
+]
+
+[[package]]
+name = "flate2"
+version = "1.0.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "foldhash"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2"
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"
+dependencies = [
+ "foreign-types-macros",
+ "foreign-types-shared 0.3.1",
+]
+
+[[package]]
+name = "foreign-types-macros"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "futf"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843"
+dependencies = [
+ "mac",
+ "new_debug_unreachable",
+]
+
+[[package]]
+name = "futures"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
+
+[[package]]
+name = "futures-executor"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-io"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
+
+[[package]]
+name = "futures-macro"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
+
+[[package]]
+name = "futures-task"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
+
+[[package]]
+name = "futures-util"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+]
+
+[[package]]
+name = "fxhash"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "gdk"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646"
+dependencies = [
+ "cairo-rs",
+ "gdk-pixbuf",
+ "gdk-sys",
+ "gio",
+ "glib",
+ "libc",
+ "pango",
+]
+
+[[package]]
+name = "gdk-pixbuf"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec"
+dependencies = [
+ "gdk-pixbuf-sys",
+ "gio",
+ "glib",
+ "libc",
+ "once_cell",
+]
+
+[[package]]
+name = "gdk-pixbuf-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7"
+dependencies = [
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gdk-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2"
+dependencies = [
+ "cairo-sys-rs",
+ "gdk-pixbuf-sys",
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "pango-sys",
+ "pkg-config",
+ "system-deps",
+]
+
+[[package]]
+name = "gdkwayland-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a90fbf5c033c65d93792192a49a8efb5bb1e640c419682a58bb96f5ae77f3d4a"
+dependencies = [
+ "gdk-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "pkg-config",
+ "system-deps",
+]
+
+[[package]]
+name = "gdkx11"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db2ea8a4909d530f79921290389cbd7c34cb9d623bfe970eaae65ca5f9cd9cce"
+dependencies = [
+ "gdk",
+ "gdkx11-sys",
+ "gio",
+ "glib",
+ "libc",
+ "x11",
+]
+
+[[package]]
+name = "gdkx11-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043"
+dependencies = [
+ "gdk-sys",
+ "glib-sys",
+ "libc",
+ "system-deps",
+ "x11",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.9.0+wasi-snapshot-preview1",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+]
+
+[[package]]
+name = "gimli"
+version = "0.31.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
+
+[[package]]
+name = "gio"
+version = "0.18.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-util",
+ "gio-sys",
+ "glib",
+ "libc",
+ "once_cell",
+ "pin-project-lite",
+ "smallvec",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "gio-sys"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+ "winapi",
+]
+
+[[package]]
+name = "glib"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5"
+dependencies = [
+ "bitflags 2.6.0",
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-task",
+ "futures-util",
+ "gio-sys",
+ "glib-macros",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "memchr",
+ "once_cell",
+ "smallvec",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "glib-macros"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc"
+dependencies = [
+ "heck 0.4.1",
+ "proc-macro-crate 2.0.2",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "glib-sys"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898"
+dependencies = [
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "glob"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
+
+[[package]]
+name = "gobject-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44"
+dependencies = [
+ "glib-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gtk"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c"
+dependencies = [
+ "atk",
+ "cairo-rs",
+ "field-offset",
+ "futures-channel",
+ "gdk",
+ "gdk-pixbuf",
+ "gio",
+ "glib",
+ "gtk-sys",
+ "gtk3-macros",
+ "libc",
+ "pango",
+ "pkg-config",
+]
+
+[[package]]
+name = "gtk-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722"
+dependencies = [
+ "atk-sys",
+ "cairo-sys-rs",
+ "gdk-pixbuf-sys",
+ "gdk-sys",
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "pango-sys",
+ "system-deps",
+]
+
+[[package]]
+name = "gtk3-macros"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e"
+dependencies = [
+ "proc-macro-crate 1.3.1",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "h2"
+version = "0.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e"
+dependencies = [
+ "atomic-waker",
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "http",
+ "indexmap 2.6.0",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+
+[[package]]
+name = "hashbrown"
+version = "0.14.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
+
+[[package]]
+name = "hashbrown"
+version = "0.15.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
+dependencies = [
+ "allocator-api2",
+ "equivalent",
+ "foldhash",
+]
+
+[[package]]
+name = "heck"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "hermit-abi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
+
+[[package]]
+name = "hex"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
+
+[[package]]
+name = "hex_color"
+version = "3.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d37f101bf4c633f7ca2e4b5e136050314503dd198e78e325ea602c327c484ef0"
+dependencies = [
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "hmac"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
+dependencies = [
+ "digest",
+]
+
+[[package]]
+name = "html5ever"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7"
+dependencies = [
+ "log",
+ "mac",
+ "markup5ever",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "http"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa 1.0.14",
+]
+
+[[package]]
+name = "http-body"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
+dependencies = [
+ "bytes",
+ "http",
+]
+
+[[package]]
+name = "http-body-util"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
+dependencies = [
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "httparse"
+version = "1.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946"
+
+[[package]]
+name = "humantime"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
+
+[[package]]
+name = "humantime-serde"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c"
+dependencies = [
+ "humantime",
+ "serde",
+]
+
+[[package]]
+name = "hyper"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "httparse",
+ "itoa 1.0.14",
+ "pin-project-lite",
+ "smallvec",
+ "tokio",
+ "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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "http",
+ "http-body",
+ "hyper",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.61"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows-core 0.52.0",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "ico"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3804960be0bb5e4edb1e1ad67afd321a9ecfd875c3e65c099468fd2717d7cae"
+dependencies = [
+ "byteorder",
+ "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.89",
+]
+
+[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
+[[package]]
+name = "idna"
+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 = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71"
+dependencies = [
+ "icu_normalizer",
+ "icu_properties",
+]
+
+[[package]]
+name = "indexmap"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+dependencies = [
+ "autocfg",
+ "hashbrown 0.12.3",
+ "serde",
+]
+
+[[package]]
+name = "indexmap"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.15.2",
+ "serde",
+]
+
+[[package]]
+name = "infer"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc150e5ce2330295b8616ce0e3f53250e53af31759a9dbedad1621ba29151847"
+dependencies = [
+ "cfb",
+]
+
+[[package]]
+name = "inout"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "instant"
+version = "0.1.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "ipnet"
+version = "2.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708"
+
+[[package]]
+name = "itoa"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
+
+[[package]]
+name = "itoa"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
+
+[[package]]
+name = "javascriptcore-rs"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc"
+dependencies = [
+ "bitflags 1.3.2",
+ "glib",
+ "javascriptcore-rs-sys",
+]
+
+[[package]]
+name = "javascriptcore-rs-sys"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "jni"
+version = "0.21.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97"
+dependencies = [
+ "cesu8",
+ "cfg-if",
+ "combine",
+ "jni-sys",
+ "log",
+ "thiserror 1.0.69",
+ "walkdir",
+ "windows-sys 0.45.0",
+]
+
+[[package]]
+name = "jni-sys"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
+
+[[package]]
+name = "jobserver"
+version = "0.1.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "js-sys"
+version = "0.3.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "json-patch"
+version = "3.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08"
+dependencies = [
+ "jsonptr",
+ "serde",
+ "serde_json",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "jsonptr"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5dea2b27dd239b2556ed7a25ba842fe47fd602e7fc7433c2a8d6106d4d9edd70"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "keyboard-types"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a"
+dependencies = [
+ "bitflags 2.6.0",
+ "serde",
+ "unicode-segmentation",
+]
+
+[[package]]
+name = "kuchikiki"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8"
+dependencies = [
+ "cssparser",
+ "html5ever",
+ "indexmap 1.9.3",
+ "matches",
+ "selectors",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+
+[[package]]
+name = "libappindicator"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a"
+dependencies = [
+ "glib",
+ "gtk",
+ "gtk-sys",
+ "libappindicator-sys",
+ "log",
+]
+
+[[package]]
+name = "libappindicator-sys"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf"
+dependencies = [
+ "gtk-sys",
+ "libloading",
+ "once_cell",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.167"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc"
+
+[[package]]
+name = "libloading"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
+dependencies = [
+ "cfg-if",
+ "winapi",
+]
+
+[[package]]
+name = "libredox"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
+dependencies = [
+ "bitflags 2.6.0",
+ "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.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
+
+[[package]]
+name = "lock_api"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "lockfree-object-pool"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e"
+
+[[package]]
+name = "log"
+version = "0.4.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
+
+[[package]]
+name = "lru"
+version = "0.12.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
+dependencies = [
+ "hashbrown 0.15.2",
+]
+
+[[package]]
+name = "lzma-rs"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e"
+dependencies = [
+ "byteorder",
+ "crc",
+]
+
+[[package]]
+name = "mac"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
+
+[[package]]
+name = "malloc_buf"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "markup5ever"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016"
+dependencies = [
+ "log",
+ "phf 0.10.1",
+ "phf_codegen 0.10.0",
+ "string_cache",
+ "string_cache_codegen",
+ "tendril",
+]
+
+[[package]]
+name = "matches"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
+
+[[package]]
+name = "memchr"
+version = "2.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+
+[[package]]
+name = "memoffset"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "mime"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
+
+[[package]]
+name = "mime-infer"
+version = "3.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91caed19dd472bc88bcd063571df18153529d49301a1918f4cf37f42332bee2e"
+dependencies = [
+ "mime",
+ "unicase",
+]
+
+[[package]]
+name = "mime_guess"
+version = "2.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
+dependencies = [
+ "mime",
+ "unicase",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
+dependencies = [
+ "adler2",
+ "simd-adler32",
+]
+
+[[package]]
+name = "mio"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "muda"
+version = "0.15.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fdae9c00e61cc0579bcac625e8ad22104c60548a025bfc972dc83868a28e1484"
+dependencies = [
+ "crossbeam-channel",
+ "dpi",
+ "gtk",
+ "keyboard-types",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "once_cell",
+ "png",
+ "serde",
+ "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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"
+dependencies = [
+ "bitflags 2.6.0",
+ "jni-sys",
+ "log",
+ "ndk-sys",
+ "num_enum",
+ "raw-window-handle",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "ndk-context"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
+
+[[package]]
+name = "ndk-sys"
+version = "0.6.0+11769913"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873"
+dependencies = [
+ "jni-sys",
+]
+
+[[package]]
+name = "new_debug_unreachable"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
+
+[[package]]
+name = "nodrop"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
+
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "num_enum"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179"
+dependencies = [
+ "num_enum_derive",
+]
+
+[[package]]
+name = "num_enum_derive"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
+dependencies = [
+ "proc-macro-crate 2.0.2",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "objc"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
+dependencies = [
+ "malloc_buf",
+]
+
+[[package]]
+name = "objc-sys"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "objc2"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804"
+dependencies = [
+ "objc-sys",
+ "objc2-encode",
+]
+
+[[package]]
+name = "objc2-app-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "libc",
+ "objc2",
+ "objc2-core-data",
+ "objc2-core-image",
+ "objc2-foundation",
+ "objc2-quartz-core",
+]
+
+[[package]]
+name = "objc2-cloud-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-core-location",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-contacts"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-core-data"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-core-image"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-foundation",
+ "objc2-metal",
+]
+
+[[package]]
+name = "objc2-core-location"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-contacts",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-encode"
+version = "4.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8"
+
+[[package]]
+name = "objc2-foundation"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "libc",
+ "objc2",
+]
+
+[[package]]
+name = "objc2-link-presentation"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-metal"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-quartz-core"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-foundation",
+ "objc2-metal",
+]
+
+[[package]]
+name = "objc2-symbols"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc"
+dependencies = [
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-ui-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-cloud-kit",
+ "objc2-core-data",
+ "objc2-core-image",
+ "objc2-core-location",
+ "objc2-foundation",
+ "objc2-link-presentation",
+ "objc2-quartz-core",
+ "objc2-symbols",
+ "objc2-uniform-type-identifiers",
+ "objc2-user-notifications",
+]
+
+[[package]]
+name = "objc2-uniform-type-identifiers"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-user-notifications"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-core-location",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-web-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68bc69301064cebefc6c4c90ce9cba69225239e4b8ff99d445a2b5563797da65"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "object"
+version = "0.36.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "once_cell"
+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.89",
+]
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
+
+[[package]]
+name = "pango"
+version = "0.18.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4"
+dependencies = [
+ "gio",
+ "glib",
+ "libc",
+ "once_cell",
+ "pango-sys",
+]
+
+[[package]]
+name = "pango-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "parking_lot"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "pbkdf2"
+version = "0.12.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
+dependencies = [
+ "digest",
+ "hmac",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+
+[[package]]
+name = "phf"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"
+dependencies = [
+ "phf_macros 0.8.0",
+ "phf_shared 0.8.0",
+ "proc-macro-hack",
+]
+
+[[package]]
+name = "phf"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
+dependencies = [
+ "phf_shared 0.10.0",
+]
+
+[[package]]
+name = "phf"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
+dependencies = [
+ "phf_macros 0.11.2",
+ "phf_shared 0.11.2",
+]
+
+[[package]]
+name = "phf_codegen"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815"
+dependencies = [
+ "phf_generator 0.8.0",
+ "phf_shared 0.8.0",
+]
+
+[[package]]
+name = "phf_codegen"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd"
+dependencies = [
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526"
+dependencies = [
+ "phf_shared 0.8.0",
+ "rand 0.7.3",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
+dependencies = [
+ "phf_shared 0.10.0",
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0"
+dependencies = [
+ "phf_shared 0.11.2",
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "phf_macros"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c"
+dependencies = [
+ "phf_generator 0.8.0",
+ "phf_shared 0.8.0",
+ "proc-macro-hack",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "phf_macros"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"
+dependencies = [
+ "phf_generator 0.11.2",
+ "phf_shared 0.11.2",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "pkcs8"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
+dependencies = [
+ "der",
+ "spki",
+]
+
+[[package]]
+name = "pkg-config"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
+
+[[package]]
+name = "plist"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016"
+dependencies = [
+ "base64 0.22.1",
+ "indexmap 2.6.0",
+ "quick-xml",
+ "serde",
+ "time",
+]
+
+[[package]]
+name = "png"
+version = "0.17.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "52f9d46a34a05a6a57566bc2bfae066ef07585a6e3fa30fbbdff5936380623f0"
+dependencies = [
+ "bitflags 1.3.2",
+ "crc32fast",
+ "fdeflate",
+ "flate2",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
+dependencies = [
+ "zerocopy",
+]
+
+[[package]]
+name = "precomputed-hash"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
+
+[[package]]
+name = "proc-macro-crate"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
+dependencies = [
+ "once_cell",
+ "toml_edit 0.19.15",
+]
+
+[[package]]
+name = "proc-macro-crate"
+version = "2.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24"
+dependencies = [
+ "toml_datetime",
+ "toml_edit 0.20.2",
+]
+
+[[package]]
+name = "proc-macro-error"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+dependencies = [
+ "proc-macro-error-attr",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-error-attr"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-hack"
+version = "0.5.20+deprecated"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.92"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quick-xml"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rand"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
+dependencies = [
+ "getrandom 0.1.16",
+ "libc",
+ "rand_chacha 0.2.2",
+ "rand_core 0.5.1",
+ "rand_hc",
+ "rand_pcg",
+]
+
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha 0.3.1",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
+dependencies = [
+ "getrandom 0.1.16",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom 0.2.15",
+]
+
+[[package]]
+name = "rand_hc"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
+dependencies = [
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "rand_pcg"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429"
+dependencies = [
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "raw-window-handle"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
+
+[[package]]
+name = "rayon"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
+dependencies = [
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
+dependencies = [
+ "crossbeam-deque",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
+dependencies = [
+ "bitflags 2.6.0",
+]
+
+[[package]]
+name = "redox_users"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
+dependencies = [
+ "getrandom 0.2.15",
+ "libredox",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "regex"
+version = "1.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+
+[[package]]
+name = "reqwest"
+version = "0.12.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+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",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-streams",
+ "web-sys",
+ "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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+
+[[package]]
+name = "rustc_version"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
+dependencies = [
+ "semver",
+]
+
+[[package]]
+name = "rustix"
+version = "0.38.41"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6"
+dependencies = [
+ "bitflags 2.6.0",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "rustls"
+version = "0.23.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1"
+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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "schannel"
+version = "0.1.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
+dependencies = [
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "schemars"
+version = "0.8.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92"
+dependencies = [
+ "dyn-clone",
+ "indexmap 1.9.3",
+ "schemars_derive",
+ "serde",
+ "serde_json",
+ "url",
+ "uuid",
+]
+
+[[package]]
+name = "schemars_derive"
+version = "0.8.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde_derive_internals",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "scopeguard"
+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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe"
+dependencies = [
+ "bitflags 1.3.2",
+ "cssparser",
+ "derive_more",
+ "fxhash",
+ "log",
+ "matches",
+ "phf 0.8.0",
+ "phf_codegen 0.8.0",
+ "precomputed-hash",
+ "servo_arc",
+ "smallvec",
+ "thin-slice",
+]
+
+[[package]]
+name = "semver"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.215"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde-untagged"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2676ba99bd82f75cae5cbd2c8eda6fa0b8760f18978ea840e980dd5567b5c5b6"
+dependencies = [
+ "erased-serde",
+ "serde",
+ "typeid",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.215"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "serde_derive_internals"
+version = "0.29.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.133"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
+dependencies = [
+ "itoa 1.0.14",
+ "memchr",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_repr"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "serde_spanned"
+version = "0.6.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde_urlencoded"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
+dependencies = [
+ "form_urlencoded",
+ "itoa 1.0.14",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_with"
+version = "3.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817"
+dependencies = [
+ "base64 0.22.1",
+ "chrono",
+ "hex",
+ "indexmap 1.9.3",
+ "indexmap 2.6.0",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "serde_with_macros",
+ "time",
+]
+
+[[package]]
+name = "serde_with_macros"
+version = "3.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d"
+dependencies = [
+ "darling",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "serialize-to-javascript"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c9823f2d3b6a81d98228151fdeaf848206a7855a7a042bbf9bf870449a66cafb"
+dependencies = [
+ "serde",
+ "serde_json",
+ "serialize-to-javascript-impl",
+]
+
+[[package]]
+name = "serialize-to-javascript-impl"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74064874e9f6a15f04c1f3cb627902d0e6b410abbf36668afa873c61889f1763"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "servo_arc"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432"
+dependencies = [
+ "nodrop",
+ "stable_deref_trait",
+]
+
+[[package]]
+name = "sha1"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
+name = "signature"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
+dependencies = [
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "simd-adler32"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
+
+[[package]]
+name = "siphasher"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
+
+[[package]]
+name = "slab"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
+
+[[package]]
+name = "socket2"
+version = "0.5.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8"
+dependencies = [
+ "libc",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "softbuffer"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18051cdd562e792cad055119e0cdb2cfc137e44e3987532e0f9659a77931bb08"
+dependencies = [
+ "bytemuck",
+ "cfg_aliases",
+ "core-graphics",
+ "foreign-types 0.5.0",
+ "js-sys",
+ "log",
+ "objc2",
+ "objc2-foundation",
+ "objc2-quartz-core",
+ "raw-window-handle",
+ "redox_syscall",
+ "wasm-bindgen",
+ "web-sys",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "soup3"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f"
+dependencies = [
+ "futures-channel",
+ "gio",
+ "glib",
+ "libc",
+ "soup3-sys",
+]
+
+[[package]]
+name = "soup3-sys"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27"
+dependencies = [
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "spin"
+version = "0.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
+
+[[package]]
+name = "spki"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
+dependencies = [
+ "base64ct",
+ "der",
+]
+
+[[package]]
+name = "stable_deref_trait"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
+
+[[package]]
+name = "string_cache"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
+dependencies = [
+ "new_debug_unreachable",
+ "once_cell",
+ "parking_lot",
+ "phf_shared 0.10.0",
+ "precomputed-hash",
+ "serde",
+]
+
+[[package]]
+name = "string_cache_codegen"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
+dependencies = [
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
+name = "strsim"
+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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7"
+dependencies = [
+ "base64 0.21.7",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.109"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "sync_wrapper"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
+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.89",
+]
+
+[[package]]
+name = "sys-info"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b3a0d0aba8bf96a0e1ddfdc352fc53b3df7f39318c71854910c3c4b024ae52c"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"
+dependencies = [
+ "cfg-expr",
+ "heck 0.5.0",
+ "pkg-config",
+ "toml 0.8.2",
+ "version-compare",
+]
+
+[[package]]
+name = "tao"
+version = "0.30.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6682a07cf5bab0b8a2bd20d0a542917ab928b5edb75ebd4eda6b05cbaab872da"
+dependencies = [
+ "bitflags 2.6.0",
+ "cocoa",
+ "core-foundation 0.10.0",
+ "core-graphics",
+ "crossbeam-channel",
+ "dispatch",
+ "dlopen2",
+ "dpi",
+ "gdkwayland-sys",
+ "gdkx11-sys",
+ "gtk",
+ "instant",
+ "jni",
+ "lazy_static",
+ "libc",
+ "log",
+ "ndk",
+ "ndk-context",
+ "ndk-sys",
+ "objc",
+ "once_cell",
+ "parking_lot",
+ "raw-window-handle",
+ "scopeguard",
+ "tao-macros",
+ "unicode-segmentation",
+ "url",
+ "windows 0.58.0",
+ "windows-core 0.58.0",
+ "windows-version",
+ "x11-dl",
+]
+
+[[package]]
+name = "tao-macros"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "target-lexicon"
+version = "0.12.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
+
+[[package]]
+name = "tauri"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e545de0a2dfe296fa67db208266cd397c5a55ae782da77973ef4c4fac90e9f2c"
+dependencies = [
+ "anyhow",
+ "bytes",
+ "dirs",
+ "dunce",
+ "embed_plist",
+ "futures-util",
+ "getrandom 0.2.15",
+ "glob",
+ "gtk",
+ "heck 0.5.0",
+ "http",
+ "jni",
+ "libc",
+ "log",
+ "mime",
+ "muda",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "percent-encoding",
+ "plist",
+ "raw-window-handle",
+ "reqwest",
+ "serde",
+ "serde_json",
+ "serde_repr",
+ "serialize-to-javascript",
+ "swift-rs",
+ "tauri-build",
+ "tauri-macros",
+ "tauri-runtime",
+ "tauri-runtime-wry",
+ "tauri-utils",
+ "thiserror 2.0.3",
+ "tokio",
+ "tray-icon",
+ "url",
+ "urlpattern",
+ "webkit2gtk",
+ "webview2-com",
+ "window-vibrancy",
+ "windows 0.58.0",
+]
+
+[[package]]
+name = "tauri-build"
+version = "2.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7bd2a4bcfaf5fb9f4be72520eefcb61ae565038f8ccba2a497d8c28f463b8c01"
+dependencies = [
+ "anyhow",
+ "cargo_toml",
+ "dirs",
+ "glob",
+ "heck 0.5.0",
+ "json-patch",
+ "schemars",
+ "semver",
+ "serde",
+ "serde_json",
+ "tauri-utils",
+ "tauri-winres",
+ "toml 0.8.2",
+ "walkdir",
+]
+
+[[package]]
+name = "tauri-codegen"
+version = "2.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf79faeecf301d3e969b1fae977039edb77a4c1f25cc0a961be298b54bff97cf"
+dependencies = [
+ "base64 0.22.1",
+ "brotli",
+ "ico",
+ "json-patch",
+ "plist",
+ "png",
+ "proc-macro2",
+ "quote",
+ "semver",
+ "serde",
+ "serde_json",
+ "sha2",
+ "syn 2.0.89",
+ "tauri-utils",
+ "thiserror 2.0.3",
+ "time",
+ "url",
+ "uuid",
+ "walkdir",
+]
+
+[[package]]
+name = "tauri-macros"
+version = "2.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c52027c8c5afb83166dacddc092ee8fff50772f9646d461d8c33ee887e447a03"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+ "tauri-codegen",
+ "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-appload"
+version = "0.1.0"
+dependencies = [
+ "base64 0.22.1",
+ "blake3",
+ "chrono",
+ "cocoa",
+ "dashmap",
+ "ed25519-dalek",
+ "flate2",
+ "futures",
+ "hex",
+ "hex_color",
+ "humantime-serde",
+ "lru",
+ "mime-infer",
+ "mime_guess",
+ "objc",
+ "rand 0.8.5",
+ "rayon",
+ "regex",
+ "reqwest",
+ "serde",
+ "serde_json",
+ "sys-info",
+ "tauri",
+ "tauri-plugin",
+ "thiserror 2.0.3",
+ "tokio",
+ "tracing",
+ "url",
+ "windows 0.58.0",
+ "winver",
+ "zip",
+]
+
+[[package]]
+name = "tauri-runtime"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cce18d43f80d4aba3aa8a0c953bbe835f3d0f2370aca75e8dbb14bd4bab27958"
+dependencies = [
+ "dpi",
+ "gtk",
+ "http",
+ "jni",
+ "raw-window-handle",
+ "serde",
+ "serde_json",
+ "tauri-utils",
+ "thiserror 2.0.3",
+ "url",
+ "windows 0.58.0",
+]
+
+[[package]]
+name = "tauri-runtime-wry"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f442a38863e10129ffe2cec7bd09c2dcf8a098a3a27801a476a304d5bb991d2"
+dependencies = [
+ "gtk",
+ "http",
+ "jni",
+ "log",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "percent-encoding",
+ "raw-window-handle",
+ "softbuffer",
+ "tao",
+ "tauri-runtime",
+ "tauri-utils",
+ "url",
+ "webkit2gtk",
+ "webview2-com",
+ "windows 0.58.0",
+ "wry",
+]
+
+[[package]]
+name = "tauri-utils"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9271a88f99b4adea0dc71d0baca4505475a0bbd139fb135f62958721aaa8fe54"
+dependencies = [
+ "brotli",
+ "cargo_metadata",
+ "ctor",
+ "dunce",
+ "glob",
+ "html5ever",
+ "http",
+ "infer",
+ "json-patch",
+ "kuchikiki",
+ "log",
+ "memchr",
+ "phf 0.11.2",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "schemars",
+ "semver",
+ "serde",
+ "serde-untagged",
+ "serde_json",
+ "serde_with",
+ "swift-rs",
+ "thiserror 2.0.3",
+ "toml 0.8.2",
+ "url",
+ "urlpattern",
+ "uuid",
+ "walkdir",
+]
+
+[[package]]
+name = "tauri-winres"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5993dc129e544393574288923d1ec447c857f3f644187f4fbf7d9a875fbfc4fb"
+dependencies = [
+ "embed-resource",
+ "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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0"
+dependencies = [
+ "futf",
+ "mac",
+ "utf-8",
+]
+
+[[package]]
+name = "thin-slice"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
+
+[[package]]
+name = "thiserror"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl 1.0.69",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa"
+dependencies = [
+ "thiserror-impl 2.0.3",
+]
+
+[[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.89",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "time"
+version = "0.3.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
+dependencies = [
+ "deranged",
+ "itoa 1.0.14",
+ "num-conv",
+ "powerfmt",
+ "serde",
+ "time-core",
+ "time-macros",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
+
+[[package]]
+name = "time-macros"
+version = "0.2.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
+dependencies = [
+ "num-conv",
+ "time-core",
+]
+
+[[package]]
+name = "tinystr"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
+dependencies = [
+ "displaydoc",
+ "zerovec",
+]
+
+[[package]]
+name = "tokio"
+version = "1.41.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33"
+dependencies = [
+ "backtrace",
+ "bytes",
+ "libc",
+ "mio",
+ "pin-project-lite",
+ "socket2",
+ "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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "toml"
+version = "0.7.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit 0.19.15",
+]
+
+[[package]]
+name = "toml"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit 0.20.2",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.19.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
+dependencies = [
+ "indexmap 2.6.0",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "winnow",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.20.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338"
+dependencies = [
+ "indexmap 2.6.0",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "winnow",
+]
+
+[[package]]
+name = "tower-service"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
+
+[[package]]
+name = "tracing"
+version = "0.1.41"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
+dependencies = [
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c"
+dependencies = [
+ "once_cell",
+]
+
+[[package]]
+name = "tray-icon"
+version = "0.19.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d48a05076dd272615d03033bf04f480199f7d1b66a8ac64d75c625fc4a70c06b"
+dependencies = [
+ "core-graphics",
+ "crossbeam-channel",
+ "dirs",
+ "libappindicator",
+ "muda",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "once_cell",
+ "png",
+ "serde",
+ "thiserror 1.0.69",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "try-lock"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
+
+[[package]]
+name = "typeid"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e"
+
+[[package]]
+name = "typenum"
+version = "1.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+
+[[package]]
+name = "unic-char-property"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221"
+dependencies = [
+ "unic-char-range",
+]
+
+[[package]]
+name = "unic-char-range"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc"
+
+[[package]]
+name = "unic-common"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc"
+
+[[package]]
+name = "unic-ucd-ident"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987"
+dependencies = [
+ "unic-char-property",
+ "unic-char-range",
+ "unic-ucd-version",
+]
+
+[[package]]
+name = "unic-ucd-version"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4"
+dependencies = [
+ "unic-common",
+]
+
+[[package]]
+name = "unicase"
+version = "2.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
+
+[[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.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+ "serde",
+]
+
+[[package]]
+name = "urlpattern"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d"
+dependencies = [
+ "regex",
+ "serde",
+ "unic-ucd-ident",
+ "url",
+]
+
+[[package]]
+name = "utf-8"
+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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a"
+dependencies = [
+ "getrandom 0.2.15",
+ "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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b"
+
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[package]]
+name = "vswhom"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b"
+dependencies = [
+ "libc",
+ "vswhom-sys",
+]
+
+[[package]]
+name = "vswhom-sys"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3b17ae1f6c8a2b28506cd96d412eebf83b4a0ff2cbefeeb952f2f9dfa44ba18"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "walkdir"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
+[[package]]
+name = "want"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
+dependencies = [
+ "try-lock",
+]
+
+[[package]]
+name = "wasi"
+version = "0.9.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.45"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
+
+[[package]]
+name = "wasm-streams"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65"
+dependencies = [
+ "futures-util",
+ "js-sys",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
+[[package]]
+name = "web-sys"
+version = "0.3.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "webkit2gtk"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76b1bc1e54c581da1e9f179d0b38512ba358fb1af2d634a1affe42e37172361a"
+dependencies = [
+ "bitflags 1.3.2",
+ "cairo-rs",
+ "gdk",
+ "gdk-sys",
+ "gio",
+ "gio-sys",
+ "glib",
+ "glib-sys",
+ "gobject-sys",
+ "gtk",
+ "gtk-sys",
+ "javascriptcore-rs",
+ "libc",
+ "once_cell",
+ "soup3",
+ "webkit2gtk-sys",
+]
+
+[[package]]
+name = "webkit2gtk-sys"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62daa38afc514d1f8f12b8693d30d5993ff77ced33ce30cd04deebc267a6d57c"
+dependencies = [
+ "bitflags 1.3.2",
+ "cairo-sys-rs",
+ "gdk-sys",
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "gtk-sys",
+ "javascriptcore-rs-sys",
+ "libc",
+ "pkg-config",
+ "soup3-sys",
+ "system-deps",
+]
+
+[[package]]
+name = "webview2-com"
+version = "0.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f61ff3d9d0ee4efcb461b14eb3acfda2702d10dc329f339303fc3e57215ae2c"
+dependencies = [
+ "webview2-com-macros",
+ "webview2-com-sys",
+ "windows 0.58.0",
+ "windows-core 0.58.0",
+ "windows-implement",
+ "windows-interface",
+]
+
+[[package]]
+name = "webview2-com-macros"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "webview2-com-sys"
+version = "0.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3a3e2eeb58f82361c93f9777014668eb3d07e7d174ee4c819575a9208011886"
+dependencies = [
+ "thiserror 1.0.69",
+ "windows 0.58.0",
+ "windows-core 0.58.0",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
+dependencies = [
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "window-vibrancy"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ea403deff7b51fff19e261330f71608ff2cdef5721d72b64180bb95be7c4150"
+dependencies = [
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "raw-window-handle",
+ "windows-sys 0.59.0",
+ "windows-version",
+]
+
+[[package]]
+name = "windows"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
+dependencies = [
+ "windows-targets 0.48.5",
+]
+
+[[package]]
+name = "windows"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
+dependencies = [
+ "windows-core 0.58.0",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
+dependencies = [
+ "windows-implement",
+ "windows-interface",
+ "windows-result",
+ "windows-strings",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-implement"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "windows-interface"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "windows-registry"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0"
+dependencies = [
+ "windows-result",
+ "windows-strings",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-result"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
+dependencies = [
+ "windows-result",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.45.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
+dependencies = [
+ "windows-targets 0.42.2",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets 0.48.5",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.59.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
+dependencies = [
+ "windows_aarch64_gnullvm 0.42.2",
+ "windows_aarch64_msvc 0.42.2",
+ "windows_i686_gnu 0.42.2",
+ "windows_i686_msvc 0.42.2",
+ "windows_x86_64_gnu 0.42.2",
+ "windows_x86_64_gnullvm 0.42.2",
+ "windows_x86_64_msvc 0.42.2",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
+dependencies = [
+ "windows_aarch64_gnullvm 0.48.5",
+ "windows_aarch64_msvc 0.48.5",
+ "windows_i686_gnu 0.48.5",
+ "windows_i686_msvc 0.48.5",
+ "windows_x86_64_gnu 0.48.5",
+ "windows_x86_64_gnullvm 0.48.5",
+ "windows_x86_64_msvc 0.48.5",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+dependencies = [
+ "windows_aarch64_gnullvm 0.52.6",
+ "windows_aarch64_msvc 0.52.6",
+ "windows_i686_gnu 0.52.6",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc 0.52.6",
+ "windows_x86_64_gnu 0.52.6",
+ "windows_x86_64_gnullvm 0.52.6",
+ "windows_x86_64_msvc 0.52.6",
+]
+
+[[package]]
+name = "windows-version"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6998aa457c9ba8ff2fb9f13e9d2a930dabcea28f1d0ab94d687d8b3654844515"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "winnow"
+version = "0.5.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "winreg"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5"
+dependencies = [
+ "cfg-if",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "winver"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e0e7162b9e282fd75a0a832cce93994bdb21208d848a418cd05a5fdd9b9ab33"
+dependencies = [
+ "windows 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.47.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61ce51277d65170f6379d8cda935c80e3c2d1f0ff712a123c8bddb11b31a4b73"
+dependencies = [
+ "base64 0.22.1",
+ "block2",
+ "cookie",
+ "crossbeam-channel",
+ "dpi",
+ "dunce",
+ "gdkx11",
+ "gtk",
+ "html5ever",
+ "http",
+ "javascriptcore-rs",
+ "jni",
+ "kuchikiki",
+ "libc",
+ "ndk",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "objc2-ui-kit",
+ "objc2-web-kit",
+ "once_cell",
+ "percent-encoding",
+ "raw-window-handle",
+ "sha2",
+ "soup3",
+ "tao-macros",
+ "thiserror 1.0.69",
+ "url",
+ "webkit2gtk",
+ "webkit2gtk-sys",
+ "webview2-com",
+ "windows 0.58.0",
+ "windows-core 0.58.0",
+ "windows-version",
+ "x11-dl",
+]
+
+[[package]]
+name = "x11"
+version = "2.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e"
+dependencies = [
+ "libc",
+ "pkg-config",
+]
+
+[[package]]
+name = "x11-dl"
+version = "2.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f"
+dependencies = [
+ "libc",
+ "once_cell",
+ "pkg-config",
+]
+
+[[package]]
+name = "yoke"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40"
+dependencies = [
+ "serde",
+ "stable_deref_trait",
+ "yoke-derive",
+ "zerofrom",
+]
+
+[[package]]
+name = "yoke-derive"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+ "synstructure",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
+dependencies = [
+ "byteorder",
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[package]]
+name = "zerofrom"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e"
+dependencies = [
+ "zerofrom-derive",
+]
+
+[[package]]
+name = "zerofrom-derive"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+ "synstructure",
+]
+
+[[package]]
+name = "zeroize"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
+dependencies = [
+ "zeroize_derive",
+]
+
+[[package]]
+name = "zeroize_derive"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.89",
+]
+
+[[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.89",
+]
+
+[[package]]
+name = "zip"
+version = "2.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99d52293fc86ea7cf13971b3bb81eb21683636e7ae24c729cdaf1b7c4157a352"
+dependencies = [
+ "aes",
+ "arbitrary",
+ "bzip2",
+ "constant_time_eq",
+ "crc32fast",
+ "crossbeam-utils",
+ "deflate64",
+ "displaydoc",
+ "flate2",
+ "hmac",
+ "indexmap 2.6.0",
+ "lzma-rs",
+ "memchr",
+ "pbkdf2",
+ "rand 0.8.5",
+ "sha1",
+ "thiserror 2.0.3",
+ "time",
+ "zeroize",
+ "zopfli",
+ "zstd",
+]
+
+[[package]]
+name = "zopfli"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946"
+dependencies = [
+ "bumpalo",
+ "crc32fast",
+ "lockfree-object-pool",
+ "log",
+ "once_cell",
+ "simd-adler32",
+]
+
+[[package]]
+name = "zstd"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9"
+dependencies = [
+ "zstd-safe",
+]
+
+[[package]]
+name = "zstd-safe"
+version = "7.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059"
+dependencies = [
+ "zstd-sys",
+]
+
+[[package]]
+name = "zstd-sys"
+version = "2.0.13+zstd.1.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa"
+dependencies = [
+ "cc",
+ "pkg-config",
+]
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/Cargo.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/Cargo.toml
new file mode 100644
index 000000000..4fec81554
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/Cargo.toml
@@ -0,0 +1,52 @@
+[package]
+name = "tauri-plugin-appload"
+version = "0.1.0"
+authors = [ "CuriousCorrelation" ]
+description = "A Tauri plugin to download and load web app into WebView"
+edition = "2021"
+rust-version = "1.77.2"
+exclude = ["/examples", "/webview-dist", "/webview-src", "/node_modules"]
+links = "tauri-plugin-appload"
+
+[dependencies]
+tauri = { version = "2.0.6", features = ["unstable"] }
+serde = "1.0"
+serde_json = { version = "1", features = [] }
+thiserror = { version = "2.0.3", features = [] }
+url = { version = "2.5.3", features = ["serde"] }
+reqwest = { version = "0.12.9", features = [] }
+zip = { version = "2.2.0", features = [] }
+tokio = { version = "1.41.1", features = [] }
+mime-infer = { version = "3.0.0", features = [] }
+regex = { version = "1.11.1", features = [] }
+tracing = "0.1.41"
+dashmap = { version = "6.1.0" }
+flate2 = { version = "1.0.35" }
+chrono = { version = "0.4.38", features = ["serde"] }
+base64 = "0.22.1"
+blake3 = { version = "1.5.4", features = ["serde"] }
+ed25519-dalek = { version = "2.1.1", features = ["rand_core", "serde"] }
+hex = "0.4.3"
+lru = "0.12.5"
+sys-info = "0.9.1"
+humantime-serde = "1.1.1"
+futures = "0.3.31"
+mime_guess = "2.0.5"
+rayon = "1.10.0"
+hex_color = "3.0.0"
+
+[build-dependencies]
+tauri-plugin = { version = "2.0.1", features = ["build"] }
+
+[target.'cfg(target_os = "macos")'.dependencies]
+cocoa = "0.26.0"
+objc = "0.2.7"
+rand = "0.8.5"
+
+[target.'cfg(target_os = "windows")'.dependencies]
+windows = { version = "0.58.0", features = [
+ "Win32_Graphics_Dwm",
+ "Win32_Foundation",
+ "Win32_UI_Controls",
+] }
+winver = "1.0.0"
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/LICENSE.md b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/LICENSE.md
new file mode 100644
index 000000000..24bfc7fe1
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/LICENSE.md
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 - CuriousCorrelation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/README.md b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/README.md
new file mode 100644
index 000000000..2b069f78a
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/README.md
@@ -0,0 +1,105 @@
+# Tauri Plugin: AppLoad
+
+> A Tauri plugin for downloading and loading web app bundles into WebView.
+
+<div align="center">
+
+![GitHub License MIT](https://img.shields.io/github/license/CuriousCorrelation/tauri-plugin-appload)
+![Tauri 2.0](https://img.shields.io/badge/Tauri-2.0-blue)
+[![Rust](https://img.shields.io/badge/Rust-1.77.2+-orange)](https://www.rust-lang.org)
+
+</div>
+
+## Features
+
+- 🦀 Blazingly fast!
+- Download and load web app bundles from remote servers
+- Secure verification using `ed25519` + `blake3`
+- Caching with hot/cold storage strategy
+- Custom URI scheme for isolated app loading
+
+## Installation
+
+> [!IMPORTANT]
+> This plugin requires Tauri 2.0 or later.
+
+Add the plugin to your project by installing directly from GitHub:
+
+```toml
+[dependencies]
+tauri-plugin-appload = { git = "https://github.com/CuriousCorrelation/tauri-plugin-appload" }
+```
+
+``` json
+"dependencies": {
+ "@CuriousCorrelation/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload"
+}
+```
+
+## Quick Start
+
+### Rust
+
+```rust
+fn main() {
+ tauri::Builder::default()
+ .plugin(tauri_plugin_appload::init())
+ .run(tauri::generate_context!())
+ .expect("error while running tauri application");
+}
+```
+
+### JavaScript/TypeScript
+
+```typescript
+import { download, load } from '@CuriousCorrelation/plugin-appload'
+
+// Download a bundle
+const { bundleName } = await download({
+ serverUrl: "https://example.com"
+})
+
+// Load the bundle in a new window
+await load({
+ bundleName,
+ window: {
+ title: "My App",
+ width: 800,
+ height: 600
+ }
+})
+```
+
+## Configuration
+
+> [!NOTE]
+> The plugin uses sensible defaults but can be customized via configuration.
+
+| Option | Description | Default |
+|--------|-------------|---------|
+| `api.serverUrl` | Bundle server URL | `http://localhost:3200` |
+| `cache.maxSize` | Maximum cache size | `100MB` |
+| `cache.filesTtl` | File time-to-live | `1 hour` |
+| `storage.maxBundleSize` | Maximum bundle size | `50MB` |
+
+## Permissions
+
+The plugin defines the following permissions:
+
+- `allow-download`: Enable bundle downloads
+- `allow-load`: Enable bundle loading
+- `deny-download`: Disable bundle downloads
+- `deny-load`: Disable bundle loading
+
+## Development
+
+Requirements:
+- Rust 1.77.2 or later
+- Node.js 18 or later
+- pnpm
+
+## License
+
+Code: (c) 2024 - CuriousCorrelation
+
+MIT or MIT/Apache 2.0 where applicable.
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/build.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/build.rs
new file mode 100644
index 000000000..9f0dff995
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/build.rs
@@ -0,0 +1,8 @@
+const COMMANDS: &[&str] = &["load", "download", "clear", "remove"];
+
+fn main() {
+ tauri_plugin::Builder::new(COMMANDS)
+ .android_path("android")
+ .ios_path("ios")
+ .build();
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/devenv.lock b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/devenv.lock
new file mode 100644
index 000000000..968102438
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/devenv.lock
@@ -0,0 +1,153 @@
+{
+ "nodes": {
+ "devenv": {
+ "locked": {
+ "dir": "src/modules",
+ "lastModified": 1733525154,
+ "owner": "cachix",
+ "repo": "devenv",
+ "rev": "d74232153d60ccdeba6f41eec8ce8b2be0b33ac6",
+ "type": "github"
+ },
+ "original": {
+ "dir": "src/modules",
+ "owner": "cachix",
+ "repo": "devenv",
+ "type": "github"
+ }
+ },
+ "fenix": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ],
+ "rust-analyzer-src": "rust-analyzer-src"
+ },
+ "locked": {
+ "lastModified": 1733553297,
+ "owner": "nix-community",
+ "repo": "fenix",
+ "rev": "8519a70a1a81db2dd22316f94c25d7510218169e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "fenix",
+ "type": "github"
+ }
+ },
+ "flake-compat": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1733328505,
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
+ "gitignore": {
+ "inputs": {
+ "nixpkgs": [
+ "pre-commit-hooks",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1709087332,
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1733330745,
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "2f9d395f057a50f8076f633c10519035fce8d773",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs-stable": {
+ "locked": {
+ "lastModified": 1733384649,
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "190c31a89e5eec80dd6604d7f9e5af3802a58a13",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-24.05",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "pre-commit-hooks": {
+ "inputs": {
+ "flake-compat": "flake-compat",
+ "gitignore": "gitignore",
+ "nixpkgs": [
+ "nixpkgs"
+ ],
+ "nixpkgs-stable": "nixpkgs-stable"
+ },
+ "locked": {
+ "lastModified": 1733318908,
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "rev": "6f4e2a2112050951a314d2733a994fbab94864c6",
+ "type": "github"
+ },
+ "original": {
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "devenv": "devenv",
+ "fenix": "fenix",
+ "nixpkgs": "nixpkgs",
+ "pre-commit-hooks": "pre-commit-hooks"
+ }
+ },
+ "rust-analyzer-src": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1733499879,
+ "owner": "rust-lang",
+ "repo": "rust-analyzer",
+ "rev": "17720acb90105cbd736d3e78d736eb5d41af89a5",
+ "type": "github"
+ },
+ "original": {
+ "owner": "rust-lang",
+ "ref": "nightly",
+ "repo": "rust-analyzer",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/packages/hoppscotch-agent/devenv.nix b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/devenv.nix
similarity index 63%
rename from packages/hoppscotch-agent/devenv.nix
rename to packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/devenv.nix
index 27603e56f..1e49dd787 100644
--- a/packages/hoppscotch-agent/devenv.nix
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/devenv.nix
@@ -24,32 +24,18 @@ let
];
in {
- # https://devenv.sh/packages/
packages = with pkgs; [
git
- postgresql_16
- # FE and Node stuff
nodejs_22
nodePackages_latest.typescript-language-server
- nodePackages_latest.vls
- nodePackages_latest.prisma
- prisma-engines
- # Cargo
+ nodePackages_latest.vue-language-server
cargo-edit
] ++ lib.optionals pkgs.stdenv.isDarwin darwinPackages
++ lib.optionals pkgs.stdenv.isLinux linuxPackages;
- # https://devenv.sh/basics/
env = {
- APP_GREET = "Hoppscotch";
+ APP_GREET = "Hi!";
} // lib.optionalAttrs pkgs.stdenv.isLinux {
- # NOTE: Setting these `PRISMA_*` environment variable fixes
- # Error: Failed to fetch sha256 checksum at https://binaries.prisma.sh/all_commits/<hash>/linux-nixos/libquery_engine.so.node.gz.sha256 - 404 Not Found
- # See: https://github.com/prisma/prisma/discussions/3120
- PRISMA_QUERY_ENGINE_LIBRARY = "${pkgs.prisma-engines}/lib/libquery_engine.node";
- PRISMA_QUERY_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/query-engine";
- PRISMA_SCHEMA_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/schema-engine";
-
LD_LIBRARY_PATH = lib.makeLibraryPath [
pkgs.libappindicator
pkgs.libayatana-appindicator
@@ -58,7 +44,6 @@ in {
# Place to put macOS-specific environment variables
};
- # https://devenv.sh/scripts/
scripts = {
hello.exec = "echo hello from $APP_GREET";
e.exec = "emacs";
@@ -74,15 +59,12 @@ in {
''}
'';
- # https://devenv.sh/tests/
enterTest = ''
echo "Running tests"
'';
- # https://devenv.sh/integrations/dotenv/
dotenv.enable = true;
- # https://devenv.sh/languages/
languages = {
typescript.enable = true;
javascript = {
@@ -105,12 +87,4 @@ in {
];
};
};
-
- # https://devenv.sh/pre-commit-hooks/
- # pre-commit.hooks.shellcheck.enable = true;
-
- # https://devenv.sh/processes/
- # processes.ping.exec = "ping example.com";
-
- # See full reference at https://devenv.sh/reference/options/
}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/devenv.yaml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/devenv.yaml
new file mode 100644
index 000000000..9ee9ba349
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/devenv.yaml
@@ -0,0 +1,23 @@
+# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
+inputs:
+ # For NodeJS-22 and above
+ nixpkgs:
+ url: github:NixOS/nixpkgs/nixpkgs-unstable
+ # nixpkgs:
+ # url: github:cachix/devenv-nixpkgs/rolling
+ fenix:
+ url: github:nix-community/fenix
+ inputs:
+ nixpkgs:
+ follows: nixpkgs
+
+# If you're using non-OSS software, you can set allowUnfree to true.
+allowUnfree: true
+
+# If you're willing to use a package that's vulnerable
+# permittedInsecurePackages:
+# - "openssl-1.1.1w"
+
+# If you have more than one devenv you can merge them
+#imports:
+# - ./backend
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.cjs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.cjs
new file mode 100644
index 000000000..e53b239e9
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.cjs
@@ -0,0 +1,21 @@
+'use strict';
+
+var core = require('@tauri-apps/api/core');
+
+async function download(options) {
+ return await core.invoke('plugin:appload|download', { options });
+}
+async function load(options) {
+ return await core.invoke('plugin:appload|load', { options });
+}
+async function remove(options) {
+ return await core.invoke('plugin:appload|remove', { options });
+}
+async function clear() {
+ return await core.invoke('plugin:appload|clear');
+}
+
+exports.clear = clear;
+exports.download = download;
+exports.load = load;
+exports.remove = remove;
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts
new file mode 100644
index 000000000..63243966e
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts
@@ -0,0 +1,37 @@
+export interface DownloadOptions {
+ serverUrl: string;
+}
+export interface DownloadResponse {
+ success: boolean;
+ bundleName: string;
+ serverUrl: string;
+ version: string;
+}
+export interface WindowOptions {
+ title?: string;
+ width?: number;
+ height?: number;
+ resizable?: boolean;
+}
+export interface LoadOptions {
+ bundleName: string;
+ inline?: boolean;
+ window?: WindowOptions;
+}
+export interface LoadResponse {
+ success: boolean;
+ windowLabel: string;
+}
+export interface RemoveOptions {
+ bundleName: string;
+ serverUrl: string;
+}
+export interface RemoveResponse {
+ success: boolean;
+ bundleName: string;
+}
+export declare function download(options: DownloadOptions): Promise<DownloadResponse>;
+export declare function load(options: LoadOptions): Promise<LoadResponse>;
+export declare function remove(options: RemoveOptions): Promise<RemoveResponse>;
+export declare function clear(): Promise<void>;
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts.map b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts.map
new file mode 100644
index 000000000..3f5816805
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["guest-js/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,aAAa,CAAA;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,wBAAsB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAElF;AAED,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAEtE;AAED,wBAAsB,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAE5E;AAED,wBAAsB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3C"}
\ No newline at end of file
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.js b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.js
new file mode 100644
index 000000000..382f78537
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.js
@@ -0,0 +1,16 @@
+import { invoke } from '@tauri-apps/api/core';
+
+async function download(options) {
+ return await invoke('plugin:appload|download', { options });
+}
+async function load(options) {
+ return await invoke('plugin:appload|load', { options });
+}
+async function remove(options) {
+ return await invoke('plugin:appload|remove', { options });
+}
+async function clear() {
+ return await invoke('plugin:appload|clear');
+}
+
+export { clear, download, load, remove };
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/.gitignore b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/.gitignore
new file mode 100644
index 000000000..a547bf36d
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/.gitignore
@@ -0,0 +1,24 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/.vscode/extensions.json b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/.vscode/extensions.json
new file mode 100644
index 000000000..61343e9b8
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/.vscode/extensions.json
@@ -0,0 +1,7 @@
+{
+ "recommendations": [
+ "svelte.svelte-vscode",
+ "tauri-apps.tauri-vscode",
+ "rust-lang.rust-analyzer"
+ ]
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/README.md b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/README.md
new file mode 100644
index 000000000..72726a1fa
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/README.md
@@ -0,0 +1,8 @@
+# Svelte + Vite
+
+This template should help get you started developing with Tauri and Svelte in Vite.
+
+## Recommended IDE Setup
+
+[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer).
+
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/index.html b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/index.html
new file mode 100644
index 000000000..fad1c5d9c
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/index.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Tauri + Svelte</title>
+ </head>
+
+ <body>
+ <div id="app"></div>
+ <script type="module" src="/src/main.js"></script>
+ </body>
+</html>
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/jsconfig.json b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/jsconfig.json
new file mode 100644
index 000000000..ee5e92f29
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/jsconfig.json
@@ -0,0 +1,34 @@
+{
+ "compilerOptions": {
+ "moduleResolution": "Node",
+ "target": "ESNext",
+ "module": "ESNext",
+ /**
+ * svelte-preprocess cannot figure out whether you have
+ * a value or a type, so tell TypeScript to enforce using
+ * `import type` instead of `import` for Types.
+ */
+ "importsNotUsedAsValues": "error",
+ "isolatedModules": true,
+ "resolveJsonModule": true,
+ /**
+ * To have warnings / errors of the Svelte compiler at the
+ * correct position, enable source maps by default.
+ */
+ "sourceMap": true,
+ "esModuleInterop": true,
+ "skipLibCheck": true,
+ "forceConsistentCasingInFileNames": true,
+ "baseUrl": ".",
+ /**
+ * Typecheck JS in `.svelte` and `.js` files by default.
+ * Disable this if you'd like to use dynamic types.
+ */
+ "checkJs": true
+ },
+ /**
+ * Use global.d.ts instead of compilerOptions.types
+ * to avoid limiting type declarations.
+ */
+ "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"]
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/package.json b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/package.json
new file mode 100644
index 000000000..d3d1a46c7
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "tauri-app",
+ "private": true,
+ "version": "0.1.0",
+ "type": "module",
+ "scripts": {
+ "dev": "vite",
+ "build": "vite build",
+ "preview": "vite preview",
+ "tauri": "tauri"
+ },
+ "dependencies": {
+ "@tauri-apps/api": "^2.0.0-alpha.11",
+ "tauri-plugin-appload-api": "file:../../"
+ },
+ "devDependencies": {
+ "@sveltejs/vite-plugin-svelte": "^1.0.1",
+ "svelte": "^3.49.0",
+ "vite": "^3.0.2",
+ "@tauri-apps/cli": "^2.0.0-alpha.17"
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/public/svelte.svg b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/public/svelte.svg
new file mode 100644
index 000000000..c5e08481f
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/public/svelte.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="26.6" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 308"><path fill="#FF3E00" d="M239.682 40.707C211.113-.182 154.69-12.301 113.895 13.69L42.247 59.356a82.198 82.198 0 0 0-37.135 55.056a86.566 86.566 0 0 0 8.536 55.576a82.425 82.425 0 0 0-12.296 30.719a87.596 87.596 0 0 0 14.964 66.244c28.574 40.893 84.997 53.007 125.787 27.016l71.648-45.664a82.182 82.182 0 0 0 37.135-55.057a86.601 86.601 0 0 0-8.53-55.577a82.409 82.409 0 0 0 12.29-30.718a87.573 87.573 0 0 0-14.963-66.244"></path><path fill="#FFF" d="M106.889 270.841c-23.102 6.007-47.497-3.036-61.103-22.648a52.685 52.685 0 0 1-9.003-39.85a49.978 49.978 0 0 1 1.713-6.693l1.35-4.115l3.671 2.697a92.447 92.447 0 0 0 28.036 14.007l2.663.808l-.245 2.659a16.067 16.067 0 0 0 2.89 10.656a17.143 17.143 0 0 0 18.397 6.828a15.786 15.786 0 0 0 4.403-1.935l71.67-45.672a14.922 14.922 0 0 0 6.734-9.977a15.923 15.923 0 0 0-2.713-12.011a17.156 17.156 0 0 0-18.404-6.832a15.78 15.78 0 0 0-4.396 1.933l-27.35 17.434a52.298 52.298 0 0 1-14.553 6.391c-23.101 6.007-47.497-3.036-61.101-22.649a52.681 52.681 0 0 1-9.004-39.849a49.428 49.428 0 0 1 22.34-33.114l71.664-45.677a52.218 52.218 0 0 1 14.563-6.398c23.101-6.007 47.497 3.036 61.101 22.648a52.685 52.685 0 0 1 9.004 39.85a50.559 50.559 0 0 1-1.713 6.692l-1.35 4.116l-3.67-2.693a92.373 92.373 0 0 0-28.037-14.013l-2.664-.809l.246-2.658a16.099 16.099 0 0 0-2.89-10.656a17.143 17.143 0 0 0-18.398-6.828a15.786 15.786 0 0 0-4.402 1.935l-71.67 45.674a14.898 14.898 0 0 0-6.73 9.975a15.9 15.9 0 0 0 2.709 12.012a17.156 17.156 0 0 0 18.404 6.832a15.841 15.841 0 0 0 4.402-1.935l27.345-17.427a52.147 52.147 0 0 1 14.552-6.397c23.101-6.006 47.497 3.037 61.102 22.65a52.681 52.681 0 0 1 9.003 39.848a49.453 49.453 0 0 1-22.34 33.12l-71.664 45.673a52.218 52.218 0 0 1-14.563 6.398"></path></svg>
\ No newline at end of file
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/public/tauri.svg b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/public/tauri.svg
new file mode 100644
index 000000000..31b62c928
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/public/tauri.svg
@@ -0,0 +1,6 @@
+<svg width="206" height="231" viewBox="0 0 206 231" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M143.143 84C143.143 96.1503 133.293 106 121.143 106C108.992 106 99.1426 96.1503 99.1426 84C99.1426 71.8497 108.992 62 121.143 62C133.293 62 143.143 71.8497 143.143 84Z" fill="#FFC131"/>
+<ellipse cx="84.1426" cy="147" rx="22" ry="22" transform="rotate(180 84.1426 147)" fill="#24C8DB"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M166.738 154.548C157.86 160.286 148.023 164.269 137.757 166.341C139.858 160.282 141 153.774 141 147C141 144.543 140.85 142.121 140.558 139.743C144.975 138.204 149.215 136.139 153.183 133.575C162.73 127.404 170.292 118.608 174.961 108.244C179.63 97.8797 181.207 86.3876 179.502 75.1487C177.798 63.9098 172.884 53.4021 165.352 44.8883C157.82 36.3744 147.99 30.2165 137.042 27.1546C126.095 24.0926 114.496 24.2568 103.64 27.6274C92.7839 30.998 83.1319 37.4317 75.8437 46.1553C74.9102 47.2727 74.0206 48.4216 73.176 49.5993C61.9292 50.8488 51.0363 54.0318 40.9629 58.9556C44.2417 48.4586 49.5653 38.6591 56.679 30.1442C67.0505 17.7298 80.7861 8.57426 96.2354 3.77762C111.685 -1.01901 128.19 -1.25267 143.769 3.10474C159.348 7.46215 173.337 16.2252 184.056 28.3411C194.775 40.457 201.767 55.4101 204.193 71.404C206.619 87.3978 204.374 103.752 197.73 118.501C191.086 133.25 180.324 145.767 166.738 154.548ZM41.9631 74.275L62.5557 76.8042C63.0459 72.813 63.9401 68.9018 65.2138 65.1274C57.0465 67.0016 49.2088 70.087 41.9631 74.275Z" fill="#FFC131"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M38.4045 76.4519C47.3493 70.6709 57.2677 66.6712 67.6171 64.6132C65.2774 70.9669 64 77.8343 64 85.0001C64 87.1434 64.1143 89.26 64.3371 91.3442C60.0093 92.8732 55.8533 94.9092 51.9599 97.4256C42.4128 103.596 34.8505 112.392 30.1816 122.756C25.5126 133.12 23.9357 144.612 25.6403 155.851C27.3449 167.09 32.2584 177.598 39.7906 186.112C47.3227 194.626 57.153 200.784 68.1003 203.846C79.0476 206.907 90.6462 206.743 101.502 203.373C112.359 200.002 122.011 193.568 129.299 184.845C130.237 183.722 131.131 182.567 131.979 181.383C143.235 180.114 154.132 176.91 164.205 171.962C160.929 182.49 155.596 192.319 148.464 200.856C138.092 213.27 124.357 222.426 108.907 227.222C93.458 232.019 76.9524 232.253 61.3736 227.895C45.7948 223.538 31.8055 214.775 21.0867 202.659C10.3679 190.543 3.37557 175.59 0.949823 159.596C-1.47592 143.602 0.768139 127.248 7.41237 112.499C14.0566 97.7497 24.8183 85.2327 38.4045 76.4519ZM163.062 156.711L163.062 156.711C162.954 156.773 162.846 156.835 162.738 156.897C162.846 156.835 162.954 156.773 163.062 156.711Z" fill="#24C8DB"/>
+</svg>
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/public/vite.svg b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/public/vite.svg
new file mode 100644
index 000000000..e7b8dfb1b
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/public/vite.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
\ No newline at end of file
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/.gitignore b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/.gitignore
new file mode 100644
index 000000000..f4dfb82b2
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/.gitignore
@@ -0,0 +1,4 @@
+# Generated by Cargo
+# will have compiled files and executables
+/target/
+
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/Cargo.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/Cargo.toml
new file mode 100644
index 000000000..5672cb596
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/Cargo.toml
@@ -0,0 +1,23 @@
+[package]
+name = "tauri-app"
+version = "0.1.0"
+description = "A Tauri App"
+authors = ["you"]
+license = ""
+repository = ""
+edition = "2021"
+rust-version = "1.77.2"
+
+[lib]
+name = "tauri_app_lib"
+crate-type = ["staticlib", "cdylib", "rlib"]
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[build-dependencies]
+tauri-build = { version = "2.0.1", default-features = false }
+
+[dependencies]
+tauri = { version = "2.0.6" }
+tauri-plugin-appload = { path = "../../../" }
+
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/build.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/build.rs
new file mode 100644
index 000000000..795b9b7c8
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/build.rs
@@ -0,0 +1,3 @@
+fn main() {
+ tauri_build::build()
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/capabilities/default.json b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/capabilities/default.json
new file mode 100644
index 000000000..3076a249a
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/capabilities/default.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "../gen/schemas/desktop-schema.json",
+ "identifier": "default",
+ "description": "enables the default permissions",
+ "windows": [
+ "main"
+ ],
+ "permissions": [
+ "core:default",
+ "appload:default"
+ ]
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/128x128.png b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/128x128.png
new file mode 100644
index 000000000..77e7d2338
Binary files /dev/null and b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/128x128.png differ
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/[email protected] b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/[email protected]
new file mode 100644
index 000000000..0f7976f1a
Binary files /dev/null and b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/[email protected] differ
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/32x32.png b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/32x32.png
new file mode 100644
index 000000000..98fda06fc
Binary files /dev/null and b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/32x32.png differ
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/icon.icns b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/icon.icns
new file mode 100644
index 000000000..29d6685ae
Binary files /dev/null and b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/icon.icns differ
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/icon.ico b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/icon.ico
new file mode 100644
index 000000000..06c23c82f
Binary files /dev/null and b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/icon.ico differ
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/icon.png b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/icon.png
new file mode 100644
index 000000000..d1756ce45
Binary files /dev/null and b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/icons/icon.png differ
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/src/lib.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/src/lib.rs
new file mode 100644
index 000000000..2650a627e
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/src/lib.rs
@@ -0,0 +1,14 @@
+// Learn more about Tauri commands at https://v2.tauri.app/develop/calling-rust/#commands
+#[tauri::command]
+fn greet(name: &str) -> String {
+ format!("Hello, {}! You've been greeted from Rust!", name)
+}
+
+#[cfg_attr(mobile, tauri::mobile_entry_point)]
+pub fn run() {
+ tauri::Builder::default()
+ .invoke_handler(tauri::generate_handler![greet])
+ .plugin(tauri_plugin_appload::init())
+ .run(tauri::generate_context!())
+ .expect("error while running tauri application");
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/src/main.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/src/main.rs
new file mode 100644
index 000000000..455963eea
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/src/main.rs
@@ -0,0 +1,6 @@
+// Prevents additional console window on Windows in release, DO NOT REMOVE!!
+#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
+
+fn main() {
+ tauri_app_lib::run();
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/tauri.conf.json b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/tauri.conf.json
new file mode 100644
index 000000000..72ebf4001
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src-tauri/tauri.conf.json
@@ -0,0 +1,37 @@
+{
+ "productName": "tauri-app",
+ "version": "0.1.0",
+ "identifier": "com.tauri.dev",
+ "build": {
+ "beforeDevCommand": "pnpm dev",
+ "beforeBuildCommand": "pnpm build",
+ "devUrl": "http://localhost:1420",
+ "frontendDist": "../dist"
+ },
+ "app": {
+ "withGlobalTauri": false,
+ "security": {
+ "csp": null
+ },
+ "windows": [
+ {
+ "fullscreen": false,
+ "height": 600,
+ "resizable": true,
+ "title": "tauri-app",
+ "width": 800
+ }
+ ]
+ },
+ "bundle": {
+ "active": true,
+ "targets": "all",
+ "icon": [
+ "icons/32x32.png",
+ "icons/128x128.png",
+ "icons/icon.icns",
+ "icons/icon.ico"
+ ]
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/App.svelte b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/App.svelte
new file mode 100644
index 000000000..7e975903a
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/App.svelte
@@ -0,0 +1,54 @@
+<script>
+ import Greet from './lib/Greet.svelte'
+ import { ping } from 'tauri-plugin-appload-api'
+
+ let response = ''
+
+ function updateResponse(returnValue) {
+ response += `[${new Date().toLocaleTimeString()}] ` + (typeof returnValue === 'string' ? returnValue : JSON.stringify(returnValue)) + '<br>'
+ }
+
+ function _ping() {
+ ping("Pong!").then(updateResponse).catch(updateResponse)
+ }
+</script>
+
+<main class="container">
+ <h1>Welcome to Tauri!</h1>
+
+ <div class="row">
+ <a href="https://vitejs.dev" target="_blank">
+ <img src="/vite.svg" class="logo vite" alt="Vite Logo" />
+ </a>
+ <a href="https://tauri.app" target="_blank">
+ <img src="/tauri.svg" class="logo tauri" alt="Tauri Logo" />
+ </a>
+ <a href="https://svelte.dev" target="_blank">
+ <img src="/svelte.svg" class="logo svelte" alt="Svelte Logo" />
+ </a>
+ </div>
+
+ <p>
+ Click on the Tauri, Vite, and Svelte logos to learn more.
+ </p>
+
+ <div class="row">
+ <Greet />
+ </div>
+
+ <div>
+ <button on:click="{_ping}">Ping</button>
+ <div>{@html response}</div>
+ </div>
+
+</main>
+
+<style>
+ .logo.vite:hover {
+ filter: drop-shadow(0 0 2em #747bff);
+ }
+
+ .logo.svelte:hover {
+ filter: drop-shadow(0 0 2em #ff3e00);
+ }
+</style>
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/lib/Greet.svelte b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/lib/Greet.svelte
new file mode 100644
index 000000000..41e901b54
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/lib/Greet.svelte
@@ -0,0 +1,22 @@
+<script>
+ import { invoke } from "@tauri-apps/api/core"
+
+ let name = "";
+ let greetMsg = ""
+
+ async function greet(){
+ // Learn more about Tauri commands at https://v2.tauri.app/develop/calling-rust/#commands
+ greetMsg = await invoke("greet", { name })
+ }
+</script>
+
+<div>
+ <div class="row">
+ <input id="greet-input" placeholder="Enter a name..." bind:value={name} />
+ <button on:click={greet}>
+ Greet
+ </button>
+ </div>
+ <p>{greetMsg}</p>
+</div>
+
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/main.js b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/main.js
new file mode 100644
index 000000000..6b4e1a969
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/main.js
@@ -0,0 +1,8 @@
+import "./style.css";
+import App from "./App.svelte";
+
+const app = new App({
+ target: document.getElementById("app"),
+});
+
+export default app;
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/style.css b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/style.css
new file mode 100644
index 000000000..c0f9e3bc8
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/style.css
@@ -0,0 +1,102 @@
+:root {
+ font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
+ font-size: 16px;
+ line-height: 24px;
+ font-weight: 400;
+
+ color: #0f0f0f;
+ background-color: #f6f6f6;
+
+ font-synthesis: none;
+ text-rendering: optimizeLegibility;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ -webkit-text-size-adjust: 100%;
+}
+
+.container {
+ margin: 0;
+ padding-top: 10vh;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ text-align: center;
+}
+
+.logo {
+ height: 6em;
+ padding: 1.5em;
+ will-change: filter;
+ transition: 0.75s;
+}
+
+.logo.tauri:hover {
+ filter: drop-shadow(0 0 2em #24c8db);
+}
+
+.row {
+ display: flex;
+ justify-content: center;
+}
+
+a {
+ font-weight: 500;
+ color: #646cff;
+ text-decoration: inherit;
+}
+
+a:hover {
+ color: #535bf2;
+}
+
+h1 {
+ text-align: center;
+}
+
+input,
+button {
+ border-radius: 8px;
+ border: 1px solid transparent;
+ padding: 0.6em 1.2em;
+ font-size: 1em;
+ font-weight: 500;
+ font-family: inherit;
+ color: #0f0f0f;
+ background-color: #ffffff;
+ transition: border-color 0.25s;
+ box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
+}
+
+button {
+ cursor: pointer;
+}
+
+button:hover {
+ border-color: #396cd8;
+}
+
+input,
+button {
+ outline: none;
+}
+
+#greet-input {
+ margin-right: 5px;
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ color: #f6f6f6;
+ background-color: #2f2f2f;
+ }
+
+ a:hover {
+ color: #24c8db;
+ }
+
+ input,
+ button {
+ color: #ffffff;
+ background-color: #0f0f0f98;
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/vite-env.d.ts b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/vite-env.d.ts
new file mode 100644
index 000000000..4078e7476
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/vite-env.d.ts
@@ -0,0 +1,2 @@
+/// <reference types="svelte" />
+/// <reference types="vite/client" />
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/vite.config.js b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/vite.config.js
new file mode 100644
index 000000000..3b85afb95
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/vite.config.js
@@ -0,0 +1,24 @@
+import { defineConfig } from "vite";
+import { svelte } from "@sveltejs/vite-plugin-svelte";
+
+const host = process.env.TAURI_DEV_HOST;
+
+// https://vitejs.dev/config/
+export default defineConfig({
+ plugins: [svelte()],
+
+ // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
+ // prevent vite from obscuring rust errors
+ clearScreen: false,
+ // tauri expects a fixed port, fail if that port is not available
+ server: {
+ host: host || false,
+ port: 1420,
+ strictPort: true,
+ hmr: host ? {
+ protocol: 'ws',
+ host,
+ port: 1421
+ } : undefined,
+ },
+})
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/guest-js/index.ts b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/guest-js/index.ts
new file mode 100644
index 000000000..74f1f0850
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/guest-js/index.ts
@@ -0,0 +1,56 @@
+import { invoke } from '@tauri-apps/api/core'
+
+export interface DownloadOptions {
+ serverUrl: string
+}
+
+export interface DownloadResponse {
+ success: boolean
+ bundleName: string
+ serverUrl: string
+ version: string
+}
+
+export interface WindowOptions {
+ title?: string
+ width?: number
+ height?: number
+ resizable?: boolean
+}
+
+export interface LoadOptions {
+ bundleName: string
+ inline?: boolean
+ window?: WindowOptions
+}
+
+export interface LoadResponse {
+ success: boolean
+ windowLabel: string
+}
+
+export interface RemoveOptions {
+ bundleName: string
+ serverUrl: string
+}
+
+export interface RemoveResponse {
+ success: boolean
+ bundleName: string
+}
+
+export async function download(options: DownloadOptions): Promise<DownloadResponse> {
+ return await invoke<DownloadResponse>('plugin:appload|download', { options })
+}
+
+export async function load(options: LoadOptions): Promise<LoadResponse> {
+ return await invoke<LoadResponse>('plugin:appload|load', { options })
+}
+
+export async function remove(options: RemoveOptions): Promise<RemoveResponse> {
+ return await invoke<RemoveResponse>('plugin:appload|remove', { options })
+}
+
+export async function clear(): Promise<void> {
+ return await invoke('plugin:appload|clear')
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/package.json b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/package.json
new file mode 100644
index 000000000..68163b788
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "@CuriousCorrelation/plugin-appload",
+ "version": "0.1.0",
+ "author": "CuriousCorrelation",
+ "description": "A Tauri plugin for downloading and loading web app bundles into WebView.",
+ "type": "module",
+ "types": "./dist-js/index.d.ts",
+ "main": "./dist-js/index.cjs",
+ "module": "./dist-js/index.js",
+ "exports": {
+ "types": "./dist-js/index.d.ts",
+ "import": "./dist-js/index.js",
+ "require": "./dist-js/index.cjs"
+ },
+ "files": [
+ "dist-js",
+ "README.md"
+ ],
+ "scripts": {
+ "build": "tsc && rollup -c",
+ "prepublishOnly": "pnpm build",
+ "pretest": "pnpm build"
+ },
+ "dependencies": {
+ "@tauri-apps/api": "^2.0.0"
+ },
+ "devDependencies": {
+ "@rollup/plugin-typescript": "^11.1.6",
+ "rollup": "^4.9.6",
+ "typescript": "^5.3.3",
+ "tslib": "^2.6.2"
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/clear.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/clear.toml
new file mode 100644
index 000000000..83de18192
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/clear.toml
@@ -0,0 +1,13 @@
+# Automatically generated - DO NOT EDIT!
+
+"$schema" = "../../schemas/schema.json"
+
+[[permission]]
+identifier = "allow-clear"
+description = "Enables the clear command without any pre-configured scope."
+commands.allow = ["clear"]
+
+[[permission]]
+identifier = "deny-clear"
+description = "Denies the clear command without any pre-configured scope."
+commands.deny = ["clear"]
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/download.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/download.toml
new file mode 100644
index 000000000..896b30ce2
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/download.toml
@@ -0,0 +1,13 @@
+# Automatically generated - DO NOT EDIT!
+
+"$schema" = "../../schemas/schema.json"
+
+[[permission]]
+identifier = "allow-download"
+description = "Enables the download command without any pre-configured scope."
+commands.allow = ["download"]
+
+[[permission]]
+identifier = "deny-download"
+description = "Denies the download command without any pre-configured scope."
+commands.deny = ["download"]
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/load.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/load.toml
new file mode 100644
index 000000000..f6e47ad8e
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/load.toml
@@ -0,0 +1,13 @@
+# Automatically generated - DO NOT EDIT!
+
+"$schema" = "../../schemas/schema.json"
+
+[[permission]]
+identifier = "allow-load"
+description = "Enables the load command without any pre-configured scope."
+commands.allow = ["load"]
+
+[[permission]]
+identifier = "deny-load"
+description = "Denies the load command without any pre-configured scope."
+commands.deny = ["load"]
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/ping.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/ping.toml
new file mode 100644
index 000000000..1d1358807
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/ping.toml
@@ -0,0 +1,13 @@
+# Automatically generated - DO NOT EDIT!
+
+"$schema" = "../../schemas/schema.json"
+
+[[permission]]
+identifier = "allow-ping"
+description = "Enables the ping command without any pre-configured scope."
+commands.allow = ["ping"]
+
+[[permission]]
+identifier = "deny-ping"
+description = "Denies the ping command without any pre-configured scope."
+commands.deny = ["ping"]
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/remove.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/remove.toml
new file mode 100644
index 000000000..9c9791ebc
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/commands/remove.toml
@@ -0,0 +1,13 @@
+# Automatically generated - DO NOT EDIT!
+
+"$schema" = "../../schemas/schema.json"
+
+[[permission]]
+identifier = "allow-remove"
+description = "Enables the remove command without any pre-configured scope."
+commands.allow = ["remove"]
+
+[[permission]]
+identifier = "deny-remove"
+description = "Denies the remove command without any pre-configured scope."
+commands.deny = ["remove"]
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/reference.md b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/reference.md
new file mode 100644
index 000000000..686fa6dc7
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/reference.md
@@ -0,0 +1,148 @@
+## Default Permission
+
+Default permissions for AppLoad plugin
+
+- `allow-load`
+- `allow-download`
+- `allow-clear`
+- `allow-remove`
+
+## Permission Table
+
+<table>
+<tr>
+<th>Identifier</th>
+<th>Description</th>
+</tr>
+
+
+<tr>
+<td>
+
+`appload:allow-clear`
+
+</td>
+<td>
+
+Enables the clear command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`appload:deny-clear`
+
+</td>
+<td>
+
+Denies the clear command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`appload:allow-download`
+
+</td>
+<td>
+
+Enables the download command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`appload:deny-download`
+
+</td>
+<td>
+
+Denies the download command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`appload:allow-load`
+
+</td>
+<td>
+
+Enables the load command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`appload:deny-load`
+
+</td>
+<td>
+
+Denies the load command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`appload:allow-ping`
+
+</td>
+<td>
+
+Enables the ping command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`appload:deny-ping`
+
+</td>
+<td>
+
+Denies the ping command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`appload:allow-remove`
+
+</td>
+<td>
+
+Enables the remove command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`appload:deny-remove`
+
+</td>
+<td>
+
+Denies the remove command without any pre-configured scope.
+
+</td>
+</tr>
+</table>
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/default.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/default.toml
new file mode 100644
index 000000000..fe9f435cf
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/default.toml
@@ -0,0 +1,3 @@
+[default]
+description = "Default permissions for AppLoad plugin"
+permissions = ["allow-load", "allow-download", "allow-clear", "allow-remove"]
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/schemas/schema.json b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/schemas/schema.json
new file mode 100644
index 000000000..3873ff55c
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/schemas/schema.json
@@ -0,0 +1,355 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "PermissionFile",
+ "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.",
+ "type": "object",
+ "properties": {
+ "default": {
+ "description": "The default permission set for the plugin",
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DefaultPermission"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "set": {
+ "description": "A list of permissions sets defined",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PermissionSet"
+ }
+ },
+ "permission": {
+ "description": "A list of inlined permissions",
+ "default": [],
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Permission"
+ }
+ }
+ },
+ "definitions": {
+ "DefaultPermission": {
+ "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
+ "type": "object",
+ "required": [
+ "permissions"
+ ],
+ "properties": {
+ "version": {
+ "description": "The version of the permission.",
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 1.0
+ },
+ "description": {
+ "description": "Human-readable description of what the permission does. Tauri convention is to use <h4> headings in markdown content for Tauri documentation generation purposes.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "permissions": {
+ "description": "All permissions this set contains.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "PermissionSet": {
+ "description": "A set of direct permissions grouped together under a new name.",
+ "type": "object",
+ "required": [
+ "description",
+ "identifier",
+ "permissions"
+ ],
+ "properties": {
+ "identifier": {
+ "description": "A unique identifier for the permission.",
+ "type": "string"
+ },
+ "description": {
+ "description": "Human-readable description of what the permission does.",
+ "type": "string"
+ },
+ "permissions": {
+ "description": "All permissions this set contains.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PermissionKind"
+ }
+ }
+ }
+ },
+ "Permission": {
+ "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
+ "type": "object",
+ "required": [
+ "identifier"
+ ],
+ "properties": {
+ "version": {
+ "description": "The version of the permission.",
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 1.0
+ },
+ "identifier": {
+ "description": "A unique identifier for the permission.",
+ "type": "string"
+ },
+ "description": {
+ "description": "Human-readable description of what the permission does. Tauri internal convention is to use <h4> headings in markdown content for Tauri documentation generation purposes.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "commands": {
+ "description": "Allowed or denied commands when using this permission.",
+ "default": {
+ "allow": [],
+ "deny": []
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/Commands"
+ }
+ ]
+ },
+ "scope": {
+ "description": "Allowed or denied scoped when using this permission.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/Scopes"
+ }
+ ]
+ },
+ "platforms": {
+ "description": "Target platforms this permission applies. By default all platforms are affected by this permission.",
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/definitions/Target"
+ }
+ }
+ }
+ },
+ "Commands": {
+ "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
+ "type": "object",
+ "properties": {
+ "allow": {
+ "description": "Allowed command.",
+ "default": [],
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "deny": {
+ "description": "Denied command, which takes priority.",
+ "default": [],
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "Scopes": {
+ "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```",
+ "type": "object",
+ "properties": {
+ "allow": {
+ "description": "Data that defines what is allowed by the scope.",
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/definitions/Value"
+ }
+ },
+ "deny": {
+ "description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.",
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/definitions/Value"
+ }
+ }
+ }
+ },
+ "Value": {
+ "description": "All supported ACL values.",
+ "anyOf": [
+ {
+ "description": "Represents a null JSON value.",
+ "type": "null"
+ },
+ {
+ "description": "Represents a [`bool`].",
+ "type": "boolean"
+ },
+ {
+ "description": "Represents a valid ACL [`Number`].",
+ "allOf": [
+ {
+ "$ref": "#/definitions/Number"
+ }
+ ]
+ },
+ {
+ "description": "Represents a [`String`].",
+ "type": "string"
+ },
+ {
+ "description": "Represents a list of other [`Value`]s.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Value"
+ }
+ },
+ {
+ "description": "Represents a map of [`String`] keys to [`Value`]s.",
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/Value"
+ }
+ }
+ ]
+ },
+ "Number": {
+ "description": "A valid ACL number.",
+ "anyOf": [
+ {
+ "description": "Represents an [`i64`].",
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "description": "Represents a [`f64`].",
+ "type": "number",
+ "format": "double"
+ }
+ ]
+ },
+ "Target": {
+ "description": "Platform target.",
+ "oneOf": [
+ {
+ "description": "MacOS.",
+ "type": "string",
+ "enum": [
+ "macOS"
+ ]
+ },
+ {
+ "description": "Windows.",
+ "type": "string",
+ "enum": [
+ "windows"
+ ]
+ },
+ {
+ "description": "Linux.",
+ "type": "string",
+ "enum": [
+ "linux"
+ ]
+ },
+ {
+ "description": "Android.",
+ "type": "string",
+ "enum": [
+ "android"
+ ]
+ },
+ {
+ "description": "iOS.",
+ "type": "string",
+ "enum": [
+ "iOS"
+ ]
+ }
+ ]
+ },
+ "PermissionKind": {
+ "type": "string",
+ "oneOf": [
+ {
+ "description": "Enables the clear command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-clear"
+ },
+ {
+ "description": "Denies the clear command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-clear"
+ },
+ {
+ "description": "Enables the download command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-download"
+ },
+ {
+ "description": "Denies the download command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-download"
+ },
+ {
+ "description": "Enables the load command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-load"
+ },
+ {
+ "description": "Denies the load command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-load"
+ },
+ {
+ "description": "Enables the ping command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-ping"
+ },
+ {
+ "description": "Denies the ping command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-ping"
+ },
+ {
+ "description": "Enables the remove command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-remove"
+ },
+ {
+ "description": "Denies the remove command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-remove"
+ },
+ {
+ "description": "Default permissions for AppLoad plugin",
+ "type": "string",
+ "const": "default"
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/pnpm-lock.yaml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/pnpm-lock.yaml
new file mode 100644
index 000000000..8579927f2
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/pnpm-lock.yaml
@@ -0,0 +1,325 @@
+lockfileVersion: '9.0'
+
+settings:
+ autoInstallPeers: true
+ excludeLinksFromLockfile: false
+
+importers:
+
+ .:
+ dependencies:
+ '@tauri-apps/api':
+ specifier: ^2.0.0
+ version: 2.1.1
+ devDependencies:
+ '@rollup/plugin-typescript':
+ specifier: ^11.1.6
+ rollup:
+ specifier: ^4.9.6
+ version: 4.28.0
+ tslib:
+ specifier: ^2.6.2
+ version: 2.8.1
+ typescript:
+ specifier: ^5.3.3
+ version: 5.7.2
+
+packages:
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==}
+ engines: {node: '>=14.0.0'}
+ peerDependencies:
+ rollup: ^2.14.0||^3.0.0||^4.0.0
+ tslib: '*'
+ typescript: '>=3.7.0'
+ peerDependenciesMeta:
+ rollup:
+ optional: true
+ tslib:
+ optional: true
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==}
+ engines: {node: '>=14.0.0'}
+ peerDependencies:
+ rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
+ peerDependenciesMeta:
+ rollup:
+ optional: true
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-wLJuPLT6grGZsy34g4N1yRfYeouklTgPhH1gWXCYspenKYD0s3cR99ZevOGw5BexMNywkbV3UkjADisozBmpPQ==}
+ cpu: [arm]
+ os: [android]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-eiNkznlo0dLmVG/6wf+Ifi/v78G4d4QxRhuUl+s8EWZpDewgk7PX3ZyECUXU0Zq/Ca+8nU8cQpNC4Xgn2gFNDA==}
+ cpu: [arm64]
+ os: [android]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-lmKx9yHsppblnLQZOGxdO66gT77bvdBtr/0P+TPOseowE7D9AJoBw8ZDULRasXRWf1Z86/gcOdpBrV6VDUY36Q==}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-8hxgfReVs7k9Js1uAIhS6zq3I+wKQETInnWQtgzt8JfGx51R1N6DRVy3F4o0lQwumbErRz52YqwjfvuwRxGv1w==}
+ cpu: [x64]
+ os: [darwin]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-lA1zZB3bFx5oxu9fYud4+g1mt+lYXCoch0M0V/xhqLoGatbzVse0wlSQ1UYOWKpuSu3gyN4qEc0Dxf/DII1bhQ==}
+ cpu: [arm64]
+ os: [freebsd]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-aI2plavbUDjCQB/sRbeUZWX9qp12GfYkYSJOrdYTL/C5D53bsE2/nBPuoiJKoWp5SN78v2Vr8ZPnB+/VbQ2pFA==}
+ cpu: [x64]
+ os: [freebsd]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w==}
+ cpu: [arm]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg==}
+ cpu: [arm]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ==}
+ cpu: [ppc64]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g==}
+ cpu: [riscv64]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw==}
+ cpu: [s390x]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw==}
+ cpu: [x64]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw==}
+ cpu: [x64]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg==}
+ cpu: [arm64]
+ os: [win32]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-kN/Vpip8emMLn/eOza+4JwqDZBL6MPNpkdaEsgUtW1NYN3DZvZqSQrbKzJcTL6hd8YNmFTn7XGWMwccOcJBL0A==}
+ cpu: [ia32]
+ os: [win32]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-Bvno2/aZT6usSa7lRDL2+hMjVAGjuqaymF1ApZm31JXzniR/hvr14jpU+/z4X6Gt5BPlzosscyJZGUvguXIqeQ==}
+ cpu: [x64]
+ os: [win32]
+
+ '@tauri-apps/[email protected]':
+ resolution: {integrity: sha512-fzUfFFKo4lknXGJq8qrCidkUcKcH2UHhfaaCNt4GzgzGaW2iS26uFOg4tS3H4P8D6ZEeUxtiD5z0nwFF0UN30A==}
+
+ '@types/[email protected]':
+ resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==}
+
+ resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
+
+ resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
+ engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
+ os: [darwin]
+
+ resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
+
+ resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
+ engines: {node: '>= 0.4'}
+
+ resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==}
+ engines: {node: '>= 0.4'}
+
+ resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
+
+ resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
+ engines: {node: '>=12'}
+
+ resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==}
+ hasBin: true
+
+ resolution: {integrity: sha512-G9GOrmgWHBma4YfCcX8PjH0qhXSdH8B4HDE2o4/jaxj93S4DPCIDoLcXz99eWMji4hB29UFCEd7B2gwGJDR9cQ==}
+ engines: {node: '>=18.0.0', npm: '>=8.0.0'}
+ hasBin: true
+
+ resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
+ engines: {node: '>= 0.4'}
+
+ resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
+
+ resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==}
+ engines: {node: '>=14.17'}
+ hasBin: true
+
+snapshots:
+
+ dependencies:
+ '@rollup/pluginutils': 5.1.3([email protected])
+ resolve: 1.22.8
+ typescript: 5.7.2
+ optionalDependencies:
+ rollup: 4.28.0
+ tslib: 2.8.1
+
+ dependencies:
+ '@types/estree': 1.0.6
+ estree-walker: 2.0.2
+ picomatch: 4.0.2
+ optionalDependencies:
+ rollup: 4.28.0
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@tauri-apps/[email protected]': {}
+
+ '@types/[email protected]': {}
+
+
+ optional: true
+
+
+ dependencies:
+ function-bind: 1.1.2
+
+ dependencies:
+ hasown: 2.0.2
+
+
+
+ dependencies:
+ is-core-module: 2.15.1
+ path-parse: 1.0.7
+ supports-preserve-symlinks-flag: 1.0.0
+
+ dependencies:
+ '@types/estree': 1.0.6
+ optionalDependencies:
+ '@rollup/rollup-android-arm-eabi': 4.28.0
+ '@rollup/rollup-android-arm64': 4.28.0
+ '@rollup/rollup-darwin-arm64': 4.28.0
+ '@rollup/rollup-darwin-x64': 4.28.0
+ '@rollup/rollup-freebsd-arm64': 4.28.0
+ '@rollup/rollup-freebsd-x64': 4.28.0
+ '@rollup/rollup-linux-arm-gnueabihf': 4.28.0
+ '@rollup/rollup-linux-arm-musleabihf': 4.28.0
+ '@rollup/rollup-linux-arm64-gnu': 4.28.0
+ '@rollup/rollup-linux-arm64-musl': 4.28.0
+ '@rollup/rollup-linux-powerpc64le-gnu': 4.28.0
+ '@rollup/rollup-linux-riscv64-gnu': 4.28.0
+ '@rollup/rollup-linux-s390x-gnu': 4.28.0
+ '@rollup/rollup-linux-x64-gnu': 4.28.0
+ '@rollup/rollup-linux-x64-musl': 4.28.0
+ '@rollup/rollup-win32-arm64-msvc': 4.28.0
+ '@rollup/rollup-win32-ia32-msvc': 4.28.0
+ '@rollup/rollup-win32-x64-msvc': 4.28.0
+ fsevents: 2.3.3
+
+
+
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/rollup.config.js b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/rollup.config.js
new file mode 100644
index 000000000..d83436352
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/rollup.config.js
@@ -0,0 +1,31 @@
+import { readFileSync } from 'fs'
+import { join } from 'path'
+import { cwd } from 'process'
+import typescript from '@rollup/plugin-typescript'
+
+const pkg = JSON.parse(readFileSync(join(cwd(), 'package.json'), 'utf8'))
+
+export default {
+ input: 'guest-js/index.ts',
+ output: [
+ {
+ file: pkg.exports.import,
+ format: 'esm'
+ },
+ {
+ file: pkg.exports.require,
+ format: 'cjs'
+ }
+ ],
+ plugins: [
+ typescript({
+ declaration: true,
+ declarationDir: `./${pkg.exports.import.split('/')[0]}`
+ })
+ ],
+ external: [
+ /^@tauri-apps\/api/,
+ ...Object.keys(pkg.dependencies || {}),
+ ...Object.keys(pkg.peerDependencies || {})
+ ]
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/api/client.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/api/client.rs
new file mode 100644
index 000000000..d58875e83
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/api/client.rs
@@ -0,0 +1,126 @@
+use std::time::Duration;
+
+use reqwest::{Client as HttpClient, StatusCode, Url};
+use serde::de::DeserializeOwned;
+
+use crate::{BundleMetadata, PublicKeyInfo};
+
+use super::{
+ error::{ApiError, Result},
+ model::ApiResponse,
+ API_VERSION,
+};
+
+const DEFAULT_TIMEOUT: Duration = Duration::from_secs(30);
+
+#[derive(Debug, Clone)]
+pub struct ApiClient {
+ client: HttpClient,
+ base_url: Url,
+}
+
+impl ApiClient {
+ pub fn new(base_url: impl AsRef<str>) -> Result<Self> {
+ tracing::info!(
+ "Initializing ApiClient with base URL: {}",
+ base_url.as_ref()
+ );
+
+ let client = HttpClient::builder()
+ .timeout(DEFAULT_TIMEOUT)
+ .user_agent(format!(
+ "{}/{}",
+ env!("CARGO_PKG_NAME"),
+ env!("CARGO_PKG_VERSION")
+ ))
+ .build()
+ .map_err(ApiError::RequestFailed)?;
+
+ Ok(Self {
+ client,
+ base_url: base_url.as_ref().parse().map_err(ApiError::InvalidUrl)?,
+ })
+ }
+
+ pub async fn list_key(&self) -> Result<PublicKeyInfo> {
+ self.get(&format!("/api/{API_VERSION}/key")).await
+ }
+
+ // NOTE: Right now this is fetching whatever is listed,
+ // but if there are more than one bundle per SH instance,
+ // this is where the changes should be made.
+ pub async fn fetch_bundle_metadata(&self, name: &str) -> Result<BundleMetadata> {
+ tracing::debug!(bundle_name = name, "Fetching metadata");
+ self.get(&format!("/api/{API_VERSION}/manifest")).await
+ }
+
+ pub async fn download_bundle(&self, name: &str) -> Result<Vec<u8>> {
+ tracing::debug!(bundle_name = name, "Downloading bundle");
+ let url = self.build_url(&format!("/api/{API_VERSION}/bundle"))?;
+
+ let response = self.client.get(url).send().await.map_err(|e| {
+ tracing::error!(bundle_name = name, error = %e, "Download request failed");
+ ApiError::RequestFailed(e)
+ })?;
+
+ match response.status() {
+ StatusCode::OK => {
+ tracing::debug!(bundle_name = name, "Download successful");
+ Ok(response.bytes().await?.to_vec())
+ }
+ StatusCode::NOT_FOUND => {
+ tracing::warn!(bundle_name = name, "Bundle not found");
+ Err(ApiError::BundleNotFound(name.to_string()))
+ }
+ status => {
+ let error_text = response.text().await.unwrap_or_default();
+ tracing::error!(bundle_name = name, status = %status, error = %error_text, "Download failed");
+ Err(ApiError::from_status(status.as_u16(), error_text))
+ }
+ }
+ }
+
+ async fn get<T: DeserializeOwned>(&self, path: &str) -> Result<T> {
+ tracing::debug!(path, "Sending GET request");
+ let url = self.build_url(path)?;
+
+ let response = self.client.get(url).send().await.map_err(|e| {
+ tracing::error!(path, error = %e, "Request failed");
+ ApiError::RequestFailed(e)
+ })?;
+
+ match response.status() {
+ StatusCode::OK => {
+ let api_response: ApiResponse<T> = response.json().await?;
+ if api_response.success {
+ Ok(api_response.data)
+ } else {
+ Err(ApiError::ServerError {
+ status: 200,
+ message: api_response.error.unwrap_or_else(|| "Unknown error".into()),
+ })
+ }
+ }
+ StatusCode::NOT_FOUND => Err(ApiError::BundleNotFound(path.to_string())),
+ status => {
+ let error_text = response.text().await.unwrap_or_default();
+ tracing::error!(path, status = %status, error = %error_text, "Request failed");
+ Err(ApiError::from_status(status.as_u16(), error_text))
+ }
+ }
+ }
+
+ fn build_url(&self, path: &str) -> Result<Url> {
+ let path_to_join = path.trim_start_matches('/');
+
+ let mut base = self.base_url.clone();
+ if !base.path().ends_with('/') {
+ base.set_path(&format!("{}/", base.path()));
+ }
+
+ base.join(path_to_join).map_err(|e| {
+ tracing::error!(path, error = %e, "Invalid URL");
+ ApiError::InvalidUrl(e)
+ })
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/api/error.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/api/error.rs
new file mode 100644
index 000000000..cc538898c
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/api/error.rs
@@ -0,0 +1,50 @@
+use thiserror::Error;
+
+#[derive(Debug, Error)]
+pub enum ApiError {
+ #[error("HTTP request failed: {0}")]
+ RequestFailed(#[from] reqwest::Error),
+
+ #[error("Invalid server response: {0}")]
+ InvalidResponse(String),
+
+ #[error("Bundle not found: {0}")]
+ BundleNotFound(String),
+
+ #[error("File not found: {0}")]
+ FileNotFound(String),
+
+ #[error("Bundle verification failed: {0}")]
+ VerificationFailed(String),
+
+ #[error("API error {status}: {message}")]
+ ServerError { status: u16, message: String },
+
+ #[error("Failed to parse response: {0}")]
+ ParseError(#[from] serde_json::Error),
+
+ #[error("Server connection failed: {0}")]
+ ConnectionFailed(String),
+
+ #[error("Invalid URL: {0}")]
+ InvalidUrl(#[from] url::ParseError),
+}
+
+impl ApiError {
+ pub fn is_not_found(&self) -> bool {
+ matches!(self, Self::BundleNotFound(_))
+ }
+
+ pub fn is_verification_error(&self) -> bool {
+ matches!(self, Self::VerificationFailed(_))
+ }
+
+ pub fn from_status(status: u16, message: impl Into<String>) -> Self {
+ Self::ServerError {
+ status,
+ message: message.into(),
+ }
+ }
+}
+
+pub type Result<T> = std::result::Result<T, ApiError>;
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/api/mod.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/api/mod.rs
new file mode 100644
index 000000000..ae83b93cc
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/api/mod.rs
@@ -0,0 +1,8 @@
+mod client;
+mod error;
+mod model;
+
+pub use client::ApiClient;
+pub use error::ApiError;
+
+pub const API_VERSION: &str = "v1";
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/api/model.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/api/model.rs
new file mode 100644
index 000000000..e24cbecdb
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/api/model.rs
@@ -0,0 +1,9 @@
+use serde::Deserialize;
+
+#[derive(Debug, Clone, Deserialize)]
+pub struct ApiResponse<T> {
+ pub success: bool,
+ #[serde(default)]
+ pub error: Option<String>,
+ pub data: T,
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/bundle/error.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/bundle/error.rs
new file mode 100644
index 000000000..e374e30f1
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/bundle/error.rs
@@ -0,0 +1,27 @@
+use thiserror::Error;
+
+#[derive(Debug, Error)]
+pub enum BundleError {
+ #[error("File not found in bundle: {0}")]
+ FileNotFound(String),
+
+ #[error("Invalid bundle format: {0}")]
+ InvalidFormat(String),
+
+ #[error("Zip error: {0}")]
+ Zip(#[from] zip::result::ZipError),
+
+ #[error("Storage error: {0}")]
+ Storage(#[from] crate::storage::StorageError),
+
+ #[error("API error: {0}")]
+ Api(#[from] crate::api::ApiError),
+
+ #[error("Cache error: {0}")]
+ Cache(#[from] crate::cache::CacheError),
+
+ #[error("Verification error: {0}")]
+ Verification(#[from] crate::verification::VerificationError),
+}
+
+pub type Result<T> = std::result::Result<T, BundleError>;
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/bundle/loader.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/bundle/loader.rs
new file mode 100644
index 000000000..30b4c2550
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/bundle/loader.rs
@@ -0,0 +1,184 @@
+use std::sync::Arc;
+
+use super::{BundleError, Result, VerifiedBundle};
+use crate::{
+ api::ApiClient,
+ cache::CacheManager,
+ storage::{StorageError, StorageManager},
+ verification::{BundleVerifier, KeyManager},
+};
+
+#[derive(Debug)]
+struct BundleInfo {
+ name: String,
+ content: Vec<u8>,
+}
+
+pub struct BundleLoader {
+ cache: Arc<CacheManager>,
+ storage: Arc<StorageManager>,
+}
+
+impl BundleLoader {
+ pub fn new(cache: Arc<CacheManager>, storage: Arc<StorageManager>) -> Self {
+ Self { cache, storage }
+ }
+
+ pub async fn load_bundle(&self, server_url: &str) -> Result<()> {
+ tracing::info!(%server_url, "Starting bundle loading process");
+
+ let api_client = self.create_api_client(server_url)?;
+ let verifier = self.init_bundle_verifier(&api_client).await?;
+ let metadata = self.fetch_metadata(&api_client, server_url).await?;
+
+ let bundle_info = match self.get_bundle_info(server_url, &metadata).await? {
+ Some(info) => info,
+ None => {
+ self.download_and_verify_bundle(server_url, &api_client, &verifier, &metadata)
+ .await?
+ }
+ };
+
+ self.store_verified_bundle(server_url, bundle_info, &metadata)
+ .await?;
+
+ tracing::info!(%server_url, "Bundle loading completed successfully");
+ Ok(())
+ }
+
+ async fn get_bundle_info(
+ &self,
+ server_url: &str,
+ metadata: &crate::BundleMetadata,
+ ) -> Result<Option<BundleInfo>> {
+ match self.storage.get_bundle_entry(server_url).await? {
+ Some(entry) if entry.version == metadata.version => {
+ tracing::info!(%server_url, "Bundle version matches, checking cached version");
+ match self.load_existing_bundle(&entry.bundle_name).await {
+ Ok(bundle) => {
+ tracing::info!(%server_url, "Successfully loaded cached bundle");
+ Ok(Some(bundle))
+ }
+ Err(BundleError::Storage(StorageError::BundleNotFound(_))) => {
+ tracing::info!(%server_url, "Cached bundle not found, will download fresh copy");
+ Ok(None)
+ }
+ Err(e) => Err(e),
+ }
+ }
+ Some(entry) => {
+ tracing::info!(
+ %server_url,
+ local_version = %entry.version,
+ remote_version = %metadata.version,
+ "Version mismatch, downloading new bundle"
+ );
+ self.storage
+ .delete_bundle(&entry.bundle_name, server_url)
+ .await?;
+ Ok(None)
+ }
+ None => {
+ tracing::info!(%server_url, "No existing bundle found, downloading");
+ Ok(None)
+ }
+ }
+ }
+
+ async fn store_verified_bundle(
+ &self,
+ server_url: &str,
+ bundle_info: BundleInfo,
+ metadata: &crate::BundleMetadata,
+ ) -> Result<()> {
+ let verified = VerifiedBundle::new(bundle_info.content, metadata.clone())?;
+
+ tracing::info!(%server_url, "Caching verified bundle");
+ Ok(self
+ .cache
+ .cache_bundle(&bundle_info.name, &verified)
+ .await?)
+ }
+
+ fn create_api_client(&self, server_url: &str) -> Result<ApiClient> {
+ Ok(ApiClient::new(server_url).map_err(|e| {
+ tracing::error!(%server_url, %e, "Failed to create API client");
+ e
+ })?)
+ }
+
+ async fn init_bundle_verifier(&self, api_client: &ApiClient) -> Result<BundleVerifier> {
+ let key_manager = KeyManager::new(api_client.clone()).await.map_err(|e| {
+ tracing::error!(%e, "Failed to initialize key manager");
+ e
+ })?;
+
+ Ok(BundleVerifier::new(key_manager))
+ }
+
+ async fn fetch_metadata(
+ &self,
+ api_client: &ApiClient,
+ server_url: &str,
+ ) -> Result<crate::BundleMetadata> {
+ Ok(api_client
+ .fetch_bundle_metadata("latest")
+ .await
+ .map_err(|e| {
+ tracing::error!(%server_url, %e, "Failed to fetch bundle metadata");
+ e
+ })?)
+ }
+
+ async fn load_existing_bundle(&self, bundle_name: &str) -> Result<BundleInfo> {
+ tracing::info!(%bundle_name, "Loading bundle from storage");
+ let content = self.storage.load_bundle(bundle_name).await?;
+ Ok(BundleInfo {
+ name: bundle_name.to_string(),
+ content,
+ })
+ }
+
+ async fn download_and_verify_bundle(
+ &self,
+ server_url: &str,
+ api_client: &ApiClient,
+ verifier: &BundleVerifier,
+ metadata: &crate::BundleMetadata,
+ ) -> Result<BundleInfo> {
+ tracing::info!(%server_url, "Downloading bundle");
+ let content = api_client.download_bundle("latest").await.map_err(|e| {
+ tracing::error!(%server_url, %e, "Failed to download bundle");
+ e
+ })?;
+
+ tracing::info!(%server_url, "Verifying bundle integrity");
+ verifier.verify_bundle(&content, metadata).await?;
+
+ let verified = VerifiedBundle::new(content.clone(), metadata.clone())?;
+ let name = self.generate_bundle_name(server_url);
+
+ tracing::info!(%server_url, "Storing verified bundle");
+ self.storage
+ .store_bundle(&name, server_url, &metadata.version, &verified)
+ .await?;
+
+ Ok(BundleInfo { name, content })
+ }
+
+ fn generate_bundle_name(&self, server_url: &str) -> String {
+ server_url
+ // NOTE: This is to fix capitalized URL not being served properly on Windows
+ .to_lowercase()
+ .split("://")
+ .nth(1)
+ .unwrap_or("unknown")
+ // Extract only the hostname part by splitting at the first '/' and taking the first part
+ .split('/')
+ .next()
+ .unwrap_or("unknown")
+ .replace(['/', '.', ':', '-'], "_")
+ .trim_end_matches('_')
+ .to_string()
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/bundle/mod.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/bundle/mod.rs
new file mode 100644
index 000000000..4e9ac155e
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/bundle/mod.rs
@@ -0,0 +1,7 @@
+mod error;
+mod loader;
+mod verified;
+
+pub use error::{BundleError, Result};
+pub use loader::BundleLoader;
+pub use verified::VerifiedBundle;
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/bundle/verified.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/bundle/verified.rs
new file mode 100644
index 000000000..1452c7862
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/bundle/verified.rs
@@ -0,0 +1,175 @@
+use std::collections::HashMap;
+use std::io::Cursor;
+
+use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
+use zip::ZipArchive;
+
+use super::Result;
+use crate::bundle::BundleError;
+use crate::verification::FileVerifier;
+use crate::{BundleMetadata, Manifest};
+
+#[derive(Debug)]
+pub struct VerifiedFile {
+ pub path: String,
+ pub content: Vec<u8>,
+}
+
+#[derive(Debug)]
+pub struct VerifiedBundle {
+ pub content: Vec<u8>,
+ pub files: HashMap<String, VerifiedFile>,
+ pub total_size: usize,
+}
+
+impl VerifiedBundle {
+ pub fn new(content: Vec<u8>, metadata: BundleMetadata) -> super::Result<Self> {
+ tracing::info!(
+ "Creating new verified bundle with {} files",
+ metadata.manifest.files.len()
+ );
+
+ let mut archive = ZipArchive::new(Cursor::new(&content)).map_err(|e| {
+ tracing::error!(error = %e, "Failed to read ZIP archive");
+ super::BundleError::InvalidFormat(format!("Failed to read ZIP archive: {}", e))
+ })?;
+
+ tracing::debug!("Extracting all files from archive");
+ let file_contents: HashMap<String, Vec<u8>> = metadata
+ .manifest
+ .files
+ .iter()
+ .map(|file_entry| {
+ let path = file_entry.path.clone();
+ tracing::debug!(path = %path, "Extracting file from archive");
+ let mut content = Vec::new();
+ match archive.by_name(&path) {
+ Ok(mut file) => {
+ if let Err(e) = std::io::Read::read_to_end(&mut file, &mut content) {
+ tracing::error!(path = %path, error = %e, "Failed to read file");
+ Err(super::BundleError::InvalidFormat(format!(
+ "Failed to read {}: {}",
+ path, e
+ )))
+ } else {
+ Ok((path, content))
+ }
+ }
+ Err(e) => {
+ tracing::error!(path = %path, error = %e, "File not found in archive");
+ Err(super::BundleError::InvalidFormat(format!(
+ "File not found in archive: {}",
+ path
+ )))
+ }
+ }
+ })
+ .collect::<Result<_>>()?;
+
+ tracing::debug!("Verifying files in parallel");
+ let verified_files: Result<Vec<_>> = metadata
+ .manifest
+ .files
+ .par_iter()
+ .map(|file_entry| {
+ let content = file_contents.get(&file_entry.path).ok_or_else(|| {
+ super::BundleError::InvalidFormat(format!("Missing content for {}", file_entry.path))
+ })?;
+
+ tracing::debug!(path = %file_entry.path, "Verifying file");
+ FileVerifier::verify(content, &file_entry.hash).map_err(|e| {
+ tracing::error!(path = %file_entry.path, error = %e, "File verification failed");
+ super::BundleError::Verification(e)
+ })?;
+
+ Ok((
+ file_entry.path.clone(),
+ VerifiedFile {
+ path: file_entry.path.clone(),
+ content: content.clone(),
+ },
+ ))
+ })
+ .collect();
+
+ let files: HashMap<_, _> = verified_files?.into_iter().collect();
+ let total_size = files.values().map(|f| f.content.len()).sum();
+
+ tracing::info!(
+ "Successfully verified bundle with {} files, total size {}",
+ files.len(),
+ total_size
+ );
+
+ Ok(Self {
+ content,
+ files,
+ total_size,
+ })
+ }
+
+ pub fn trust(content: Vec<u8>, manifest: Manifest) -> Result<Self> {
+ tracing::info!(
+ "Creating trusted bundle with {} files",
+ manifest.files.len()
+ );
+
+ let mut archive = ZipArchive::new(Cursor::new(&content)).map_err(|e| {
+ tracing::error!(error = %e, "Failed to read ZIP archive");
+ BundleError::InvalidFormat(format!("Failed to read ZIP archive: {}", e))
+ })?;
+
+ let mut files = HashMap::new();
+ let mut total_size = 0;
+
+ for file_entry in manifest.files.iter() {
+ let path = &file_entry.path;
+ tracing::debug!(path = %path, "Extracting file from archive");
+
+ match archive.by_name(path) {
+ Ok(mut file) => {
+ let mut content = Vec::new();
+ if let Err(e) = std::io::Read::read_to_end(&mut file, &mut content) {
+ tracing::error!(path = %path, error = %e, "Failed to read file");
+ return Err(BundleError::InvalidFormat(format!(
+ "Failed to read {}: {}",
+ path, e
+ )));
+ }
+
+ total_size += content.len();
+ files.insert(
+ path.to_string(),
+ VerifiedFile {
+ path: path.to_string(),
+ content,
+ },
+ );
+ }
+ Err(e) => {
+ tracing::error!(path = %path, error = %e, "File not found in archive");
+ return Err(BundleError::InvalidFormat(format!(
+ "File not found in archive: {}",
+ path
+ )));
+ }
+ }
+ }
+
+ tracing::info!(
+ "Successfully created trusted bundle with {} files, total size {}",
+ files.len(),
+ total_size
+ );
+
+ Ok(Self {
+ content,
+ files,
+ total_size,
+ })
+ }
+
+ pub fn iter_files(&self) -> impl Iterator<Item = &VerifiedFile> {
+ self.files.values()
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/error.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/error.rs
new file mode 100644
index 000000000..8be22aeac
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/error.rs
@@ -0,0 +1,27 @@
+use thiserror::Error;
+
+pub type Result<T> = std::result::Result<T, CacheError>;
+
+#[derive(Debug, Error)]
+pub enum CacheError {
+ #[error("Cache entry not found: {0}")]
+ NotFound(String),
+
+ #[error("Cache entry expired: {0}")]
+ Expired(String),
+
+ #[error("Cache full")]
+ CacheFull,
+
+ #[error("IO error: {0}")]
+ Io(#[from] std::io::Error),
+
+ #[error("Verification error: {0}")]
+ Verification(#[from] crate::verification::VerificationError),
+
+ #[error("Zip error: {0}")]
+ Zip(#[from] zip::result::ZipError),
+
+ #[error("Invalid cache entry: {0}")]
+ InvalidEntry(String),
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/manager.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/manager.rs
new file mode 100644
index 000000000..37e773d75
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/manager.rs
@@ -0,0 +1,80 @@
+use std::path::PathBuf;
+use std::sync::Arc;
+
+use rayon::prelude::*;
+use tauri::Config;
+
+use super::{CacheError, CachePolicy, FileStore, Result};
+use crate::bundle::VerifiedBundle;
+
+const BATCH_SIZE: usize = 10;
+
+pub struct CacheManager {
+ store: Arc<FileStore>,
+ policy: CachePolicy,
+}
+
+impl CacheManager {
+ pub fn new(cache_dir: PathBuf, policy: CachePolicy, config: Config) -> Self {
+ tracing::info!(
+ ?cache_dir,
+ max_size = policy.max_size,
+ "Initializing CacheManager"
+ );
+
+ let store = Arc::new(FileStore::new(cache_dir, policy.max_size, config));
+ Self { store, policy }
+ }
+
+ pub async fn get_file(&self, bundle_name: &str, file_path: &str) -> Result<Vec<u8>> {
+ let cache_key = format!("{}:{}", bundle_name, file_path);
+ tracing::info!(%bundle_name, %file_path, %cache_key, "Retrieving file");
+
+ tracing::debug!(
+ %bundle_name,
+ %file_path,
+ %cache_key,
+ thread_id = ?std::thread::current().id(),
+ "Cache lookup attempt"
+ );
+
+ self.store.get(&cache_key).await
+ }
+
+ pub async fn cache_bundle(&self, name: &str, verified: &VerifiedBundle) -> Result<()> {
+ tracing::info!(%name, "Starting bundle caching process");
+
+ if verified.total_size > self.policy.max_size {
+ tracing::error!(%name, total_size = verified.total_size, max_size = self.policy.max_size, "Cache size limit exceeded");
+ return Err(CacheError::CacheFull);
+ }
+
+ tracing::info!(%name, "Clearing memory cache before caching bundle");
+ self.clear_memory_cache().await;
+
+ let store = self.store.clone();
+
+ verified
+ .iter_files()
+ .collect::<Vec<_>>()
+ .par_chunks(BATCH_SIZE)
+ .try_for_each(|batch| {
+ batch.iter().try_for_each(|file| {
+ let cache_key = format!("{}:{}", name, file.path);
+ futures::executor::block_on(store.store(&cache_key, file.content.clone()))
+ .map_err(|e| {
+ tracing::error!(%name, path = %file.path, %e, "Cache storage failed");
+ e
+ })
+ })
+ })?;
+
+ tracing::info!(%name, "Bundle caching completed successfully");
+ Ok(())
+ }
+
+ pub async fn clear_memory_cache(&self) {
+ tracing::info!("Forwarding clear cache request to FileStore");
+ self.store.clear().await;
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/mod.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/mod.rs
new file mode 100644
index 000000000..063619ea9
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/mod.rs
@@ -0,0 +1,12 @@
+mod error;
+mod manager;
+mod policy;
+mod store;
+
+pub use error::{CacheError, Result};
+pub use manager::CacheManager;
+pub use policy::CachePolicy;
+pub use store::FileStore;
+
+pub const DEFAULT_CACHE_SIZE: usize = 100 * 1024 * 1024; // 100MB
+pub const DEFAULT_FILE_TTL: u64 = 3600; // 1 hour
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/policy.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/policy.rs
new file mode 100644
index 000000000..447f5e6ea
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/policy.rs
@@ -0,0 +1,36 @@
+use std::time::Duration;
+
+#[derive(Debug, Clone)]
+pub struct CachePolicy {
+ pub max_size: usize,
+ pub file_ttl: Duration,
+ pub hot_ratio: f32,
+}
+
+impl CachePolicy {
+ pub fn new(max_size: usize, file_ttl: Duration, hot_ratio: f32) -> Self {
+ Self {
+ max_size,
+ file_ttl,
+ hot_ratio: hot_ratio.clamp(0.0, 1.0),
+ }
+ }
+
+ pub fn hot_cache_size(&self) -> usize {
+ (self.max_size as f32 * self.hot_ratio) as usize
+ }
+
+ pub fn disk_cache_size(&self) -> usize {
+ self.max_size - self.hot_cache_size()
+ }
+}
+
+impl Default for CachePolicy {
+ fn default() -> Self {
+ Self {
+ max_size: super::DEFAULT_CACHE_SIZE,
+ file_ttl: Duration::from_secs(super::DEFAULT_FILE_TTL),
+ hot_ratio: 0.9,
+ }
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/store.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/store.rs
new file mode 100644
index 000000000..87f39397e
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/cache/store.rs
@@ -0,0 +1,180 @@
+use std::path::PathBuf;
+use std::sync::Arc;
+use std::time::Instant;
+
+use dashmap::DashMap;
+use lru::LruCache;
+use tauri::Config;
+use tokio::sync::Mutex;
+
+use super::{CacheError, Result};
+
+pub struct FileStore {
+ hot_cache: Arc<Mutex<LruCache<String, CacheEntry>>>,
+ disk_cache: Arc<DashMap<String, PathBuf>>,
+ cache_dir: PathBuf,
+ max_memory: usize,
+ config: Config,
+}
+
+struct CacheEntry {
+ content: Vec<u8>,
+ last_accessed: Instant,
+ size: usize,
+}
+
+impl FileStore {
+ pub fn new(cache_dir: PathBuf, max_memory: usize, config: Config) -> Self {
+ tracing::info!(
+ cache_dir = ?cache_dir,
+ max_memory,
+ "Initializing FileStore with cache directory and memory limit."
+ );
+ Self {
+ hot_cache: Arc::new(Mutex::new(LruCache::new(
+ std::num::NonZeroUsize::new(1000).unwrap(),
+ ))),
+ disk_cache: Arc::new(DashMap::new()),
+ cache_dir,
+ max_memory,
+ config,
+ }
+ }
+
+ pub async fn store(&self, key: &str, content: Vec<u8>) -> Result<()> {
+ let size = content.len();
+ tracing::info!(key, size, "Storing file in cache.");
+
+ let mut cache = self.hot_cache.lock().await;
+ let current_size = self.current_size(&cache);
+
+ if current_size + size <= self.max_memory {
+ tracing::debug!(key, size, "File fits in memory; adding to hot cache.");
+ cache.put(
+ key.to_string(),
+ CacheEntry {
+ content,
+ last_accessed: Instant::now(),
+ size,
+ },
+ );
+ return Ok(());
+ }
+
+ if size > self.max_memory {
+ tracing::warn!(
+ key,
+ size,
+ "File size exceeds maximum memory. Writing directly to disk."
+ );
+ let path = self.cache_dir.join(key);
+ tokio::fs::write(&path, &content).await.map_err(|e| {
+ tracing::error!(key, error = %e, "Failed to write file to disk.");
+ e
+ })?;
+ self.disk_cache.insert(key.to_string(), path);
+ return Ok(());
+ }
+
+ tracing::debug!(
+ key,
+ size,
+ current_size,
+ "Hot cache full; evicting files to make room."
+ );
+ while cache.len() > 0 && self.current_size(&cache) + size > self.max_memory {
+ if let Some((evicted_key, entry)) = cache.pop_lru() {
+ let path = self.cache_dir.join(&evicted_key);
+ tracing::debug!(evicted_key, "Evicting file to disk.");
+ std::fs::write(&path, &entry.content).map_err(|e| {
+ tracing::error!(
+ evicted_key,
+ error = %e,
+ "Failed to write evicted file to disk."
+ );
+ e
+ })?;
+ self.disk_cache.insert(evicted_key, path);
+ }
+ }
+
+ tracing::debug!(key, "Adding file to hot cache after eviction.");
+ cache.put(
+ key.to_string(),
+ CacheEntry {
+ content,
+ last_accessed: Instant::now(),
+ size,
+ },
+ );
+ Ok(())
+ }
+
+ pub async fn get(&self, key: &str) -> Result<Vec<u8>> {
+ tracing::info!(key, "Retrieving file from cache.");
+ tracing::debug!(
+ key,
+ thread_id = ?std::thread::current().id(),
+ hot_cache_len = self.hot_cache.lock().await.len(),
+ disk_cache_len = self.disk_cache.len(),
+ "Cache access attempt details"
+ );
+
+ let mut guard = self.hot_cache.lock().await;
+ if let Some(entry) = guard.get(key) {
+ tracing::debug!(key, "File found in hot cache.");
+ return Ok(entry.content.clone());
+ }
+ drop(guard);
+
+ tracing::debug!(key, "File not found in hot cache. Checking disk cache.");
+ if let Some(path) = self.disk_cache.get(key) {
+ tracing::debug!(key, path = ?path, "File found in disk cache. Reading from disk.");
+ let content = tokio::fs::read(path.value()).await.map_err(|e| {
+ tracing::error!(key, error = %e, "Failed to read file from disk.");
+ e
+ })?;
+ self.store(key, content.clone()).await?;
+ return Ok(content);
+ }
+
+ tracing::warn!(key, "File not found in cache.");
+ Err(CacheError::NotFound(key.to_string()))
+ }
+
+ pub async fn clear_except_prefix(&self, prefix: &str) {
+ let mut cache = self.hot_cache.lock().await;
+
+ let keys_to_keep: Vec<_> = cache
+ .iter()
+ .filter(|(key, _)| key.starts_with(prefix))
+ .map(|(key, _)| key.clone())
+ .collect();
+
+ let mut new_cache = LruCache::new(std::num::NonZeroUsize::new(1000).unwrap());
+ for key in keys_to_keep {
+ if let Some(entry) = cache.pop(&key) {
+ new_cache.put(key, entry);
+ }
+ }
+
+ *cache = new_cache;
+ }
+
+ pub async fn clear(&self) {
+ tracing::info!("Clearing in-memory cache");
+ let config = self.config.clone();
+ let name = config
+ .product_name
+ .unwrap_or("unknown".to_string())
+ .to_lowercase();
+ self.clear_except_prefix(&name).await;
+ tracing::info!("In-memory cache cleared successfully");
+ }
+
+ fn current_size(&self, cache: &LruCache<String, CacheEntry>) -> usize {
+ let size = cache.iter().map(|(_, entry)| entry.size).sum();
+ tracing::debug!(current_size = size, "Calculating current hot cache size.");
+ size
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/commands.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/commands.rs
new file mode 100644
index 000000000..c345bdbca
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/commands.rs
@@ -0,0 +1,249 @@
+use std::sync::Arc;
+
+#[cfg(target_os = "macos")]
+use tauri::TitleBarStyle;
+use tauri::{
+ command, AppHandle, LogicalPosition, Manager, Runtime, WebviewUrl, WebviewWindowBuilder,
+};
+
+use crate::{
+ bundle::BundleLoader,
+ cache::CacheManager,
+ models::{DownloadOptions, DownloadResponse, LoadOptions, LoadResponse},
+ storage::{StorageError, StorageManager},
+ ui, RemoveOptions, RemoveResponse, Result,
+};
+
+fn sanitize_window_label(input: &str) -> String {
+ input
+ .chars()
+ .map(|c| if c.is_alphanumeric() { c } else { '_' })
+ .collect()
+}
+
+#[command]
+pub async fn download<R: Runtime>(
+ app: AppHandle<R>,
+ options: DownloadOptions,
+) -> Result<DownloadResponse> {
+ tracing::info!(?options, "Starting download process");
+ let bundle_loader = app.state::<Arc<BundleLoader>>();
+ tracing::debug!("Retrieved BundleLoader state");
+
+ tracing::info!(url = %options.server_url, "Attempting to load bundle");
+ bundle_loader
+ .load_bundle(options.server_url.as_str())
+ .await
+ .map_err(|e| {
+ tracing::error!(?e, url = %options.server_url, "Failed to load bundle");
+ e
+ })?;
+
+ let storage = app.state::<Arc<crate::storage::StorageManager>>();
+ tracing::debug!("Retrieved StorageManager state");
+
+ tracing::info!(url = %options.server_url, "Fetching bundle entry from storage");
+ let entry = storage
+ .get_bundle_entry(options.server_url.as_str())
+ .await
+ .map_err(|e| {
+ tracing::error!(?e, url = %options.server_url, "Failed to fetch bundle entry");
+ e
+ })?
+ .ok_or_else(|| {
+ tracing::error!(url = %options.server_url, "Bundle not found after download");
+ crate::Error::Config("Bundle not found after download".into())
+ })?;
+
+ let response = DownloadResponse {
+ success: true,
+ bundle_name: entry.bundle_name,
+ server_url: options.server_url,
+ version: entry.version,
+ };
+
+ tracing::info!(?response, "Download completed successfully");
+ Ok(response)
+}
+
+#[command]
+pub async fn load<R: Runtime>(app: AppHandle<R>, options: LoadOptions) -> Result<LoadResponse> {
+ let base_label = sanitize_window_label(&options.window.title);
+ let current_label = format!("{}-curr", base_label);
+ let alternate_label = format!("{}-next", base_label);
+
+ let label = if app.get_webview_window(&current_label).is_some() {
+ alternate_label
+ } else {
+ current_label
+ };
+
+ tracing::info!(?options, bundle = %options.bundle_name, window_label = %label, "Loading bundle");
+
+ let url = format!("app://{}/", options.bundle_name.to_lowercase());
+ tracing::debug!(%url, "Generated app URL");
+
+ let window = WebviewWindowBuilder::new(&app, &label, WebviewUrl::App(url.parse().unwrap()))
+ .initialization_script(crate::KERNEL_JS)
+ .title(sanitize_window_label(&options.window.title))
+ .inner_size(options.window.width, options.window.height)
+ .resizable(options.window.resizable)
+ .disable_drag_drop_handler()
+ .build()
+ .map_err(|e| {
+ tracing::error!(?e, ?label, "Failed to create window");
+ e
+ })?;
+
+ #[cfg(target_os = "macos")]
+ {
+ let window_clone = window.clone();
+ window.run_on_main_thread(move || {
+ ui::macos::posit::setup_window(window_clone);
+ })?;
+ }
+
+ #[cfg(target_os = "windows")]
+ {
+ let window_clone = window.clone();
+ window.run_on_main_thread(move || {
+ ui::windows::posit::setup_window(window_clone);
+ })?;
+ }
+
+ for old_label in [
+ &format!("{}-curr", base_label),
+ &format!("{}-next", base_label),
+ "main",
+ ] {
+ if old_label == &label {
+ continue;
+ }
+
+ if let Some(old_window) = app.get_webview_window(old_label) {
+ old_window.close()?;
+ tracing::info!("Closing {} window", old_label);
+ }
+ }
+
+ let response = LoadResponse {
+ success: window.is_visible().unwrap_or(false),
+ window_label: label,
+ };
+
+ tracing::info!(?response, "Bundle loaded successfully");
+ Ok(response)
+}
+
+#[command]
+pub async fn remove<R: Runtime>(
+ app: AppHandle<R>,
+ options: RemoveOptions,
+) -> Result<RemoveResponse> {
+ tracing::info!(?options, "Starting instance removal process");
+ let storage = app.state::<Arc<StorageManager>>();
+ let cache = app.state::<Arc<CacheManager>>();
+
+ tracing::debug!("Retrieved StorageManager and CacheManager states");
+
+ storage
+ .delete_bundle(&options.bundle_name, &options.server_url)
+ .await
+ .map_err(|e| {
+ tracing::error!(?e, "Failed to delete bundle from storage");
+ e
+ })?;
+
+ cache.clear_memory_cache().await;
+
+ let response = RemoveResponse {
+ success: true,
+ bundle_name: options.bundle_name,
+ };
+
+ tracing::info!(?response, "Instance removed successfully");
+ Ok(response)
+}
+
+#[command]
+pub async fn clear<R: Runtime>(app: AppHandle<R>) -> Result<()> {
+ tracing::info!("Starting bundle cleanup process");
+ let storage = app.state::<Arc<StorageManager>>();
+
+ let layout = storage.layout();
+
+ if layout.bundles_dir().exists() {
+ tracing::debug!("Clearing bundles directory");
+ tokio::fs::remove_dir_all(layout.bundles_dir())
+ .await
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to clear bundles directory");
+ crate::Error::Storage(StorageError::Io(e))
+ })?;
+ tokio::fs::create_dir(layout.bundles_dir())
+ .await
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to recreate bundles directory");
+ crate::Error::Storage(StorageError::Io(e))
+ })?;
+ }
+
+ if layout.cache_dir().exists() {
+ tracing::debug!("Clearing cache directory");
+ tokio::fs::remove_dir_all(layout.cache_dir())
+ .await
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to clear cache directory");
+ crate::Error::Storage(StorageError::Io(e))
+ })?;
+ tokio::fs::create_dir(layout.cache_dir())
+ .await
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to recreate cache directory");
+ crate::Error::Storage(StorageError::Io(e))
+ })?;
+ }
+
+ if layout.key_dir().exists() {
+ tracing::debug!("Clearing key directory");
+ tokio::fs::remove_dir_all(layout.key_dir())
+ .await
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to clear key directory");
+ crate::Error::Storage(StorageError::Io(e))
+ })?;
+ tokio::fs::create_dir(layout.key_dir()).await.map_err(|e| {
+ tracing::error!(error = %e, "Failed to recreate key directory");
+ crate::Error::Storage(StorageError::Io(e))
+ })?;
+ }
+
+ if layout.temp_dir().exists() {
+ tracing::debug!("Clearing temp directory");
+ tokio::fs::remove_dir_all(layout.temp_dir())
+ .await
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to clear temp directory");
+ crate::Error::Storage(StorageError::Io(e))
+ })?;
+ tokio::fs::create_dir(layout.temp_dir())
+ .await
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to recreate temp directory");
+ crate::Error::Storage(StorageError::Io(e))
+ })?;
+ }
+
+ if layout.registry_path().exists() {
+ tracing::debug!("Removing registry.json");
+ tokio::fs::remove_file(layout.registry_path())
+ .await
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to remove registry.json");
+ crate::Error::Storage(StorageError::Io(e))
+ })?;
+ }
+
+ tracing::info!("Bundle cleanup completed successfully");
+ Ok(())
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/config/mod.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/config/mod.rs
new file mode 100644
index 000000000..5b595eaec
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/config/mod.rs
@@ -0,0 +1,5 @@
+mod model;
+
+pub use model::Config;
+
+pub const DEFAULT_CONFIG_PATH: &str = "config.json";
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/config/model.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/config/model.rs
new file mode 100644
index 000000000..061fbf7ec
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/config/model.rs
@@ -0,0 +1,74 @@
+use serde::{Deserialize, Serialize};
+use std::path::PathBuf;
+use std::time::Duration;
+
+use crate::cache::DEFAULT_CACHE_SIZE;
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct Config {
+ #[serde(default)]
+ pub api: ApiConfig,
+ #[serde(default)]
+ pub cache: CacheConfig,
+ #[serde(default)]
+ pub storage: StorageConfig,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ApiConfig {
+ pub server_url: String,
+ #[serde(with = "humantime_serde")]
+ pub timeout: Duration,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct CacheConfig {
+ pub max_size: usize,
+ #[serde(with = "humantime_serde")]
+ pub file_ttl: Duration,
+ pub hot_ratio: f32,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct StorageConfig {
+ pub root_dir: PathBuf,
+ pub max_bundle_size: usize,
+}
+
+impl Default for Config {
+ fn default() -> Self {
+ Self {
+ api: ApiConfig::default(),
+ cache: CacheConfig::default(),
+ storage: StorageConfig::default(),
+ }
+ }
+}
+
+impl Default for ApiConfig {
+ fn default() -> Self {
+ Self {
+ server_url: "http://localhost:3200".to_string(),
+ timeout: Duration::from_secs(30),
+ }
+ }
+}
+
+impl Default for CacheConfig {
+ fn default() -> Self {
+ Self {
+ max_size: DEFAULT_CACHE_SIZE,
+ file_ttl: Duration::from_secs(3600),
+ hot_ratio: 0.9,
+ }
+ }
+}
+
+impl Default for StorageConfig {
+ fn default() -> Self {
+ Self {
+ root_dir: PathBuf::from("data"),
+ max_bundle_size: 50 * 1024 * 1024, // 50MB
+ }
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/desktop.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/desktop.rs
new file mode 100644
index 000000000..a9da8300f
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/desktop.rs
@@ -0,0 +1,36 @@
+use std::sync::Arc;
+
+use serde::de::DeserializeOwned;
+use tauri::{plugin::PluginApi, AppHandle, Runtime};
+
+use crate::{
+ bundle::BundleLoader,
+ models::{DownloadOptions, DownloadResponse, LoadOptions, LoadResponse},
+ Result,
+};
+
+pub fn init<R: Runtime, C: DeserializeOwned>(
+ app: &AppHandle<R>,
+ api: PluginApi<R, C>,
+ bundle_loader: Arc<BundleLoader>,
+) -> Result<Appload<R>> {
+ Ok(Appload {
+ app: app.clone(),
+ bundle_loader,
+ })
+}
+
+pub struct Appload<R: Runtime> {
+ app: AppHandle<R>,
+ bundle_loader: Arc<BundleLoader>,
+}
+
+impl<R: Runtime> Appload<R> {
+ pub async fn download(&self, options: DownloadOptions) -> Result<DownloadResponse> {
+ super::commands::download(self.app.clone(), options).await
+ }
+
+ pub async fn load(&self, options: LoadOptions) -> Result<LoadResponse> {
+ super::commands::load(self.app.clone(), options).await
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/envvar.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/envvar.rs
new file mode 100644
index 000000000..2f8437d97
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/envvar.rs
@@ -0,0 +1,8 @@
+use std::{collections::HashMap, env};
+
+/// Collect environment variables that should be exposed to the web app
+pub(super) fn collect_env_vars() -> HashMap<String, String> {
+ env::vars()
+ .filter(|(k, _)| k.starts_with("VITE_"))
+ .collect()
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/error.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/error.rs
new file mode 100644
index 000000000..b2227be10
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/error.rs
@@ -0,0 +1,40 @@
+use serde::Serialize;
+use thiserror::Error;
+
+pub type Result<T> = std::result::Result<T, Error>;
+
+#[derive(Debug, Error)]
+pub enum Error {
+ #[error(transparent)]
+ Api(#[from] crate::api::ApiError),
+
+ #[error(transparent)]
+ Cache(#[from] crate::cache::CacheError),
+
+ #[error(transparent)]
+ Storage(#[from] crate::storage::StorageError),
+
+ #[error(transparent)]
+ Bundle(#[from] crate::bundle::BundleError),
+
+ #[error(transparent)]
+ Verification(#[from] crate::verification::VerificationError),
+
+ #[error(transparent)]
+ Tauri(#[from] tauri::Error),
+
+ #[error("Window not found")]
+ WindowNotFound,
+
+ #[error("Configuration error: {0}")]
+ Config(String),
+}
+
+impl Serialize for Error {
+ fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
+ where
+ S: serde::Serializer,
+ {
+ serializer.serialize_str(self.to_string().as_ref())
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/global.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/global.rs
new file mode 100644
index 000000000..b4910dd13
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/global.rs
@@ -0,0 +1,4 @@
+use std::time::Duration;
+
+pub(crate) const BUNDLE_CLEANUP_INTERVAL: Duration = Duration::from_secs(3600); // 1 hr
+pub(crate) const BUNDLE_MAX_AGE: Duration = Duration::from_secs(86400); // 24 hrs
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/kernel.js b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/kernel.js
new file mode 100644
index 000000000..69660057f
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/kernel.js
@@ -0,0 +1,4 @@
+(() => {
+ console.log('Setting desktop kernel mode');
+ window.__KERNEL_MODE__ = 'desktop';
+})();
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/lib.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/lib.rs
new file mode 100644
index 000000000..5bc6b2a85
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/lib.rs
@@ -0,0 +1,167 @@
+// Copyright 2024 CuriousCorrelation
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-License-Identifier: MIT
+
+//! app bundle loading plugin for Tauri.
+//! This plugin handles downloading and loading external web app bundles in Tauri webviews.
+
+// TODO: Fix these. There are icons in the asset directory for the web app.
+#![doc(
+ html_logo_url = "https://github.com/<Placeholder>/<Placeholder>/raw/main/packages/app/public/favicon.ico",
+ html_favicon_url = "https://github.com/<Placeholder>/<Placeholder>/raw/main/packages/app/public/favicon.ico"
+)]
+
+use std::sync::Arc;
+use tauri::{
+ plugin::{Builder, Plugin, TauriPlugin},
+ Manager, Runtime,
+};
+
+pub use models::*;
+
+#[cfg(desktop)]
+mod desktop;
+#[cfg(mobile)]
+mod mobile;
+
+mod api;
+mod bundle;
+mod cache;
+mod commands;
+mod config;
+mod envvar;
+mod error;
+mod global;
+mod models;
+mod storage;
+mod ui;
+mod uri;
+mod vendor;
+mod verification;
+
+pub use error::{Error, Result};
+pub use vendor::{VendorConfig, VendorConfigBuilder};
+
+#[cfg(mobile)]
+use mobile::Appload;
+
+const KERNEL_JS: &str = include_str!("kernel.js");
+
+pub fn init<R: Runtime>(vendor: VendorConfigBuilder) -> TauriPlugin<R> {
+ Builder::new("appload")
+ .setup(move |app, api| {
+ tracing::info!("Initializing appload plugin");
+
+ tracing::debug!("Loading configuration settings.");
+ let mut config = config::Config::default();
+
+ tracing::debug!("Resolving app config directory for storage root.");
+ let app_config_dir = app.path().app_config_dir().map_err(|e| {
+ tracing::error!(error = %e, "Failed to resolve app config directory.");
+ Error::Config(e.to_string())
+ })?;
+
+ tracing::info!(
+ path = ?app_config_dir,
+ "Setting storage root to app config directory."
+ );
+ config.storage.root_dir = app_config_dir;
+
+ let storage = tauri::async_runtime::block_on(async {
+ let storage = storage::StorageManager::new(config.storage.root_dir.clone())
+ .await
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to initialize storage manager");
+ Error::Config(e.to_string())
+ })?;
+
+ storage.init().await.map_err(|e| {
+ tracing::error!(error = %e, "Failed to initialize storage directories");
+ Error::Config(e.to_string())
+ })?;
+
+ Ok::<_, Error>(Arc::new(storage))
+ })?;
+
+ tracing::debug!("Setting up uri handler.");
+ let tauri_config = app.config().clone();
+
+ tracing::debug!("Initializing cache manager.");
+ let cache = Arc::new(cache::CacheManager::new(
+ storage.layout().cache_dir(),
+ cache::CachePolicy::new(
+ config.cache.max_size,
+ config.cache.file_ttl,
+ config.cache.hot_ratio,
+ ),
+ tauri_config.clone(),
+ ));
+
+ tracing::debug!("Setting up bundle loader.");
+ let bundle_loader = Arc::new(bundle::BundleLoader::new(cache.clone(), storage.clone()));
+
+ let uri_handler = Arc::new(uri::UriHandler::new(cache.clone(), tauri_config.clone()));
+
+ {
+ let tauri_config = tauri_config.clone();
+ let cache = cache.clone();
+ let storage = storage.clone();
+ tauri::async_runtime::block_on(async move {
+ match vendor.build() {
+ Ok(vendor) => {
+ if let Err(e) = vendor.initialize(tauri_config, cache, storage).await {
+ tracing::error!(error = %e, "Failed to initialize vendor.");
+ }
+ }
+ Err(e) => {
+ tracing::error!(error = %e, "Failed to build vendor.");
+ }
+ }
+ });
+ }
+
+ #[cfg(desktop)]
+ tracing::debug!("Initializing desktop-specific components.");
+ #[cfg(desktop)]
+ let view = desktop::init(app, api, bundle_loader.clone())?;
+
+ #[cfg(mobile)]
+ tracing::debug!("Initializing mobile-specific components.");
+ #[cfg(mobile)]
+ let view = mobile::init(app, api, bundle_loader.clone())?;
+
+ app.manage(bundle_loader);
+ app.manage(cache);
+ app.manage(storage);
+ app.manage(uri_handler);
+ app.manage(view);
+
+ tracing::info!("appload plugin setup complete.");
+ Ok(())
+ })
+ .invoke_handler(tauri::generate_handler![
+ commands::download,
+ commands::load,
+ commands::remove,
+ commands::clear
+ ])
+ .register_uri_scheme_protocol("app", move |ctx, req| {
+ tracing::info!("Incoming URI request");
+
+ let app = ctx.app_handle();
+ let uri = req.uri();
+
+ tracing::debug!(
+ url = %uri,
+ thread_id = ?std::thread::current().id(),
+ "Handling app URI scheme request."
+ );
+
+ let uri_handler = app.state::<Arc<uri::UriHandler>>();
+
+ tracing::info!("Got URI handler");
+
+ tauri::async_runtime::block_on(uri_handler.handle(uri)).unwrap()
+ })
+ .build()
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/mobile.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/mobile.rs
new file mode 100644
index 000000000..3caec219a
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/mobile.rs
@@ -0,0 +1,44 @@
+use serde::de::DeserializeOwned;
+use tauri::{
+ plugin::{PluginApi, PluginHandle},
+ AppHandle, Runtime,
+};
+
+use crate::{DownloadOptions, DownloadResponse, LoadOptions, LoadResponse};
+
+#[cfg(target_os = "ios")]
+tauri::ios_plugin_binding!(init_plugin_appload);
+
+#[cfg(target_os = "android")]
+const PLUGIN_IDENTIFIER: &str = "app.tauri.appload";
+
+/// Initialize plugin for mobile platforms
+pub fn init<R: Runtime, C: DeserializeOwned>(
+ _app: &AppHandle<R>,
+ api: PluginApi<R, C>,
+) -> crate::Result<Appload<R>> {
+ #[cfg(target_os = "android")]
+ let handle = api.register_android_plugin(PLUGIN_IDENTIFIER, "Appload")?;
+ #[cfg(target_os = "ios")]
+ let handle = api.register_ios_plugin(init_plugin_appload)?;
+ Ok(Appload(handle))
+}
+
+/// Mobile implementation of the app loading plugin
+pub struct Appload<R: Runtime>(PluginHandle<R>);
+
+impl<R: Runtime> Appload<R> {
+ /// Download an app bundle
+ pub async fn download(&self, options: DownloadOptions) -> crate::Result<DownloadResponse> {
+ self.0
+ .run_mobile_plugin("download", options)
+ .map_err(Into::into)
+ }
+
+ /// Load an app in a new window
+ pub async fn load(&self, options: LoadOptions) -> crate::Result<LoadResponse> {
+ self.0
+ .run_mobile_plugin("load", options)
+ .map_err(Into::into)
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/models.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/models.rs
new file mode 100644
index 000000000..9c6978ea5
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/models.rs
@@ -0,0 +1,215 @@
+use std::collections::HashMap;
+
+use blake3::Hash;
+use chrono::{DateTime, Utc};
+use ed25519_dalek::Signature;
+use serde::{Deserialize, Serialize};
+use url::Url;
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct BundleMetadata {
+ pub version: String,
+ pub created_at: DateTime<Utc>,
+ #[serde(with = "signature_serde")]
+ pub signature: Signature,
+ pub manifest: Manifest,
+ #[serde(default)]
+ pub properties: HashMap<String, String>,
+}
+
+mod signature_serde {
+ use super::*;
+ use base64::{engine::general_purpose::STANDARD, Engine};
+ use serde::{de::Error, Deserializer, Serializer};
+
+ pub fn serialize<S>(sig: &Signature, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ serializer.serialize_str(&STANDARD.encode(sig.to_bytes()))
+ }
+
+ pub fn deserialize<'de, D>(deserializer: D) -> Result<Signature, D::Error>
+ where
+ D: Deserializer<'de>,
+ {
+ let s = String::deserialize(deserializer)?;
+ let bytes = STANDARD.decode(&s).map_err(D::Error::custom)?;
+ let bytes: [u8; 64] = bytes
+ .try_into()
+ .map_err(|_| D::Error::custom("invalid signature length"))?;
+ Ok(Signature::from_bytes(&bytes))
+ }
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct FileEntry {
+ pub path: String,
+ pub size: u64,
+ #[serde(with = "hash_serde")]
+ pub hash: Hash,
+ pub mime_type: Option<String>,
+}
+
+mod hash_serde {
+ use super::*;
+ use base64::{engine::general_purpose::STANDARD, Engine};
+ use blake3::Hash;
+
+ pub fn serialize<S>(sig: &Hash, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: serde::Serializer,
+ {
+ serializer.serialize_str(&STANDARD.encode(sig.as_bytes()))
+ }
+
+ pub fn deserialize<'de, D>(deserializer: D) -> Result<Hash, D::Error>
+ where
+ D: serde::Deserializer<'de>,
+ {
+ use serde::de::Error;
+ let s = String::deserialize(deserializer)?;
+ let bytes = STANDARD.decode(&s).map_err(D::Error::custom)?;
+ let bytes: [u8; 32] = bytes
+ .try_into()
+ .map_err(|_| D::Error::custom("invalid signature length"))?;
+ Ok(Hash::from_bytes(bytes))
+ }
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct Manifest {
+ pub files: Vec<FileEntry>,
+ #[serde(default)]
+ pub version: Option<String>,
+}
+
+impl Manifest {
+ pub fn total_size(&self) -> u64 {
+ self.files.iter().map(|f| f.size).sum()
+ }
+
+ pub fn get_file(&self, path: &str) -> Option<&FileEntry> {
+ self.files.iter().find(|f| f.path == path)
+ }
+}
+
+#[derive(Debug, Clone, Deserialize)]
+pub struct ApiResponse<T> {
+ pub success: bool,
+ #[serde(default)]
+ pub error: Option<String>,
+ pub data: T,
+}
+
+#[derive(Debug, Clone, Deserialize)]
+pub struct BundleList {
+ pub bundles: Vec<BundleSummary>,
+}
+
+#[derive(Debug, Clone, Deserialize)]
+pub struct BundleSummary {
+ pub name: String,
+ pub version: String,
+ pub created_at: DateTime<Utc>,
+ pub file_count: usize,
+}
+
+#[derive(Debug, Clone, Deserialize)]
+pub struct VerificationResponse {
+ pub status: String,
+ pub created_at: DateTime<Utc>,
+ pub version: String,
+ pub file_count: usize,
+}
+
+#[derive(Debug, Clone, Deserialize)]
+pub struct PublicKeyInfo {
+ pub key: String,
+}
+
+#[derive(Debug, Clone, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct DownloadOptions {
+ pub server_url: Url,
+}
+
+#[derive(Debug, Clone, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct DownloadResponse {
+ pub success: bool,
+ pub bundle_name: String,
+ pub server_url: Url,
+ pub version: String,
+}
+
+#[derive(Debug, Clone, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct LoadOptions {
+ pub bundle_name: String,
+ #[serde(default)]
+ pub inline: bool,
+ #[serde(default)]
+ pub window: WindowOptions,
+}
+
+#[derive(Debug, Clone, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct LoadResponse {
+ pub success: bool,
+ pub window_label: String,
+}
+
+#[derive(Debug, Clone, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct RemoveOptions {
+ pub bundle_name: String,
+ pub server_url: String,
+}
+
+#[derive(Debug, Clone, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct RemoveResponse {
+ pub success: bool,
+ pub bundle_name: String,
+}
+
+#[derive(Debug, Clone, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct WindowOptions {
+ #[serde(default = "default_window_title")]
+ pub title: String,
+ #[serde(default = "default_window_width")]
+ pub width: f64,
+ #[serde(default = "default_window_height")]
+ pub height: f64,
+ #[serde(default = "default_resizable")]
+ pub resizable: bool,
+}
+
+fn default_window_title() -> String {
+ "Appload".into()
+}
+
+fn default_window_width() -> f64 {
+ 800.0
+}
+
+fn default_window_height() -> f64 {
+ 600.0
+}
+
+fn default_resizable() -> bool {
+ true
+}
+
+impl Default for WindowOptions {
+ fn default() -> Self {
+ Self {
+ title: default_window_title(),
+ width: default_window_width(),
+ height: default_window_height(),
+ resizable: default_resizable(),
+ }
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/error.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/error.rs
new file mode 100644
index 000000000..78788d836
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/error.rs
@@ -0,0 +1,36 @@
+use thiserror::Error;
+
+#[derive(Debug, Error)]
+pub enum StorageError {
+ #[error("IO error: {0}")]
+ Io(#[from] std::io::Error),
+
+ #[error("Bundle not found: {0}")]
+ BundleNotFound(String),
+
+ #[error("Invalid path: {0}")]
+ InvalidPath(String),
+
+ #[error("Storage full: required {required} bytes, available {available} bytes")]
+ StorageFull { required: u64, available: u64 },
+
+ #[error("Lock error: {0}")]
+ LockError(String),
+
+ #[error("Registry error: {0}")]
+ Registry(String),
+
+ #[error("Version mismatch: local {local}, remote {remote}")]
+ VersionMismatch { local: String, remote: String },
+
+ #[error("Invalid URL format: {0}")]
+ InvalidUrl(#[from] url::ParseError),
+
+ #[error("Serialization error: {0}")]
+ Serialization(#[from] serde_json::Error),
+
+ #[error("Other error: {0}")]
+ OtherError(String),
+}
+
+pub type Result<T> = std::result::Result<T, StorageError>;
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/layout.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/layout.rs
new file mode 100644
index 000000000..da735f662
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/layout.rs
@@ -0,0 +1,35 @@
+use std::path::PathBuf;
+
+pub struct StorageLayout {
+ root: PathBuf,
+}
+
+impl StorageLayout {
+ pub fn new(root: PathBuf) -> Self {
+ Self { root }
+ }
+
+ pub fn bundles_dir(&self) -> PathBuf {
+ self.root.join("bundles")
+ }
+
+ pub fn bundle_path(&self, name: &str) -> PathBuf {
+ self.bundles_dir().join(format!("{}.zip", name))
+ }
+
+ pub fn cache_dir(&self) -> PathBuf {
+ self.root.join("cache")
+ }
+
+ pub fn temp_dir(&self) -> PathBuf {
+ self.root.join("temp")
+ }
+
+ pub fn key_dir(&self) -> PathBuf {
+ self.root.join("key")
+ }
+
+ pub fn registry_path(&self) -> PathBuf {
+ self.root.join("registry.json")
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/manager.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/manager.rs
new file mode 100644
index 000000000..621e02d46
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/manager.rs
@@ -0,0 +1,176 @@
+use std::path::PathBuf;
+use std::sync::Arc;
+use tokio::sync::RwLock;
+use tracing;
+
+use super::{Registry, Result, ServerEntry, StorageError, StorageLayout};
+use crate::bundle::VerifiedBundle;
+
+pub struct StorageManager {
+ layout: Arc<StorageLayout>,
+ registry: Arc<RwLock<Registry>>,
+ locks: Arc<RwLock<Vec<PathBuf>>>,
+}
+
+impl StorageManager {
+ pub async fn new(root: PathBuf) -> Result<Self> {
+ tracing::info!(root = ?root, "Initializing StorageManager with root directory");
+ let layout = StorageLayout::new(root);
+
+ let registry = Registry::load(&layout).await?;
+
+ Ok(Self {
+ layout: Arc::new(layout),
+ registry: Arc::new(RwLock::new(registry)),
+ locks: Arc::new(RwLock::new(Vec::new())),
+ })
+ }
+
+ pub async fn init(&self) -> Result<()> {
+ tracing::info!("Initializing storage directories");
+ let dirs = [
+ self.layout.bundles_dir(),
+ self.layout.cache_dir(),
+ self.layout.temp_dir(),
+ self.layout.key_dir(),
+ ];
+
+ for dir in &dirs {
+ tracing::debug!(directory = ?dir, "Creating directory");
+ tokio::fs::create_dir_all(dir).await?;
+ }
+
+ tracing::info!("Storage directories initialized successfully");
+ Ok(())
+ }
+
+ pub async fn store_bundle(
+ &self,
+ name: &str,
+ server_url: &str,
+ version: &str,
+ verified: &VerifiedBundle,
+ ) -> Result<()> {
+ tracing::info!(bundle_name = name, "Storing bundle");
+
+ let bundle_path = self.layout.bundle_path(name);
+ let temp_path = self.layout.temp_dir().join(format!("{}.tmp", name));
+
+ for path in [&bundle_path, &temp_path] {
+ if let Some(parent) = path.parent() {
+ tracing::debug!(path = ?parent, "Ensuring directory exists");
+ tokio::fs::create_dir_all(parent).await?;
+ }
+ }
+
+ tracing::debug!(
+ bundle_name = name,
+ temp_path = ?temp_path,
+ "Ensuring sufficient space for the bundle"
+ );
+ self.ensure_space(verified.content.len()).await?;
+
+ tracing::debug!(
+ bundle_name = name,
+ temp_path = ?temp_path,
+ "Writing bundle content to temporary file"
+ );
+ tokio::fs::write(&temp_path, &verified.content).await?;
+
+ tracing::debug!(
+ bundle_name = name,
+ temp_path = ?temp_path,
+ bundle_path = ?bundle_path,
+ "Renaming temporary file to final bundle path"
+ );
+ tokio::fs::rename(temp_path, bundle_path).await?;
+
+ let mut registry = self.registry.write().await;
+ registry.update_server_entry(
+ server_url,
+ ServerEntry {
+ bundle_name: name.to_string(),
+ version: version.to_string(),
+ created_at: chrono::Utc::now(),
+ last_accessed: chrono::Utc::now(),
+ },
+ )?;
+
+ registry.save(&self.layout).await?;
+
+ tracing::info!(bundle_name = name, "Bundle stored successfully");
+ Ok(())
+ }
+
+ pub async fn get_bundle_entry(&self, server_url: &str) -> Result<Option<ServerEntry>> {
+ let registry = self.registry.read().await;
+ Ok(registry.get_bundle_for_server(server_url).cloned())
+ }
+
+ pub async fn load_bundle(&self, name: &str) -> Result<Vec<u8>> {
+ tracing::info!(bundle_name = name, "Loading bundle");
+
+ let bundle_path = self.layout.bundle_path(name);
+
+ if !bundle_path.exists() {
+ tracing::warn!(bundle_name = name, "Bundle not found");
+ return Err(StorageError::BundleNotFound(name.to_string()));
+ }
+
+ tracing::debug!(bundle_name = name, bundle_path = ?bundle_path, "Reading bundle content");
+ let content = tokio::fs::read(&bundle_path).await?;
+
+ tracing::info!(bundle_name = name, "Bundle loaded successfully");
+ Ok(content)
+ }
+
+ pub async fn delete_bundle(&self, name: &str, server_url: &str) -> Result<()> {
+ tracing::info!(bundle_name = name, "Deleting bundle");
+
+ let bundle_path = self.layout.bundle_path(name);
+
+ if bundle_path.exists() {
+ tracing::debug!(bundle_name = name, bundle_path = ?bundle_path, "Removing bundle file");
+ tokio::fs::remove_file(bundle_path).await?;
+ }
+
+ let mut registry = self.registry.write().await;
+ registry.remove_server_entry(server_url)?;
+ registry.save(&self.layout).await?;
+
+ tracing::info!(bundle_name = name, "Bundle deleted successfully");
+ Ok(())
+ }
+
+ async fn ensure_space(&self, required: usize) -> Result<()> {
+ tracing::debug!(required_space = required, "Checking available disk space");
+ let available = sys_info::disk_info()
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to retrieve disk information");
+ StorageError::OtherError(format!("Failed to get disk info: {}", e))
+ })?
+ .free;
+
+ if (required as u64) > available {
+ tracing::warn!(
+ required_space = required,
+ available_space = available,
+ "Insufficient disk space"
+ );
+ return Err(StorageError::StorageFull {
+ required: required as u64,
+ available,
+ });
+ }
+
+ tracing::debug!(
+ available_space = available,
+ "Sufficient disk space available"
+ );
+ Ok(())
+ }
+
+ pub fn layout(&self) -> &StorageLayout {
+ &self.layout
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/mod.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/mod.rs
new file mode 100644
index 000000000..178729547
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/mod.rs
@@ -0,0 +1,9 @@
+mod error;
+mod layout;
+mod manager;
+mod registry;
+
+pub use error::{Result, StorageError};
+pub use layout::StorageLayout;
+pub use manager::StorageManager;
+pub use registry::{Registry, ServerEntry};
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/registry.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/registry.rs
new file mode 100644
index 000000000..91733b817
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/storage/registry.rs
@@ -0,0 +1,68 @@
+use chrono::{DateTime, Utc};
+use serde::{Deserialize, Serialize};
+use std::collections::HashMap;
+use tokio::fs;
+use url::Url;
+
+use super::error::Result;
+use super::layout::StorageLayout;
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct Registry {
+ pub version: u32,
+ pub servers: HashMap<String, ServerEntry>,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ServerEntry {
+ pub bundle_name: String,
+ pub version: String,
+ pub created_at: DateTime<Utc>,
+ pub last_accessed: DateTime<Utc>,
+}
+
+impl Registry {
+ pub async fn load(layout: &StorageLayout) -> Result<Self> {
+ if !layout.registry_path().exists() {
+ return Ok(Self {
+ version: 1,
+ servers: HashMap::new(),
+ });
+ }
+
+ let content = fs::read_to_string(layout.registry_path()).await?;
+ Ok(serde_json::from_str(&content)?)
+ }
+
+ pub async fn save(&self, layout: &StorageLayout) -> Result<()> {
+ let content = serde_json::to_string_pretty(self)?;
+ fs::write(layout.registry_path(), content).await?;
+ Ok(())
+ }
+
+ pub fn get_bundle_for_server(&self, server_url: &str) -> Option<&ServerEntry> {
+ let normalized_url = Self::normalize_url(server_url).ok()?;
+ self.servers.get(&normalized_url)
+ }
+
+ pub fn update_server_entry(&mut self, server_url: &str, entry: ServerEntry) -> Result<()> {
+ let normalized_url = Self::normalize_url(server_url)?;
+ self.servers.insert(normalized_url, entry);
+ Ok(())
+ }
+
+ pub fn remove_server_entry(&mut self, server_url: &str) -> Result<Option<ServerEntry>> {
+ let normalized_url = Self::normalize_url(server_url)?;
+ Ok(self.servers.remove(&normalized_url))
+ }
+
+ fn normalize_url(url: &str) -> Result<String> {
+ let parsed = if !url.starts_with("http://") && !url.starts_with("https://") {
+ Url::parse(&format!("https://{}", url))
+ } else {
+ Url::parse(url)
+ }?;
+
+ Ok(parsed.to_string().trim_end_matches('/').to_string())
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/macos/mod.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/macos/mod.rs
new file mode 100644
index 000000000..c5cba1396
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/macos/mod.rs
@@ -0,0 +1 @@
+pub mod posit;
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/macos/posit.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/macos/posit.rs
new file mode 100644
index 000000000..ee19d7c69
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/macos/posit.rs
@@ -0,0 +1,429 @@
+use cocoa::{
+ appkit::{
+ NSAppearance, NSAppearanceNameVibrantDark, NSAppearanceNameVibrantLight, NSView, NSWindow,
+ NSWindowButton, NSWindowTitleVisibility,
+ },
+ base::{id, nil, BOOL, YES},
+ delegate,
+ foundation::{NSRect, NSUInteger},
+};
+use hex_color::HexColor;
+use objc::{
+ msg_send,
+ runtime::{Object, Sel},
+ sel, sel_impl,
+};
+use rand::distributions::{Alphanumeric, DistString};
+use tauri::{Emitter, Listener, LogicalPosition, Runtime, WebviewWindow};
+
+#[derive(Debug)]
+pub struct MacosWindow<R: Runtime> {
+ window: WebviewWindow<R>,
+ traffic_lights_inset: LogicalPosition<f64>,
+ ns_window: id,
+}
+
+impl<R: Runtime> MacosWindow<R> {
+ pub fn new(window: WebviewWindow<R>, traffic_lights_inset: LogicalPosition<f64>) -> Self {
+ let ns_window = window.ns_window().expect("Failed to get NS window handle") as id;
+ unsafe {
+ ns_window.setTitlebarAppearsTransparent_(YES);
+ ns_window.setTitleVisibility_(NSWindowTitleVisibility::NSWindowTitleHidden);
+ }
+ Self {
+ window,
+ traffic_lights_inset,
+ ns_window,
+ }
+ }
+
+ pub fn setup(&self) {
+ self.reposition_controls();
+ self.setup_theme_listener();
+ unsafe {
+ let delegate = self.create_window_delegate();
+ self.ns_window.setDelegate_(delegate);
+ }
+ }
+
+ pub fn update_theme(&self, color: HexColor) {
+ let brightness = (color.r as u64 + color.g as u64 + color.b as u64) / 3;
+ unsafe {
+ let window_handle = self.ns_window;
+ let appearance = if brightness >= 128 {
+ NSAppearance(NSAppearanceNameVibrantLight)
+ } else {
+ NSAppearance(NSAppearanceNameVibrantDark)
+ };
+ NSWindow::setAppearance(window_handle, appearance);
+ self.reposition_controls();
+ }
+ }
+
+ fn setup_theme_listener(&self) {
+ let window = self.window.clone();
+ self.window.listen("hopp-bg-changed", move |event| {
+ let color_str = event.payload();
+
+ if let Ok(color_str) = serde_json::from_str::<&str>(color_str) {
+ if let Ok(color) = HexColor::parse_rgb(color_str.trim()) {
+ let macos_window =
+ MacosWindow::new(window.clone(), LogicalPosition::new(15.0, 23.0));
+ macos_window.update_theme(color);
+ }
+ }
+ });
+ }
+
+ fn reposition_controls(&self) {
+ unsafe {
+ let buttons = self.window_buttons();
+ let title_bar = buttons.title_bar_container();
+
+ let frame_height = buttons.height() + self.traffic_lights_inset.y;
+ title_bar.adjust_frame(frame_height, self.window_height());
+
+ buttons.reposition(self.traffic_lights_inset.x);
+ }
+ }
+
+ unsafe fn create_window_delegate(&self) -> id {
+ let current_delegate = self.ns_window.delegate();
+ let state = Box::new(WindowState::new(
+ self.window.clone(),
+ self.traffic_lights_inset,
+ ));
+ let app_box = Box::into_raw(state) as *mut std::ffi::c_void;
+
+ let delegate_name = format!(
+ "WindowDelegate_{}_{}",
+ self.window.label(),
+ Alphanumeric.sample_string(&mut rand::thread_rng(), 20)
+ );
+
+ delegate!(&delegate_name, {
+ window: id = self.ns_window,
+ app_box: *mut std::ffi::c_void = app_box,
+ toolbar: id = nil,
+ super_delegate: id = current_delegate,
+
+ (windowShouldClose:) => WindowDelegate::window_should_close as extern fn(&Object, Sel, id) -> BOOL,
+ (windowWillClose:) => WindowDelegate::window_will_close as extern fn(&Object, Sel, id),
+ (windowDidResize:) => WindowDelegate::window_did_resize::<R> as extern fn(&Object, Sel, id),
+ (windowDidMove:) => WindowDelegate::window_did_move as extern fn(&Object, Sel, id),
+
+ (windowDidChangeBackingProperties:) => WindowDelegate::window_did_change_backing_properties as extern fn(&Object, Sel, id),
+
+ (windowDidBecomeKey:) => WindowDelegate::window_did_become_key as extern fn(&Object, Sel, id),
+ (windowDidResignKey:) => WindowDelegate::window_did_resign_key as extern fn(&Object, Sel, id),
+
+ (draggingEntered:) => WindowDelegate::dragging_entered as extern fn(&Object, Sel, id) -> BOOL,
+ (prepareForDragOperation:) => WindowDelegate::prepare_for_drag_operation as extern fn(&Object, Sel, id) -> BOOL,
+ (performDragOperation:) => WindowDelegate::perform_drag_operation as extern fn(&Object, Sel, id) -> BOOL,
+ (concludeDragOperation:) => WindowDelegate::conclude_drag_operation as extern fn(&Object, Sel, id),
+ (draggingExited:) => WindowDelegate::dragging_exited as extern fn(&Object, Sel, id),
+
+ (window:willUseFullScreenPresentationOptions:) => WindowDelegate::window_will_use_full_screen_presentation_options as extern fn(&Object, Sel, id, NSUInteger) -> NSUInteger,
+ (windowDidEnterFullScreen:) => WindowDelegate::window_did_enter_full_screen::<R> as extern fn(&Object, Sel, id),
+ (windowWillEnterFullScreen:) => WindowDelegate::window_will_enter_full_screen::<R> as extern fn(&Object, Sel, id),
+ (windowDidExitFullScreen:) => WindowDelegate::window_did_exit_full_screen::<R> as extern fn(&Object, Sel, id),
+ (windowDidEndLiveResize:) => WindowDelegate::window_did_end_live_resize::<R> as extern fn(&Object, Sel, id),
+ (windowWillExitFullScreen:) => WindowDelegate::window_will_exit_full_screen::<R> as extern fn(&Object, Sel, id),
+ (windowDidFailToEnterFullScreen:) => WindowDelegate::window_did_fail_to_enter_full_screen as extern fn(&Object, Sel, id),
+
+ (effectiveAppearanceDidChange:) => WindowDelegate::effective_appearance_did_change as extern fn(&Object, Sel, id),
+ (effectiveAppearanceDidChangedOnMainThread:) => WindowDelegate::effective_appearance_did_change_on_main_thread as extern fn(&Object, Sel, id)
+ })
+ }
+
+ unsafe fn window_height(&self) -> f64 {
+ NSView::frame(self.ns_window).size.height
+ }
+
+ unsafe fn window_buttons(&self) -> WindowButtons {
+ WindowButtons::new(self.ns_window)
+ }
+}
+
+#[derive(Debug)]
+struct WindowButtons {
+ close: id,
+ minimize: id,
+ zoom: id,
+}
+
+impl WindowButtons {
+ unsafe fn new(window: id) -> Self {
+ Self {
+ close: window.standardWindowButton_(NSWindowButton::NSWindowCloseButton),
+ minimize: window.standardWindowButton_(NSWindowButton::NSWindowMiniaturizeButton),
+ zoom: window.standardWindowButton_(NSWindowButton::NSWindowZoomButton),
+ }
+ }
+
+ unsafe fn height(&self) -> f64 {
+ let close_frame: NSRect = msg_send![self.close, frame];
+ close_frame.size.height
+ }
+
+ unsafe fn title_bar_container(&self) -> TitleBarContainer {
+ TitleBarContainer(self.close.superview().superview())
+ }
+
+ unsafe fn button_spacing(&self) -> f64 {
+ NSView::frame(self.minimize).origin.x - NSView::frame(self.close).origin.x
+ }
+
+ unsafe fn reposition(&self, inset_x: f64) {
+ let spacing = self.button_spacing();
+ for (i, button) in [self.close, self.minimize, self.zoom].iter().enumerate() {
+ let mut frame = NSView::frame(*button);
+ frame.origin.x = inset_x + (i as f64 * spacing);
+ frame.origin.y = 0.0;
+ button.setFrameOrigin(frame.origin);
+ }
+ }
+}
+
+struct TitleBarContainer(id);
+
+impl TitleBarContainer {
+ unsafe fn adjust_frame(&self, height: f64, window_height: f64) {
+ let mut frame = NSView::frame(self.0);
+ frame.size.height = height;
+ frame.origin.y = window_height - height;
+ frame.origin.x = 0.0;
+ let _: () = msg_send![self.0, setFrame: frame];
+ }
+}
+
+#[derive(Debug)]
+struct WindowState<R: Runtime> {
+ window: WebviewWindow<R>,
+ traffic_lights_inset: LogicalPosition<f64>,
+}
+
+impl<R: Runtime> WindowState<R> {
+ fn new(window: WebviewWindow<R>, traffic_lights_inset: LogicalPosition<f64>) -> Self {
+ Self {
+ window,
+ traffic_lights_inset,
+ }
+ }
+}
+
+struct WindowDelegate;
+
+impl WindowDelegate {
+ extern "C" fn window_should_close(this: &Object, _: Sel, sender: id) -> BOOL {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ msg_send![super_del, windowShouldClose: sender]
+ }
+ }
+
+ extern "C" fn window_will_close(this: &Object, _: Sel, notification: id) {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () = msg_send![super_del, windowWillClose: notification];
+ }
+ }
+
+ extern "C" fn window_did_resize<R: Runtime>(this: &Object, _: Sel, notification: id) {
+ unsafe {
+ Self::with_window_state::<R, _>(this, |state| {
+ let macos_window =
+ MacosWindow::new(state.window.clone(), state.traffic_lights_inset);
+ macos_window.reposition_controls();
+ });
+
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () = msg_send![super_del, windowDidResize: notification];
+ }
+ }
+
+ extern "C" fn window_did_move(this: &Object, _: Sel, notification: id) {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () = msg_send![super_del, windowDidMove: notification];
+ }
+ }
+
+ extern "C" fn window_did_change_backing_properties(this: &Object, _: Sel, notification: id) {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () = msg_send![super_del, windowDidChangeBackingProperties: notification];
+ }
+ }
+
+ extern "C" fn window_did_become_key(this: &Object, _: Sel, notification: id) {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () = msg_send![super_del, windowDidBecomeKey: notification];
+ }
+ }
+
+ extern "C" fn window_did_resign_key(this: &Object, _: Sel, notification: id) {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () = msg_send![super_del, windowDidResignKey: notification];
+ }
+ }
+
+ extern "C" fn dragging_entered(this: &Object, _: Sel, notification: id) -> BOOL {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ msg_send![super_del, draggingEntered: notification]
+ }
+ }
+
+ extern "C" fn prepare_for_drag_operation(this: &Object, _: Sel, notification: id) -> BOOL {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ msg_send![super_del, prepareForDragOperation: notification]
+ }
+ }
+
+ extern "C" fn perform_drag_operation(this: &Object, _: Sel, sender: id) -> BOOL {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ msg_send![super_del, performDragOperation: sender]
+ }
+ }
+
+ extern "C" fn conclude_drag_operation(this: &Object, _: Sel, notification: id) {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () = msg_send![super_del, concludeDragOperation: notification];
+ }
+ }
+
+ extern "C" fn dragging_exited(this: &Object, _: Sel, notification: id) {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () = msg_send![super_del, draggingExited: notification];
+ }
+ }
+
+ extern "C" fn window_will_use_full_screen_presentation_options(
+ this: &Object,
+ _: Sel,
+ window: id,
+ proposed_options: NSUInteger,
+ ) -> NSUInteger {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ msg_send![super_del, window: window willUseFullScreenPresentationOptions: proposed_options]
+ }
+ }
+
+ extern "C" fn window_did_enter_full_screen<R: Runtime>(
+ this: &Object,
+ _: Sel,
+ notification: id,
+ ) {
+ unsafe {
+ Self::with_window_state::<R, _>(this, |state| {
+ let _ = state.window.emit("did-enter-fullscreen", ());
+ });
+
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () = msg_send![super_del, windowDidEnterFullScreen: notification];
+ }
+ }
+
+ extern "C" fn window_will_enter_full_screen<R: Runtime>(
+ this: &Object,
+ _: Sel,
+ notification: id,
+ ) {
+ unsafe {
+ Self::with_window_state::<R, _>(this, |state| {
+ let _ = state.window.emit("will-enter-fullscreen", ());
+ });
+
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () = msg_send![super_del, windowWillEnterFullScreen: notification];
+ }
+ }
+
+ extern "C" fn window_did_end_live_resize<R: Runtime>(this: &Object, _: Sel, _: id) {
+ unsafe {
+ Self::with_window_state::<R, _>(this, |state| {
+ let macos_window =
+ MacosWindow::new(state.window.clone(), state.traffic_lights_inset);
+ macos_window.reposition_controls();
+ });
+ }
+ }
+
+ extern "C" fn window_did_exit_full_screen<R: Runtime>(this: &Object, _: Sel, notification: id) {
+ unsafe {
+ Self::with_window_state::<R, _>(this, |state| {
+ let _ = state.window.emit("did-exit-fullscreen", ());
+ let macos_window =
+ MacosWindow::new(state.window.clone(), state.traffic_lights_inset);
+ macos_window.reposition_controls();
+ });
+
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () = msg_send![super_del, windowDidExitFullScreen: notification];
+ }
+ }
+
+ extern "C" fn window_will_exit_full_screen<R: Runtime>(
+ this: &Object,
+ _: Sel,
+ notification: id,
+ ) {
+ unsafe {
+ Self::with_window_state::<R, _>(this, |state| {
+ let _ = state.window.emit("will-exit-fullscreen", ());
+ });
+
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () = msg_send![super_del, windowWillExitFullScreen: notification];
+ }
+ }
+
+ extern "C" fn window_did_fail_to_enter_full_screen(this: &Object, _: Sel, window: id) {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () = msg_send![super_del, windowDidFailToEnterFullScreen: window];
+ }
+ }
+
+ extern "C" fn effective_appearance_did_change(this: &Object, _: Sel, notification: id) {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () = msg_send![super_del, effectiveAppearanceDidChange: notification];
+ }
+ }
+
+ extern "C" fn effective_appearance_did_change_on_main_thread(
+ this: &Object,
+ _: Sel,
+ notification: id,
+ ) {
+ unsafe {
+ let super_del: id = *this.get_ivar("super_delegate");
+ let _: () =
+ msg_send![super_del, effectiveAppearanceDidChangedOnMainThread: notification];
+ }
+ }
+
+ unsafe fn with_window_state<R: Runtime, F>(this: &Object, f: F)
+ where
+ F: FnOnce(&mut WindowState<R>),
+ {
+ let ptr: *mut std::ffi::c_void = *this.get_ivar("app_box");
+ let state_ptr = ptr as *mut WindowState<R>;
+ f(&mut *state_ptr);
+ }
+}
+
+pub fn setup_window<R: Runtime>(window: WebviewWindow<R>) {
+ let macos_window = MacosWindow::new(window, LogicalPosition::new(15.0, 16.0));
+ macos_window.setup();
+ macos_window.update_theme(HexColor::WHITE);
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/mod.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/mod.rs
new file mode 100644
index 000000000..066992514
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/mod.rs
@@ -0,0 +1,4 @@
+#[cfg(target_os = "macos")]
+pub mod macos;
+#[cfg(target_os = "windows")]
+pub mod windows;
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/windows/mod.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/windows/mod.rs
new file mode 100644
index 000000000..c5cba1396
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/windows/mod.rs
@@ -0,0 +1 @@
+pub mod posit;
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/windows/posit.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/windows/posit.rs
new file mode 100644
index 000000000..2ecfb4c28
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/ui/windows/posit.rs
@@ -0,0 +1,118 @@
+use std::{ffi::c_void, mem::size_of, mem::transmute, ptr};
+
+use hex_color::HexColor;
+use tauri::{Listener, Runtime, WebviewWindow};
+use windows::Win32::{
+ Foundation::{BOOL, COLORREF, HWND},
+ Graphics::Dwm::{DwmSetWindowAttribute, DWMWA_CAPTION_COLOR, DWMWA_USE_IMMERSIVE_DARK_MODE},
+ UI::Controls::{
+ SetWindowThemeAttribute, WTA_NONCLIENT, WTNCA_NODRAWCAPTION, WTNCA_NODRAWICON,
+ WTNCA_NOMIRRORHELP, WTNCA_NOSYSMENU,
+ },
+};
+use winver::WindowsVersion;
+
+#[derive(Debug)]
+pub struct WindowsWindow<R: Runtime> {
+ window: WebviewWindow<R>,
+ hwnd: HWND,
+}
+
+impl<R: Runtime> WindowsWindow<R> {
+ pub fn new(window: WebviewWindow<R>) -> Self {
+ let hwnd = window.hwnd().expect("Failed to get window handle");
+ let hwnd = HWND(hwnd.0);
+ Self { window, hwnd }
+ }
+
+ pub fn setup(&self) {
+ self.update_theme(HexColor::rgb(23, 23, 23));
+ self.setup_theme_listener();
+ }
+
+ pub fn update_theme(&self, color: HexColor) {
+ self.set_dark_mode();
+ self.set_caption_color(color);
+ self.set_theme_attributes();
+ }
+
+ fn setup_theme_listener(&self) {
+ let window = self.window.clone();
+ self.window.listen("hopp-bg-changed", move |event| {
+ let color_str = event.payload();
+
+ if let Ok(color_str) = serde_json::from_str::<&str>(color_str) {
+ if let Ok(color) = HexColor::parse_rgb(color_str.trim()) {
+ let windows_window = WindowsWindow::new(window.clone());
+ windows_window.update_theme(color);
+ }
+ }
+ });
+ }
+
+ fn set_dark_mode(&self) {
+ unsafe {
+ let use_dark_mode = BOOL::from(true);
+ DwmSetWindowAttribute(
+ self.hwnd,
+ DWMWA_USE_IMMERSIVE_DARK_MODE,
+ ptr::addr_of!(use_dark_mode) as *const c_void,
+ size_of::<BOOL>().try_into().unwrap(),
+ )
+ .expect("Failed to set dark mode");
+ }
+ }
+
+ fn set_caption_color(&self, color: HexColor) {
+ if let Some(version) = WindowsVersion::detect() {
+ if version >= WindowsVersion::new(10, 0, 22000) {
+ unsafe {
+ let color_ref = self.hex_color_to_colorref(color);
+ DwmSetWindowAttribute(
+ self.hwnd,
+ DWMWA_CAPTION_COLOR,
+ ptr::addr_of!(color_ref) as *const c_void,
+ size_of::<COLORREF>().try_into().unwrap(),
+ )
+ .expect("Failed to set caption color");
+ }
+ }
+ }
+ }
+
+ fn set_theme_attributes(&self) {
+ unsafe {
+ let theme_attributes = WinThemeAttribute::new();
+ SetWindowThemeAttribute(
+ self.hwnd,
+ WTA_NONCLIENT,
+ ptr::addr_of!(theme_attributes) as *const c_void,
+ size_of::<WinThemeAttribute>().try_into().unwrap(),
+ )
+ .expect("Failed to set theme attributes");
+ }
+ }
+
+ fn hex_color_to_colorref(&self, color: HexColor) -> COLORREF {
+ unsafe { COLORREF(transmute::<[u8; 4], u32>([color.r, color.g, color.b, 0])) }
+ }
+}
+
+#[derive(Debug)]
+struct WinThemeAttribute {
+ flag: u32,
+ mask: u32,
+}
+
+impl WinThemeAttribute {
+ fn new() -> Self {
+ let flag = WTNCA_NODRAWCAPTION | WTNCA_NODRAWICON;
+ let mask = WTNCA_NODRAWCAPTION | WTNCA_NODRAWICON | WTNCA_NOSYSMENU | WTNCA_NOMIRRORHELP;
+ Self { flag, mask }
+ }
+}
+
+pub fn setup_window<R: Runtime>(window: WebviewWindow<R>) {
+ let windows_window = WindowsWindow::new(window);
+ windows_window.setup();
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/uri/error.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/uri/error.rs
new file mode 100644
index 000000000..c1c44c083
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/uri/error.rs
@@ -0,0 +1,12 @@
+use thiserror::Error;
+
+#[derive(Debug, Error)]
+pub enum UriError {
+ #[error("HTTP error: {0}")]
+ Http(#[from] tauri::http::Error),
+
+ #[error("Cache error: {0}")]
+ Cache(#[from] crate::cache::CacheError),
+}
+
+pub type Result<T> = std::result::Result<T, UriError>;
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/uri/handler.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/uri/handler.rs
new file mode 100644
index 000000000..85e2c0b18
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/uri/handler.rs
@@ -0,0 +1,102 @@
+use std::sync::Arc;
+
+use tauri::{
+ http::{Response, Uri},
+ Config,
+};
+
+use super::error::Result;
+use crate::cache::CacheManager;
+
+pub struct UriHandler {
+ cache: Arc<CacheManager>,
+ config: Config,
+}
+
+impl UriHandler {
+ pub fn new(cache: Arc<CacheManager>, config: Config) -> Self {
+ Self { cache, config }
+ }
+
+ async fn fetch_content(&self, host: &str, path: &str) -> Result<Vec<u8>> {
+ let file_path = if path.is_empty() { "index.html" } else { path };
+ tracing::debug!(host = %host, path = %path, resolved_path = %file_path, "Fetching file content.");
+ Ok(self.cache.get_file(host, file_path).await?)
+ }
+
+ fn determine_mime(path: &str) -> &str {
+ if path.is_empty() || path == "index.html" {
+ "text/html; charset=utf-8"
+ } else {
+ mime_guess::from_path(path)
+ .first_raw()
+ .unwrap_or("application/octet-stream")
+ }
+ }
+
+ pub async fn handle(&self, uri: &Uri) -> Result<Response<Vec<u8>>> {
+ let host = uri.host().unwrap_or_default();
+ let path = uri.path().trim_start_matches('/');
+
+ tracing::debug!(host = %host, path = %path, "Handling request");
+
+ match self.fetch_content(host, path).await {
+ Ok(content) => {
+ tracing::info!(host = %host, path = %path, content_length = %content.len(), "Successfully retrieved file content");
+
+ let mime_type = Self::determine_mime(path);
+ let csp = match self.config.app.security.csp.as_ref() {
+ Some(csp) => {
+ tracing::debug!("Using configured CSP");
+ csp.to_string()
+ }
+ None => {
+ tracing::debug!("No CSP configured, using null");
+ String::from("null")
+ }
+ };
+
+ tracing::info!(
+ status = 200,
+ host = %host,
+ path = %path,
+ mime = %mime_type,
+ csp = %csp,
+ content_length = %content.len(),
+ "Building response"
+ );
+
+ let response = Response::builder()
+ .status(200)
+ .header("content-type", mime_type)
+ .header("content-security-policy", csp)
+ .header("access-control-allow-credentials", "true")
+ .header("x-content-type-options", "nosniff")
+ .body(content);
+
+ tracing::info!("Sending response");
+
+ response
+ }
+ Err(e) => {
+ tracing::error!(
+ error = %e,
+ host = %host,
+ path = %path,
+ "Failed to retrieve file content"
+ );
+
+ Response::builder().status(404).body(Vec::new())
+ }
+ }
+ .map_err(|e| {
+ tracing::error!(
+ error = %e,
+ host = %host,
+ path = %path,
+ "Failed to build response"
+ );
+ e.into()
+ })
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/uri/mod.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/uri/mod.rs
new file mode 100644
index 000000000..c0ab89c89
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/uri/mod.rs
@@ -0,0 +1,4 @@
+pub mod error;
+pub mod handler;
+
+pub use handler::UriHandler;
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/builder.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/builder.rs
new file mode 100644
index 000000000..54c614b65
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/builder.rs
@@ -0,0 +1,34 @@
+use crate::Manifest;
+
+use super::{Result, VendorConfig, VendorError};
+
+#[derive(Default)]
+pub struct VendorConfigBuilder {
+ bundle: Option<(Vec<u8>, Vec<u8>)>,
+}
+
+impl VendorConfigBuilder {
+ pub fn new() -> Self {
+ Self { bundle: None }
+ }
+
+ pub fn bundle(mut self, bundle_bytes: Vec<u8>, manifest_bytes: &[u8]) -> Self {
+ self.bundle = Some((bundle_bytes, manifest_bytes.to_vec()));
+ self
+ }
+
+ pub fn build(self) -> Result<VendorConfig> {
+ let bundle = self
+ .bundle
+ .map(|(bundle_bytes, manifest_bytes)| -> Result<_> {
+ let manifest: Manifest = serde_json::from_slice(&manifest_bytes).map_err(|e| {
+ VendorError::InvalidData(format!("Invalid manifest JSON: {}", e))
+ })?;
+
+ Ok((bundle_bytes, manifest))
+ })
+ .transpose()?;
+
+ Ok(VendorConfig { bundle })
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/config.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/config.rs
new file mode 100644
index 000000000..6ef28b3b6
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/config.rs
@@ -0,0 +1,70 @@
+use std::sync::Arc;
+
+use tauri::Config;
+
+use crate::{
+ bundle::VerifiedBundle, cache::CacheManager, storage::StorageManager, vendor::VendorError,
+ Manifest,
+};
+
+use super::Result;
+
+const VENDOR_SOURCE: &str = "vendor";
+
+#[derive(Debug, Clone)]
+pub struct VendorConfig {
+ pub(super) bundle: Option<(Vec<u8>, Manifest)>,
+}
+
+impl VendorConfig {
+ pub(crate) async fn initialize(
+ self,
+ config: Config,
+ cache: Arc<CacheManager>,
+ storage: Arc<StorageManager>,
+ ) -> Result<()> {
+ let Some((content, manifest)) = self.bundle else {
+ tracing::info!("No vendored bundle provided, skipping initialization");
+ return Ok(());
+ };
+
+ let max_bundle_size = 100 * 1024 * 1024;
+ if content.len() > max_bundle_size {
+ return Err(VendorError::InvalidData(format!(
+ "Bundle too large: {} bytes (max: {} bytes)",
+ content.len(),
+ max_bundle_size
+ )));
+ }
+
+ let name = config
+ .product_name
+ .unwrap_or("unknown".to_string())
+ .to_lowercase();
+ let version = manifest
+ .version
+ .clone()
+ .unwrap_or_else(|| config.version.as_deref().unwrap_or("0.0.0").to_string());
+
+ tracing::info!(
+ name = %name,
+ version = %version,
+ size = content.len(),
+ "Initializing vendored bundle"
+ );
+
+ let verified = VerifiedBundle::trust(content, manifest)?;
+
+ storage
+ .store_bundle(&name, VENDOR_SOURCE, &version, &verified)
+ .await?;
+
+ cache.cache_bundle(&name, &verified).await?;
+
+ tracing::info!(
+ name = %name,
+ "Vendored bundle initialized successfully"
+ );
+ Ok(())
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/error.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/error.rs
new file mode 100644
index 000000000..2c7f8eed8
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/error.rs
@@ -0,0 +1,27 @@
+use thiserror::Error;
+
+#[derive(Debug, Error)]
+pub enum VendorError {
+ #[error("Invalid vendor data: {0}")]
+ InvalidData(String),
+
+ #[error("JSON error: {0}")]
+ Json(#[from] serde_json::Error),
+
+ #[error("IO error: {0}")]
+ Io(#[from] std::io::Error),
+
+ #[error("Zip error: {0}")]
+ Zip(#[from] zip::result::ZipError),
+
+ #[error("Bundle error: {0}")]
+ Bundle(#[from] crate::bundle::BundleError),
+
+ #[error("Storage error: {0}")]
+ Storage(#[from] crate::storage::StorageError),
+
+ #[error("Cache error: {0}")]
+ Cache(#[from] crate::cache::CacheError),
+}
+
+pub type Result<T> = std::result::Result<T, VendorError>;
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/mod.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/mod.rs
new file mode 100644
index 000000000..5547337b1
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/mod.rs
@@ -0,0 +1,7 @@
+mod builder;
+mod config;
+mod error;
+
+pub use builder::VendorConfigBuilder;
+pub use config::VendorConfig;
+pub use error::{Result, VendorError};
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/bundle.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/bundle.rs
new file mode 100644
index 000000000..53eae098c
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/bundle.rs
@@ -0,0 +1,32 @@
+use super::error::Result;
+use super::key::KeyManager;
+use crate::BundleMetadata;
+
+#[derive(Debug, Clone)]
+pub struct BundleVerifier {
+ key_manager: KeyManager,
+}
+
+impl BundleVerifier {
+ pub fn new(key_manager: KeyManager) -> Self {
+ Self { key_manager }
+ }
+
+ pub async fn verify_bundle(&self, content: &[u8], metadata: &BundleMetadata) -> Result<()> {
+ tracing::info!(
+ file_count = metadata.manifest.files.len(),
+ "Verifying bundle signature"
+ );
+
+ self.key_manager
+ .verify_signature(content, &metadata.signature)
+ .await
+ .map_err(|e| {
+ tracing::error!(
+ error = %e,
+ "Signature verification failed"
+ );
+ e
+ })
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/error.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/error.rs
new file mode 100644
index 000000000..60283b814
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/error.rs
@@ -0,0 +1,40 @@
+use thiserror::Error;
+
+pub type Result<T> = std::result::Result<T, VerificationError>;
+
+#[derive(Debug, Error)]
+pub enum VerificationError {
+ #[error("Invalid signature")]
+ InvalidSignature,
+
+ #[error("Invalid file hash: expected {expected}, got {actual}")]
+ InvalidHash { expected: String, actual: String },
+
+ #[error("Key validation failed: {0}")]
+ KeyValidation(String),
+
+ #[error("Invalid key format: {0}")]
+ InvalidKeyFormat(String),
+
+ #[error("Invalid key length: {0}")]
+ InvalidKeyLength(String),
+
+ #[error(transparent)]
+ Base64(#[from] base64::DecodeError),
+
+ #[error(transparent)]
+ Ed25519(#[from] ed25519_dalek::SignatureError),
+
+ #[error(transparent)]
+ Io(#[from] std::io::Error),
+}
+
+impl VerificationError {
+ pub fn is_key_error(&self) -> bool {
+ matches!(self, Self::KeyValidation(_))
+ }
+
+ pub fn is_verification_error(&self) -> bool {
+ matches!(self, Self::InvalidSignature | Self::InvalidHash { .. })
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/file.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/file.rs
new file mode 100644
index 000000000..ad452b210
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/file.rs
@@ -0,0 +1,52 @@
+use base64::{engine::general_purpose::STANDARD, Engine};
+use blake3::Hash;
+
+use super::error::{Result, VerificationError};
+
+#[derive(Debug)]
+pub struct FileVerifier;
+
+impl FileVerifier {
+ pub fn verify(data: &[u8], expected_hash: &Hash) -> Result<()> {
+ tracing::debug!("Starting hash verification of file data.");
+ let actual_hash = blake3::hash(data);
+
+ if actual_hash != *expected_hash {
+ let expected_hash_b64 = STANDARD.encode(expected_hash.as_bytes());
+ let actual_hash_b64 = STANDARD.encode(actual_hash.as_bytes());
+
+ tracing::error!(
+ expected_hash = %expected_hash_b64,
+ actual_hash = %actual_hash_b64,
+ "Hash verification failed."
+ );
+
+ return Err(VerificationError::InvalidHash {
+ expected: expected_hash_b64,
+ actual: actual_hash_b64,
+ });
+ }
+
+ tracing::debug!("Hash verification succeeded.");
+ Ok(())
+ }
+
+ pub fn hash(data: &[u8]) -> Hash {
+ tracing::debug!("Calculating hash for given data.");
+ blake3::hash(data)
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn test_file_verification() {
+ let data = b"test data";
+ let hash = FileVerifier::hash(data);
+
+ assert!(FileVerifier::verify(data, &hash).is_ok());
+ assert!(FileVerifier::verify(b"wrong data", &hash).is_err());
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/key.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/key.rs
new file mode 100644
index 000000000..6fb898067
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/key.rs
@@ -0,0 +1,57 @@
+use base64::Engine;
+use ed25519_dalek::{Signature, Verifier, VerifyingKey};
+
+use super::error::{Result, VerificationError};
+use crate::api::ApiClient;
+
+#[derive(Debug, Clone)]
+pub struct KeyManager {
+ verified_key: VerifyingKey,
+ api_client: ApiClient,
+}
+
+impl KeyManager {
+ pub async fn new(api_client: ApiClient) -> Result<Self> {
+ tracing::info!("Initializing KeyManager");
+
+ tracing::debug!("Retrieving verified key");
+ let server_key = api_client.list_key().await.map_err(|e| {
+ tracing::error!(error = %e, "Failed to fetch server keys");
+ VerificationError::KeyValidation(e.to_string())
+ })?;
+
+ tracing::debug!("Decoding and verifying key bytes");
+ let key_bytes = base64::engine::general_purpose::STANDARD
+ .decode(&server_key.key)
+ .map_err(|e| {
+ tracing::error!(error = %e, "Failed to decode key bytes");
+ VerificationError::InvalidKeyFormat(e.to_string())
+ })?;
+
+ let key_bytes: [u8; 32] = key_bytes.try_into().map_err(|_| {
+ tracing::error!("Key length is invalid");
+ VerificationError::InvalidKeyLength("Expected 32 bytes".to_string())
+ })?;
+
+ let verified_key = VerifyingKey::from_bytes(&key_bytes).map_err(|e| {
+ tracing::error!(error = %e, "Invalid key format");
+ VerificationError::InvalidKeyFormat(e.to_string())
+ })?;
+
+ tracing::debug!("Key successfully retrieved");
+
+ Ok(Self {
+ verified_key,
+ api_client,
+ })
+ }
+
+ pub async fn verify_signature(&self, data: &[u8], signature: &Signature) -> Result<()> {
+ tracing::info!("Verifying signature");
+ let verifying_key = self.verified_key;
+ verifying_key.verify(data, signature).map_err(|_| {
+ tracing::error!("Signature verification failed");
+ VerificationError::InvalidSignature
+ })
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/mod.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/mod.rs
new file mode 100644
index 000000000..cc2808bbd
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/verification/mod.rs
@@ -0,0 +1,11 @@
+mod bundle;
+mod error;
+mod file;
+mod key;
+
+pub use bundle::BundleVerifier;
+pub use error::VerificationError;
+pub use file::FileVerifier;
+pub use key::KeyManager;
+
+pub const VERIFICATION_VERSION: &str = "1.0.0";
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/tsconfig.json b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/tsconfig.json
new file mode 100644
index 000000000..bee11eace
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/tsconfig.json
@@ -0,0 +1,17 @@
+{
+ "compilerOptions": {
+ "target": "es2021",
+ "module": "esnext",
+ "moduleResolution": "bundler",
+ "skipLibCheck": true,
+ "strict": true,
+ "noUnusedLocals": true,
+ "noImplicitAny": true,
+ "noEmit": true,
+ "declaration": true,
+ "declarationMap": true,
+ "outDir": "dist-js"
+ },
+ "include": ["guest-js/*.ts"],
+ "exclude": ["dist-js", "node_modules"]
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/.envrc b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/.envrc
new file mode 100644
index 000000000..894571bf4
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/.envrc
@@ -0,0 +1,3 @@
+source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k="
+
+use devenv
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/.gitignore b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/.gitignore
new file mode 100644
index 000000000..e9acab980
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/.gitignore
@@ -0,0 +1,23 @@
+/.vs
+.DS_Store
+.Thumbs.db
+*.sublime*
+.idea/
+debug.log
+package-lock.json
+.vscode/settings.json
+yarn.lock
+
+/.tauri
+/target
+node_modules/
+
+# Devenv
+.devenv*
+devenv.local.nix
+
+# direnv
+.direnv
+
+# pre-commit
+.pre-commit-config.yaml
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/Cargo.lock b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/Cargo.lock
new file mode 100644
index 000000000..e58b79374
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/Cargo.lock
@@ -0,0 +1,4801 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "addr2line"
+version = "0.24.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler2"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "alloc-no-stdlib"
+version = "2.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
+
+[[package]]
+name = "alloc-stdlib"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
+dependencies = [
+ "alloc-no-stdlib",
+]
+
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "anstream"
+version = "0.6.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is_terminal_polyfill",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
+dependencies = [
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125"
+dependencies = [
+ "anstyle",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.94"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7"
+
+[[package]]
+name = "atk"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4"
+dependencies = [
+ "atk-sys",
+ "glib",
+ "libc",
+]
+
+[[package]]
+name = "atk-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+
+[[package]]
+name = "backtrace"
+version = "0.3.74"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"
+dependencies = [
+ "addr2line",
+ "cfg-if",
+ "libc",
+ "miniz_oxide",
+ "object",
+ "rustc-demangle",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "base64"
+version = "0.21.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
+
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "block"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
+
+[[package]]
+name = "block-buffer"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "block2"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f"
+dependencies = [
+ "objc2",
+]
+
+[[package]]
+name = "brotli"
+version = "7.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd"
+dependencies = [
+ "alloc-no-stdlib",
+ "alloc-stdlib",
+ "brotli-decompressor",
+]
+
+[[package]]
+name = "brotli-decompressor"
+version = "4.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362"
+dependencies = [
+ "alloc-no-stdlib",
+ "alloc-stdlib",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
+
+[[package]]
+name = "bytemuck"
+version = "1.20.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "bytes"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "cairo-rs"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2"
+dependencies = [
+ "bitflags 2.6.0",
+ "cairo-sys-rs",
+ "glib",
+ "libc",
+ "once_cell",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "cairo-sys-rs"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51"
+dependencies = [
+ "glib-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "camino"
+version = "1.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "cargo-platform"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "cargo_metadata"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037"
+dependencies = [
+ "camino",
+ "cargo-platform",
+ "semver",
+ "serde",
+ "serde_json",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "cargo_toml"
+version = "0.17.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719"
+dependencies = [
+ "serde",
+ "toml 0.8.2",
+]
+
+[[package]]
+name = "cc"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc"
+dependencies = [
+ "shlex",
+]
+
+[[package]]
+name = "cesu8"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
+
+[[package]]
+name = "cfb"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f"
+dependencies = [
+ "byteorder",
+ "fnv",
+ "uuid",
+]
+
+[[package]]
+name = "cfg-expr"
+version = "0.15.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
+dependencies = [
+ "smallvec",
+ "target-lexicon",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "cfg_aliases"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
+
+[[package]]
+name = "chrono"
+version = "0.4.38"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "num-traits",
+ "serde",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "cocoa"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2"
+dependencies = [
+ "bitflags 2.6.0",
+ "block",
+ "cocoa-foundation",
+ "core-foundation",
+ "core-graphics",
+ "foreign-types 0.5.0",
+ "libc",
+ "objc",
+]
+
+[[package]]
+name = "cocoa-foundation"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d"
+dependencies = [
+ "bitflags 2.6.0",
+ "block",
+ "core-foundation",
+ "core-graphics-types",
+ "libc",
+ "objc",
+]
+
+[[package]]
+name = "colorchoice"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
+
+[[package]]
+name = "combine"
+version = "4.6.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd"
+dependencies = [
+ "bytes",
+ "memchr",
+]
+
+[[package]]
+name = "convert_case"
+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.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+
+[[package]]
+name = "core-graphics"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1"
+dependencies = [
+ "bitflags 2.6.0",
+ "core-foundation",
+ "core-graphics-types",
+ "foreign-types 0.5.0",
+ "libc",
+]
+
+[[package]]
+name = "core-graphics-types"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb"
+dependencies = [
+ "bitflags 2.6.0",
+ "core-foundation",
+ "libc",
+]
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc32fast"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crossbeam-channel"
+version = "0.5.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "cssparser"
+version = "0.27.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a"
+dependencies = [
+ "cssparser-macros",
+ "dtoa-short",
+ "itoa 0.4.8",
+ "matches",
+ "phf 0.8.0",
+ "proc-macro2",
+ "quote",
+ "smallvec",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "cssparser-macros"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
+dependencies = [
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "ctor"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501"
+dependencies = [
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "curl"
+version = "0.4.47"
+source = "git+https://github.com/CuriousCorrelation/curl-rust.git#1ec8079cf527b9cf47cc7a48c68b458affdae273"
+dependencies = [
+ "curl-sys",
+ "libc",
+ "openssl-probe",
+ "openssl-sys",
+ "socket2",
+]
+
+[[package]]
+name = "curl-sys"
+version = "0.4.77+curl-8.10.1"
+source = "git+https://github.com/CuriousCorrelation/curl-rust.git#1ec8079cf527b9cf47cc7a48c68b458affdae273"
+dependencies = [
+ "cc",
+ "libc",
+ "libz-sys",
+ "openssl-sys",
+ "pkg-config",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "darling"
+version = "0.20.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
+dependencies = [
+ "darling_core",
+ "darling_macro",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.20.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
+dependencies = [
+ "fnv",
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.20.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
+dependencies = [
+ "darling_core",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "dashmap"
+version = "6.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf"
+dependencies = [
+ "cfg-if",
+ "crossbeam-utils",
+ "hashbrown 0.14.5",
+ "lock_api",
+ "once_cell",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "deranged"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+dependencies = [
+ "powerfmt",
+ "serde",
+]
+
+[[package]]
+name = "derive_more"
+version = "0.99.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce"
+dependencies = [
+ "convert_case",
+ "proc-macro2",
+ "quote",
+ "rustc_version",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+dependencies = [
+ "block-buffer",
+ "crypto-common",
+]
+
+[[package]]
+name = "dirs"
+version = "5.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
+dependencies = [
+ "dirs-sys",
+]
+
+[[package]]
+name = "dirs-sys"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
+dependencies = [
+ "libc",
+ "option-ext",
+ "redox_users",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "dispatch"
+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.90",
+]
+
+[[package]]
+name = "dlopen2"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e1297103d2bbaea85724fcee6294c2d50b1081f9ad47d0f6f6f61eda65315a6"
+dependencies = [
+ "dlopen2_derive",
+ "libc",
+ "once_cell",
+ "winapi",
+]
+
+[[package]]
+name = "dlopen2_derive"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "dpi"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "dtoa"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653"
+
+[[package]]
+name = "dtoa-short"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87"
+dependencies = [
+ "dtoa",
+]
+
+[[package]]
+name = "dunce"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
+
+[[package]]
+name = "dyn-clone"
+version = "1.0.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
+
+[[package]]
+name = "embed-resource"
+version = "2.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b68b6f9f63a0b6a38bc447d4ce84e2b388f3ec95c99c641c8ff0dd3ef89a6379"
+dependencies = [
+ "cc",
+ "memchr",
+ "rustc_version",
+ "toml 0.8.2",
+ "vswhom",
+ "winreg",
+]
+
+[[package]]
+name = "embed_plist"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7"
+
+[[package]]
+name = "env_filter"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab"
+dependencies = [
+ "log",
+ "regex",
+]
+
+[[package]]
+name = "env_logger"
+version = "0.11.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "env_filter",
+ "humantime",
+ "log",
+]
+
+[[package]]
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
+name = "erased-serde"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d"
+dependencies = [
+ "serde",
+ "typeid",
+]
+
+[[package]]
+name = "fdeflate"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07c6f4c64c1d33a3111c4466f7365ebdcc37c5bd1ea0d62aae2e3d722aacbedb"
+dependencies = [
+ "simd-adler32",
+]
+
+[[package]]
+name = "field-offset"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
+dependencies = [
+ "memoffset",
+ "rustc_version",
+]
+
+[[package]]
+name = "flate2"
+version = "1.0.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"
+dependencies = [
+ "foreign-types-macros",
+ "foreign-types-shared 0.3.1",
+]
+
+[[package]]
+name = "foreign-types-macros"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "futf"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843"
+dependencies = [
+ "mac",
+ "new_debug_unreachable",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
+dependencies = [
+ "futures-core",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
+
+[[package]]
+name = "futures-executor"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-io"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
+
+[[package]]
+name = "futures-macro"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
+
+[[package]]
+name = "futures-task"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
+
+[[package]]
+name = "futures-util"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
+dependencies = [
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+]
+
+[[package]]
+name = "fxhash"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "gdk"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646"
+dependencies = [
+ "cairo-rs",
+ "gdk-pixbuf",
+ "gdk-sys",
+ "gio",
+ "glib",
+ "libc",
+ "pango",
+]
+
+[[package]]
+name = "gdk-pixbuf"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec"
+dependencies = [
+ "gdk-pixbuf-sys",
+ "gio",
+ "glib",
+ "libc",
+ "once_cell",
+]
+
+[[package]]
+name = "gdk-pixbuf-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7"
+dependencies = [
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gdk-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2"
+dependencies = [
+ "cairo-sys-rs",
+ "gdk-pixbuf-sys",
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "pango-sys",
+ "pkg-config",
+ "system-deps",
+]
+
+[[package]]
+name = "gdkwayland-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a90fbf5c033c65d93792192a49a8efb5bb1e640c419682a58bb96f5ae77f3d4a"
+dependencies = [
+ "gdk-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "pkg-config",
+ "system-deps",
+]
+
+[[package]]
+name = "gdkx11"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db2ea8a4909d530f79921290389cbd7c34cb9d623bfe970eaae65ca5f9cd9cce"
+dependencies = [
+ "gdk",
+ "gdkx11-sys",
+ "gio",
+ "glib",
+ "libc",
+ "x11",
+]
+
+[[package]]
+name = "gdkx11-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043"
+dependencies = [
+ "gdk-sys",
+ "glib-sys",
+ "libc",
+ "system-deps",
+ "x11",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.9.0+wasi-snapshot-preview1",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+]
+
+[[package]]
+name = "gimli"
+version = "0.31.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
+
+[[package]]
+name = "gio"
+version = "0.18.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-util",
+ "gio-sys",
+ "glib",
+ "libc",
+ "once_cell",
+ "pin-project-lite",
+ "smallvec",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "gio-sys"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+ "winapi",
+]
+
+[[package]]
+name = "glib"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5"
+dependencies = [
+ "bitflags 2.6.0",
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-task",
+ "futures-util",
+ "gio-sys",
+ "glib-macros",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "memchr",
+ "once_cell",
+ "smallvec",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "glib-macros"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc"
+dependencies = [
+ "heck 0.4.1",
+ "proc-macro-crate 2.0.2",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "glib-sys"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898"
+dependencies = [
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "glob"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
+
+[[package]]
+name = "gobject-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44"
+dependencies = [
+ "glib-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gtk"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c"
+dependencies = [
+ "atk",
+ "cairo-rs",
+ "field-offset",
+ "futures-channel",
+ "gdk",
+ "gdk-pixbuf",
+ "gio",
+ "glib",
+ "gtk-sys",
+ "gtk3-macros",
+ "libc",
+ "pango",
+ "pkg-config",
+]
+
+[[package]]
+name = "gtk-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722"
+dependencies = [
+ "atk-sys",
+ "cairo-sys-rs",
+ "gdk-pixbuf-sys",
+ "gdk-sys",
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "pango-sys",
+ "system-deps",
+]
+
+[[package]]
+name = "gtk3-macros"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e"
+dependencies = [
+ "proc-macro-crate 1.3.1",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+
+[[package]]
+name = "hashbrown"
+version = "0.14.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
+
+[[package]]
+name = "hashbrown"
+version = "0.15.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
+
+[[package]]
+name = "heck"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "hex"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
+
+[[package]]
+name = "html5ever"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7"
+dependencies = [
+ "log",
+ "mac",
+ "markup5ever",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "http"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa 1.0.14",
+]
+
+[[package]]
+name = "http-body"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
+dependencies = [
+ "bytes",
+ "http",
+]
+
+[[package]]
+name = "http-body-util"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
+dependencies = [
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "http-serde"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f056c8559e3757392c8d091e796416e4649d8e49e88b8d76df6c002f05027fd"
+dependencies = [
+ "http",
+ "serde",
+]
+
+[[package]]
+name = "httparse"
+version = "1.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946"
+
+[[package]]
+name = "humantime"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
+
+[[package]]
+name = "hyper"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "http",
+ "http-body",
+ "httparse",
+ "itoa 1.0.14",
+ "pin-project-lite",
+ "smallvec",
+ "tokio",
+ "want",
+]
+
+[[package]]
+name = "hyper-util"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "http",
+ "http-body",
+ "hyper",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.61"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows-core 0.52.0",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "ico"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3804960be0bb5e4edb1e1ad67afd321a9ecfd875c3e65c099468fd2717d7cae"
+dependencies = [
+ "byteorder",
+ "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.90",
+]
+
+[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
+[[package]]
+name = "idna"
+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 = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71"
+dependencies = [
+ "icu_normalizer",
+ "icu_properties",
+]
+
+[[package]]
+name = "indexmap"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+dependencies = [
+ "autocfg",
+ "hashbrown 0.12.3",
+ "serde",
+]
+
+[[package]]
+name = "indexmap"
+version = "2.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.15.2",
+ "serde",
+]
+
+[[package]]
+name = "infer"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc150e5ce2330295b8616ce0e3f53250e53af31759a9dbedad1621ba29151847"
+dependencies = [
+ "cfb",
+]
+
+[[package]]
+name = "instant"
+version = "0.1.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "ipnet"
+version = "2.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708"
+
+[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
+
+[[package]]
+name = "itoa"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
+
+[[package]]
+name = "itoa"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
+
+[[package]]
+name = "javascriptcore-rs"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc"
+dependencies = [
+ "bitflags 1.3.2",
+ "glib",
+ "javascriptcore-rs-sys",
+]
+
+[[package]]
+name = "javascriptcore-rs-sys"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "jni"
+version = "0.21.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97"
+dependencies = [
+ "cesu8",
+ "cfg-if",
+ "combine",
+ "jni-sys",
+ "log",
+ "thiserror 1.0.69",
+ "walkdir",
+ "windows-sys 0.45.0",
+]
+
+[[package]]
+name = "jni-sys"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
+
+[[package]]
+name = "js-sys"
+version = "0.3.74"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705"
+dependencies = [
+ "once_cell",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "json-patch"
+version = "3.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08"
+dependencies = [
+ "jsonptr",
+ "serde",
+ "serde_json",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "jsonptr"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5dea2b27dd239b2556ed7a25ba842fe47fd602e7fc7433c2a8d6106d4d9edd70"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "keyboard-types"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a"
+dependencies = [
+ "bitflags 2.6.0",
+ "serde",
+ "unicode-segmentation",
+]
+
+[[package]]
+name = "kuchikiki"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8"
+dependencies = [
+ "cssparser",
+ "html5ever",
+ "indexmap 1.9.3",
+ "matches",
+ "selectors",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+
+[[package]]
+name = "libappindicator"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a"
+dependencies = [
+ "glib",
+ "gtk",
+ "gtk-sys",
+ "libappindicator-sys",
+ "log",
+]
+
+[[package]]
+name = "libappindicator-sys"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf"
+dependencies = [
+ "gtk-sys",
+ "libloading",
+ "once_cell",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.167"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc"
+
+[[package]]
+name = "libloading"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
+dependencies = [
+ "cfg-if",
+ "winapi",
+]
+
+[[package]]
+name = "libredox"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
+dependencies = [
+ "bitflags 2.6.0",
+ "libc",
+]
+
+[[package]]
+name = "libz-sys"
+version = "1.1.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "litemap"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
+
+[[package]]
+name = "lock_api"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "log"
+version = "0.4.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
+
+[[package]]
+name = "mac"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
+
+[[package]]
+name = "malloc_buf"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "markup5ever"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016"
+dependencies = [
+ "log",
+ "phf 0.10.1",
+ "phf_codegen 0.10.0",
+ "string_cache",
+ "string_cache_codegen",
+ "tendril",
+]
+
+[[package]]
+name = "matches"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
+
+[[package]]
+name = "memchr"
+version = "2.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+
+[[package]]
+name = "memoffset"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "mime"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
+dependencies = [
+ "adler2",
+ "simd-adler32",
+]
+
+[[package]]
+name = "mio"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd"
+dependencies = [
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "muda"
+version = "0.15.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fdae9c00e61cc0579bcac625e8ad22104c60548a025bfc972dc83868a28e1484"
+dependencies = [
+ "crossbeam-channel",
+ "dpi",
+ "gtk",
+ "keyboard-types",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "once_cell",
+ "png",
+ "serde",
+ "thiserror 1.0.69",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "ndk"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"
+dependencies = [
+ "bitflags 2.6.0",
+ "jni-sys",
+ "log",
+ "ndk-sys",
+ "num_enum",
+ "raw-window-handle",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "ndk-context"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
+
+[[package]]
+name = "ndk-sys"
+version = "0.6.0+11769913"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873"
+dependencies = [
+ "jni-sys",
+]
+
+[[package]]
+name = "new_debug_unreachable"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
+
+[[package]]
+name = "nodrop"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
+
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "num_enum"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179"
+dependencies = [
+ "num_enum_derive",
+]
+
+[[package]]
+name = "num_enum_derive"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
+dependencies = [
+ "proc-macro-crate 2.0.2",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "objc"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
+dependencies = [
+ "malloc_buf",
+]
+
+[[package]]
+name = "objc-sys"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "objc2"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804"
+dependencies = [
+ "objc-sys",
+ "objc2-encode",
+]
+
+[[package]]
+name = "objc2-app-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "libc",
+ "objc2",
+ "objc2-core-data",
+ "objc2-core-image",
+ "objc2-foundation",
+ "objc2-quartz-core",
+]
+
+[[package]]
+name = "objc2-cloud-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-core-location",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-contacts"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-core-data"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-core-image"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-foundation",
+ "objc2-metal",
+]
+
+[[package]]
+name = "objc2-core-location"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-contacts",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-encode"
+version = "4.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8"
+
+[[package]]
+name = "objc2-foundation"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "libc",
+ "objc2",
+]
+
+[[package]]
+name = "objc2-link-presentation"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-metal"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-quartz-core"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-foundation",
+ "objc2-metal",
+]
+
+[[package]]
+name = "objc2-symbols"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc"
+dependencies = [
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-ui-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-cloud-kit",
+ "objc2-core-data",
+ "objc2-core-image",
+ "objc2-core-location",
+ "objc2-foundation",
+ "objc2-link-presentation",
+ "objc2-quartz-core",
+ "objc2-symbols",
+ "objc2-uniform-type-identifiers",
+ "objc2-user-notifications",
+]
+
+[[package]]
+name = "objc2-uniform-type-identifiers"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-user-notifications"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-core-location",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-web-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68bc69301064cebefc6c4c90ce9cba69225239e4b8ff99d445a2b5563797da65"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "object"
+version = "0.36.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "once_cell"
+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.90",
+]
+
+[[package]]
+name = "openssl-probe"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
+
+[[package]]
+name = "openssl-src"
+version = "300.4.1+3.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "openssl-sys"
+version = "0.9.104"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741"
+dependencies = [
+ "cc",
+ "libc",
+ "openssl-src",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "option-ext"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
+
+[[package]]
+name = "pango"
+version = "0.18.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4"
+dependencies = [
+ "gio",
+ "glib",
+ "libc",
+ "once_cell",
+ "pango-sys",
+]
+
+[[package]]
+name = "pango-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "parking_lot"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+
+[[package]]
+name = "phf"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"
+dependencies = [
+ "phf_macros 0.8.0",
+ "phf_shared 0.8.0",
+ "proc-macro-hack",
+]
+
+[[package]]
+name = "phf"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
+dependencies = [
+ "phf_shared 0.10.0",
+]
+
+[[package]]
+name = "phf"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
+dependencies = [
+ "phf_macros 0.11.2",
+ "phf_shared 0.11.2",
+]
+
+[[package]]
+name = "phf_codegen"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815"
+dependencies = [
+ "phf_generator 0.8.0",
+ "phf_shared 0.8.0",
+]
+
+[[package]]
+name = "phf_codegen"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd"
+dependencies = [
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526"
+dependencies = [
+ "phf_shared 0.8.0",
+ "rand 0.7.3",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
+dependencies = [
+ "phf_shared 0.10.0",
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0"
+dependencies = [
+ "phf_shared 0.11.2",
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "phf_macros"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c"
+dependencies = [
+ "phf_generator 0.8.0",
+ "phf_shared 0.8.0",
+ "proc-macro-hack",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "phf_macros"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"
+dependencies = [
+ "phf_generator 0.11.2",
+ "phf_shared 0.11.2",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "pkg-config"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
+
+[[package]]
+name = "plist"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016"
+dependencies = [
+ "base64 0.22.1",
+ "indexmap 2.7.0",
+ "quick-xml",
+ "serde",
+ "time",
+]
+
+[[package]]
+name = "png"
+version = "0.17.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "52f9d46a34a05a6a57566bc2bfae066ef07585a6e3fa30fbbdff5936380623f0"
+dependencies = [
+ "bitflags 1.3.2",
+ "crc32fast",
+ "fdeflate",
+ "flate2",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
+dependencies = [
+ "zerocopy",
+]
+
+[[package]]
+name = "precomputed-hash"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
+
+[[package]]
+name = "proc-macro-crate"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
+dependencies = [
+ "once_cell",
+ "toml_edit 0.19.15",
+]
+
+[[package]]
+name = "proc-macro-crate"
+version = "2.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24"
+dependencies = [
+ "toml_datetime",
+ "toml_edit 0.20.2",
+]
+
+[[package]]
+name = "proc-macro-error"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+dependencies = [
+ "proc-macro-error-attr",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-error-attr"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-hack"
+version = "0.5.20+deprecated"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.92"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quick-xml"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rand"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
+dependencies = [
+ "getrandom 0.1.16",
+ "libc",
+ "rand_chacha 0.2.2",
+ "rand_core 0.5.1",
+ "rand_hc",
+ "rand_pcg",
+]
+
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha 0.3.1",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
+dependencies = [
+ "getrandom 0.1.16",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom 0.2.15",
+]
+
+[[package]]
+name = "rand_hc"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
+dependencies = [
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "rand_pcg"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429"
+dependencies = [
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "raw-window-handle"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
+
+[[package]]
+name = "redox_syscall"
+version = "0.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
+dependencies = [
+ "bitflags 2.6.0",
+]
+
+[[package]]
+name = "redox_users"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
+dependencies = [
+ "getrandom 0.2.15",
+ "libredox",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "regex"
+version = "1.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+
+[[package]]
+name = "relay"
+version = "0.1.1"
+source = "git+https://github.com/CuriousCorrelation/relay.git#0cab8a64b4c9148c930590f2ad5ad3cc1c6c00ae"
+dependencies = [
+ "bytes",
+ "curl",
+ "dashmap",
+ "env_logger",
+ "http",
+ "http-serde",
+ "infer",
+ "lazy_static",
+ "log",
+ "mime",
+ "openssl",
+ "openssl-sys",
+ "serde",
+ "serde_json",
+ "strum",
+ "thiserror 1.0.69",
+ "time",
+ "tokio-util",
+ "tracing",
+ "url-escape",
+ "urlencoding",
+]
+
+[[package]]
+name = "reqwest"
+version = "0.12.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f"
+dependencies = [
+ "base64 0.22.1",
+ "bytes",
+ "futures-core",
+ "futures-util",
+ "http",
+ "http-body",
+ "http-body-util",
+ "hyper",
+ "hyper-util",
+ "ipnet",
+ "js-sys",
+ "log",
+ "mime",
+ "once_cell",
+ "percent-encoding",
+ "pin-project-lite",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "sync_wrapper",
+ "tokio",
+ "tokio-util",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-streams",
+ "web-sys",
+ "windows-registry",
+]
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+
+[[package]]
+name = "rustc_version"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
+dependencies = [
+ "semver",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"
+
+[[package]]
+name = "ryu"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "schemars"
+version = "0.8.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92"
+dependencies = [
+ "dyn-clone",
+ "indexmap 1.9.3",
+ "schemars_derive",
+ "serde",
+ "serde_json",
+ "url",
+ "uuid",
+]
+
+[[package]]
+name = "schemars_derive"
+version = "0.8.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde_derive_internals",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "selectors"
+version = "0.22.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe"
+dependencies = [
+ "bitflags 1.3.2",
+ "cssparser",
+ "derive_more",
+ "fxhash",
+ "log",
+ "matches",
+ "phf 0.8.0",
+ "phf_codegen 0.8.0",
+ "precomputed-hash",
+ "servo_arc",
+ "smallvec",
+ "thin-slice",
+]
+
+[[package]]
+name = "semver"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.215"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde-untagged"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2676ba99bd82f75cae5cbd2c8eda6fa0b8760f18978ea840e980dd5567b5c5b6"
+dependencies = [
+ "erased-serde",
+ "serde",
+ "typeid",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.215"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "serde_derive_internals"
+version = "0.29.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.133"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
+dependencies = [
+ "itoa 1.0.14",
+ "memchr",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_repr"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "serde_spanned"
+version = "0.6.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde_urlencoded"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
+dependencies = [
+ "form_urlencoded",
+ "itoa 1.0.14",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_with"
+version = "3.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817"
+dependencies = [
+ "base64 0.22.1",
+ "chrono",
+ "hex",
+ "indexmap 1.9.3",
+ "indexmap 2.7.0",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "serde_with_macros",
+ "time",
+]
+
+[[package]]
+name = "serde_with_macros"
+version = "3.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d"
+dependencies = [
+ "darling",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "serialize-to-javascript"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c9823f2d3b6a81d98228151fdeaf848206a7855a7a042bbf9bf870449a66cafb"
+dependencies = [
+ "serde",
+ "serde_json",
+ "serialize-to-javascript-impl",
+]
+
+[[package]]
+name = "serialize-to-javascript-impl"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74064874e9f6a15f04c1f3cb627902d0e6b410abbf36668afa873c61889f1763"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "servo_arc"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432"
+dependencies = [
+ "nodrop",
+ "stable_deref_trait",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
+name = "simd-adler32"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
+
+[[package]]
+name = "siphasher"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
+
+[[package]]
+name = "slab"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
+
+[[package]]
+name = "socket2"
+version = "0.5.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8"
+dependencies = [
+ "libc",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "softbuffer"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18051cdd562e792cad055119e0cdb2cfc137e44e3987532e0f9659a77931bb08"
+dependencies = [
+ "bytemuck",
+ "cfg_aliases",
+ "core-graphics",
+ "foreign-types 0.5.0",
+ "js-sys",
+ "log",
+ "objc2",
+ "objc2-foundation",
+ "objc2-quartz-core",
+ "raw-window-handle",
+ "redox_syscall",
+ "wasm-bindgen",
+ "web-sys",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "soup3"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f"
+dependencies = [
+ "futures-channel",
+ "gio",
+ "glib",
+ "libc",
+ "soup3-sys",
+]
+
+[[package]]
+name = "soup3-sys"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27"
+dependencies = [
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "stable_deref_trait"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
+
+[[package]]
+name = "string_cache"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
+dependencies = [
+ "new_debug_unreachable",
+ "once_cell",
+ "parking_lot",
+ "phf_shared 0.10.0",
+ "precomputed-hash",
+ "serde",
+]
+
+[[package]]
+name = "string_cache_codegen"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
+dependencies = [
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
+name = "strsim"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+
+[[package]]
+name = "strum"
+version = "0.26.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "swift-rs"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7"
+dependencies = [
+ "base64 0.21.7",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.109"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.90"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "sync_wrapper"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
+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.90",
+]
+
+[[package]]
+name = "system-deps"
+version = "6.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"
+dependencies = [
+ "cfg-expr",
+ "heck 0.5.0",
+ "pkg-config",
+ "toml 0.8.2",
+ "version-compare",
+]
+
+[[package]]
+name = "tao"
+version = "0.30.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6682a07cf5bab0b8a2bd20d0a542917ab928b5edb75ebd4eda6b05cbaab872da"
+dependencies = [
+ "bitflags 2.6.0",
+ "cocoa",
+ "core-foundation",
+ "core-graphics",
+ "crossbeam-channel",
+ "dispatch",
+ "dlopen2",
+ "dpi",
+ "gdkwayland-sys",
+ "gdkx11-sys",
+ "gtk",
+ "instant",
+ "jni",
+ "lazy_static",
+ "libc",
+ "log",
+ "ndk",
+ "ndk-context",
+ "ndk-sys",
+ "objc",
+ "once_cell",
+ "parking_lot",
+ "raw-window-handle",
+ "scopeguard",
+ "tao-macros",
+ "unicode-segmentation",
+ "url",
+ "windows",
+ "windows-core 0.58.0",
+ "windows-version",
+ "x11-dl",
+]
+
+[[package]]
+name = "tao-macros"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "target-lexicon"
+version = "0.12.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
+
+[[package]]
+name = "tauri"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e545de0a2dfe296fa67db208266cd397c5a55ae782da77973ef4c4fac90e9f2c"
+dependencies = [
+ "anyhow",
+ "bytes",
+ "dirs",
+ "dunce",
+ "embed_plist",
+ "futures-util",
+ "getrandom 0.2.15",
+ "glob",
+ "gtk",
+ "heck 0.5.0",
+ "http",
+ "jni",
+ "libc",
+ "log",
+ "mime",
+ "muda",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "percent-encoding",
+ "plist",
+ "raw-window-handle",
+ "reqwest",
+ "serde",
+ "serde_json",
+ "serde_repr",
+ "serialize-to-javascript",
+ "swift-rs",
+ "tauri-build",
+ "tauri-macros",
+ "tauri-runtime",
+ "tauri-runtime-wry",
+ "tauri-utils",
+ "thiserror 2.0.4",
+ "tokio",
+ "tray-icon",
+ "url",
+ "urlpattern",
+ "webkit2gtk",
+ "webview2-com",
+ "window-vibrancy",
+ "windows",
+]
+
+[[package]]
+name = "tauri-build"
+version = "2.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7bd2a4bcfaf5fb9f4be72520eefcb61ae565038f8ccba2a497d8c28f463b8c01"
+dependencies = [
+ "anyhow",
+ "cargo_toml",
+ "dirs",
+ "glob",
+ "heck 0.5.0",
+ "json-patch",
+ "schemars",
+ "semver",
+ "serde",
+ "serde_json",
+ "tauri-utils",
+ "tauri-winres",
+ "toml 0.8.2",
+ "walkdir",
+]
+
+[[package]]
+name = "tauri-codegen"
+version = "2.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf79faeecf301d3e969b1fae977039edb77a4c1f25cc0a961be298b54bff97cf"
+dependencies = [
+ "base64 0.22.1",
+ "brotli",
+ "ico",
+ "json-patch",
+ "plist",
+ "png",
+ "proc-macro2",
+ "quote",
+ "semver",
+ "serde",
+ "serde_json",
+ "sha2",
+ "syn 2.0.90",
+ "tauri-utils",
+ "thiserror 2.0.4",
+ "time",
+ "url",
+ "uuid",
+ "walkdir",
+]
+
+[[package]]
+name = "tauri-macros"
+version = "2.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c52027c8c5afb83166dacddc092ee8fff50772f9646d461d8c33ee887e447a03"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "tauri-codegen",
+ "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-relay"
+version = "0.1.0"
+dependencies = [
+ "relay",
+ "serde",
+ "tauri",
+ "tauri-plugin",
+ "thiserror 2.0.4",
+ "tracing",
+]
+
+[[package]]
+name = "tauri-runtime"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cce18d43f80d4aba3aa8a0c953bbe835f3d0f2370aca75e8dbb14bd4bab27958"
+dependencies = [
+ "dpi",
+ "gtk",
+ "http",
+ "jni",
+ "raw-window-handle",
+ "serde",
+ "serde_json",
+ "tauri-utils",
+ "thiserror 2.0.4",
+ "url",
+ "windows",
+]
+
+[[package]]
+name = "tauri-runtime-wry"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f442a38863e10129ffe2cec7bd09c2dcf8a098a3a27801a476a304d5bb991d2"
+dependencies = [
+ "gtk",
+ "http",
+ "jni",
+ "log",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "percent-encoding",
+ "raw-window-handle",
+ "softbuffer",
+ "tao",
+ "tauri-runtime",
+ "tauri-utils",
+ "url",
+ "webkit2gtk",
+ "webview2-com",
+ "windows",
+ "wry",
+]
+
+[[package]]
+name = "tauri-utils"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9271a88f99b4adea0dc71d0baca4505475a0bbd139fb135f62958721aaa8fe54"
+dependencies = [
+ "brotli",
+ "cargo_metadata",
+ "ctor",
+ "dunce",
+ "glob",
+ "html5ever",
+ "http",
+ "infer",
+ "json-patch",
+ "kuchikiki",
+ "log",
+ "memchr",
+ "phf 0.11.2",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "schemars",
+ "semver",
+ "serde",
+ "serde-untagged",
+ "serde_json",
+ "serde_with",
+ "swift-rs",
+ "thiserror 2.0.4",
+ "toml 0.8.2",
+ "url",
+ "urlpattern",
+ "uuid",
+ "walkdir",
+]
+
+[[package]]
+name = "tauri-winres"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5993dc129e544393574288923d1ec447c857f3f644187f4fbf7d9a875fbfc4fb"
+dependencies = [
+ "embed-resource",
+ "toml 0.7.8",
+]
+
+[[package]]
+name = "tendril"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0"
+dependencies = [
+ "futf",
+ "mac",
+ "utf-8",
+]
+
+[[package]]
+name = "thin-slice"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
+
+[[package]]
+name = "thiserror"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl 1.0.69",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490"
+dependencies = [
+ "thiserror-impl 2.0.4",
+]
+
+[[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.90",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "time"
+version = "0.3.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21"
+dependencies = [
+ "deranged",
+ "itoa 1.0.14",
+ "num-conv",
+ "powerfmt",
+ "serde",
+ "time-core",
+ "time-macros",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
+
+[[package]]
+name = "time-macros"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de"
+dependencies = [
+ "num-conv",
+ "time-core",
+]
+
+[[package]]
+name = "tinystr"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
+dependencies = [
+ "displaydoc",
+ "zerovec",
+]
+
+[[package]]
+name = "tokio"
+version = "1.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551"
+dependencies = [
+ "backtrace",
+ "bytes",
+ "libc",
+ "mio",
+ "pin-project-lite",
+ "socket2",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "toml"
+version = "0.7.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit 0.19.15",
+]
+
+[[package]]
+name = "toml"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit 0.20.2",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.19.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
+dependencies = [
+ "indexmap 2.7.0",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "winnow",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.20.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338"
+dependencies = [
+ "indexmap 2.7.0",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "winnow",
+]
+
+[[package]]
+name = "tower-service"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
+
+[[package]]
+name = "tracing"
+version = "0.1.41"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
+dependencies = [
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c"
+dependencies = [
+ "once_cell",
+]
+
+[[package]]
+name = "tray-icon"
+version = "0.19.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d48a05076dd272615d03033bf04f480199f7d1b66a8ac64d75c625fc4a70c06b"
+dependencies = [
+ "core-graphics",
+ "crossbeam-channel",
+ "dirs",
+ "libappindicator",
+ "muda",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "once_cell",
+ "png",
+ "serde",
+ "thiserror 1.0.69",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "try-lock"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
+
+[[package]]
+name = "typeid"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e"
+
+[[package]]
+name = "typenum"
+version = "1.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+
+[[package]]
+name = "unic-char-property"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221"
+dependencies = [
+ "unic-char-range",
+]
+
+[[package]]
+name = "unic-char-range"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc"
+
+[[package]]
+name = "unic-common"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc"
+
+[[package]]
+name = "unic-ucd-ident"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987"
+dependencies = [
+ "unic-char-property",
+ "unic-char-range",
+ "unic-ucd-version",
+]
+
+[[package]]
+name = "unic-ucd-version"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4"
+dependencies = [
+ "unic-common",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
+
+[[package]]
+name = "unicode-segmentation"
+version = "1.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
+
+[[package]]
+name = "url"
+version = "2.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+ "serde",
+]
+
+[[package]]
+name = "url-escape"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44e0ce4d1246d075ca5abec4b41d33e87a6054d08e2366b63205665e950db218"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "urlencoding"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
+
+[[package]]
+name = "urlpattern"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d"
+dependencies = [
+ "regex",
+ "serde",
+ "unic-ucd-ident",
+ "url",
+]
+
+[[package]]
+name = "utf-8"
+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 = "utf8parse"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
+
+[[package]]
+name = "uuid"
+version = "1.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a"
+dependencies = [
+ "getrandom 0.2.15",
+ "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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b"
+
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[package]]
+name = "vswhom"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b"
+dependencies = [
+ "libc",
+ "vswhom-sys",
+]
+
+[[package]]
+name = "vswhom-sys"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3b17ae1f6c8a2b28506cd96d412eebf83b4a0ff2cbefeeb952f2f9dfa44ba18"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "walkdir"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
+[[package]]
+name = "want"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
+dependencies = [
+ "try-lock",
+]
+
+[[package]]
+name = "wasi"
+version = "0.9.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.97"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.97"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "once_cell",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.97"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.97"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.97"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49"
+
+[[package]]
+name = "wasm-streams"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65"
+dependencies = [
+ "futures-util",
+ "js-sys",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
+[[package]]
+name = "web-sys"
+version = "0.3.74"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "webkit2gtk"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76b1bc1e54c581da1e9f179d0b38512ba358fb1af2d634a1affe42e37172361a"
+dependencies = [
+ "bitflags 1.3.2",
+ "cairo-rs",
+ "gdk",
+ "gdk-sys",
+ "gio",
+ "gio-sys",
+ "glib",
+ "glib-sys",
+ "gobject-sys",
+ "gtk",
+ "gtk-sys",
+ "javascriptcore-rs",
+ "libc",
+ "once_cell",
+ "soup3",
+ "webkit2gtk-sys",
+]
+
+[[package]]
+name = "webkit2gtk-sys"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62daa38afc514d1f8f12b8693d30d5993ff77ced33ce30cd04deebc267a6d57c"
+dependencies = [
+ "bitflags 1.3.2",
+ "cairo-sys-rs",
+ "gdk-sys",
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "gtk-sys",
+ "javascriptcore-rs-sys",
+ "libc",
+ "pkg-config",
+ "soup3-sys",
+ "system-deps",
+]
+
+[[package]]
+name = "webview2-com"
+version = "0.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f61ff3d9d0ee4efcb461b14eb3acfda2702d10dc329f339303fc3e57215ae2c"
+dependencies = [
+ "webview2-com-macros",
+ "webview2-com-sys",
+ "windows",
+ "windows-core 0.58.0",
+ "windows-implement",
+ "windows-interface",
+]
+
+[[package]]
+name = "webview2-com-macros"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "webview2-com-sys"
+version = "0.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3a3e2eeb58f82361c93f9777014668eb3d07e7d174ee4c819575a9208011886"
+dependencies = [
+ "thiserror 1.0.69",
+ "windows",
+ "windows-core 0.58.0",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
+dependencies = [
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "window-vibrancy"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ea403deff7b51fff19e261330f71608ff2cdef5721d72b64180bb95be7c4150"
+dependencies = [
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "raw-window-handle",
+ "windows-sys 0.59.0",
+ "windows-version",
+]
+
+[[package]]
+name = "windows"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
+dependencies = [
+ "windows-core 0.58.0",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
+dependencies = [
+ "windows-implement",
+ "windows-interface",
+ "windows-result",
+ "windows-strings",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-implement"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "windows-interface"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "windows-registry"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0"
+dependencies = [
+ "windows-result",
+ "windows-strings",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-result"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
+dependencies = [
+ "windows-result",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.45.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
+dependencies = [
+ "windows-targets 0.42.2",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets 0.48.5",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.59.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
+dependencies = [
+ "windows_aarch64_gnullvm 0.42.2",
+ "windows_aarch64_msvc 0.42.2",
+ "windows_i686_gnu 0.42.2",
+ "windows_i686_msvc 0.42.2",
+ "windows_x86_64_gnu 0.42.2",
+ "windows_x86_64_gnullvm 0.42.2",
+ "windows_x86_64_msvc 0.42.2",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
+dependencies = [
+ "windows_aarch64_gnullvm 0.48.5",
+ "windows_aarch64_msvc 0.48.5",
+ "windows_i686_gnu 0.48.5",
+ "windows_i686_msvc 0.48.5",
+ "windows_x86_64_gnu 0.48.5",
+ "windows_x86_64_gnullvm 0.48.5",
+ "windows_x86_64_msvc 0.48.5",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+dependencies = [
+ "windows_aarch64_gnullvm 0.52.6",
+ "windows_aarch64_msvc 0.52.6",
+ "windows_i686_gnu 0.52.6",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc 0.52.6",
+ "windows_x86_64_gnu 0.52.6",
+ "windows_x86_64_gnullvm 0.52.6",
+ "windows_x86_64_msvc 0.52.6",
+]
+
+[[package]]
+name = "windows-version"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6998aa457c9ba8ff2fb9f13e9d2a930dabcea28f1d0ab94d687d8b3654844515"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "winnow"
+version = "0.5.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "winreg"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5"
+dependencies = [
+ "cfg-if",
+ "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.47.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61ce51277d65170f6379d8cda935c80e3c2d1f0ff712a123c8bddb11b31a4b73"
+dependencies = [
+ "base64 0.22.1",
+ "block2",
+ "cookie",
+ "crossbeam-channel",
+ "dpi",
+ "dunce",
+ "gdkx11",
+ "gtk",
+ "html5ever",
+ "http",
+ "javascriptcore-rs",
+ "jni",
+ "kuchikiki",
+ "libc",
+ "ndk",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "objc2-ui-kit",
+ "objc2-web-kit",
+ "once_cell",
+ "percent-encoding",
+ "raw-window-handle",
+ "sha2",
+ "soup3",
+ "tao-macros",
+ "thiserror 1.0.69",
+ "url",
+ "webkit2gtk",
+ "webkit2gtk-sys",
+ "webview2-com",
+ "windows",
+ "windows-core 0.58.0",
+ "windows-version",
+ "x11-dl",
+]
+
+[[package]]
+name = "x11"
+version = "2.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e"
+dependencies = [
+ "libc",
+ "pkg-config",
+]
+
+[[package]]
+name = "x11-dl"
+version = "2.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f"
+dependencies = [
+ "libc",
+ "once_cell",
+ "pkg-config",
+]
+
+[[package]]
+name = "yoke"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40"
+dependencies = [
+ "serde",
+ "stable_deref_trait",
+ "yoke-derive",
+ "zerofrom",
+]
+
+[[package]]
+name = "yoke-derive"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "synstructure",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
+dependencies = [
+ "byteorder",
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "zerofrom"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e"
+dependencies = [
+ "zerofrom-derive",
+]
+
+[[package]]
+name = "zerofrom-derive"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "synstructure",
+]
+
+[[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.90",
+]
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/Cargo.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/Cargo.toml
new file mode 100644
index 000000000..8411c6128
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/Cargo.toml
@@ -0,0 +1,19 @@
+[package]
+name = "tauri-plugin-relay"
+version = "0.1.0"
+authors = [ "CuriousCorrelation" ]
+description = ""
+edition = "2021"
+rust-version = "1.77.2"
+exclude = ["/examples", "/webview-dist", "/webview-src", "/node_modules"]
+links = "tauri-plugin-relay"
+
+[dependencies]
+tauri = { version = "2.1.0" }
+serde = "1.0"
+thiserror = "2"
+tracing = "0.1.41"
+relay = { git = "https://github.com/CuriousCorrelation/relay.git" }
+
+[build-dependencies]
+tauri-plugin = { version = "2.0.2", features = ["build"] }
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/LICENSE.md b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/LICENSE.md
new file mode 100644
index 000000000..24bfc7fe1
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/LICENSE.md
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 - CuriousCorrelation
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/README.md b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/README.md
new file mode 100644
index 000000000..b0fba6ac8
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/README.md
@@ -0,0 +1,129 @@
+# Tauri Plugin: Relay
+
+> A HTTP request-response relay plugin for Tauri apps, providing advanced request handling capabilities including custom headers, certificates, proxies, and local system integration.
+
+<div align="center">
+
+![GitHub License MIT](https://img.shields.io/github/license/CuriousCorrelation/tauri-plugin-relay)
+![Tauri 2.0](https://img.shields.io/badge/Tauri-2.0-blue)
+[![Rust](https://img.shields.io/badge/Rust-1.77.2+-orange)](https://www.rust-lang.org)
+
+</div>
+
+## Features
+
+- 🦀 Blazingly fast!
+- HTTP client built on libcurl
+- Security with SSL/TLS certificate management
+- Proxy support
+- Multiple authentication methods (Basic, Bearer, Digest)
+- Content handling (JSON, Form Data, Binary)
+- Async request execution with cancellation support
+
+## Installation
+
+> [!IMPORTANT]
+> This plugin requires Tauri 2.0 or later.
+
+Add the plugin to your project by installing directly from GitHub:
+
+```toml
+[dependencies]
+tauri-plugin-relay = { git = "https://github.com/CuriousCorrelation/tauri-plugin-relay" }
+```
+``` json
+"dependencies": {
+ "@CuriousCorrelation/plugin-relay": "github:CuriousCorrelation/tauri-plugin-relay"
+}
+```
+
+## Quick Start
+
+### Rust
+
+```rust
+fn main() {
+ tauri::Builder::default()
+ .plugin(tauri_plugin_relay::init())
+ .run(tauri::generate_context!())
+ .expect("error while running tauri application");
+}
+```
+
+### JavaScript/TypeScript
+
+```typescript
+import { execute, cancel } from '@CuriousCorrelation/plugin-relay'
+
+// Execute a request
+const result = await execute({
+ id: 1,
+ url: "https://api.example.com/data",
+ method: "POST",
+ headers: {
+ "Content-Type": ["application/json"]
+ },
+ content: {
+ kind: "json",
+ content: { hello: "world" }
+ }
+})
+
+// Cancel a request
+await cancel(1)
+```
+
+## Content Types
+
+The plugin supports multiple content types for requests:
+
+| Type | Description |
+|------|-------------|
+| `text` | Plain text content |
+| `json` | JSON data with automatic parsing |
+| `form` | Multipart form data with file support |
+| `binary` | Raw binary data with optional MIME type |
+| `urlencoded` | URL-encoded form data |
+
+## Authentication
+
+Built-in support for various authentication methods:
+
+| Method | Description |
+|--------|-------------|
+| `basic` | Basic HTTP authentication |
+| `bearer` | Bearer token authentication |
+| `digest` | Digest authentication (MD5, SHA-256, SHA-512) |
+
+## Security
+
+The plugin provides extensive security options:
+
+- Client certificate support (PEM, PKCS#12)
+- Custom CA certificates
+- Certificate validation control
+- Host verification settings
+
+## Development
+
+Requirements:
+- Rust 1.77.2 or later
+- Node.js 18 or later
+- pnpm
+- libcurl with SSL support
+
+## Error Handling
+
+The plugin provides detailed error information for:
+
+- Network failures
+- Certificate issues
+- Timeout scenarios
+- Parse errors
+- Request cancellations
+
+## License
+
+Code: (c) 2024 - CuriousCorrelation
+
+MIT or MIT/Apache 2.0 where applicable.
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/build.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/build.rs
new file mode 100644
index 000000000..339053a6d
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/build.rs
@@ -0,0 +1,8 @@
+const COMMANDS: &[&str] = &["execute", "cancel", "subscribe"];
+
+fn main() {
+ tauri_plugin::Builder::new(COMMANDS)
+ .android_path("android")
+ .ios_path("ios")
+ .build();
+}
diff --git a/packages/hoppscotch-relay/devenv.lock b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/devenv.lock
similarity index 84%
rename from packages/hoppscotch-relay/devenv.lock
rename to packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/devenv.lock
index 63b40463a..748752263 100644
--- a/packages/hoppscotch-relay/devenv.lock
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/devenv.lock
@@ -3,10 +3,10 @@
"devenv": {
"locked": {
"dir": "src/modules",
- "lastModified": 1729641677,
+ "lastModified": 1732585607,
"owner": "cachix",
"repo": "devenv",
- "rev": "4f634c92037d3fb7a7cc2feddc4d686ace83b57f",
+ "rev": "a520f05c40ebecaf5e17064b27e28ba8e70c49fb",
"type": "github"
},
"original": {
@@ -24,10 +24,10 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
- "lastModified": 1729578683,
+ "lastModified": 1732602776,
"owner": "nix-community",
"repo": "fenix",
- "rev": "d66cda53e8193a878742dcadb5bb75f4df7c3c0a",
+ "rev": "e0d44b70dcd2b98dd77857b4c5c7b1dc6b1ef56d",
"type": "github"
},
"original": {
@@ -73,10 +73,10 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1729501122,
+ "lastModified": 1732238832,
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "56c7c4a3f5fdbef5bf81c7d9c28fbb45dc626611",
+ "rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d",
"type": "github"
},
"original": {
@@ -88,10 +88,10 @@
},
"nixpkgs-stable": {
"locked": {
- "lastModified": 1729449015,
+ "lastModified": 1731797254,
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "89172919243df199fe237ba0f776c3e3e3d72367",
+ "rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59",
"type": "github"
},
"original": {
@@ -111,10 +111,10 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
- "lastModified": 1729104314,
+ "lastModified": 1732021966,
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
- "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6",
+ "rev": "3308484d1a443fc5bc92012435d79e80458fe43c",
"type": "github"
},
"original": {
@@ -134,10 +134,10 @@
"rust-analyzer-src": {
"flake": false,
"locked": {
- "lastModified": 1729618852,
+ "lastModified": 1732562640,
"owner": "rust-lang",
"repo": "rust-analyzer",
- "rev": "c2867868889a549562a7b53fb572719f852a8a6f",
+ "rev": "157c7d01149e9be7179c5724b89d8d073e923bd8",
"type": "github"
},
"original": {
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/devenv.nix b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/devenv.nix
new file mode 100644
index 000000000..1e49dd787
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/devenv.nix
@@ -0,0 +1,90 @@
+{ pkgs, lib, config, inputs, ... }:
+
+let
+ rosettaPkgs =
+ if pkgs.stdenv.isDarwin && pkgs.stdenv.isAarch64
+ then pkgs.pkgsx86_64Darwin
+ else pkgs;
+
+ darwinPackages = with pkgs; [
+ darwin.apple_sdk.frameworks.Security
+ darwin.apple_sdk.frameworks.CoreServices
+ darwin.apple_sdk.frameworks.CoreFoundation
+ darwin.apple_sdk.frameworks.Foundation
+ darwin.apple_sdk.frameworks.AppKit
+ darwin.apple_sdk.frameworks.WebKit
+ ];
+
+ linuxPackages = with pkgs; [
+ libsoup_3
+ webkitgtk_4_1
+ librsvg
+ libappindicator
+ libayatana-appindicator
+ ];
+
+in {
+ packages = with pkgs; [
+ git
+ nodejs_22
+ nodePackages_latest.typescript-language-server
+ nodePackages_latest.vue-language-server
+ cargo-edit
+ ] ++ lib.optionals pkgs.stdenv.isDarwin darwinPackages
+ ++ lib.optionals pkgs.stdenv.isLinux linuxPackages;
+
+ env = {
+ APP_GREET = "Hi!";
+ } // lib.optionalAttrs pkgs.stdenv.isLinux {
+ LD_LIBRARY_PATH = lib.makeLibraryPath [
+ pkgs.libappindicator
+ pkgs.libayatana-appindicator
+ ];
+ } // lib.optionalAttrs pkgs.stdenv.isDarwin {
+ # Place to put macOS-specific environment variables
+ };
+
+ scripts = {
+ hello.exec = "echo hello from $APP_GREET";
+ e.exec = "emacs";
+ };
+
+ enterShell = ''
+ git --version
+ ${lib.optionalString pkgs.stdenv.isDarwin ''
+ # Place to put macOS-specific shell initialization
+ ''}
+ ${lib.optionalString pkgs.stdenv.isLinux ''
+ # Place to put Linux-specific shell initialization
+ ''}
+ '';
+
+ enterTest = ''
+ echo "Running tests"
+ '';
+
+ dotenv.enable = true;
+
+ languages = {
+ typescript.enable = true;
+ javascript = {
+ enable = true;
+ pnpm.enable = true;
+ npm.enable = true;
+ };
+ rust = {
+ enable = true;
+ channel = "nightly";
+ components = [
+ "rustc"
+ "cargo"
+ "clippy"
+ "rustfmt"
+ "rust-analyzer"
+ "llvm-tools-preview"
+ "rust-src"
+ "rustc-codegen-cranelift-preview"
+ ];
+ };
+ };
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/devenv.yaml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/devenv.yaml
new file mode 100644
index 000000000..9ee9ba349
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/devenv.yaml
@@ -0,0 +1,23 @@
+# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
+inputs:
+ # For NodeJS-22 and above
+ nixpkgs:
+ url: github:NixOS/nixpkgs/nixpkgs-unstable
+ # nixpkgs:
+ # url: github:cachix/devenv-nixpkgs/rolling
+ fenix:
+ url: github:nix-community/fenix
+ inputs:
+ nixpkgs:
+ follows: nixpkgs
+
+# If you're using non-OSS software, you can set allowUnfree to true.
+allowUnfree: true
+
+# If you're willing to use a package that's vulnerable
+# permittedInsecurePackages:
+# - "openssl-1.1.1w"
+
+# If you have more than one devenv you can merge them
+#imports:
+# - ./backend
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/dist-js/index.cjs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/dist-js/index.cjs
new file mode 100644
index 000000000..06b05fc46
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/dist-js/index.cjs
@@ -0,0 +1,27 @@
+'use strict';
+
+var core = require('@tauri-apps/api/core');
+
+exports.MediaType = void 0;
+(function (MediaType) {
+ MediaType["TEXT_PLAIN"] = "text/plain";
+ MediaType["TEXT_HTML"] = "text/html";
+ MediaType["TEXT_CSS"] = "text/css";
+ MediaType["TEXT_CSV"] = "text/csv";
+ MediaType["APPLICATION_JSON"] = "application/json";
+ MediaType["APPLICATION_LD_JSON"] = "application/ld+json";
+ MediaType["APPLICATION_XML"] = "application/xml";
+ MediaType["TEXT_XML"] = "text/xml";
+ MediaType["APPLICATION_FORM"] = "application/x-www-form-urlencoded";
+ MediaType["APPLICATION_OCTET"] = "application/octet-stream";
+ MediaType["MULTIPART_FORM"] = "multipart/form-data";
+})(exports.MediaType || (exports.MediaType = {}));
+async function execute(request) {
+ return await core.invoke('plugin:relay|execute', { request });
+}
+async function cancel(requestId) {
+ return await core.invoke('plugin:relay|cancel', { requestId });
+}
+
+exports.cancel = cancel;
+exports.execute = execute;
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/dist-js/index.d.ts b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/dist-js/index.d.ts
new file mode 100644
index 000000000..6d6950e64
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/dist-js/index.d.ts
@@ -0,0 +1,209 @@
+export type Method = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | "CONNECT" | "TRACE";
+export type Version = "HTTP/1.0" | "HTTP/1.1" | "HTTP/2.0" | "HTTP/3.0";
+export type StatusCode = 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511;
+export type FormDataValue = {
+ kind: "text";
+ value: string;
+} | {
+ kind: "file";
+ filename: string;
+ contentType: string;
+ data: Uint8Array;
+};
+export type FormData = Map<string, FormDataValue[]>;
+export declare enum MediaType {
+ TEXT_PLAIN = "text/plain",
+ TEXT_HTML = "text/html",
+ TEXT_CSS = "text/css",
+ TEXT_CSV = "text/csv",
+ APPLICATION_JSON = "application/json",
+ APPLICATION_LD_JSON = "application/ld+json",
+ APPLICATION_XML = "application/xml",
+ TEXT_XML = "text/xml",
+ APPLICATION_FORM = "application/x-www-form-urlencoded",
+ APPLICATION_OCTET = "application/octet-stream",
+ MULTIPART_FORM = "multipart/form-data"
+}
+export type ContentType = {
+ kind: "text";
+ content: string;
+ mediaType: MediaType.TEXT_PLAIN | MediaType.TEXT_HTML | MediaType.TEXT_CSS | MediaType.TEXT_CSV;
+} | {
+ kind: "json";
+ content: unknown;
+ mediaType: MediaType.APPLICATION_JSON | MediaType.APPLICATION_LD_JSON;
+} | {
+ kind: "xml";
+ content: string;
+ mediaType: MediaType.APPLICATION_XML | MediaType.TEXT_XML;
+} | {
+ kind: "form";
+ content: FormData;
+ mediaType: MediaType.APPLICATION_FORM;
+} | {
+ kind: "binary";
+ content: Uint8Array;
+ mediaType: MediaType.APPLICATION_OCTET | string;
+ filename?: string;
+} | {
+ kind: "multipart";
+ content: FormData;
+ mediaType: MediaType.MULTIPART_FORM;
+} | {
+ kind: "urlencoded";
+ content: string;
+ mediaType: MediaType.APPLICATION_FORM;
+} | {
+ kind: "stream";
+ content: ReadableStream;
+ mediaType: string;
+};
+export interface ResponseBody {
+ body: Uint8Array;
+ mediaType: MediaType | string;
+}
+export type AuthType = {
+ kind: "none";
+} | {
+ kind: "basic";
+ username: string;
+ password: string;
+} | {
+ kind: "bearer";
+ token: string;
+} | {
+ kind: "digest";
+ username: string;
+ password: string;
+ realm?: string;
+ nonce?: string;
+ opaque?: string;
+ algorithm?: "MD5" | "SHA-256" | "SHA-512";
+ qop?: "auth" | "auth-int";
+ nc?: string;
+ cnonce?: string;
+} | {
+ kind: "oauth2";
+ grantType: {
+ kind: "authorization_code";
+ authEndpoint: string;
+ tokenEndpoint: string;
+ clientId: string;
+ clientSecret?: string;
+ } | {
+ kind: "client_credentials";
+ tokenEndpoint: string;
+ clientId: string;
+ clientSecret?: string;
+ } | {
+ kind: "password";
+ tokenEndpoint: string;
+ username: string;
+ password: string;
+ } | {
+ kind: "implicit";
+ authEndpoint: string;
+ clientId: string;
+ };
+ accessToken?: string;
+ refreshToken?: string;
+};
+export type CertificateType = {
+ kind: "pem";
+ cert: Uint8Array;
+ key: Uint8Array;
+} | {
+ kind: "pfx";
+ data: Uint8Array;
+ password: string;
+};
+export interface Request {
+ id: number;
+ url: string;
+ method: Method;
+ version: Version;
+ headers?: Record<string, string>;
+ params?: Record<string, string>;
+ content?: ContentType;
+ auth?: AuthType;
+ security?: {
+ certificates?: {
+ client?: CertificateType;
+ ca?: Array<Uint8Array>;
+ };
+ verifyHost?: boolean;
+ verifyPeer?: boolean;
+ };
+ proxy?: {
+ url: string;
+ auth?: {
+ username: string;
+ password: string;
+ };
+ };
+}
+export interface Response {
+ id: number;
+ status: StatusCode;
+ statusText: string;
+ version: Version;
+ headers: Record<string, string>;
+ cookies?: Array<{
+ name: string;
+ value: string;
+ domain?: string;
+ path?: string;
+ expires?: Date;
+ secure?: boolean;
+ httpOnly?: boolean;
+ sameSite?: 'Strict' | 'Lax' | 'None';
+ }>;
+ body: ResponseBody;
+ meta: {
+ timing: {
+ start: number;
+ end: number;
+ };
+ size: {
+ headers: number;
+ body: number;
+ total: number;
+ };
+ };
+}
+export type UnsupportedFeatureError = {
+ kind: "unsupported_feature";
+ feature: string;
+ message: string;
+ relay: string;
+};
+export type RelayError = UnsupportedFeatureError | {
+ kind: "network";
+ message: string;
+ cause?: unknown;
+} | {
+ kind: "timeout";
+ message: string;
+ phase?: "connect" | "tls" | "response";
+} | {
+ kind: "certificate";
+ message: string;
+ cause?: unknown;
+} | {
+ kind: "parse";
+ message: string;
+ cause?: unknown;
+} | {
+ kind: "abort";
+ message: string;
+};
+export type RequestResult = {
+ kind: 'success';
+ response: Response;
+} | {
+ kind: 'error';
+ error: RelayError;
+};
+export declare function execute(request: Request): Promise<RequestResult>;
+export declare function cancel(requestId: number): Promise<void>;
+//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/dist-js/index.d.ts.map b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/dist-js/index.d.ts.map
new file mode 100644
index 000000000..1724b9b31
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/dist-js/index.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["guest-js/index.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,MAAM,GACd,KAAK,GACL,MAAM,GACN,KAAK,GACL,QAAQ,GACR,OAAO,GACP,MAAM,GACN,SAAS,GACT,SAAS,GACT,OAAO,CAAA;AAEX,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAA;AAEvE,MAAM,MAAM,UAAU,GAChB,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,CAAA;AAET,MAAM,MAAM,aAAa,GACnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAAA;AAE/E,MAAM,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,CAAA;AAEnD,oBAAY,SAAS;IACjB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,gBAAgB,qBAAqB;IACrC,mBAAmB,wBAAwB;IAC3C,eAAe,oBAAoB;IACnC,QAAQ,aAAa;IACrB,gBAAgB,sCAAsC;IACtD,iBAAiB,6BAA6B;IAC9C,cAAc,wBAAwB;CACzC;AAED,MAAM,MAAM,WAAW,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC,SAAS,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAA;CAAE,GAClI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,SAAS,CAAC,gBAAgB,GAAG,SAAS,CAAC,mBAAmB,CAAA;CAAE,GACzG;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,QAAQ,CAAA;CAAE,GAC3F;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,SAAS,CAAC,gBAAgB,CAAA;CAAE,GAC1E;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,SAAS,CAAC,iBAAiB,GAAG,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3G;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,SAAS,CAAC,cAAc,CAAA;CAAE,GAC7E;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,SAAS,CAAC,gBAAgB,CAAA;CAAE,GAC9E;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,cAAc,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpE,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,UAAU,CAAA;IAChB,SAAS,EAAE,SAAS,GAAG,MAAM,CAAA;CAChC;AAED,MAAM,MAAM,QAAQ,GACd;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IACE,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,CAAA;IACzC,GAAG,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;IACzB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB,GACC;IACE,IAAI,EAAE,QAAQ,CAAA;IACd,SAAS,EACP;QACE,IAAI,EAAE,oBAAoB,CAAA;QAC1B,YAAY,EAAE,MAAM,CAAA;QACpB,aAAa,EAAE,MAAM,CAAA;QACrB,QAAQ,EAAE,MAAM,CAAA;QAChB,YAAY,CAAC,EAAE,MAAM,CAAA;KACxB,GACC;QACE,IAAI,EAAE,oBAAoB,CAAA;QAC1B,aAAa,EAAE,MAAM,CAAA;QACrB,QAAQ,EAAE,MAAM,CAAA;QAChB,YAAY,CAAC,EAAE,MAAM,CAAA;KACxB,GACC;QACE,IAAI,EAAE,UAAU,CAAA;QAChB,aAAa,EAAE,MAAM,CAAA;QACrB,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE,MAAM,CAAA;KACnB,GACC;QACE,IAAI,EAAE,UAAU,CAAA;QAChB,YAAY,EAAE,MAAM,CAAA;QACpB,QAAQ,EAAE,MAAM,CAAA;KACnB,CAAA;IACD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAEL,MAAM,MAAM,eAAe,GACvB;IACA,IAAI,EAAE,KAAK,CAAA;IACX,IAAI,EAAE,UAAU,CAAA;IAChB,GAAG,EAAE,UAAU,CAAA;CAChB,GACC;IACA,IAAI,EAAE,KAAK,CAAA;IACX,IAAI,EAAE,UAAU,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAEH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,IAAI,CAAC,EAAE,QAAQ,CAAA;IAEf,QAAQ,CAAC,EAAE;QACT,YAAY,CAAC,EAAE;YACb,MAAM,CAAC,EAAE,eAAe,CAAA;YACxB,EAAE,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAA;SACvB,CAAA;QACD,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB,CAAA;IAED,KAAK,CAAC,EAAE;QACN,GAAG,EAAE,MAAM,CAAA;QACX,IAAI,CAAC,EAAE;YACL,QAAQ,EAAE,MAAM,CAAA;YAChB,QAAQ,EAAE,MAAM,CAAA;SACjB,CAAA;KACF,CAAA;CACF;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,UAAU,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,OAAO,CAAC,EAAE,IAAI,CAAA;QACd,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;QAClB,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAA;KACrC,CAAC,CAAA;IACF,IAAI,EAAE,YAAY,CAAA;IAElB,IAAI,EAAE;QACJ,MAAM,EAAE;YACN,KAAK,EAAE,MAAM,CAAA;YACb,GAAG,EAAE,MAAM,CAAA;SACZ,CAAA;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,MAAM,CAAA;YACf,IAAI,EAAE,MAAM,CAAA;YACZ,KAAK,EAAE,MAAM,CAAA;SACd,CAAA;KACF,CAAA;CACF;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,qBAAqB,CAAA;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,UAAU,GAClB,uBAAuB,GACvB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,UAAU,CAAA;CAAE,GAC5E;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GACzD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtC,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,GACvC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAAA;AAExC,wBAAsB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAEtE;AAED,wBAAsB,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7D"}
\ No newline at end of file
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/dist-js/index.js b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/dist-js/index.js
new file mode 100644
index 000000000..c5f0a1abb
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/dist-js/index.js
@@ -0,0 +1,24 @@
+import { invoke } from '@tauri-apps/api/core';
+
+var MediaType;
+(function (MediaType) {
+ MediaType["TEXT_PLAIN"] = "text/plain";
+ MediaType["TEXT_HTML"] = "text/html";
+ MediaType["TEXT_CSS"] = "text/css";
+ MediaType["TEXT_CSV"] = "text/csv";
+ MediaType["APPLICATION_JSON"] = "application/json";
+ MediaType["APPLICATION_LD_JSON"] = "application/ld+json";
+ MediaType["APPLICATION_XML"] = "application/xml";
+ MediaType["TEXT_XML"] = "text/xml";
+ MediaType["APPLICATION_FORM"] = "application/x-www-form-urlencoded";
+ MediaType["APPLICATION_OCTET"] = "application/octet-stream";
+ MediaType["MULTIPART_FORM"] = "multipart/form-data";
+})(MediaType || (MediaType = {}));
+async function execute(request) {
+ return await invoke('plugin:relay|execute', { request });
+}
+async function cancel(requestId) {
+ return await invoke('plugin:relay|cancel', { requestId });
+}
+
+export { MediaType, cancel, execute };
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/guest-js/index.ts b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/guest-js/index.ts
new file mode 100644
index 000000000..775a17967
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/guest-js/index.ts
@@ -0,0 +1,259 @@
+import { invoke } from '@tauri-apps/api/core'
+
+export type Method =
+ | "GET" // Retrieve resource
+ | "POST" // Create resource
+ | "PUT" // Replace resource
+ | "DELETE" // Remove resource
+ | "PATCH" // Modify resource
+ | "HEAD" // GET without body
+ | "OPTIONS" // Get allowed methods
+ | "CONNECT" // Create tunnel
+ | "TRACE" // Loop-back test
+
+export type Version = "HTTP/1.0" | "HTTP/1.1" | "HTTP/2.0" | "HTTP/3.0"
+
+export type StatusCode =
+ | 100 // Continue
+ | 101 // Switching Protocols
+ | 102 // Processing
+ | 103 // Early Hints
+ | 200 // OK
+ | 201 // Created
+ | 202 // Accepted
+ | 203 // Non-Authoritative Info
+ | 204 // No Content
+ | 205 // Reset Content
+ | 206 // Partial Content
+ | 207 // Multi-Status
+ | 208 // Already Reported
+ | 226 // IM Used
+ | 300 // Multiple Choices
+ | 301 // Moved Permanently
+ | 302 // Found
+ | 303 // See Other
+ | 304 // Not Modified
+ | 305 // Use Proxy
+ | 306 // Switch Proxy
+ | 307 // Temporary Redirect
+ | 308 // Permanent Redirect
+ | 400 // Bad Request
+ | 401 // Unauthorized
+ | 402 // Payment Required
+ | 403 // Forbidden
+ | 404 // Not Found
+ | 405 // Method Not Allowed
+ | 406 // Not Acceptable
+ | 407 // Proxy Auth Required
+ | 408 // Request Timeout
+ | 409 // Conflict
+ | 410 // Gone
+ | 411 // Length Required
+ | 412 // Precondition Failed
+ | 413 // Payload Too Large
+ | 414 // URI Too Long
+ | 415 // Unsupported Media
+ | 416 // Range Not Satisfiable
+ | 417 // Expectation Failed
+ | 418 // I'm a teapot
+ | 421 // Misdirected Request
+ | 422 // Unprocessable Entity
+ | 423 // Locked
+ | 424 // Failed Dependency
+ | 425 // Too Early
+ | 426 // Upgrade Required
+ | 428 // Precondition Required
+ | 429 // Too Many Requests
+ | 431 // Headers Too Large
+ | 451 // Unavailable Legal
+ | 500 // Server Error
+ | 501 // Not Implemented
+ | 502 // Bad Gateway
+ | 503 // Service Unavailable
+ | 504 // Gateway Timeout
+ | 505 // HTTP Ver. Not Supported
+ | 506 // Variant Negotiates
+ | 507 // Insufficient Storage
+ | 508 // Loop Detected
+ | 510 // Not Extended
+ | 511 // Network Auth Required
+
+export type FormDataValue =
+ | { kind: "text"; value: string }
+ | { kind: "file"; filename: string; contentType: string; data: Uint8Array }
+
+export type FormData = Map<string, FormDataValue[]>
+
+export enum MediaType {
+ TEXT_PLAIN = "text/plain",
+ TEXT_HTML = "text/html",
+ TEXT_CSS = "text/css",
+ TEXT_CSV = "text/csv",
+ APPLICATION_JSON = "application/json",
+ APPLICATION_LD_JSON = "application/ld+json",
+ APPLICATION_XML = "application/xml",
+ TEXT_XML = "text/xml",
+ APPLICATION_FORM = "application/x-www-form-urlencoded",
+ APPLICATION_OCTET = "application/octet-stream",
+ MULTIPART_FORM = "multipart/form-data"
+}
+
+export type ContentType =
+ | { kind: "text"; content: string; mediaType: MediaType.TEXT_PLAIN | MediaType.TEXT_HTML | MediaType.TEXT_CSS | MediaType.TEXT_CSV }
+ | { kind: "json"; content: unknown; mediaType: MediaType.APPLICATION_JSON | MediaType.APPLICATION_LD_JSON }
+ | { kind: "xml"; content: string; mediaType: MediaType.APPLICATION_XML | MediaType.TEXT_XML }
+ | { kind: "form"; content: FormData; mediaType: MediaType.APPLICATION_FORM }
+ | { kind: "binary"; content: Uint8Array; mediaType: MediaType.APPLICATION_OCTET | string; filename?: string }
+ | { kind: "multipart"; content: FormData; mediaType: MediaType.MULTIPART_FORM }
+ | { kind: "urlencoded"; content: string; mediaType: MediaType.APPLICATION_FORM }
+ | { kind: "stream"; content: ReadableStream; mediaType: string }
+
+export interface ResponseBody {
+ body: Uint8Array
+ mediaType: MediaType | string
+}
+
+export type AuthType =
+ | { kind: "none" }
+ | { kind: "basic"; username: string; password: string }
+ | { kind: "bearer"; token: string }
+ | {
+ kind: "digest"
+ username: string
+ password: string
+ realm?: string
+ nonce?: string
+ opaque?: string
+ algorithm?: "MD5" | "SHA-256" | "SHA-512"
+ qop?: "auth" | "auth-int"
+ nc?: string
+ cnonce?: string
+ }
+ | {
+ kind: "oauth2"
+ grantType:
+ | {
+ kind: "authorization_code"
+ authEndpoint: string
+ tokenEndpoint: string
+ clientId: string
+ clientSecret?: string
+ }
+ | {
+ kind: "client_credentials"
+ tokenEndpoint: string
+ clientId: string
+ clientSecret?: string
+ }
+ | {
+ kind: "password"
+ tokenEndpoint: string
+ username: string
+ password: string
+ }
+ | {
+ kind: "implicit"
+ authEndpoint: string
+ clientId: string
+ }
+ accessToken?: string
+ refreshToken?: string
+ }
+
+export type CertificateType =
+ | {
+ kind: "pem"
+ cert: Uint8Array
+ key: Uint8Array
+ }
+ | {
+ kind: "pfx"
+ data: Uint8Array
+ password: string
+ }
+
+export interface Request {
+ id: number
+ url: string
+ method: Method
+ version: Version
+ headers?: Record<string, string>
+ params?: Record<string, string>
+ content?: ContentType
+ auth?: AuthType
+
+ security?: {
+ certificates?: {
+ client?: CertificateType
+ ca?: Array<Uint8Array>
+ }
+ verifyHost?: boolean
+ verifyPeer?: boolean
+ }
+
+ proxy?: {
+ url: string
+ auth?: {
+ username: string
+ password: string
+ }
+ }
+}
+
+export interface Response {
+ id: number
+ status: StatusCode
+ statusText: string
+ version: Version
+ headers: Record<string, string>
+ cookies?: Array<{
+ name: string
+ value: string
+ domain?: string
+ path?: string
+ expires?: Date
+ secure?: boolean
+ httpOnly?: boolean
+ sameSite?: 'Strict' | 'Lax' | 'None'
+ }>
+ body: ResponseBody
+
+ meta: {
+ timing: {
+ start: number
+ end: number
+ }
+ size: {
+ headers: number
+ body: number
+ total: number
+ }
+ }
+}
+
+export type UnsupportedFeatureError = {
+ kind: "unsupported_feature"
+ feature: string
+ message: string
+ relay: string
+}
+
+export type RelayError =
+ | UnsupportedFeatureError
+ | { kind: "network"; message: string; cause?: unknown }
+ | { kind: "timeout"; message: string; phase?: "connect" | "tls" | "response" }
+ | { kind: "certificate"; message: string; cause?: unknown }
+ | { kind: "parse"; message: string; cause?: unknown }
+ | { kind: "abort"; message: string }
+
+export type RequestResult =
+ | { kind: 'success'; response: Response }
+ | { kind: 'error'; error: RelayError }
+
+export async function execute(request: Request): Promise<RequestResult> {
+ return await invoke<RequestResult>('plugin:relay|execute', { request })
+}
+
+export async function cancel(requestId: number): Promise<void> {
+ return await invoke<void>('plugin:relay|cancel', { requestId })
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/package.json b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/package.json
new file mode 100644
index 000000000..147115704
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "@CuriousCorrelation/plugin-relay",
+ "version": "0.1.0",
+ "author": "CuriousCorrelation",
+ "description": "An HTTP request-response relay plugin for Tauri apps.",
+ "type": "module",
+ "types": "./dist-js/index.d.ts",
+ "main": "./dist-js/index.cjs",
+ "module": "./dist-js/index.js",
+ "exports": {
+ "types": "./dist-js/index.d.ts",
+ "import": "./dist-js/index.js",
+ "require": "./dist-js/index.cjs"
+ },
+ "files": [
+ "dist-js",
+ "README.md"
+ ],
+ "scripts": {
+ "build": "tsc && rollup -c",
+ "prepublishOnly": "pnpm build",
+ "pretest": "pnpm build"
+ },
+ "dependencies": {
+ "@tauri-apps/api": "^2.0.0"
+ },
+ "devDependencies": {
+ "@rollup/plugin-typescript": "^11.1.6",
+ "rollup": "^4.9.6",
+ "typescript": "^5.3.3",
+ "tslib": "^2.6.2"
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/commands/cancel.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/commands/cancel.toml
new file mode 100644
index 000000000..91efeaa00
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/commands/cancel.toml
@@ -0,0 +1,13 @@
+# Automatically generated - DO NOT EDIT!
+
+"$schema" = "../../schemas/schema.json"
+
+[[permission]]
+identifier = "allow-cancel"
+description = "Enables the cancel command without any pre-configured scope."
+commands.allow = ["cancel"]
+
+[[permission]]
+identifier = "deny-cancel"
+description = "Denies the cancel command without any pre-configured scope."
+commands.deny = ["cancel"]
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/commands/execute.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/commands/execute.toml
new file mode 100644
index 000000000..d98be8993
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/commands/execute.toml
@@ -0,0 +1,13 @@
+# Automatically generated - DO NOT EDIT!
+
+"$schema" = "../../schemas/schema.json"
+
+[[permission]]
+identifier = "allow-execute"
+description = "Enables the execute command without any pre-configured scope."
+commands.allow = ["execute"]
+
+[[permission]]
+identifier = "deny-execute"
+description = "Denies the execute command without any pre-configured scope."
+commands.deny = ["execute"]
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/commands/run.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/commands/run.toml
new file mode 100644
index 000000000..3f5afdecf
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/commands/run.toml
@@ -0,0 +1,13 @@
+# Automatically generated - DO NOT EDIT!
+
+"$schema" = "../../schemas/schema.json"
+
+[[permission]]
+identifier = "allow-run"
+description = "Enables the run command without any pre-configured scope."
+commands.allow = ["run"]
+
+[[permission]]
+identifier = "deny-run"
+description = "Denies the run command without any pre-configured scope."
+commands.deny = ["run"]
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/commands/subscribe.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/commands/subscribe.toml
new file mode 100644
index 000000000..0277f2aec
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/commands/subscribe.toml
@@ -0,0 +1,13 @@
+# Automatically generated - DO NOT EDIT!
+
+"$schema" = "../../schemas/schema.json"
+
+[[permission]]
+identifier = "allow-subscribe"
+description = "Enables the subscribe command without any pre-configured scope."
+commands.allow = ["subscribe"]
+
+[[permission]]
+identifier = "deny-subscribe"
+description = "Denies the subscribe command without any pre-configured scope."
+commands.deny = ["subscribe"]
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/reference.md b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/reference.md
new file mode 100644
index 000000000..d2d880f2f
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/autogenerated/reference.md
@@ -0,0 +1,120 @@
+## Default Permission
+
+Default permissions for the plugin
+
+- `allow-execute`
+- `allow-cancel`
+
+## Permission Table
+
+<table>
+<tr>
+<th>Identifier</th>
+<th>Description</th>
+</tr>
+
+
+<tr>
+<td>
+
+`relay:allow-cancel`
+
+</td>
+<td>
+
+Enables the cancel command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`relay:deny-cancel`
+
+</td>
+<td>
+
+Denies the cancel command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`relay:allow-execute`
+
+</td>
+<td>
+
+Enables the execute command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`relay:deny-execute`
+
+</td>
+<td>
+
+Denies the execute command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`relay:allow-run`
+
+</td>
+<td>
+
+Enables the run command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`relay:deny-run`
+
+</td>
+<td>
+
+Denies the run command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`relay:allow-subscribe`
+
+</td>
+<td>
+
+Enables the subscribe command without any pre-configured scope.
+
+</td>
+</tr>
+
+<tr>
+<td>
+
+`relay:deny-subscribe`
+
+</td>
+<td>
+
+Denies the subscribe command without any pre-configured scope.
+
+</td>
+</tr>
+</table>
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/default.toml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/default.toml
new file mode 100644
index 000000000..0b8243f3f
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/default.toml
@@ -0,0 +1,3 @@
+[default]
+description = "Default permissions for the plugin"
+permissions = ["allow-execute", "allow-cancel"]
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/schemas/schema.json b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/schemas/schema.json
new file mode 100644
index 000000000..eceb0f616
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/permissions/schemas/schema.json
@@ -0,0 +1,345 @@
+{
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "title": "PermissionFile",
+ "description": "Permission file that can define a default permission, a set of permissions or a list of inlined permissions.",
+ "type": "object",
+ "properties": {
+ "default": {
+ "description": "The default permission set for the plugin",
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DefaultPermission"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "set": {
+ "description": "A list of permissions sets defined",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PermissionSet"
+ }
+ },
+ "permission": {
+ "description": "A list of inlined permissions",
+ "default": [],
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Permission"
+ }
+ }
+ },
+ "definitions": {
+ "DefaultPermission": {
+ "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
+ "type": "object",
+ "required": [
+ "permissions"
+ ],
+ "properties": {
+ "version": {
+ "description": "The version of the permission.",
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 1.0
+ },
+ "description": {
+ "description": "Human-readable description of what the permission does. Tauri convention is to use <h4> headings in markdown content for Tauri documentation generation purposes.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "permissions": {
+ "description": "All permissions this set contains.",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "PermissionSet": {
+ "description": "A set of direct permissions grouped together under a new name.",
+ "type": "object",
+ "required": [
+ "description",
+ "identifier",
+ "permissions"
+ ],
+ "properties": {
+ "identifier": {
+ "description": "A unique identifier for the permission.",
+ "type": "string"
+ },
+ "description": {
+ "description": "Human-readable description of what the permission does.",
+ "type": "string"
+ },
+ "permissions": {
+ "description": "All permissions this set contains.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/PermissionKind"
+ }
+ }
+ }
+ },
+ "Permission": {
+ "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
+ "type": "object",
+ "required": [
+ "identifier"
+ ],
+ "properties": {
+ "version": {
+ "description": "The version of the permission.",
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "uint64",
+ "minimum": 1.0
+ },
+ "identifier": {
+ "description": "A unique identifier for the permission.",
+ "type": "string"
+ },
+ "description": {
+ "description": "Human-readable description of what the permission does. Tauri internal convention is to use <h4> headings in markdown content for Tauri documentation generation purposes.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "commands": {
+ "description": "Allowed or denied commands when using this permission.",
+ "default": {
+ "allow": [],
+ "deny": []
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/Commands"
+ }
+ ]
+ },
+ "scope": {
+ "description": "Allowed or denied scoped when using this permission.",
+ "allOf": [
+ {
+ "$ref": "#/definitions/Scopes"
+ }
+ ]
+ },
+ "platforms": {
+ "description": "Target platforms this permission applies. By default all platforms are affected by this permission.",
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/definitions/Target"
+ }
+ }
+ }
+ },
+ "Commands": {
+ "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
+ "type": "object",
+ "properties": {
+ "allow": {
+ "description": "Allowed command.",
+ "default": [],
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "deny": {
+ "description": "Denied command, which takes priority.",
+ "default": [],
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "Scopes": {
+ "description": "An argument for fine grained behavior control of Tauri commands.\n\nIt can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.\n\n## Example\n\n```json { \"allow\": [{ \"path\": \"$HOME/**\" }], \"deny\": [{ \"path\": \"$HOME/secret.txt\" }] } ```",
+ "type": "object",
+ "properties": {
+ "allow": {
+ "description": "Data that defines what is allowed by the scope.",
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/definitions/Value"
+ }
+ },
+ "deny": {
+ "description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.",
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "$ref": "#/definitions/Value"
+ }
+ }
+ }
+ },
+ "Value": {
+ "description": "All supported ACL values.",
+ "anyOf": [
+ {
+ "description": "Represents a null JSON value.",
+ "type": "null"
+ },
+ {
+ "description": "Represents a [`bool`].",
+ "type": "boolean"
+ },
+ {
+ "description": "Represents a valid ACL [`Number`].",
+ "allOf": [
+ {
+ "$ref": "#/definitions/Number"
+ }
+ ]
+ },
+ {
+ "description": "Represents a [`String`].",
+ "type": "string"
+ },
+ {
+ "description": "Represents a list of other [`Value`]s.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/Value"
+ }
+ },
+ {
+ "description": "Represents a map of [`String`] keys to [`Value`]s.",
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/Value"
+ }
+ }
+ ]
+ },
+ "Number": {
+ "description": "A valid ACL number.",
+ "anyOf": [
+ {
+ "description": "Represents an [`i64`].",
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "description": "Represents a [`f64`].",
+ "type": "number",
+ "format": "double"
+ }
+ ]
+ },
+ "Target": {
+ "description": "Platform target.",
+ "oneOf": [
+ {
+ "description": "MacOS.",
+ "type": "string",
+ "enum": [
+ "macOS"
+ ]
+ },
+ {
+ "description": "Windows.",
+ "type": "string",
+ "enum": [
+ "windows"
+ ]
+ },
+ {
+ "description": "Linux.",
+ "type": "string",
+ "enum": [
+ "linux"
+ ]
+ },
+ {
+ "description": "Android.",
+ "type": "string",
+ "enum": [
+ "android"
+ ]
+ },
+ {
+ "description": "iOS.",
+ "type": "string",
+ "enum": [
+ "iOS"
+ ]
+ }
+ ]
+ },
+ "PermissionKind": {
+ "type": "string",
+ "oneOf": [
+ {
+ "description": "Enables the cancel command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-cancel"
+ },
+ {
+ "description": "Denies the cancel command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-cancel"
+ },
+ {
+ "description": "Enables the execute command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-execute"
+ },
+ {
+ "description": "Denies the execute command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-execute"
+ },
+ {
+ "description": "Enables the run command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-run"
+ },
+ {
+ "description": "Denies the run command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-run"
+ },
+ {
+ "description": "Enables the subscribe command without any pre-configured scope.",
+ "type": "string",
+ "const": "allow-subscribe"
+ },
+ {
+ "description": "Denies the subscribe command without any pre-configured scope.",
+ "type": "string",
+ "const": "deny-subscribe"
+ },
+ {
+ "description": "Default permissions for the plugin",
+ "type": "string",
+ "const": "default"
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/pnpm-lock.yaml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/pnpm-lock.yaml
new file mode 100644
index 000000000..d027d43fe
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/pnpm-lock.yaml
@@ -0,0 +1,325 @@
+lockfileVersion: '9.0'
+
+settings:
+ autoInstallPeers: true
+ excludeLinksFromLockfile: false
+
+importers:
+
+ .:
+ dependencies:
+ '@tauri-apps/api':
+ specifier: '>=2.0.0-beta.6'
+ version: 2.1.1
+ devDependencies:
+ '@rollup/plugin-typescript':
+ specifier: ^11.1.6
+ rollup:
+ specifier: ^4.9.6
+ version: 4.27.4
+ tslib:
+ specifier: ^2.6.2
+ version: 2.8.1
+ typescript:
+ specifier: ^5.3.3
+ version: 5.7.2
+
+packages:
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==}
+ engines: {node: '>=14.0.0'}
+ peerDependencies:
+ rollup: ^2.14.0||^3.0.0||^4.0.0
+ tslib: '*'
+ typescript: '>=3.7.0'
+ peerDependenciesMeta:
+ rollup:
+ optional: true
+ tslib:
+ optional: true
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==}
+ engines: {node: '>=14.0.0'}
+ peerDependencies:
+ rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
+ peerDependenciesMeta:
+ rollup:
+ optional: true
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-2Y3JT6f5MrQkICUyRVCw4oa0sutfAsgaSsb0Lmmy1Wi2y7X5vT9Euqw4gOsCyy0YfKURBg35nhUKZS4mDcfULw==}
+ cpu: [arm]
+ os: [android]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-wzKRQXISyi9UdCVRqEd0H4cMpzvHYt1f/C3CoIjES6cG++RHKhrBj2+29nPF0IB5kpy9MS71vs07fvrNGAl/iA==}
+ cpu: [arm64]
+ os: [android]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-PlNiRQapift4LNS8DPUHuDX/IdXiLjf8mc5vdEmUR0fF/pyy2qWwzdLjB+iZquGr8LuN4LnUoSEvKRwjSVYz3Q==}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-o9bH2dbdgBDJaXWJCDTNDYa171ACUdzpxSZt+u/AAeQ20Nk5x+IhA+zsGmrQtpkLiumRJEYef68gcpn2ooXhSQ==}
+ cpu: [x64]
+ os: [darwin]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-NBI2/i2hT9Q+HySSHTBh52da7isru4aAAo6qC3I7QFVsuhxi2gM8t/EI9EVcILiHLj1vfi+VGGPaLOUENn7pmw==}
+ cpu: [arm64]
+ os: [freebsd]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-wYcC5ycW2zvqtDYrE7deary2P2UFmSh85PUpAx+dwTCO9uw3sgzD6Gv9n5X4vLaQKsrfTSZZ7Z7uynQozPVvWA==}
+ cpu: [x64]
+ os: [freebsd]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-9OwUnK/xKw6DyRlgx8UizeqRFOfi9mf5TYCw1uolDaJSbUmBxP85DE6T4ouCMoN6pXw8ZoTeZCSEfSaYo+/s1w==}
+ cpu: [arm]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-Vgdo4fpuphS9V24WOV+KwkCVJ72u7idTgQaBoLRD0UxBAWTF9GWurJO9YD9yh00BzbkhpeXtm6na+MvJU7Z73A==}
+ cpu: [arm]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-pleyNgyd1kkBkw2kOqlBx+0atfIIkkExOTiifoODo6qKDSpnc6WzUY5RhHdmTdIJXBdSnh6JknnYTtmQyobrVg==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-caluiUXvUuVyCHr5DxL8ohaaFFzPGmgmMvwmqAITMpV/Q+tPoaHZ/PWa3t8B2WyoRcIIuu1hkaW5KkeTDNSnMA==}
+ cpu: [arm64]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-FScrpHrO60hARyHh7s1zHE97u0KlT/RECzCKAdmI+LEoC1eDh/RDji9JgFqyO+wPDb86Oa/sXkily1+oi4FzJQ==}
+ cpu: [ppc64]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-qyyprhyGb7+RBfMPeww9FlHwKkCXdKHeGgSqmIXw9VSUtvyFZ6WZRtnxgbuz76FK7LyoN8t/eINRbPUcvXB5fw==}
+ cpu: [riscv64]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-PFz+y2kb6tbh7m3A7nA9++eInGcDVZUACulf/KzDtovvdTizHpZaJty7Gp0lFwSQcrnebHOqxF1MaKZd7psVRg==}
+ cpu: [s390x]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-Ni8mMtfo+o/G7DVtweXXV/Ol2TFf63KYjTtoZ5f078AUgJTmaIJnj4JFU7TK/9SVWTaSJGxPi5zMDgK4w+Ez7Q==}
+ cpu: [x64]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-5AeeAF1PB9TUzD+3cROzFTnAJAcVUGLuR8ng0E0WXGkYhp6RD6L+6szYVX+64Rs0r72019KHZS1ka1q+zU/wUw==}
+ cpu: [x64]
+ os: [linux]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-yOpVsA4K5qVwu2CaS3hHxluWIK5HQTjNV4tWjQXluMiiiu4pJj4BN98CvxohNCpcjMeTXk/ZMJBRbgRg8HBB6A==}
+ cpu: [arm64]
+ os: [win32]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-KtwEJOaHAVJlxV92rNYiG9JQwQAdhBlrjNRp7P9L8Cb4Rer3in+0A+IPhJC9y68WAi9H0sX4AiG2NTsVlmqJeQ==}
+ cpu: [ia32]
+ os: [win32]
+
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-3j4jx1TppORdTAoBJRd+/wJRGCPC0ETWkXOecJ6PPZLj6SptXkrXcNqdj0oclbKML6FkQltdz7bBA3rUSirZug==}
+ cpu: [x64]
+ os: [win32]
+
+ '@tauri-apps/[email protected]':
+ resolution: {integrity: sha512-fzUfFFKo4lknXGJq8qrCidkUcKcH2UHhfaaCNt4GzgzGaW2iS26uFOg4tS3H4P8D6ZEeUxtiD5z0nwFF0UN30A==}
+
+ '@types/[email protected]':
+ resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==}
+
+ resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
+
+ resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
+ engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
+ os: [darwin]
+
+ resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
+
+ resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
+ engines: {node: '>= 0.4'}
+
+ resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==}
+ engines: {node: '>= 0.4'}
+
+ resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
+
+ resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
+ engines: {node: '>=12'}
+
+ resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==}
+ hasBin: true
+
+ resolution: {integrity: sha512-RLKxqHEMjh/RGLsDxAEsaLO3mWgyoU6x9w6n1ikAzet4B3gI2/3yP6PWY2p9QzRTh6MfEIXB3MwsOY0Iv3vNrw==}
+ engines: {node: '>=18.0.0', npm: '>=8.0.0'}
+ hasBin: true
+
+ resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
+ engines: {node: '>= 0.4'}
+
+ resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
+
+ resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==}
+ engines: {node: '>=14.17'}
+ hasBin: true
+
+snapshots:
+
+ dependencies:
+ '@rollup/pluginutils': 5.1.3([email protected])
+ resolve: 1.22.8
+ typescript: 5.7.2
+ optionalDependencies:
+ rollup: 4.27.4
+ tslib: 2.8.1
+
+ dependencies:
+ '@types/estree': 1.0.6
+ estree-walker: 2.0.2
+ picomatch: 4.0.2
+ optionalDependencies:
+ rollup: 4.27.4
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@rollup/[email protected]':
+ optional: true
+
+ '@tauri-apps/[email protected]': {}
+
+ '@types/[email protected]': {}
+
+
+ optional: true
+
+
+ dependencies:
+ function-bind: 1.1.2
+
+ dependencies:
+ hasown: 2.0.2
+
+
+
+ dependencies:
+ is-core-module: 2.15.1
+ path-parse: 1.0.7
+ supports-preserve-symlinks-flag: 1.0.0
+
+ dependencies:
+ '@types/estree': 1.0.6
+ optionalDependencies:
+ '@rollup/rollup-android-arm-eabi': 4.27.4
+ '@rollup/rollup-android-arm64': 4.27.4
+ '@rollup/rollup-darwin-arm64': 4.27.4
+ '@rollup/rollup-darwin-x64': 4.27.4
+ '@rollup/rollup-freebsd-arm64': 4.27.4
+ '@rollup/rollup-freebsd-x64': 4.27.4
+ '@rollup/rollup-linux-arm-gnueabihf': 4.27.4
+ '@rollup/rollup-linux-arm-musleabihf': 4.27.4
+ '@rollup/rollup-linux-arm64-gnu': 4.27.4
+ '@rollup/rollup-linux-arm64-musl': 4.27.4
+ '@rollup/rollup-linux-powerpc64le-gnu': 4.27.4
+ '@rollup/rollup-linux-riscv64-gnu': 4.27.4
+ '@rollup/rollup-linux-s390x-gnu': 4.27.4
+ '@rollup/rollup-linux-x64-gnu': 4.27.4
+ '@rollup/rollup-linux-x64-musl': 4.27.4
+ '@rollup/rollup-win32-arm64-msvc': 4.27.4
+ '@rollup/rollup-win32-ia32-msvc': 4.27.4
+ '@rollup/rollup-win32-x64-msvc': 4.27.4
+ fsevents: 2.3.3
+
+
+
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/rollup.config.js b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/rollup.config.js
new file mode 100644
index 000000000..d83436352
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/rollup.config.js
@@ -0,0 +1,31 @@
+import { readFileSync } from 'fs'
+import { join } from 'path'
+import { cwd } from 'process'
+import typescript from '@rollup/plugin-typescript'
+
+const pkg = JSON.parse(readFileSync(join(cwd(), 'package.json'), 'utf8'))
+
+export default {
+ input: 'guest-js/index.ts',
+ output: [
+ {
+ file: pkg.exports.import,
+ format: 'esm'
+ },
+ {
+ file: pkg.exports.require,
+ format: 'cjs'
+ }
+ ],
+ plugins: [
+ typescript({
+ declaration: true,
+ declarationDir: `./${pkg.exports.import.split('/')[0]}`
+ })
+ ],
+ external: [
+ /^@tauri-apps\/api/,
+ ...Object.keys(pkg.dependencies || {}),
+ ...Object.keys(pkg.peerDependencies || {})
+ ]
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/commands.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/commands.rs
new file mode 100644
index 000000000..73da002ef
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/commands.rs
@@ -0,0 +1,38 @@
+use crate::{models::*, RelayExt, Result};
+use tauri::{command, AppHandle, Runtime};
+
+#[command]
+pub(crate) async fn execute<R: Runtime>(
+ app: AppHandle<R>,
+ request: RunRequest,
+) -> Result<ExecuteResponse> {
+ tracing::debug!(?request, "Received execute command");
+ let response = app.relay().execute(request).await;
+
+ match &response {
+ Ok(_) => {
+ tracing::info!("Execute command completed successfully");
+ }
+ Err(e) => {
+ tracing::error!(?e, "Execute command failed");
+ }
+ }
+
+ response
+}
+
+#[command]
+pub(crate) async fn cancel<R: Runtime>(
+ app: AppHandle<R>,
+ request_id: CancelRequest,
+) -> Result<CancelResponse> {
+ tracing::debug!(?request_id, "Received cancel command");
+ let response = app.relay().cancel(request_id).await;
+
+ match &response {
+ Ok(_) => tracing::info!("Cancel command completed successfully"),
+ Err(e) => tracing::error!(?e, "Cancel command failed"),
+ }
+
+ response
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/desktop.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/desktop.rs
new file mode 100644
index 000000000..25c597b39
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/desktop.rs
@@ -0,0 +1,42 @@
+use crate::{models::*, Result};
+use serde::de::DeserializeOwned;
+use tauri::{plugin::PluginApi, AppHandle, Runtime};
+
+pub fn init<R: Runtime, C: DeserializeOwned>(
+ app: &AppHandle<R>,
+ _api: PluginApi<R, C>,
+) -> Result<Relay<R>> {
+ tracing::debug!("Initializing Relay for desktop platform");
+ Ok(Relay(app.clone()))
+}
+
+pub struct Relay<R: Runtime>(AppHandle<R>);
+
+impl<R: Runtime> Relay<R> {
+ pub async fn execute(&self, request: RunRequest) -> Result<ExecuteResponse> {
+ tracing::debug!(?request, "Executing request");
+
+ match relay::execute(request).await {
+ Ok(response) => {
+ tracing::debug!("Request executed successfully");
+ Ok(ExecuteResponse::Success { response })
+ }
+ Err(error) => {
+ tracing::error!(?error, "Request execution failed");
+ Ok(ExecuteResponse::Error { error })
+ }
+ }
+ }
+
+ pub async fn cancel(&self, request_id: CancelRequest) -> Result<CancelResponse> {
+ tracing::debug!(?request_id, "Cancelling request");
+
+ if let Err(e) = relay::cancel(request_id).await {
+ tracing::error!(?e, "Request cancellation failed");
+ return Err(e.into());
+ }
+
+ tracing::debug!("Request cancelled successfully");
+ Ok(())
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/error.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/error.rs
new file mode 100644
index 000000000..00cccbbf7
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/error.rs
@@ -0,0 +1,24 @@
+use serde::{ser::Serializer, Serialize};
+
+pub type Result<T> = std::result::Result<T, Error>;
+
+#[derive(Debug, thiserror::Error)]
+pub enum Error {
+ #[error(transparent)]
+ Io(#[from] std::io::Error),
+ #[error(transparent)]
+ Relay(#[from] relay::error::RelayError),
+ #[cfg(mobile)]
+ #[error(transparent)]
+ PluginInvoke(#[from] tauri::plugin::mobile::PluginInvokeError),
+}
+
+impl Serialize for Error {
+ fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ tracing::error!(?self, "Serializing error");
+ serializer.serialize_str(self.to_string().as_ref())
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/lib.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/lib.rs
new file mode 100644
index 000000000..9b88b83b7
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/lib.rs
@@ -0,0 +1,66 @@
+use tauri::{
+ plugin::{Builder, TauriPlugin},
+ Manager, Runtime,
+};
+
+pub use models::*;
+
+#[cfg(desktop)]
+mod desktop;
+#[cfg(mobile)]
+mod mobile;
+
+mod commands;
+mod error;
+mod models;
+
+pub use error::{Error, Result};
+
+#[cfg(desktop)]
+use desktop::Relay;
+#[cfg(mobile)]
+use mobile::Relay;
+
+pub trait RelayExt<R: Runtime> {
+ fn relay(&self) -> &Relay<R>;
+}
+
+impl<R: Runtime, T: Manager<R>> crate::RelayExt<R> for T {
+ fn relay(&self) -> &Relay<R> {
+ tracing::trace!("Accessing Relay state");
+ self.state::<Relay<R>>().inner()
+ }
+}
+
+pub fn init<R: Runtime>() -> TauriPlugin<R> {
+ tracing::info!("Beginning relay plugin initialization");
+
+ Builder::new("relay")
+ .invoke_handler(tauri::generate_handler![
+ commands::execute,
+ commands::cancel
+ ])
+ .setup(|app, api| {
+ tracing::info!("Setting up relay plugin");
+
+ #[cfg(mobile)]
+ {
+ tracing::debug!("Initializing mobile-specific components");
+ let relay = mobile::init(app, api)?;
+ tracing::debug!("Mobile components initialized successfully");
+ app.manage(relay);
+ }
+
+ #[cfg(desktop)]
+ {
+ tracing::debug!("Initializing desktop-specific components");
+ let relay = desktop::init(app, api)?;
+ tracing::debug!("Desktop components initialized successfully");
+ app.manage(relay);
+ }
+
+ tracing::info!("relay plugin setup complete");
+ Ok(())
+ })
+ .build()
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/mobile.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/mobile.rs
new file mode 100644
index 000000000..07e385064
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/mobile.rs
@@ -0,0 +1,48 @@
+use serde::de::DeserializeOwned;
+use tauri::{
+ plugin::{PluginApi, PluginHandle},
+ AppHandle, Runtime,
+};
+
+use crate::models::*;
+
+#[cfg(target_os = "ios")]
+tauri::ios_plugin_binding!(init_plugin_relay);
+
+pub fn init<R: Runtime, C: DeserializeOwned>(
+ _app: &AppHandle<R>,
+ api: PluginApi<R, C>,
+) -> crate::Result<Relay<R>> {
+ tracing::debug!("Initializing Relay for mobile platform");
+
+ #[cfg(target_os = "android")]
+ let handle = {
+ tracing::debug!("Registering Android plugin");
+ api.register_android_plugin("", "ExamplePlugin")?
+ };
+
+ #[cfg(target_os = "ios")]
+ let handle = {
+ tracing::debug!("Registering iOS plugin");
+ api.register_ios_plugin(init_plugin_relay)?
+ };
+
+ tracing::info!("Mobile plugin initialization complete");
+ Ok(Relay(handle))
+}
+
+pub struct Relay<R: Runtime>(PluginHandle<R>);
+
+impl<R: Runtime> Relay<R> {
+ pub fn run(&self, request: RunRequest) -> crate::Result<ExecuteResponse> {
+ tracing::debug!(?request, "Running mobile plugin");
+ let result = self.0.run_mobile_plugin("run", request);
+
+ match &result {
+ Ok(_) => tracing::debug!("Mobile plugin execution successful"),
+ Err(e) => tracing::error!(?e, "Mobile plugin execution failed"),
+ }
+
+ result.map_err(Into::into)
+ }
+}
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/models.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/models.rs
new file mode 100644
index 000000000..6e104afa4
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/src/models.rs
@@ -0,0 +1,17 @@
+use relay::{error::RelayError, Request as RelayRequest, Response as RelayResponse};
+use serde::{Deserialize, Serialize};
+
+pub type RunRequest = RelayRequest;
+
+#[derive(Debug, Serialize, Deserialize)]
+#[serde(tag = "kind")]
+pub enum ExecuteResponse {
+ #[serde(rename = "success")]
+ Success { response: RelayResponse },
+ #[serde(rename = "error")]
+ Error { error: RelayError },
+}
+
+pub type CancelRequest = i64;
+
+pub type CancelResponse = ();
diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/tsconfig.json b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/tsconfig.json
new file mode 100644
index 000000000..bee11eace
--- /dev/null
+++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/tsconfig.json
@@ -0,0 +1,17 @@
+{
+ "compilerOptions": {
+ "target": "es2021",
+ "module": "esnext",
+ "moduleResolution": "bundler",
+ "skipLibCheck": true,
+ "strict": true,
+ "noUnusedLocals": true,
+ "noImplicitAny": true,
+ "noEmit": true,
+ "declaration": true,
+ "declarationMap": true,
+ "outDir": "dist-js"
+ },
+ "include": ["guest-js/*.ts"],
+ "exclude": ["dist-js", "node_modules"]
+}
diff --git a/packages/hoppscotch-desktop/postcss.config.js b/packages/hoppscotch-desktop/postcss.config.js
new file mode 100644
index 000000000..2e7af2b7f
--- /dev/null
+++ b/packages/hoppscotch-desktop/postcss.config.js
@@ -0,0 +1,6 @@
+export default {
+ plugins: {
+ tailwindcss: {},
+ autoprefixer: {},
+ },
+}
diff --git a/packages/hoppscotch-desktop/public/favicon.ico b/packages/hoppscotch-desktop/public/favicon.ico
new file mode 100644
index 000000000..741183600
Binary files /dev/null and b/packages/hoppscotch-desktop/public/favicon.ico differ
diff --git a/packages/hoppscotch-desktop/public/images/add_group.svg b/packages/hoppscotch-desktop/public/images/add_group.svg
new file mode 100644
index 000000000..4350ea15c
--- /dev/null
+++ b/packages/hoppscotch-desktop/public/images/add_group.svg
@@ -0,0 +1,37 @@
+<svg width="117" height="120" viewBox="0 0 117 120" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M104.634 68.6831C104.634 80.1972 100.53 90.6702 93.6709 98.8771C85.0353 109.228 72.0513 115.781 57.4749 115.781C43.511 115.781 31.0169 109.717 22.3813 100.102C14.9706 91.7726 10.4385 80.7484 10.4385 68.6831C10.4385 42.6538 31.5069 21.5854 57.5361 21.5854C83.5654 21.5854 104.634 42.6538 104.634 68.6831Z" stroke="#737373" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="4 4"/>
+<path d="M74.8781 71.7725C74.5226 73.2834 73.9893 74.8833 73.3671 76.2164C71.6785 79.5049 69.0121 82.0824 65.7236 83.7711C62.3462 85.4598 58.3467 86.1708 54.3471 85.282C44.926 83.3267 38.8823 74.0833 40.8376 64.6622C42.7929 55.2411 51.9474 49.1085 61.3685 51.1527C64.7459 51.8637 67.6789 53.5524 70.1675 55.8632C74.3448 60.0405 76.1224 66.0843 74.8781 71.7725Z" fill="#737373" stroke="#a3a3a3" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M63.4127 66.7063H60.4132C59.8609 66.7063 59.4132 66.2586 59.4132 65.7063V62.7067C59.4132 61.9068 58.791 61.1958 57.9023 61.1958C57.1024 61.1958 56.3913 61.818 56.3913 62.7067V65.7063C56.3913 66.2586 55.9436 66.7063 55.3913 66.7063H52.3918C51.5919 66.7063 50.8809 67.3284 50.8809 68.2172C50.8809 69.106 51.503 69.7281 52.3918 69.7281H55.3913C55.9436 69.7281 56.3913 70.1759 56.3913 70.7281V73.7277C56.3913 74.5276 57.0135 75.2386 57.9023 75.2386C58.7022 75.2386 59.4132 74.6165 59.4132 73.7277V70.7281C59.4132 70.1759 59.8609 69.7281 60.4132 69.7281H63.4127C64.2126 69.7281 64.9237 69.106 64.9237 68.2172C64.9237 67.3284 64.2126 66.7063 63.4127 66.7063Z" fill="#525252"/>
+<path d="M78.3516 21.6057C78.3516 27.1603 76.1318 32.0976 72.6787 35.8007C72.4321 36.171 72.0621 36.4178 71.6921 36.6647C67.9924 40.1209 63.0594 42.2192 57.6332 42.2192C53.3169 42.2192 49.2472 40.8615 45.9174 38.5162C44.9308 37.899 44.0675 37.035 43.2043 36.2944C39.3812 32.5914 37.0381 27.4071 37.0381 21.6057C37.0381 10.2498 46.2874 0.992188 57.6332 0.992188C69.1023 0.992188 78.3516 10.2498 78.3516 21.6057Z" fill="black"/>
+<path d="M78.3516 21.6043C78.3516 27.6526 75.7618 32.9603 71.6921 36.7868C67.9924 40.2429 63.0594 42.3413 57.6332 42.3413C53.3169 42.3413 49.2472 40.9835 45.9174 38.6383C40.4912 34.9353 37.0381 28.7635 37.0381 21.7278C37.0381 10.3718 46.2874 1.11426 57.6332 1.11426C68.979 1.11426 78.3516 10.2484 78.3516 21.6043Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M72.679 35.8005C72.4324 36.1708 72.0624 36.4176 71.6924 36.6645C67.9927 40.1207 63.0597 42.219 57.6335 42.219C53.3172 42.219 49.2475 40.8613 45.9177 38.516C44.9311 37.8988 44.0679 37.0348 43.2046 36.2942C43.6979 35.677 44.4378 35.3067 46.041 34.6895L46.6577 34.4427C47.8909 33.9489 49.6174 33.3318 51.8373 32.3443C52.2072 32.2209 52.4539 31.974 52.7005 31.7271C52.8239 31.6037 52.9472 31.4803 52.9472 31.2334C53.0705 30.9865 53.1938 30.6162 53.1938 30.3693V26.1726C53.0705 26.0492 53.0705 26.0492 52.9472 25.9257C52.5772 25.432 52.3306 24.8148 52.3306 24.0742L52.0839 23.9508C50.974 24.1976 51.0973 23.0867 50.8507 20.8649C50.7274 20.0009 50.8507 19.754 51.344 19.6306L51.7139 19.1368C50.974 17.4088 50.604 15.8041 50.604 14.5698C50.604 12.4714 51.4673 11.1136 52.7005 10.4964C51.9606 9.01522 51.9606 8.52148 51.9606 8.52148C51.9606 8.52148 56.2769 9.26209 57.7568 9.01522C59.6067 8.64492 62.5664 9.13866 63.6764 11.6073C65.5262 12.3479 66.1428 13.4589 66.3895 14.6932C66.6361 16.6681 65.5262 18.7665 65.2796 19.6306V19.754C65.5262 19.8774 65.6495 20.1243 65.5262 20.9883C65.2796 23.0867 65.2796 24.3211 64.293 24.0742L63.3064 25.8023C63.3064 26.0492 63.3064 26.0492 63.1831 26.1726C63.1831 26.5429 63.1831 27.1601 63.1831 30.4928C63.1831 30.8631 63.3064 31.3568 63.553 31.6037C63.6764 31.7271 63.6764 31.8506 63.7997 31.8506C64.0463 32.0974 64.293 32.3443 64.5396 32.3443C67.0061 33.3318 68.7326 34.0724 70.0892 34.5661C71.3224 35.0599 72.1857 35.4302 72.679 35.8005Z" fill="#1f1f1f"/>
+<path d="M72.679 35.8004C72.4324 36.1707 72.0624 36.4176 71.6924 36.6644C67.9927 40.1206 63.0597 42.219 57.6335 42.219C53.3172 42.219 49.2475 40.8612 45.9177 38.5159C44.9311 37.8988 44.0679 37.0347 43.2046 36.2941C43.6979 35.6769 44.4378 35.3066 46.041 34.6895L46.6577 34.4426C47.8909 33.9489 49.6174 33.3317 51.8373 32.3442C52.2072 32.2208 52.4539 31.9739 52.7005 31.7271C53.9338 33.4551 55.907 34.566 58.2501 34.566C60.4699 34.566 62.4431 33.4551 63.6764 31.8505C63.923 32.0974 64.1697 32.3442 64.4163 32.3442C66.8828 33.3317 68.6093 34.0723 69.9659 34.566C71.3224 35.0598 72.1857 35.4301 72.679 35.8004Z" fill="#737373"/>
+<path d="M65.1564 19.5071C65.2797 19.0134 65.0331 18.2728 64.7864 17.9025C64.7864 17.7791 64.6631 17.7791 64.6631 17.6556C63.7999 15.9275 61.95 15.3104 60.2235 15.1869C55.6605 14.9401 55.2905 15.8041 53.9339 14.5698C54.4272 15.1869 54.4272 16.2978 53.6873 17.5322C53.194 18.3962 52.3307 18.89 51.4675 19.1368C49.371 14.4463 50.4809 11.4839 52.454 10.4964C51.7141 9.01522 51.7141 8.52148 51.7141 8.52148C51.7141 8.52148 56.0304 9.26209 57.5103 9.01522C59.3602 8.64492 62.32 9.13866 63.4299 11.6073C65.2797 12.3479 65.8964 13.4589 66.143 14.6932C66.513 16.5447 65.4031 18.6431 65.1564 19.5071Z" fill="#a3a3a3"/>
+<path d="M53.317 30.3692V26.1724C53.1936 26.049 53.1936 26.049 53.0703 25.9256V25.6787C53.317 26.049 53.5636 26.4193 53.9336 26.6662L57.2633 29.0114C58.0033 29.6286 59.1132 29.6286 59.8531 29.0114L62.9362 26.2959C63.0595 26.1724 63.1829 26.1724 63.3062 26.049C63.3062 26.4193 63.3062 27.0365 63.3062 30.3692C63.3062 30.6161 63.3062 30.7395 63.4295 30.9864H53.317C53.1936 30.7395 53.317 30.6161 53.317 30.3692Z" fill="url(#paint0_linear)"/>
+<path d="M115.285 97.8074C115.285 103.362 113.065 108.299 109.612 112.002C109.365 112.373 108.995 112.619 108.625 112.866C104.925 116.323 99.9925 118.421 94.5663 118.421C90.25 118.421 86.1803 117.063 82.8505 114.718C81.8639 114.101 81.0007 113.237 80.1374 112.496C76.3143 108.793 73.9712 103.609 73.9712 97.8074C73.9712 86.4514 83.2205 77.1938 94.5663 77.1938C106.035 77.1938 115.285 86.4514 115.285 97.8074Z" fill="black"/>
+<path d="M115.285 97.8065C115.285 103.855 112.695 109.162 108.625 112.989C104.925 116.445 99.9925 118.543 94.5663 118.543C90.25 118.543 86.1803 117.186 82.8505 114.84C77.4243 111.137 73.9712 104.966 73.9712 97.9299C73.9712 86.574 83.2205 77.3164 94.5663 77.3164C105.912 77.3164 115.285 86.4505 115.285 97.8065Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M109.613 112.003C109.366 112.373 108.996 112.62 108.626 112.867C104.927 116.323 99.9938 118.421 94.5676 118.421C90.2512 118.421 86.1815 117.063 82.8518 114.718C81.8652 114.101 81.0019 113.237 80.1387 112.496C80.632 111.879 81.3719 111.509 82.9751 110.892L83.5917 110.645C84.825 110.151 86.5515 109.534 88.7713 108.546C89.1413 108.423 89.388 108.176 89.6346 107.929C89.7579 107.806 89.8813 107.682 89.8813 107.436C90.0046 107.189 90.1279 106.818 90.1279 106.571V102.375C90.0046 102.251 90.0046 102.251 89.8813 102.128C89.5113 101.634 89.2646 101.017 89.2646 100.276L89.018 100.153C87.9081 100.4 88.0314 99.2889 87.7848 97.0671C87.6614 96.203 87.7848 95.9562 88.278 95.8327L88.648 95.339C87.9081 93.6109 87.5381 92.0063 87.5381 90.7719C87.5381 88.6735 88.4014 87.3158 89.6346 86.6986C88.8947 85.2174 88.8947 84.7236 88.8947 84.7236C88.8947 84.7236 93.211 85.4642 94.6909 85.2174C96.5408 84.8471 99.5005 85.3408 100.61 87.8095C102.46 88.5501 103.077 89.661 103.324 90.8953C103.57 92.8703 102.46 94.9687 102.214 95.8327V95.9562C102.46 96.0796 102.584 96.3265 102.46 97.1905C102.214 99.2889 102.214 100.523 101.227 100.276L100.24 102.004C100.24 102.251 100.24 102.251 100.117 102.375C100.117 102.745 100.117 103.362 100.117 106.695C100.117 107.065 100.24 107.559 100.487 107.806C100.61 107.929 100.61 108.053 100.734 108.053C100.98 108.3 101.227 108.546 101.474 108.546C103.94 109.534 105.667 110.275 107.023 110.768C108.257 111.262 109.12 111.632 109.613 112.003Z" fill="#1f1f1f"/>
+<path d="M109.612 112.003C109.365 112.373 108.995 112.62 108.626 112.867C104.926 116.323 99.9928 118.421 94.5666 118.421C90.2503 118.421 86.1806 117.063 82.8508 114.718C81.8642 114.101 81.001 113.237 80.1377 112.496C80.631 111.879 81.3709 111.509 82.9741 110.892L83.5908 110.645C84.824 110.151 86.5505 109.534 88.7704 108.546C89.1403 108.423 89.387 108.176 89.6336 107.929C90.8669 109.657 92.8401 110.768 95.1832 110.768C97.403 110.768 99.3762 109.657 100.609 108.053C100.856 108.3 101.103 108.546 101.349 108.546C103.816 109.534 105.542 110.274 106.899 110.768C108.256 111.262 109.119 111.632 109.612 112.003Z" fill="#737373"/>
+<path d="M102.09 95.7093C102.213 95.2155 101.966 94.4749 101.72 94.1046C101.72 93.9812 101.596 93.9812 101.596 93.8578C100.733 92.1297 98.8831 91.5125 97.1566 91.3891C92.5936 91.1422 92.2236 92.0063 90.867 90.7719C91.3603 91.3891 91.3603 92.5 90.6204 93.7343C90.1271 94.5984 89.2638 95.0921 88.4006 95.339C86.3041 90.6485 87.414 87.6861 89.3872 86.6986C88.6472 85.2174 88.6472 84.7236 88.6472 84.7236C88.6472 84.7236 92.9635 85.4642 94.4434 85.2174C96.2933 84.8471 99.2531 85.3408 100.363 87.8095C102.213 88.5501 102.829 89.661 103.076 90.8953C103.446 92.7469 102.336 94.8452 102.09 95.7093Z" fill="#a3a3a3"/>
+<path d="M90.2501 106.571V102.375C90.1267 102.251 90.1267 102.251 90.0034 102.128V101.881C90.2501 102.251 90.4967 102.621 90.8667 102.868L94.1964 105.214C94.9364 105.831 96.0463 105.831 96.7862 105.214L99.8693 102.498C99.9927 102.375 100.116 102.375 100.239 102.251C100.239 102.621 100.239 103.239 100.239 106.571C100.239 106.818 100.239 106.942 100.363 107.189H90.2501C90.1267 106.942 90.2501 106.818 90.2501 106.571Z" fill="url(#paint1_linear)"/>
+<path d="M41.2036 98.1168C41.2036 103.918 38.7371 109.102 34.7908 112.805C33.6808 113.793 32.5709 114.657 31.2144 115.398C28.2546 117.126 24.8015 118.113 21.1018 118.113C17.4021 118.113 13.949 117.126 10.9892 115.398C10.4959 115.151 10.126 114.904 9.63268 114.534C4.45307 110.954 1 104.906 1 98.1168C1 87.0077 10.0026 78.1204 20.9785 78.1204C32.201 77.997 41.2036 87.0077 41.2036 98.1168Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M17.0323 102.56C17.279 102.806 17.5256 103.177 17.8956 103.424C18.1422 103.67 18.3889 103.794 18.6355 104.041C18.7589 104.164 19.0055 104.288 19.1288 104.411C19.1288 104.411 19.2522 104.411 19.2522 104.534L19.3755 104.658V106.386C19.3755 106.386 19.3755 106.386 19.2522 106.263C19.1288 106.139 18.8822 106.016 18.7589 105.892C18.5122 105.769 18.2656 105.522 18.0189 105.399C17.8956 105.399 17.8956 105.275 17.7723 105.275C16.909 104.781 16.1691 104.288 16.1691 103.67C16.2924 103.424 16.539 103.053 17.0323 102.56ZM34.1878 112.107C33.4478 110.502 32.4478 108.978 30.7213 108.114C29.858 107.744 28.8714 107.373 27.8848 107.373C27.6382 107.373 27.2682 107.373 27.0216 107.373C26.8982 107.373 26.7749 107.373 26.6516 107.373C25.295 107.25 25.1717 107.003 25.1717 107.003V104.164C26.035 103.424 26.8982 102.56 27.6382 101.695C28.2548 100.831 28.7481 99.844 28.9947 98.6096C30.1047 98.3628 30.8446 97.3753 30.7213 96.1409C30.7213 95.6472 30.3513 95.1535 30.3513 94.6597C30.3513 94.4129 30.3513 94.166 30.3513 93.9191C30.3513 93.7957 30.3513 93.5488 30.3513 93.4254C30.3513 93.3019 30.3513 93.0551 30.3513 92.9316C30.228 92.0676 29.9813 91.2036 29.488 90.2161C28.0082 87.5005 25.295 85.7725 22.0886 85.7725C21.472 85.7725 20.8554 85.8959 20.2387 86.0193C19.1288 86.2662 18.0189 86.7599 17.1556 87.5005C17.0323 87.624 16.7857 87.7474 16.6624 87.9943L16.539 88.1177C15.5524 89.1052 14.6892 90.2161 14.3192 91.5739C13.8259 92.9316 13.8259 94.2894 13.9492 95.6472C13.9492 95.6472 13.9492 95.6472 13.9492 95.7706V95.8941C13.9492 96.1409 14.0726 96.1409 13.9492 96.2644C13.9492 96.3878 13.8259 96.3878 13.8259 96.5112C13.5793 96.8815 13.4559 97.3753 13.7026 98.1159C14.1959 99.3502 14.9358 99.2268 15.7991 99.844C15.7991 99.844 15.6758 99.844 15.6758 99.9674L14.8125 100.214C10.8661 101.449 9.50957 104.781 11.2361 106.88C11.8527 107.62 12.8393 108.238 14.3192 108.608C13.9492 108.608 13.5793 108.855 13.3326 109.102C11.6061 110.459 10.4962 112.558 10.2495 114.533C10.2495 114.656 10.2495 114.78 10.2495 114.903C10.7428 115.15 11.1128 115.52 11.6061 115.767L30.9175 115.315C32.1507 114.575 32.6963 114.003 33.8062 113.016C33.6829 112.399 34.3111 112.23 34.1878 112.107Z" fill="#1f1f1f"/>
+<path d="M34.7909 112.805C33.681 113.792 32.5711 114.656 31.2145 115.397C28.2547 117.125 24.8017 118.113 21.1019 118.113C17.4022 118.113 13.9491 117.125 10.9894 115.397C10.4961 115.15 10.1261 114.903 9.63281 114.533C9.63281 114.41 9.63281 114.286 9.63281 114.163C9.87946 112.188 10.9894 110.089 12.7159 108.732C12.9626 108.485 13.3325 108.361 13.7025 108.238C12.2226 107.991 11.236 107.374 10.6194 106.51H15.3057C16.6623 108.361 18.7588 109.472 21.2253 109.472C23.3218 109.472 25.1716 108.608 26.5282 107.25C26.6515 107.25 26.7748 107.25 26.8982 107.25C27.1448 107.25 27.3915 107.25 27.7614 107.25C28.748 107.25 29.7346 107.497 30.5979 107.991C32.3244 108.855 33.5577 110.336 34.4209 112.064C34.6676 112.311 34.6676 112.558 34.7909 112.805Z" fill="#737373"/>
+<path d="M25.2953 104.165V106.757L17.5259 107.004L17.8958 105.275C18.0192 105.275 18.0192 105.399 18.1425 105.399C18.3891 105.522 18.6358 105.769 18.8824 105.893C19.0058 106.016 19.1291 106.139 19.3757 106.263C19.3757 106.263 19.4991 106.263 19.4991 106.386V104.658L19.3757 104.535C20.7323 105.275 22.5822 105.769 25.2953 104.165Z" fill="url(#paint2_linear)"/>
+<path d="M30.351 93.4261C28.8711 93.9198 27.1446 94.1667 25.5414 94.0432C22.9516 93.7964 20.4851 92.8089 18.5119 91.0808C17.8953 92.9323 16.2921 94.2901 14.4422 95.1541C14.1956 95.2776 13.949 95.401 13.7023 95.401C13.7023 95.401 13.7023 95.401 13.7023 95.2776C13.579 93.9198 13.579 92.562 14.0723 91.2042C14.4422 89.8465 15.3055 88.7356 16.2921 87.7481L16.4154 87.6247C16.5388 87.5012 16.7854 87.3778 16.9087 87.1309C17.772 86.3903 18.8819 85.8966 19.9918 85.6497C20.6084 85.5263 21.2251 85.4028 21.8417 85.4028C25.0481 85.4028 27.8846 87.1309 29.2411 89.8465C29.7344 90.8339 29.9811 91.8214 30.1044 92.562C30.351 93.0558 30.351 93.3026 30.351 93.4261Z" fill="#a3a3a3"/>
+<path d="M20.4853 111.694C19.7453 112.558 18.5121 112.558 17.4022 112.558C18.5121 111.447 17.8955 107.868 13.9491 108.238C8.52286 107.251 9.01616 101.573 14.4424 99.8445L15.3057 99.5977L15.429 99.7211C15.799 100.832 16.4156 101.819 17.0322 102.56C14.8124 104.412 17.8955 104.905 19.3754 106.387C20.6086 107.127 21.7185 110.213 20.4853 111.694Z" fill="#a3a3a3"/>
+<defs>
+<linearGradient id="paint0_linear" x1="58.2299" y1="30.8211" x2="58.2299" y2="28.0409" gradientUnits="userSpaceOnUse">
+<stop stop-color="#1f1f1f"/>
+<stop offset="0.9913" stop-color="#222427"/>
+</linearGradient>
+<linearGradient id="paint1_linear" x1="95.163" y1="107.023" x2="95.163" y2="104.243" gradientUnits="userSpaceOnUse">
+<stop stop-color="#1f1f1f"/>
+<stop offset="0.9913" stop-color="#222427"/>
+</linearGradient>
+<linearGradient id="paint2_linear" x1="21.3956" y1="106.915" x2="21.3956" y2="105.428" gradientUnits="userSpaceOnUse">
+<stop stop-color="#1f1f1f"/>
+<stop offset="0.9913" stop-color="#222427"/>
+</linearGradient>
+</defs>
+</svg>
diff --git a/packages/hoppscotch-desktop/public/images/pack.svg b/packages/hoppscotch-desktop/public/images/pack.svg
new file mode 100644
index 000000000..56a669ba4
--- /dev/null
+++ b/packages/hoppscotch-desktop/public/images/pack.svg
@@ -0,0 +1,39 @@
+<svg width="145" height="120" viewBox="0 0 145 120" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M130.648 59.7265C130.648 72.9542 126.219 85.3837 118.837 95.1904C114.748 100.55 109.865 105.225 104.187 108.874C95.1014 114.918 84.0855 118.339 72.3882 118.339C40.249 118.453 14.1288 92.2256 14.1288 59.7265C14.1288 27.3414 40.1355 1 72.3882 1C84.0855 1 94.9879 4.42096 104.187 10.4647C109.865 14.1137 114.748 18.789 118.837 24.1485C126.219 34.0693 130.648 46.3847 130.648 59.7265Z" fill="#1A1A1A" stroke="#3E3E3E" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M28.0197 51.8744H27.3164C26.7889 51.8744 26.4372 51.7103 26.4372 51.4641C26.4372 51.2179 26.7889 51.0538 27.3164 51.0538H28.0197C28.5472 51.0538 28.8989 51.2179 28.8989 51.4641C28.8989 51.7103 28.5472 51.8744 28.0197 51.8744Z" fill="#777777"/>
+<path d="M28.0197 55.1566H27.3164C26.7889 55.1566 26.4372 54.9925 26.4372 54.7463C26.4372 54.5002 26.7889 54.3361 27.3164 54.3361H28.0197C28.5472 54.3361 28.8989 54.5002 28.8989 54.7463C28.8989 54.9925 28.5472 55.1566 28.0197 55.1566Z" fill="#777777"/>
+<path d="M28.0197 58.4388H27.3164C26.7889 58.4388 26.4372 58.2747 26.4372 58.0286C26.4372 57.7824 26.7889 57.6183 27.3164 57.6183H28.0197C28.5472 57.6183 28.8989 57.7824 28.8989 58.0286C28.8989 58.2747 28.5472 58.4388 28.0197 58.4388Z" fill="#777777"/>
+<path d="M28.0197 61.7211H27.3164C26.7889 61.7211 26.4372 61.557 26.4372 61.3108C26.4372 61.0646 26.7889 60.9005 27.3164 60.9005H28.0197C28.5472 60.9005 28.8989 61.0646 28.8989 61.3108C28.8989 61.557 28.5472 61.7211 28.0197 61.7211Z" fill="#777777"/>
+<path d="M60.119 51.8744H48.5531C48.0842 51.8744 47.7716 51.7103 47.7716 51.4641C47.7716 51.2179 48.0842 51.0538 48.5531 51.0538H60.119C60.5879 51.0538 60.9005 51.2179 60.9005 51.4641C60.9005 51.7103 60.5879 51.8744 60.119 51.8744Z" fill="white"/>
+<path d="M84.7622 61.7211H48.5265C48.0736 61.7211 47.7716 61.557 47.7716 61.3108C47.7716 61.0646 48.0736 60.9005 48.5265 60.9005H84.7622C85.2152 60.9005 85.5171 61.0646 85.5171 61.3108C85.5171 61.557 85.2152 61.7211 84.7622 61.7211Z" fill="url(#paint0_linear_595_1292)"/>
+<path d="M60.1641 55.1566H44.4052C43.9634 55.1566 43.6688 54.9925 43.6688 54.7463C43.6688 54.5002 43.9634 54.3361 44.4052 54.3361H60.1641C60.6059 54.3361 60.9005 54.5002 60.9005 54.7463C60.9005 54.9925 60.6059 55.1566 60.1641 55.1566Z" fill="#777777"/>
+<path d="M72.474 58.4388H44.4036C43.9628 58.4388 43.6688 58.2747 43.6688 58.0286C43.6688 57.7824 43.9628 57.6183 44.4036 57.6183H72.474C72.9149 57.6183 73.2088 57.7824 73.2088 58.0286C73.0618 58.2747 72.7679 58.4388 72.474 58.4388Z" fill="#777777"/>
+<path d="M84.7179 58.4388H74.008C73.5285 58.4388 73.2088 58.2747 73.2088 58.0286C73.2088 57.7824 73.5285 57.6183 74.008 57.6183H84.7179C85.1974 57.6183 85.5171 57.7824 85.5171 58.0286C85.5171 58.2747 85.1974 58.4388 84.7179 58.4388Z" fill="white"/>
+<path d="M91.3054 58.4388H87.1139C86.6482 58.4388 86.3377 58.2747 86.3377 58.0286C86.3377 57.7824 86.6482 57.6183 87.1139 57.6183H91.3054C91.7711 57.6183 92.0816 57.7824 92.0816 58.0286C92.0816 58.2747 91.7711 58.4388 91.3054 58.4388Z" fill="url(#paint1_linear_595_1292)"/>
+<path d="M1 103.569H138.853" stroke="#3E3E3E" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M97.8254 51.0538V103.569H23.3714C20.4344 103.569 18.2316 101.209 18.2316 98.4063V51.0538H97.8254Z" fill="#1A1A1A" stroke="#3E3E3E" stroke-width="1.5905" stroke-miterlimit="10" stroke-linejoin="round"/>
+<path d="M127.365 51.0538V98.4063C127.365 101.357 124.916 103.569 122.008 103.569H97.8254V51.0538H127.365Z" fill="#E7E7E7"/>
+<path d="M127.365 51.0538V98.4063C127.365 101.357 124.916 103.569 122.008 103.569H97.8254V51.0538H127.365Z" fill="#1A1A1A" stroke="#3E3E3E" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M46.951 51.0538L62.6072 26.4372H142.956L126.857 51.0538H46.951Z" fill="#D9D9D9"/>
+<path d="M46.951 51.0538L62.6072 26.4372H142.956L126.857 51.0538H46.951Z" fill="#1A1A1A" stroke="#3E3E3E" stroke-width="2" stroke-miterlimit="10"/>
+<path opacity="0.3" d="M127.365 51.1976V78.9527H105.826C103.826 78.9527 102.441 77.6584 102.133 75.7889L97.8254 51.0538L127.365 51.1976Z" fill="url(#paint2_linear_595_1292)"/>
+<path d="M126.746 51.0538H97.8254L112.511 73.312C113.56 74.786 115.208 75.6705 116.856 75.6705H139.334C140.832 75.6705 141.881 73.9016 140.982 72.7224L126.746 51.0538Z" fill="#1A1A1A" stroke="#3E3E3E" stroke-width="1.5905" stroke-miterlimit="10" stroke-linejoin="round"/>
+<path d="M97.8254 51.0538L82.0597 26.4372H1L17.3607 51.0538H97.8254Z" fill="#1A1A1A" stroke="#3E3E3E" stroke-width="1.5905" stroke-miterlimit="10" stroke-linejoin="round"/>
+<path d="M57.9543 81.4144H26.9217C26.1967 81.4144 25.6166 80.8673 25.6166 80.1835C25.6166 79.4997 26.1967 78.9527 26.9217 78.9527H57.9543C58.6793 78.9527 59.2594 79.4997 59.2594 80.1835C59.1144 80.8673 58.6793 81.4144 57.9543 81.4144Z" fill="#3E3E3E"/>
+<path d="M57.9543 87.1583H26.9217C26.1967 87.1583 25.6166 86.7936 25.6166 86.3377C25.6166 85.8818 26.1967 85.5172 26.9217 85.5172H57.9543C58.6793 85.5172 59.2594 85.8818 59.2594 86.3377C59.1144 86.7936 58.6793 87.1583 57.9543 87.1583Z" fill="#3E3E3E"/>
+<path d="M41.5228 93.7227H26.9422C26.2058 93.7227 25.6166 93.358 25.6166 92.9021C25.6166 92.4462 26.2058 92.0815 26.9422 92.0815H41.5228C42.2592 92.0815 42.8483 92.4462 42.8483 92.9021C42.701 93.358 42.1119 93.7227 41.5228 93.7227Z" fill="#3E3E3E"/>
+<defs>
+<linearGradient id="paint0_linear_595_1292" x1="47.9412" y1="61.3274" x2="85.5609" y2="61.3274" gradientUnits="userSpaceOnUse">
+<stop stop-color="#A2A2A2"/>
+<stop offset="1" stop-color="#252525"/>
+</linearGradient>
+<linearGradient id="paint1_linear_595_1292" x1="86.3761" y1="58.0035" x2="92.0805" y2="58.0035" gradientUnits="userSpaceOnUse">
+<stop stop-color="#9A9A9A"/>
+<stop offset="1" stop-color="#545454"/>
+</linearGradient>
+<linearGradient id="paint2_linear_595_1292" x1="112.602" y1="79.5253" x2="112.602" y2="54.1128" gradientUnits="userSpaceOnUse">
+<stop offset="0.00289017" stop-opacity="0"/>
+<stop offset="1"/>
+</linearGradient>
+</defs>
+</svg>
diff --git a/packages/hoppscotch-desktop/public/images/youre_lost.svg b/packages/hoppscotch-desktop/public/images/youre_lost.svg
new file mode 100644
index 000000000..ea33353f8
--- /dev/null
+++ b/packages/hoppscotch-desktop/public/images/youre_lost.svg
@@ -0,0 +1,76 @@
+<svg width="148" height="163" viewBox="0 0 148 163" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M56.1607 15.3833C25.4726 23.8793 7.48238 55.6443 15.9784 86.3324C24.4744 117.02 56.2394 135.011 86.9275 126.515C117.616 118.019 135.606 86.2537 127.11 55.5656C118.614 24.8776 86.8488 6.88731 56.1607 15.3833Z" fill="#1f1f1f" stroke="#525252" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M91.7717 32.1479L92.8659 31.5956C92.9238 31.5796 93.0236 31.4896 92.9916 31.3737L92.9026 30.1513C92.9124 29.9615 92.9961 29.8136 93.1699 29.7655C93.3436 29.7174 93.5495 29.7851 93.5976 29.9588L94.1499 31.053C94.166 31.111 94.2559 31.2108 94.3718 31.1787L95.5943 31.0897C95.784 31.0995 95.9319 31.1833 95.98 31.357C96.0282 31.5308 95.9604 31.7366 95.7867 31.7847L94.6925 32.337C94.6345 32.3531 94.5347 32.4431 94.5668 32.5589L94.6558 33.7814C94.646 33.9712 94.5623 34.1191 94.3885 34.1672C94.2147 34.2153 94.0089 34.1475 93.9608 33.9738L93.4085 32.8796C93.3924 32.8217 93.3024 32.7219 93.1866 32.7539L91.9641 32.843C91.7743 32.8331 91.6264 32.7494 91.5783 32.5756C91.5463 32.4598 91.614 32.254 91.7717 32.1479Z" fill="#1f1f1f"/>
+<path d="M39.2363 38.4401L40.2794 37.9135C40.3347 37.8982 40.4298 37.8124 40.3992 37.702L40.3144 36.5366C40.3237 36.3556 40.4036 36.2146 40.5692 36.1688C40.7349 36.1229 40.9311 36.1875 40.9769 36.3531L41.5035 37.3963C41.5188 37.4515 41.6046 37.5466 41.715 37.516L42.8804 37.4312C43.0614 37.4405 43.2024 37.5204 43.2482 37.686C43.2941 37.8517 43.2295 38.0479 43.0639 38.0938L42.0207 38.6203C41.9655 38.6356 41.8704 38.7214 41.9009 38.8318L41.9858 39.9973C41.9765 40.1782 41.8966 40.3192 41.731 40.3651C41.5653 40.4109 41.3691 40.3463 41.3232 40.1807L40.7967 39.1376C40.7814 39.0823 40.6956 38.9872 40.5852 39.0178L39.4197 39.1026C39.2388 39.0933 39.0978 39.0134 39.0519 38.8478C39.0061 38.6821 39.0707 38.4859 39.2363 38.4401Z" fill="#1f1f1f"/>
+<path d="M76.6054 49.8626L77.448 49.4373C77.4926 49.425 77.5694 49.3557 77.5447 49.2665L77.4762 48.3252C77.4837 48.1791 77.5482 48.0652 77.682 48.0282C77.8158 47.9911 77.9743 48.0433 78.0113 48.1771L78.4366 49.0196C78.449 49.0642 78.5183 49.141 78.6074 49.1163L79.5487 49.0478C79.6949 49.0553 79.8087 49.1198 79.8458 49.2536C79.8828 49.3874 79.8307 49.5459 79.6969 49.5829L78.8544 50.0082C78.8098 50.0206 78.7329 50.0899 78.7576 50.1791L78.8262 51.1203C78.8186 51.2665 78.7541 51.3804 78.6203 51.4174C78.4865 51.4544 78.3281 51.4023 78.291 51.2685L77.8657 50.426C77.8534 50.3814 77.7841 50.3045 77.6949 50.3292L76.7536 50.3978C76.6075 50.3902 76.4936 50.3257 76.4565 50.1919C76.3873 50.1151 76.484 49.9443 76.6054 49.8626Z" fill="#1f1f1f"/>
+<path d="M43.4125 109.199L44.9251 108.436C45.0051 108.414 45.1431 108.289 45.0988 108.129L44.9757 106.439C44.9893 106.177 45.1051 105.972 45.3453 105.906C45.5855 105.839 45.87 105.933 45.9365 106.173L46.7 107.686C46.7222 107.766 46.8466 107.904 47.0067 107.86L48.6967 107.736C48.959 107.75 49.1635 107.866 49.23 108.106C49.2965 108.346 49.2028 108.631 48.9627 108.697L47.45 109.461C47.37 109.483 47.232 109.607 47.2763 109.767L47.3994 111.457C47.3858 111.72 47.27 111.924 47.0299 111.991C46.7897 112.057 46.5051 111.964 46.4387 111.723L45.6751 110.211C45.6529 110.131 45.5285 109.993 45.3684 110.037L43.6785 110.16C43.4161 110.147 43.2116 110.031 43.1451 109.791C43.0787 109.55 43.1944 109.346 43.4125 109.199Z" fill="#1f1f1f"/>
+<path d="M120.156 69.1737L120.948 67.985C120.998 67.9355 121.047 67.7869 120.948 67.6878L120.156 66.4991C120.057 66.301 120.057 66.1029 120.205 65.9543C120.354 65.8057 120.601 65.7562 120.75 65.9048L121.939 66.6973C121.988 66.7468 122.137 66.7963 122.236 66.6973L123.425 65.9048C123.623 65.8057 123.821 65.8057 123.969 65.9543C124.118 66.1029 124.168 66.3506 124.019 66.4991L123.227 67.6878C123.177 67.7374 123.127 67.886 123.227 67.985L124.019 69.1737C124.118 69.3718 124.118 69.5699 123.969 69.7185C123.821 69.8671 123.573 69.9167 123.425 69.7681L122.236 68.9756C122.186 68.9261 122.038 68.8765 121.939 68.9756L120.75 69.7681C120.552 69.8671 120.354 69.8671 120.205 69.7185C120.057 69.57 120.007 69.3223 120.156 69.1737Z" fill="#1f1f1f"/>
+<path d="M43.5537 60.6946L44.5678 58.6607C44.6361 58.5727 44.6847 58.3283 44.5086 58.1917L43.0212 56.4733C42.8254 56.1803 42.786 55.8676 42.9909 55.6035C43.1958 55.3394 43.5768 55.2119 43.8409 55.4169L45.8749 56.431C45.9629 56.4993 46.2073 56.5479 46.3439 56.3718L48.0623 54.8844C48.3553 54.6886 48.6679 54.6492 48.932 54.8541C49.1961 55.059 49.3236 55.44 49.1187 55.7041L48.1046 57.7381C48.0363 57.8261 47.9877 58.0705 48.1638 58.2071L49.6512 59.9255C49.847 60.2184 49.8864 60.5311 49.6815 60.7952C49.4765 61.0594 49.0956 61.1868 48.8314 60.9819L46.7975 59.9678C46.7095 59.8995 46.4651 59.8509 46.3285 60.0269L44.6101 61.5144C44.3171 61.7102 44.0044 61.7496 43.7403 61.5447C43.4762 61.3397 43.3488 60.9587 43.5537 60.6946Z" fill="#1f1f1f"/>
+<path d="M63.753 120.774L65.1738 120.056C65.249 120.036 65.3785 119.919 65.3369 119.768L65.2213 118.181C65.2341 117.935 65.3428 117.743 65.5684 117.68C65.794 117.618 66.0613 117.706 66.1237 117.931L66.8409 119.352C66.8617 119.427 66.9786 119.557 67.129 119.515L68.7163 119.4C68.9627 119.412 69.1547 119.521 69.2172 119.747C69.2796 119.972 69.1917 120.239 68.9661 120.302L67.5454 121.019C67.4702 121.04 67.3406 121.157 67.3822 121.307L67.4978 122.894C67.4851 123.141 67.3763 123.333 67.1507 123.395C66.9251 123.458 66.6579 123.37 66.5954 123.144L65.8782 121.724C65.8574 121.648 65.7406 121.519 65.5902 121.56L64.0029 121.676C63.7564 121.663 63.5644 121.554 63.5019 121.329C63.4395 121.103 63.5274 120.836 63.753 120.774Z" fill="#1f1f1f"/>
+<path d="M36.4421 84.4297L37.4304 82.6771C37.4948 82.6024 37.5488 82.3885 37.3992 82.2598L36.1616 80.6734C36.0017 80.4056 35.9809 80.1274 36.174 79.9031C36.3671 79.6788 36.7097 79.5833 36.934 79.7764L38.6865 80.7647C38.7613 80.829 38.9752 80.883 39.1039 80.7335L40.6902 79.4958C40.9581 79.3359 41.2363 79.3152 41.4606 79.5082C41.6848 79.7013 41.7804 80.0439 41.5873 80.2682L40.599 82.0208C40.5346 82.0955 40.4807 82.3094 40.6302 82.4381L41.8678 84.0244C42.0277 84.2923 42.0485 84.5705 41.8554 84.7948C41.6623 85.0191 41.3197 85.1146 41.0955 84.9215L39.3429 83.9332C39.2681 83.8689 39.0543 83.8149 38.9255 83.9644L37.3392 85.2021C37.0714 85.362 36.7931 85.3828 36.5689 85.1897C36.3446 84.9966 36.2491 84.654 36.4421 84.4297Z" fill="#1f1f1f"/>
+<path d="M61.2319 29.7607L63.0868 28.8648C63.2644 28.8157 63.304 28.6135 63.2794 28.5247L63.0938 26.4732C63.1088 26.1823 63.3014 25.8422 63.5678 25.7684C63.8341 25.6947 64.1496 25.7985 64.3367 26.1291L65.2326 27.984C65.2818 28.1615 65.4839 28.2012 65.5727 28.1766L67.6242 27.991C67.9152 28.006 68.2552 28.1986 68.329 28.465C68.4027 28.7313 68.2989 29.0468 67.9684 29.2339L66.1135 30.1298C65.9359 30.179 65.8963 30.3811 65.9208 30.4699L66.1065 32.5214C66.0914 32.8124 65.8988 33.1524 65.6325 33.2262C65.3661 33.2999 65.0506 33.1961 64.8635 32.8655L63.9676 31.0106C63.9185 30.8331 63.7163 30.7935 63.6275 30.818L61.576 31.0037C61.2851 30.9886 60.945 30.796 60.8713 30.5296C60.7729 30.1745 60.8768 29.859 61.2319 29.7607Z" fill="#1f1f1f"/>
+<path d="M104.567 49.7554L105.499 49.3054C105.588 49.2807 105.608 49.1792 105.596 49.1346L105.503 48.1041C105.51 47.9579 105.607 47.7871 105.741 47.7501C105.875 47.713 106.033 47.7652 106.127 47.9312L106.577 48.8629C106.602 48.9521 106.703 48.972 106.748 48.9597L107.778 48.8665C107.924 48.874 108.095 48.9708 108.132 49.1045C108.169 49.2383 108.117 49.3968 107.951 49.4908L107.019 49.9408C106.93 49.9655 106.91 50.067 106.923 50.1116L107.016 51.1421C107.008 51.2882 106.912 51.459 106.778 51.4961C106.644 51.5331 106.486 51.481 106.392 51.3149L105.942 50.3832C105.917 50.294 105.815 50.2741 105.771 50.2865L104.74 50.3797C104.594 50.3722 104.423 50.2754 104.386 50.1416C104.349 50.0078 104.446 49.837 104.567 49.7554Z" fill="#1f1f1f"/>
+<path d="M96.2883 107.626L98.3879 106.612C98.5889 106.557 98.6338 106.328 98.606 106.227L98.3959 103.905C98.4129 103.576 98.6309 103.191 98.9324 103.107C99.2339 103.024 99.591 103.141 99.8028 103.516L100.817 105.615C100.872 105.816 101.101 105.861 101.202 105.833L103.524 105.623C103.853 105.64 104.238 105.858 104.322 106.16C104.405 106.461 104.288 106.818 103.913 107.03L101.814 108.044C101.613 108.1 101.568 108.328 101.596 108.429L101.806 110.751C101.789 111.08 101.571 111.465 101.269 111.549C100.968 111.632 100.611 111.515 100.399 111.141L99.385 109.041C99.3293 108.84 99.1005 108.795 99 108.823L96.6778 109.033C96.3485 109.016 95.9636 108.798 95.8801 108.497C95.7967 108.195 95.9142 107.838 96.2883 107.626Z" fill="#1f1f1f"/>
+<path d="M106.127 86.1344L107.636 85.4056C107.781 85.3656 107.813 85.2012 107.793 85.129L107.642 83.4601C107.654 83.2234 107.811 82.9468 108.028 82.8868C108.244 82.8268 108.501 82.9112 108.653 83.1801L109.382 84.6891C109.422 84.8335 109.586 84.8658 109.659 84.8458L111.328 84.6948C111.564 84.707 111.841 84.8637 111.901 85.0804C111.961 85.297 111.876 85.5537 111.608 85.7059L110.099 86.4347C109.954 86.4747 109.922 86.6391 109.942 86.7114L110.093 88.3803C110.081 88.6169 109.924 88.8936 109.707 88.9536C109.491 89.0136 109.234 88.9291 109.082 88.6602L108.353 87.1512C108.313 87.0068 108.149 86.9746 108.076 86.9946L106.407 87.1456C106.171 87.1333 105.894 86.9766 105.834 86.76C105.774 86.5433 105.931 86.2666 106.127 86.1344Z" fill="#1f1f1f"/>
+<path d="M22.194 64.0334L24.4316 63.8309C24.6253 63.7773 24.7758 63.9442 24.8026 64.041L25.7797 66.0642C25.957 66.3279 26.3279 66.538 26.6184 66.4575C26.9089 66.3771 27.1458 66.103 27.1354 65.6888L26.933 63.4512C26.8794 63.2575 27.0462 63.1071 27.143 63.0803L29.1662 62.1031C29.4299 61.9259 29.64 61.5549 29.5596 61.2644C29.4791 60.9739 29.205 60.737 28.7909 60.7474L26.5532 60.9499C26.3596 61.0035 26.2091 60.8366 26.1823 60.7398L25.2052 58.7166C25.0279 58.4529 24.657 58.2428 24.3665 58.3233C24.0759 58.4037 23.8391 58.6778 23.8495 59.092L24.0519 61.3296C24.1055 61.5233 23.9387 61.6737 23.8418 61.7005L21.8187 62.6777C21.555 62.8549 21.3449 63.2259 21.4253 63.5164C21.5326 63.9037 21.9035 64.1138 22.194 64.0334Z" fill="#1f1f1f"/>
+<path d="M10.2315 108.566L13.3953 108.28C13.6692 108.204 13.8819 108.44 13.9198 108.577L15.3014 111.438C15.552 111.811 16.0765 112.108 16.4872 111.994C16.898 111.88 17.2329 111.493 17.2182 110.907L16.932 107.743C16.8562 107.469 17.0921 107.257 17.229 107.219L20.0896 105.837C20.4624 105.587 20.7595 105.062 20.6458 104.651C20.532 104.241 20.1445 103.906 19.5589 103.92L16.3951 104.207C16.1212 104.282 15.9085 104.046 15.8706 103.91L14.489 101.049C14.2384 100.676 13.7139 100.379 13.3032 100.493C12.8924 100.606 12.5575 100.994 12.5722 101.58L12.8584 104.743C12.9342 105.017 12.6983 105.23 12.5614 105.268L9.7008 106.65C9.32795 106.9 9.03093 107.425 9.14465 107.835C9.29627 108.383 9.82073 108.68 10.2315 108.566Z" fill="#1f1f1f"/>
+<path d="M15.485 28.2522L18.4022 27.9883C18.6546 27.9184 18.8508 28.1359 18.8857 28.2622L20.1596 30.8997C20.3907 31.2435 20.8743 31.5173 21.253 31.4125C21.6317 31.3076 21.9406 30.9503 21.927 30.4104L21.6631 27.4932C21.5932 27.2408 21.8107 27.0446 21.9369 27.0097L24.5745 25.7358C24.9183 25.5047 25.1921 25.0211 25.0873 24.6424C24.9824 24.2637 24.6251 23.9548 24.0852 23.9684L21.168 24.2323C20.9155 24.3022 20.7194 24.0847 20.6845 23.9585L19.4106 21.3209C19.1795 20.9772 18.6959 20.7033 18.3172 20.8081C17.9385 20.913 17.6296 21.2703 17.6432 21.8102L17.9071 24.7274C17.977 24.9799 17.7595 25.176 17.6333 25.2109L14.9957 26.4848C14.6519 26.7159 14.3781 27.1995 14.4829 27.5782C14.6227 28.0832 15.1063 28.3571 15.485 28.2522Z" fill="#1f1f1f"/>
+<path d="M131.048 82.8904L135.025 84.3075C135.397 84.3686 135.522 84.7717 135.492 84.958L135.565 89.1786C135.66 89.768 136.127 90.4186 136.686 90.5102C137.245 90.6018 137.865 90.3208 138.173 89.6062L139.59 85.6299C139.651 85.2573 140.055 85.1321 140.241 85.1627L144.462 85.0895C145.051 84.9948 145.701 84.5275 145.793 83.9687C145.885 83.4098 145.604 82.7898 144.889 82.4813L140.913 81.0642C140.54 81.0031 140.415 80.6 140.446 80.4137L140.372 76.1931C140.278 75.6037 139.81 74.9532 139.252 74.8615C138.693 74.7699 138.073 75.0509 137.764 75.7655L136.347 79.7418C136.286 80.1144 135.883 80.2396 135.697 80.209L131.476 80.2823C130.887 80.3769 130.236 80.8442 130.144 81.4031C130.022 82.1483 130.489 82.7988 131.048 82.8904Z" fill="#1f1f1f"/>
+<path d="M47.654 42.7536C47.2846 42.8559 47.068 43.2383 47.1703 43.6077C47.2726 43.9771 47.655 44.1937 48.0244 44.0914C48.3939 43.9892 48.6104 43.6068 48.5082 43.2373C48.4059 42.8679 48.0235 42.6513 47.654 42.7536Z" fill="#1f1f1f"/>
+<path d="M71.5437 60.1943C71.1743 60.2965 70.9577 60.6789 71.06 61.0484C71.1622 61.4178 71.5446 61.6344 71.9141 61.5321C72.2835 61.4298 72.5001 61.0474 72.3978 60.678C72.2955 60.3086 71.9131 60.092 71.5437 60.1943Z" fill="#1f1f1f"/>
+<path d="M87.0624 32.0586C86.8667 32.3882 86.9753 32.8141 87.3049 33.0098C87.6345 33.2054 88.0603 33.0969 88.256 32.7672C88.4517 32.4376 88.3431 32.0118 88.0135 31.8161C87.6839 31.6204 87.2581 31.729 87.0624 32.0586Z" fill="#1f1f1f"/>
+<path d="M64.6673 18.7561C64.4717 19.0857 64.5802 19.5116 64.9099 19.7073C65.2395 19.9029 65.6653 19.7944 65.861 19.4648C66.0567 19.1351 65.9481 18.7093 65.6185 18.5136C65.2889 18.3179 64.863 18.4265 64.6673 18.7561Z" fill="#1f1f1f"/>
+<path d="M24.7157 49.313C24.52 49.6426 24.6286 50.0685 24.9582 50.2641C25.2878 50.4598 25.7137 50.3513 25.9094 50.0216C26.105 49.692 25.9965 49.2662 25.6668 49.0705C25.3372 48.8748 24.9114 48.9834 24.7157 49.313Z" fill="#1f1f1f"/>
+<path d="M27.6244 76.6072C27.4287 76.9368 27.5373 77.3627 27.8669 77.5583C28.1965 77.754 28.6224 77.6454 28.818 77.3158C29.0137 76.9862 28.9052 76.5604 28.5755 76.3647C28.2459 76.169 27.8201 76.2776 27.6244 76.6072Z" fill="#1f1f1f"/>
+<path d="M35.1957 103.887C35 104.217 35.1086 104.642 35.4382 104.838C35.7678 105.034 36.1936 104.925 36.3893 104.596C36.585 104.266 36.4764 103.84 36.1468 103.644C35.8172 103.449 35.3914 103.557 35.1957 103.887Z" fill="#1f1f1f"/>
+<path d="M53.5052 117.827C53.3096 118.157 53.4181 118.583 53.7478 118.779C54.0774 118.974 54.5032 118.866 54.6989 118.536C54.8946 118.206 54.786 117.781 54.4564 117.585C54.1268 117.389 53.7009 117.498 53.5052 117.827Z" fill="#1f1f1f"/>
+<path d="M86.9999 118.051C86.8042 118.381 86.9128 118.807 87.2424 119.002C87.572 119.198 87.9978 119.089 88.1935 118.76C88.3892 118.43 88.2806 118.004 87.951 117.809C87.6214 117.613 87.1956 117.721 86.9999 118.051Z" fill="#1f1f1f"/>
+<path d="M110.305 97.2576C110.109 97.5872 110.217 98.013 110.547 98.2087C110.877 98.4044 111.303 98.2958 111.498 97.9662C111.694 97.6366 111.585 97.2108 111.256 97.0151C110.926 96.8194 110.5 96.928 110.305 97.2576Z" fill="#1f1f1f"/>
+<path d="M122.725 74.7053C122.53 75.035 122.638 75.4608 122.968 75.6565C123.298 75.8522 123.723 75.7436 123.919 75.414C124.115 75.0843 124.006 74.6585 123.677 74.4628C123.347 74.2671 122.921 74.3757 122.725 74.7053Z" fill="#1f1f1f"/>
+<path d="M108.7 40.0772C108.504 40.4068 108.613 40.8326 108.943 41.0283C109.272 41.224 109.698 41.1154 109.894 40.7858C110.089 40.4562 109.981 40.0303 109.651 39.8346C109.322 39.639 108.896 39.7475 108.7 40.0772Z" fill="#1f1f1f"/>
+<path d="M106.348 78.3655L112.645 73.4041L110.728 70.8971L104.431 75.8585L106.348 78.3655Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M146.37 58.2505L134.023 42.0017L104.475 65.4607L116.823 81.7095L146.37 58.2505Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M124.767 75.0697L112.405 58.7385" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M131.697 69.8236L119.335 53.4924" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M138.628 64.5775L126.266 48.2463" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M138.32 48.4403L108.206 71.2356" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M143.052 54.6918L112.938 77.4871" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M113.433 102.184C111.233 103.85 108.107 103.414 106.438 101.209L103.672 97.5551C103.535 97.3739 103.572 97.1089 103.752 96.972L111.075 91.4293C111.256 91.2924 111.521 91.3294 111.658 91.5106L114.424 95.1646C116.062 97.3919 115.603 100.542 113.433 102.184Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M90.6043 86.1563L84.3071 91.1177L86.2238 93.6246L92.521 88.6632L90.6043 86.1563Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M62.943 122.491L50.5952 106.242L80.1426 82.7835L92.4905 99.0323L62.943 122.491Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M83.7494 106.361L71.3877 90.0295" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M76.8183 111.607L64.4565 95.2756" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M69.8881 116.853L57.5264 100.522" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M54.5472 112.295L84.2392 88.6205" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M59.2791 118.546L88.9711 94.8715" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M96.117 64.6554L81.9844 75.353L101.414 101.022L101.437 101.052C101.437 101.052 101.437 101.052 101.46 101.082C102.267 102.086 106.048 100.507 109.936 97.5641C113.823 94.6217 116.34 91.4342 115.623 90.3618C115.623 90.3618 115.623 90.3618 115.6 90.3316L115.577 90.3014L96.1472 64.6326L96.117 64.6554Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M103.089 73.8662L108.484 80.9931L108.507 81.0233L108.529 81.0535C109.276 82.1031 106.73 85.3134 102.842 88.2558C98.9552 91.1983 95.2041 92.7551 94.3666 91.7739L94.3438 91.7437L94.3209 91.7135L88.9263 84.5867C89.7336 85.5906 93.5148 84.011 97.402 81.0686C101.289 78.1262 103.813 74.8856 103.089 73.8662Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M97.3668 52.3623C100.626 56.6245 97.1992 64.8705 89.702 70.7763C82.2047 76.6822 73.4525 78.0302 70.1932 73.768C70.1735 73.7421 70.1537 73.7163 70.1339 73.6905C70.1142 73.6646 70.0747 73.613 70.0549 73.5871C69.0398 71.8619 74.1021 65.8873 81.4728 60.0811C88.8436 54.275 95.8219 50.8061 97.1969 52.2064C97.2166 52.2323 97.2562 52.2839 97.2759 52.3098C97.3075 52.2848 97.3273 52.3107 97.3668 52.3623Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M96.7129 52.14L96.7323 52.1651C97.089 52.69 96.7938 53.7221 95.9555 55.0165C94.2672 57.6545 90.4412 61.5148 85.5679 65.3075C80.6946 69.1002 75.9845 71.8831 73.0478 72.8446C71.5892 73.3378 70.5185 73.3686 70.0998 72.892L70.0804 72.867C70.061 72.842 70.0416 72.8169 70.0222 72.7919C69.0259 71.1198 73.9931 65.3282 81.2254 59.6995C88.4578 54.0709 95.3054 50.7077 96.6548 52.0649C96.6742 52.09 96.6935 52.115 96.7129 52.14Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M95.9967 55.2585L96.0159 55.2833C94.3369 57.8956 90.5319 61.7185 85.6852 65.4745C80.8386 69.2304 76.1543 71.9864 73.2336 72.9386L73.2143 72.9139C73.195 72.8891 73.1757 72.8643 73.1757 72.8643C72.3274 71.4555 76.5804 66.4909 82.7545 61.7062C88.9594 56.8977 94.8011 54.0394 95.9581 55.2089C95.9581 55.2089 95.9774 55.2337 95.9967 55.2585Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M84.8829 61.2183C84.9771 61.4173 84.3981 62.1113 83.5747 62.7728C82.7169 63.4618 81.9237 63.8702 81.7737 63.6702L77.0693 56.0049L78.6818 54.7096L84.84 61.1612L84.8829 61.2183Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M78.2283 55.6796C79.2373 54.8746 79.5446 53.5456 78.9146 52.7111C78.2846 51.8766 76.956 51.8526 75.947 52.6576C74.9381 53.4625 74.6308 54.7915 75.2608 55.626C75.8907 56.4605 77.2194 56.4845 78.2283 55.6796Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10"/>
+<path d="M36.2208 32.2775C35.9844 33.8534 34.9601 36.9262 33.148 37.399C33.0692 37.399 32.9904 37.399 32.9116 37.4778C31.1782 37.7141 29.2084 36.5323 27.9477 35.6656C27.3174 35.1928 26.6871 34.6413 26.1355 34.0897C25.8992 33.8534 25.584 33.5382 25.3476 33.3018C23.5354 31.332 22.1172 28.8895 21.2505 26.2894C21.0929 25.7379 20.9353 25.1863 21.0141 24.6348C21.0141 24.4772 21.0929 24.3984 21.0929 24.3196C21.2505 23.9257 21.5657 23.5317 22.0384 23.4529C22.4324 23.3741 22.7475 23.5317 23.1415 23.6105C23.5354 23.7681 23.8506 23.9257 24.2446 24.1621C23.3779 23.1378 23.1415 21.4044 23.1415 20.1437C23.1415 20.0649 23.1415 19.9073 23.2203 19.9073C23.2991 19.8285 23.5354 19.9073 23.6142 19.9861C24.8749 20.9316 24.8749 22.665 25.4264 24.0833C25.4264 23.059 25.5052 22.0347 25.5052 21.0104C25.5052 20.3013 25.584 19.4346 26.1355 18.9618C26.2143 18.8831 26.2931 18.8831 26.3719 18.8831C26.5295 18.8831 26.6083 19.0406 26.6871 19.1194C27.6326 20.774 27.081 22.8226 27.2386 24.7136C27.3174 25.4227 27.3962 26.1318 27.5538 26.841C27.6326 27.1561 27.7902 27.8652 27.9477 28.5744C28.1053 28.8895 28.2629 29.2047 28.4993 29.5199C28.5781 29.6774 28.7357 29.835 28.8932 29.9138C29.1296 30.1502 29.4448 30.3866 29.7599 30.6229C30.3903 30.9381 31.0206 31.1745 31.7297 31.332C32.9904 31.5684 34.251 31.5684 35.5117 31.6472C35.7481 31.6472 35.9844 31.726 36.142 31.8836C36.2208 32.0412 36.2208 32.12 36.2208 32.2775Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M52.7667 58.3572C51.1121 58.3572 49.3787 57.8056 48.118 57.0177C45.6755 55.4419 44.1785 53.0781 42.7603 50.9508L45.5179 49.1386C46.7786 51.0296 48.0393 53.0781 49.8515 54.1812C51.2697 55.1267 53.5546 55.4419 54.8153 54.3388C56.3911 52.9206 55.9972 50.2417 55.3668 48.2719C54.5789 45.8294 53.0819 43.702 51.2697 42.3626L53.2395 39.7625C55.682 41.5746 57.573 44.2535 58.5185 47.3264C59.8579 51.5023 59.3852 54.8116 57.0214 56.8601C55.8396 57.8844 54.2638 58.3572 52.7667 58.3572Z" fill="#737373"/>
+<path d="M56.155 32.1987C56.2338 33.3806 55.8399 34.5625 55.3671 35.7443C53.5549 40.4718 51.6639 45.1992 49.4578 49.7691C48.985 50.6358 48.5911 51.5813 48.1183 52.448C47.488 53.7087 46.7001 55.1269 45.2819 55.4421C44.1 55.6785 42.9969 55.1269 41.9726 54.5754C41.6575 54.4178 41.3423 54.1814 41.1847 53.8663C41.0271 53.5511 41.1059 53.1571 41.1847 52.842C42.1302 48.1145 43.9424 43.7022 45.7546 39.2111C46.6213 37.005 47.5668 34.72 48.2759 32.4351C48.8275 30.8593 49.2214 28.8107 51.27 28.6531C53.161 28.5743 55.9975 30.0714 56.155 32.1987Z" fill="#737373"/>
+<path d="M34.1721 46.3021C34.1721 46.4596 34.1721 46.5384 34.1721 46.696C34.0933 47.7203 33.8569 48.6658 33.3054 49.5325C32.6751 50.478 31.7296 51.2659 30.6265 51.5023C30.3901 51.5811 30.1538 51.5811 29.9174 51.5811C28.8931 51.6599 27.8688 51.3447 26.9233 50.9507C25.7415 50.478 24.5596 49.9264 23.2201 49.8477C22.511 49.7689 21.8019 49.8477 21.0928 50.0052C20.6988 50.084 20.3837 50.2416 19.9897 50.3204C19.5957 50.478 19.2018 50.6356 18.8078 50.7932C17.4684 51.4235 16.1289 52.2902 14.7895 52.8417C13.6864 53.3145 12.347 53.5508 11.4015 52.8417C10.9287 52.5266 10.6924 51.975 10.456 51.5023C9.11653 48.981 7.93466 46.4596 6.7528 43.8595C6.67401 43.7807 6.59521 43.6232 6.59521 43.4656C6.59521 43.0716 7.06796 42.7565 7.38313 42.5989C7.46192 42.5201 7.54071 42.5201 7.6195 42.4413C8.4862 42.0473 9.27411 41.7322 10.2196 41.5746C11.2439 41.4958 12.347 41.6534 13.0561 42.3625C13.5288 42.8352 13.844 43.3868 14.1592 44.0171C14.4743 44.7262 14.8683 45.4354 15.1834 46.1445C16.1289 45.3566 17.0744 44.5687 18.0987 43.8595C18.4139 43.6232 18.729 43.4656 19.0442 43.308C19.5957 42.9928 20.2261 42.6777 20.8564 42.5201C21.8807 42.1261 22.9838 41.9685 24.0868 41.8898C24.6384 41.811 25.1899 41.7322 25.7415 41.811C26.3718 41.811 27.0021 41.9685 27.5536 42.0473C29.0507 42.3625 30.6265 42.6777 32.1235 42.9928L30.4689 42.8353C31.8084 43.1504 33.3842 43.6232 33.9357 44.8838C34.1721 45.2778 34.1721 45.8293 34.1721 46.3021Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M28.3416 42.5203C27.7901 44.6476 28.2628 46.9326 29.6023 48.7448C29.6811 48.8236 29.7599 48.9811 29.9175 48.9024C29.9962 48.9024 29.9962 48.8236 30.075 48.7448C30.3114 48.1932 30.3902 47.5629 30.469 47.0114C30.6266 45.6719 31.0993 43.5446 30.6266 42.2051C30.075 40.9445 28.578 41.496 28.3416 42.5203Z" fill="#737373"/>
+<path d="M38.1115 27.3921C37.4812 28.2588 36.6933 28.9679 35.9842 29.7558C31.8082 34.2469 29.8385 40.4714 28.6566 46.5383C28.3414 48.1141 28.1839 49.8475 29.1294 51.0294C29.6021 51.5809 30.2324 51.9749 30.8628 52.2901C31.887 52.8416 32.8325 53.3931 33.8568 53.9447C35.0387 54.575 36.2993 55.2841 37.6388 55.3629C39.2146 55.4417 40.7904 54.6538 41.9723 53.5507C43.1542 52.4476 43.9421 51.0294 44.73 49.6112C46.6998 45.9868 48.512 42.2836 50.0878 38.5016C50.5605 37.3985 51.0333 36.2167 51.1909 35.0348C51.4272 33.3014 51.0333 31.568 50.7181 29.9134C50.6393 29.5194 50.5605 29.0467 50.2454 28.7315C49.8514 28.3376 49.2211 28.3376 48.7483 28.4164C45.2815 28.5739 41.7359 28.8891 38.4267 28.1012C37.7176 27.9436 36.9297 27.7072 36.5357 27.0769" fill="#1f1f1f"/>
+<path d="M38.1115 27.3921C37.4812 28.2588 36.6933 28.9679 35.9842 29.7558C31.8082 34.2469 29.8385 40.4714 28.6566 46.5383C28.3414 48.1141 28.1839 49.8475 29.1294 51.0294C29.6021 51.5809 30.2324 51.9749 30.8628 52.2901C31.887 52.8416 32.8325 53.3931 33.8568 53.9447C35.0387 54.575 36.2993 55.2841 37.6388 55.3629C39.2146 55.4417 40.7904 54.6538 41.9723 53.5507C43.1542 52.4476 43.9421 51.0294 44.73 49.6112C46.6998 45.9868 48.512 42.2836 50.0878 38.5016C50.5605 37.3985 51.0333 36.2167 51.1909 35.0348C51.4272 33.3014 51.0333 31.568 50.7181 29.9134C50.6393 29.5194 50.5605 29.0467 50.2454 28.7315C49.8514 28.3376 49.2211 28.3376 48.7483 28.4164C45.2815 28.5739 41.7359 28.8891 38.4267 28.1012C37.7176 27.9436 36.9297 27.7072 36.5357 27.0769" stroke="#737373" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M21.0927 50.084C20.6987 50.1628 20.3836 50.3203 19.9896 50.3991C19.9108 49.2961 19.7532 48.0354 19.4381 46.8535C19.1229 45.8292 18.729 44.8838 18.0986 43.9383C18.4138 43.7019 18.729 43.5443 19.0441 43.3867C19.6745 44.411 20.1472 45.4353 20.4624 46.5384C20.7775 47.7202 21.0139 48.9809 21.0927 50.084Z" fill="#737373"/>
+<path d="M31.8082 48.5083C31.493 49.2962 31.6506 48.2719 31.5718 49.2174C31.5718 50.0841 31.8081 50.9508 32.2809 51.7387C33.2264 53.0782 34.881 53.8661 36.4568 54.4176C37.8751 54.8904 39.3721 55.1267 40.7903 54.4176C42.5237 53.5509 43.8632 51.5023 43.7056 49.5326C43.548 46.9325 40.4752 45.593 38.1902 45.3566C35.3537 45.0415 33.9355 46.0658 31.7294 47.7204V48.5083H31.8082Z" fill="#737373"/>
+<path d="M53.7908 23.5314C53.7908 23.6102 53.712 23.7677 53.712 23.8465C53.3181 25.5799 52.8453 27.2346 52.6877 29.0467C52.6089 29.8347 52.7665 31.2529 51.9786 31.8044C51.3483 32.1984 50.2452 31.962 49.5361 31.962C47.3299 31.8044 45.2026 31.4105 42.9176 31.4105C42.7601 31.4105 42.6025 31.4105 42.3661 31.4105C41.5782 31.3317 40.8691 31.0165 40.2387 30.6226C39.372 30.2286 38.5841 29.7559 37.7174 29.4407C37.0083 29.2043 36.2204 29.0467 35.8264 28.4164C35.3537 27.7861 35.3537 26.9982 35.2749 26.2891C35.0385 23.9253 35.1173 21.404 35.7477 19.1191C36.1416 17.7008 36.9295 16.2826 38.1114 15.2583C40.7115 12.8946 44.8874 12.4218 48.1179 13.9976C50.4816 15.1795 52.5302 17.2281 53.4757 19.7494C53.8696 20.8525 54.0272 22.1919 53.7908 23.5314Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M53.7909 23.5315C53.7909 23.6103 53.7121 23.7679 53.7121 23.8466C53.3182 25.5801 52.8454 27.2347 52.6878 29.0469C52.6091 29.8348 52.7666 31.253 51.9787 31.8046C51.3484 32.1985 50.2453 31.9621 49.5362 31.9621C47.33 31.8046 45.2027 31.4106 42.9177 31.4106C42.7602 31.4106 42.6026 31.4106 42.3662 31.4106C43.3117 31.0166 44.336 31.0166 45.3603 30.8591C48.5907 30.3075 51.4272 28.0226 52.6878 25.0285C53.0818 24.083 53.3182 23.0587 53.397 22.0345C53.4758 21.2465 53.4758 20.4586 53.3182 19.7495C53.8697 20.8526 54.0273 22.192 53.7909 23.5315Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M46.6996 30.0716C45.8329 30.8595 44.8086 31.4111 43.7055 31.4111C41.8146 31.4111 39.8448 31.0171 38.1114 30.1504C37.5598 29.8353 37.0871 29.5201 36.6143 29.2049C36.378 28.9686 36.0628 28.7322 35.9052 28.4958C35.3537 27.8655 35.0385 27.1564 34.8809 26.2897C34.4082 24.4775 34.7234 22.2713 35.3537 20.5379C36.0628 18.7257 37.1659 18.0166 39.0569 17.9378C40.9479 17.7802 43.154 18.4105 44.9662 19.2772C45.045 19.356 45.1238 19.356 45.2026 19.4348C45.9905 19.8288 46.6996 20.3015 47.2511 20.8531C49.93 23.2956 49.2209 27.7079 46.6996 30.0716Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M42.5238 50.8722C42.5238 50.951 42.5238 50.951 42.5238 51.0298C42.5238 51.4238 42.445 51.7389 42.2874 52.0541C41.7359 53.5511 40.1601 54.4966 38.5843 54.9694C37.0084 55.4421 35.3538 55.5209 33.8568 55.9936C32.5961 56.3876 31.3355 56.9391 30.39 57.8058C30.1536 58.0422 29.9172 58.1998 29.7597 58.4362C29.7597 58.515 29.6809 58.515 29.6809 58.5938C27.9475 60.7211 27.4747 63.794 25.4261 65.685C25.2686 65.8425 25.111 65.9213 24.9534 66.0001C24.7958 66.0001 24.6382 65.9213 24.4807 65.9213C21.5654 64.6607 18.8865 63.0848 16.2076 61.4302C15.8136 61.1939 15.3409 60.8787 15.1045 60.4847C14.9469 60.1696 14.9469 59.8544 15.1045 59.5392C15.4985 58.3574 17.2319 56.9391 18.0198 56.624C18.8865 56.3088 19.9108 56.3876 20.7775 56.7028C21.6442 57.0179 22.5109 57.5695 23.22 58.121C23.3776 57.0179 23.6927 55.8361 24.1655 54.8118C24.3231 54.4966 24.4807 54.1815 24.6382 53.8663C24.7958 53.5511 25.0322 53.3147 25.1898 52.9996C25.6625 52.2905 26.2929 51.6601 26.9232 51.1086C27.7899 50.3207 28.7354 49.6116 29.6809 48.9812C31.0991 48.0357 32.5961 47.169 34.172 46.7751C34.4083 46.6963 34.6447 46.6963 34.8811 46.6175C36.4569 46.3023 38.1903 46.5387 39.6873 47.169C40.554 47.4842 41.342 48.0357 41.8935 48.7449C42.2874 49.2964 42.5238 50.0843 42.5238 50.8722Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M30.3112 57.8055C30.0749 58.0419 29.8385 58.1995 29.6809 58.4359C29.6809 58.5146 29.6021 58.5146 29.6021 58.5934C28.6566 57.4116 27.5535 56.4661 26.2929 55.757C25.7414 55.4418 25.111 55.2054 24.4807 54.969C24.4019 54.8902 24.2443 54.8902 24.1655 54.8115C24.3231 54.4963 24.4807 54.1811 24.6383 53.866C24.7171 53.866 24.7959 53.9448 24.8746 53.9448C25.505 54.1811 26.2141 54.4175 26.8444 54.8115C28.1051 55.5206 29.3657 56.5449 30.3112 57.8055Z" fill="#737373"/>
+<path d="M66.2398 37.2411C66.2398 37.3199 66.2398 37.4775 66.161 37.5563C65.9247 38.423 65.058 38.8958 64.1913 39.0533C63.9549 39.1321 63.6397 39.1321 63.4033 39.1321C62.773 39.2109 62.2215 39.2109 61.5911 39.3685C60.9608 39.5261 60.3305 39.92 59.7002 40.2352C59.0698 40.5504 58.3607 40.7867 57.7304 40.9443C57.3364 41.0231 56.9425 41.1019 56.5485 41.1807C54.8151 41.4171 53.0817 41.2595 51.4271 40.708C50.4028 40.3928 49.6149 39.5261 49.1422 38.423C48.433 36.6896 48.5906 34.4835 50.2452 33.4592C52.3726 32.1197 53.712 34.0107 55.4454 34.7986C55.7606 34.9562 56.0758 35.035 56.3909 35.1138C56.7849 35.1926 57.1788 35.1926 57.5728 35.1926C58.4395 35.1138 59.3062 34.8774 60.0941 34.4835C61.5124 33.7743 62.773 32.6713 64.0337 31.647C64.27 31.4894 64.5064 31.253 64.8216 31.3318C65.1367 31.4106 65.2943 31.8046 65.2943 32.1985V32.2773C65.2155 32.5925 65.058 32.9076 64.9792 33.2228C64.8216 34.641 66.3974 35.9017 66.2398 37.2411Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M65.6102 40.6295L59.7796 11.9495C59.7008 11.6343 59.9372 11.398 60.1736 11.3192C60.4887 11.2404 60.7251 11.4767 60.8039 11.7131L66.6344 40.3931C66.7132 40.7082 66.4769 40.9446 66.2405 41.0234C66.0041 41.1022 65.6889 40.8658 65.6102 40.6295Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M66.1616 37.5562C65.9253 38.4229 65.0586 38.8956 64.1919 39.0532C63.9555 39.132 63.6403 39.132 63.404 39.132C63.404 39.0532 63.3252 38.9744 63.3252 38.8956C63.1676 38.5805 63.2464 38.1865 63.5615 37.9501C63.3252 37.8713 63.0888 37.7925 63.01 37.5562C62.8524 37.1622 63.01 36.6895 63.404 36.5319L63.6403 36.4531C63.5615 36.4531 63.4828 36.4531 63.4828 36.4531C63.1676 36.4531 62.9312 36.2955 62.7736 35.9803C62.6161 35.5864 62.7736 35.1924 63.0888 34.9561C62.9312 34.8773 62.6948 34.7197 62.6161 34.5621C62.4585 34.1682 62.6161 33.6954 63.01 33.5378L65.5313 32.356C65.4525 32.6711 65.2949 32.9863 65.2162 33.3014C64.8222 34.7197 66.6344 36.0591 66.1616 37.5562Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M67.4216 36.7685C67.3428 36.5321 67.1064 36.3745 66.8701 36.3745L67.1064 36.2958C67.5004 36.1382 67.658 35.6654 67.5004 35.2715C67.3428 34.9563 66.9488 34.7987 66.6337 34.8775L66.7913 34.7987C67.1852 34.6411 67.3428 34.1684 67.1852 33.7744C67.1064 33.5381 66.9489 33.4593 66.7125 33.3805C67.0276 33.1441 67.1852 32.7502 67.0276 32.3562C66.8701 31.9622 66.3973 31.8047 66.0034 31.9622L63.3245 33.2229C62.9305 33.3805 62.7729 33.8532 62.9305 34.2472C63.0093 34.4836 63.1669 34.5623 63.4032 34.6411C63.0881 34.8775 62.9305 35.2715 63.0881 35.6654C63.2457 35.9806 63.6396 36.1382 63.9548 36.0594L63.7184 36.1382C63.3245 36.2958 63.1669 36.7685 63.3245 37.1625C63.4032 37.3988 63.6396 37.5564 63.876 37.5564C63.5608 37.7928 63.482 38.1867 63.6396 38.5019C63.7972 38.8959 64.2699 39.0534 64.6639 38.8959L67.0276 37.7928C67.4216 37.6352 67.5792 37.2412 67.4216 36.7685Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path opacity="0.4" d="M43.7846 22.4287C43.4695 22.9014 42.8391 23.059 42.3664 22.8226C42.2088 22.7438 41.9724 22.665 41.8149 22.5862C39.6087 21.7195 37.245 22.2711 36.6146 23.9257C36.4571 24.3196 35.9055 24.2408 35.9055 23.8469C35.8267 23.2954 35.9055 22.665 36.1419 22.1135C36.9298 19.9861 39.5299 19.0406 41.9724 19.9861C42.6028 20.2225 43.1543 20.6165 43.6271 21.0104C44.021 21.4044 44.021 21.9559 43.7846 22.4287Z" fill="#737373"/>
+<path opacity="0.4" d="M36.2208 34.4835C37.7966 35.2714 41.0271 36.2956 42.9968 36.4532C43.3908 36.532 43.5484 36.8472 43.4696 37.2411C42.1301 40.3928 41.0271 43.5444 40.6331 44.7263C40.5543 45.0415 40.2392 45.199 40.0028 45.1203C38.5845 44.7263 34.645 43.6232 33.0692 42.9929C32.754 42.9141 32.6752 42.5989 32.754 42.2838C34.0935 38.9745 35.0389 36.0593 35.4329 34.7986C35.5905 34.4835 35.9844 34.3259 36.2208 34.4835Z" fill="#737373"/>
+<path d="M57.8097 40.8655C57.4158 40.9443 57.0218 41.0231 56.6278 41.1019C55.9975 40.1564 55.6036 38.8957 55.6824 37.6351C55.7611 36.926 55.9975 35.9017 56.4703 35.1138C56.8642 35.1926 57.2582 35.1926 57.6521 35.1926C57.1794 35.9017 56.7854 36.926 56.7066 37.7139C56.6278 38.8957 57.1006 40.1564 57.8097 40.8655Z" fill="#737373"/>
+<path d="M29.8384 30.6228C28.4202 31.5683 27.1595 32.7501 26.0565 34.0896C25.8201 33.8532 25.5049 33.538 25.2686 33.3017C26.2928 32.041 27.5535 30.9379 28.8929 29.9924L29.8384 30.6228Z" fill="#737373"/>
+<path d="M81.0531 22.2708C73.6468 19.8283 70.5739 29.1257 63.01 25.1861L60.3311 12.1068C68.5253 15.5736 71.677 7.69449 78.3742 9.19152L81.0531 22.2708Z" fill="#1f1f1f" stroke="#737373" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+</svg>
diff --git a/packages/hoppscotch-desktop/public/logo.svg b/packages/hoppscotch-desktop/public/logo.svg
new file mode 100644
index 000000000..d78a86ba7
--- /dev/null
+++ b/packages/hoppscotch-desktop/public/logo.svg
@@ -0,0 +1,50 @@
+<svg width="824" height="824" viewBox="0 0 824 824" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="824" height="824" rx="184" fill="#08110F"/>
+<rect width="824" height="824" rx="184" fill="url(#paint0_radial_0_21)" fill-opacity="0.5"/>
+<path d="M435.425 463.217C429.441 476.657 411.033 481.515 394.309 474.07C377.585 466.624 368.879 449.693 374.863 436.253C380.846 422.813 399.254 417.954 415.978 425.4C432.702 432.846 441.409 449.777 435.425 463.217Z" fill="url(#paint1_linear_0_21)"/>
+<path d="M435.425 463.217C429.441 476.657 411.033 481.515 394.309 474.07C377.585 466.624 368.879 449.693 374.863 436.253C380.846 422.813 399.254 417.954 415.978 425.4C432.702 432.846 441.409 449.777 435.425 463.217Z" fill="url(#paint2_radial_0_21)" style="mix-blend-mode:soft-light"/>
+<path d="M535.563 521.172C553.071 526.191 570.536 518.856 574.571 504.789C578.606 490.722 567.684 475.251 550.175 470.232C532.666 465.213 515.201 472.548 511.166 486.615C507.131 500.682 518.054 516.153 535.563 521.172Z" fill="url(#paint3_linear_0_21)"/>
+<path d="M535.563 521.172C553.071 526.191 570.536 518.856 574.571 504.789C578.606 490.722 567.684 475.251 550.175 470.232C532.666 465.213 515.201 472.548 511.166 486.615C507.131 500.682 518.054 516.153 535.563 521.172Z" fill="url(#paint4_radial_0_21)" style="mix-blend-mode:soft-light"/>
+<path d="M292.782 355.633C308.227 365.286 314.462 383.173 306.709 395.584C298.955 407.995 280.149 410.231 264.704 400.578C249.258 390.924 243.023 373.037 250.777 360.626C258.53 348.215 277.337 345.98 292.782 355.633Z" fill="url(#paint5_linear_0_21)"/>
+<path d="M292.782 355.633C308.227 365.286 314.462 383.173 306.709 395.584C298.955 407.995 280.149 410.231 264.704 400.578C249.258 390.924 243.023 373.037 250.777 360.626C258.53 348.215 277.337 345.98 292.782 355.633Z" fill="url(#paint6_radial_0_21)" style="mix-blend-mode:soft-light"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M502.355 231.325C581.373 266.506 632.095 343.263 634.119 429.03C680.633 465.639 726.858 516.883 705.36 565.168C681.25 619.319 595.382 617.091 497.781 589.689C450.767 615.718 392.444 620.168 339.689 596.68C286.934 573.192 251.229 526.908 239.1 474.517C153.428 420.321 94.3151 357.999 118.425 303.847C139.923 255.562 208.935 255.626 267.265 265.697C332.356 209.81 423.338 196.144 502.355 231.325ZM159.38 322.082C147.667 348.389 210.578 423.052 382.845 499.751C555.111 576.449 652.693 573.241 664.405 546.934C674.099 525.16 634.213 483.308 588.537 450.878C553.009 425.484 504.344 397.494 440.864 369.231C423.586 361.538 416.839 341.008 424.104 324.691C431.369 308.374 447.329 297.463 480.93 295.91C496.747 295.862 498.823 291.476 499.546 287.716C500.442 281.915 492.401 276.002 484.108 272.31C418.17 242.953 337.453 255.265 281.503 314.178C226.84 301.933 169.074 300.309 159.38 322.082Z" fill="url(#paint7_linear_0_21)"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M502.355 231.325C581.373 266.506 632.095 343.263 634.119 429.03C680.633 465.639 726.858 516.883 705.36 565.168C681.25 619.319 595.382 617.091 497.781 589.689C450.767 615.718 392.444 620.168 339.689 596.68C286.934 573.192 251.229 526.908 239.1 474.517C153.428 420.321 94.3151 357.999 118.425 303.847C139.923 255.562 208.935 255.626 267.265 265.697C332.356 209.81 423.338 196.144 502.355 231.325ZM159.38 322.082C147.667 348.389 210.578 423.052 382.845 499.751C555.111 576.449 652.693 573.241 664.405 546.934C674.099 525.16 634.213 483.308 588.537 450.878C553.009 425.484 504.344 397.494 440.864 369.231C423.586 361.538 416.839 341.008 424.104 324.691C431.369 308.374 447.329 297.463 480.93 295.91C496.747 295.862 498.823 291.476 499.546 287.716C500.442 281.915 492.401 276.002 484.108 272.31C418.17 242.953 337.453 255.265 281.503 314.178C226.84 301.933 169.074 300.309 159.38 322.082Z" fill="url(#paint8_radial_0_21)" style="mix-blend-mode:soft-light"/>
+<defs>
+<radialGradient id="paint0_radial_0_21" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(814.524 12.36) rotate(125.613) scale(1089.59 1210.34)">
+<stop stop-color="#00D196" stop-opacity="0.5"/>
+<stop offset="0.996771" stop-color="#00D196" stop-opacity="0"/>
+</radialGradient>
+<linearGradient id="paint1_linear_0_21" x1="411.893" y1="212" x2="411.893" y2="612" gradientUnits="userSpaceOnUse">
+<stop stop-color="#00D196"/>
+<stop offset="1" stop-color="#00B381"/>
+</linearGradient>
+<radialGradient id="paint2_radial_0_21" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(644.721 344.481) rotate(159.984) scale(631.37 385.135)">
+<stop stop-color="white"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</radialGradient>
+<linearGradient id="paint3_linear_0_21" x1="411.893" y1="212" x2="411.893" y2="612" gradientUnits="userSpaceOnUse">
+<stop stop-color="#00D196"/>
+<stop offset="1" stop-color="#00B381"/>
+</linearGradient>
+<radialGradient id="paint4_radial_0_21" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(644.721 344.481) rotate(159.984) scale(631.37 385.135)">
+<stop stop-color="white"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</radialGradient>
+<linearGradient id="paint5_linear_0_21" x1="411.893" y1="212" x2="411.893" y2="612" gradientUnits="userSpaceOnUse">
+<stop stop-color="#00D196"/>
+<stop offset="1" stop-color="#00B381"/>
+</linearGradient>
+<radialGradient id="paint6_radial_0_21" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(644.721 344.481) rotate(159.984) scale(631.37 385.135)">
+<stop stop-color="white"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</radialGradient>
+<linearGradient id="paint7_linear_0_21" x1="411.893" y1="212" x2="411.893" y2="612" gradientUnits="userSpaceOnUse">
+<stop stop-color="#00D196"/>
+<stop offset="1" stop-color="#00B381"/>
+</linearGradient>
+<radialGradient id="paint8_radial_0_21" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(644.721 344.481) rotate(159.984) scale(631.37 385.135)">
+<stop stop-color="white"/>
+<stop offset="1" stop-color="white" stop-opacity="0"/>
+</radialGradient>
+</defs>
+</svg>
diff --git a/packages/hoppscotch-desktop/public/tauri.svg b/packages/hoppscotch-desktop/public/tauri.svg
new file mode 100644
index 000000000..31b62c928
--- /dev/null
+++ b/packages/hoppscotch-desktop/public/tauri.svg
@@ -0,0 +1,6 @@
+<svg width="206" height="231" viewBox="0 0 206 231" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M143.143 84C143.143 96.1503 133.293 106 121.143 106C108.992 106 99.1426 96.1503 99.1426 84C99.1426 71.8497 108.992 62 121.143 62C133.293 62 143.143 71.8497 143.143 84Z" fill="#FFC131"/>
+<ellipse cx="84.1426" cy="147" rx="22" ry="22" transform="rotate(180 84.1426 147)" fill="#24C8DB"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M166.738 154.548C157.86 160.286 148.023 164.269 137.757 166.341C139.858 160.282 141 153.774 141 147C141 144.543 140.85 142.121 140.558 139.743C144.975 138.204 149.215 136.139 153.183 133.575C162.73 127.404 170.292 118.608 174.961 108.244C179.63 97.8797 181.207 86.3876 179.502 75.1487C177.798 63.9098 172.884 53.4021 165.352 44.8883C157.82 36.3744 147.99 30.2165 137.042 27.1546C126.095 24.0926 114.496 24.2568 103.64 27.6274C92.7839 30.998 83.1319 37.4317 75.8437 46.1553C74.9102 47.2727 74.0206 48.4216 73.176 49.5993C61.9292 50.8488 51.0363 54.0318 40.9629 58.9556C44.2417 48.4586 49.5653 38.6591 56.679 30.1442C67.0505 17.7298 80.7861 8.57426 96.2354 3.77762C111.685 -1.01901 128.19 -1.25267 143.769 3.10474C159.348 7.46215 173.337 16.2252 184.056 28.3411C194.775 40.457 201.767 55.4101 204.193 71.404C206.619 87.3978 204.374 103.752 197.73 118.501C191.086 133.25 180.324 145.767 166.738 154.548ZM41.9631 74.275L62.5557 76.8042C63.0459 72.813 63.9401 68.9018 65.2138 65.1274C57.0465 67.0016 49.2088 70.087 41.9631 74.275Z" fill="#FFC131"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M38.4045 76.4519C47.3493 70.6709 57.2677 66.6712 67.6171 64.6132C65.2774 70.9669 64 77.8343 64 85.0001C64 87.1434 64.1143 89.26 64.3371 91.3442C60.0093 92.8732 55.8533 94.9092 51.9599 97.4256C42.4128 103.596 34.8505 112.392 30.1816 122.756C25.5126 133.12 23.9357 144.612 25.6403 155.851C27.3449 167.09 32.2584 177.598 39.7906 186.112C47.3227 194.626 57.153 200.784 68.1003 203.846C79.0476 206.907 90.6462 206.743 101.502 203.373C112.359 200.002 122.011 193.568 129.299 184.845C130.237 183.722 131.131 182.567 131.979 181.383C143.235 180.114 154.132 176.91 164.205 171.962C160.929 182.49 155.596 192.319 148.464 200.856C138.092 213.27 124.357 222.426 108.907 227.222C93.458 232.019 76.9524 232.253 61.3736 227.895C45.7948 223.538 31.8055 214.775 21.0867 202.659C10.3679 190.543 3.37557 175.59 0.949823 159.596C-1.47592 143.602 0.768139 127.248 7.41237 112.499C14.0566 97.7497 24.8183 85.2327 38.4045 76.4519ZM163.062 156.711L163.062 156.711C162.954 156.773 162.846 156.835 162.738 156.897C162.846 156.835 162.954 156.773 163.062 156.711Z" fill="#24C8DB"/>
+</svg>
diff --git a/packages/hoppscotch-desktop/public/vite.svg b/packages/hoppscotch-desktop/public/vite.svg
new file mode 100644
index 000000000..e7b8dfb1b
--- /dev/null
+++ b/packages/hoppscotch-desktop/public/vite.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
\ No newline at end of file
diff --git a/packages/hoppscotch-desktop/src-tauri/.gitignore b/packages/hoppscotch-desktop/src-tauri/.gitignore
new file mode 100644
index 000000000..b21bd681d
--- /dev/null
+++ b/packages/hoppscotch-desktop/src-tauri/.gitignore
@@ -0,0 +1,7 @@
+# Generated by Cargo
+# will have compiled files and executables
+/target/
+
+# Generated by Tauri
+# will have schema files for capabilities auto-completion
+/gen/schemas
diff --git a/packages/hoppscotch-desktop/src-tauri/Cargo.lock b/packages/hoppscotch-desktop/src-tauri/Cargo.lock
new file mode 100644
index 000000000..54a68d584
--- /dev/null
+++ b/packages/hoppscotch-desktop/src-tauri/Cargo.lock
@@ -0,0 +1,6924 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "addr2line"
+version = "0.24.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler2"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
+
+[[package]]
+name = "aes"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
+dependencies = [
+ "cfg-if",
+ "cipher",
+ "cpufeatures",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "alloc-no-stdlib"
+version = "2.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
+
+[[package]]
+name = "alloc-stdlib"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
+dependencies = [
+ "alloc-no-stdlib",
+]
+
+[[package]]
+name = "allocator-api2"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
+
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "anstream"
+version = "0.6.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is_terminal_polyfill",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
+dependencies = [
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125"
+dependencies = [
+ "anstyle",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "anyhow"
+version = "1.0.94"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7"
+
+[[package]]
+name = "arbitrary"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223"
+dependencies = [
+ "derive_arbitrary",
+]
+
+[[package]]
+name = "arrayref"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"
+
+[[package]]
+name = "arrayvec"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
+
+[[package]]
+name = "ashpd"
+version = "0.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4d43c03d9e36dd40cab48435be0b09646da362c278223ca535493877b2c1dee9"
+dependencies = [
+ "enumflags2",
+ "futures-channel",
+ "futures-util",
+ "rand 0.8.5",
+ "raw-window-handle",
+ "serde",
+ "serde_repr",
+ "tokio",
+ "url",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-protocols",
+ "zbus",
+]
+
+[[package]]
+name = "async-broadcast"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e"
+dependencies = [
+ "event-listener",
+ "event-listener-strategy",
+ "futures-core",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "async-channel"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a"
+dependencies = [
+ "concurrent-queue",
+ "event-listener-strategy",
+ "futures-core",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "async-io"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059"
+dependencies = [
+ "async-lock",
+ "cfg-if",
+ "concurrent-queue",
+ "futures-io",
+ "futures-lite",
+ "parking",
+ "polling",
+ "rustix",
+ "slab",
+ "tracing",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "async-lock"
+version = "3.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18"
+dependencies = [
+ "event-listener",
+ "event-listener-strategy",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "async-process"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb"
+dependencies = [
+ "async-channel",
+ "async-io",
+ "async-lock",
+ "async-signal",
+ "async-task",
+ "blocking",
+ "cfg-if",
+ "event-listener",
+ "futures-lite",
+ "rustix",
+ "tracing",
+]
+
+[[package]]
+name = "async-recursion"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "async-signal"
+version = "0.2.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3"
+dependencies = [
+ "async-io",
+ "async-lock",
+ "atomic-waker",
+ "cfg-if",
+ "futures-core",
+ "futures-io",
+ "rustix",
+ "signal-hook-registry",
+ "slab",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "async-task"
+version = "4.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
+
+[[package]]
+name = "async-trait"
+version = "0.1.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "atk"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b"
+dependencies = [
+ "atk-sys",
+ "glib",
+ "libc",
+]
+
+[[package]]
+name = "atk-sys"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+
+[[package]]
+name = "axum"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d6fd624c75e18b3b4c6b9caf42b1afe24437daaee904069137d8bab077be8b8"
+dependencies = [
+ "axum-core",
+ "bytes",
+ "form_urlencoded",
+ "futures-util",
+ "http",
+ "http-body",
+ "http-body-util",
+ "hyper",
+ "hyper-util",
+ "itoa 1.0.14",
+ "matchit",
+ "memchr",
+ "mime",
+ "percent-encoding",
+ "pin-project-lite",
+ "rustversion",
+ "serde",
+ "serde_json",
+ "serde_path_to_error",
+ "serde_urlencoded",
+ "sync_wrapper",
+ "tokio",
+ "tower",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "axum-core"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df1362f362fd16024ae199c1970ce98f9661bf5ef94b9808fee734bc3698b733"
+dependencies = [
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "http-body-util",
+ "mime",
+ "pin-project-lite",
+ "rustversion",
+ "sync_wrapper",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "backtrace"
+version = "0.3.74"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"
+dependencies = [
+ "addr2line",
+ "cfg-if",
+ "libc",
+ "miniz_oxide",
+ "object",
+ "rustc-demangle",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "base64"
+version = "0.21.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
+
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
+[[package]]
+name = "base64ct"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "blake3"
+version = "1.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e"
+dependencies = [
+ "arrayref",
+ "arrayvec",
+ "cc",
+ "cfg-if",
+ "constant_time_eq",
+ "serde",
+]
+
+[[package]]
+name = "block"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
+
+[[package]]
+name = "block-buffer"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "block2"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f"
+dependencies = [
+ "objc2",
+]
+
+[[package]]
+name = "blocking"
+version = "1.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea"
+dependencies = [
+ "async-channel",
+ "async-task",
+ "futures-io",
+ "futures-lite",
+ "piper",
+]
+
+[[package]]
+name = "brotli"
+version = "7.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd"
+dependencies = [
+ "alloc-no-stdlib",
+ "alloc-stdlib",
+ "brotli-decompressor",
+]
+
+[[package]]
+name = "brotli-decompressor"
+version = "4.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362"
+dependencies = [
+ "alloc-no-stdlib",
+ "alloc-stdlib",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
+
+[[package]]
+name = "bytemuck"
+version = "1.20.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "bytes"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "bzip2"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
+dependencies = [
+ "bzip2-sys",
+ "libc",
+]
+
+[[package]]
+name = "bzip2-sys"
+version = "0.1.11+1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+]
+
+[[package]]
+name = "cairo-rs"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2"
+dependencies = [
+ "bitflags 2.6.0",
+ "cairo-sys-rs",
+ "glib",
+ "libc",
+ "once_cell",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "cairo-sys-rs"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51"
+dependencies = [
+ "glib-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "camino"
+version = "1.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "cargo-platform"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "cargo_metadata"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037"
+dependencies = [
+ "camino",
+ "cargo-platform",
+ "semver",
+ "serde",
+ "serde_json",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "cargo_toml"
+version = "0.17.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719"
+dependencies = [
+ "serde",
+ "toml 0.8.2",
+]
+
+[[package]]
+name = "cc"
+version = "1.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf"
+dependencies = [
+ "jobserver",
+ "libc",
+ "shlex",
+]
+
+[[package]]
+name = "cesu8"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
+
+[[package]]
+name = "cfb"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f"
+dependencies = [
+ "byteorder",
+ "fnv",
+ "uuid",
+]
+
+[[package]]
+name = "cfg-expr"
+version = "0.15.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
+dependencies = [
+ "smallvec",
+ "target-lexicon",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "cfg_aliases"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
+
+[[package]]
+name = "chrono"
+version = "0.4.39"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "serde",
+ "wasm-bindgen",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "cipher"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
+dependencies = [
+ "crypto-common",
+ "inout",
+]
+
+[[package]]
+name = "cocoa"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2"
+dependencies = [
+ "bitflags 2.6.0",
+ "block",
+ "cocoa-foundation",
+ "core-foundation 0.10.0",
+ "core-graphics",
+ "foreign-types 0.5.0",
+ "libc",
+ "objc",
+]
+
+[[package]]
+name = "cocoa-foundation"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d"
+dependencies = [
+ "bitflags 2.6.0",
+ "block",
+ "core-foundation 0.10.0",
+ "core-graphics-types",
+ "libc",
+ "objc",
+]
+
+[[package]]
+name = "colorchoice"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
+
+[[package]]
+name = "combine"
+version = "4.6.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd"
+dependencies = [
+ "bytes",
+ "memchr",
+]
+
+[[package]]
+name = "concurrent-queue"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "const-oid"
+version = "0.9.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
+
+[[package]]
+name = "const-random"
+version = "0.1.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359"
+dependencies = [
+ "const-random-macro",
+]
+
+[[package]]
+name = "const-random-macro"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e"
+dependencies = [
+ "getrandom 0.2.15",
+ "once_cell",
+ "tiny-keccak",
+]
+
+[[package]]
+name = "constant_time_eq"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6"
+
+[[package]]
+name = "convert_case"
+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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+
+[[package]]
+name = "core-graphics"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1"
+dependencies = [
+ "bitflags 2.6.0",
+ "core-foundation 0.10.0",
+ "core-graphics-types",
+ "foreign-types 0.5.0",
+ "libc",
+]
+
+[[package]]
+name = "core-graphics-types"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb"
+dependencies = [
+ "bitflags 2.6.0",
+ "core-foundation 0.10.0",
+ "libc",
+]
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc"
+version = "3.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
+dependencies = [
+ "crc-catalog",
+]
+
+[[package]]
+name = "crc-catalog"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
+
+[[package]]
+name = "crc32fast"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crossbeam-channel"
+version = "0.5.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
+dependencies = [
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
+
+[[package]]
+name = "crunchy"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "cssparser"
+version = "0.27.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a"
+dependencies = [
+ "cssparser-macros",
+ "dtoa-short",
+ "itoa 0.4.8",
+ "matches",
+ "phf 0.8.0",
+ "proc-macro2",
+ "quote",
+ "smallvec",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "cssparser-macros"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
+dependencies = [
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "ctor"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501"
+dependencies = [
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "curl"
+version = "0.4.47"
+source = "git+https://github.com/CuriousCorrelation/curl-rust.git#1ec8079cf527b9cf47cc7a48c68b458affdae273"
+dependencies = [
+ "curl-sys",
+ "libc",
+ "openssl-probe",
+ "openssl-sys",
+ "socket2",
+]
+
+[[package]]
+name = "curl-sys"
+version = "0.4.77+curl-8.10.1"
+source = "git+https://github.com/CuriousCorrelation/curl-rust.git#1ec8079cf527b9cf47cc7a48c68b458affdae273"
+dependencies = [
+ "cc",
+ "libc",
+ "libz-sys",
+ "openssl-sys",
+ "pkg-config",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "curve25519-dalek"
+version = "4.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "curve25519-dalek-derive",
+ "digest",
+ "fiat-crypto",
+ "rustc_version",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "curve25519-dalek-derive"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "darling"
+version = "0.20.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
+dependencies = [
+ "darling_core",
+ "darling_macro",
+]
+
+[[package]]
+name = "darling_core"
+version = "0.20.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
+dependencies = [
+ "fnv",
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "strsim",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "darling_macro"
+version = "0.20.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
+dependencies = [
+ "darling_core",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "dashmap"
+version = "6.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf"
+dependencies = [
+ "cfg-if",
+ "crossbeam-utils",
+ "hashbrown 0.14.5",
+ "lock_api",
+ "once_cell",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "deflate64"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b"
+
+[[package]]
+name = "der"
+version = "0.7.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0"
+dependencies = [
+ "const-oid",
+ "zeroize",
+]
+
+[[package]]
+name = "deranged"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+dependencies = [
+ "powerfmt",
+ "serde",
+]
+
+[[package]]
+name = "derivative"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "derive_arbitrary"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "derive_more"
+version = "0.99.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce"
+dependencies = [
+ "convert_case",
+ "proc-macro2",
+ "quote",
+ "rustc_version",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+dependencies = [
+ "block-buffer",
+ "crypto-common",
+ "subtle",
+]
+
+[[package]]
+name = "dirs"
+version = "5.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
+dependencies = [
+ "dirs-sys",
+]
+
+[[package]]
+name = "dirs-sys"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
+dependencies = [
+ "libc",
+ "option-ext",
+ "redox_users",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "dispatch"
+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.90",
+]
+
+[[package]]
+name = "dlib"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412"
+dependencies = [
+ "libloading 0.8.6",
+]
+
+[[package]]
+name = "dlopen2"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e1297103d2bbaea85724fcee6294c2d50b1081f9ad47d0f6f6f61eda65315a6"
+dependencies = [
+ "dlopen2_derive",
+ "libc",
+ "once_cell",
+ "winapi",
+]
+
+[[package]]
+name = "dlopen2_derive"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "dlv-list"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f"
+dependencies = [
+ "const-random",
+]
+
+[[package]]
+name = "downcast-rs"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"
+
+[[package]]
+name = "dpi"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "dtoa"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653"
+
+[[package]]
+name = "dtoa-short"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87"
+dependencies = [
+ "dtoa",
+]
+
+[[package]]
+name = "dunce"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
+
+[[package]]
+name = "dyn-clone"
+version = "1.0.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
+
+[[package]]
+name = "ed25519"
+version = "2.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53"
+dependencies = [
+ "pkcs8",
+ "serde",
+ "signature",
+]
+
+[[package]]
+name = "ed25519-dalek"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871"
+dependencies = [
+ "curve25519-dalek",
+ "ed25519",
+ "rand_core 0.6.4",
+ "serde",
+ "sha2",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "either"
+version = "1.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
+
+[[package]]
+name = "embed-resource"
+version = "2.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b68b6f9f63a0b6a38bc447d4ce84e2b388f3ec95c99c641c8ff0dd3ef89a6379"
+dependencies = [
+ "cc",
+ "memchr",
+ "rustc_version",
+ "toml 0.8.2",
+ "vswhom",
+ "winreg",
+]
+
+[[package]]
+name = "embed_plist"
+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 = "endi"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf"
+
+[[package]]
+name = "enumflags2"
+version = "0.7.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d"
+dependencies = [
+ "enumflags2_derive",
+ "serde",
+]
+
+[[package]]
+name = "enumflags2_derive"
+version = "0.7.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "env_filter"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab"
+dependencies = [
+ "log",
+ "regex",
+]
+
+[[package]]
+name = "env_logger"
+version = "0.11.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "env_filter",
+ "humantime",
+ "log",
+]
+
+[[package]]
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
+name = "erased-serde"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d"
+dependencies = [
+ "serde",
+ "typeid",
+]
+
+[[package]]
+name = "errno"
+version = "0.3.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
+dependencies = [
+ "libc",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "event-listener"
+version = "5.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba"
+dependencies = [
+ "concurrent-queue",
+ "parking",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "event-listener-strategy"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2"
+dependencies = [
+ "event-listener",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "fastrand"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
+
+[[package]]
+name = "fdeflate"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"
+dependencies = [
+ "simd-adler32",
+]
+
+[[package]]
+name = "fiat-crypto"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
+
+[[package]]
+name = "field-offset"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
+dependencies = [
+ "memoffset",
+ "rustc_version",
+]
+
+[[package]]
+name = "filetime"
+version = "0.2.25"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "libredox",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "flate2"
+version = "1.0.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "foldhash"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2"
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"
+dependencies = [
+ "foreign-types-macros",
+ "foreign-types-shared 0.3.1",
+]
+
+[[package]]
+name = "foreign-types-macros"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "futf"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843"
+dependencies = [
+ "mac",
+ "new_debug_unreachable",
+]
+
+[[package]]
+name = "futures"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
+
+[[package]]
+name = "futures-executor"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-io"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
+
+[[package]]
+name = "futures-lite"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1"
+dependencies = [
+ "fastrand",
+ "futures-core",
+ "futures-io",
+ "parking",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "futures-macro"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
+
+[[package]]
+name = "futures-task"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
+
+[[package]]
+name = "futures-util"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "pin-utils",
+ "slab",
+]
+
+[[package]]
+name = "fxhash"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "gdk"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691"
+dependencies = [
+ "cairo-rs",
+ "gdk-pixbuf",
+ "gdk-sys",
+ "gio",
+ "glib",
+ "libc",
+ "pango",
+]
+
+[[package]]
+name = "gdk-pixbuf"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec"
+dependencies = [
+ "gdk-pixbuf-sys",
+ "gio",
+ "glib",
+ "libc",
+ "once_cell",
+]
+
+[[package]]
+name = "gdk-pixbuf-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7"
+dependencies = [
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gdk-sys"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7"
+dependencies = [
+ "cairo-sys-rs",
+ "gdk-pixbuf-sys",
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "pango-sys",
+ "pkg-config",
+ "system-deps",
+]
+
+[[package]]
+name = "gdkwayland-sys"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69"
+dependencies = [
+ "gdk-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "pkg-config",
+ "system-deps",
+]
+
+[[package]]
+name = "gdkx11"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe"
+dependencies = [
+ "gdk",
+ "gdkx11-sys",
+ "gio",
+ "glib",
+ "libc",
+ "x11",
+]
+
+[[package]]
+name = "gdkx11-sys"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d"
+dependencies = [
+ "gdk-sys",
+ "glib-sys",
+ "libc",
+ "system-deps",
+ "x11",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi 0.9.0+wasi-snapshot-preview1",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "gimli"
+version = "0.31.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
+
+[[package]]
+name = "gio"
+version = "0.18.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-util",
+ "gio-sys",
+ "glib",
+ "libc",
+ "once_cell",
+ "pin-project-lite",
+ "smallvec",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "gio-sys"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+ "winapi",
+]
+
+[[package]]
+name = "glib"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5"
+dependencies = [
+ "bitflags 2.6.0",
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-task",
+ "futures-util",
+ "gio-sys",
+ "glib-macros",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "memchr",
+ "once_cell",
+ "smallvec",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "glib-macros"
+version = "0.18.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc"
+dependencies = [
+ "heck 0.4.1",
+ "proc-macro-crate 2.0.2",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "glib-sys"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898"
+dependencies = [
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "glob"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
+
+[[package]]
+name = "gobject-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44"
+dependencies = [
+ "glib-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "gtk"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a"
+dependencies = [
+ "atk",
+ "cairo-rs",
+ "field-offset",
+ "futures-channel",
+ "gdk",
+ "gdk-pixbuf",
+ "gio",
+ "glib",
+ "gtk-sys",
+ "gtk3-macros",
+ "libc",
+ "pango",
+ "pkg-config",
+]
+
+[[package]]
+name = "gtk-sys"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414"
+dependencies = [
+ "atk-sys",
+ "cairo-sys-rs",
+ "gdk-pixbuf-sys",
+ "gdk-sys",
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "pango-sys",
+ "system-deps",
+]
+
+[[package]]
+name = "gtk3-macros"
+version = "0.18.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d"
+dependencies = [
+ "proc-macro-crate 1.3.1",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "h2"
+version = "0.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e"
+dependencies = [
+ "atomic-waker",
+ "bytes",
+ "fnv",
+ "futures-core",
+ "futures-sink",
+ "http",
+ "indexmap 2.7.0",
+ "slab",
+ "tokio",
+ "tokio-util",
+ "tracing",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+
+[[package]]
+name = "hashbrown"
+version = "0.14.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
+
+[[package]]
+name = "hashbrown"
+version = "0.15.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
+dependencies = [
+ "allocator-api2",
+ "equivalent",
+ "foldhash",
+]
+
+[[package]]
+name = "heck"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "hermit-abi"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc"
+
+[[package]]
+name = "hex"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
+
+[[package]]
+name = "hex_color"
+version = "3.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d37f101bf4c633f7ca2e4b5e136050314503dd198e78e325ea602c327c484ef0"
+dependencies = [
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "hmac"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
+dependencies = [
+ "digest",
+]
+
+[[package]]
+name = "hoppscotch-desktop"
+version = "0.1.0"
+dependencies = [
+ "axum",
+ "portpicker",
+ "serde",
+ "serde_json",
+ "tauri",
+ "tauri-build",
+ "tauri-plugin-appload",
+ "tauri-plugin-deep-link",
+ "tauri-plugin-dialog",
+ "tauri-plugin-fs",
+ "tauri-plugin-relay",
+ "tauri-plugin-shell",
+ "tauri-plugin-store",
+ "tauri-plugin-updater",
+ "tauri-plugin-window-state",
+ "tokio",
+ "tower-http",
+ "tracing",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "html5ever"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7"
+dependencies = [
+ "log",
+ "mac",
+ "markup5ever",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "http"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa 1.0.14",
+]
+
+[[package]]
+name = "http-body"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
+dependencies = [
+ "bytes",
+ "http",
+]
+
+[[package]]
+name = "http-body-util"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
+dependencies = [
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "http-serde"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0f056c8559e3757392c8d091e796416e4649d8e49e88b8d76df6c002f05027fd"
+dependencies = [
+ "http",
+ "serde",
+]
+
+[[package]]
+name = "httparse"
+version = "1.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946"
+
+[[package]]
+name = "httpdate"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
+
+[[package]]
+name = "humantime"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
+
+[[package]]
+name = "humantime-serde"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c"
+dependencies = [
+ "humantime",
+ "serde",
+]
+
+[[package]]
+name = "hyper"
+version = "1.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "h2",
+ "http",
+ "http-body",
+ "httparse",
+ "httpdate",
+ "itoa 1.0.14",
+ "pin-project-lite",
+ "smallvec",
+ "tokio",
+ "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",
+ "webpki-roots",
+]
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "http",
+ "http-body",
+ "hyper",
+ "pin-project-lite",
+ "socket2",
+ "tokio",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.61"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows-core 0.52.0",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "ico"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3804960be0bb5e4edb1e1ad67afd321a9ecfd875c3e65c099468fd2717d7cae"
+dependencies = [
+ "byteorder",
+ "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.90",
+]
+
+[[package]]
+name = "ident_case"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
+
+[[package]]
+name = "idna"
+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 = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71"
+dependencies = [
+ "icu_normalizer",
+ "icu_properties",
+]
+
+[[package]]
+name = "indexmap"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
+dependencies = [
+ "autocfg",
+ "hashbrown 0.12.3",
+ "serde",
+]
+
+[[package]]
+name = "indexmap"
+version = "2.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.15.2",
+ "serde",
+]
+
+[[package]]
+name = "infer"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc150e5ce2330295b8616ce0e3f53250e53af31759a9dbedad1621ba29151847"
+dependencies = [
+ "cfb",
+]
+
+[[package]]
+name = "inout"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "instant"
+version = "0.1.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "ipnet"
+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 = "is_terminal_polyfill"
+version = "1.70.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
+
+[[package]]
+name = "itoa"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
+
+[[package]]
+name = "itoa"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
+
+[[package]]
+name = "javascriptcore-rs"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc"
+dependencies = [
+ "bitflags 1.3.2",
+ "glib",
+ "javascriptcore-rs-sys",
+]
+
+[[package]]
+name = "javascriptcore-rs-sys"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "jni"
+version = "0.21.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97"
+dependencies = [
+ "cesu8",
+ "cfg-if",
+ "combine",
+ "jni-sys",
+ "log",
+ "thiserror 1.0.69",
+ "walkdir",
+ "windows-sys 0.45.0",
+]
+
+[[package]]
+name = "jni-sys"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
+
+[[package]]
+name = "jobserver"
+version = "0.1.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "js-sys"
+version = "0.3.76"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7"
+dependencies = [
+ "once_cell",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "json-patch"
+version = "3.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08"
+dependencies = [
+ "jsonptr",
+ "serde",
+ "serde_json",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "jsonptr"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5dea2b27dd239b2556ed7a25ba842fe47fd602e7fc7433c2a8d6106d4d9edd70"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "keyboard-types"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a"
+dependencies = [
+ "bitflags 2.6.0",
+ "serde",
+ "unicode-segmentation",
+]
+
+[[package]]
+name = "kuchikiki"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8"
+dependencies = [
+ "cssparser",
+ "html5ever",
+ "indexmap 1.9.3",
+ "matches",
+ "selectors",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+
+[[package]]
+name = "libappindicator"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a"
+dependencies = [
+ "glib",
+ "gtk",
+ "gtk-sys",
+ "libappindicator-sys",
+ "log",
+]
+
+[[package]]
+name = "libappindicator-sys"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf"
+dependencies = [
+ "gtk-sys",
+ "libloading 0.7.4",
+ "once_cell",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.168"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d"
+
+[[package]]
+name = "libloading"
+version = "0.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
+dependencies = [
+ "cfg-if",
+ "winapi",
+]
+
+[[package]]
+name = "libloading"
+version = "0.8.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
+dependencies = [
+ "cfg-if",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "libredox"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
+dependencies = [
+ "bitflags 2.6.0",
+ "libc",
+ "redox_syscall",
+]
+
+[[package]]
+name = "libz-sys"
+version = "1.1.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[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.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
+
+[[package]]
+name = "lock_api"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "lockfree-object-pool"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e"
+
+[[package]]
+name = "log"
+version = "0.4.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
+
+[[package]]
+name = "lru"
+version = "0.12.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
+dependencies = [
+ "hashbrown 0.15.2",
+]
+
+[[package]]
+name = "lzma-rs"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e"
+dependencies = [
+ "byteorder",
+ "crc",
+]
+
+[[package]]
+name = "mac"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
+
+[[package]]
+name = "malloc_buf"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "markup5ever"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016"
+dependencies = [
+ "log",
+ "phf 0.10.1",
+ "phf_codegen 0.10.0",
+ "string_cache",
+ "string_cache_codegen",
+ "tendril",
+]
+
+[[package]]
+name = "matchers"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
+dependencies = [
+ "regex-automata 0.1.10",
+]
+
+[[package]]
+name = "matches"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5"
+
+[[package]]
+name = "matchit"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3"
+
+[[package]]
+name = "memchr"
+version = "2.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+
+[[package]]
+name = "memoffset"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "mime"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
+
+[[package]]
+name = "mime-infer"
+version = "3.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91caed19dd472bc88bcd063571df18153529d49301a1918f4cf37f42332bee2e"
+dependencies = [
+ "mime",
+ "unicase",
+]
+
+[[package]]
+name = "mime_guess"
+version = "2.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
+dependencies = [
+ "mime",
+ "unicase",
+]
+
+[[package]]
+name = "minisign-verify"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6367d84fb54d4242af283086402907277715b8fe46976963af5ebf173f8efba3"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2ef2593ffb6958c941575cee70c8e257438749971869c4ae5acf6f91a168a61"
+dependencies = [
+ "adler2",
+ "simd-adler32",
+]
+
+[[package]]
+name = "mio"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd"
+dependencies = [
+ "libc",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "muda"
+version = "0.15.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fdae9c00e61cc0579bcac625e8ad22104c60548a025bfc972dc83868a28e1484"
+dependencies = [
+ "crossbeam-channel",
+ "dpi",
+ "gtk",
+ "keyboard-types",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "once_cell",
+ "png",
+ "serde",
+ "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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"
+dependencies = [
+ "bitflags 2.6.0",
+ "jni-sys",
+ "log",
+ "ndk-sys",
+ "num_enum",
+ "raw-window-handle",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "ndk-context"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
+
+[[package]]
+name = "ndk-sys"
+version = "0.6.0+11769913"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873"
+dependencies = [
+ "jni-sys",
+]
+
+[[package]]
+name = "new_debug_unreachable"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
+
+[[package]]
+name = "nix"
+version = "0.27.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053"
+dependencies = [
+ "bitflags 2.6.0",
+ "cfg-if",
+ "libc",
+ "memoffset",
+]
+
+[[package]]
+name = "nodrop"
+version = "0.1.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
+
+[[package]]
+name = "nu-ansi-term"
+version = "0.46.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
+dependencies = [
+ "overload",
+ "winapi",
+]
+
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "num_enum"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179"
+dependencies = [
+ "num_enum_derive",
+]
+
+[[package]]
+name = "num_enum_derive"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
+dependencies = [
+ "proc-macro-crate 2.0.2",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "objc"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
+dependencies = [
+ "malloc_buf",
+]
+
+[[package]]
+name = "objc-sys"
+version = "0.3.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "objc2"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804"
+dependencies = [
+ "objc-sys",
+ "objc2-encode",
+]
+
+[[package]]
+name = "objc2-app-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "libc",
+ "objc2",
+ "objc2-core-data",
+ "objc2-core-image",
+ "objc2-foundation",
+ "objc2-quartz-core",
+]
+
+[[package]]
+name = "objc2-cloud-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-core-location",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-contacts"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-core-data"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-core-image"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-foundation",
+ "objc2-metal",
+]
+
+[[package]]
+name = "objc2-core-location"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-contacts",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-encode"
+version = "4.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8"
+
+[[package]]
+name = "objc2-foundation"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "dispatch",
+ "libc",
+ "objc2",
+]
+
+[[package]]
+name = "objc2-link-presentation"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-metal"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-quartz-core"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-foundation",
+ "objc2-metal",
+]
+
+[[package]]
+name = "objc2-symbols"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc"
+dependencies = [
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-ui-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-cloud-kit",
+ "objc2-core-data",
+ "objc2-core-image",
+ "objc2-core-location",
+ "objc2-foundation",
+ "objc2-link-presentation",
+ "objc2-quartz-core",
+ "objc2-symbols",
+ "objc2-uniform-type-identifiers",
+ "objc2-user-notifications",
+]
+
+[[package]]
+name = "objc2-uniform-type-identifiers"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe"
+dependencies = [
+ "block2",
+ "objc2",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-user-notifications"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-core-location",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-web-kit"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68bc69301064cebefc6c4c90ce9cba69225239e4b8ff99d445a2b5563797da65"
+dependencies = [
+ "bitflags 2.6.0",
+ "block2",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "object"
+version = "0.36.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.20.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
+
+[[package]]
+name = "open"
+version = "5.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ecd52f0b8d15c40ce4820aa251ed5de032e5d91fab27f7db2f40d42a8bdf69c"
+dependencies = [
+ "is-wsl",
+ "libc",
+ "pathdiff",
+]
+
+[[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.90",
+]
+
+[[package]]
+name = "openssl-probe"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
+
+[[package]]
+name = "openssl-src"
+version = "300.4.1+3.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "openssl-sys"
+version = "0.9.104"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741"
+dependencies = [
+ "cc",
+ "libc",
+ "openssl-src",
+ "pkg-config",
+ "vcpkg",
+]
+
+[[package]]
+name = "option-ext"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
+
+[[package]]
+name = "ordered-multimap"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79"
+dependencies = [
+ "dlv-list",
+ "hashbrown 0.14.5",
+]
+
+[[package]]
+name = "ordered-stream"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50"
+dependencies = [
+ "futures-core",
+ "pin-project-lite",
+]
+
+[[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 = "overload"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
+
+[[package]]
+name = "pango"
+version = "0.18.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4"
+dependencies = [
+ "gio",
+ "glib",
+ "libc",
+ "once_cell",
+ "pango-sys",
+]
+
+[[package]]
+name = "pango-sys"
+version = "0.18.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5"
+dependencies = [
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "parking"
+version = "2.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"
+
+[[package]]
+name = "parking_lot"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "pathdiff"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
+
+[[package]]
+name = "pbkdf2"
+version = "0.12.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
+dependencies = [
+ "digest",
+ "hmac",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+
+[[package]]
+name = "phf"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"
+dependencies = [
+ "phf_macros 0.8.0",
+ "phf_shared 0.8.0",
+ "proc-macro-hack",
+]
+
+[[package]]
+name = "phf"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
+dependencies = [
+ "phf_shared 0.10.0",
+]
+
+[[package]]
+name = "phf"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
+dependencies = [
+ "phf_macros 0.11.2",
+ "phf_shared 0.11.2",
+]
+
+[[package]]
+name = "phf_codegen"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815"
+dependencies = [
+ "phf_generator 0.8.0",
+ "phf_shared 0.8.0",
+]
+
+[[package]]
+name = "phf_codegen"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd"
+dependencies = [
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526"
+dependencies = [
+ "phf_shared 0.8.0",
+ "rand 0.7.3",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
+dependencies = [
+ "phf_shared 0.10.0",
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "phf_generator"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0"
+dependencies = [
+ "phf_shared 0.11.2",
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "phf_macros"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c"
+dependencies = [
+ "phf_generator 0.8.0",
+ "phf_shared 0.8.0",
+ "proc-macro-hack",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "phf_macros"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"
+dependencies = [
+ "phf_generator 0.11.2",
+ "phf_shared 0.11.2",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "phf_shared"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b"
+dependencies = [
+ "siphasher",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "piper"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066"
+dependencies = [
+ "atomic-waker",
+ "fastrand",
+ "futures-io",
+]
+
+[[package]]
+name = "pkcs8"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
+dependencies = [
+ "der",
+ "spki",
+]
+
+[[package]]
+name = "pkg-config"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
+
+[[package]]
+name = "plist"
+version = "1.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016"
+dependencies = [
+ "base64 0.22.1",
+ "indexmap 2.7.0",
+ "quick-xml 0.32.0",
+ "serde",
+ "time",
+]
+
+[[package]]
+name = "png"
+version = "0.17.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b67582bd5b65bdff614270e2ea89a1cf15bef71245cc1e5f7ea126977144211d"
+dependencies = [
+ "bitflags 1.3.2",
+ "crc32fast",
+ "fdeflate",
+ "flate2",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "polling"
+version = "3.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f"
+dependencies = [
+ "cfg-if",
+ "concurrent-queue",
+ "hermit-abi",
+ "pin-project-lite",
+ "rustix",
+ "tracing",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "portpicker"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9"
+dependencies = [
+ "rand 0.8.5",
+]
+
+[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
+dependencies = [
+ "zerocopy",
+]
+
+[[package]]
+name = "precomputed-hash"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
+
+[[package]]
+name = "proc-macro-crate"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
+dependencies = [
+ "once_cell",
+ "toml_edit 0.19.15",
+]
+
+[[package]]
+name = "proc-macro-crate"
+version = "2.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24"
+dependencies = [
+ "toml_datetime",
+ "toml_edit 0.20.2",
+]
+
+[[package]]
+name = "proc-macro-error"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+dependencies = [
+ "proc-macro-error-attr",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-error-attr"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "version_check",
+]
+
+[[package]]
+name = "proc-macro-hack"
+version = "0.5.20+deprecated"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.92"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quick-xml"
+version = "0.32.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "quick-xml"
+version = "0.36.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "quinn"
+version = "0.11.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef"
+dependencies = [
+ "bytes",
+ "pin-project-lite",
+ "quinn-proto",
+ "quinn-udp",
+ "rustc-hash",
+ "rustls",
+ "socket2",
+ "thiserror 2.0.7",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "quinn-proto"
+version = "0.11.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d"
+dependencies = [
+ "bytes",
+ "getrandom 0.2.15",
+ "rand 0.8.5",
+ "ring",
+ "rustc-hash",
+ "rustls",
+ "rustls-pki-types",
+ "slab",
+ "thiserror 2.0.7",
+ "tinyvec",
+ "tracing",
+ "web-time",
+]
+
+[[package]]
+name = "quinn-udp"
+version = "0.5.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904"
+dependencies = [
+ "cfg_aliases",
+ "libc",
+ "once_cell",
+ "socket2",
+ "tracing",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rand"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
+dependencies = [
+ "getrandom 0.1.16",
+ "libc",
+ "rand_chacha 0.2.2",
+ "rand_core 0.5.1",
+ "rand_hc",
+ "rand_pcg",
+]
+
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha 0.3.1",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
+dependencies = [
+ "getrandom 0.1.16",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom 0.2.15",
+]
+
+[[package]]
+name = "rand_hc"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
+dependencies = [
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "rand_pcg"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429"
+dependencies = [
+ "rand_core 0.5.1",
+]
+
+[[package]]
+name = "raw-window-handle"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
+
+[[package]]
+name = "rayon"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
+dependencies = [
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
+dependencies = [
+ "crossbeam-deque",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.5.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
+dependencies = [
+ "bitflags 2.6.0",
+]
+
+[[package]]
+name = "redox_users"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
+dependencies = [
+ "getrandom 0.2.15",
+ "libredox",
+ "thiserror 1.0.69",
+]
+
+[[package]]
+name = "regex"
+version = "1.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata 0.4.9",
+ "regex-syntax 0.8.5",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
+dependencies = [
+ "regex-syntax 0.6.29",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax 0.8.5",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+
+[[package]]
+name = "relay"
+version = "0.1.1"
+source = "git+https://github.com/CuriousCorrelation/relay.git#0cab8a64b4c9148c930590f2ad5ad3cc1c6c00ae"
+dependencies = [
+ "bytes",
+ "curl",
+ "dashmap",
+ "env_logger",
+ "http",
+ "http-serde",
+ "infer",
+ "lazy_static",
+ "log",
+ "mime",
+ "openssl",
+ "openssl-sys",
+ "serde",
+ "serde_json",
+ "strum",
+ "thiserror 1.0.69",
+ "time",
+ "tokio-util",
+ "tracing",
+ "url-escape",
+ "urlencoding",
+]
+
+[[package]]
+name = "reqwest"
+version = "0.12.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+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",
+ "quinn",
+ "rustls",
+ "rustls-pemfile",
+ "rustls-pki-types",
+ "serde",
+ "serde_json",
+ "serde_urlencoded",
+ "sync_wrapper",
+ "system-configuration",
+ "tokio",
+ "tokio-native-tls",
+ "tokio-rustls",
+ "tokio-util",
+ "tower-service",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-streams",
+ "web-sys",
+ "webpki-roots",
+ "windows-registry 0.2.0",
+]
+
+[[package]]
+name = "rfd"
+version = "0.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8af382a047821a08aa6bfc09ab0d80ff48d45d8726f7cd8e44891f7cb4a4278e"
+dependencies = [
+ "ashpd",
+ "block2",
+ "glib-sys",
+ "gobject-sys",
+ "gtk-sys",
+ "js-sys",
+ "log",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "raw-window-handle",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "windows-sys 0.48.0",
+]
+
+[[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 = "rust-ini"
+version = "0.21.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e310ef0e1b6eeb79169a1171daf9abcb87a2e17c03bee2c4bb100b55c75409f"
+dependencies = [
+ "cfg-if",
+ "ordered-multimap",
+ "trim-in-place",
+]
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+
+[[package]]
+name = "rustc-hash"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497"
+
+[[package]]
+name = "rustc_version"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
+dependencies = [
+ "semver",
+]
+
+[[package]]
+name = "rustix"
+version = "0.38.42"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85"
+dependencies = [
+ "bitflags 2.6.0",
+ "errno",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "rustls"
+version = "0.23.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b"
+dependencies = [
+ "once_cell",
+ "ring",
+ "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.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37"
+dependencies = [
+ "web-time",
+]
+
+[[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 = "rustversion"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"
+
+[[package]]
+name = "ryu"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "schannel"
+version = "0.1.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
+dependencies = [
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "schemars"
+version = "0.8.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92"
+dependencies = [
+ "dyn-clone",
+ "indexmap 1.9.3",
+ "schemars_derive",
+ "serde",
+ "serde_json",
+ "url",
+ "uuid",
+]
+
+[[package]]
+name = "schemars_derive"
+version = "0.8.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "serde_derive_internals",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "scoped-tls"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
+
+[[package]]
+name = "scopeguard"
+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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe"
+dependencies = [
+ "bitflags 1.3.2",
+ "cssparser",
+ "derive_more",
+ "fxhash",
+ "log",
+ "matches",
+ "phf 0.8.0",
+ "phf_codegen 0.8.0",
+ "precomputed-hash",
+ "servo_arc",
+ "smallvec",
+ "thin-slice",
+]
+
+[[package]]
+name = "semver"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.216"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde-untagged"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2676ba99bd82f75cae5cbd2c8eda6fa0b8760f18978ea840e980dd5567b5c5b6"
+dependencies = [
+ "erased-serde",
+ "serde",
+ "typeid",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.216"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "serde_derive_internals"
+version = "0.29.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.133"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
+dependencies = [
+ "itoa 1.0.14",
+ "memchr",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_path_to_error"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6"
+dependencies = [
+ "itoa 1.0.14",
+ "serde",
+]
+
+[[package]]
+name = "serde_repr"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "serde_spanned"
+version = "0.6.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "serde_urlencoded"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
+dependencies = [
+ "form_urlencoded",
+ "itoa 1.0.14",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_with"
+version = "3.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817"
+dependencies = [
+ "base64 0.22.1",
+ "chrono",
+ "hex",
+ "indexmap 1.9.3",
+ "indexmap 2.7.0",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "serde_with_macros",
+ "time",
+]
+
+[[package]]
+name = "serde_with_macros"
+version = "3.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d"
+dependencies = [
+ "darling",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "serialize-to-javascript"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c9823f2d3b6a81d98228151fdeaf848206a7855a7a042bbf9bf870449a66cafb"
+dependencies = [
+ "serde",
+ "serde_json",
+ "serialize-to-javascript-impl",
+]
+
+[[package]]
+name = "serialize-to-javascript-impl"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "74064874e9f6a15f04c1f3cb627902d0e6b410abbf36668afa873c61889f1763"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
+name = "servo_arc"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432"
+dependencies = [
+ "nodrop",
+ "stable_deref_trait",
+]
+
+[[package]]
+name = "sha1"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
+[[package]]
+name = "sharded-slab"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
+dependencies = [
+ "lazy_static",
+]
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "signature"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
+dependencies = [
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "simd-adler32"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
+
+[[package]]
+name = "siphasher"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
+
+[[package]]
+name = "slab"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "smallvec"
+version = "1.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
+
+[[package]]
+name = "socket2"
+version = "0.5.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8"
+dependencies = [
+ "libc",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "softbuffer"
+version = "0.4.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18051cdd562e792cad055119e0cdb2cfc137e44e3987532e0f9659a77931bb08"
+dependencies = [
+ "bytemuck",
+ "cfg_aliases",
+ "core-graphics",
+ "foreign-types 0.5.0",
+ "js-sys",
+ "log",
+ "objc2",
+ "objc2-foundation",
+ "objc2-quartz-core",
+ "raw-window-handle",
+ "redox_syscall",
+ "wasm-bindgen",
+ "web-sys",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "soup3"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f"
+dependencies = [
+ "futures-channel",
+ "gio",
+ "glib",
+ "libc",
+ "soup3-sys",
+]
+
+[[package]]
+name = "soup3-sys"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27"
+dependencies = [
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "libc",
+ "system-deps",
+]
+
+[[package]]
+name = "spin"
+version = "0.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
+
+[[package]]
+name = "spki"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
+dependencies = [
+ "base64ct",
+ "der",
+]
+
+[[package]]
+name = "stable_deref_trait"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
+
+[[package]]
+name = "static_assertions"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
+
+[[package]]
+name = "string_cache"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
+dependencies = [
+ "new_debug_unreachable",
+ "once_cell",
+ "parking_lot",
+ "phf_shared 0.10.0",
+ "precomputed-hash",
+ "serde",
+]
+
+[[package]]
+name = "string_cache_codegen"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
+dependencies = [
+ "phf_generator 0.10.0",
+ "phf_shared 0.10.0",
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
+name = "strsim"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+
+[[package]]
+name = "strum"
+version = "0.26.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn 2.0.90",
+]
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7"
+dependencies = [
+ "base64 0.21.7",
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.109"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.90"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "sync_wrapper"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
+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.90",
+]
+
+[[package]]
+name = "sys-info"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b3a0d0aba8bf96a0e1ddfdc352fc53b3df7f39318c71854910c3c4b024ae52c"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"
+dependencies = [
+ "cfg-expr",
+ "heck 0.5.0",
+ "pkg-config",
+ "toml 0.8.2",
+ "version-compare",
+]
+
+[[package]]
+name = "tao"
+version = "0.30.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6682a07cf5bab0b8a2bd20d0a542917ab928b5edb75ebd4eda6b05cbaab872da"
+dependencies = [
+ "bitflags 2.6.0",
+ "cocoa",
+ "core-foundation 0.10.0",
+ "core-graphics",
+ "crossbeam-channel",
+ "dispatch",
+ "dlopen2",
+ "dpi",
+ "gdkwayland-sys",
+ "gdkx11-sys",
+ "gtk",
+ "instant",
+ "jni",
+ "lazy_static",
+ "libc",
+ "log",
+ "ndk",
+ "ndk-context",
+ "ndk-sys",
+ "objc",
+ "once_cell",
+ "parking_lot",
+ "raw-window-handle",
+ "scopeguard",
+ "tao-macros",
+ "unicode-segmentation",
+ "url",
+ "windows 0.58.0",
+ "windows-core 0.58.0",
+ "windows-version",
+ "x11-dl",
+]
+
+[[package]]
+name = "tao-macros"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "tar"
+version = "0.4.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6"
+dependencies = [
+ "filetime",
+ "libc",
+ "xattr",
+]
+
+[[package]]
+name = "target-lexicon"
+version = "0.12.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
+
+[[package]]
+name = "tauri"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e545de0a2dfe296fa67db208266cd397c5a55ae782da77973ef4c4fac90e9f2c"
+dependencies = [
+ "anyhow",
+ "bytes",
+ "dirs",
+ "dunce",
+ "embed_plist",
+ "futures-util",
+ "getrandom 0.2.15",
+ "glob",
+ "gtk",
+ "heck 0.5.0",
+ "http",
+ "jni",
+ "libc",
+ "log",
+ "mime",
+ "muda",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "percent-encoding",
+ "plist",
+ "raw-window-handle",
+ "reqwest",
+ "serde",
+ "serde_json",
+ "serde_repr",
+ "serialize-to-javascript",
+ "swift-rs",
+ "tauri-build",
+ "tauri-macros",
+ "tauri-runtime",
+ "tauri-runtime-wry",
+ "tauri-utils",
+ "thiserror 2.0.7",
+ "tokio",
+ "tray-icon",
+ "url",
+ "urlpattern",
+ "webkit2gtk",
+ "webview2-com",
+ "window-vibrancy",
+ "windows 0.58.0",
+]
+
+[[package]]
+name = "tauri-build"
+version = "2.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7bd2a4bcfaf5fb9f4be72520eefcb61ae565038f8ccba2a497d8c28f463b8c01"
+dependencies = [
+ "anyhow",
+ "cargo_toml",
+ "dirs",
+ "glob",
+ "heck 0.5.0",
+ "json-patch",
+ "schemars",
+ "semver",
+ "serde",
+ "serde_json",
+ "tauri-utils",
+ "tauri-winres",
+ "toml 0.8.2",
+ "walkdir",
+]
+
+[[package]]
+name = "tauri-codegen"
+version = "2.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf79faeecf301d3e969b1fae977039edb77a4c1f25cc0a961be298b54bff97cf"
+dependencies = [
+ "base64 0.22.1",
+ "brotli",
+ "ico",
+ "json-patch",
+ "plist",
+ "png",
+ "proc-macro2",
+ "quote",
+ "semver",
+ "serde",
+ "serde_json",
+ "sha2",
+ "syn 2.0.90",
+ "tauri-utils",
+ "thiserror 2.0.7",
+ "time",
+ "url",
+ "uuid",
+ "walkdir",
+]
+
+[[package]]
+name = "tauri-macros"
+version = "2.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c52027c8c5afb83166dacddc092ee8fff50772f9646d461d8c33ee887e447a03"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "tauri-codegen",
+ "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-appload"
+version = "0.1.0"
+source = "git+https://github.com/CuriousCorrelation/tauri-plugin-appload#2faadf6528d175f0fe3a0861bcda2025030b856b"
+dependencies = [
+ "base64 0.22.1",
+ "blake3",
+ "chrono",
+ "cocoa",
+ "dashmap",
+ "ed25519-dalek",
+ "flate2",
+ "futures",
+ "hex",
+ "hex_color",
+ "humantime-serde",
+ "lru",
+ "mime-infer",
+ "mime_guess",
+ "objc",
+ "rand 0.8.5",
+ "rayon",
+ "regex",
+ "reqwest",
+ "serde",
+ "serde_json",
+ "sys-info",
+ "tauri",
+ "tauri-plugin",
+ "thiserror 2.0.7",
+ "tokio",
+ "tracing",
+ "url",
+ "windows 0.58.0",
+ "winver",
+ "zip",
+]
+
+[[package]]
+name = "tauri-plugin-deep-link"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35d51ffd286073414d26353bcfc9e83e3cd63f96fa7f7a912f92f2118e5de5a6"
+dependencies = [
+ "dunce",
+ "rust-ini",
+ "serde",
+ "serde_json",
+ "tauri",
+ "tauri-plugin",
+ "tauri-utils",
+ "thiserror 2.0.7",
+ "tracing",
+ "url",
+ "windows-registry 0.3.0",
+ "windows-result",
+]
+
+[[package]]
+name = "tauri-plugin-dialog"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b59fd750551b1066744ab956a1cd6b1ea3e1b3763b0b9153ac27a044d596426"
+dependencies = [
+ "log",
+ "raw-window-handle",
+ "rfd",
+ "serde",
+ "serde_json",
+ "tauri",
+ "tauri-plugin",
+ "tauri-plugin-fs",
+ "thiserror 2.0.7",
+ "url",
+]
+
+[[package]]
+name = "tauri-plugin-fs"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1a1edf18000f02903a7c2e5997fb89aca455ecbc0acc15c6535afbb883be223"
+dependencies = [
+ "anyhow",
+ "dunce",
+ "glob",
+ "percent-encoding",
+ "schemars",
+ "serde",
+ "serde_json",
+ "serde_repr",
+ "tauri",
+ "tauri-plugin",
+ "tauri-utils",
+ "thiserror 2.0.7",
+ "toml 0.8.2",
+ "url",
+ "uuid",
+]
+
+[[package]]
+name = "tauri-plugin-relay"
+version = "0.1.0"
+source = "git+https://github.com/CuriousCorrelation/tauri-plugin-relay#bbf25139962fd59b6e0c09f2a8034df29ac10bdf"
+dependencies = [
+ "relay",
+ "serde",
+ "tauri",
+ "tauri-plugin",
+ "thiserror 2.0.7",
+ "tracing",
+]
+
+[[package]]
+name = "tauri-plugin-shell"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb2c50a63e60fb8925956cc5b7569f4b750ac197a4d39f13b8dd46ea8e2bad79"
+dependencies = [
+ "encoding_rs",
+ "log",
+ "open",
+ "os_pipe",
+ "regex",
+ "schemars",
+ "serde",
+ "serde_json",
+ "shared_child",
+ "tauri",
+ "tauri-plugin",
+ "thiserror 2.0.7",
+ "tokio",
+]
+
+[[package]]
+name = "tauri-plugin-store"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c0c08fae6995909f5e9a0da6038273b750221319f2c0f3b526d6de1cde21505"
+dependencies = [
+ "dunce",
+ "serde",
+ "serde_json",
+ "tauri",
+ "tauri-plugin",
+ "thiserror 2.0.7",
+ "tokio",
+ "tracing",
+]
+
+[[package]]
+name = "tauri-plugin-updater"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce2d39224390c41ba544f02b4f1721f42256320b3fb8c371e9425cbddeb4a68c"
+dependencies = [
+ "base64 0.22.1",
+ "dirs",
+ "flate2",
+ "futures-util",
+ "http",
+ "infer",
+ "minisign-verify",
+ "percent-encoding",
+ "reqwest",
+ "semver",
+ "serde",
+ "serde_json",
+ "tar",
+ "tauri",
+ "tauri-plugin",
+ "tempfile",
+ "thiserror 2.0.7",
+ "time",
+ "tokio",
+ "url",
+ "windows-sys 0.59.0",
+ "zip",
+]
+
+[[package]]
+name = "tauri-plugin-window-state"
+version = "2.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35e344b512b0d99d9d06225f235d87d6c66d89496a3bf323d9b578d940596e6c"
+dependencies = [
+ "bitflags 2.6.0",
+ "log",
+ "serde",
+ "serde_json",
+ "tauri",
+ "tauri-plugin",
+ "thiserror 2.0.7",
+]
+
+[[package]]
+name = "tauri-runtime"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cce18d43f80d4aba3aa8a0c953bbe835f3d0f2370aca75e8dbb14bd4bab27958"
+dependencies = [
+ "dpi",
+ "gtk",
+ "http",
+ "jni",
+ "raw-window-handle",
+ "serde",
+ "serde_json",
+ "tauri-utils",
+ "thiserror 2.0.7",
+ "url",
+ "windows 0.58.0",
+]
+
+[[package]]
+name = "tauri-runtime-wry"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f442a38863e10129ffe2cec7bd09c2dcf8a098a3a27801a476a304d5bb991d2"
+dependencies = [
+ "gtk",
+ "http",
+ "jni",
+ "log",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "percent-encoding",
+ "raw-window-handle",
+ "softbuffer",
+ "tao",
+ "tauri-runtime",
+ "tauri-utils",
+ "url",
+ "webkit2gtk",
+ "webview2-com",
+ "windows 0.58.0",
+ "wry",
+]
+
+[[package]]
+name = "tauri-utils"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9271a88f99b4adea0dc71d0baca4505475a0bbd139fb135f62958721aaa8fe54"
+dependencies = [
+ "brotli",
+ "cargo_metadata",
+ "ctor",
+ "dunce",
+ "glob",
+ "html5ever",
+ "http",
+ "infer",
+ "json-patch",
+ "kuchikiki",
+ "log",
+ "memchr",
+ "phf 0.11.2",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "schemars",
+ "semver",
+ "serde",
+ "serde-untagged",
+ "serde_json",
+ "serde_with",
+ "swift-rs",
+ "thiserror 2.0.7",
+ "toml 0.8.2",
+ "url",
+ "urlpattern",
+ "uuid",
+ "walkdir",
+]
+
+[[package]]
+name = "tauri-winres"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5993dc129e544393574288923d1ec447c857f3f644187f4fbf7d9a875fbfc4fb"
+dependencies = [
+ "embed-resource",
+ "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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0"
+dependencies = [
+ "futf",
+ "mac",
+ "utf-8",
+]
+
+[[package]]
+name = "thin-slice"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
+
+[[package]]
+name = "thiserror"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl 1.0.69",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93605438cbd668185516ab499d589afb7ee1859ea3d5fc8f6b0755e1c7443767"
+dependencies = [
+ "thiserror-impl 2.0.7",
+]
+
+[[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.90",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e1d8749b4531af2117677a5fcd12b1348a3fe2b81e36e61ffeac5c4aa3273e36"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+]
+
+[[package]]
+name = "time"
+version = "0.3.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21"
+dependencies = [
+ "deranged",
+ "itoa 1.0.14",
+ "num-conv",
+ "powerfmt",
+ "serde",
+ "time-core",
+ "time-macros",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
+
+[[package]]
+name = "time-macros"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de"
+dependencies = [
+ "num-conv",
+ "time-core",
+]
+
+[[package]]
+name = "tiny-keccak"
+version = "2.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
+dependencies = [
+ "crunchy",
+]
+
+[[package]]
+name = "tinystr"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
+dependencies = [
+ "displaydoc",
+ "zerovec",
+]
+
+[[package]]
+name = "tinyvec"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8"
+dependencies = [
+ "tinyvec_macros",
+]
+
+[[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.43.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e"
+dependencies = [
+ "backtrace",
+ "bytes",
+ "libc",
+ "mio",
+ "pin-project-lite",
+ "signal-hook-registry",
+ "socket2",
+ "tokio-macros",
+ "tracing",
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[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.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37"
+dependencies = [
+ "rustls",
+ "tokio",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "toml"
+version = "0.7.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit 0.19.15",
+]
+
+[[package]]
+name = "toml"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit 0.20.2",
+]
+
+[[package]]
+name = "toml_datetime"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
+dependencies = [
+ "serde",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.19.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
+dependencies = [
+ "indexmap 2.7.0",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "winnow",
+]
+
+[[package]]
+name = "toml_edit"
+version = "0.20.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338"
+dependencies = [
+ "indexmap 2.7.0",
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "winnow",
+]
+
+[[package]]
+name = "tower"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "pin-project-lite",
+ "sync_wrapper",
+ "tokio",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "tower-http"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697"
+dependencies = [
+ "bitflags 2.6.0",
+ "bytes",
+ "http",
+ "pin-project-lite",
+ "tower-layer",
+ "tower-service",
+]
+
+[[package]]
+name = "tower-layer"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
+
+[[package]]
+name = "tower-service"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
+
+[[package]]
+name = "tracing"
+version = "0.1.41"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
+dependencies = [
+ "log",
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.33"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c"
+dependencies = [
+ "once_cell",
+ "valuable",
+]
+
+[[package]]
+name = "tracing-log"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
+dependencies = [
+ "log",
+ "once_cell",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-subscriber"
+version = "0.3.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008"
+dependencies = [
+ "matchers",
+ "nu-ansi-term",
+ "once_cell",
+ "regex",
+ "sharded-slab",
+ "smallvec",
+ "thread_local",
+ "tracing",
+ "tracing-core",
+ "tracing-log",
+]
+
+[[package]]
+name = "tray-icon"
+version = "0.19.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d48a05076dd272615d03033bf04f480199f7d1b66a8ac64d75c625fc4a70c06b"
+dependencies = [
+ "core-graphics",
+ "crossbeam-channel",
+ "dirs",
+ "libappindicator",
+ "muda",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "once_cell",
+ "png",
+ "serde",
+ "thiserror 1.0.69",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "trim-in-place"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "343e926fc669bc8cde4fa3129ab681c63671bae288b1f1081ceee6d9d37904fc"
+
+[[package]]
+name = "try-lock"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
+
+[[package]]
+name = "typeid"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e"
+
+[[package]]
+name = "typenum"
+version = "1.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+
+[[package]]
+name = "uds_windows"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9"
+dependencies = [
+ "memoffset",
+ "tempfile",
+ "winapi",
+]
+
+[[package]]
+name = "unic-char-property"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221"
+dependencies = [
+ "unic-char-range",
+]
+
+[[package]]
+name = "unic-char-range"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc"
+
+[[package]]
+name = "unic-common"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc"
+
+[[package]]
+name = "unic-ucd-ident"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987"
+dependencies = [
+ "unic-char-property",
+ "unic-char-range",
+ "unic-ucd-version",
+]
+
+[[package]]
+name = "unic-ucd-version"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4"
+dependencies = [
+ "unic-common",
+]
+
+[[package]]
+name = "unicase"
+version = "2.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
+
+[[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.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+ "serde",
+]
+
+[[package]]
+name = "url-escape"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44e0ce4d1246d075ca5abec4b41d33e87a6054d08e2366b63205665e950db218"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "urlencoding"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
+
+[[package]]
+name = "urlpattern"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d"
+dependencies = [
+ "regex",
+ "serde",
+ "unic-ucd-ident",
+ "url",
+]
+
+[[package]]
+name = "utf-8"
+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 = "utf8parse"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
+
+[[package]]
+name = "uuid"
+version = "1.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a"
+dependencies = [
+ "getrandom 0.2.15",
+ "serde",
+]
+
+[[package]]
+name = "valuable"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b"
+
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[package]]
+name = "vswhom"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b"
+dependencies = [
+ "libc",
+ "vswhom-sys",
+]
+
+[[package]]
+name = "vswhom-sys"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3b17ae1f6c8a2b28506cd96d412eebf83b4a0ff2cbefeeb952f2f9dfa44ba18"
+dependencies = [
+ "cc",
+ "libc",
+]
+
+[[package]]
+name = "walkdir"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
+[[package]]
+name = "want"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
+dependencies = [
+ "try-lock",
+]
+
+[[package]]
+name = "wasi"
+version = "0.9.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.99"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.99"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79"
+dependencies = [
+ "bumpalo",
+ "log",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-futures"
+version = "0.4.49"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2"
+dependencies = [
+ "cfg-if",
+ "js-sys",
+ "once_cell",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.99"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.99"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.99"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6"
+
+[[package]]
+name = "wasm-streams"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65"
+dependencies = [
+ "futures-util",
+ "js-sys",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+]
+
+[[package]]
+name = "wayland-backend"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6"
+dependencies = [
+ "cc",
+ "downcast-rs",
+ "rustix",
+ "scoped-tls",
+ "smallvec",
+ "wayland-sys",
+]
+
+[[package]]
+name = "wayland-client"
+version = "0.31.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b66249d3fc69f76fd74c82cc319300faa554e9d865dab1f7cd66cc20db10b280"
+dependencies = [
+ "bitflags 2.6.0",
+ "rustix",
+ "wayland-backend",
+ "wayland-scanner",
+]
+
+[[package]]
+name = "wayland-protocols"
+version = "0.32.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7cd0ade57c4e6e9a8952741325c30bf82f4246885dca8bf561898b86d0c1f58e"
+dependencies = [
+ "bitflags 2.6.0",
+ "wayland-backend",
+ "wayland-client",
+ "wayland-scanner",
+]
+
+[[package]]
+name = "wayland-scanner"
+version = "0.31.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3"
+dependencies = [
+ "proc-macro2",
+ "quick-xml 0.36.2",
+ "quote",
+]
+
+[[package]]
+name = "wayland-sys"
+version = "0.31.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09"
+dependencies = [
+ "dlib",
+ "log",
+ "pkg-config",
+]
+
+[[package]]
+name = "web-sys"
+version = "0.3.76"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "web-time"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "webkit2gtk"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76b1bc1e54c581da1e9f179d0b38512ba358fb1af2d634a1affe42e37172361a"
+dependencies = [
+ "bitflags 1.3.2",
+ "cairo-rs",
+ "gdk",
+ "gdk-sys",
+ "gio",
+ "gio-sys",
+ "glib",
+ "glib-sys",
+ "gobject-sys",
+ "gtk",
+ "gtk-sys",
+ "javascriptcore-rs",
+ "libc",
+ "once_cell",
+ "soup3",
+ "webkit2gtk-sys",
+]
+
+[[package]]
+name = "webkit2gtk-sys"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62daa38afc514d1f8f12b8693d30d5993ff77ced33ce30cd04deebc267a6d57c"
+dependencies = [
+ "bitflags 1.3.2",
+ "cairo-sys-rs",
+ "gdk-sys",
+ "gio-sys",
+ "glib-sys",
+ "gobject-sys",
+ "gtk-sys",
+ "javascriptcore-rs-sys",
+ "libc",
+ "pkg-config",
+ "soup3-sys",
+ "system-deps",
+]
+
+[[package]]
+name = "webpki-roots"
+version = "0.26.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e"
+dependencies = [
+ "rustls-pki-types",
+]
+
+[[package]]
+name = "webview2-com"
+version = "0.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f61ff3d9d0ee4efcb461b14eb3acfda2702d10dc329f339303fc3e57215ae2c"
+dependencies = [
+ "webview2-com-macros",
+ "webview2-com-sys",
+ "windows 0.58.0",
+ "windows-core 0.58.0",
+ "windows-implement",
+ "windows-interface",
+]
+
+[[package]]
+name = "webview2-com-macros"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "webview2-com-sys"
+version = "0.33.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3a3e2eeb58f82361c93f9777014668eb3d07e7d174ee4c819575a9208011886"
+dependencies = [
+ "thiserror 1.0.69",
+ "windows 0.58.0",
+ "windows-core 0.58.0",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
+dependencies = [
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "window-vibrancy"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ea403deff7b51fff19e261330f71608ff2cdef5721d72b64180bb95be7c4150"
+dependencies = [
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "raw-window-handle",
+ "windows-sys 0.59.0",
+ "windows-version",
+]
+
+[[package]]
+name = "windows"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
+dependencies = [
+ "windows-targets 0.48.5",
+]
+
+[[package]]
+name = "windows"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
+dependencies = [
+ "windows-core 0.58.0",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-core"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
+dependencies = [
+ "windows-implement",
+ "windows-interface",
+ "windows-result",
+ "windows-strings 0.1.0",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-implement"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "windows-interface"
+version = "0.58.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "windows-registry"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0"
+dependencies = [
+ "windows-result",
+ "windows-strings 0.1.0",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-registry"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bafa604f2104cf5ae2cc2db1dee84b7e6a5d11b05f737b60def0ffdc398cbc0a"
+dependencies = [
+ "windows-result",
+ "windows-strings 0.2.0",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-result"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
+dependencies = [
+ "windows-result",
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-strings"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "978d65aedf914c664c510d9de43c8fd85ca745eaff1ed53edf409b479e441663"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.45.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
+dependencies = [
+ "windows-targets 0.42.2",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.48.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
+dependencies = [
+ "windows-targets 0.48.5",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.59.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
+dependencies = [
+ "windows_aarch64_gnullvm 0.42.2",
+ "windows_aarch64_msvc 0.42.2",
+ "windows_i686_gnu 0.42.2",
+ "windows_i686_msvc 0.42.2",
+ "windows_x86_64_gnu 0.42.2",
+ "windows_x86_64_gnullvm 0.42.2",
+ "windows_x86_64_msvc 0.42.2",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
+dependencies = [
+ "windows_aarch64_gnullvm 0.48.5",
+ "windows_aarch64_msvc 0.48.5",
+ "windows_i686_gnu 0.48.5",
+ "windows_i686_msvc 0.48.5",
+ "windows_x86_64_gnu 0.48.5",
+ "windows_x86_64_gnullvm 0.48.5",
+ "windows_x86_64_msvc 0.48.5",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+dependencies = [
+ "windows_aarch64_gnullvm 0.52.6",
+ "windows_aarch64_msvc 0.52.6",
+ "windows_i686_gnu 0.52.6",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc 0.52.6",
+ "windows_x86_64_gnu 0.52.6",
+ "windows_x86_64_gnullvm 0.52.6",
+ "windows_x86_64_msvc 0.52.6",
+]
+
+[[package]]
+name = "windows-version"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6998aa457c9ba8ff2fb9f13e9d2a930dabcea28f1d0ab94d687d8b3654844515"
+dependencies = [
+ "windows-targets 0.52.6",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.42.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.48.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "winnow"
+version = "0.5.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "winreg"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5"
+dependencies = [
+ "cfg-if",
+ "windows-sys 0.48.0",
+]
+
+[[package]]
+name = "winver"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e0e7162b9e282fd75a0a832cce93994bdb21208d848a418cd05a5fdd9b9ab33"
+dependencies = [
+ "windows 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.47.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61ce51277d65170f6379d8cda935c80e3c2d1f0ff712a123c8bddb11b31a4b73"
+dependencies = [
+ "base64 0.22.1",
+ "block2",
+ "cookie",
+ "crossbeam-channel",
+ "dpi",
+ "dunce",
+ "gdkx11",
+ "gtk",
+ "html5ever",
+ "http",
+ "javascriptcore-rs",
+ "jni",
+ "kuchikiki",
+ "libc",
+ "ndk",
+ "objc2",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "objc2-ui-kit",
+ "objc2-web-kit",
+ "once_cell",
+ "percent-encoding",
+ "raw-window-handle",
+ "sha2",
+ "soup3",
+ "tao-macros",
+ "thiserror 1.0.69",
+ "url",
+ "webkit2gtk",
+ "webkit2gtk-sys",
+ "webview2-com",
+ "windows 0.58.0",
+ "windows-core 0.58.0",
+ "windows-version",
+ "x11-dl",
+]
+
+[[package]]
+name = "x11"
+version = "2.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e"
+dependencies = [
+ "libc",
+ "pkg-config",
+]
+
+[[package]]
+name = "x11-dl"
+version = "2.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f"
+dependencies = [
+ "libc",
+ "once_cell",
+ "pkg-config",
+]
+
+[[package]]
+name = "xattr"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e105d177a3871454f754b33bb0ee637ecaaac997446375fd3e5d43a2ed00c909"
+dependencies = [
+ "libc",
+ "linux-raw-sys",
+ "rustix",
+]
+
+[[package]]
+name = "xdg-home"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6"
+dependencies = [
+ "libc",
+ "windows-sys 0.59.0",
+]
+
+[[package]]
+name = "yoke"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40"
+dependencies = [
+ "serde",
+ "stable_deref_trait",
+ "yoke-derive",
+ "zerofrom",
+]
+
+[[package]]
+name = "yoke-derive"
+version = "0.7.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "synstructure",
+]
+
+[[package]]
+name = "zbus"
+version = "4.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030"
+dependencies = [
+ "async-broadcast",
+ "async-process",
+ "async-recursion",
+ "async-trait",
+ "derivative",
+ "enumflags2",
+ "event-listener",
+ "futures-core",
+ "futures-sink",
+ "futures-util",
+ "hex",
+ "nix",
+ "ordered-stream",
+ "rand 0.8.5",
+ "serde",
+ "serde_repr",
+ "sha1",
+ "static_assertions",
+ "tokio",
+ "tracing",
+ "uds_windows",
+ "windows-sys 0.52.0",
+ "xdg-home",
+ "zbus_macros",
+ "zbus_names",
+ "zvariant",
+]
+
+[[package]]
+name = "zbus_macros"
+version = "4.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7a3e850ff1e7217a3b7a07eba90d37fe9bb9e89a310f718afcde5885ca9b6d7"
+dependencies = [
+ "proc-macro-crate 1.3.1",
+ "proc-macro2",
+ "quote",
+ "regex",
+ "syn 1.0.109",
+ "zvariant_utils",
+]
+
+[[package]]
+name = "zbus_names"
+version = "3.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c"
+dependencies = [
+ "serde",
+ "static_assertions",
+ "zvariant",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
+dependencies = [
+ "byteorder",
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[package]]
+name = "zerofrom"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e"
+dependencies = [
+ "zerofrom-derive",
+]
+
+[[package]]
+name = "zerofrom-derive"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+ "synstructure",
+]
+
+[[package]]
+name = "zeroize"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
+dependencies = [
+ "zeroize_derive",
+]
+
+[[package]]
+name = "zeroize_derive"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.90",
+]
+
+[[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.90",
+]
+
+[[package]]
+name = "zip"
+version = "2.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45"
+dependencies = [
+ "aes",
+ "arbitrary",
+ "bzip2",
+ "constant_time_eq",
+ "crc32fast",
+ "crossbeam-utils",
+ "deflate64",
+ "displaydoc",
+ "flate2",
+ "hmac",
+ "indexmap 2.7.0",
+ "lzma-rs",
+ "memchr",
+ "pbkdf2",
+ "rand 0.8.5",
+ "sha1",
+ "thiserror 2.0.7",
+ "time",
+ "zeroize",
+ "zopfli",
+ "zstd",
+]
+
+[[package]]
+name = "zopfli"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946"
+dependencies = [
+ "bumpalo",
+ "crc32fast",
+ "lockfree-object-pool",
+ "log",
+ "once_cell",
+ "simd-adler32",
+]
+
+[[package]]
+name = "zstd"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9"
+dependencies = [
+ "zstd-safe",
+]
+
+[[package]]
+name = "zstd-safe"
+version = "7.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059"
+dependencies = [
+ "zstd-sys",
+]
+
+[[package]]
+name = "zstd-sys"
+version = "2.0.13+zstd.1.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa"
+dependencies = [
+ "cc",
+ "pkg-config",
+]
+
+[[package]]
+name = "zvariant"
+version = "4.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e09e8be97d44eeab994d752f341e67b3b0d80512a8b315a0671d47232ef1b65"
+dependencies = [
+ "endi",
+ "enumflags2",
+ "serde",
+ "static_assertions",
+ "url",
+ "zvariant_derive",
+]
+
+[[package]]
+name = "zvariant_derive"
+version = "4.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72a5857e2856435331636a9fbb415b09243df4521a267c5bedcd5289b4d5799e"
+dependencies = [
+ "proc-macro-crate 1.3.1",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+ "zvariant_utils",
+]
+
+[[package]]
+name = "zvariant_utils"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
diff --git a/packages/hoppscotch-desktop/src-tauri/Cargo.toml b/packages/hoppscotch-desktop/src-tauri/Cargo.toml
new file mode 100644
index 000000000..75d00786d
--- /dev/null
+++ b/packages/hoppscotch-desktop/src-tauri/Cargo.toml
@@ -0,0 +1,42 @@
+[package]
+name = "hoppscotch-desktop"
+version = "0.1.0"
+description = "Desktop App for hoppscotch.io"
+authors = ["CuriousCorrelation"]
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[lib]
+# The `_lib` suffix may seem redundant but it is necessary
+# to make the lib name unique and wouldn't conflict with the bin name.
+# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
+name = "hoppscotch_desktop_lib"
+crate-type = ["staticlib", "cdylib", "rlib"]
+
+[build-dependencies]
+tauri-build = { version = "2", features = [] }
+
+[dependencies]
+tauri = { version = "2", features = ["devtools"] }
+tauri-plugin-shell = { version = "2", features = [] }
+serde = { version = "1", features = ["derive"] }
+serde_json = { version = "1", features = [] }
+tracing = "0.1.41"
+tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
+tauri-plugin-store = "2.2.0"
+tauri-plugin-dialog = "2.2.0"
+tauri-plugin-fs = "2.2.0"
+tauri-plugin-deep-link = "2.2.0"
+tauri-plugin-appload = { git = "https://github.com/CuriousCorrelation/tauri-plugin-appload" }
+tauri-plugin-relay = { git = "https://github.com/CuriousCorrelation/tauri-plugin-relay" }
+axum = "0.8.1"
+tower-http = { version = "0.6.2", features = ["cors"] }
+portpicker = "0.1.1"
+tokio = "1.43.0"
+
+[target.'cfg(any(target_os = "macos", windows, target_os = "linux"))'.dependencies]
+tauri-plugin-updater = "2.3.1"
+
+[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
+tauri-plugin-window-state = "2.2.1"
diff --git a/packages/hoppscotch-desktop/src-tauri/build.rs b/packages/hoppscotch-desktop/src-tauri/build.rs
new file mode 100644
index 000000000..d860e1e6a
--- /dev/null
+++ b/packages/hoppscotch-desktop/src-tauri/build.rs
@@ -0,0 +1,3 @@
+fn main() {
+ tauri_build::build()
+}
diff --git a/packages/hoppscotch-desktop/src-tauri/capabilities/default.json b/packages/hoppscotch-desktop/src-tauri/capabilities/default.json
new file mode 100644
index 000000000..bae2b66a2
--- /dev/null
+++ b/packages/hoppscotch-desktop/src-tauri/capabilities/default.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "../gen/schemas/desktop-schema.json",
+ "identifier": "default",
+ "description": "Capability for the main window",
+ "windows": [
+ "main",
+ "Hoppscotch-curr",
+ "Hoppscotch-next"
+ ],
+ "permissions": [
+ "core:default",
+ "core:window:default",
+ "core:window:allow-start-dragging",
+ "shell:allow-open",
+ "store:default",
+ "dialog:default",
+ "updater:default",
+ "fs:allow-write-text-file",
+ "deep-link:default",
+ "appload:default",
+ "relay:default"
+ ]
+}
diff --git a/packages/hoppscotch-desktop/src-tauri/capabilities/desktop.json b/packages/hoppscotch-desktop/src-tauri/capabilities/desktop.json
new file mode 100644
index 000000000..de53dc6c2
--- /dev/null
+++ b/packages/hoppscotch-desktop/src-tauri/capabilities/desktop.json
@@ -0,0 +1,11 @@
+{
+ "identifier": "desktop-capability",
+ "platforms": [
+ "macOS",
+ "windows",
+ "linux"
+ ],
+ "permissions": [
+ "window-state:default"
+ ]
+}
\ No newline at end of file
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/128x128.png b/packages/hoppscotch-desktop/src-tauri/icons/128x128.png
new file mode 100644
index 000000000..823d9e73b
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/128x128.png differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/[email protected] b/packages/hoppscotch-desktop/src-tauri/icons/[email protected]
new file mode 100644
index 000000000..4a4eaed3f
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/[email protected] differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/32x32.png b/packages/hoppscotch-desktop/src-tauri/icons/32x32.png
new file mode 100644
index 000000000..219f6600b
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/32x32.png differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/Square107x107Logo.png b/packages/hoppscotch-desktop/src-tauri/icons/Square107x107Logo.png
new file mode 100644
index 000000000..8184c7040
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/Square107x107Logo.png differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/Square142x142Logo.png b/packages/hoppscotch-desktop/src-tauri/icons/Square142x142Logo.png
new file mode 100644
index 000000000..ff628753c
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/Square142x142Logo.png differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/Square150x150Logo.png b/packages/hoppscotch-desktop/src-tauri/icons/Square150x150Logo.png
new file mode 100644
index 000000000..ee3f87f18
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/Square150x150Logo.png differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/Square284x284Logo.png b/packages/hoppscotch-desktop/src-tauri/icons/Square284x284Logo.png
new file mode 100644
index 000000000..94f6eebf1
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/Square284x284Logo.png differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/Square30x30Logo.png b/packages/hoppscotch-desktop/src-tauri/icons/Square30x30Logo.png
new file mode 100644
index 000000000..d6a892a25
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/Square30x30Logo.png differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/Square310x310Logo.png b/packages/hoppscotch-desktop/src-tauri/icons/Square310x310Logo.png
new file mode 100644
index 000000000..cebe63f71
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/Square310x310Logo.png differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/Square44x44Logo.png b/packages/hoppscotch-desktop/src-tauri/icons/Square44x44Logo.png
new file mode 100644
index 000000000..9f7a5c543
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/Square44x44Logo.png differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/Square71x71Logo.png b/packages/hoppscotch-desktop/src-tauri/icons/Square71x71Logo.png
new file mode 100644
index 000000000..56f0613df
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/Square71x71Logo.png differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/Square89x89Logo.png b/packages/hoppscotch-desktop/src-tauri/icons/Square89x89Logo.png
new file mode 100644
index 000000000..11ebad09d
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/Square89x89Logo.png differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/StoreLogo.png b/packages/hoppscotch-desktop/src-tauri/icons/StoreLogo.png
new file mode 100644
index 000000000..2b9ce6e04
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/StoreLogo.png differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/icon.icns b/packages/hoppscotch-desktop/src-tauri/icons/icon.icns
new file mode 100644
index 000000000..11df6abcc
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/icon.icns differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/icon.ico b/packages/hoppscotch-desktop/src-tauri/icons/icon.ico
new file mode 100644
index 000000000..cc9a3cf23
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/icon.ico differ
diff --git a/packages/hoppscotch-desktop/src-tauri/icons/icon.png b/packages/hoppscotch-desktop/src-tauri/icons/icon.png
new file mode 100644
index 000000000..7209bbf45
Binary files /dev/null and b/packages/hoppscotch-desktop/src-tauri/icons/icon.png differ
diff --git a/packages/hoppscotch-desktop/src-tauri/src/lib.rs b/packages/hoppscotch-desktop/src-tauri/src/lib.rs
new file mode 100644
index 000000000..e0e861bfb
--- /dev/null
+++ b/packages/hoppscotch-desktop/src-tauri/src/lib.rs
@@ -0,0 +1,85 @@
+pub mod server;
+pub mod updater;
+
+use std::sync::OnceLock;
+
+use tauri::Emitter;
+use tauri_plugin_appload::VendorConfigBuilder;
+use tauri_plugin_deep_link::DeepLinkExt;
+
+static SERVER_PORT: OnceLock<u16> = OnceLock::new();
+
+#[tauri::command]
+fn hopp_auth_port() -> u16 {
+ *SERVER_PORT.get().expect("Server port not initialized")
+}
+
+#[cfg_attr(mobile, tauri::mobile_entry_point)]
+pub fn run() {
+ tracing::info!("Starting Hoppscotch Desktop v{}", env!("CARGO_PKG_VERSION"));
+
+ tauri::Builder::default()
+ .plugin(tauri_plugin_window_state::Builder::new().build())
+ .plugin(tauri_plugin_store::Builder::new().build())
+ .plugin(tauri_plugin_deep_link::init())
+ .plugin(tauri_plugin_dialog::init())
+ .setup(|app| {
+ let _ = app
+ .handle()
+ .plugin(tauri_plugin_updater::Builder::new().build())?;
+ Ok(())
+ })
+ .setup(|app| {
+ let handle = app.handle().clone();
+ tauri::async_runtime::spawn(async move {
+ updater::check_and_install_updates(&handle).await;
+ });
+ Ok(())
+ })
+ .setup(|app| {
+ let handle = app.handle().clone();
+ tracing::info!(app_name = %app.package_info().name, "Configuring deep link handler");
+
+ app.deep_link().on_open_url(move |event| {
+ let urls = event.urls();
+ tracing::info!(
+ urls = ?urls,
+ count = urls.len(),
+ "Processing deep link request"
+ );
+ handle
+ .emit("scheme-request-received", urls)
+ .unwrap_or_else(|e| {
+ tracing::error!(
+ error.message = %e,
+ error.type = %std::any::type_name_of_val(&e),
+ "Deep link event emission failed"
+ );
+ });
+ });
+ Ok(())
+ })
+ .setup(|app| {
+ let handle = app.handle().clone();
+ let port = portpicker::pick_unused_port().expect("Cannot find unused port");
+ SERVER_PORT.set(port).expect("Failed to set server port");
+ let port = server::init(port, handle);
+ tracing::info!(port = port, "Server initialization complete");
+ Ok(())
+ })
+ .plugin(tauri_plugin_shell::init())
+ .plugin(tauri_plugin_fs::init())
+ .plugin(tauri_plugin_appload::init(
+ VendorConfigBuilder::new().bundle(
+ include_bytes!("../../bundle.zip").to_vec(),
+ include_bytes!("../../manifest.json"),
+ ),
+ ))
+ .plugin(tauri_plugin_relay::init())
+ .invoke_handler(tauri::generate_handler![
+ hopp_auth_port,
+ updater::check_updates_and_wait
+ ])
+ .run(tauri::generate_context!())
+ .expect("error while running tauri application");
+}
diff --git a/packages/hoppscotch-desktop/src-tauri/src/main.rs b/packages/hoppscotch-desktop/src-tauri/src/main.rs
new file mode 100644
index 000000000..e55176ac8
--- /dev/null
+++ b/packages/hoppscotch-desktop/src-tauri/src/main.rs
@@ -0,0 +1,18 @@
+// Prevents additional console window on Windows in release, DO NOT REMOVE!!
+#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
+
+use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
+
+fn main() {
+ tracing_subscriber::registry()
+ .with(
+ tracing_subscriber::EnvFilter::try_from_default_env()
+ .unwrap_or_else(|_| format!("{}=debug", env!("CARGO_CRATE_NAME")).into()),
+ )
+ .with(tracing_subscriber::fmt::layer().without_time())
+ .init();
+
+ tracing::info!("Starting Hoppscotch Desktop...");
+
+ hoppscotch_desktop_lib::run()
+}
diff --git a/packages/hoppscotch-desktop/src-tauri/src/server.rs b/packages/hoppscotch-desktop/src-tauri/src/server.rs
new file mode 100644
index 000000000..22593b477
--- /dev/null
+++ b/packages/hoppscotch-desktop/src-tauri/src/server.rs
@@ -0,0 +1,94 @@
+use std::net::SocketAddr;
+
+use axum::{
+ extract::Query,
+ http::StatusCode,
+ response::{IntoResponse, Response},
+ routing::get,
+ Router,
+};
+use serde::{Deserialize, Serialize};
+use tauri::{Emitter, Runtime};
+use tower_http::cors::CorsLayer;
+
+#[derive(Debug, Serialize, Deserialize)]
+struct AuthTokensQuery {
+ access_token: String,
+ refresh_token: Option<String>,
+}
+
+async fn device_token<R: Runtime>(
+ Query(token_query): Query<AuthTokensQuery>,
+ handle: tauri::AppHandle<R>,
+) -> Response {
+ tracing::info!("Processing device token request");
+
+ let serialized = match serde_json::to_value(token_query) {
+ Ok(val) => val,
+ Err(e) => {
+ tracing::error!("Failed to serialize tokens: {}", e);
+ return StatusCode::INTERNAL_SERVER_ERROR.into_response();
+ }
+ };
+
+ match handle.emit("hopp_auth://token", serialized) {
+ Ok(_) => tracing::info!("Device token event emitted successfully"),
+ Err(e) => tracing::error!(
+ error.message = %e,
+ error.type = %std::any::type_name_of_val(&e),
+ "Failed to emit device token event"
+ ),
+ }
+ StatusCode::OK.into_response()
+}
+
+pub(crate) fn init<R: Runtime>(port: u16, handle: tauri::AppHandle<R>) -> u16 {
+ tracing::info!("Beginning server initialization");
+
+ let app = Router::new()
+ .route(
+ "/device-token",
+ get(move |query| device_token(query, handle.clone())),
+ )
+ .layer(CorsLayer::very_permissive());
+
+ let addr = SocketAddr::from(([127, 0, 0, 1], port));
+
+ tauri::async_runtime::spawn(async move {
+ tracing::info!(
+ address = %addr,
+ port = port,
+ "Starting HTTP server"
+ );
+
+ let listener = match tokio::net::TcpListener::bind(addr).await {
+ Ok(l) => {
+ tracing::info!(
+ local_addr = %l.local_addr().unwrap_or(addr),
+ "Server bound successfully"
+ );
+ l
+ }
+ Err(e) => {
+ tracing::error!(
+ error.message = %e,
+ error.kind = ?e.kind(),
+ attempted_address = %addr,
+ "Server bind failed"
+ );
+ panic!("Could not bind to the unused port");
+ }
+ };
+
+ tracing::info!("Server starting");
+ if let Err(e) = axum::serve(listener, app).await {
+ tracing::error!(
+ error.message = %e,
+ error.type = %std::any::type_name_of_val(&e),
+ "Server crashed"
+ );
+ }
+ });
+
+ port
+}
diff --git a/packages/hoppscotch-desktop/src-tauri/src/updater.rs b/packages/hoppscotch-desktop/src-tauri/src/updater.rs
new file mode 100644
index 000000000..a13a2c33d
--- /dev/null
+++ b/packages/hoppscotch-desktop/src-tauri/src/updater.rs
@@ -0,0 +1,71 @@
+use tauri_plugin_dialog::DialogExt;
+use tauri_plugin_updater::UpdaterExt;
+
+#[tauri::command]
+pub async fn check_updates_and_wait(app: tauri::AppHandle) -> Result<String, String> {
+ check_and_install_updates(&app).await;
+ Ok("Update check completed".to_string())
+}
+
+pub async fn check_and_install_updates(app: &tauri::AppHandle) {
+ tracing::info!("Checking for updates...");
+
+ let updater = match app.updater() {
+ Ok(updater) => updater,
+ Err(e) => {
+ tracing::error!(error = %e, "Failed to initialize updater");
+ return;
+ }
+ };
+
+ match updater.check().await {
+ Ok(Some(update)) => {
+ tracing::info!(
+ current_version = app.package_info().version.to_string(),
+ update_version = update.version.to_string(),
+ "Update available"
+ );
+
+ let dialog = app.dialog();
+ let should_update = dialog
+ .message(format!(
+ "A new version of Hoppscotch (v{}) is available.\n\n{}",
+ update.version,
+ update.body.as_ref().unwrap_or(&"".to_string())
+ ))
+ .title("Update Available")
+ .kind(tauri_plugin_dialog::MessageDialogKind::Info)
+ .buttons(tauri_plugin_dialog::MessageDialogButtons::YesNo)
+ .blocking_show();
+
+ if should_update {
+ tracing::info!("User agreed to update, starting download...");
+
+ match update.download_and_install(|_, _| {}, || {}).await {
+ Ok(_) => {
+ tracing::info!("Update installed successfully, restarting app");
+ app.restart();
+ }
+ Err(e) => {
+ tracing::error!(error = %e, "Failed to download or install update");
+
+ let _ = app
+ .dialog()
+ .message(format!("Failed to install update: {}", e))
+ .title("Update Error")
+ .kind(tauri_plugin_dialog::MessageDialogKind::Error)
+ .blocking_show();
+ }
+ }
+ } else {
+ tracing::info!("User declined the update");
+ }
+ }
+ Ok(None) => {
+ tracing::info!("No updates available");
+ }
+ Err(e) => {
+ tracing::error!(error = %e, "Failed to check for updates");
+ }
+ }
+}
diff --git a/packages/hoppscotch-desktop/src-tauri/tauri.conf.json b/packages/hoppscotch-desktop/src-tauri/tauri.conf.json
new file mode 100644
index 000000000..11c77d434
--- /dev/null
+++ b/packages/hoppscotch-desktop/src-tauri/tauri.conf.json
@@ -0,0 +1,64 @@
+{
+ "$schema": "https://schema.tauri.app/config/2",
+ "productName": "Hoppscotch",
+ "version": "25.1.0-0",
+ "identifier": "io.hoppscotch.desktop",
+ "build": {
+ "beforeDevCommand": "pnpm dev",
+ "devUrl": "http://localhost:1420",
+ "beforeBuildCommand": "pnpm build",
+ "frontendDist": "../dist"
+ },
+ "app": {
+ "windows": [
+ {
+ "title": "hoppscotch-desktop",
+ "decorations": false,
+ "width": 500,
+ "height": 600,
+ "alwaysOnTop": true,
+ "resizable": false,
+ "visible": false,
+ "shadow": true
+ }
+ ],
+ "security": {
+ "csp": {
+ "default-src": "blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' customprotocol: asset:",
+ "script-src": "* 'self' 'unsafe-eval' 'wasm-unsafe-eval' 'unsafe-inline'",
+ "connect-src": "ipc: http://ipc.localhost https://api.hoppscotch.io *",
+ "font-src": "https://fonts.gstatic.com data: 'self' *",
+ "img-src": "'self' asset: http://asset.localhost blob: data: customprotocol: *",
+ "style-src": "'unsafe-inline' 'self' https://fonts.googleapis.com data: asset: *",
+ "worker-src": "* 'self' data: 'unsafe-eval' blob:"
+ }
+ }
+ },
+ "plugins": {
+ "deep-link": {
+ "desktop": {
+ "schemes": ["io.hoppscotch.desktop"]
+ }
+ }
+ },
+ "bundle": {
+ "active": true,
+ "targets": "all",
+ "createUpdaterArtifacts": true,
+ "icon": [
+ "icons/32x32.png",
+ "icons/128x128.png",
+ "icons/icon.icns",
+ "icons/icon.ico"
+ ]
+ },
+ "plugins": {
+ "updater": {
+ "active": true,
+ "endpoints": ["https://releases.hoppscotch.com/hoppscotch-desktop.json"],
+ "dialog": true,
+ "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDYwOURFNEY4RDRGMDQxNTgKUldSWVFmRFUrT1NkWUc1RDM0Z2ZjTHE2dG52Q3ZlYzg3ZXVpZU9KaENPWTBMd3MwY0hWa1lreDcK"
+ }
+ }
+}
diff --git a/packages/hoppscotch-desktop/src/App.vue b/packages/hoppscotch-desktop/src/App.vue
new file mode 100644
index 000000000..7f5f247d5
--- /dev/null
+++ b/packages/hoppscotch-desktop/src/App.vue
@@ -0,0 +1,24 @@
+<template>
+ <div class="flex h-screen overflow-hidden bg-primary text-secondary">
+ <LayoutSidebar v-model:expanded="sidebarExpanded" v-model:open="sidebarOpen" />
+ <div class="flex-1 flex flex-col overflow-hidden">
+ <main class="flex-1 overflow-y-auto bg-primary">
+ <div class="container mx-auto flex items-center justify-center">
+ <Suspense>
+ <RouterView />
+ </Suspense>
+ </div>
+ </main>
+ </div>
+ <Toaster position="bottom-right" richColors />
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref } from "vue"
+import { Toaster } from "@hoppscotch/ui"
+import LayoutSidebar from "~/components/layout/LayoutSidebar.vue"
+
+const sidebarOpen = ref(false)
+const sidebarExpanded = ref(true)
+</script>
diff --git a/packages/hoppscotch-desktop/src/assets/scss/styles.scss b/packages/hoppscotch-desktop/src/assets/scss/styles.scss
new file mode 100644
index 000000000..7718900ee
--- /dev/null
+++ b/packages/hoppscotch-desktop/src/assets/scss/styles.scss
@@ -0,0 +1,103 @@
+@mixin base-theme {
+ --font-sans: 'Inter Variable', sans-serif;
+ --font-mono: 'Roboto Mono Variable', monospace;
+ --font-size-body: 0.75rem;
+ --font-size-tiny: 0.625rem;
+ --line-height-body: 1rem;
+}
+
+@mixin dark-theme {
+ --primary-color: #181818;
+ --primary-light-color: #1c1c1e;
+ --primary-dark-color: #262626;
+ --primary-contrast-color: #171717;
+
+ --secondary-color: #a3a3a3;
+ --secondary-light-color: #737373;
+ --secondary-dark-color: #fafafa;
+
+ --divider-color: #262626;
+ --divider-light-color: #1f1f1f;
+ --divider-dark-color: #2d2d2d;
+
+ --error-color: #292524;
+ --tooltip-color: #f5f5f5;
+ --popover-color: #1b1b1b;
+}
+
+@mixin green-theme {
+ --accent-color: #10b981;
+ --accent-light-color: #34d399;
+ --accent-dark-color: #059669;
+ --accent-contrast-color: #fff;
+ --gradient-from-color: #a7f3d0;
+ --gradient-via-color: #34d399;
+ --gradient-to-color: #059669;
+}
+
+:root {
+ @include base-theme;
+ @include dark-theme;
+ @include green-theme;
+}
+
+:root.dark {
+ @include dark-theme;
+ color-scheme: dark;
+}
+
+:root[data-accent='green'] {
+ @include green-theme;
+}
+
+* {
+ backface-visibility: hidden;
+ -moz-backface-visibility: hidden;
+ -webkit-backface-visibility: hidden;
+
+ &::before {
+ backface-visibility: hidden;
+ -moz-backface-visibility: hidden;
+ -webkit-backface-visibility: hidden;
+ }
+
+ &::after {
+ backface-visibility: hidden;
+ -moz-backface-visibility: hidden;
+ -webkit-backface-visibility: hidden;
+ }
+
+ @apply selection:bg-accentDark;
+ @apply selection:text-accentContrast;
+ @apply overscroll-none;
+}
+
+:root {
+ @apply antialiased;
+ accent-color: var(--accent-color);
+ font-variant-ligatures: common-ligatures;
+}
+
+input::placeholder,
+textarea::placeholder {
+ @apply text-secondary;
+ @apply opacity-50 #{!important};
+}
+
+input,
+textarea {
+ @apply text-secondaryDark;
+ @apply font-medium;
+}
+
+body {
+ @apply bg-primary;
+ @apply text-body text-secondary;
+ @apply font-medium;
+ @apply select-none;
+ @apply overflow-x-hidden;
+ @apply leading-body #{!important};
+ animation: fade 300ms forwards;
+ -webkit-tap-highlight-color: transparent;
+ -webkit-touch-callout: none;
+}
diff --git a/packages/hoppscotch-desktop/src/assets/scss/tailwind.scss b/packages/hoppscotch-desktop/src/assets/scss/tailwind.scss
new file mode 100644
index 000000000..b5c61c956
--- /dev/null
+++ b/packages/hoppscotch-desktop/src/assets/scss/tailwind.scss
@@ -0,0 +1,3 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
diff --git a/packages/hoppscotch-desktop/src/assets/vue.svg b/packages/hoppscotch-desktop/src/assets/vue.svg
new file mode 100644
index 000000000..770e9d333
--- /dev/null
+++ b/packages/hoppscotch-desktop/src/assets/vue.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
\ No newline at end of file
diff --git a/packages/hoppscotch-desktop/src/components.d.ts b/packages/hoppscotch-desktop/src/components.d.ts
new file mode 100644
index 000000000..55fdda696
--- /dev/null
+++ b/packages/hoppscotch-desktop/src/components.d.ts
@@ -0,0 +1,16 @@
+/* eslint-disable */
+// @ts-nocheck
+// Generated by unplugin-vue-components
+// Read more: https://github.com/vuejs/core/pull/3399
+export {}
+
+/* prettier-ignore */
+declare module 'vue' {
+ export interface GlobalComponents {
+ HoppButtonPrimary: typeof import('@hoppscotch/ui')['HoppButtonPrimary']
+ HoppSmartItem: typeof import('@hoppscotch/ui')['HoppSmartItem']
+ LayoutHeader: typeof import('./components/layout/LayoutHeader.vue')['default']
+ LayoutSidebar: typeof import('./components/layout/LayoutSidebar.vue')['default']
+ Tippy: typeof import('vue-tippy')['Tippy']
+ }
+}
diff --git a/packages/hoppscotch-desktop/src/components/layout/LayoutHeader.vue b/packages/hoppscotch-desktop/src/components/layout/LayoutHeader.vue
new file mode 100644
index 000000000..e7e6fbbfa
--- /dev/null
+++ b/packages/hoppscotch-desktop/src/components/layout/LayoutHeader.vue
@@ -0,0 +1,35 @@
+<template>
+ <header
+ class="flex items-center justify-between border-b border-divider px-6 py-2 mb-4 bg-primary shadow-lg"
+ >
+ <div class="flex items-center">
+ <HoppButtonSecondary
+ v-tippy="{ content: 'Toggle Navigation' }"
+ :icon="IconLucideMenu"
+ class="md:hidden mr-2"
+ @click="emit('toggle-sidebar')"
+ />
+ <HoppButtonSecondary
+ v-tippy="{ content: expanded ? 'Collapse Sidebar' : 'Expand Sidebar' }"
+ :icon="expanded ? IconLucideSidebarClose : IconLucideSidebarOpen"
+ class="hidden md:flex"
+ @click="emit('toggle-expand')"
+ />
+ </div>
+ </header>
+</template>
+
+<script setup lang="ts">
+import IconLucideMenu from "~icons/lucide/menu"
+import IconLucideSidebarClose from "~icons/lucide/sidebar-close"
+import IconLucideSidebarOpen from "~icons/lucide/sidebar-open"
+
+defineProps<{
+ expanded: boolean
+}>()
+
+const emit = defineEmits<{
+ (e: "toggle-sidebar"): void
+ (e: "toggle-expand"): void
+}>()
+</script>
diff --git a/packages/hoppscotch-desktop/src/components/layout/LayoutSidebar.vue b/packages/hoppscotch-desktop/src/components/layout/LayoutSidebar.vue
new file mode 100644
index 000000000..dd943a08f
--- /dev/null
+++ b/packages/hoppscotch-desktop/src/components/layout/LayoutSidebar.vue
@@ -0,0 +1,63 @@
+<template>
+ <Transition name="slide">
+ <div
+ v-if="open"
+ class="fixed inset-0 z-20 transition-opacity bg-primary opacity-50 lg:hidden"
+ @click="emit('update:open', false)"
+ />
+ </Transition>
+
+ <div
+ :class="[
+ open ? '' : '-translate-x-full ease-in',
+ expanded ? 'w-56' : 'w-16'
+ ]"
+ class="fixed md:static md:translate-x-0 md:inset-0 inset-y-0 left-0 z-30 transition duration-300 flex overflow-y-auto bg-primary border-r border-divider"
+ >
+ <div class="w-full">
+ <div class="flex items-center px-4 my-4">
+ <img src="/logo.svg" alt="Hoppscotch" class="h-7 w-7" />
+ <span v-if="expanded" class="ml-4 font-semibold text-accentContrast">HOPPSCOTCH</span>
+ </div>
+
+ <nav class="my-5">
+ <HoppSmartItem
+ label="Home"
+ :class="!expanded && 'justify-center'"
+ to="/"
+ exact-active-class="!text-accent !bg-primaryLight w-full"
+ >
+ <template #icon>
+ <IconLucideHome />
+ </template>
+ </HoppSmartItem>
+ </nav>
+ </div>
+ </div>
+</template>
+
+<script setup lang="ts">
+import IconLucideHome from "~icons/lucide/home"
+
+defineProps<{
+ open: boolean
+ expanded: boolean
+}>()
+
+const emit = defineEmits<{
+ (e: "update:open", value: boolean): void
+ (e: "update:expanded", value: boolean): void
+}>()
+</script>
+
+<style>
+.slide-enter-active,
+.slide-leave-active {
+ transition: opacity 0.3s ease;
+}
+
+.slide-enter-from,
+.slide-leave-to {
+ opacity: 0;
+}
+</style>
diff --git a/packages/hoppscotch-desktop/src/main.ts b/packages/hoppscotch-desktop/src/main.ts
new file mode 100644
index 000000000..19f072ce4
--- /dev/null
+++ b/packages/hoppscotch-desktop/src/main.ts
@@ -0,0 +1,14 @@
+import { createApp } from "vue"
+import App from "./App.vue"
+import router from "./router"
+
+import '@hoppscotch/ui/style.css'
+import './assets/scss/styles.scss'
+import './assets/scss/tailwind.scss'
+import '@fontsource-variable/inter'
+import '@fontsource-variable/material-symbols-rounded'
+import '@fontsource-variable/roboto-mono'
+
+const app = createApp(App)
+app.use(router)
+app.mount('#app')
diff --git a/packages/hoppscotch-desktop/src/router.ts b/packages/hoppscotch-desktop/src/router.ts
new file mode 100644
index 000000000..05b117004
--- /dev/null
+++ b/packages/hoppscotch-desktop/src/router.ts
@@ -0,0 +1,15 @@
+import { createRouter, createWebHistory } from 'vue-router'
+import Home from './views/Home.vue'
+
+const router = createRouter({
+ history: createWebHistory(),
+ routes: [
+ {
+ path: '/',
+ name: 'home',
+ component: Home
+ }
+ ]
+})
+
+export default router
diff --git a/packages/hoppscotch-desktop/src/types/index.ts b/packages/hoppscotch-desktop/src/types/index.ts
new file mode 100644
index 000000000..8880357ab
--- /dev/null
+++ b/packages/hoppscotch-desktop/src/types/index.ts
@@ -0,0 +1,10 @@
+export interface RecentInstance {
+ url: string
+ lastUsed: string
+ version?: string
+ pinned: boolean
+}
+
+export interface StoreSchema {
+ recentInstances: RecentInstance[]
+}
diff --git a/packages/hoppscotch-desktop/src/views/Home.vue b/packages/hoppscotch-desktop/src/views/Home.vue
new file mode 100644
index 000000000..fedbf0607
--- /dev/null
+++ b/packages/hoppscotch-desktop/src/views/Home.vue
@@ -0,0 +1,236 @@
+<template>
+ <div class="flex flex-col items-center justify-center w-full h-screen bg-primary">
+ <div class="flex flex-col items-center space-y-6">
+ <div class="flex items-center space-x-4">
+ <IconLucideCloud class="h-16 w-16 text-secondaryDark" />
+ <div class="flex flex-col">
+ <h1 class="text-2xl font-semibold text-secondaryDark">Hoppscotch</h1>
+ </div>
+ </div>
+
+ <div v-if="isLoading" class="flex flex-col items-center space-y-4">
+ <div class="loading-spinner w-10 h-10 border-4 border-t-purple-500 rounded-full animate-spin"></div>
+ <p class="text-secondary">Loading Hoppscotch...</p>
+ </div>
+
+ <div v-else-if="error" class="flex flex-col items-center space-y-4">
+ <IconLucideAlertCircle class="h-10 w-10 text-red-500" />
+ <p class="text-red-500">{{ error }}</p>
+ <HoppButtonPrimary
+ label="Try Again"
+ :icon="IconLucideRefreshCw"
+ @click="loadVendored"
+ />
+ </div>
+ </div>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { ref, onMounted } from "vue";
+import { LazyStore } from '@tauri-apps/plugin-store';
+import { load } from "@hoppscotch/plugin-appload";
+import { invoke } from "@tauri-apps/api/core";
+
+import IconLucideCloud from "~icons/lucide/cloud"
+import IconLucideAlertCircle from "~icons/lucide/alert-circle"
+import IconLucideRefreshCw from "~icons/lucide/refresh-cw"
+
+const HOME_STORE_PATH = "hopp.store.json";
+const APP_STORE_PATH = "hoppscotch.hoppscotch.store";
+
+interface VendoredInstance {
+ type: "vendored";
+ displayName: string;
+ version: string;
+}
+
+interface ConnectionState {
+ status: "idle" | "connecting" | "connected" | "error";
+ instance?: VendoredInstance;
+ target?: string;
+ message?: string;
+}
+
+interface StoredData {
+ schemaVersion: number;
+ metadata: {
+ createdAt: string;
+ updatedAt: string;
+ namespace: string;
+ };
+ data: unknown;
+}
+
+interface StoreData {
+ data: {
+ [namespace: string]: {
+ [key: string]: StoredData;
+ };
+ };
+}
+
+const home_store = new LazyStore(HOME_STORE_PATH);
+const app_store = new LazyStore(APP_STORE_PATH);
+const isLoading = ref(true);
+const error = ref("");
+
+const saveConnectionState = async (state: ConnectionState) => {
+ try {
+ await home_store.set("connectionState", state);
+ await home_store.save();
+ } catch (err) {
+ console.error("Failed to save connection state:", err);
+ }
+};
+
+const migrateFromLocalStorage = async () => {
+ const keyMappings = {
+ settings: "settings",
+ collections: "restCollections",
+ collectionsGraphql: "gqlCollections",
+ environments: "environments",
+ history: "restHistory",
+ graphqlHistory: "gqlHistory",
+ WebsocketRequest: "websocket",
+ SocketIORequest: "socketio",
+ SSERequest: "sse",
+ MQTTRequest: "mqtt",
+ globalEnv: "globalEnv",
+ restTabState: "restTabs",
+ gqlTabState: "gqlTabs",
+ secretEnvironments: "secretEnvironments"
+ };
+
+ console.log("Starting migration from localStorage to home_store...");
+ let migratedCount = 0;
+
+ const storeData: StoreData = {
+ data: {
+ "persistence.v1": {}
+ }
+ };
+
+ console.log("Current localStorage keys:", Object.keys(localStorage));
+
+ for (const [oldKey, newKey] of Object.entries(keyMappings)) {
+ const data = localStorage.getItem(oldKey);
+ if (data) {
+ try {
+ console.log(`Migrating ${oldKey} to persistence.v1.${newKey}...`);
+ let parsedData;
+
+ try {
+ parsedData = JSON.parse(data);
+ } catch (e) {
+ console.error(`Failed to parse ${oldKey} data:`, e);
+ continue;
+ }
+
+ const storedData: StoredData = {
+ schemaVersion: 1,
+ metadata: {
+ createdAt: new Date().toISOString(),
+ namespace: "persistence.v1",
+ updatedAt: new Date().toISOString(),
+ },
+ data: parsedData
+ };
+
+ storeData.data["persistence.v1"][newKey] = storedData;
+
+ localStorage.removeItem(oldKey);
+ migratedCount++;
+ console.log(`Successfully migrated ${oldKey}`);
+ } catch (err) {
+ console.error(`Failed to migrate ${oldKey}:`, err);
+ }
+ }
+ }
+
+ await app_store.set('data', storeData.data);
+ await app_store.save();
+ console.log(`Migration complete. Migrated ${migratedCount} items.`);
+};
+
+const loadVendored = async () => {
+ isLoading.value = true;
+ error.value = "";
+
+ try {
+ console.log("Initializing home_store and starting migration process");
+
+ await home_store.init();
+ await app_store.init();
+
+ console.log(`Using home_store path: ${HOME_STORE_PATH}`);
+ console.log("home_Store initialized successfully");
+
+ try {
+ await migrateFromLocalStorage();
+ console.log("Migration completed successfully");
+ } catch (migrationError) {
+ console.error("Migration error:", migrationError);
+ }
+
+ try {
+ console.log("Checking for updates before loading app...");
+ await invoke('check_updates_and_wait');
+ console.log("Update check completed");
+ } catch (updateError) {
+ console.error("Update check error:", updateError);
+ }
+
+ const vendoredInstance: VendoredInstance = {
+ type: "vendored",
+ displayName: "Vendored",
+ version: "vendored"
+ };
+
+ await saveConnectionState({
+ status: "connected",
+ instance: vendoredInstance
+ });
+
+ console.log("Loading vendored app...");
+ const loadResp = await load({
+ bundleName: "Hoppscotch",
+ window: { title: "Hoppscotch" }
+ });
+
+ if (!loadResp.success) {
+ throw new Error("Failed to load Hoppscotch Vendored");
+ }
+
+ console.log("Vendored app loaded successfully");
+ } catch (err) {
+ const errorMessage = err instanceof Error ? err.message : String(err);
+ console.error("Error loading vendored app:", errorMessage);
+ error.value = errorMessage;
+
+ await saveConnectionState({
+ status: "error",
+ target: "Vendored",
+ message: errorMessage
+ });
+
+ isLoading.value = false;
+ }
+};
+
+onMounted(() => {
+ loadVendored();
+});
+</script>
+
+<style scoped>
+.loading-spinner {
+ border-radius: 50%;
+ animation: spin 1s linear infinite;
+}
+
+@keyframes spin {
+ 0% { transform: rotate(0deg); }
+ 100% { transform: rotate(360deg); }
+}
+</style>
diff --git a/packages/hoppscotch-desktop/src/vite-env.d.ts b/packages/hoppscotch-desktop/src/vite-env.d.ts
new file mode 100644
index 000000000..fc812394b
--- /dev/null
+++ b/packages/hoppscotch-desktop/src/vite-env.d.ts
@@ -0,0 +1,7 @@
+/// <reference types="vite/client" />
+
+declare module "*.vue" {
+ import type { DefineComponent } from "vue";
+ const component: DefineComponent<{}, {}, any>;
+ export default component;
+}
diff --git a/packages/hoppscotch-desktop/tailwind.config.ts b/packages/hoppscotch-desktop/tailwind.config.ts
new file mode 100644
index 000000000..f8dc6625e
--- /dev/null
+++ b/packages/hoppscotch-desktop/tailwind.config.ts
@@ -0,0 +1,7 @@
+import { Config } from 'tailwindcss';
+import preset from '@hoppscotch/ui/ui-preset';
+
+export default {
+ content: ['src/**/*.{vue,html}'],
+ presets: [preset],
+} satisfies Config;
diff --git a/packages/hoppscotch-desktop/tsconfig.json b/packages/hoppscotch-desktop/tsconfig.json
new file mode 100644
index 000000000..cfb13a569
--- /dev/null
+++ b/packages/hoppscotch-desktop/tsconfig.json
@@ -0,0 +1,42 @@
+{
+ "compilerOptions": {
+ "target": "ES2020",
+ "useDefineForClassFields": true,
+ "module": "ESNext",
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
+ "skipLibCheck": true,
+
+ /* Bundler mode */
+ "moduleResolution": "bundler",
+ "allowImportingTsExtensions": true,
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "noEmit": true,
+ "jsx": "preserve",
+
+ /* Linting */
+ "strict": true,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "noFallthroughCasesInSwitch": true,
+ "paths": {
+ "~/*": ["./src/*"],
+ "@composables/*": ["./src/composables/*"],
+ "@components/*": ["./src/components/*"],
+ "@helpers/*": ["./src/helpers/*"],
+ "@modules/*": ["./src/modules/*"],
+ "@workers/*": ["./src/workers/*"],
+ "@functional/*": ["./src/helpers/functional/*"]
+ },
+ "types": [
+ "vite/client",
+ "unplugin-icons/types/vue"
+ ]
+ },
+ "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
+ "references": [{ "path": "./tsconfig.node.json" }],
+ "vueCompilerOptions": {
+ "jsxTemplates": true,
+ "experimentalRfc436": true
+ }
+}
diff --git a/packages/hoppscotch-desktop/tsconfig.node.json b/packages/hoppscotch-desktop/tsconfig.node.json
new file mode 100644
index 000000000..42872c59f
--- /dev/null
+++ b/packages/hoppscotch-desktop/tsconfig.node.json
@@ -0,0 +1,10 @@
+{
+ "compilerOptions": {
+ "composite": true,
+ "skipLibCheck": true,
+ "module": "ESNext",
+ "moduleResolution": "bundler",
+ "allowSyntheticDefaultImports": true
+ },
+ "include": ["vite.config.ts"]
+}
diff --git a/packages/hoppscotch-desktop/vite.config.ts b/packages/hoppscotch-desktop/vite.config.ts
new file mode 100644
index 000000000..b59cc6b8b
--- /dev/null
+++ b/packages/hoppscotch-desktop/vite.config.ts
@@ -0,0 +1,80 @@
+import { defineConfig } from "vite"
+import vue from "@vitejs/plugin-vue"
+import Icons from 'unplugin-icons/vite'
+import IconResolver from 'unplugin-icons/resolver'
+import Components from 'unplugin-vue-components/vite'
+import path from 'path'
+
+// @ts-expect-error process is a nodejs global
+const host = process.env.TAURI_DEV_HOST
+
+export default defineConfig(async () => ({
+ plugins: [
+ vue(),
+ Components({
+ dts: './src/components.d.ts',
+ resolvers: [
+ IconResolver({
+ prefix: 'icon',
+ }),
+ (compName: string) => {
+ if (compName.startsWith('Hopp'))
+ return { name: compName, from: '@hoppscotch/ui' }
+ return undefined
+ },
+ ],
+ types: [
+ {
+ from: 'vue-tippy',
+ names: ['Tippy'],
+ },
+ ],
+ include: [/\.vue$/, /\.vue\?vue/],
+ dirs: ['src/components'],
+ }),
+ Icons({
+ compiler: 'vue3',
+ }),
+ ],
+
+ resolve: {
+ alias: {
+ "~": path.resolve(__dirname, "src"),
+ "~/": path.resolve(__dirname, "src/"),
+ },
+ dedupe: ["vue"],
+ },
+
+ optimizeDeps: {
+ include: ['@hoppscotch/kernel']
+ },
+
+ build: {
+ rollupOptions: {
+ output: {
+ manualChunks: {
+ kernel: ['@hoppscotch/kernel'],
+ ui: ['@hoppscotch/ui'],
+ }
+ }
+ }
+ },
+
+ // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
+ clearScreen: false,
+ server: {
+ port: 1420,
+ strictPort: true,
+ host: host || false,
+ hmr: host
+ ? {
+ protocol: "ws",
+ host,
+ port: 1421,
+ }
+ : undefined,
+ watch: {
+ ignored: ["**/src-tauri/**"],
+ },
+ },
+}))
diff --git a/packages/hoppscotch-kernel/README.md b/packages/hoppscotch-kernel/README.md
new file mode 100644
index 000000000..bcdccd12f
--- /dev/null
+++ b/packages/hoppscotch-kernel/README.md
@@ -0,0 +1,103 @@
+# Hoppscotch Kernel
+
+Cross-platform abstraction kernel for Hoppscotch, a unified interface between application logic and platform-specific implementations.
+
+## Architecture
+
+The kernel acts as a thin abstraction layer, mediating between high-level application logic and low-level platform implementations, similar to how operating system kernels abstract over hardware details. This helps the core Hoppscotch app be platform-agnostic while maintaining near native performance.
+
+This codebase is minimal by design, providing just the building blocks for constructing features. If possible, always try composition before modifying the kernel directly.
+
+## Modules
+
+### IO Module
+File system and external resource handling:
+
+```typescript
+interface IoV1 {
+ saveFileWithDialog(opts: SaveFileWithDialogOptions): Promise<SaveFileResponse>
+ openExternalLink(opts: OpenExternalLinkOptions): Promise<OpenExternalLinkResponse>
+ listen<T>(event: string, handler: EventCallback<T>): Promise<UnlistenFn>
+}
+```
+
+### Relay Module
+Network operations with platform-specific optimizations:
+
+```typescript
+interface RelayV1 {
+ readonly capabilities: RelayCapabilities
+ execute(request: RelayRequest): {
+ cancel: () => Promise<void>
+ emitter: RelayEventEmitter<RelayRequestEvents>
+ response: Promise<Either<RelayError, RelayResponse>>
+ }
+}
+```
+
+### Store Module
+Cross-platform persistence with encryption support:
+
+```typescript
+interface StoreV1 {
+ readonly capabilities: Set<StoreCapability>
+ set(namespace: string, key: string, value: unknown, options?: StorageOptions): Promise<Either<StoreError, void>>
+ watch(namespace: string, key: string): StoreEventEmitter<StoreEvents>
+}
+```
+
+## Usage
+
+### Kernel Initialization
+
+```typescript
+import { initKernel } from '@hoppscotch/kernel'
+
+// Platform-specific initialization
+const kernel = initKernel('web' | 'desktop')
+```
+
+### Network Operations
+
+```typescript
+import { RelayRequest } from '@hoppscotch/kernel'
+
+const request: RelayRequest = {
+ id: 1,
+ url: "https://api.example.com",
+ method: "GET",
+ version: "HTTP/1.1",
+ headers: {
+ "Content-Type": "application/json"
+ }
+}
+
+// Execute with capability checks
+const { response, cancel } = kernel.relay.execute(request)
+```
+
+### Storage Operations
+
+```typescript
+// Encrypted storage with compression
+await kernel.store.set("collections", "team-a", data, {
+ encrypt: true,
+ compress: true
+})
+
+// Watch for changes
+kernel.store.watch("collections", "team-a").on("change",
+ (update) => console.log("Collection updated:", update)
+)
+```
+
+### File Operations
+
+```typescript
+// Platform-agnostic file save
+await kernel.io.saveFileWithDialog({
+ data: new Uint8Array([...]),
+ suggestedFilename: "export.json",
+ contentType: "application/json"
+})
+```
diff --git a/packages/hoppscotch-kernel/package.json b/packages/hoppscotch-kernel/package.json
new file mode 100644
index 000000000..7a1d88ca4
--- /dev/null
+++ b/packages/hoppscotch-kernel/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "@hoppscotch/kernel",
+ "version": "0.1.0",
+ "description": "Cross-platform runtime kernel for Hoppscotch platform-ops",
+ "type": "module",
+ "main": "dist/hoppscotch-kernel.cjs",
+ "module": "dist/hoppscotch-kernel.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "dist/*"
+ ],
+ "scripts": {
+ "dev": "vite build --watch",
+ "build:code": "vite build",
+ "build:decl": "tsc --project tsconfig.decl.json",
+ "build": "pnpm run build:code && pnpm run build:decl",
+ "prepare": "pnpm run build:code && pnpm run build:decl",
+ "do-typecheck": "pnpm exec tsc --noEmit"
+ },
+ "exports": {
+ ".": {
+ "type": "./dist/index.d.ts",
+ "import": "./dist/hoppscotch-kernel.js",
+ "require": "./dist/hoppscotch-kernel.cjs"
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/hoppscotch/hoppscotch.git"
+ },
+ "author": "Hoppscotch ([email protected])",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/hoppscotch/hoppscotch/issues"
+ },
+ "homepage": "https://github.com/hoppscotch/hoppscotch#readme",
+ "devDependencies": {
+ "@types/node": "22.9.3",
+ "typescript": "5.7.2",
+ "vite": "5.4.11"
+ },
+ "peerDependencies": {
+ "@tauri-apps/api": "2.1.1"
+ },
+ "peerDependenciesMeta": {
+ "@tauri-apps/api": {
+ "optional": true
+ }
+ },
+ "dependencies": {
+ "axios": "1.6.2",
+ "fp-ts": "2.16.9",
+ "aws4fetch": "1.0.20",
+ "zod": "3.22.4",
+ "superjson": "2.2.2",
+ "@tauri-apps/plugin-shell": "2.0.1",
+ "@tauri-apps/plugin-dialog": "2.0.1",
+ "@tauri-apps/plugin-fs": "2.0.2",
+ "@tauri-apps/plugin-store": "2.2.0",
+ "@hoppscotch/plugin-relay": "github:CuriousCorrelation/tauri-plugin-relay"
+ }
+}
diff --git a/packages/hoppscotch-kernel/src/index.ts b/packages/hoppscotch-kernel/src/index.ts
new file mode 100644
index 000000000..3439142f9
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/index.ts
@@ -0,0 +1,121 @@
+import type { Version } from './type/versioning'
+
+import { VERSIONS as IO_VERSIONS } from './io'
+import { IO_IMPLS as WEB_IO_IMPLS } from './io/impl/web'
+import { IO_IMPLS as DESKTOP_IO_IMPLS } from './io/impl/desktop'
+
+import { VERSIONS as RELAY_VERSIONS } from './relay'
+import { RELAY_IMPLS as WEB_RELAY_IMPLS } from './relay/impl/web'
+import { RELAY_IMPLS as DESKTOP_RELAY_IMPLS } from './relay/impl/desktop'
+
+import { VERSIONS as STORE_VERSIONS } from './store'
+import { STORE_IMPLS as WEB_STORE_IMPLS } from './store/impl/web'
+import { STORE_IMPLS as DESKTOP_STORE_IMPLS } from './store/impl/desktop'
+
+export interface KernelInfo {
+ name: string
+ version: Version
+ capabilities: string[]
+}
+
+export interface KernelAPI {
+ info: KernelInfo
+ io: typeof IO_VERSIONS.v1.api
+ relay: typeof RELAY_VERSIONS.v1.api
+ store: typeof STORE_VERSIONS.v1.api
+}
+
+export type KernelMode = 'web' | 'desktop'
+
+declare global {
+ interface Window {
+ __KERNEL__?: KernelAPI
+ __KERNEL_MODE__?: KernelMode
+ }
+}
+
+export function getKernelMode(): KernelMode {
+ return window.__KERNEL_MODE__ || "web"
+}
+
+export function initKernel(mode?: KernelMode): KernelAPI {
+ if (mode === 'desktop') {
+ const kernel: KernelAPI = {
+ info: {
+ name: "desktop-kernel",
+ version: { major: 1, minor: 0, patch: 0 },
+ capabilities: ["basic-io"]
+ },
+ io: DESKTOP_IO_IMPLS.v1.api,
+ relay: DESKTOP_RELAY_IMPLS.v1.api,
+ store: DESKTOP_STORE_IMPLS.v1.api
+ }
+
+ window.__KERNEL__ = kernel
+ return kernel
+ } else {
+ const kernel: KernelAPI = {
+ info: {
+ name: "web-kernel",
+ version: { major: 1, minor: 0, patch: 0 },
+ capabilities: ["basic-io"]
+ },
+ io: WEB_IO_IMPLS.v1.api,
+ relay: WEB_RELAY_IMPLS.v1.api,
+ store: WEB_STORE_IMPLS.v1.api
+ }
+
+ window.__KERNEL__ = kernel
+ return kernel
+ }
+}
+
+export type {
+ SaveFileWithDialogOptions,
+ SaveFileResponse,
+ OpenExternalLinkOptions,
+ OpenExternalLinkResponse,
+ Event,
+ EventCallback,
+ UnlistenFn,
+ IoV1,
+} from '@io/v/1'
+
+export type {
+ RelayRequest,
+ RelayResponse,
+ RelayResponseBody,
+ FormData,
+ FormDataValue,
+ RelayError,
+ RelayV1,
+ Method,
+ Version,
+ ContentType,
+ AuthType,
+ CertificateType,
+ RelayCapabilities,
+ RelayEventEmitter,
+ RelayRequestEvents,
+ StatusCode
+} from '@relay/v/1'
+
+export {
+ content,
+ body,
+ MediaType,
+} from '@relay/v/1'
+
+export type {
+ StoreCapability,
+ StoreError,
+ StoreFile,
+ StorageOptions,
+ StoreEvents,
+ StoreMetadataSchema,
+ StoreMetadata,
+ StoredDataSchema,
+ StoredData,
+ StoreEventEmitter,
+ StoreV1,
+} from '@store/v/1'
diff --git a/packages/hoppscotch-kernel/src/io/impl/desktop/index.ts b/packages/hoppscotch-kernel/src/io/impl/desktop/index.ts
new file mode 100644
index 000000000..db1c44330
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/io/impl/desktop/index.ts
@@ -0,0 +1,5 @@
+import { implementation as ioV1 } from './v/1'
+
+export const IO_IMPLS = {
+ v1: ioV1,
+} as const
diff --git a/packages/hoppscotch-kernel/src/io/impl/desktop/v/1.ts b/packages/hoppscotch-kernel/src/io/impl/desktop/v/1.ts
new file mode 100644
index 000000000..b5f835cee
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/io/impl/desktop/v/1.ts
@@ -0,0 +1,52 @@
+import { VersionedAPI } from '@type/versioning'
+import { IoV1, SaveFileWithDialogOptions, OpenExternalLinkOptions } from '@io/v/1'
+
+import { save } from "@tauri-apps/plugin-dialog"
+import { writeFile, writeTextFile } from "@tauri-apps/plugin-fs"
+import { open } from "@tauri-apps/plugin-shell"
+import { listen as tauriListen, emit as tauriEmit, Event } from '@tauri-apps/api/event'
+
+export const implementation: VersionedAPI<IoV1> = {
+ version: { major: 1, minor: 0, patch: 0 },
+ api: {
+ async saveFileWithDialog(opts: SaveFileWithDialogOptions) {
+ const path = await save({
+ filters: opts.filters,
+ defaultPath: opts.suggestedFilename,
+ })
+
+ if (!path) {
+ return { type: "cancelled" as const }
+ }
+
+ if (typeof opts.data === "string") {
+ await writeTextFile(path, opts.data)
+ } else {
+ await writeFile(path, opts.data)
+ }
+
+ return { type: "saved" as const, path }
+ },
+
+ async openExternalLink(opts: OpenExternalLinkOptions) {
+ await open(opts.url)
+ return { type: "opened" as const }
+ },
+
+ async listen<T>(event: string, handler: (event: Event<T>) => void) {
+ return await tauriListen<T>(event, handler)
+ },
+
+ async once<T>(event: string, handler: (event: Event<T>) => void) {
+ const unlistenFn = await tauriListen<T>(event, (e) => {
+ unlistenFn()
+ handler(e)
+ })
+ return unlistenFn
+ },
+
+ async emit(event: string, payload?: unknown) {
+ await tauriEmit(event, payload)
+ }
+ }
+}
diff --git a/packages/hoppscotch-kernel/src/io/impl/web/index.ts b/packages/hoppscotch-kernel/src/io/impl/web/index.ts
new file mode 100644
index 000000000..db1c44330
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/io/impl/web/index.ts
@@ -0,0 +1,5 @@
+import { implementation as ioV1 } from './v/1'
+
+export const IO_IMPLS = {
+ v1: ioV1,
+} as const
diff --git a/packages/hoppscotch-kernel/src/io/impl/web/v/1.ts b/packages/hoppscotch-kernel/src/io/impl/web/v/1.ts
new file mode 100644
index 000000000..08ed23e62
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/io/impl/web/v/1.ts
@@ -0,0 +1,83 @@
+import { VersionedAPI } from '@type/versioning'
+import { IoV1, SaveFileWithDialogOptions, OpenExternalLinkOptions, Event } from '@io/v/1'
+import { pipe } from 'fp-ts/function'
+import * as S from 'fp-ts/string'
+import * as RNEA from 'fp-ts/ReadonlyNonEmptyArray'
+
+export const implementation: VersionedAPI<IoV1> = {
+ version: { major: 1, minor: 0, patch: 0 },
+ api: {
+ async saveFileWithDialog(opts: SaveFileWithDialogOptions) {
+ const file = new Blob([opts.data], { type: opts.contentType })
+ const a = document.createElement("a")
+ const url = URL.createObjectURL(file)
+
+ a.href = url
+ a.download = opts.suggestedFilename ?? pipe(
+ url,
+ S.split("/"),
+ RNEA.last,
+ S.split("#"),
+ RNEA.head,
+ S.split("?"),
+ RNEA.head
+ )
+
+ document.body.appendChild(a)
+ a.click()
+
+ setTimeout(() => {
+ document.body.removeChild(a)
+ URL.revokeObjectURL(url)
+ }, 1000)
+
+ // Browsers provide no way to know if save was successful
+ return { type: "unknown" as const }
+ },
+
+ async openExternalLink(opts: OpenExternalLinkOptions) {
+ window.open(opts.url, "_blank")
+ // Browsers provide no way to know if save was successful
+ return { type: "unknown" as const }
+ },
+
+ async listen<T>(event: string, handler: (event: Event<T>) => void) {
+ const listener = (e: HashChangeEvent) => {
+ const hash = window.location.hash
+ if (hash && hash.startsWith(`#${event}:`)) {
+ const payload = hash.slice(event.length + 2) // Remove #event:
+ handler({
+ event,
+ id: Date.now(),
+ payload: JSON.parse(payload) as T
+ })
+ }
+ }
+
+ window.addEventListener('hashchange', listener)
+ return () => window.removeEventListener('hashchange', listener)
+ },
+
+ async once<T>(event: string, handler: (event: Event<T>) => void) {
+ const listener = (e: HashChangeEvent) => {
+ const hash = window.location.hash
+ if (hash && hash.startsWith(`#${event}:`)) {
+ const payload = hash.slice(event.length + 2) // Remove #event:
+ window.removeEventListener('hashchange', listener)
+ handler({
+ event,
+ id: Date.now(),
+ payload: JSON.parse(payload) as T
+ })
+ }
+ }
+
+ window.addEventListener('hashchange', listener)
+ return () => window.removeEventListener('hashchange', listener)
+ },
+
+ async emit(event: string, payload?: unknown) {
+ window.location.hash = `${event}:${JSON.stringify(payload)}`
+ }
+ }
+}
diff --git a/packages/hoppscotch-kernel/src/io/index.ts b/packages/hoppscotch-kernel/src/io/index.ts
new file mode 100644
index 000000000..becf854cd
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/io/index.ts
@@ -0,0 +1,18 @@
+import { v1 } from './v/1'
+
+export type {
+ IoV1,
+ SaveFileWithDialogOptions,
+ SaveFileResponse,
+ OpenExternalLinkOptions,
+ OpenExternalLinkResponse,
+ Event,
+ EventCallback,
+ UnlistenFn
+} from './v/1'
+
+export const VERSIONS = {
+ v1,
+} as const
+
+export const latest = v1
diff --git a/packages/hoppscotch-kernel/src/io/v/1.ts b/packages/hoppscotch-kernel/src/io/v/1.ts
new file mode 100644
index 000000000..47d07045e
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/io/v/1.ts
@@ -0,0 +1,70 @@
+import type { VersionedAPI } from '@type/versioning'
+
+export interface Event<T> {
+ event: string
+ id: number
+ payload: T
+}
+
+export type EventCallback<T> = (event: Event<T>) => void | Promise<void>
+export type UnlistenFn = () => void | Promise<void>
+
+export type SaveFileWithDialogOptions = {
+ data: string | Uint8Array
+ suggestedFilename: string
+ contentType: string
+ filters?: Array<{
+ name: string
+ extensions: string[]
+ }>
+}
+
+export type OpenExternalLinkOptions = {
+ url: string
+}
+
+export type SaveFileResponse =
+ | { type: "unknown" }
+ | { type: "cancelled" }
+ | { type: "saved"; path: string }
+
+export type OpenExternalLinkResponse =
+ | { type: "unknown" }
+ | { type: "cancelled" }
+ | { type: "opened" }
+
+export interface IoV1 {
+ saveFileWithDialog: (
+ opts: SaveFileWithDialogOptions
+ ) => Promise<SaveFileResponse>
+
+ openExternalLink: (
+ opts: OpenExternalLinkOptions
+ ) => Promise<OpenExternalLinkResponse>
+
+ listen: <T>(
+ event: string,
+ handler: EventCallback<T>
+ ) => Promise<UnlistenFn>
+
+ once: <T>(
+ event: string,
+ handler: EventCallback<T>
+ ) => Promise<UnlistenFn>
+
+ emit: (
+ event: string,
+ payload?: unknown
+ ) => Promise<void>
+}
+
+export const v1: VersionedAPI<IoV1> = {
+ version: { major: 1, minor: 0, patch: 0 },
+ api: {
+ saveFileWithDialog: async () => ({ type: "unknown" }),
+ openExternalLink: async () => ({ type: "unknown" }),
+ listen: async () => () => {},
+ once: async () => () => {},
+ emit: async () => {},
+ }
+}
diff --git a/packages/hoppscotch-kernel/src/relay/impl/desktop/index.ts b/packages/hoppscotch-kernel/src/relay/impl/desktop/index.ts
new file mode 100644
index 000000000..d7b005b65
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/relay/impl/desktop/index.ts
@@ -0,0 +1,5 @@
+import { implementation as relayV1 } from './v/1'
+
+export const RELAY_IMPLS = {
+ v1: relayV1,
+} as const
diff --git a/packages/hoppscotch-kernel/src/relay/impl/desktop/v/1.ts b/packages/hoppscotch-kernel/src/relay/impl/desktop/v/1.ts
new file mode 100644
index 000000000..85b88b56b
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/relay/impl/desktop/v/1.ts
@@ -0,0 +1,195 @@
+import type { VersionedAPI } from '@type/versioning'
+import {
+ type RelayV1,
+ type RelayRequest,
+ type RelayRequestEvents,
+ type RelayEventEmitter,
+ type RelayResponse,
+ type RelayError,
+ body,
+} from '@relay/v/1'
+import * as E from 'fp-ts/Either'
+
+import {
+ execute,
+ cancel,
+ type Request as PluginRequest,
+ type RequestResult
+} from '@hoppscotch/plugin-relay'
+
+export const implementation: VersionedAPI<RelayV1> = {
+ version: { major: 1, minor: 0, patch: 0 },
+ api: {
+ id: 'desktop',
+ capabilities: {
+ method: new Set([
+ 'GET',
+ 'POST',
+ 'PUT',
+ 'DELETE',
+ 'PATCH',
+ 'HEAD',
+ 'OPTIONS'
+ ]),
+ header: new Set([
+ 'stringvalue',
+ 'arrayvalue',
+ 'multivalue'
+ ]),
+ content: new Set([
+ 'text',
+ 'json',
+ 'xml',
+ 'form',
+ 'binary',
+ 'multipart',
+ 'urlencoded',
+ 'stream',
+ 'compression'
+ ]),
+ auth: new Set([
+ 'basic',
+ 'bearer',
+ 'digest',
+ 'oauth2',
+ 'apikey'
+ ]),
+ security: new Set([
+ 'clientcertificates',
+ 'cacertificates',
+ 'certificatevalidation',
+ 'hostverification',
+ 'peerverification'
+ ]),
+ proxy: new Set([
+ 'http',
+ 'https',
+ 'authentication',
+ 'certificates'
+ ]),
+ advanced: new Set([
+ 'retry',
+ 'redirects',
+ 'timeout',
+ 'cookies',
+ 'keepalive',
+ 'tcpoptions',
+ 'http2',
+ 'http3'
+ ])
+ },
+
+ canHandle(request: RelayRequest) {
+ if (!this.capabilities.method.has(request.method)) {
+ return E.left({
+ kind: "unsupported_feature",
+ feature: "method",
+ message: `Method ${request.method} is not supported`,
+ relay: "desktop"
+ })
+ }
+
+ if (request.content && !this.capabilities.content.has(request.content.kind)) {
+ return E.left({
+ kind: "unsupported_feature",
+ feature: "content",
+ message: `Content type ${request.content.kind} is not supported`,
+ relay: "desktop"
+ })
+ }
+
+ if (request.auth && !this.capabilities.auth.has(request.auth.kind)) {
+ return E.left({
+ kind: "unsupported_feature",
+ feature: "authentication",
+ message: `Authentication type ${request.auth.kind} is not supported`,
+ relay: "desktop"
+ })
+ }
+
+ if (request.security?.certificates && !this.capabilities.security.has('clientcertificates')) {
+ return E.left({
+ kind: "unsupported_feature",
+ feature: "security",
+ message: "Client certificates are not supported",
+ relay: "desktop"
+ })
+ }
+
+ if (request.proxy && !this.capabilities.proxy.has(request.proxy.url.startsWith('https') ? 'https' : 'http')) {
+ return E.left({
+ kind: "unsupported_feature",
+ feature: "proxy",
+ message: `Proxy protocol ${request.proxy.url.split(':')[0]} is not supported`,
+ relay: "desktop"
+ })
+ }
+
+ return E.right(true)
+ },
+
+ execute(request: RelayRequest) {
+ const emitter: RelayEventEmitter<RelayRequestEvents> = {
+ on: () => () => {},
+ once: () => () => {},
+ off: () => {}
+ }
+
+ // SAFETY: Type assertion is safe because:
+ // 1. The capabilities system prevents requests with unsupported methods from reaching this point
+ // 2. Content types not supported by the plugin are filtered by capabilities
+ // 3. Authentication methods are validated through capabilities
+ // 4. The plugin's Request type is a subset of our Request type
+ const pluginRequest = {
+ id: request.id,
+ url: request.url,
+ method: request.method,
+ version: request.version,
+ headers: request.headers,
+ params: request.params,
+ content: request.content,
+ auth: request.auth,
+ security: request.security,
+ proxy: request.proxy,
+ } as PluginRequest
+
+ const responsePromise = execute(pluginRequest)
+ .then((result: RequestResult): E.Either<RelayError, RelayResponse> => {
+ if (result.kind === 'success') {
+ const response: RelayResponse = {
+ id: result.response.id,
+ status: result.response.status,
+ statusText: result.response.statusText,
+ version: result.response.version,
+ headers: result.response.headers,
+ cookies: result.response.cookies,
+ body: body.body(result.response.body.body, result.response.body.mediaType),
+ meta: {
+ timing: {
+ start: result.response.meta.timing.start,
+ end: result.response.meta.timing.end,
+ },
+ size: result.response.meta.size,
+ }
+ }
+ return E.right(response)
+ }
+ return E.left(result.error)
+ })
+ .catch((error: unknown): E.Either<RelayError, RelayResponse> => {
+ const networkError: RelayError = {
+ kind: 'network',
+ message: error instanceof Error ? error.message : 'Unknown error occurred',
+ cause: error
+ }
+ return E.left(networkError)
+ })
+
+ return {
+ cancel: async () => { await cancel(request.id) },
+ emitter,
+ response: responsePromise
+ }
+ }
+ }
+}
diff --git a/packages/hoppscotch-kernel/src/relay/impl/web/index.ts b/packages/hoppscotch-kernel/src/relay/impl/web/index.ts
new file mode 100644
index 000000000..d7b005b65
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/relay/impl/web/index.ts
@@ -0,0 +1,5 @@
+import { implementation as relayV1 } from './v/1'
+
+export const RELAY_IMPLS = {
+ v1: relayV1,
+} as const
diff --git a/packages/hoppscotch-kernel/src/relay/impl/web/v/1.ts b/packages/hoppscotch-kernel/src/relay/impl/web/v/1.ts
new file mode 100644
index 000000000..478d8b8d4
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/relay/impl/web/v/1.ts
@@ -0,0 +1,270 @@
+import {
+ type FormData,
+ type FormDataValue,
+ type RelayError,
+ type RelayEventEmitter,
+ type RelayRequest,
+ type RelayRequestEvents,
+ type RelayResponse,
+ type RelayV1,
+ type StatusCode,
+ body,
+} from '@relay/v/1'
+import type { VersionedAPI } from '@type/versioning'
+
+import { AwsV4Signer } from 'aws4fetch'
+import axios, { AxiosRequestConfig } from 'axios'
+
+import * as E from 'fp-ts/Either'
+import * as R from 'fp-ts/Record'
+import { pipe } from 'fp-ts/function'
+
+const isStatusCode = (status: number): status is StatusCode =>
+ status >= 100 && status < 600
+
+const normalizeHeaders = (headers: Record<string, any>): Record<string, string> =>
+ pipe(
+ headers,
+ R.filterWithIndex((_, v) => v !== undefined),
+ R.map(String)
+ )
+
+export const implementation: VersionedAPI<RelayV1> = {
+ version: { major: 1, minor: 0, patch: 0 },
+ api: {
+ id: 'axios',
+ capabilities: {
+ method: new Set([
+ 'GET',
+ 'POST',
+ 'PUT',
+ 'DELETE',
+ 'PATCH',
+ 'HEAD',
+ 'OPTIONS'
+ ]),
+ header: new Set([
+ 'stringvalue',
+ 'arrayvalue',
+ 'multivalue'
+ ]),
+ content: new Set([
+ 'text',
+ 'json',
+ 'xml',
+ 'form',
+ 'urlencoded',
+ 'compression'
+ ]),
+ auth: new Set([
+ 'basic',
+ 'bearer',
+ 'apikey',
+ 'aws'
+ ]),
+ security: new Set([]),
+ proxy: new Set([]),
+ advanced: new Set([])
+ },
+
+ canHandle(request: RelayRequest) {
+ if (!this.capabilities.method.has(request.method)) {
+ return E.left({
+ kind: "unsupported_feature",
+ feature: "method",
+ message: `Method ${request.method} is not supported`,
+ relay: "axios"
+ })
+ }
+
+ if (request.content && !this.capabilities.content.has(request.content.kind)) {
+ return E.left({
+ kind: "unsupported_feature",
+ feature: "content",
+ message: `Content type ${request.content.kind} is not supported`,
+ relay: "axios"
+ })
+ }
+
+ if (request.auth && !this.capabilities.auth.has(request.auth.kind)) {
+ return E.left({
+ kind: "unsupported_feature",
+ feature: "authentication",
+ message: `Authentication type ${request.auth.kind} is not supported`,
+ relay: "axios"
+ })
+ }
+
+ if (request.security?.certificates) {
+ return E.left({
+ kind: "unsupported_feature",
+ feature: "security",
+ message: "Client certificates are not supported",
+ relay: "axios"
+ })
+ }
+
+ if (request.proxy) {
+ return E.left({
+ kind: "unsupported_feature",
+ feature: "proxy",
+ message: "Proxy is not supported",
+ relay: "axios"
+ })
+ }
+
+ return E.right(true)
+ },
+
+ execute(request: RelayRequest) {
+ const cancelTokenSource = axios.CancelToken.source()
+ const emitter: RelayEventEmitter<RelayRequestEvents> = {
+ on: () => () => {},
+ once: () => () => {},
+ off: () => {}
+ }
+
+ const response: Promise<E.Either<RelayError, RelayResponse>> = (async () => {
+ try {
+ const startTime = Date.now()
+ const config: AxiosRequestConfig = {
+ url: request.url,
+ method: request.method,
+ headers: request.headers,
+ params: request.params,
+ data: request.content?.content,
+ maxRedirects: request.meta?.options?.maxRedirects,
+ timeout: request.meta?.options?.timeout,
+ decompress: request.meta?.options?.decompress ?? true,
+ validateStatus: null,
+ cancelToken: cancelTokenSource.token,
+ responseType: 'arraybuffer'
+ }
+
+ if (request.auth) {
+ switch (request.auth.kind) {
+ case 'basic':
+ config.auth = {
+ username: request.auth.username,
+ password: request.auth.password
+ }
+ break
+ case 'bearer':
+ config.headers = {
+ ...config.headers,
+ Authorization: `Bearer ${request.auth.token}`
+ }
+ break
+ case 'apikey':
+ if (request.auth.in === 'header') {
+ config.headers = {
+ ...config.headers,
+ [request.auth.key]: request.auth.value
+ }
+ } else {
+ config.params = {
+ ...config.params,
+ [request.auth.key]: request.auth.value
+ }
+ }
+ break
+ case 'aws': {
+ const { accessKey, secretKey, region, service, sessionToken, in: location } = request.auth
+ const signer = new AwsV4Signer({
+ url: request.url,
+ method: request.method,
+ accessKeyId: accessKey,
+ secretAccessKey: secretKey,
+ region,
+ service,
+ sessionToken,
+ datetime: new Date().toISOString().replace(/[:-]|\.\d{3}/g, ""),
+ signQuery: false
+ })
+ const signed = await signer.sign()
+ if (location === "query") {
+ config.url = signed.url.toString()
+ } else {
+ const headers: Record<string, string> = {}
+ signed.headers.forEach((value, key) => {
+ headers[key] = value
+ })
+ config.headers = {
+ ...config.headers,
+ ...headers
+ }
+ }
+ break
+ }
+ }
+ }
+
+ const axiosResponse = await axios(config)
+ const endTime = Date.now()
+
+ if (!isStatusCode(axiosResponse.status)) {
+ return E.left({
+ kind: 'version',
+ message: `Invalid status code: ${axiosResponse.status}`
+ })
+ }
+
+ const normalizedHeaders = normalizeHeaders(axiosResponse.headers)
+ const contentType = normalizedHeaders['content-type'] || normalizedHeaders['Content-Type'] || normalizedHeaders['CONTENT-TYPE']
+
+ const response: RelayResponse = {
+ id: request.id,
+ status: axiosResponse.status,
+ statusText: axiosResponse.statusText,
+ version: request.version,
+ headers: normalizedHeaders,
+ body: body.body(axiosResponse.data, contentType),
+ meta: {
+ timing: {
+ start: startTime,
+ end: endTime,
+ },
+ size: {
+ headers: JSON.stringify(axiosResponse.headers).length,
+ body: axiosResponse.data?.length ?? 0,
+ total: JSON.stringify(axiosResponse.headers).length + (axiosResponse.data?.length ?? 0)
+ }
+ }
+ }
+
+ return E.right(response)
+ } catch (error) {
+ if (axios.isCancel(error)) {
+ return E.left({ kind: 'abort', message: 'Request cancelled' })
+ }
+
+ if (axios.isAxiosError(error)) {
+ if (error.code === 'ECONNABORTED') {
+ return E.left({
+ kind: 'timeout',
+ message: 'Request timed out',
+ phase: 'response'
+ })
+ }
+ return E.left({
+ kind: 'network',
+ message: error.message
+ })
+ }
+
+ return E.left({
+ kind: 'network',
+ message: error instanceof Error ? error.message : 'Unknown error occurred',
+ cause: error
+ })
+ }
+ })()
+
+ return {
+ cancel: async () => { cancelTokenSource.cancel() },
+ emitter,
+ response
+ }
+ }
+ }
+}
diff --git a/packages/hoppscotch-kernel/src/relay/index.ts b/packages/hoppscotch-kernel/src/relay/index.ts
new file mode 100644
index 000000000..fa51500f4
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/relay/index.ts
@@ -0,0 +1,11 @@
+import { v1 } from './v/1'
+
+export type {
+ RelayV1,
+} from './v/1'
+
+export const VERSIONS = {
+ v1,
+} as const
+
+export const latest = v1
diff --git a/packages/hoppscotch-kernel/src/relay/v/1.ts b/packages/hoppscotch-kernel/src/relay/v/1.ts
new file mode 100644
index 000000000..a96655991
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/relay/v/1.ts
@@ -0,0 +1,594 @@
+import type { VersionedAPI } from '@type/versioning'
+
+import * as E from 'fp-ts/Either'
+
+export type Method =
+ | "GET" // Retrieve resource
+ | "POST" // Create resource
+ | "PUT" // Replace resource
+ | "DELETE" // Remove resource
+ | "PATCH" // Modify resource
+ | "HEAD" // GET without body
+ | "OPTIONS" // Get allowed methods
+ | "CONNECT" // Create tunnel
+ | "TRACE" // Loop-back test
+
+export type Version = "HTTP/1.0" | "HTTP/1.1" | "HTTP/2.0" | "HTTP/3.0"
+
+export type StatusCode =
+ | 100 // Continue
+ | 101 // Switching Protocols
+ | 102 // Processing
+ | 103 // Early Hints
+ | 200 // OK
+ | 201 // Created
+ | 202 // Accepted
+ | 203 // Non-Authoritative Info
+ | 204 // No Content
+ | 205 // Reset Content
+ | 206 // Partial Content
+ | 207 // Multi-Status
+ | 208 // Already Reported
+ | 226 // IM Used
+ | 300 // Multiple Choices
+ | 301 // Moved Permanently
+ | 302 // Found
+ | 303 // See Other
+ | 304 // Not Modified
+ | 305 // Use Proxy
+ | 306 // Switch Proxy
+ | 307 // Temporary Redirect
+ | 308 // Permanent Redirect
+ | 400 // Bad Request
+ | 401 // Unauthorized
+ | 402 // Payment Required
+ | 403 // Forbidden
+ | 404 // Not Found
+ | 405 // Method Not Allowed
+ | 406 // Not Acceptable
+ | 407 // Proxy Auth Required
+ | 408 // Request Timeout
+ | 409 // Conflict
+ | 410 // Gone
+ | 411 // Length Required
+ | 412 // Precondition Failed
+ | 413 // Payload Too Large
+ | 414 // URI Too Long
+ | 415 // Unsupported Media
+ | 416 // Range Not Satisfiable
+ | 417 // Expectation Failed
+ | 418 // I'm a teapot
+ | 421 // Misdirected Request
+ | 422 // Unprocessable Entity
+ | 423 // Locked
+ | 424 // Failed Dependency
+ | 425 // Too Early
+ | 426 // Upgrade Required
+ | 428 // Precondition Required
+ | 429 // Too Many Requests
+ | 431 // Headers Too Large
+ | 451 // Unavailable Legal
+ | 500 // Server Error
+ | 501 // Not Implemented
+ | 502 // Bad Gateway
+ | 503 // Service Unavailable
+ | 504 // Gateway Timeout
+ | 505 // HTTP Ver. Not Supported
+ | 506 // Variant Negotiates
+ | 507 // Insufficient Storage
+ | 508 // Loop Detected
+ | 510 // Not Extended
+ | 511 // Network Auth Required
+
+export type FormDataValue =
+ | { kind: "text"; value: string }
+ | { kind: "file"; filename: string; contentType: string; data: Uint8Array }
+
+export type FormData = Map<string, FormDataValue[]>
+
+export enum MediaType {
+ TEXT_PLAIN = "text/plain",
+ TEXT_HTML = "text/html",
+ TEXT_CSS = "text/css",
+ TEXT_CSV = "text/csv",
+ APPLICATION_JSON = "application/json",
+ APPLICATION_LD_JSON = "application/ld+json",
+ APPLICATION_XML = "application/xml",
+ TEXT_XML = "text/xml",
+ APPLICATION_FORM = "application/x-www-form-urlencoded",
+ APPLICATION_OCTET = "application/octet-stream",
+ MULTIPART_FORM = "multipart/form-data"
+}
+
+export type ContentType =
+ | { kind: "text"; content: string; mediaType: MediaType.TEXT_PLAIN | MediaType.TEXT_HTML | MediaType.TEXT_CSS | MediaType.TEXT_CSV }
+ | { kind: "json"; content: unknown; mediaType: MediaType.APPLICATION_JSON | MediaType.APPLICATION_LD_JSON }
+ | { kind: "xml"; content: string; mediaType: MediaType.APPLICATION_XML | MediaType.TEXT_XML }
+ | { kind: "form"; content: FormData; mediaType: MediaType.APPLICATION_FORM }
+ | { kind: "binary"; content: Uint8Array; mediaType: MediaType.APPLICATION_OCTET | string; filename?: string }
+ | { kind: "multipart"; content: FormData; mediaType: MediaType.MULTIPART_FORM }
+ | { kind: "urlencoded"; content: string; mediaType: MediaType.APPLICATION_FORM }
+ | { kind: "stream"; content: ReadableStream; mediaType: string }
+
+export interface RelayResponseBody {
+ body: Uint8Array
+ mediaType: MediaType | string
+}
+
+export type AuthType =
+ | { kind: "none" }
+ | { kind: "basic"; username: string; password: string }
+ | { kind: "bearer"; token: string }
+ | {
+ kind: "digest"
+ username: string
+ password: string
+ realm?: string
+ nonce?: string
+ opaque?: string
+ algorithm?: "MD5" | "SHA-256" | "SHA-512"
+ qop?: "auth" | "auth-int"
+ nc?: string
+ cnonce?: string
+ }
+ | {
+ kind: "oauth2"
+ grantType:
+ | {
+ kind: "authorization_code"
+ authEndpoint: string
+ tokenEndpoint: string
+ clientId: string
+ clientSecret?: string
+ }
+ | {
+ kind: "client_credentials"
+ tokenEndpoint: string
+ clientId: string
+ clientSecret?: string
+ }
+ | {
+ kind: "password"
+ tokenEndpoint: string
+ username: string
+ password: string
+ }
+ | {
+ kind: "implicit"
+ authEndpoint: string
+ clientId: string
+ }
+ accessToken?: string
+ refreshToken?: string
+ }
+ | {
+ kind: "apikey"
+ key: string
+ value: string
+ in: "header" | "query"
+ }
+ | {
+ kind: "aws"
+ accessKey: string
+ secretKey: string
+ region: string
+ service: string
+ sessionToken?: string
+ in: "header" | "query"
+ }
+
+export type CertificateType =
+ | {
+ kind: "pem"
+ cert: Uint8Array
+ key: Uint8Array
+ }
+ | {
+ kind: "pfx"
+ data: Uint8Array
+ password: string
+ }
+
+export interface RelayRequestEvents {
+ progress: {
+ phase: 'upload' | 'download'
+ loaded: number
+ total?: number
+ }
+ stateChange: {
+ state: 'preparing' | 'connecting' | 'sending' | 'waiting' | 'receiving' | 'done'
+ }
+ authChallenge: {
+ type: 'basic' | 'digest' | 'oauth2'
+ params: Record<string, string>
+ }
+ cookieReceived: {
+ domain: string
+ name: string
+ value: string
+ path?: string
+ expires?: Date
+ secure?: boolean
+ httpOnly?: boolean
+ sameSite?: 'Strict' | 'Lax' | 'None'
+ }
+ error: {
+ phase: 'preparation' | 'connection' | 'request' | 'response'
+ error: RelayError
+ }
+}
+
+export type RelayEventEmitter<T> = {
+ on<K extends keyof T>(event: K, handler: (payload: T[K]) => void): () => void
+ once<K extends keyof T>(event: K, handler: (payload: T[K]) => void): () => void
+ off<K extends keyof T>(event: K, handler: (payload: T[K]) => void): void
+}
+
+// NOTE: RelayCapabilities and their corresponding objects being two separate types
+// even with sometimes identical contents is intentional.
+export type MethodCapability =
+ | 'GET'
+ | 'POST'
+ | 'PUT'
+ | 'DELETE'
+ | 'PATCH'
+ | 'HEAD'
+ | 'OPTIONS'
+ | 'CONNECT'
+ | 'TRACE'
+
+export type HeaderCapability =
+ | 'stringvalue'
+ | 'arrayvalue'
+ | 'multivalue'
+
+export type ContentCapability =
+ | 'text'
+ | 'json'
+ | 'xml'
+ | 'form'
+ | 'binary'
+ | 'multipart'
+ | 'urlencoded'
+ | 'stream'
+ | 'compression'
+
+export type AuthCapability =
+ | 'none'
+ | 'basic'
+ | 'bearer'
+ | 'digest'
+ | 'oauth2'
+ | 'apikey'
+ | 'aws'
+ | 'mtls'
+
+export type SecurityCapability =
+ | 'clientcertificates'
+ | 'cacertificates'
+ | 'certificatevalidation'
+ | 'hostverification'
+ | 'peerverification'
+
+export type ProxyCapability =
+ | 'http'
+ | 'https'
+ | 'socks'
+ | 'authentication'
+ | 'certificates'
+
+export type AdvancedCapability =
+ | 'retry'
+ | 'redirects'
+ | 'timeout'
+ | 'cookies'
+ | 'keepalive'
+ | 'tcpoptions'
+ | 'ipv6'
+ | 'http2'
+ | 'http3'
+ | 'localaccess'
+
+export interface RelayCapabilities {
+ method: Set<MethodCapability>
+ header: Set<HeaderCapability>
+ content: Set<ContentCapability>
+ auth: Set<AuthCapability>
+ security: Set<SecurityCapability>
+ proxy: Set<ProxyCapability>
+ advanced: Set<AdvancedCapability>
+}
+
+export type UnsupportedFeatureError = {
+ kind: "unsupported_feature"
+ feature: string
+ message: string
+ relay: string
+ alternatives?: Array<{
+ relay: string
+ description: string
+ }>
+}
+
+export type RelayError =
+ | UnsupportedFeatureError
+ | { kind: "network"; message: string; cause?: unknown }
+ | { kind: "timeout"; message: string; phase?: "connect" | "tls" | "response" }
+ | { kind: "certificate"; message: string; cause?: unknown }
+ | { kind: "auth"; message: string; cause?: unknown }
+ | { kind: "proxy"; message: string; cause?: unknown }
+ | { kind: "parse"; message: string; cause?: unknown }
+ | { kind: "version"; message: string; cause?: unknown }
+ | { kind: "abort"; message: string }
+
+export interface RelayRequest {
+ id: number
+ url: string
+ method: Method
+ version: Version
+ headers?: Record<string, string>
+ params?: Record<string, string>
+ content?: ContentType
+ auth?: AuthType
+
+ security?: {
+ certificates?: {
+ client?: CertificateType
+ ca?: Array<Uint8Array>
+ }
+ verifyHost?: boolean
+ verifyPeer?: boolean
+ }
+
+ proxy?: {
+ url: string
+ auth?: {
+ username: string
+ password: string
+ }
+ certificates?: {
+ ca?: Uint8Array[]
+ client?: CertificateType
+ }
+ }
+
+ meta?: {
+ timing?: {
+ connect?: number
+ request?: number
+ tls?: number
+ }
+ retry?: {
+ count: number
+ delay: number
+ }
+ options?: {
+ timeout?: number
+ followRedirects?: boolean
+ maxRedirects?: number
+ decompress?: boolean
+ cookies?: boolean
+ keepAlive?: boolean
+ tcpNoDelay?: boolean
+ ipVersion?: "v4" | "v6" | "any"
+ }
+ http2?: {
+ settings: Record<string, number>
+ pushPromise: boolean
+ }
+ http3?: {
+ quicConfig: Record<string, unknown>
+ }
+ }
+}
+
+export interface RelayResponse {
+ id: number
+ status: StatusCode
+ statusText: string
+ version: Version
+ headers: Record<string, string>
+ cookies?: Array<{
+ name: string
+ value: string
+ domain?: string
+ path?: string
+ expires?: Date
+ secure?: boolean
+ httpOnly?: boolean
+ sameSite?: 'Strict' | 'Lax' | 'None'
+ }>
+ body: RelayResponseBody
+
+ meta: {
+ timing: {
+ start: number
+ end: number
+ phases?: {
+ dns?: number
+ connect?: number
+ tls?: number
+ send?: number
+ wait?: number
+ receive?: number
+ }
+ }
+ size: {
+ headers: number
+ body: number
+ total: number
+ }
+ tls?: {
+ version: string
+ cipher: string
+ certificates?: Array<{
+ subject: string
+ issuer: string
+ validFrom: string
+ validTo: string
+ }>
+ }
+ http2?: {
+ settings: Record<string, number>
+ pushPromise: boolean
+ }
+ http3?: {
+ quicConfig: Record<string, unknown>
+ }
+ redirects?: Array<{
+ url: string
+ status: StatusCode
+ version: Version
+ headers: Record<string, string>
+ }>
+ }
+}
+
+export interface RelayV1 {
+ readonly id: string
+ readonly capabilities: RelayCapabilities
+
+ canHandle(request: RelayRequest): E.Either<UnsupportedFeatureError, true>
+
+ execute(
+ request: RelayRequest
+ ): {
+ cancel: () => Promise<void>
+ emitter: RelayEventEmitter<RelayRequestEvents>
+ response: Promise<E.Either<RelayError, RelayResponse>>
+ }
+}
+
+export const hasCapability = <T>(capabilities: Set<T>, capability: T): boolean =>
+ capabilities.has(capability)
+
+export function findSuitableRelay(
+ request: RelayRequest,
+ relays: RelayV1[]
+): E.Either<UnsupportedFeatureError, RelayV1> {
+ for (const relay of relays) {
+ const result = relay.canHandle(request)
+ if (E.isRight(result)) {
+ return E.right(relay)
+ }
+ }
+
+ const errors = relays
+ .map(i => i.canHandle(request))
+ .filter(E.isLeft)
+ .map(e => e.left)
+
+ return E.left(errors[0])
+}
+
+export const body = {
+ body: (
+ body: ArrayBuffer | Uint8Array,
+ contentType?: MediaType | string
+ ): RelayResponseBody => ({
+ body: new Uint8Array(body),
+ mediaType: typeof contentType === 'string'
+ ? Object.values(MediaType).find(t => contentType.includes(t)) ?? MediaType.APPLICATION_OCTET
+ : contentType ?? MediaType.APPLICATION_OCTET
+ }),
+}
+
+export const content = {
+ text: (
+ content: string,
+ mediaType?: MediaType.TEXT_PLAIN | MediaType.TEXT_HTML | MediaType.TEXT_CSS | MediaType.TEXT_CSV
+ ): ContentType => ({
+ kind: "text",
+ content,
+ mediaType: mediaType ?? MediaType.TEXT_PLAIN
+ }),
+
+ json: <T>(
+ content: T,
+ mediaType?: MediaType.APPLICATION_JSON | MediaType.APPLICATION_LD_JSON | MediaType.APPLICATION_JSON
+ ): ContentType => ({
+ kind: "json",
+ content,
+ mediaType: mediaType ?? MediaType.APPLICATION_JSON
+ }),
+
+ xml: (
+ content: string,
+ mediaType?: MediaType.APPLICATION_XML | MediaType.TEXT_XML
+ ): ContentType => ({
+ kind: "xml",
+ content,
+ mediaType: mediaType ?? MediaType.APPLICATION_XML
+ }),
+
+ form: (content: FormData): ContentType => ({
+ kind: "form",
+ content,
+ mediaType: MediaType.APPLICATION_FORM
+ }),
+
+ binary: (
+ content: Uint8Array,
+ mediaType: string = MediaType.APPLICATION_OCTET,
+ filename?: string
+ ): ContentType => ({
+ kind: "binary",
+ content,
+ mediaType,
+ filename
+ }),
+
+ multipart: (content: FormData): ContentType => ({
+ kind: "multipart",
+ content,
+ mediaType: MediaType.MULTIPART_FORM
+ }),
+
+ urlencoded: (content: string): ContentType => ({
+ kind: "urlencoded",
+ content,
+ mediaType: MediaType.APPLICATION_FORM
+ }),
+
+ stream: (content: ReadableStream, mediaType: string): ContentType => ({
+ kind: "stream",
+ content,
+ mediaType
+ })
+}
+
+export const v1: VersionedAPI<RelayV1> = {
+ version: { major: 1, minor: 0, patch: 0 },
+ api: {
+ id: "default",
+ capabilities: {
+ method: new Set<MethodCapability>(),
+ header: new Set<HeaderCapability>(),
+ content: new Set<ContentCapability>(),
+ auth: new Set<AuthCapability>(),
+ security: new Set<SecurityCapability>(),
+ proxy: new Set<ProxyCapability>(),
+ advanced: new Set<AdvancedCapability>()
+ },
+ canHandle: () => E.left({
+ kind: "unsupported_feature",
+ feature: "execution",
+ message: "Default relay cannot handle requests",
+ relay: "default"
+ }),
+ execute: () => ({
+ cancel: async () => {},
+ emitter: {
+ on: () => () => {},
+ once: () => () => {},
+ off: () => {}
+ },
+ response: Promise.resolve(
+ E.left({
+ kind: "version",
+ message: "Not implemented"
+ })
+ )
+ })
+ }
+}
diff --git a/packages/hoppscotch-kernel/src/store/impl/desktop/index.ts b/packages/hoppscotch-kernel/src/store/impl/desktop/index.ts
new file mode 100644
index 000000000..a4922a1ce
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/store/impl/desktop/index.ts
@@ -0,0 +1,5 @@
+import { implementation as storeV1 } from './v/1'
+
+export const STORE_IMPLS = {
+ v1: storeV1,
+} as const
diff --git a/packages/hoppscotch-kernel/src/store/impl/desktop/v/1.ts b/packages/hoppscotch-kernel/src/store/impl/desktop/v/1.ts
new file mode 100644
index 000000000..2340abed0
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/store/impl/desktop/v/1.ts
@@ -0,0 +1,314 @@
+import * as E from 'fp-ts/Either';
+
+import { Store } from '@tauri-apps/plugin-store';
+
+import { VersionedAPI } from '@type/versioning';
+import {
+ StoreV1,
+ StoreError,
+ StoreEvents,
+ StorageOptions,
+ StoredData,
+ StoredDataSchema,
+ StoreEventEmitter,
+} from '@store/v/1';
+
+const STORE_PATH = `${window.location.host}.hoppscotch.store`
+
+type NamespacedData = Record<string, Record<string, StoredData>>;
+
+class TauriStoreManager {
+ private static instance: TauriStoreManager;
+ private store: Store | null = null;
+ private listeners = new Map<string, Set<(payload: StoreEvents['change']) => void>>();
+ private data: NamespacedData = {};
+
+ private constructor() {}
+
+ static new(): TauriStoreManager {
+ if (!TauriStoreManager.instance) {
+ TauriStoreManager.instance = new TauriStoreManager();
+ }
+ return TauriStoreManager.instance;
+ }
+
+ async init(): Promise<void> {
+ if (!this.store) {
+ this.store = await Store.load(STORE_PATH);
+ const loadedData = await this.store.get<NamespacedData>('data');
+ this.data = loadedData ?? {};
+
+ this.store.onChange((_, value: NamespacedData | undefined) => {
+ if (value) {
+ this.data = value;
+ this.notifyListeners();
+ }
+ });
+ }
+ }
+
+ private notifyListeners(): void {
+ for (const [key, listeners] of this.listeners.entries()) {
+ const [namespace, dataKey] = key.split(':');
+ const value = this.data[namespace]?.[dataKey];
+ listeners.forEach(listener =>
+ listener({
+ namespace,
+ key: dataKey,
+ value: value?.data,
+ })
+ );
+ }
+ }
+
+ async set(namespace: string, key: string, value: StoredData): Promise<void> {
+ if (!this.store) throw new Error('Store not initialized');
+
+ const validated = StoredDataSchema.parse(value);
+ this.data[namespace] = this.data[namespace] || {};
+ this.data[namespace][key] = validated;
+ await this.store.set('data', this.data);
+ await this.store.save();
+ }
+
+ async getRaw(namespace: string, key: string): Promise<StoredData | undefined> {
+ const rawValue = this.data[namespace]?.[key];
+ if (!rawValue) return undefined;
+
+ const validated = StoredDataSchema.parse(rawValue);
+ return validated;
+ }
+
+ async get<T>(namespace: string, key: string): Promise<T | undefined> {
+ const storedData = await this.getRaw(namespace, key);
+ return storedData?.data as T | undefined;
+ }
+
+ async has(namespace: string, key: string): Promise<boolean> {
+ return !!this.data[namespace]?.[key];
+ }
+
+ async delete(namespace: string, key: string): Promise<boolean> {
+ if (!this.store) throw new Error('Store not initialized');
+
+ if (this.data[namespace]?.[key]) {
+ delete this.data[namespace][key];
+ if (Object.keys(this.data[namespace]).length === 0) {
+ delete this.data[namespace];
+ }
+ await this.store.set('data', this.data);
+ await this.store.save();
+ return true;
+ }
+ return false;
+ }
+
+ async clear(namespace?: string): Promise<void> {
+ if (!this.store) throw new Error('Store not initialized');
+
+ if (namespace) {
+ delete this.data[namespace];
+ } else {
+ this.data = {};
+ }
+ await this.store.set('data', this.data);
+ await this.store.save();
+ }
+
+ async listNamespaces(): Promise<string[]> {
+ return Object.keys(this.data);
+ }
+
+ async listKeys(namespace: string): Promise<string[]> {
+ return Object.keys(this.data[namespace] || {});
+ }
+
+ watch(namespace: string, key: string): StoreEventEmitter<StoreEvents> {
+ const watchKey = `${namespace}:${key}`;
+ return {
+ on: <K extends keyof StoreEvents>(
+ event: K,
+ handler: (payload: StoreEvents[K]) => void
+ ) => {
+ if (event !== 'change') return () => {};
+
+ if (!this.listeners.has(watchKey)) {
+ this.listeners.set(watchKey, new Set());
+ }
+ this.listeners.get(watchKey)!.add(handler as (payload: StoreEvents['change']) => void);
+ return () => this.listeners.get(watchKey)?.delete(handler as (payload: StoreEvents['change']) => void);
+ },
+ once: <K extends keyof StoreEvents>(
+ event: K,
+ handler: (payload: StoreEvents[K]) => void
+ ) => {
+ if (event !== 'change') return () => {};
+
+ const wrapper = (value: StoreEvents['change']) => {
+ handler(value as StoreEvents[K]);
+ this.listeners.get(watchKey)?.delete(wrapper);
+ };
+
+ if (!this.listeners.has(watchKey)) {
+ this.listeners.set(watchKey, new Set());
+ }
+ this.listeners.get(watchKey)!.add(wrapper);
+ return () => this.listeners.get(watchKey)?.delete(wrapper);
+ },
+ off: <K extends keyof StoreEvents>(
+ event: K,
+ handler: (payload: StoreEvents[K]) => void
+ ) => {
+ if (event === 'change') {
+ this.listeners.get(watchKey)?.delete(handler as (payload: StoreEvents['change']) => void);
+ }
+ },
+ };
+ }
+
+ async close(): Promise<void> {
+ if (this.store) {
+ await this.store.close();
+ this.store = null;
+ this.data = {};
+ this.listeners.clear();
+ }
+ }
+}
+
+export const implementation: VersionedAPI<StoreV1> = {
+ version: { major: 1, minor: 0, patch: 0 },
+ api: {
+ id: 'tauri-store',
+ capabilities: new Set(['permanent', 'structured', 'watch', 'namespace', 'secure']),
+
+ async init() {
+ try {
+ const manager = TauriStoreManager.new();
+ await manager.init();
+ return E.right(undefined);
+ } catch (error) {
+ return E.left({
+ kind: 'storage',
+ message: error instanceof Error ? error.message : 'Unknown error',
+ cause: error,
+ });
+ }
+ },
+
+ async set(namespace: string, key: string, value: unknown, options?: StorageOptions): Promise<E.Either<StoreError, void>> {
+ try {
+ const manager = TauriStoreManager.new();
+ const existingData = await manager.getRaw(namespace, key);
+ const createdAt = existingData?.metadata.createdAt || new Date().toISOString()
+ const updatedAt = new Date().toISOString()
+
+ const storedData: StoredData = {
+ schemaVersion: 1,
+ metadata: {
+ createdAt,
+ updatedAt,
+ namespace,
+ encrypted: options?.encrypt,
+ compressed: options?.compress,
+ ttl: options?.ttl,
+ },
+ data: value,
+ };
+
+ await manager.set(namespace, key, storedData);
+ return E.right(undefined);
+ } catch (error) {
+ return E.left({
+ kind: 'storage',
+ message: error instanceof Error ? error.message : 'Unknown error',
+ cause: error,
+ });
+ }
+ },
+
+ async get<T>(namespace: string, key: string): Promise<E.Either<StoreError, T | undefined>> {
+ try {
+ const manager = TauriStoreManager.new();
+ return E.right(await manager.get<T>(namespace, key));
+ } catch (error) {
+ return E.left({
+ kind: 'storage',
+ message: error instanceof Error ? error.message : 'Unknown error',
+ cause: error,
+ });
+ }
+ },
+
+ async has(namespace: string, key: string): Promise<E.Either<StoreError, boolean>> {
+ try {
+ const manager = TauriStoreManager.new();
+ return E.right(await manager.has(namespace, key));
+ } catch (error) {
+ return E.left({
+ kind: 'storage',
+ message: error instanceof Error ? error.message : 'Unknown error',
+ cause: error,
+ });
+ }
+ },
+
+ async remove(namespace: string, key: string): Promise<E.Either<StoreError, boolean>> {
+ try {
+ const manager = TauriStoreManager.new();
+ return E.right(await manager.delete(namespace, key));
+ } catch (error) {
+ return E.left({
+ kind: 'storage',
+ message: error instanceof Error ? error.message : 'Unknown error',
+ cause: error,
+ });
+ }
+ },
+
+ async clear(namespace?: string): Promise<E.Either<StoreError, void>> {
+ try {
+ const manager = TauriStoreManager.new();
+ await manager.clear(namespace);
+ return E.right(undefined);
+ } catch (error) {
+ return E.left({
+ kind: 'storage',
+ message: error instanceof Error ? error.message : 'Unknown error',
+ cause: error,
+ });
+ }
+ },
+
+ async listNamespaces(): Promise<E.Either<StoreError, string[]>> {
+ try {
+ const manager = TauriStoreManager.new();
+ return E.right(await manager.listNamespaces());
+ } catch (error) {
+ return E.left({
+ kind: 'storage',
+ message: error instanceof Error ? error.message : 'Unknown error',
+ cause: error,
+ });
+ }
+ },
+
+ async listKeys(namespace: string): Promise<E.Either<StoreError, string[]>> {
+ try {
+ const manager = TauriStoreManager.new();
+ return E.right(await manager.listKeys(namespace));
+ } catch (error) {
+ return E.left({
+ kind: 'storage',
+ message: error instanceof Error ? error.message : 'Unknown error',
+ cause: error,
+ });
+ }
+ },
+
+ watch(namespace: string, key: string): StoreEventEmitter<StoreEvents> {
+ const manager = TauriStoreManager.new();
+ return manager.watch(namespace, key);
+ },
+ },
+};
diff --git a/packages/hoppscotch-kernel/src/store/impl/web/index.ts b/packages/hoppscotch-kernel/src/store/impl/web/index.ts
new file mode 100644
index 000000000..a4922a1ce
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/store/impl/web/index.ts
@@ -0,0 +1,5 @@
+import { implementation as storeV1 } from './v/1'
+
+export const STORE_IMPLS = {
+ v1: storeV1,
+} as const
diff --git a/packages/hoppscotch-kernel/src/store/impl/web/v/1.ts b/packages/hoppscotch-kernel/src/store/impl/web/v/1.ts
new file mode 100644
index 000000000..0c0b892b7
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/store/impl/web/v/1.ts
@@ -0,0 +1,259 @@
+import * as E from 'fp-ts/Either';
+import superjson from 'superjson';
+
+import type { VersionedAPI } from '@type/versioning';
+import {
+ StoreV1,
+ StoredData,
+ StoredDataSchema,
+ StoreEvents,
+ StoreEventEmitter,
+} from '@store/v/1';
+
+class BrowserStoreManager {
+ private static instance: BrowserStoreManager;
+ private listeners = new Map<string, Set<(payload: StoreEvents['change']) => void>>();
+
+ private constructor() {}
+
+ static new(): BrowserStoreManager {
+ if (!BrowserStoreManager.instance) {
+ BrowserStoreManager.instance = new BrowserStoreManager();
+ }
+ return BrowserStoreManager.instance;
+ }
+
+ private getFullKey(namespace: string, key: string): string {
+ return `${namespace}:${key}`;
+ }
+
+ private notifyListeners(namespace: string, key: string, value?: unknown) {
+ const fullKey = this.getFullKey(namespace, key);
+ const listeners = this.listeners.get(fullKey) || new Set();
+ listeners.forEach(listener => listener({ namespace, key, value }));
+ }
+
+ async set(namespace: string, key: string, value: StoredData): Promise<void> {
+ const validated = StoredDataSchema.parse(value);
+ localStorage.setItem(this.getFullKey(namespace, key), superjson.stringify(validated));
+ this.notifyListeners(namespace, key, validated.data);
+ }
+
+ async getRaw(namespace: string, key: string): Promise<StoredData | undefined> {
+ const rawValue = localStorage.getItem(this.getFullKey(namespace, key));
+ if (!rawValue) return undefined;
+
+ const parsed = superjson.parse(rawValue);
+ const validated = StoredDataSchema.parse(parsed);
+ return validated;
+ }
+
+ async get<T>(namespace: string, key: string): Promise<T | undefined> {
+ const storedData = await this.getRaw(namespace, key);
+ return storedData?.data as T;
+ }
+
+ async has(namespace: string, key: string): Promise<boolean> {
+ return localStorage.getItem(this.getFullKey(namespace, key)) !== null;
+ }
+
+ async delete(namespace: string, key: string): Promise<boolean> {
+ const exists = await this.has(namespace, key);
+ if (exists) {
+ localStorage.removeItem(this.getFullKey(namespace, key));
+ this.notifyListeners(namespace, key, undefined);
+ }
+ return exists;
+ }
+
+ async clear(namespace?: string): Promise<void> {
+ if (namespace) {
+ const keysToRemove = Object.keys(localStorage).filter(key => key.startsWith(`${namespace}:`));
+ keysToRemove.forEach(key => localStorage.removeItem(key));
+ } else {
+ localStorage.clear();
+ }
+ this.listeners.clear();
+ }
+
+ async listNamespaces(): Promise<string[]> {
+ const namespaces = new Set<string>();
+ Object.keys(localStorage).forEach(key => {
+ const [namespace] = key.split(':');
+ namespaces.add(namespace);
+ });
+ return Array.from(namespaces);
+ }
+
+ async listKeys(namespace: string): Promise<string[]> {
+ return Object.keys(localStorage)
+ .filter(key => key.startsWith(`${namespace}:`))
+ .map(key => key.replace(`${namespace}:`, ''));
+ }
+
+ watch(namespace: string, key: string): StoreEventEmitter<StoreEvents> {
+ const fullKey = this.getFullKey(namespace, key);
+ return {
+ on: (event, handler) => {
+ if (event !== 'change') return () => {};
+ if (!this.listeners.has(fullKey)) {
+ this.listeners.set(fullKey, new Set());
+ }
+ this.listeners.get(fullKey)!.add(handler as (payload: StoreEvents['change']) => void);
+ return () => this.listeners.get(fullKey)?.delete(handler as (payload: StoreEvents['change']) => void);
+ },
+ once: (event, handler) => {
+ if (event !== 'change') return () => {};
+ const wrapper = (payload: StoreEvents['change']) => {
+ handler(payload);
+ this.listeners.get(fullKey)?.delete(wrapper);
+ };
+ if (!this.listeners.has(fullKey)) {
+ this.listeners.set(fullKey, new Set());
+ }
+ this.listeners.get(fullKey)!.add(wrapper);
+ return () => this.listeners.get(fullKey)?.delete(wrapper);
+ },
+ off: (event, handler) => {
+ if (event === 'change') {
+ this.listeners.get(fullKey)?.delete(handler as (payload: StoreEvents['change']) => void);
+ }
+ },
+ };
+ }
+}
+
+export const implementation: VersionedAPI<StoreV1> = {
+ version: { major: 1, minor: 0, patch: 0 },
+ api: {
+ id: 'browser-store',
+ capabilities: new Set(['permanent', 'structured', 'watch', 'namespace']),
+
+ async init() {
+ try {
+ return E.right(undefined);
+ } catch (e) {
+ return E.left({
+ kind: 'storage',
+ message: e instanceof Error ? e.message : 'Unknown error',
+ cause: e,
+ });
+ }
+ },
+
+ async set(namespace, key, value, options) {
+ try {
+ const manager = BrowserStoreManager.new();
+ const existingData = await manager.getRaw(namespace, key);
+ const createdAt = existingData?.metadata.createdAt || new Date().toISOString()
+ const updatedAt = new Date().toISOString()
+
+ const storedData: StoredData = {
+ schemaVersion: 1,
+ metadata: {
+ createdAt,
+ updatedAt,
+ namespace,
+ encrypted: options?.encrypt,
+ compressed: options?.compress,
+ ttl: options?.ttl,
+ },
+ data: value,
+ };
+
+ await manager.set(namespace, key, storedData);
+ return E.right(undefined);
+ } catch (e) {
+ return E.left({
+ kind: 'storage',
+ message: e instanceof Error ? e.message : 'Unknown error',
+ cause: e,
+ });
+ }
+ },
+
+ async get(namespace, key) {
+ try {
+ const manager = BrowserStoreManager.new();
+ return E.right(await manager.get(namespace, key));
+ } catch (e) {
+ return E.left({
+ kind: 'storage',
+ message: e instanceof Error ? e.message : 'Unknown error',
+ cause: e,
+ });
+ }
+ },
+
+ async has(namespace, key) {
+ try {
+ const manager = BrowserStoreManager.new();
+ return E.right(await manager.has(namespace, key));
+ } catch (e) {
+ return E.left({
+ kind: 'storage',
+ message: e instanceof Error ? e.message : 'Unknown error',
+ cause: e,
+ });
+ }
+ },
+
+ async remove(namespace, key) {
+ try {
+ const manager = BrowserStoreManager.new();
+ return E.right(await manager.delete(namespace, key));
+ } catch (e) {
+ return E.left({
+ kind: 'storage',
+ message: e instanceof Error ? e.message : 'Unknown error',
+ cause: e,
+ });
+ }
+ },
+
+ async clear(namespace) {
+ try {
+ const manager = BrowserStoreManager.new();
+ await manager.clear(namespace);
+ return E.right(undefined);
+ } catch (e) {
+ return E.left({
+ kind: 'storage',
+ message: e instanceof Error ? e.message : 'Unknown error',
+ cause: e,
+ });
+ }
+ },
+
+ async listNamespaces() {
+ try {
+ const manager = BrowserStoreManager.new();
+ return E.right(await manager.listNamespaces());
+ } catch (e) {
+ return E.left({
+ kind: 'storage',
+ message: e instanceof Error ? e.message : 'Unknown error',
+ cause: e,
+ });
+ }
+ },
+
+ async listKeys(namespace) {
+ try {
+ const manager = BrowserStoreManager.new();
+ return E.right(await manager.listKeys(namespace));
+ } catch (e) {
+ return E.left({
+ kind: 'storage',
+ message: e instanceof Error ? e.message : 'Unknown error',
+ cause: e,
+ });
+ }
+ },
+
+ watch(namespace, key) {
+ const manager = BrowserStoreManager.new();
+ return manager.watch(namespace, key);
+ },
+ },
+};
diff --git a/packages/hoppscotch-kernel/src/store/index.ts b/packages/hoppscotch-kernel/src/store/index.ts
new file mode 100644
index 000000000..2b4e13f24
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/store/index.ts
@@ -0,0 +1,11 @@
+import { v1 } from './v/1'
+
+export type {
+ StoreV1,
+} from './v/1'
+
+export const VERSIONS = {
+ v1,
+} as const
+
+export const latest = v1
diff --git a/packages/hoppscotch-kernel/src/store/v/1.ts b/packages/hoppscotch-kernel/src/store/v/1.ts
new file mode 100644
index 000000000..0feff87a5
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/store/v/1.ts
@@ -0,0 +1,118 @@
+import type { VersionedAPI } from '@type/versioning'
+import * as E from 'fp-ts/Either'
+import { z } from 'zod'
+
+export type StoreCapability =
+ | 'permanent'
+ | 'temporary'
+ | 'structured'
+ | 'sync'
+ | 'watch'
+ | 'secure'
+ | 'namespace'
+
+export type StoreError =
+ | { kind: 'not_found'; message: string }
+ | { kind: 'permission'; message: string }
+ | { kind: 'quota'; message: string }
+ | { kind: 'version'; message: string }
+ | { kind: 'parse'; message: string; cause?: unknown }
+ | { kind: 'storage'; message: string; cause?: unknown }
+ | { kind: 'encrypt'; message: string; cause?: unknown }
+
+export interface StoreFile {
+ include?: boolean,
+
+ name: string
+ size: number
+
+ lastModified: string
+ content: Uint8Array
+}
+
+export interface StorageOptions {
+ encrypt?: boolean
+ temporary?: boolean
+ compress?: boolean
+ ttl?: number
+}
+
+export interface StoreEvents {
+ change: {
+ namespace: string
+ key: string
+ value?: unknown
+ }
+}
+
+export const StoreMetadataSchema = z.object({
+ version: z.number(),
+ lastUpdated: z.string().datetime(),
+ namespaces: z.record(z.object({
+ name: z.string(),
+ version: z.number(),
+ createdAt: z.string().datetime(),
+ updatedAt: z.string().datetime(),
+ keys: z.array(z.string())
+ }))
+})
+
+export type StoreMetadata = z.infer<typeof StoreMetadataSchema>
+
+export const StoredDataSchema = z.object({
+ schemaVersion: z.number(),
+ metadata: z.object({
+ createdAt: z.string().datetime(),
+ updatedAt: z.string().datetime(),
+ namespace: z.string(),
+ encrypted: z.boolean().optional(),
+ compressed: z.boolean().optional(),
+ ttl: z.number().optional()
+ }),
+ data: z.unknown()
+})
+
+export type StoredData = z.infer<typeof StoredDataSchema>
+
+export interface StoreEventEmitter<T> {
+ on<K extends keyof T>(event: K, handler: (payload: T[K]) => void): () => void
+ once<K extends keyof T>(event: K, handler: (payload: T[K]) => void): () => void
+ off<K extends keyof T>(event: K, handler: (payload: T[K]) => void): void
+}
+
+export interface StoreV1 {
+ readonly id: string
+ readonly capabilities: Set<StoreCapability>
+
+ init(): Promise<E.Either<StoreError, void>>
+ set(namespace: string, key: string, value: unknown, options?: StorageOptions): Promise<E.Either<StoreError, void>>
+ get<T>(namespace: string, key: string): Promise<E.Either<StoreError, T | undefined>>
+ remove(namespace: string, key: string): Promise<E.Either<StoreError, boolean>>
+ clear(namespace?: string): Promise<E.Either<StoreError, void>>
+ has(namespace: string, key: string): Promise<E.Either<StoreError, boolean>>
+ listNamespaces(): Promise<E.Either<StoreError, string[]>>
+ listKeys(namespace: string): Promise<E.Either<StoreError, string[]>>
+ watch(namespace: string, key: string): StoreEventEmitter<StoreEvents>
+}
+
+export const v1: VersionedAPI<StoreV1> = {
+ version: { major: 1, minor: 0, patch: 0 },
+ api: {
+ id: 'default',
+ capabilities: new Set(),
+
+ init: async () => E.left({ kind: 'version', message: 'Not implemented' }),
+ set: async () => E.left({ kind: 'version', message: 'Not implemented' }),
+ get: async () => E.left({ kind: 'version', message: 'Not implemented' }),
+ remove: async () => E.left({ kind: 'version', message: 'Not implemented' }),
+ clear: async () => E.left({ kind: 'version', message: 'Not implemented' }),
+ has: async () => E.left({ kind: 'version', message: 'Not implemented' }),
+ listNamespaces: async () => E.left({ kind: 'version', message: 'Not implemented' }),
+ listKeys: async () => E.left({ kind: 'version', message: 'Not implemented' }),
+ watch: () => ({
+ on: () => () => {},
+ once: () => () => {},
+ off: () => {}
+ })
+ }
+}
diff --git a/packages/hoppscotch-kernel/src/type/versioning.ts b/packages/hoppscotch-kernel/src/type/versioning.ts
new file mode 100644
index 000000000..df886bf0f
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/type/versioning.ts
@@ -0,0 +1,10 @@
+export type Version = {
+ major: number
+ minor: number
+ patch: number
+}
+
+export type VersionedAPI<T> = {
+ version: Version
+ api: T
+}
diff --git a/packages/hoppscotch-kernel/src/util/capability.ts b/packages/hoppscotch-kernel/src/util/capability.ts
new file mode 100644
index 000000000..81ca6d561
--- /dev/null
+++ b/packages/hoppscotch-kernel/src/util/capability.ts
@@ -0,0 +1,7 @@
+import type { Version } from '@type/versioning'
+
+export function checkCapability(required: Version, available: Version): boolean {
+ if (available.major !== required.major) return false
+ if (available.minor < required.minor) return false
+ return true
+}
diff --git a/packages/hoppscotch-kernel/tsconfig.base.json b/packages/hoppscotch-kernel/tsconfig.base.json
new file mode 100644
index 000000000..091a098a9
--- /dev/null
+++ b/packages/hoppscotch-kernel/tsconfig.base.json
@@ -0,0 +1,22 @@
+{
+ "compilerOptions": {
+ "target": "es2017",
+ "module": "esnext",
+ "lib": ["esnext", "DOM"],
+ "moduleResolution": "node",
+ "esModuleInterop": true,
+ "strict": true,
+ "strictNullChecks": true,
+ "skipLibCheck": true,
+ "resolveJsonModule": true,
+ "baseUrl": ".",
+ "paths": {
+ "~/*": ["src/*"],
+ "@io/*": ["src/io/*"],
+ "@relay/*": ["src/relay/*"],
+ "@store/*": ["src/store/*"],
+ "@type/*": ["src/type/*"],
+ "@util/*": ["src/util/*"]
+ }
+ }
+}
diff --git a/packages/hoppscotch-kernel/tsconfig.decl.json b/packages/hoppscotch-kernel/tsconfig.decl.json
new file mode 100644
index 000000000..4036008b5
--- /dev/null
+++ b/packages/hoppscotch-kernel/tsconfig.decl.json
@@ -0,0 +1,11 @@
+{
+ "extends": "./tsconfig.base.json",
+ "compilerOptions": {
+ "declaration": true,
+ "emitDeclarationOnly": true,
+ "declarationDir": "./dist",
+ "rootDir": "./src"
+ },
+ "include": ["src/**/*.ts"],
+ "exclude": ["node_modules", "dist", "**/*.spec.ts"]
+}
diff --git a/packages/hoppscotch-kernel/tsconfig.json b/packages/hoppscotch-kernel/tsconfig.json
new file mode 100644
index 000000000..540d207a5
--- /dev/null
+++ b/packages/hoppscotch-kernel/tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "extends": "./tsconfig.base.json",
+ "compilerOptions": {
+ "outDir": "./dist"
+ },
+ "include": ["src/**/*.ts"]
+}
diff --git a/packages/hoppscotch-kernel/vite.config.d.ts b/packages/hoppscotch-kernel/vite.config.d.ts
new file mode 100644
index 000000000..340562aff
--- /dev/null
+++ b/packages/hoppscotch-kernel/vite.config.d.ts
@@ -0,0 +1,2 @@
+declare const _default: import("vite").UserConfig;
+export default _default;
diff --git a/packages/hoppscotch-kernel/vite.config.ts b/packages/hoppscotch-kernel/vite.config.ts
new file mode 100644
index 000000000..3aa956586
--- /dev/null
+++ b/packages/hoppscotch-kernel/vite.config.ts
@@ -0,0 +1,36 @@
+import { resolve } from "path"
+import { defineConfig } from "vite"
+
+export default defineConfig({
+ build: {
+ outDir: "./dist",
+ emptyOutDir: true,
+ lib: {
+ entry: {
+ 'hoppscotch-kernel': resolve(__dirname, 'src/index.ts'),
+ },
+ formats: ['es', 'cjs']
+ },
+ rollupOptions: {
+ external: [
+ '@tauri-apps/api',
+ '@tauri-apps/plugin-dialog',
+ '@tauri-apps/plugin-fs',
+ '@tauri-apps/plugin-shell',
+ 'tauri-plugin-relay-api',
+ 'axios',
+ 'fp-ts'
+ ]
+ }
+ },
+ resolve: {
+ alias: {
+ '~': resolve(__dirname, './src'),
+ '@io': resolve(__dirname, './src/io'),
+ '@relay': resolve(__dirname, './src/relay'),
+ '@store': resolve(__dirname, './src/store'),
+ '@type': resolve(__dirname, './src/type'),
+ '@util': resolve(__dirname, './src/util')
+ }
+ }
+})
diff --git a/packages/hoppscotch-relay/.envrc b/packages/hoppscotch-relay/.envrc
deleted file mode 100644
index 5bf8fc159..000000000
--- a/packages/hoppscotch-relay/.envrc
+++ /dev/null
@@ -1,3 +0,0 @@
-source_url "https://raw.githubusercontent.com/cachix/devenv/95f329d49a8a5289d31e0982652f7058a189bfca/direnvrc" "sha256-d+8cBpDfDBj41inrADaJt+bDWhOktwslgoP5YiGJ1v0="
-
-use devenv
\ No newline at end of file
diff --git a/packages/hoppscotch-relay/devenv.nix b/packages/hoppscotch-relay/devenv.nix
deleted file mode 100644
index 400142745..000000000
--- a/packages/hoppscotch-relay/devenv.nix
+++ /dev/null
@@ -1,54 +0,0 @@
-{ pkgs, lib, config, inputs, ... }:
-
-{
- # https://devenv.sh/packages/
- packages = with pkgs; [
- git
- # Cargo
- cargo-edit
- ];
-
- # https://devenv.sh/basics/
- env = {
- APP_GREET = "Hoppscotch";
- };
-
- # https://devenv.sh/scripts/
- scripts.hello.exec = "echo hello from $APP_GREET";
-
- enterShell = ''
- git --version
- '';
-
- # https://devenv.sh/tests/
- enterTest = ''
- echo "Running tests"
- '';
-
- # https://devenv.sh/integrations/dotenv/
- dotenv.enable = true;
-
- # https://devenv.sh/languages/
- languages.rust = {
- enable = true;
- channel = "nightly";
- components = [
- "rustc"
- "cargo"
- "clippy"
- "rustfmt"
- "rust-analyzer"
- "llvm-tools-preview"
- "rust-src"
- "rustc-codegen-cranelift-preview"
- ];
- };
-
- # https://devenv.sh/pre-commit-hooks/
- # pre-commit.hooks.shellcheck.enable = true;
-
- # https://devenv.sh/processes/
- # processes.ping.exec = "ping example.com";
-
- # See full reference at https://devenv.sh/reference/options/
-}
diff --git a/packages/hoppscotch-selfhost-desktop/package.json b/packages/hoppscotch-selfhost-desktop/package.json
index ddcb3fa4d..ccec9f83f 100644
--- a/packages/hoppscotch-selfhost-desktop/package.json
+++ b/packages/hoppscotch-selfhost-desktop/package.json
@@ -51,7 +51,7 @@
"@graphql-codegen/urql-introspection": "2.2.1",
"@graphql-typed-document-node/core": "3.2.0",
"@iconify-json/lucide": "1.1.144",
- "@intlify/vite-plugin-vue-i18n": "6.0.1",
+ "@intlify/vite-plugin-vue-i18n": "7.0.0",
"@rushstack/eslint-patch": "1.3.3",
"@types/lodash-es": "4.17.10",
"@types/node": "18.18.8",
diff --git a/packages/hoppscotch-selfhost-desktop/src/platform/interceptors/native/index.ts b/packages/hoppscotch-selfhost-desktop/src/platform/interceptors/native/index.ts
index bad33e961..e2d271bec 100644
--- a/packages/hoppscotch-selfhost-desktop/src/platform/interceptors/native/index.ts
+++ b/packages/hoppscotch-selfhost-desktop/src/platform/interceptors/native/index.ts
@@ -456,7 +456,6 @@ export class NativeInterceptorService extends Service implements Interceptor {
)
try {
- console.log(requestDef)
const response: RunRequestResponse = await invoke(
"plugin:hopp_native_interceptor|run_request",
@@ -481,7 +480,6 @@ export class NativeInterceptorService extends Service implements Interceptor {
}
})
} catch (e) {
- console.log(e)
if (typeof e === "object" && (e as any)["RequestCancelled"]) {
return E.left("cancellation" as const)
diff --git a/packages/hoppscotch-selfhost-web/package.json b/packages/hoppscotch-selfhost-web/package.json
index a04cdb5b1..0b56cc8b0 100644
--- a/packages/hoppscotch-selfhost-web/package.json
+++ b/packages/hoppscotch-selfhost-web/package.json
@@ -28,8 +28,14 @@
"@fontsource-variable/roboto-mono": "5.1.0",
"@hoppscotch/common": "workspace:^",
"@hoppscotch/data": "workspace:^",
+ "@hoppscotch/kernel": "workspace:^",
"@hoppscotch/ui": "0.2.1",
"@import-meta-env/unplugin": "0.6.0",
+ "@tauri-apps/api": "2.1.1",
+ "@tauri-apps/plugin-shell": "2.0.1",
+ "@tauri-apps/plugin-dialog": "2.0.1",
+ "@tauri-apps/plugin-fs": "2.0.2",
+ "@vueuse/core": "10.5.0",
"axios": "1.7.7",
"buffer": "6.0.3",
"fp-ts": "2.16.9",
@@ -40,6 +46,7 @@
"verzod": "0.2.4",
"vue": "3.5.12",
"workbox-window": "7.1.0",
+ "dioc": "3.0.2",
"zod": "3.23.8"
},
"devDependencies": {
diff --git a/packages/hoppscotch-selfhost-web/src/components/Login.vue b/packages/hoppscotch-selfhost-web/src/components/Login.vue
new file mode 100644
index 000000000..b9b7c60dc
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/components/Login.vue
@@ -0,0 +1,112 @@
+<template>
+ <div
+ v-if="authFlowState.type === 'loading'"
+ class="flex flex-col items-center"
+ >
+ <HoppSmartSpinner />
+ </div>
+ <div
+ v-else-if="authFlowState.type === 'waiting'"
+ class="flex flex-col items-center space-y-2"
+ >
+ <h2 class="text-secondaryDark font-semibold text-lg">
+ Continue in your browser
+ </h2>
+ <p>We have opened Hoppscotch in your browser to continue your login.</p>
+ <div class="py-3 flex space-x-4 items-center">
+ <HoppButtonPrimary
+ :label="'Open Again'"
+ :icon="IconRotateCW"
+ @click="openLink(authFlowState.openURL)"
+ />
+ <HoppButtonSecondary
+ :label="'Copy Link'"
+ :icon="copyIcon"
+ outline
+ @click="onCopyClick"
+ />
+ </div>
+ </div>
+ <div v-else class="flex flex-col items-center">
+ <p>There was an error processing your login...</p>
+ </div>
+</template>
+
+<script setup lang="ts">
+import { invoke } from "@tauri-apps/api/core"
+import { listen } from "@tauri-apps/api/event"
+import { Io } from "@hoppscotch/common/kernel/io"
+import { onMounted, ref } from "vue"
+import IconRotateCW from "~icons/lucide/rotate-cw"
+import IconLink from "~icons/lucide/link"
+import IconCheck from "~icons/lucide/check"
+import { copyToClipboard } from "@hoppscotch/common/helpers/utils/clipboard"
+import { refAutoReset } from "@vueuse/core"
+import { PersistenceService } from "@hoppscotch/common/services/persistence"
+import { useService } from "dioc/vue"
+import { setInitialUser } from "@platform/auth/desktop"
+import { z } from "zod"
+
+const persistenceService = useService(PersistenceService)
+
+const DeviceTokenResponse = z.object({
+ access_token: z.string(),
+ refresh_token: z.string(),
+})
+
+type FlowStates =
+ | { type: "loading" }
+ | { type: "waiting"; openURL: string }
+ | { type: "error" }
+
+const authFlowState = ref<FlowStates>({ type: "loading" })
+const copyIcon = refAutoReset(IconLink, 1000)
+
+function onCopyClick() {
+ if (authFlowState.value.type === "waiting") {
+ copyIcon.value = IconCheck
+ copyToClipboard(authFlowState.value.openURL)
+ }
+}
+
+async function openLink(url: string) {
+ await Io.openExternalLink({ url })
+}
+
+onMounted(async () => {
+ const port = await invoke<number>("hopp_auth_port")
+
+ const redirectURI = `http://localhost:${port}/device-token`
+ const openURL = `${import.meta.env.VITE_BASE_URL}/device-login?redirect_uri=${encodeURIComponent(redirectURI)}`
+
+ await openLink(openURL)
+ authFlowState.value = { type: "waiting", openURL }
+
+ await listen<string>("hopp_auth://token", async (data) => {
+ authFlowState.value = { type: "loading" }
+ console.info("hopp_auth://token data", data)
+ try {
+ const parseResult = DeviceTokenResponse.safeParse(data.payload)
+ console.info("parseResult", parseResult)
+
+ if (!parseResult.success) {
+ throw new Error("Token data returned from backend was invalid")
+ }
+
+ const tokens = parseResult.data
+
+ await persistenceService.setLocalConfig(
+ "access_token",
+ tokens.access_token
+ )
+ await persistenceService.setLocalConfig(
+ "refresh_token",
+ tokens.refresh_token
+ )
+ await setInitialUser()
+ } catch (_) {
+ authFlowState.value = { type: "error" }
+ }
+ })
+})
+</script>
diff --git a/packages/hoppscotch-selfhost-web/src/main.ts b/packages/hoppscotch-selfhost-web/src/main.ts
index f96f64d05..2cd70decc 100644
--- a/packages/hoppscotch-selfhost-web/src/main.ts
+++ b/packages/hoppscotch-selfhost-web/src/main.ts
@@ -1,52 +1,148 @@
+import { ref } from "vue"
+import { listen } from "@tauri-apps/api/event"
import { createHoppApp } from "@hoppscotch/common"
-import { def as authDef } from "./platform/auth/auth.platform"
-import { def as environmentsDef } from "./platform/environments/environments.platform"
-import { def as collectionsDef } from "./platform/collections/collections.platform"
-import { def as settingsDef } from "./platform/settings/settings.platform"
-import { def as historyDef } from "./platform/history/history.platform"
-import { def as backendDef } from "@hoppscotch/common/platform/std/backend"
-import { browserInterceptor } from "@hoppscotch/common/platform/std/interceptors/browser"
-import { proxyInterceptor } from "@hoppscotch/common/platform/std/interceptors/proxy"
-import { ExtensionInspectorService } from "@hoppscotch/common/platform/std/inspections/extension.inspector"
-import { ExtensionInterceptorService } from "@hoppscotch/common/platform/std/interceptors/extension"
-import { AgentInterceptorService } from "@hoppscotch/common/platform/std/interceptors/agent"
+
+import { def as webAuth } from "@platform/auth/web"
+import { def as webEnvironments } from "@platform/environments/web"
+import { def as webCollections } from "@platform/collections/web"
+import { def as webSettings } from "@platform/settings/web"
+import { def as webHistory } from "@platform/history/web"
+
+import { def as desktopAuth } from "@platform/auth/desktop"
+import { def as desktopEnvironments } from "@platform/environments/desktop"
+import { def as desktopCollections } from "@platform/collections/desktop"
+import { def as desktopSettings } from "@platform/settings/desktop"
+import { def as desktopHistory } from "@platform/history/desktop"
+
+import { def as stdBackendDef } from "@hoppscotch/common/platform/std/backend"
import { stdFooterItems } from "@hoppscotch/common/platform/std/ui/footerItem"
import { stdSupportOptionItems } from "@hoppscotch/common/platform/std/ui/supportOptionsItem"
-import { browserIODef } from "@hoppscotch/common/platform/std/io"
import { InfraPlatform } from "@platform/infra/infra.platform"
+import { getKernelMode } from "@hoppscotch/kernel"
+import { kernelIO } from "@hoppscotch/common/platform/std/kernel-io"
+
+import { NativeKernelInterceptorService } from "@hoppscotch/common/platform/std/kernel-interceptors/native"
+import { AgentKernelInterceptorService } from "@hoppscotch/common/platform/std/kernel-interceptors/agent"
+import { ProxyKernelInterceptorService } from "@hoppscotch/common/platform/std/kernel-interceptors/proxy"
+import { ExtensionKernelInterceptorService } from "@hoppscotch/common/platform/std/kernel-interceptors/extension"
+import { BrowserKernelInterceptorService } from "@hoppscotch/common/platform/std/kernel-interceptors/browser"
-createHoppApp("#app", {
- ui: {
- additionalFooterMenuItems: stdFooterItems,
- additionalSupportOptionsMenuItems: stdSupportOptionItems,
- },
- auth: authDef,
- io: browserIODef,
- sync: {
- environments: environmentsDef,
- collections: collectionsDef,
- settings: settingsDef,
- history: historyDef,
- },
- interceptors: {
- default: "browser",
- interceptors: [
- { type: "standalone", interceptor: browserInterceptor },
- { type: "standalone", interceptor: proxyInterceptor },
- { type: "service", service: ExtensionInterceptorService },
- { type: "service", service: AgentInterceptorService },
- ],
- },
- additionalInspectors: [
- { type: "service", service: ExtensionInspectorService },
- ],
- platformFeatureFlags: {
- exportAsGIST: false,
- hasTelemetry: false,
- },
- limits: {
- collectionImportSizeLimit: 50,
- },
- infra: InfraPlatform,
- backend: backendDef,
+type Platform = "web" | "desktop"
+
+const createPlatformDef = <Web, Desktop>(web: Web, desktop: Desktop) => ({
+ web,
+ desktop,
+ get: (platform: Platform) => (platform === "web" ? web : desktop),
})
+
+const webInterceptors = [
+ BrowserKernelInterceptorService,
+ ProxyKernelInterceptorService,
+ AgentKernelInterceptorService,
+ ExtensionKernelInterceptorService,
+]
+const desktopInterceptors = [
+ NativeKernelInterceptorService,
+ ProxyKernelInterceptorService,
+]
+
+const platformDefs = {
+ auth: createPlatformDef(webAuth, desktopAuth),
+ environments: createPlatformDef(webEnvironments, desktopEnvironments),
+ collections: createPlatformDef(webCollections, desktopCollections),
+ settings: createPlatformDef(webSettings, desktopSettings),
+ history: createPlatformDef(webHistory, desktopHistory),
+ interceptors: createPlatformDef(webInterceptors, desktopInterceptors),
+}
+
+const kernelMode = getKernelMode()
+const headerPaddingLeft = ref("0px")
+const headerPaddingTop = ref("0px")
+
+const getInterceptors = (mode: Platform) =>
+ platformDefs.interceptors.get(mode).map((service) => ({
+ type: "service" as const,
+ service,
+ }))
+
+async function initApp() {
+ await createHoppApp("#app", {
+ ui: {
+ additionalFooterMenuItems: stdFooterItems,
+ additionalSupportOptionsMenuItems: stdSupportOptionItems,
+ appHeader: {
+ paddingLeft: headerPaddingLeft,
+ paddingTop: headerPaddingTop,
+ },
+ },
+ auth: platformDefs.auth.get(kernelMode),
+ kernelIO,
+ sync: {
+ environments: platformDefs.environments.get(kernelMode),
+ collections: platformDefs.collections.get(kernelMode),
+ settings: platformDefs.settings.get(kernelMode),
+ history: platformDefs.history.get(kernelMode),
+ },
+ kernelInterceptors: {
+ default: kernelMode === "desktop" ? "native" : "browser",
+ interceptors: getInterceptors(kernelMode),
+ },
+ platformFeatureFlags: {
+ exportAsGIST: false,
+ hasTelemetry: false,
+ },
+ limits: {
+ collectionImportSizeLimit: 50,
+ },
+ infra: InfraPlatform,
+ backend: stdBackendDef,
+ })
+
+ if (kernelMode === "desktop") {
+ listen("will-enter-fullscreen", () => {
+ headerPaddingTop.value = "0px"
+ headerPaddingLeft.value = "0px"
+ })
+
+ listen("will-exit-fullscreen", () => {
+ headerPaddingTop.value = "0px"
+ headerPaddingLeft.value = "80px"
+ })
+
+ headerPaddingTop.value = "0px"
+ headerPaddingLeft.value = "80px"
+
+ // Add backspace prevention for non-text inputs
+ window.addEventListener(
+ "keydown",
+ function (e) {
+ if (e.key === "Backspace" && !isTextInput(e.target)) {
+ e.preventDefault()
+ }
+ },
+ true
+ )
+ }
+}
+
+function isTextInput(target: EventTarget | null) {
+ if (target instanceof HTMLInputElement) {
+ return (
+ target.type === "text" ||
+ target.type === "email" ||
+ target.type === "password" ||
+ target.type === "number" ||
+ target.type === "search" ||
+ target.type === "tel" ||
+ target.type === "url" ||
+ target.type === "textarea"
+ )
+ } else if (target instanceof HTMLTextAreaElement) {
+ return true
+ } else if (target instanceof HTMLElement && target.isContentEditable) {
+ return true
+ }
+ return false
+}
+
+initApp().catch(console.error)
diff --git a/packages/hoppscotch-selfhost-web/src/pages/device-login.vue b/packages/hoppscotch-selfhost-web/src/pages/device-login.vue
new file mode 100644
index 000000000..1b7d258c2
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/pages/device-login.vue
@@ -0,0 +1,142 @@
+<template>
+ <div class="flex min-h-screen flex-col items-center justify-between">
+ <div
+ v-if="loginConfirmState === 'done'"
+ class="flex flex-1 flex-col items-center justify-center"
+ >
+ <h1 class="heading">Login Complete</h1>
+ <p class="mt-2 text-center">
+ You have logged in to the desktop app. <br />
+ You can close this browser window.
+ </p>
+ </div>
+ <div
+ v-else-if="loginConfirmState === 'error'"
+ class="flex flex-1 flex-col items-center justify-center"
+ >
+ <h1 class="heading">Login Error</h1>
+ <p class="mt-2 text-center">
+ There was an error while logging you in to the desktop app. <br />
+ Make sure you are using the desktop app on the same device and it is
+ open and try again.
+ </p>
+ </div>
+ <div
+ v-else-if="!currentUser"
+ class="flex flex-1 flex-col items-center justify-center"
+ >
+ <h1 class="heading">Login to Hoppscotch Desktop</h1>
+ <p class="mt-2 text-center">Please login to continue.</p>
+ <HoppButtonPrimary
+ :label="t('auth.login_to_hoppscotch')"
+ class="mt-8"
+ @click="showLoginModal = true"
+ />
+ </div>
+ <div v-else class="flex flex-1 flex-col items-center justify-center">
+ <h1 class="heading">Confirm Desktop Login</h1>
+ <p class="mt-2 text-center">
+ Are you sure you want to confirm login to your account in Hoppscotch
+ Desktop ?
+ </p>
+
+ <div class="flex flex-col justify-center pt-4 space-y-4">
+ <HoppButtonPrimary
+ :label="'Proceed'"
+ :loading="loginConfirmState === 'loading'"
+ @click="proceedLogin"
+ />
+ <FirebaseLogout />
+ </div>
+ </div>
+
+ <footer class="p-4">
+ <HoppButtonSecondary
+ class="!font-bold tracking-wide !text-secondaryDark"
+ label="HOPPSCOTCH"
+ to="/"
+ />
+ </footer>
+
+ <FirebaseLogin
+ v-if="!currentUser && showLoginModal"
+ @hide-modal="showLoginModal = false"
+ />
+ </div>
+</template>
+
+<script setup lang="ts">
+import { useReadonlyStream } from "@hoppscotch/common/composables/stream"
+import { platform } from "@hoppscotch/common/platform"
+import { useI18n } from "@hoppscotch/common/composables/i18n"
+import { onBeforeMount, ref } from "vue"
+import { initializeApp } from "@hoppscotch/common/helpers/app"
+import axios from "axios"
+import { z } from "zod"
+
+const t = useI18n()
+
+const showLoginModal = ref(false)
+
+const currentUser = useReadonlyStream(
+ platform.auth.getCurrentUserStream(),
+ platform.auth.getCurrentUser()
+)
+
+onBeforeMount(() => {
+ initializeApp()
+})
+
+type LoginConfirmState = "initial" | "loading" | "error" | "done"
+
+const loginConfirmState = ref<LoginConfirmState>("initial")
+
+const DeviceTokenResponse = z.object({
+ access_token: z.string(),
+ refresh_token: z.string(),
+})
+
+async function proceedLogin() {
+ loginConfirmState.value = "loading"
+
+ try {
+ const url = new URL(window.location.href)
+ const redirect_uri = url.searchParams.get("redirect_uri")
+
+ if (!redirect_uri) {
+ throw new Error("Redirect URI not found")
+ }
+
+ const res = await axios.get(
+ `${import.meta.env.VITE_BACKEND_API_URL}/auth/desktop?redirect_uri=${redirect_uri}`,
+ {
+ withCredentials: true,
+ }
+ )
+
+ const parseResult = DeviceTokenResponse.safeParse(res.data)
+
+ if (!parseResult.success) {
+ throw new Error("Token data returned from backend was invalid")
+ }
+
+ const tokens = parseResult.data
+
+ console.info("tokens", tokens)
+
+ await axios.get(
+ `${redirect_uri}?access_token=${tokens.access_token}&refresh_token=${tokens.refresh_token}`
+ )
+
+ loginConfirmState.value = "done"
+ } catch (e) {
+ console.error(e)
+ loginConfirmState.value = "error"
+ }
+}
+</script>
+
+<route lang="yaml">
+meta:
+ layout: empty
+</route>
diff --git a/packages/hoppscotch-selfhost-web/src/platform/auth/auth.api.ts b/packages/hoppscotch-selfhost-web/src/platform/auth/desktop/api.ts
similarity index 97%
rename from packages/hoppscotch-selfhost-web/src/platform/auth/auth.api.ts
rename to packages/hoppscotch-selfhost-web/src/platform/auth/desktop/api.ts
index 66992b51b..9767f75c1 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/auth/auth.api.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/auth/desktop/api.ts
@@ -6,7 +6,7 @@ import {
UpdateUserDisplayNameDocument,
UpdateUserDisplayNameMutation,
UpdateUserDisplayNameMutationVariables,
-} from "../../api/generated/graphql"
+} from "@api/generated/graphql"
const expectedAllowedProvidersSchema = z.object({
// currently supported values are "GOOGLE", "GITHUB", "EMAIL", "MICROSOFT", "SAML"
diff --git a/packages/hoppscotch-selfhost-web/src/platform/auth/desktop/index.ts b/packages/hoppscotch-selfhost-web/src/platform/auth/desktop/index.ts
new file mode 100644
index 000000000..6f0593bd5
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/auth/desktop/index.ts
@@ -0,0 +1,513 @@
+import * as E from "fp-ts/Either"
+
+import { BehaviorSubject, Subject } from "rxjs"
+import { Ref, ref, watch } from "vue"
+
+import { content } from "@hoppscotch/kernel"
+
+import { Io } from "@hoppscotch/common/kernel/io"
+import { listen } from "@tauri-apps/api/event"
+import { getService } from "@hoppscotch/common/modules/dioc"
+import { parseBodyAsJSON } from "@hoppscotch/common/helpers/functional/json"
+import { AuthEvent, AuthPlatformDef } from "@hoppscotch/common/platform/auth"
+import { PersistenceService } from "@hoppscotch/common/services/persistence"
+import { KernelInterceptorService } from "@hoppscotch/common/services/kernel-interceptor.service"
+
+import Login from "@platform-components/Login.vue"
+import { getAllowedAuthProviders, updateUserDisplayName } from "./api"
+
+export type HoppUserWithAuthDetail = {
+ uid: string
+ displayName: string | null
+ email: string | null
+ photoURL: string | null
+ provider?: string
+ accessToken?: string
+ refreshToken?: string
+ emailVerified: boolean
+}
+
+interface GQLResponse {
+ data?: {
+ me: HoppUserWithAuthDetail
+ }
+ errors?: Array<{ message: string }>
+}
+
+export const authEvents$ = new Subject<AuthEvent>()
+export const currentUser$ = new BehaviorSubject<HoppUserWithAuthDetail | null>(
+ null
+)
+export const probableUser$ = new BehaviorSubject<HoppUserWithAuthDetail | null>(
+ null
+)
+
+const isGettingInitialUser: Ref<null | boolean> = ref(null)
+
+const persistenceService = getService(PersistenceService)
+const interceptorService = getService(KernelInterceptorService)
+
+async function logout() {
+ const { response } = interceptorService.execute({
+ id: Date.now(),
+ url: `${import.meta.env.VITE_BACKEND_API_URL}/auth/logout`,
+ version: "HTTP/1.1",
+ method: "GET",
+ })
+
+ await response
+ await persistenceService.removeLocalConfig("refresh_token")
+ await persistenceService.removeLocalConfig("access_token")
+}
+
+async function signInUserWithGithubFB() {
+ await Io.openExternalLink({
+ url: `${import.meta.env.VITE_BACKEND_API_URL}/auth/github?redirect_uri=desktop`,
+ })
+}
+
+async function signInUserWithGoogleFB() {
+ await Io.openExternalLink({
+ url: `${import.meta.env.VITE_BACKEND_API_URL}/auth/google?redirect_uri=desktop`,
+ })
+}
+
+async function signInUserWithMicrosoftFB() {
+ await Io.openExternalLink({
+ url: `${import.meta.env.VITE_BACKEND_API_URL}/auth/microsoft?redirect_uri=desktop`,
+ })
+}
+
+async function getInitialUserDetails(): Promise<
+ GQLResponse | { error: string }
+> {
+ try {
+ const accessToken = await persistenceService.getLocalConfig("access_token")
+ const refreshToken =
+ await persistenceService.getLocalConfig("refresh_token")
+
+ if (!accessToken || !refreshToken) {
+ return { error: "auth/cookies_not_found" }
+ }
+
+ const { response } = interceptorService.execute({
+ id: Date.now(),
+ url: `${import.meta.env.VITE_BACKEND_GQL_URL}`,
+ method: "POST",
+ version: "HTTP/1.1",
+ headers: {
+ Authorization: `Bearer ${accessToken}`,
+ },
+ content: content.json({
+ query: `query Me {
+ me {
+ uid
+ displayName
+ email
+ photoURL
+ isAdmin
+ createdOn
+ }
+ }`,
+ }),
+ })
+
+ const responseBytes = await response
+
+ if (E.isLeft(responseBytes)) {
+ return { error: "auth/cookies_not_found" }
+ }
+
+ const res = parseBodyAsJSON<GQLResponse>(responseBytes.right.body)
+ if (res._tag == "Some" && res.value.data?.me) {
+ return {
+ data: {
+ me: {
+ ...res.value.data.me,
+ refreshToken,
+ accessToken,
+ emailVerified: true,
+ },
+ },
+ }
+ }
+ return { error: "auth/cookies_not_found" }
+ } catch (error) {
+ return { error: "auth/cookies_not_found" }
+ }
+}
+
+async function setUser(user: HoppUserWithAuthDetail | null) {
+ const accessToken = await persistenceService.getLocalConfig("access_token")
+ const refreshToken = await persistenceService.getLocalConfig("refresh_token")
+
+ if (!accessToken || !refreshToken) return null
+
+ const userWithToken =
+ user && accessToken && refreshToken
+ ? {
+ ...user,
+ accessToken,
+ refreshToken,
+ }
+ : null
+
+ currentUser$.next(userWithToken)
+ probableUser$.next(userWithToken)
+ await persistenceService.setLocalConfig(
+ "login_state",
+ JSON.stringify(userWithToken)
+ )
+}
+
+export async function setInitialUser() {
+ isGettingInitialUser.value = true
+ const res = await getInitialUserDetails()
+
+ if ("error" in res) {
+ await setUser(null)
+ isGettingInitialUser.value = false
+ return
+ }
+
+ if (res.errors?.[0]?.message === "Unauthorized") {
+ const isRefreshSuccess = await refreshToken()
+ if (isRefreshSuccess) {
+ await setInitialUser()
+ } else {
+ await setUser(null)
+ isGettingInitialUser.value = false
+ }
+ return
+ }
+
+ if (res.data?.me) {
+ const hoppBackendUser = res.data.me
+ const accessToken = await persistenceService.getLocalConfig("access_token")
+ if (!accessToken) return null
+
+ if (!accessToken) {
+ await setUser(null)
+ isGettingInitialUser.value = false
+ return
+ }
+
+ const HoppUserWithAuthDetail: HoppUserWithAuthDetail = {
+ uid: hoppBackendUser.uid,
+ displayName: hoppBackendUser.displayName,
+ email: hoppBackendUser.email,
+ photoURL: hoppBackendUser.photoURL,
+ emailVerified: true,
+ accessToken,
+ }
+
+ await setUser(HoppUserWithAuthDetail)
+ isGettingInitialUser.value = false
+
+ authEvents$.next({
+ event: "login",
+ user: HoppUserWithAuthDetail,
+ })
+ }
+}
+
+async function refreshToken() {
+ try {
+ const refreshToken =
+ await persistenceService.getLocalConfig("refresh_token")
+ if (!refreshToken) return null
+
+ const { response } = interceptorService.execute({
+ id: Date.now(),
+ url: `${import.meta.env.VITE_BACKEND_API_URL}/auth/refresh`,
+ method: "GET",
+ version: "HTTP/1.1",
+ headers: {
+ Authorization: `Bearer ${refreshToken}`,
+ },
+ })
+
+ const res = await response
+ if (E.isLeft(res)) return false
+
+ await setAuthCookies(res.right.headers)
+ const isSuccessful = res.right.status === 200
+
+ if (isSuccessful && currentUser$.value) {
+ authEvents$.next({
+ event: "login",
+ user: {
+ uid: currentUser$.value.uid,
+ displayName: currentUser$.value.displayName,
+ email: currentUser$.value.email,
+ photoURL: currentUser$.value.photoURL,
+ emailVerified: currentUser$.value.emailVerified,
+ },
+ })
+ }
+
+ return isSuccessful
+ } catch (err) {
+ return false
+ }
+}
+
+async function sendMagicLink(email: string) {
+ const { response } = interceptorService.execute({
+ id: Date.now(),
+ url: `${import.meta.env.VITE_BACKEND_API_URL}/auth/signin?origin=desktop`,
+ version: "HTTP/1.1",
+ method: "POST",
+ content: content.json({ email }),
+ })
+
+ const res = await response
+ if (E.isLeft(res)) throw new Error("Failed to send magic link")
+
+ if (res.right.data && res.right.data.deviceIdentifier) {
+ await persistenceService.setLocalConfig(
+ "deviceIdentifier",
+ res.right.data.deviceIdentifier
+ )
+ } else {
+ throw new Error("Does not get device identifier")
+ }
+
+ return res.right.data
+}
+
+async function setAuthCookies(headers: Headers) {
+ const cookieHeader = headers.get("set-cookie")
+ const cookies = cookieHeader ? cookieHeader.split(",") : []
+
+ const accessTokenMatch = cookies.join(",").match(/access_token=([^;]+)/)
+ const refreshTokenMatch = cookies.join(",").match(/refresh_token=([^;]+)/)
+
+ if (accessTokenMatch) {
+ const accessToken = accessTokenMatch[1]
+ await persistenceService.setLocalConfig("access_token", accessToken)
+ }
+
+ if (refreshTokenMatch) {
+ const refreshToken = refreshTokenMatch[1]
+ await persistenceService.setLocalConfig("refresh_token", refreshToken)
+ }
+}
+
+export const def: AuthPlatformDef = {
+ customLoginSelectorUI: Login,
+ getCurrentUserStream: () => currentUser$,
+ getAuthEventsStream: () => authEvents$,
+ getProbableUserStream: () => probableUser$,
+ getCurrentUser: () => currentUser$.value,
+ getProbableUser: () => probableUser$.value,
+
+ async getAllowedAuthProviders() {
+ return await getAllowedAuthProviders()
+ },
+
+ getBackendHeaders() {
+ const accessToken = currentUser$.value?.accessToken
+ return accessToken
+ ? {
+ Authorization: `Bearer ${accessToken}`,
+ }
+ : ({} as Record<string, string>)
+ },
+
+ getGQLClientOptions() {
+ const accessToken = currentUser$.value?.accessToken
+ return {
+ // For GraphQL subscriptions via WebSocket
+ connectionParams: accessToken
+ ? {
+ Authorization: `Bearer ${accessToken}`,
+ }
+ : undefined,
+ // For regular HTTP queries
+ fetchOptions: {
+ headers: accessToken
+ ? { Authorization: `Bearer ${accessToken}` }
+ : undefined,
+ },
+ }
+ },
+
+ axiosPlatformConfig() {
+ const accessToken = currentUser$.value?.accessToken
+ return {
+ headers: accessToken
+ ? {
+ Authorization: `Bearer ${accessToken}`,
+ }
+ : {},
+ }
+ },
+
+ willBackendHaveAuthError() {
+ return !currentUser$.value
+ },
+
+ onBackendGQLClientShouldReconnect(func) {
+ authEvents$.subscribe((event) => {
+ if (event.event === "login" || event.event === "logout") {
+ func()
+ }
+ })
+ },
+
+ isSignInWithEmailLink(url: string) {
+ const urlObject = new URL(url)
+ const searchParams = new URLSearchParams(urlObject.search)
+ return searchParams.has("token")
+ },
+
+ async processMagicLink(): Promise<void> {
+ return Promise.resolve()
+ },
+
+ getDevOptsBackendIDToken() {
+ return null
+ },
+
+ async performAuthInit() {
+ const loginState = await persistenceService.getLocalConfig("login_state")
+ const probableUser = JSON.parse(loginState ?? "null")
+ probableUser$.next(probableUser)
+ await setInitialUser()
+
+ await listen<string>(
+ "scheme-request-received",
+ async (event: { payload: string }) => {
+ const deepLink = event.payload
+ const params = new URLSearchParams(deepLink.split("?")[1])
+
+ const accessToken = params.get("access_token")
+ const refreshToken = params.get("refresh_token")
+ const token = params.get("token")
+
+ if (accessToken && refreshToken) {
+ await persistenceService.setLocalConfig("access_token", accessToken)
+ await persistenceService.setLocalConfig("refresh_token", refreshToken)
+ return
+ }
+
+ if (token) {
+ await persistenceService.setLocalConfig("verifyToken", token)
+ await this.signInWithEmailLink("", "")
+ await setInitialUser()
+ }
+ }
+ )
+ },
+
+ waitProbableLoginToConfirm() {
+ return new Promise<void>((resolve, reject) => {
+ if (this.getCurrentUser()) {
+ resolve()
+ }
+
+ if (!probableUser$.value) reject(new Error("no_probable_user"))
+
+ const unwatch = watch(isGettingInitialUser, (val) => {
+ if (val === true || val === false) {
+ resolve()
+ unwatch()
+ }
+ })
+ })
+ },
+
+ async signInWithEmail(email: string) {
+ await sendMagicLink(email)
+ },
+
+ async verifyEmailAddress() {
+ return
+ },
+
+ async signInUserWithGoogle() {
+ await signInUserWithGoogleFB()
+ },
+
+ async signInUserWithGithub() {
+ await signInUserWithGithubFB()
+ return undefined
+ },
+
+ async signInUserWithMicrosoft() {
+ await signInUserWithMicrosoftFB()
+ },
+
+ async signInWithEmailLink(_email: string, url: string) {
+ const deviceIdentifier =
+ await persistenceService.getLocalConfig("deviceIdentifier")
+
+ if (!deviceIdentifier) {
+ throw new Error(
+ "Device Identifier not found, you can only signin from the browser you generated the magic link"
+ )
+ }
+
+ const urlObject = new URL(url)
+ const searchParams = new URLSearchParams(urlObject.search)
+ const token = searchParams.get("token")
+ const verifyToken =
+ token || (await persistenceService.getLocalConfig("verifyToken"))
+
+ const { response } = interceptorService.execute({
+ id: Date.now(),
+ url: `${import.meta.env.VITE_BACKEND_API_URL}/auth/verify`,
+ version: "HTTP/1.1",
+ method: "POST",
+ content: content.json({
+ token: verifyToken,
+ deviceIdentifier,
+ }),
+ })
+
+ const res = await response
+ if (E.isLeft(res)) throw new Error("Failed to verify email link")
+
+ await setAuthCookies(res.right.headers)
+
+ await persistenceService.removeLocalConfig("deviceIdentifier")
+ await persistenceService.removeLocalConfig("verifyToken")
+ },
+
+ // Removed parameter from here because we do not use it
+ async setEmailAddress() {
+ return
+ },
+
+ async setDisplayName(name: string) {
+ if (!name) return E.left("USER_NAME_CANNOT_BE_EMPTY")
+ if (!currentUser$.value) return E.left("NO_USER_LOGGED_IN")
+
+ const res = await updateUserDisplayName(name)
+
+ if (E.isRight(res)) {
+ const user = currentUser$.value
+ if (user) {
+ await setUser({
+ ...user,
+ displayName: res.right.updateDisplayName.displayName ?? null,
+ })
+ }
+ return E.right(undefined)
+ }
+ return E.left(res.left)
+ },
+
+ async signOutUser() {
+ await logout()
+
+ probableUser$.next(null)
+ currentUser$.next(null)
+ await persistenceService.removeLocalConfig("login_state")
+
+ authEvents$.next({
+ event: "logout",
+ })
+ },
+}
diff --git a/packages/hoppscotch-selfhost-web/src/platform/auth/web/api.ts b/packages/hoppscotch-selfhost-web/src/platform/auth/web/api.ts
new file mode 100644
index 000000000..9767f75c1
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/auth/web/api.ts
@@ -0,0 +1,45 @@
+import { runMutation } from "@hoppscotch/common/helpers/backend/GQLClient"
+import axios from "axios"
+import * as E from "fp-ts/Either"
+import { z } from "zod"
+import {
+ UpdateUserDisplayNameDocument,
+ UpdateUserDisplayNameMutation,
+ UpdateUserDisplayNameMutationVariables,
+} from "@api/generated/graphql"
+
+const expectedAllowedProvidersSchema = z.object({
+ // currently supported values are "GOOGLE", "GITHUB", "EMAIL", "MICROSOFT", "SAML"
+ // keeping it as string to avoid backend accidentally breaking frontend when adding new providers
+ providers: z.array(z.string()),
+})
+
+export const getAllowedAuthProviders = async () => {
+ try {
+ const res = await axios.get(
+ `${import.meta.env.VITE_BACKEND_API_URL}/auth/providers`,
+ {
+ withCredentials: true,
+ }
+ )
+
+ const parseResult = expectedAllowedProvidersSchema.safeParse(res.data)
+
+ if (!parseResult.success) {
+ return E.left("SOMETHING_WENT_WRONG")
+ }
+
+ return E.right(parseResult.data.providers)
+ } catch (_) {
+ return E.left("SOMETHING_WENT_WRONG")
+ }
+}
+
+export const updateUserDisplayName = (updatedDisplayName: string) =>
+ runMutation<
+ UpdateUserDisplayNameMutation,
+ UpdateUserDisplayNameMutationVariables,
+ ""
+ >(UpdateUserDisplayNameDocument, {
+ updatedDisplayName,
+ })()
diff --git a/packages/hoppscotch-selfhost-web/src/platform/auth/auth.platform.ts b/packages/hoppscotch-selfhost-web/src/platform/auth/web/index.ts
similarity index 92%
rename from packages/hoppscotch-selfhost-web/src/platform/auth/auth.platform.ts
rename to packages/hoppscotch-selfhost-web/src/platform/auth/web/index.ts
index cc5b8520d..b325779e2 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/auth/auth.platform.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/auth/web/index.ts
@@ -1,3 +1,8 @@
+import * as E from "fp-ts/Either"
+import axios from "axios"
+import { BehaviorSubject, Subject } from "rxjs"
+import { Ref, ref, watch } from "vue"
+
import { getService } from "@hoppscotch/common/modules/dioc"
import {
AuthEvent,
@@ -5,11 +10,8 @@ import {
HoppUser,
} from "@hoppscotch/common/platform/auth"
import { PersistenceService } from "@hoppscotch/common/services/persistence"
-import axios from "axios"
-import { BehaviorSubject, Subject } from "rxjs"
-import { Ref, ref, watch } from "vue"
-import { getAllowedAuthProviders, updateUserDisplayName } from "./auth.api"
-import * as E from "fp-ts/Either"
+
+import { getAllowedAuthProviders, updateUserDisplayName } from "./api"
export const authEvents$ = new Subject<AuthEvent | { event: "token_refresh" }>()
const currentUser$ = new BehaviorSubject<HoppUser | null>(null)
@@ -80,11 +82,11 @@ async function getInitialUserDetails() {
const isGettingInitialUser: Ref<null | boolean> = ref(null)
-function setUser(user: HoppUser | null) {
+async function setUser(user: HoppUser | null) {
currentUser$.next(user)
probableUser$.next(user)
- persistenceService.setLocalConfig("login_state", JSON.stringify(user))
+ await persistenceService.setLocalConfig("login_state", JSON.stringify(user))
}
async function setInitialUser() {
@@ -95,13 +97,13 @@ async function setInitialUser() {
// no cookies sent. so the user is not logged in
if (error && error.message === "auth/cookies_not_found") {
- setUser(null)
+ await setUser(null)
isGettingInitialUser.value = false
return
}
if (error && error.message === "user/not_found") {
- setUser(null)
+ await setUser(null)
isGettingInitialUser.value = false
return
}
@@ -113,7 +115,7 @@ async function setInitialUser() {
if (isRefreshSuccess) {
setInitialUser()
} else {
- setUser(null)
+ await setUser(null)
isGettingInitialUser.value = false
await logout()
}
@@ -134,7 +136,7 @@ async function setInitialUser() {
emailVerified: true,
}
- setUser(hoppUser)
+ await setUser(hoppUser)
isGettingInitialUser.value = false
@@ -182,7 +184,7 @@ async function sendMagicLink(email: string) {
)
if (res.data && res.data.deviceIdentifier) {
- persistenceService.setLocalConfig(
+ await persistenceService.setLocalConfig(
"deviceIdentifier",
res.data.deviceIdentifier
)
@@ -247,7 +249,7 @@ export const def: AuthPlatformDef = {
},
async performAuthInit() {
const probableUser = JSON.parse(
- persistenceService.getLocalConfig("login_state") ?? "null"
+ (await persistenceService.getLocalConfig("login_state")) ?? "null"
)
probableUser$.next(probableUser)
await setInitialUser()
@@ -301,7 +303,7 @@ export const def: AuthPlatformDef = {
const token = searchParams.get("token")
const deviceIdentifier =
- persistenceService.getLocalConfig("deviceIdentifier")
+ await persistenceService.getLocalConfig("deviceIdentifier")
await axios.post(
`${import.meta.env.VITE_BACKEND_API_URL}/auth/verify`,
@@ -326,7 +328,7 @@ export const def: AuthPlatformDef = {
const res = await updateUserDisplayName(name)
if (E.isRight(res)) {
- setUser({
+ await setUser({
...currentUser$.value,
displayName: res.right.updateDisplayName.displayName ?? null,
})
@@ -344,7 +346,7 @@ export const def: AuthPlatformDef = {
probableUser$.next(null)
currentUser$.next(null)
- persistenceService.removeLocalConfig("login_state")
+ await persistenceService.removeLocalConfig("login_state")
authEvents$.next({
event: "logout",
@@ -354,7 +356,7 @@ export const def: AuthPlatformDef = {
async processMagicLink() {
if (this.isSignInWithEmailLink(window.location.href)) {
const deviceIdentifier =
- persistenceService.getLocalConfig("deviceIdentifier")
+ await persistenceService.getLocalConfig("deviceIdentifier")
if (!deviceIdentifier) {
throw new Error(
@@ -364,7 +366,7 @@ export const def: AuthPlatformDef = {
await this.signInWithEmailLink(deviceIdentifier, window.location.href)
- persistenceService.removeLocalConfig("deviceIdentifier")
+ await persistenceService.removeLocalConfig("deviceIdentifier")
window.location.href = "/"
}
},
diff --git a/packages/hoppscotch-selfhost-web/src/platform/collections/collections.api.ts b/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/api.ts
similarity index 99%
rename from packages/hoppscotch-selfhost-web/src/platform/collections/collections.api.ts
rename to packages/hoppscotch-selfhost-web/src/platform/collections/desktop/api.ts
index 2ec1a9ee0..a1d8c80c2 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/collections/collections.api.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/api.ts
@@ -4,75 +4,75 @@ import {
runMutation,
} from "@hoppscotch/common/helpers/backend/GQLClient"
import {
+ CreateGqlChildUserCollectionDocument,
+ CreateGqlChildUserCollectionMutation,
+ CreateGqlChildUserCollectionMutationVariables,
+ CreateGqlRootUserCollectionDocument,
+ CreateGqlRootUserCollectionMutation,
+ CreateGqlRootUserCollectionMutationVariables,
+ CreateGqlUserRequestDocument,
+ CreateGqlUserRequestMutation,
+ CreateGqlUserRequestMutationVariables,
+ CreateRestChildUserCollectionDocument,
+ CreateRestChildUserCollectionMutation,
+ CreateRestChildUserCollectionMutationVariables,
CreateRestRootUserCollectionDocument,
CreateRestRootUserCollectionMutation,
CreateRestRootUserCollectionMutationVariables,
+ CreateRestUserRequestDocument,
CreateRestUserRequestMutation,
CreateRestUserRequestMutationVariables,
- CreateRestUserRequestDocument,
- CreateRestChildUserCollectionMutation,
- CreateRestChildUserCollectionMutationVariables,
- CreateRestChildUserCollectionDocument,
+ DeleteUserCollectionDocument,
DeleteUserCollectionMutation,
DeleteUserCollectionMutationVariables,
- DeleteUserCollectionDocument,
- RenameUserCollectionMutation,
- RenameUserCollectionMutationVariables,
- RenameUserCollectionDocument,
- MoveUserCollectionMutation,
- MoveUserCollectionMutationVariables,
- MoveUserCollectionDocument,
+ DeleteUserRequestDocument,
DeleteUserRequestMutation,
DeleteUserRequestMutationVariables,
- DeleteUserRequestDocument,
+ DuplicateUserCollectionDocument,
+ DuplicateUserCollectionMutation,
+ DuplicateUserCollectionMutationVariables,
+ ExportUserCollectionsToJsonDocument,
+ ExportUserCollectionsToJsonQuery,
+ ExportUserCollectionsToJsonQueryVariables,
+ GetGqlRootUserCollectionsDocument,
+ GetGqlRootUserCollectionsQuery,
+ GetGqlRootUserCollectionsQueryVariables,
+ GetUserRootCollectionsDocument,
+ GetUserRootCollectionsQuery,
+ GetUserRootCollectionsQueryVariables,
+ MoveUserCollectionDocument,
+ MoveUserCollectionMutation,
+ MoveUserCollectionMutationVariables,
MoveUserRequestDocument,
MoveUserRequestMutation,
MoveUserRequestMutationVariables,
+ RenameUserCollectionDocument,
+ RenameUserCollectionMutation,
+ RenameUserCollectionMutationVariables,
+ ReqType,
+ UpdateGqlUserRequestDocument,
+ UpdateGqlUserRequestMutation,
+ UpdateGqlUserRequestMutationVariables,
+ UpdateRestUserRequestDocument,
+ UpdateRestUserRequestMutation,
+ UpdateRestUserRequestMutationVariables,
+ UpdateUserCollectionDocument,
+ UpdateUserCollectionMutation,
+ UpdateUserCollectionMutationVariables,
+ UpdateUserCollectionOrderDocument,
UpdateUserCollectionOrderMutation,
UpdateUserCollectionOrderMutationVariables,
- UpdateUserCollectionOrderDocument,
- GetUserRootCollectionsQuery,
- GetUserRootCollectionsQueryVariables,
- GetUserRootCollectionsDocument,
UserCollectionCreatedDocument,
- UserCollectionUpdatedDocument,
- UserCollectionRemovedDocument,
+ UserCollectionDuplicatedDocument,
UserCollectionMovedDocument,
UserCollectionOrderUpdatedDocument,
- UserCollectionDuplicatedDocument,
- ExportUserCollectionsToJsonQuery,
- ExportUserCollectionsToJsonQueryVariables,
- ExportUserCollectionsToJsonDocument,
+ UserCollectionRemovedDocument,
+ UserCollectionUpdatedDocument,
UserRequestCreatedDocument,
- UserRequestUpdatedDocument,
- UserRequestMovedDocument,
UserRequestDeletedDocument,
- UpdateRestUserRequestMutation,
- UpdateRestUserRequestMutationVariables,
- UpdateRestUserRequestDocument,
- CreateGqlRootUserCollectionMutation,
- CreateGqlRootUserCollectionMutationVariables,
- CreateGqlRootUserCollectionDocument,
- CreateGqlUserRequestMutation,
- CreateGqlUserRequestMutationVariables,
- CreateGqlUserRequestDocument,
- CreateGqlChildUserCollectionMutation,
- CreateGqlChildUserCollectionMutationVariables,
- CreateGqlChildUserCollectionDocument,
- UpdateGqlUserRequestMutation,
- UpdateGqlUserRequestMutationVariables,
- UpdateGqlUserRequestDocument,
- GetGqlRootUserCollectionsQuery,
- GetGqlRootUserCollectionsQueryVariables,
- GetGqlRootUserCollectionsDocument,
- ReqType,
- UpdateUserCollectionMutation,
- UpdateUserCollectionMutationVariables,
- UpdateUserCollectionDocument,
- DuplicateUserCollectionDocument,
- DuplicateUserCollectionMutation,
- DuplicateUserCollectionMutationVariables,
-} from "../../api/generated/graphql"
+ UserRequestMovedDocument,
+ UserRequestUpdatedDocument,
+} from "@api/generated/graphql"
export const createRESTRootUserCollection = (title: string, data?: string) =>
runMutation<
diff --git a/packages/hoppscotch-selfhost-web/src/platform/collections/gqlCollections.sync.ts b/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/gqlCollections.sync.ts
similarity index 96%
rename from packages/hoppscotch-selfhost-web/src/platform/collections/gqlCollections.sync.ts
rename to packages/hoppscotch-selfhost-web/src/platform/collections/desktop/gqlCollections.sync.ts
index 4400eb585..229d2eee7 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/collections/gqlCollections.sync.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/gqlCollections.sync.ts
@@ -10,10 +10,10 @@ import {
import { HoppCollection, HoppRESTRequest } from "@hoppscotch/data"
-import { getSyncInitFunction } from "../../lib/sync"
+import { getSyncInitFunction } from "@lib/sync"
-import { StoreSyncDefinitionOf } from "../../lib/sync"
-import { createMapper } from "../../lib/sync/mapper"
+import { StoreSyncDefinitionOf } from "@lib/sync"
+import { createMapper } from "@lib/sync/mapper"
import {
createGQLChildUserCollection,
createGQLRootUserCollection,
@@ -23,11 +23,11 @@ import {
duplicateUserCollection,
editGQLUserRequest,
updateUserCollection,
-} from "./collections.api"
+} from "./api"
import * as E from "fp-ts/Either"
-import { ReqType } from "../../api/generated/graphql"
-import { moveOrReorderRequests } from "./collections.sync"
+import { ReqType } from "@api/generated/graphql"
+import { moveOrReorderRequests } from "./sync"
// gqlCollectionsMapper uses the collectionPath as the local identifier
export const gqlCollectionsMapper = createMapper<string, string>()
diff --git a/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/index.ts b/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/index.ts
new file mode 100644
index 000000000..ddc9fac2b
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/index.ts
@@ -0,0 +1,1076 @@
+import { CollectionsPlatformDef } from "@hoppscotch/common/platform/collections"
+import { authEvents$, def as platformAuth } from "@platform/auth/desktop"
+import { runDispatchWithOutSyncing } from "@lib/sync"
+
+import {
+ exportUserCollectionsToJSON,
+ runUserCollectionCreatedSubscription,
+ runUserCollectionDuplicatedSubscription,
+ runUserCollectionMovedSubscription,
+ runUserCollectionOrderUpdatedSubscription,
+ runUserCollectionRemovedSubscription,
+ runUserCollectionUpdatedSubscription,
+ runUserRequestCreatedSubscription,
+ runUserRequestDeletedSubscription,
+ runUserRequestMovedSubscription,
+ runUserRequestUpdatedSubscription,
+} from "./api"
+import { collectionsSyncer, getStoreByCollectionType } from "./sync"
+
+import { runGQLSubscription } from "@hoppscotch/common/helpers/backend/GQLClient"
+import {
+ addGraphqlCollection,
+ addGraphqlFolder,
+ addRESTCollection,
+ addRESTFolder,
+ editGraphqlCollection,
+ editGraphqlFolder,
+ editGraphqlRequest,
+ editRESTCollection,
+ editRESTFolder,
+ editRESTRequest,
+ moveGraphqlRequest,
+ moveRESTFolder,
+ moveRESTRequest,
+ navigateToFolderWithIndexPath,
+ removeGraphqlCollection,
+ removeGraphqlFolder,
+ removeGraphqlRequest,
+ removeRESTCollection,
+ removeRESTFolder,
+ removeRESTRequest,
+ restCollectionStore,
+ saveGraphqlRequestAs,
+ saveRESTRequestAs,
+ setGraphqlCollections,
+ setRESTCollections,
+ updateRESTCollectionOrder,
+ updateRESTRequestOrder,
+} from "@hoppscotch/common/newstore/collections"
+import {
+ generateUniqueRefId,
+ GQLHeader,
+ HoppCollection,
+ HoppGQLRequest,
+ HoppRESTHeaders,
+ HoppRESTParam,
+ HoppRESTRequest,
+} from "@hoppscotch/data"
+import * as E from "fp-ts/Either"
+import {
+ ReqType,
+ UserCollectionDuplicatedData,
+ UserRequest,
+} from "@api/generated/graphql"
+import { gqlCollectionsSyncer } from "./gqlCollections.sync"
+
+function initCollectionsSync() {
+ const currentUser$ = platformAuth.getCurrentUserStream()
+ collectionsSyncer.startStoreSync()
+ collectionsSyncer.setupSubscriptions(setupSubscriptions)
+
+ gqlCollectionsSyncer.startStoreSync()
+
+ // TODO: fix collection schema transformation on backend maybe?
+ loadUserCollections("REST")
+ loadUserCollections("GQL")
+
+ // TODO: test & make sure the auth thing is working properly
+ currentUser$.subscribe(async (user) => {
+ if (user) {
+ loadUserCollections("REST")
+ loadUserCollections("GQL")
+ }
+ })
+
+ authEvents$.subscribe((event) => {
+ if (event.event == "login" || event.event == "token_refresh") {
+ collectionsSyncer.startListeningToSubscriptions()
+ }
+
+ if (event.event == "logout") {
+ collectionsSyncer.stopListeningToSubscriptions()
+ }
+ })
+}
+
+type ExportedUserCollectionREST = {
+ id?: string
+ _ref_id?: string
+ folders: ExportedUserCollectionREST[]
+ requests: Array<HoppRESTRequest & { id: string }>
+ name: string
+ data: string
+}
+
+type ExportedUserCollectionGQL = {
+ id?: string
+ _ref_id?: string
+ folders: ExportedUserCollectionGQL[]
+ requests: Array<HoppGQLRequest & { id: string }>
+ name: string
+ data: string
+}
+
+function addDescriptionField(
+ candidate: HoppRESTHeaders | GQLHeader[] | HoppRESTParam[]
+) {
+ return candidate.map((item) => ({
+ ...item,
+ description: "description" in item ? item.description : "",
+ }))
+}
+
+function exportedCollectionToHoppCollection(
+ collection: ExportedUserCollectionREST | ExportedUserCollectionGQL,
+ collectionType: "REST" | "GQL"
+): HoppCollection {
+ if (collectionType == "REST") {
+ const restCollection = collection as ExportedUserCollectionREST
+
+ const data =
+ restCollection.data && restCollection.data !== "null"
+ ? JSON.parse(restCollection.data)
+ : {
+ auth: { authType: "inherit", authActive: false },
+ headers: [],
+ _ref_id: generateUniqueRefId("coll"),
+ }
+
+ return {
+ id: restCollection.id,
+ _ref_id: data._ref_id ?? generateUniqueRefId("coll"),
+ v: 6,
+ name: restCollection.name,
+ folders: restCollection.folders.map((folder) =>
+ exportedCollectionToHoppCollection(folder, collectionType)
+ ),
+ requests: restCollection.requests.map((request) => {
+ const requestParsedResult = HoppRESTRequest.safeParse(request)
+ if (requestParsedResult.type === "ok") {
+ return requestParsedResult.value
+ }
+
+ const {
+ v,
+ id,
+ auth,
+ body,
+ endpoint,
+ headers,
+ method,
+ name,
+ params,
+ preRequestScript,
+ testScript,
+ requestVariables,
+ responses,
+ } = request
+
+ const resolvedParams = addDescriptionField(params)
+ const resolvedHeaders = addDescriptionField(headers)
+
+ return {
+ v,
+ id,
+ name,
+ endpoint,
+ method,
+ params: resolvedParams,
+ requestVariables,
+ auth,
+ headers: resolvedHeaders,
+ body,
+ preRequestScript,
+ testScript,
+ responses,
+ }
+ }),
+ auth: data.auth,
+ headers: addDescriptionField(data.headers),
+ }
+ } else {
+ const gqlCollection = collection as ExportedUserCollectionGQL
+
+ const data =
+ gqlCollection.data && gqlCollection.data !== "null"
+ ? JSON.parse(gqlCollection.data)
+ : {
+ auth: { authType: "inherit", authActive: true },
+ headers: [],
+ _ref_id: generateUniqueRefId("coll"),
+ }
+
+ return {
+ id: gqlCollection.id,
+ _ref_id: data._ref_id ?? generateUniqueRefId("coll"),
+ v: 6,
+ name: gqlCollection.name,
+ folders: gqlCollection.folders.map((folder) =>
+ exportedCollectionToHoppCollection(folder, collectionType)
+ ),
+ requests: gqlCollection.requests.map((request) => {
+ const requestParsedResult = HoppGQLRequest.safeParse(request)
+ if (requestParsedResult.type === "ok") {
+ return requestParsedResult.value
+ }
+
+ const { v, auth, headers, name, id, query, url, variables } = request
+
+ const resolvedHeaders = addDescriptionField(headers)
+
+ return {
+ id,
+ v,
+ auth,
+ headers: resolvedHeaders,
+ name,
+ query,
+ url,
+ variables,
+ }
+ }),
+ auth: data.auth,
+ headers: addDescriptionField(data.headers),
+ }
+ }
+}
+
+async function loadUserCollections(collectionType: "REST" | "GQL") {
+ const res = await exportUserCollectionsToJSON(
+ undefined,
+ collectionType == "REST" ? ReqType.Rest : ReqType.Gql
+ )
+ if (E.isRight(res)) {
+ const collectionsJSONString =
+ res.right.exportUserCollectionsToJSON.exportedCollection
+ const exportedCollections = (
+ JSON.parse(collectionsJSONString) as Array<
+ ExportedUserCollectionGQL | ExportedUserCollectionREST
+ >
+ ).map((collection) => ({ v: 1, ...collection }))
+ runDispatchWithOutSyncing(() => {
+ collectionType == "REST"
+ ? setRESTCollections(
+ exportedCollections.map(
+ (collection) =>
+ exportedCollectionToHoppCollection(
+ collection,
+ "REST"
+ ) as HoppCollection
+ )
+ )
+ : setGraphqlCollections(
+ exportedCollections.map(
+ (collection) =>
+ exportedCollectionToHoppCollection(
+ collection,
+ "GQL"
+ ) as HoppCollection
+ )
+ )
+ })
+ }
+}
+
+function setupSubscriptions() {
+ let subs: ReturnType<typeof runGQLSubscription>[1][] = []
+
+ const userCollectionCreatedSub = setupUserCollectionCreatedSubscription()
+ const userCollectionUpdatedSub = setupUserCollectionUpdatedSubscription()
+ const userCollectionRemovedSub = setupUserCollectionRemovedSubscription()
+ const userCollectionMovedSub = setupUserCollectionMovedSubscription()
+ const userCollectionOrderUpdatedSub =
+ setupUserCollectionOrderUpdatedSubscription()
+ const userCollectionDuplicatedSub =
+ setupUserCollectionDuplicatedSubscription()
+
+ const userRequestCreatedSub = setupUserRequestCreatedSubscription()
+ const userRequestUpdatedSub = setupUserRequestUpdatedSubscription()
+ const userRequestDeletedSub = setupUserRequestDeletedSubscription()
+ const userRequestMovedSub = setupUserRequestMovedSubscription()
+
+ subs = [
+ userCollectionCreatedSub,
+ userCollectionUpdatedSub,
+ userCollectionRemovedSub,
+ userCollectionMovedSub,
+ userCollectionOrderUpdatedSub,
+ userCollectionDuplicatedSub,
+ userRequestCreatedSub,
+ userRequestUpdatedSub,
+ userRequestDeletedSub,
+ userRequestMovedSub,
+ ]
+
+ return () => {
+ subs.forEach((sub) => sub.unsubscribe())
+ }
+}
+
+function setupUserCollectionCreatedSubscription() {
+ const [userCollectionCreated$, userCollectionCreatedSub] =
+ runUserCollectionCreatedSubscription()
+
+ userCollectionCreated$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const collectionType = res.right.userCollectionCreated.type
+
+ const { collectionStore } = getStoreByCollectionType(collectionType)
+
+ const userCollectionBackendID = res.right.userCollectionCreated.id
+ const parentCollectionID = res.right.userCollectionCreated.parent?.id
+
+ const userCollectionLocalID = getCollectionPathFromCollectionID(
+ userCollectionBackendID,
+ collectionStore.value.state
+ )
+
+ // collection already exists in store ( this instance created it )
+ if (userCollectionLocalID) {
+ return
+ }
+
+ const parentCollectionPath =
+ parentCollectionID &&
+ getCollectionPathFromCollectionID(
+ parentCollectionID,
+ collectionStore.value.state
+ )
+
+ // only folders will have parent collection id
+ if (parentCollectionID && parentCollectionPath) {
+ runDispatchWithOutSyncing(() => {
+ collectionType == "GQL"
+ ? addGraphqlFolder(
+ res.right.userCollectionCreated.title,
+ parentCollectionPath
+ )
+ : addRESTFolder(
+ res.right.userCollectionCreated.title,
+ parentCollectionPath
+ )
+
+ const parentCollection = navigateToFolderWithIndexPath(
+ collectionStore.value.state,
+ parentCollectionPath
+ .split("/")
+ .map((pathIndex) => parseInt(pathIndex))
+ )
+
+ if (parentCollection) {
+ const folderIndex = parentCollection.folders.length - 1
+
+ const addedFolder = parentCollection.folders[folderIndex]
+ addedFolder.id = userCollectionBackendID
+ }
+ })
+ } else {
+ // root collections won't have parentCollectionID
+ const data =
+ res.right.userCollectionCreated.data &&
+ res.right.userCollectionCreated.data != "null"
+ ? JSON.parse(res.right.userCollectionCreated.data)
+ : {
+ auth: { authType: "inherit", authActive: true },
+ headers: [],
+ _ref_id: generateUniqueRefId("coll"),
+ }
+
+ runDispatchWithOutSyncing(() => {
+ collectionType == "GQL"
+ ? addGraphqlCollection({
+ name: res.right.userCollectionCreated.title,
+ folders: [],
+ requests: [],
+ v: 6,
+ _ref_id: data._ref_id,
+ auth: data.auth,
+ headers: addDescriptionField(data.headers),
+ })
+ : addRESTCollection({
+ name: res.right.userCollectionCreated.title,
+ folders: [],
+ requests: [],
+ v: 6,
+ _ref_id: data._ref_id,
+ auth: data.auth,
+ headers: addDescriptionField(data.headers),
+ })
+
+ const localIndex = collectionStore.value.state.length - 1
+
+ const addedCollection = collectionStore.value.state[localIndex]
+ addedCollection.id = userCollectionBackendID
+ })
+ }
+ }
+ })
+
+ return userCollectionCreatedSub
+}
+
+function setupUserCollectionUpdatedSubscription() {
+ const [userCollectionUpdated$, userCollectionUpdatedSub] =
+ runUserCollectionUpdatedSubscription()
+
+ userCollectionUpdated$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const collectionType = res.right.userCollectionUpdated.type
+
+ const { collectionStore } = getStoreByCollectionType(collectionType)
+
+ const updatedCollectionBackendID = res.right.userCollectionUpdated.id
+ const updatedCollectionLocalPath = getCollectionPathFromCollectionID(
+ updatedCollectionBackendID,
+ collectionStore.value.state
+ )
+
+ const isFolder =
+ updatedCollectionLocalPath &&
+ updatedCollectionLocalPath.split("/").length > 1
+
+ // updated collection is a folder
+ if (isFolder) {
+ runDispatchWithOutSyncing(() => {
+ collectionType == "REST"
+ ? editRESTFolder(updatedCollectionLocalPath, {
+ name: res.right.userCollectionUpdated.title,
+ })
+ : editGraphqlFolder(updatedCollectionLocalPath, {
+ name: res.right.userCollectionUpdated.title,
+ })
+ })
+ }
+
+ // updated collection is a root collection
+ if (updatedCollectionLocalPath && !isFolder) {
+ runDispatchWithOutSyncing(() => {
+ collectionType == "REST"
+ ? editRESTCollection(parseInt(updatedCollectionLocalPath), {
+ name: res.right.userCollectionUpdated.title,
+ })
+ : editGraphqlCollection(parseInt(updatedCollectionLocalPath), {
+ name: res.right.userCollectionUpdated.title,
+ })
+ })
+ }
+ }
+ })
+
+ return userCollectionUpdatedSub
+}
+
+function setupUserCollectionMovedSubscription() {
+ const [userCollectionMoved$, userCollectionMovedSub] =
+ runUserCollectionMovedSubscription()
+
+ userCollectionMoved$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const movedMetadata = res.right.userCollectionMoved
+
+ const sourcePath = getCollectionPathFromCollectionID(
+ movedMetadata.id,
+ restCollectionStore.value.state
+ )
+
+ let destinationPath: string | undefined
+
+ if (movedMetadata.parent?.id) {
+ destinationPath =
+ getCollectionPathFromCollectionID(
+ movedMetadata.parent?.id,
+ restCollectionStore.value.state
+ ) ?? undefined
+ }
+
+ sourcePath &&
+ runDispatchWithOutSyncing(() => {
+ moveRESTFolder(sourcePath, destinationPath ?? null)
+ })
+ }
+ })
+
+ return userCollectionMovedSub
+}
+
+function setupUserCollectionRemovedSubscription() {
+ const [userCollectionRemoved$, userCollectionRemovedSub] =
+ runUserCollectionRemovedSubscription()
+
+ userCollectionRemoved$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const removedCollectionBackendID = res.right.userCollectionRemoved.id
+ const collectionType = res.right.userCollectionRemoved.type
+
+ const { collectionStore } = getStoreByCollectionType(collectionType)
+
+ const removedCollectionLocalPath = getCollectionPathFromCollectionID(
+ removedCollectionBackendID,
+ collectionStore.value.state
+ )
+
+ const isFolder =
+ removedCollectionLocalPath &&
+ removedCollectionLocalPath.split("/").length > 1
+
+ if (removedCollectionLocalPath && isFolder) {
+ runDispatchWithOutSyncing(() => {
+ collectionType == "REST"
+ ? removeRESTFolder(removedCollectionLocalPath)
+ : removeGraphqlFolder(removedCollectionLocalPath)
+ })
+ }
+
+ if (removedCollectionLocalPath && !isFolder) {
+ runDispatchWithOutSyncing(() => {
+ collectionType == "REST"
+ ? removeRESTCollection(parseInt(removedCollectionLocalPath))
+ : removeGraphqlCollection(parseInt(removedCollectionLocalPath))
+ })
+ }
+ }
+ })
+
+ return userCollectionRemovedSub
+}
+
+function setupUserCollectionOrderUpdatedSubscription() {
+ const [userCollectionOrderUpdated$, userCollectionOrderUpdatedSub] =
+ runUserCollectionOrderUpdatedSubscription()
+
+ userCollectionOrderUpdated$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const { userCollection, nextUserCollection } =
+ res.right.userCollectionOrderUpdated
+
+ const sourceCollectionID = userCollection.id
+ const destinationCollectionID = nextUserCollection?.id
+
+ const sourcePath = getCollectionPathFromCollectionID(
+ sourceCollectionID,
+ restCollectionStore.value.state
+ )
+
+ let destinationPath: string | null | undefined
+
+ if (destinationCollectionID) {
+ destinationPath = getCollectionPathFromCollectionID(
+ destinationCollectionID,
+ restCollectionStore.value.state
+ )
+ }
+
+ runDispatchWithOutSyncing(() => {
+ if (sourcePath) {
+ updateRESTCollectionOrder(sourcePath, destinationPath ?? null)
+ }
+ })
+ }
+ })
+
+ return userCollectionOrderUpdatedSub
+}
+
+function setupUserCollectionDuplicatedSubscription() {
+ const [userCollectionDuplicated$, userCollectionDuplicatedSub] =
+ runUserCollectionDuplicatedSubscription()
+
+ userCollectionDuplicated$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const {
+ childCollections: childCollectionsJSONStr,
+ data,
+ id,
+ parentID: parentCollectionID,
+ requests: userRequests,
+ title: name,
+ type: collectionType,
+ } = res.right.userCollectionDuplicated
+
+ const { collectionStore } = getStoreByCollectionType(collectionType)
+
+ const parentCollectionPath =
+ parentCollectionID &&
+ getCollectionPathFromCollectionID(
+ parentCollectionID,
+ collectionStore.value.state
+ )
+
+ // Incoming data transformed to the respective internal representations
+ const { auth, headers } =
+ data && data != "null"
+ ? JSON.parse(data)
+ : {
+ auth: { authType: "inherit", authActive: true },
+ headers: [],
+ }
+ // Duplicated collection will have a unique ref id
+ const _ref_id = generateUniqueRefId("coll")
+
+ const folders = transformDuplicatedCollections(childCollectionsJSONStr)
+
+ const requests = transformDuplicatedCollectionRequests(
+ userRequests as UserRequest[]
+ )
+
+ // New collection to be added to store with the transformed data
+ const effectiveDuplicatedCollection: HoppCollection = {
+ id,
+ name,
+ folders,
+ requests,
+ v: 6,
+ _ref_id,
+ auth,
+ headers: addDescriptionField(headers),
+ }
+
+ // only folders will have parent collection id
+ if (parentCollectionID && parentCollectionPath) {
+ const collectionCreatedFromStoreIDSuffix = "-duplicate-collection"
+
+ const parentCollection = navigateToFolderWithIndexPath(
+ collectionStore.value.state,
+ parentCollectionPath
+ .split("/")
+ .map((pathIndex) => parseInt(pathIndex))
+ )
+
+ if (!parentCollection) {
+ return
+ }
+
+ // Grab the child collection inserted via store update with the ID suffix
+ const collectionInsertedViaStoreUpdateIdx =
+ parentCollection.folders.findIndex(({ id }) =>
+ id?.endsWith(collectionCreatedFromStoreIDSuffix)
+ )
+
+ if (collectionInsertedViaStoreUpdateIdx === -1) {
+ return
+ }
+
+ const collectionInsertedViaStoreUpdateIndexPath = `${parentCollectionPath}/${collectionInsertedViaStoreUpdateIdx}`
+
+ runDispatchWithOutSyncing(() => {
+ /**
+ * Step 1. Remove the collection inserted via store update with the ID suffix
+ * Step 2. Add the duplicated collection received from the GQL subscription
+ * Step 3. Update the duplicated collection with the relevant data
+ */
+
+ if (collectionType === "GQL") {
+ removeGraphqlFolder(collectionInsertedViaStoreUpdateIndexPath)
+
+ addGraphqlFolder(name, parentCollectionPath)
+
+ editGraphqlFolder(
+ collectionInsertedViaStoreUpdateIndexPath,
+ effectiveDuplicatedCollection
+ )
+ } else {
+ removeRESTFolder(collectionInsertedViaStoreUpdateIndexPath)
+
+ addRESTFolder(name, parentCollectionPath)
+
+ editRESTFolder(
+ collectionInsertedViaStoreUpdateIndexPath,
+ effectiveDuplicatedCollection
+ )
+ }
+ })
+ } else {
+ // root collections won't have `parentCollectionID`
+ const collectionCreatedFromStoreIDSuffix = "-duplicate-collection"
+
+ // Grab the child collection inserted via store update with the ID suffix
+ const collectionInsertedViaStoreUpdateIdx =
+ collectionStore.value.state.findIndex(({ id }) =>
+ id?.endsWith(collectionCreatedFromStoreIDSuffix)
+ )
+
+ if (collectionInsertedViaStoreUpdateIdx === -1) {
+ return
+ }
+
+ runDispatchWithOutSyncing(() => {
+ /**
+ * Step 1. Remove the collection inserted via store update with the ID suffix
+ * Step 2. Add the duplicated collection received from the GQL subscription
+ */
+ if (collectionType === "GQL") {
+ removeGraphqlCollection(collectionInsertedViaStoreUpdateIdx)
+
+ addGraphqlCollection(effectiveDuplicatedCollection)
+ } else {
+ removeRESTCollection(collectionInsertedViaStoreUpdateIdx)
+
+ addRESTCollection(effectiveDuplicatedCollection)
+ }
+ })
+ }
+ }
+ })
+
+ return userCollectionDuplicatedSub
+}
+
+function setupUserRequestCreatedSubscription() {
+ const [userRequestCreated$, userRequestCreatedSub] =
+ runUserRequestCreatedSubscription()
+
+ userRequestCreated$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const collectionID = res.right.userRequestCreated.collectionID
+ const request = JSON.parse(res.right.userRequestCreated.request)
+ const requestID = res.right.userRequestCreated.id
+
+ const requestType = res.right.userRequestCreated.type
+
+ const { collectionStore } = getStoreByCollectionType(requestType)
+
+ const hasAlreadyHappened = getRequestPathFromRequestID(
+ requestID,
+ collectionStore.value.state
+ )
+
+ if (!!hasAlreadyHappened) {
+ return
+ }
+
+ const collectionPath = getCollectionPathFromCollectionID(
+ collectionID,
+ collectionStore.value.state
+ )
+
+ if (collectionID && collectionPath) {
+ runDispatchWithOutSyncing(() => {
+ requestType == "REST"
+ ? saveRESTRequestAs(collectionPath, request)
+ : saveGraphqlRequestAs(collectionPath, request)
+
+ const target = navigateToFolderWithIndexPath(
+ collectionStore.value.state,
+ collectionPath.split("/").map((index) => parseInt(index))
+ )
+
+ const targetRequest = target?.requests[target?.requests.length - 1]
+
+ if (targetRequest) {
+ targetRequest.id = requestID
+ }
+ })
+ }
+ }
+ })
+
+ return userRequestCreatedSub
+}
+
+function setupUserRequestUpdatedSubscription() {
+ const [userRequestUpdated$, userRequestUpdatedSub] =
+ runUserRequestUpdatedSubscription()
+
+ userRequestUpdated$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const requestType = res.right.userRequestUpdated.type
+
+ const { collectionStore } = getStoreByCollectionType(requestType)
+
+ const requestPath = getRequestPathFromRequestID(
+ res.right.userRequestUpdated.id,
+ collectionStore.value.state
+ )
+
+ const collectionPath = requestPath?.collectionPath
+ const requestIndex = requestPath?.requestIndex
+
+ ;(requestIndex || requestIndex == 0) &&
+ collectionPath &&
+ runDispatchWithOutSyncing(() => {
+ requestType == "REST"
+ ? editRESTRequest(
+ collectionPath,
+ requestIndex,
+ JSON.parse(res.right.userRequestUpdated.request)
+ )
+ : editGraphqlRequest(
+ collectionPath,
+ requestIndex,
+ JSON.parse(res.right.userRequestUpdated.request)
+ )
+ })
+ }
+ })
+
+ return userRequestUpdatedSub
+}
+
+function setupUserRequestMovedSubscription() {
+ const [userRequestMoved$, userRequestMovedSub] =
+ runUserRequestMovedSubscription()
+
+ userRequestMoved$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const { request, nextRequest } = res.right.userRequestMoved
+
+ const {
+ collectionID: destinationCollectionID,
+ id: sourceRequestID,
+ type: requestType,
+ } = request
+
+ const { collectionStore } = getStoreByCollectionType(requestType)
+
+ const sourceRequestPath = getRequestPathFromRequestID(
+ sourceRequestID,
+ collectionStore.value.state
+ )
+
+ const destinationCollectionPath = getCollectionPathFromCollectionID(
+ destinationCollectionID,
+ collectionStore.value.state
+ )
+
+ const destinationRequestIndex = destinationCollectionPath
+ ? (() => {
+ const requestsLength = navigateToFolderWithIndexPath(
+ collectionStore.value.state,
+ destinationCollectionPath
+ .split("/")
+ .map((index) => parseInt(index))
+ )?.requests.length
+
+ return requestsLength || requestsLength == 0
+ ? requestsLength - 1
+ : undefined
+ })()
+ : undefined
+
+ // there is no nextRequest, so request is moved
+ if (
+ (destinationRequestIndex || destinationRequestIndex == 0) &&
+ destinationCollectionPath &&
+ sourceRequestPath &&
+ !nextRequest
+ ) {
+ runDispatchWithOutSyncing(() => {
+ requestType == "REST"
+ ? moveRESTRequest(
+ sourceRequestPath.collectionPath,
+ sourceRequestPath.requestIndex,
+ destinationCollectionPath
+ )
+ : moveGraphqlRequest(
+ sourceRequestPath.collectionPath,
+ sourceRequestPath.requestIndex,
+ destinationCollectionPath
+ )
+ })
+ }
+
+ // there is nextRequest, so request is reordered
+ if (
+ (destinationRequestIndex || destinationRequestIndex == 0) &&
+ destinationCollectionPath &&
+ nextRequest &&
+ // we don't have request reordering for graphql yet
+ requestType == "REST"
+ ) {
+ const { collectionID: nextCollectionID, id: nextRequestID } =
+ nextRequest
+
+ const nextCollectionPath =
+ getCollectionPathFromCollectionID(
+ nextCollectionID,
+ collectionStore.value.state
+ ) ?? undefined
+
+ const nextRequestIndex = nextCollectionPath
+ ? getRequestIndex(
+ nextRequestID,
+ nextCollectionPath,
+ collectionStore.value.state
+ )
+ : undefined
+
+ nextRequestIndex &&
+ nextCollectionPath &&
+ sourceRequestPath &&
+ runDispatchWithOutSyncing(() => {
+ updateRESTRequestOrder(
+ sourceRequestPath?.requestIndex,
+ nextRequestIndex,
+ nextCollectionPath
+ )
+ })
+ }
+ }
+ })
+
+ return userRequestMovedSub
+}
+
+function setupUserRequestDeletedSubscription() {
+ const [userRequestDeleted$, userRequestDeletedSub] =
+ runUserRequestDeletedSubscription()
+
+ userRequestDeleted$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const requestType = res.right.userRequestDeleted.type
+
+ const { collectionStore } = getStoreByCollectionType(requestType)
+
+ const deletedRequestPath = getRequestPathFromRequestID(
+ res.right.userRequestDeleted.id,
+ collectionStore.value.state
+ )
+
+ ;(deletedRequestPath?.requestIndex ||
+ deletedRequestPath?.requestIndex == 0) &&
+ deletedRequestPath.collectionPath &&
+ runDispatchWithOutSyncing(() => {
+ requestType == "REST"
+ ? removeRESTRequest(
+ deletedRequestPath.collectionPath,
+ deletedRequestPath.requestIndex
+ )
+ : removeGraphqlRequest(
+ deletedRequestPath.collectionPath,
+ deletedRequestPath.requestIndex
+ )
+ })
+ }
+ })
+
+ return userRequestDeletedSub
+}
+
+export const def: CollectionsPlatformDef = {
+ initCollectionsSync,
+}
+
+function getCollectionPathFromCollectionID(
+ collectionID: string,
+ collections: HoppCollection[],
+ parentPath?: string
+): string | null {
+ for (const collectionIndex in collections) {
+ if (collections[collectionIndex].id == collectionID) {
+ return parentPath
+ ? `${parentPath}/${collectionIndex}`
+ : `${collectionIndex}`
+ } else {
+ const collectionPath = getCollectionPathFromCollectionID(
+ collectionID,
+ collections[collectionIndex].folders,
+ parentPath ? `${parentPath}/${collectionIndex}` : `${collectionIndex}`
+ )
+
+ if (collectionPath) return collectionPath
+ }
+ }
+
+ return null
+}
+
+function getRequestPathFromRequestID(
+ requestID: string,
+ collections: HoppCollection[],
+ parentPath?: string
+): { collectionPath: string; requestIndex: number } | null {
+ for (const collectionIndex in collections) {
+ const requestIndex = collections[collectionIndex].requests.findIndex(
+ (request) => request.id == requestID
+ )
+
+ if (requestIndex != -1) {
+ return {
+ collectionPath: parentPath
+ ? `${parentPath}/${collectionIndex}`
+ : `${collectionIndex}`,
+ requestIndex,
+ }
+ } else {
+ const requestPath = getRequestPathFromRequestID(
+ requestID,
+ collections[collectionIndex].folders,
+ parentPath ? `${parentPath}/${collectionIndex}` : `${collectionIndex}`
+ )
+
+ if (requestPath) return requestPath
+ }
+ }
+
+ return null
+}
+
+function getRequestIndex(
+ requestID: string,
+ parentCollectionPath: string,
+ collections: HoppCollection[]
+) {
+ const collection = navigateToFolderWithIndexPath(
+ collections,
+ parentCollectionPath?.split("/").map((index) => parseInt(index))
+ )
+
+ const requestIndex = collection?.requests.findIndex(
+ (request) => request.id == requestID
+ )
+
+ return requestIndex
+}
+
+function transformDuplicatedCollections(
+ collectionsJSONStr: string
+): HoppCollection[] {
+ const parsedCollections: UserCollectionDuplicatedData[] =
+ JSON.parse(collectionsJSONStr)
+
+ return parsedCollections.map(
+ ({
+ childCollections: childCollectionsJSONStr,
+ data,
+ id,
+ requests: userRequests,
+ title: name,
+ }) => {
+ const { auth, headers } =
+ data && data !== "null"
+ ? JSON.parse(data)
+ : { auth: { authType: "inherit", authActive: true }, headers: [] }
+
+ const _ref_id = generateUniqueRefId("coll")
+
+ const folders = transformDuplicatedCollections(childCollectionsJSONStr)
+
+ const requests = transformDuplicatedCollectionRequests(userRequests)
+
+ return {
+ id,
+ name,
+ folders,
+ requests,
+ _ref_id,
+ v: 6,
+ auth,
+ headers: addDescriptionField(headers),
+ }
+ }
+ )
+}
+
+function transformDuplicatedCollectionRequests(
+ requests: UserRequest[]
+): HoppRESTRequest[] | HoppGQLRequest[] {
+ return requests.map(({ id, request }) => {
+ const parsedRequest = JSON.parse(request)
+
+ return {
+ ...parsedRequest,
+ id,
+ }
+ })
+}
diff --git a/packages/hoppscotch-selfhost-web/src/platform/collections/collections.sync.ts b/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/sync.ts
similarity index 98%
rename from packages/hoppscotch-selfhost-web/src/platform/collections/collections.sync.ts
rename to packages/hoppscotch-selfhost-web/src/platform/collections/desktop/sync.ts
index 88bea6fe7..60c1227d0 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/collections/collections.sync.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/sync.ts
@@ -15,8 +15,8 @@ import {
HoppRESTRequest,
} from "@hoppscotch/data"
-import { getSyncInitFunction, StoreSyncDefinitionOf } from "../../lib/sync"
-import { createMapper } from "../../lib/sync/mapper"
+import { getSyncInitFunction, StoreSyncDefinitionOf } from "@lib/sync"
+import { createMapper } from "@lib/sync/mapper"
import {
createRESTChildUserCollection,
createRESTRootUserCollection,
@@ -29,10 +29,10 @@ import {
moveUserRequest,
updateUserCollection,
updateUserCollectionOrder,
-} from "./collections.api"
+} from "./api"
import * as E from "fp-ts/Either"
-import { ReqType } from "../../api/generated/graphql"
+import { ReqType } from "@api/generated/graphql"
// restCollectionsMapper uses the collectionPath as the local identifier
export const restCollectionsMapper = createMapper<string, string>()
diff --git a/packages/hoppscotch-selfhost-web/src/platform/collections/web/api.ts b/packages/hoppscotch-selfhost-web/src/platform/collections/web/api.ts
new file mode 100644
index 000000000..a1d8c80c2
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/collections/web/api.ts
@@ -0,0 +1,348 @@
+import {
+ runGQLQuery,
+ runGQLSubscription,
+ runMutation,
+} from "@hoppscotch/common/helpers/backend/GQLClient"
+import {
+ CreateGqlChildUserCollectionDocument,
+ CreateGqlChildUserCollectionMutation,
+ CreateGqlChildUserCollectionMutationVariables,
+ CreateGqlRootUserCollectionDocument,
+ CreateGqlRootUserCollectionMutation,
+ CreateGqlRootUserCollectionMutationVariables,
+ CreateGqlUserRequestDocument,
+ CreateGqlUserRequestMutation,
+ CreateGqlUserRequestMutationVariables,
+ CreateRestChildUserCollectionDocument,
+ CreateRestChildUserCollectionMutation,
+ CreateRestChildUserCollectionMutationVariables,
+ CreateRestRootUserCollectionDocument,
+ CreateRestRootUserCollectionMutation,
+ CreateRestRootUserCollectionMutationVariables,
+ CreateRestUserRequestDocument,
+ CreateRestUserRequestMutation,
+ CreateRestUserRequestMutationVariables,
+ DeleteUserCollectionDocument,
+ DeleteUserCollectionMutation,
+ DeleteUserCollectionMutationVariables,
+ DeleteUserRequestDocument,
+ DeleteUserRequestMutation,
+ DeleteUserRequestMutationVariables,
+ DuplicateUserCollectionDocument,
+ DuplicateUserCollectionMutation,
+ DuplicateUserCollectionMutationVariables,
+ ExportUserCollectionsToJsonDocument,
+ ExportUserCollectionsToJsonQuery,
+ ExportUserCollectionsToJsonQueryVariables,
+ GetGqlRootUserCollectionsDocument,
+ GetGqlRootUserCollectionsQuery,
+ GetGqlRootUserCollectionsQueryVariables,
+ GetUserRootCollectionsDocument,
+ GetUserRootCollectionsQuery,
+ GetUserRootCollectionsQueryVariables,
+ MoveUserCollectionDocument,
+ MoveUserCollectionMutation,
+ MoveUserCollectionMutationVariables,
+ MoveUserRequestDocument,
+ MoveUserRequestMutation,
+ MoveUserRequestMutationVariables,
+ RenameUserCollectionDocument,
+ RenameUserCollectionMutation,
+ RenameUserCollectionMutationVariables,
+ ReqType,
+ UpdateGqlUserRequestDocument,
+ UpdateGqlUserRequestMutation,
+ UpdateGqlUserRequestMutationVariables,
+ UpdateRestUserRequestDocument,
+ UpdateRestUserRequestMutation,
+ UpdateRestUserRequestMutationVariables,
+ UpdateUserCollectionDocument,
+ UpdateUserCollectionMutation,
+ UpdateUserCollectionMutationVariables,
+ UpdateUserCollectionOrderDocument,
+ UpdateUserCollectionOrderMutation,
+ UpdateUserCollectionOrderMutationVariables,
+ UserCollectionCreatedDocument,
+ UserCollectionDuplicatedDocument,
+ UserCollectionMovedDocument,
+ UserCollectionOrderUpdatedDocument,
+ UserCollectionRemovedDocument,
+ UserCollectionUpdatedDocument,
+ UserRequestCreatedDocument,
+ UserRequestDeletedDocument,
+ UserRequestMovedDocument,
+ UserRequestUpdatedDocument,
+} from "@api/generated/graphql"
+
+export const createRESTRootUserCollection = (title: string, data?: string) =>
+ runMutation<
+ CreateRestRootUserCollectionMutation,
+ CreateRestRootUserCollectionMutationVariables,
+ ""
+ >(CreateRestRootUserCollectionDocument, {
+ title,
+ data,
+ })()
+
+export const createGQLRootUserCollection = (title: string, data?: string) =>
+ runMutation<
+ CreateGqlRootUserCollectionMutation,
+ CreateGqlRootUserCollectionMutationVariables,
+ ""
+ >(CreateGqlRootUserCollectionDocument, {
+ title,
+ data,
+ })()
+
+export const createRESTUserRequest = (
+ title: string,
+ request: string,
+ collectionID: string
+) =>
+ runMutation<
+ CreateRestUserRequestMutation,
+ CreateRestUserRequestMutationVariables,
+ ""
+ >(CreateRestUserRequestDocument, {
+ title,
+ request,
+ collectionID,
+ })()
+
+export const createGQLUserRequest = (
+ title: string,
+ request: string,
+ collectionID: string
+) =>
+ runMutation<
+ CreateGqlUserRequestMutation,
+ CreateGqlUserRequestMutationVariables,
+ ""
+ >(CreateGqlUserRequestDocument, {
+ title,
+ request,
+ collectionID,
+ })()
+
+export const createRESTChildUserCollection = (
+ title: string,
+ parentUserCollectionID: string,
+ data?: string
+) =>
+ runMutation<
+ CreateRestChildUserCollectionMutation,
+ CreateRestChildUserCollectionMutationVariables,
+ ""
+ >(CreateRestChildUserCollectionDocument, {
+ title,
+ parentUserCollectionID,
+ data,
+ })()
+
+export const createGQLChildUserCollection = (
+ title: string,
+ parentUserCollectionID: string,
+ data?: string
+) =>
+ runMutation<
+ CreateGqlChildUserCollectionMutation,
+ CreateGqlChildUserCollectionMutationVariables,
+ ""
+ >(CreateGqlChildUserCollectionDocument, {
+ title,
+ parentUserCollectionID,
+ data,
+ })()
+
+export const deleteUserCollection = (userCollectionID: string) =>
+ runMutation<
+ DeleteUserCollectionMutation,
+ DeleteUserCollectionMutationVariables,
+ ""
+ >(DeleteUserCollectionDocument, {
+ userCollectionID,
+ })()
+
+export const renameUserCollection = (
+ userCollectionID: string,
+ newTitle: string
+) =>
+ runMutation<
+ RenameUserCollectionMutation,
+ RenameUserCollectionMutationVariables,
+ ""
+ >(RenameUserCollectionDocument, { userCollectionID, newTitle })()
+
+export const updateUserCollection = (
+ userCollectionID: string,
+ newTitle?: string,
+ data?: string
+) =>
+ runMutation<
+ UpdateUserCollectionMutation,
+ UpdateUserCollectionMutationVariables,
+ ""
+ >(UpdateUserCollectionDocument, { userCollectionID, newTitle, data })()
+
+export const moveUserCollection = (
+ sourceCollectionID: string,
+ destinationCollectionID?: string
+) =>
+ runMutation<
+ MoveUserCollectionMutation,
+ MoveUserCollectionMutationVariables,
+ ""
+ >(MoveUserCollectionDocument, {
+ userCollectionID: sourceCollectionID,
+ destCollectionID: destinationCollectionID,
+ })()
+
+export const duplicateUserCollection = (
+ collectionID: string,
+ reqType: ReqType
+) =>
+ runMutation<
+ DuplicateUserCollectionMutation,
+ DuplicateUserCollectionMutationVariables,
+ ""
+ >(DuplicateUserCollectionDocument, {
+ collectionID,
+ reqType,
+ })()
+
+export const editUserRequest = (
+ requestID: string,
+ title: string,
+ request: string
+) =>
+ runMutation<
+ UpdateRestUserRequestMutation,
+ UpdateRestUserRequestMutationVariables,
+ ""
+ >(UpdateRestUserRequestDocument, {
+ id: requestID,
+ request,
+ title,
+ })()
+
+export const editGQLUserRequest = (
+ requestID: string,
+ title: string,
+ request: string
+) =>
+ runMutation<
+ UpdateGqlUserRequestMutation,
+ UpdateGqlUserRequestMutationVariables,
+ ""
+ >(UpdateGqlUserRequestDocument, {
+ id: requestID,
+ request,
+ title,
+ })()
+
+export const deleteUserRequest = (requestID: string) =>
+ runMutation<
+ DeleteUserRequestMutation,
+ DeleteUserRequestMutationVariables,
+ ""
+ >(DeleteUserRequestDocument, {
+ requestID,
+ })()
+
+export const moveUserRequest = (
+ sourceCollectionID: string,
+ destinationCollectionID: string,
+ requestID: string,
+ nextRequestID?: string
+) =>
+ runMutation<MoveUserRequestMutation, MoveUserRequestMutationVariables, "">(
+ MoveUserRequestDocument,
+ {
+ sourceCollectionID,
+ destinationCollectionID,
+ requestID,
+ nextRequestID,
+ }
+ )()
+
+export const updateUserCollectionOrder = (
+ collectionID: string,
+ nextCollectionID?: string
+) =>
+ runMutation<
+ UpdateUserCollectionOrderMutation,
+ UpdateUserCollectionOrderMutationVariables,
+ ""
+ >(UpdateUserCollectionOrderDocument, {
+ collectionID,
+ nextCollectionID,
+ })()
+
+export const getUserRootCollections = () =>
+ runGQLQuery<
+ GetUserRootCollectionsQuery,
+ GetUserRootCollectionsQueryVariables,
+ ""
+ >({
+ query: GetUserRootCollectionsDocument,
+ variables: {},
+ })
+
+export const getGQLRootUserCollections = () =>
+ runGQLQuery<
+ GetGqlRootUserCollectionsQuery,
+ GetGqlRootUserCollectionsQueryVariables,
+ ""
+ >({
+ query: GetGqlRootUserCollectionsDocument,
+ variables: {},
+ })
+
+export const exportUserCollectionsToJSON = (
+ collectionID?: string,
+ collectionType: ReqType.Rest | ReqType.Gql = ReqType.Rest
+) =>
+ runGQLQuery<
+ ExportUserCollectionsToJsonQuery,
+ ExportUserCollectionsToJsonQueryVariables,
+ ""
+ >({
+ query: ExportUserCollectionsToJsonDocument,
+ variables: { collectionID, collectionType },
+ })
+
+export const runUserCollectionCreatedSubscription = () =>
+ runGQLSubscription({ query: UserCollectionCreatedDocument, variables: {} })
+
+export const runUserCollectionUpdatedSubscription = () =>
+ runGQLSubscription({ query: UserCollectionUpdatedDocument, variables: {} })
+
+export const runUserCollectionRemovedSubscription = () =>
+ runGQLSubscription({ query: UserCollectionRemovedDocument, variables: {} })
+
+export const runUserCollectionMovedSubscription = () =>
+ runGQLSubscription({ query: UserCollectionMovedDocument, variables: {} })
+
+export const runUserCollectionOrderUpdatedSubscription = () =>
+ runGQLSubscription({
+ query: UserCollectionOrderUpdatedDocument,
+ variables: {},
+ })
+
+export const runUserCollectionDuplicatedSubscription = () =>
+ runGQLSubscription({
+ query: UserCollectionDuplicatedDocument,
+ variables: {},
+ })
+
+export const runUserRequestCreatedSubscription = () =>
+ runGQLSubscription({ query: UserRequestCreatedDocument, variables: {} })
+
+export const runUserRequestUpdatedSubscription = () =>
+ runGQLSubscription({ query: UserRequestUpdatedDocument, variables: {} })
+
+export const runUserRequestMovedSubscription = () =>
+ runGQLSubscription({ query: UserRequestMovedDocument, variables: {} })
+
+export const runUserRequestDeletedSubscription = () =>
+ runGQLSubscription({ query: UserRequestDeletedDocument, variables: {} })
diff --git a/packages/hoppscotch-selfhost-web/src/platform/collections/web/gqlCollections.sync.ts b/packages/hoppscotch-selfhost-web/src/platform/collections/web/gqlCollections.sync.ts
new file mode 100644
index 000000000..229d2eee7
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/collections/web/gqlCollections.sync.ts
@@ -0,0 +1,331 @@
+import {
+ graphqlCollectionStore,
+ navigateToFolderWithIndexPath,
+ removeDuplicateGraphqlCollectionOrFolder,
+} from "@hoppscotch/common/newstore/collections"
+import {
+ getSettingSubject,
+ settingsStore,
+} from "@hoppscotch/common/newstore/settings"
+
+import { HoppCollection, HoppRESTRequest } from "@hoppscotch/data"
+
+import { getSyncInitFunction } from "@lib/sync"
+
+import { StoreSyncDefinitionOf } from "@lib/sync"
+import { createMapper } from "@lib/sync/mapper"
+import {
+ createGQLChildUserCollection,
+ createGQLRootUserCollection,
+ createGQLUserRequest,
+ deleteUserCollection,
+ deleteUserRequest,
+ duplicateUserCollection,
+ editGQLUserRequest,
+ updateUserCollection,
+} from "./api"
+
+import * as E from "fp-ts/Either"
+import { ReqType } from "@api/generated/graphql"
+import { moveOrReorderRequests } from "./sync"
+
+// gqlCollectionsMapper uses the collectionPath as the local identifier
+export const gqlCollectionsMapper = createMapper<string, string>()
+
+// gqlRequestsMapper uses the collectionPath/requestIndex as the local identifier
+export const gqlRequestsMapper = createMapper<string, string>()
+
+// temp implementation until the backend implements an endpoint that accepts an entire collection
+// TODO: use importCollectionsJSON to do this
+const recursivelySyncCollections = async (
+ collection: HoppCollection,
+ collectionPath: string,
+ parentUserCollectionID?: string
+) => {
+ let parentCollectionID = parentUserCollectionID
+
+ // if parentUserCollectionID does not exist, create the collection as a root collection
+ if (!parentUserCollectionID) {
+ const data = {
+ auth: collection.auth ?? {
+ authType: "inherit",
+ authActive: true,
+ },
+ headers: collection.headers ?? [],
+ }
+ const res = await createGQLRootUserCollection(
+ collection.name,
+ JSON.stringify(data)
+ )
+
+ if (E.isRight(res)) {
+ parentCollectionID = res.right.createGQLRootUserCollection.id
+
+ const returnedData = res.right.createGQLRootUserCollection.data
+ ? JSON.parse(res.right.createGQLRootUserCollection.data)
+ : {
+ auth: {
+ authType: "inherit",
+ authActive: true,
+ },
+ headers: [],
+ }
+
+ collection.id = parentCollectionID
+ collection.auth = returnedData.auth
+ collection.headers = returnedData.headers
+
+ removeDuplicateGraphqlCollectionOrFolder(
+ parentCollectionID,
+ collectionPath
+ )
+ } else {
+ parentCollectionID = undefined
+ }
+ } else {
+ // if parentUserCollectionID exists, create the collection as a child collection
+
+ const data = {
+ auth: collection.auth ?? {
+ authType: "inherit",
+ authActive: true,
+ },
+ headers: collection.headers ?? [],
+ }
+
+ const res = await createGQLChildUserCollection(
+ collection.name,
+ parentUserCollectionID,
+ JSON.stringify(data)
+ )
+
+ if (E.isRight(res)) {
+ const childCollectionId = res.right.createGQLChildUserCollection.id
+
+ const returnedData = res.right.createGQLChildUserCollection.data
+ ? JSON.parse(res.right.createGQLChildUserCollection.data)
+ : {
+ auth: {
+ authType: "inherit",
+ authActive: true,
+ },
+ headers: [],
+ }
+
+ collection.id = childCollectionId
+ collection.auth = returnedData.auth
+ collection.headers = returnedData.headers
+
+ removeDuplicateGraphqlCollectionOrFolder(
+ childCollectionId,
+ `${collectionPath}`
+ )
+ }
+ }
+
+ // create the requests
+ if (parentCollectionID) {
+ collection.requests.forEach(async (request) => {
+ const res =
+ parentCollectionID &&
+ (await createGQLUserRequest(
+ request.name,
+ JSON.stringify(request),
+ parentCollectionID
+ ))
+
+ if (res && E.isRight(res)) {
+ const requestId = res.right.createGQLUserRequest.id
+
+ request.id = requestId
+ }
+ })
+ }
+
+ // create the folders aka child collections
+ if (parentCollectionID)
+ collection.folders.forEach(async (folder, index) => {
+ recursivelySyncCollections(
+ folder,
+ `${collectionPath}/${index}`,
+ parentCollectionID
+ )
+ })
+}
+
+// TODO: generalize this
+// TODO: ask backend to send enough info on the subscription to not need this
+export const collectionReorderOrMovingOperations: {
+ sourceCollectionID: string
+ destinationCollectionID?: string
+ reorderOperation: {
+ fromPath: string
+ toPath?: string
+ }
+}[] = []
+
+type OperationStatus = "pending" | "completed"
+
+type OperationCollectionRemoved = {
+ type: "COLLECTION_REMOVED"
+ collectionBackendID: string
+ status: OperationStatus
+}
+
+export const gqlCollectionsOperations: Array<OperationCollectionRemoved> = []
+
+export const storeSyncDefinition: StoreSyncDefinitionOf<
+ typeof graphqlCollectionStore
+> = {
+ appendCollections({ entries }) {
+ let indexStart = graphqlCollectionStore.value.state.length - entries.length
+
+ entries.forEach((collection) => {
+ recursivelySyncCollections(collection, `${indexStart}`)
+ indexStart++
+ })
+ },
+ async addCollection({ collection }) {
+ const lastCreatedCollectionIndex =
+ graphqlCollectionStore.value.state.length - 1
+
+ await recursivelySyncCollections(
+ collection,
+ `${lastCreatedCollectionIndex}`
+ )
+ },
+ async removeCollection({ collectionID }) {
+ if (collectionID) {
+ await deleteUserCollection(collectionID)
+ }
+ },
+ editCollection({ collection, collectionIndex }) {
+ const collectionID = navigateToFolderWithIndexPath(
+ graphqlCollectionStore.value.state,
+ [collectionIndex]
+ )?.id
+
+ const data = {
+ auth: collection.auth,
+ headers: collection.headers,
+ }
+
+ if (collectionID) {
+ updateUserCollection(collectionID, collection.name, JSON.stringify(data))
+ }
+ },
+ async addFolder({ name, path }) {
+ const parentCollection = navigateToFolderWithIndexPath(
+ graphqlCollectionStore.value.state,
+ path.split("/").map((index) => parseInt(index))
+ )
+
+ const parentCollectionBackendID = parentCollection?.id
+
+ if (parentCollectionBackendID) {
+ const foldersLength = parentCollection.folders.length
+
+ const res = await createGQLChildUserCollection(
+ name,
+ parentCollectionBackendID
+ )
+
+ if (E.isRight(res)) {
+ const { id } = res.right.createGQLChildUserCollection
+
+ if (foldersLength) {
+ parentCollection.folders[foldersLength - 1].id = id
+ removeDuplicateGraphqlCollectionOrFolder(
+ id,
+ `${path}/${foldersLength - 1}`
+ )
+ }
+ }
+ }
+ },
+ editFolder({ folder, path }) {
+ const folderBackendId = navigateToFolderWithIndexPath(
+ graphqlCollectionStore.value.state,
+ path.split("/").map((index) => parseInt(index))
+ )?.id
+
+ const data = {
+ auth: folder.auth,
+ headers: folder.headers,
+ }
+
+ if (folderBackendId) {
+ updateUserCollection(folderBackendId, folder.name, JSON.stringify(data))
+ }
+ },
+ async removeFolder({ folderID }) {
+ if (folderID) {
+ await deleteUserCollection(folderID)
+ }
+ },
+ async duplicateCollection({ collectionSyncID }) {
+ if (collectionSyncID) {
+ await duplicateUserCollection(collectionSyncID, ReqType.Gql)
+ }
+ },
+ editRequest({ path, requestIndex, requestNew }) {
+ const request = navigateToFolderWithIndexPath(
+ graphqlCollectionStore.value.state,
+ path.split("/").map((index) => parseInt(index))
+ )?.requests[requestIndex]
+
+ const requestBackendID = request?.id
+
+ if (requestBackendID) {
+ editGQLUserRequest(
+ requestBackendID,
+ (requestNew as HoppRESTRequest).name,
+ JSON.stringify(requestNew)
+ )
+ }
+ },
+ async saveRequestAs({ path, request }) {
+ const folder = navigateToFolderWithIndexPath(
+ graphqlCollectionStore.value.state,
+ path.split("/").map((index) => parseInt(index))
+ )
+
+ const parentCollectionBackendID = folder?.id
+
+ if (parentCollectionBackendID) {
+ const newRequest = folder.requests[folder.requests.length - 1]
+
+ const res = await createGQLUserRequest(
+ (request as HoppRESTRequest).name,
+ JSON.stringify(request),
+ parentCollectionBackendID
+ )
+
+ if (E.isRight(res)) {
+ const { id } = res.right.createGQLUserRequest
+
+ newRequest.id = id
+ removeDuplicateGraphqlCollectionOrFolder(
+ id,
+ `${path}/${folder.requests.length - 1}`,
+ "request"
+ )
+ }
+ }
+ },
+ async removeRequest({ requestID }) {
+ if (requestID) {
+ await deleteUserRequest(requestID)
+ }
+ },
+ moveRequest({ destinationPath, path, requestIndex }) {
+ moveOrReorderRequests(requestIndex, path, destinationPath, undefined, "GQL")
+ },
+}
+
+export const gqlCollectionsSyncer = getSyncInitFunction(
+ graphqlCollectionStore,
+ storeSyncDefinition,
+ () => settingsStore.value.syncCollections,
+ getSettingSubject("syncCollections")
+)
diff --git a/packages/hoppscotch-selfhost-web/src/platform/collections/collections.platform.ts b/packages/hoppscotch-selfhost-web/src/platform/collections/web/index.ts
similarity index 99%
rename from packages/hoppscotch-selfhost-web/src/platform/collections/collections.platform.ts
rename to packages/hoppscotch-selfhost-web/src/platform/collections/web/index.ts
index c3e94d832..4c6f8c339 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/collections/collections.platform.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/collections/web/index.ts
@@ -1,6 +1,6 @@
import { CollectionsPlatformDef } from "@hoppscotch/common/platform/collections"
-import { authEvents$, def as platformAuth } from "@platform/auth/auth.platform"
-import { runDispatchWithOutSyncing } from "../../lib/sync"
+import { authEvents$, def as platformAuth } from "@platform/auth/web"
+import { runDispatchWithOutSyncing } from "@lib/sync"
import {
exportUserCollectionsToJSON,
@@ -14,8 +14,8 @@ import {
runUserRequestDeletedSubscription,
runUserRequestMovedSubscription,
runUserRequestUpdatedSubscription,
-} from "./collections.api"
-import { collectionsSyncer, getStoreByCollectionType } from "./collections.sync"
+} from "./api"
+import { collectionsSyncer, getStoreByCollectionType } from "./sync"
import { runGQLSubscription } from "@hoppscotch/common/helpers/backend/GQLClient"
import {
@@ -61,7 +61,7 @@ import {
ReqType,
UserCollectionDuplicatedData,
UserRequest,
-} from "../../api/generated/graphql"
+} from "@api/generated/graphql"
import { gqlCollectionsSyncer } from "./gqlCollections.sync"
function initCollectionsSync() {
diff --git a/packages/hoppscotch-selfhost-web/src/platform/collections/web/sync.ts b/packages/hoppscotch-selfhost-web/src/platform/collections/web/sync.ts
new file mode 100644
index 000000000..60c1227d0
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/collections/web/sync.ts
@@ -0,0 +1,608 @@
+import {
+ graphqlCollectionStore,
+ navigateToFolderWithIndexPath,
+ removeDuplicateRESTCollectionOrFolder,
+ restCollectionStore,
+} from "@hoppscotch/common/newstore/collections"
+import {
+ getSettingSubject,
+ settingsStore,
+} from "@hoppscotch/common/newstore/settings"
+
+import {
+ generateUniqueRefId,
+ HoppCollection,
+ HoppRESTRequest,
+} from "@hoppscotch/data"
+
+import { getSyncInitFunction, StoreSyncDefinitionOf } from "@lib/sync"
+import { createMapper } from "@lib/sync/mapper"
+import {
+ createRESTChildUserCollection,
+ createRESTRootUserCollection,
+ createRESTUserRequest,
+ deleteUserCollection,
+ deleteUserRequest,
+ duplicateUserCollection,
+ editUserRequest,
+ moveUserCollection,
+ moveUserRequest,
+ updateUserCollection,
+ updateUserCollectionOrder,
+} from "./api"
+
+import * as E from "fp-ts/Either"
+import { ReqType } from "@api/generated/graphql"
+
+// restCollectionsMapper uses the collectionPath as the local identifier
+export const restCollectionsMapper = createMapper<string, string>()
+
+// restRequestsMapper uses the collectionPath/requestIndex as the local identifier
+export const restRequestsMapper = createMapper<string, string>()
+
+// temp implementation until the backend implements an endpoint that accepts an entire collection
+// TODO: use importCollectionsJSON to do this
+const recursivelySyncCollections = async (
+ collection: HoppCollection,
+ collectionPath: string,
+ parentUserCollectionID?: string
+) => {
+ let parentCollectionID = parentUserCollectionID
+
+ // if parentUserCollectionID does not exist, create the collection as a root collection
+ if (!parentUserCollectionID) {
+ const data = {
+ auth: collection.auth ?? {
+ authType: "inherit",
+ authActive: true,
+ },
+ headers: collection.headers ?? [],
+ _ref_id: collection._ref_id,
+ }
+ const res = await createRESTRootUserCollection(
+ collection.name,
+ JSON.stringify(data)
+ )
+ if (E.isRight(res)) {
+ parentCollectionID = res.right.createRESTRootUserCollection.id
+
+ const returnedData = res.right.createRESTRootUserCollection.data
+ ? JSON.parse(res.right.createRESTRootUserCollection.data)
+ : {
+ auth: {
+ authType: "inherit",
+ authActive: true,
+ },
+ headers: [],
+ _ref_id: generateUniqueRefId("coll"),
+ }
+
+ collection.id = parentCollectionID
+ collection._ref_id = returnedData._ref_id ?? generateUniqueRefId("coll")
+ collection.auth = returnedData.auth
+ collection.headers = returnedData.headers
+ removeDuplicateRESTCollectionOrFolder(parentCollectionID, collectionPath)
+ } else {
+ parentCollectionID = undefined
+ }
+ } else {
+ // if parentUserCollectionID exists, create the collection as a child collection
+ const data = {
+ auth: collection.auth ?? {
+ authType: "inherit",
+ authActive: true,
+ },
+ headers: collection.headers ?? [],
+ _ref_id: collection._ref_id,
+ }
+
+ const res = await createRESTChildUserCollection(
+ collection.name,
+ parentUserCollectionID,
+ JSON.stringify(data)
+ )
+
+ if (E.isRight(res)) {
+ const childCollectionId = res.right.createRESTChildUserCollection.id
+
+ const returnedData = res.right.createRESTChildUserCollection.data
+ ? JSON.parse(res.right.createRESTChildUserCollection.data)
+ : {
+ auth: {
+ authType: "inherit",
+ authActive: true,
+ },
+ headers: [],
+ _ref_id: generateUniqueRefId("coll"),
+ }
+
+ collection.id = childCollectionId
+ collection._ref_id = returnedData._ref_id ?? generateUniqueRefId("coll")
+ collection.auth = returnedData.auth
+ collection.headers = returnedData.headers
+
+ removeDuplicateRESTCollectionOrFolder(
+ childCollectionId,
+ `${collectionPath}`
+ )
+ }
+ }
+
+ // create the requests
+ if (parentCollectionID) {
+ collection.requests.forEach(async (request) => {
+ const res =
+ parentCollectionID &&
+ (await createRESTUserRequest(
+ request.name,
+ JSON.stringify(request),
+ parentCollectionID
+ ))
+
+ if (res && E.isRight(res)) {
+ const requestId = res.right.createRESTUserRequest.id
+
+ request.id = requestId
+ }
+ })
+ }
+
+ // create the folders aka child collections
+ if (parentCollectionID)
+ collection.folders.forEach(async (folder, index) => {
+ recursivelySyncCollections(
+ folder,
+ `${collectionPath}/${index}`,
+ parentCollectionID
+ )
+ })
+}
+
+// TODO: generalize this
+// TODO: ask backend to send enough info on the subscription to not need this
+export const collectionReorderOrMovingOperations: {
+ sourceCollectionID: string
+ destinationCollectionID?: string
+ reorderOperation: {
+ fromPath: string
+ toPath?: string
+ }
+}[] = []
+
+type OperationStatus = "pending" | "completed"
+
+type OperationCollectionRemoved = {
+ type: "COLLECTION_REMOVED"
+ collectionBackendID: string
+ status: OperationStatus
+}
+
+export const restCollectionsOperations: Array<OperationCollectionRemoved> = []
+
+export const storeSyncDefinition: StoreSyncDefinitionOf<
+ typeof restCollectionStore
+> = {
+ appendCollections({ entries }) {
+ let indexStart = restCollectionStore.value.state.length - entries.length
+
+ entries.forEach((collection) => {
+ recursivelySyncCollections(collection, `${indexStart}`)
+ indexStart++
+ })
+ },
+ async addCollection({ collection }) {
+ const lastCreatedCollectionIndex =
+ restCollectionStore.value.state.length - 1
+
+ recursivelySyncCollections(collection, `${lastCreatedCollectionIndex}`)
+ },
+ async removeCollection({ collectionID }) {
+ if (collectionID) {
+ await deleteUserCollection(collectionID)
+ }
+ },
+ editCollection({ partialCollection: collection, collectionIndex }) {
+ const collectionID = navigateToFolderWithIndexPath(
+ restCollectionStore.value.state,
+ [collectionIndex]
+ )?.id
+
+ const data = {
+ auth: collection.auth,
+ headers: collection.headers,
+ }
+
+ if (collectionID) {
+ updateUserCollection(collectionID, collection.name, JSON.stringify(data))
+ }
+ },
+ async addFolder({ name, path }) {
+ const parentCollection = navigateToFolderWithIndexPath(
+ restCollectionStore.value.state,
+ path.split("/").map((index) => parseInt(index))
+ )
+
+ const parentCollectionBackendID = parentCollection?.id
+
+ if (parentCollectionBackendID) {
+ const foldersLength = parentCollection.folders.length
+
+ const res = await createRESTChildUserCollection(
+ name,
+ parentCollectionBackendID
+ )
+
+ if (E.isRight(res)) {
+ const { id } = res.right.createRESTChildUserCollection
+
+ if (foldersLength) {
+ parentCollection.folders[foldersLength - 1].id = id
+ removeDuplicateRESTCollectionOrFolder(
+ id,
+ `${path}/${foldersLength - 1}`
+ )
+ }
+ }
+ }
+ },
+ editFolder({ folder, path }) {
+ const folderID = navigateToFolderWithIndexPath(
+ restCollectionStore.value.state,
+ path.split("/").map((index) => parseInt(index))
+ )?.id
+
+ const folderName = folder.name
+ const data = {
+ auth: folder.auth,
+ headers: folder.headers,
+ }
+ if (folderID) {
+ updateUserCollection(folderID, folderName, JSON.stringify(data))
+ }
+ },
+ async removeFolder({ folderID }) {
+ if (folderID) {
+ await deleteUserCollection(folderID)
+ }
+ },
+ async moveFolder({ destinationPath, path }) {
+ const { newSourcePath, newDestinationPath } = getPathsAfterMoving(
+ path,
+ destinationPath ?? undefined
+ )
+
+ if (newSourcePath) {
+ const sourceCollectionID = navigateToFolderWithIndexPath(
+ restCollectionStore.value.state,
+ newSourcePath.split("/").map((index) => parseInt(index))
+ )?.id
+
+ const destinationCollectionID = destinationPath
+ ? newDestinationPath &&
+ navigateToFolderWithIndexPath(
+ restCollectionStore.value.state,
+ newDestinationPath.split("/").map((index) => parseInt(index))
+ )?.id
+ : undefined
+
+ if (sourceCollectionID) {
+ await moveUserCollection(sourceCollectionID, destinationCollectionID)
+ }
+ }
+ },
+ async duplicateCollection({ collectionSyncID }) {
+ if (collectionSyncID) {
+ await duplicateUserCollection(collectionSyncID, ReqType.Rest)
+ }
+ },
+ editRequest({ path, requestIndex, requestNew }) {
+ const request = navigateToFolderWithIndexPath(
+ restCollectionStore.value.state,
+ path.split("/").map((index) => parseInt(index))
+ )?.requests[requestIndex]
+
+ const requestBackendID = request?.id
+
+ if (requestBackendID) {
+ editUserRequest(
+ requestBackendID,
+ (requestNew as HoppRESTRequest).name,
+ JSON.stringify(requestNew)
+ )
+ }
+ },
+ async saveRequestAs({ path, request }) {
+ const folder = navigateToFolderWithIndexPath(
+ restCollectionStore.value.state,
+ path.split("/").map((index) => parseInt(index))
+ )
+
+ const parentCollectionBackendID = folder?.id
+
+ if (parentCollectionBackendID) {
+ const newRequest = folder.requests[folder.requests.length - 1]
+
+ const res = await createRESTUserRequest(
+ (request as HoppRESTRequest).name,
+ JSON.stringify(request),
+ parentCollectionBackendID
+ )
+
+ if (E.isRight(res)) {
+ const { id } = res.right.createRESTUserRequest
+
+ newRequest.id = id
+ removeDuplicateRESTCollectionOrFolder(
+ id,
+ `${path}/${folder.requests.length - 1}`,
+ "request"
+ )
+ }
+ }
+ },
+ async removeRequest({ requestID }) {
+ if (requestID) {
+ await deleteUserRequest(requestID)
+ }
+ },
+ moveRequest({ destinationPath, path, requestIndex }) {
+ moveOrReorderRequests(requestIndex, path, destinationPath)
+ },
+ updateRequestOrder({
+ destinationCollectionPath,
+ destinationRequestIndex,
+ requestIndex,
+ }) {
+ /**
+ * currently the FE implementation only supports reordering requests between the same collection,
+ * so destinationCollectionPath and sourceCollectionPath will be same
+ */
+ moveOrReorderRequests(
+ requestIndex,
+ destinationCollectionPath,
+ destinationCollectionPath,
+ destinationRequestIndex ?? undefined
+ )
+ },
+ async updateCollectionOrder({
+ collectionIndex: collectionPath,
+ destinationCollectionIndex: destinationCollectionPath,
+ }) {
+ const collections = restCollectionStore.value.state
+
+ const sourcePathIndexes = getParentPathIndexesFromPath(collectionPath)
+ const sourceCollectionIndex = getCollectionIndexFromPath(collectionPath)
+
+ const destinationCollectionIndex = !!destinationCollectionPath
+ ? getCollectionIndexFromPath(destinationCollectionPath)
+ : undefined
+
+ let updatedCollectionIndexs:
+ | [newSourceIndex: number, newDestinationIndex: number | undefined]
+ | undefined
+
+ if (
+ (sourceCollectionIndex || sourceCollectionIndex == 0) &&
+ (destinationCollectionIndex || destinationCollectionIndex == 0)
+ ) {
+ updatedCollectionIndexs = getIndexesAfterReorder(
+ sourceCollectionIndex,
+ destinationCollectionIndex
+ )
+ } else if (sourceCollectionIndex || sourceCollectionIndex == 0) {
+ if (sourcePathIndexes.length == 0) {
+ // we're reordering root collections
+ updatedCollectionIndexs = [collections.length - 1, undefined]
+ } else {
+ const sourceCollection = navigateToFolderWithIndexPath(collections, [
+ ...sourcePathIndexes,
+ ])
+
+ if (sourceCollection && sourceCollection.folders.length > 0) {
+ updatedCollectionIndexs = [
+ sourceCollection.folders.length - 1,
+ undefined,
+ ]
+ }
+ }
+ }
+
+ const sourceCollectionID =
+ updatedCollectionIndexs &&
+ navigateToFolderWithIndexPath(collections, [
+ ...sourcePathIndexes,
+ updatedCollectionIndexs[0],
+ ])?.id
+
+ const destinationCollectionID =
+ updatedCollectionIndexs &&
+ (updatedCollectionIndexs[1] || updatedCollectionIndexs[1] == 0)
+ ? navigateToFolderWithIndexPath(collections, [
+ ...sourcePathIndexes,
+ updatedCollectionIndexs[1],
+ ])?.id
+ : undefined
+
+ if (sourceCollectionID) {
+ await updateUserCollectionOrder(
+ sourceCollectionID,
+ destinationCollectionID
+ )
+ }
+ },
+}
+
+export const collectionsSyncer = getSyncInitFunction(
+ restCollectionStore,
+ storeSyncDefinition,
+ () => settingsStore.value.syncCollections,
+ getSettingSubject("syncCollections")
+)
+
+export async function moveOrReorderRequests(
+ requestIndex: number,
+ path: string,
+ destinationPath: string,
+ nextRequestIndex?: number,
+ requestType: "REST" | "GQL" = "REST"
+) {
+ const { collectionStore } = getStoreByCollectionType(requestType)
+
+ const sourceCollectionBackendID = navigateToFolderWithIndexPath(
+ collectionStore.value.state,
+ path.split("/").map((index) => parseInt(index))
+ )?.id
+
+ const destinationCollection = navigateToFolderWithIndexPath(
+ collectionStore.value.state,
+ destinationPath.split("/").map((index) => parseInt(index))
+ )
+
+ const destinationCollectionBackendID = destinationCollection?.id
+
+ let requestBackendID: string | undefined
+
+ let nextRequestBackendID: string | undefined
+
+ // we only need this for reordering requests, not for moving requests
+ if (nextRequestIndex) {
+ // reordering
+ const [newRequestIndex, newDestinationIndex] = getIndexesAfterReorder(
+ requestIndex,
+ nextRequestIndex
+ )
+
+ requestBackendID =
+ destinationCollection?.requests[newRequestIndex]?.id ?? undefined
+
+ nextRequestBackendID =
+ destinationCollection?.requests[newDestinationIndex]?.id ?? undefined
+ } else {
+ // moving
+ const requests = destinationCollection?.requests
+ requestBackendID =
+ requests && requests.length > 0
+ ? requests[requests.length - 1]?.id
+ : undefined
+ }
+
+ if (
+ sourceCollectionBackendID &&
+ destinationCollectionBackendID &&
+ requestBackendID
+ ) {
+ await moveUserRequest(
+ sourceCollectionBackendID,
+ destinationCollectionBackendID,
+ requestBackendID,
+ nextRequestBackendID
+ )
+ }
+}
+
+function getParentPathIndexesFromPath(path: string) {
+ const indexes = path.split("/")
+ indexes.pop()
+ return indexes.map((index) => parseInt(index))
+}
+
+export function getCollectionIndexFromPath(collectionPath: string) {
+ const sourceCollectionIndexString = collectionPath.split("/").pop()
+ const sourceCollectionIndex = sourceCollectionIndexString
+ ? parseInt(sourceCollectionIndexString)
+ : undefined
+
+ return sourceCollectionIndex
+}
+
+/**
+ * the sync function is called after the reordering has happened on the store
+ * because of this we need to find the new source and destination indexes after the reordering
+ */
+function getIndexesAfterReorder(
+ oldSourceIndex: number,
+ oldDestinationIndex: number
+): [newSourceIndex: number, newDestinationIndex: number] {
+ // Source Becomes Destination -1
+ // Destination Remains Same
+ if (oldSourceIndex < oldDestinationIndex) {
+ return [oldDestinationIndex - 1, oldDestinationIndex]
+ }
+
+ // Source Becomes The Destination
+ // Destintion Becomes Source + 1
+ if (oldSourceIndex > oldDestinationIndex) {
+ return [oldDestinationIndex, oldDestinationIndex + 1]
+ }
+
+ throw new Error("Source and Destination are the same")
+}
+
+/**
+ * the sync function is called after moving a folder has happened on the store,
+ * because of this the source index given to the sync function is not the live one
+ * we need to find the new source index after the moving
+ */
+function getPathsAfterMoving(sourcePath: string, destinationPath?: string) {
+ if (!destinationPath) {
+ return {
+ newSourcePath: `${restCollectionStore.value.state.length - 1}`,
+ newDestinationPath: destinationPath,
+ }
+ }
+
+ const sourceParentPath = getParentPathFromPath(sourcePath)
+ const destinationParentPath = getParentPathFromPath(destinationPath)
+
+ const isSameParentPath = sourceParentPath === destinationParentPath
+
+ let newDestinationPath: string
+
+ if (isSameParentPath) {
+ const sourceIndex = getCollectionIndexFromPath(sourcePath)
+ const destinationIndex = getCollectionIndexFromPath(destinationPath)
+
+ if (
+ (sourceIndex || sourceIndex == 0) &&
+ (destinationIndex || destinationIndex == 0) &&
+ sourceIndex < destinationIndex
+ ) {
+ newDestinationPath = destinationParentPath
+ ? `${destinationParentPath}/${destinationIndex - 1}`
+ : `${destinationIndex - 1}`
+ } else {
+ newDestinationPath = destinationPath
+ }
+ } else {
+ newDestinationPath = destinationPath
+ }
+
+ const destinationFolder = navigateToFolderWithIndexPath(
+ restCollectionStore.value.state,
+ newDestinationPath.split("/").map((index) => parseInt(index))
+ )
+
+ const newSourcePath = destinationFolder
+ ? `${newDestinationPath}/${destinationFolder?.folders.length - 1}`
+ : undefined
+
+ return {
+ newSourcePath,
+ newDestinationPath,
+ }
+}
+
+function getParentPathFromPath(path: string | undefined) {
+ const indexes = path ? path.split("/") : []
+ indexes.pop()
+
+ return indexes.join("/")
+}
+
+export function getStoreByCollectionType(type: "GQL" | "REST") {
+ const isGQL = type == "GQL"
+
+ const collectionStore = isGQL ? graphqlCollectionStore : restCollectionStore
+
+ return { collectionStore }
+}
diff --git a/packages/hoppscotch-selfhost-web/src/platform/environments/environments.api.ts b/packages/hoppscotch-selfhost-web/src/platform/environments/desktop/api.ts
similarity index 98%
rename from packages/hoppscotch-selfhost-web/src/platform/environments/environments.api.ts
rename to packages/hoppscotch-selfhost-web/src/platform/environments/desktop/api.ts
index a6ed2530f..db056265a 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/environments/environments.api.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/environments/desktop/api.ts
@@ -27,7 +27,7 @@ import {
UserEnvironmentCreatedDocument,
UserEnvironmentUpdatedDocument,
UserEnvironmentDeletedDocument,
-} from "./../../api/generated/graphql"
+} from "@api/generated/graphql"
import { Environment } from "@hoppscotch/data"
diff --git a/packages/hoppscotch-selfhost-web/src/platform/environments/environments.platform.ts b/packages/hoppscotch-selfhost-web/src/platform/environments/desktop/index.ts
similarity index 97%
rename from packages/hoppscotch-selfhost-web/src/platform/environments/environments.platform.ts
rename to packages/hoppscotch-selfhost-web/src/platform/environments/desktop/index.ts
index 75ba0e59a..ccbe50931 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/environments/environments.platform.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/environments/desktop/index.ts
@@ -1,4 +1,4 @@
-import * as E from "fp-ts/Either"
+import { authEvents$, def as platformAuth } from "@platform/auth/desktop"
import { entityReference } from "verzod"
import {
@@ -11,13 +11,13 @@ import {
setGlobalEnvVariables,
updateEnvironment,
} from "@hoppscotch/common/newstore/environments"
-import { authEvents$, def as platformAuth } from "@platform/auth/auth.platform"
-import { runGQLSubscription } from "@hoppscotch/common/helpers/backend/GQLClient"
import { EnvironmentsPlatformDef } from "@hoppscotch/common/src/platform/environments"
+import { runGQLSubscription } from "@hoppscotch/common/helpers/backend/GQLClient"
-import { environnmentsSyncer } from "@platform/environments/environments.sync"
+import { environnmentsSyncer } from "@platform/environments/desktop/sync"
+import * as E from "fp-ts/Either"
import { GlobalEnvironment } from "@hoppscotch/data"
import { runDispatchWithOutSyncing } from "@lib/sync"
import {
@@ -27,7 +27,7 @@ import {
runUserEnvironmentCreatedSubscription,
runUserEnvironmentDeletedSubscription,
runUserEnvironmentUpdatedSubscription,
-} from "@platform/environments/environments.api"
+} from "./api"
export function initEnvironmentsSync() {
const currentUser$ = platformAuth.getCurrentUserStream()
diff --git a/packages/hoppscotch-selfhost-web/src/platform/environments/environments.sync.ts b/packages/hoppscotch-selfhost-web/src/platform/environments/desktop/sync.ts
similarity index 94%
rename from packages/hoppscotch-selfhost-web/src/platform/environments/environments.sync.ts
rename to packages/hoppscotch-selfhost-web/src/platform/environments/desktop/sync.ts
index 193aa3282..b122daa32 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/environments/environments.sync.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/environments/desktop/sync.ts
@@ -8,18 +8,18 @@ import {
settingsStore,
} from "@hoppscotch/common/newstore/settings"
-import { getSyncInitFunction } from "../../lib/sync"
+import { getSyncInitFunction } from "@lib/sync"
import * as E from "fp-ts/Either"
-import { StoreSyncDefinitionOf } from "../../lib/sync"
-import { createMapper } from "../../lib/sync/mapper"
+import { StoreSyncDefinitionOf } from "@lib/sync"
+import { createMapper } from "@lib/sync/mapper"
import {
clearGlobalEnvironmentVariables,
createUserEnvironment,
deleteUserEnvironment,
updateUserEnvironment,
-} from "./environments.api"
+} from "./api"
import { SecretEnvironmentService } from "@hoppscotch/common/services/secret-environment.service"
import { getService } from "@hoppscotch/common/modules/dioc"
diff --git a/packages/hoppscotch-selfhost-web/src/platform/environments/web/api.ts b/packages/hoppscotch-selfhost-web/src/platform/environments/web/api.ts
new file mode 100644
index 000000000..db056265a
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/environments/web/api.ts
@@ -0,0 +1,117 @@
+import {
+ runMutation,
+ runGQLQuery,
+ runGQLSubscription,
+} from "@hoppscotch/common/helpers/backend/GQLClient"
+
+import {
+ CreateUserEnvironmentDocument,
+ CreateUserEnvironmentMutation,
+ CreateUserEnvironmentMutationVariables,
+ UpdateUserEnvironmentMutation,
+ UpdateUserEnvironmentMutationVariables,
+ UpdateUserEnvironmentDocument,
+ DeleteUserEnvironmentMutation,
+ DeleteUserEnvironmentMutationVariables,
+ DeleteUserEnvironmentDocument,
+ ClearGlobalEnvironmentsMutation,
+ ClearGlobalEnvironmentsMutationVariables,
+ ClearGlobalEnvironmentsDocument,
+ CreateUserGlobalEnvironmentMutation,
+ CreateUserGlobalEnvironmentMutationVariables,
+ CreateUserGlobalEnvironmentDocument,
+ GetGlobalEnvironmentsDocument,
+ GetGlobalEnvironmentsQueryVariables,
+ GetGlobalEnvironmentsQuery,
+ GetUserEnvironmentsDocument,
+ UserEnvironmentCreatedDocument,
+ UserEnvironmentUpdatedDocument,
+ UserEnvironmentDeletedDocument,
+} from "@api/generated/graphql"
+
+import { Environment } from "@hoppscotch/data"
+
+export const createUserEnvironment = (name: string, variables: string) =>
+ runMutation<
+ CreateUserEnvironmentMutation,
+ CreateUserEnvironmentMutationVariables,
+ ""
+ >(CreateUserEnvironmentDocument, {
+ name,
+ variables,
+ })()
+
+export const updateUserEnvironment = (
+ id: string,
+ { name, variables }: Environment
+) =>
+ runMutation<
+ UpdateUserEnvironmentMutation,
+ UpdateUserEnvironmentMutationVariables,
+ ""
+ >(UpdateUserEnvironmentDocument, {
+ id,
+ name,
+ variables: JSON.stringify(variables),
+ })
+
+export const deleteUserEnvironment = (id: string) =>
+ runMutation<
+ DeleteUserEnvironmentMutation,
+ DeleteUserEnvironmentMutationVariables,
+ ""
+ >(DeleteUserEnvironmentDocument, {
+ id,
+ })
+
+export const clearGlobalEnvironmentVariables = (id: string) =>
+ runMutation<
+ ClearGlobalEnvironmentsMutation,
+ ClearGlobalEnvironmentsMutationVariables,
+ ""
+ >(ClearGlobalEnvironmentsDocument, {
+ id,
+ })()
+
+export const getUserEnvironments = () =>
+ runGQLQuery({
+ query: GetUserEnvironmentsDocument,
+ variables: {},
+ })
+
+export const getGlobalEnvironments = () =>
+ runGQLQuery<
+ GetGlobalEnvironmentsQuery,
+ GetGlobalEnvironmentsQueryVariables,
+ "user_environment/user_env_does_not_exists"
+ >({
+ query: GetGlobalEnvironmentsDocument,
+ variables: {},
+ })
+
+export const createUserGlobalEnvironment = (variables: string) =>
+ runMutation<
+ CreateUserGlobalEnvironmentMutation,
+ CreateUserGlobalEnvironmentMutationVariables,
+ ""
+ >(CreateUserGlobalEnvironmentDocument, {
+ variables,
+ })()
+
+export const runUserEnvironmentCreatedSubscription = () =>
+ runGQLSubscription({
+ query: UserEnvironmentCreatedDocument,
+ variables: {},
+ })
+
+export const runUserEnvironmentUpdatedSubscription = () =>
+ runGQLSubscription({
+ query: UserEnvironmentUpdatedDocument,
+ variables: {},
+ })
+
+export const runUserEnvironmentDeletedSubscription = () =>
+ runGQLSubscription({
+ query: UserEnvironmentDeletedDocument,
+ variables: {},
+ })
diff --git a/packages/hoppscotch-selfhost-web/src/platform/environments/web/index.ts b/packages/hoppscotch-selfhost-web/src/platform/environments/web/index.ts
new file mode 100644
index 000000000..b3ab11f2a
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/environments/web/index.ts
@@ -0,0 +1,213 @@
+import * as E from "fp-ts/Either"
+import { entityReference } from "verzod"
+
+import {
+ createEnvironment,
+ deleteEnvironment,
+ environmentsStore,
+ getLocalIndexByEnvironmentID,
+ replaceEnvironments,
+ setGlobalEnvID,
+ setGlobalEnvVariables,
+ updateEnvironment,
+} from "@hoppscotch/common/newstore/environments"
+import { authEvents$, def as platformAuth } from "@platform/auth/web"
+
+import { runGQLSubscription } from "@hoppscotch/common/helpers/backend/GQLClient"
+import { EnvironmentsPlatformDef } from "@hoppscotch/common/src/platform/environments"
+
+import { environnmentsSyncer } from "@platform/environments/web/sync"
+
+import { GlobalEnvironment } from "@hoppscotch/data"
+import { runDispatchWithOutSyncing } from "@lib/sync"
+import {
+ createUserGlobalEnvironment,
+ getGlobalEnvironments,
+ getUserEnvironments,
+ runUserEnvironmentCreatedSubscription,
+ runUserEnvironmentDeletedSubscription,
+ runUserEnvironmentUpdatedSubscription,
+} from "./api"
+
+export function initEnvironmentsSync() {
+ const currentUser$ = platformAuth.getCurrentUserStream()
+
+ environnmentsSyncer.startStoreSync()
+ environnmentsSyncer.setupSubscriptions(setupSubscriptions)
+
+ currentUser$.subscribe(async (user) => {
+ if (user) {
+ await loadAllEnvironments()
+ }
+ })
+
+ authEvents$.subscribe((event) => {
+ if (event.event == "login" || event.event == "token_refresh") {
+ environnmentsSyncer.startListeningToSubscriptions()
+ }
+
+ if (event.event == "logout") {
+ environnmentsSyncer.stopListeningToSubscriptions()
+ }
+ })
+}
+
+export const def: EnvironmentsPlatformDef = {
+ initEnvironmentsSync,
+}
+
+function setupSubscriptions() {
+ let subs: ReturnType<typeof runGQLSubscription>[1][] = []
+
+ const userEnvironmentCreatedSub = setupUserEnvironmentCreatedSubscription()
+ const userEnvironmentUpdatedSub = setupUserEnvironmentUpdatedSubscription()
+ const userEnvironmentDeletedSub = setupUserEnvironmentDeletedSubscription()
+
+ subs = [
+ userEnvironmentCreatedSub,
+ userEnvironmentUpdatedSub,
+ userEnvironmentDeletedSub,
+ ]
+
+ return () => {
+ subs.forEach((sub) => sub.unsubscribe())
+ }
+}
+
+async function loadUserEnvironments() {
+ const res = await getUserEnvironments()
+
+ if (E.isRight(res)) {
+ const environments = res.right.me.environments
+
+ if (environments.length > 0) {
+ runDispatchWithOutSyncing(() => {
+ replaceEnvironments(
+ environments.map(({ id, variables, name }) => ({
+ v: 1,
+ id,
+ name,
+ variables: JSON.parse(variables),
+ }))
+ )
+ })
+ }
+ }
+}
+
+async function loadGlobalEnvironments() {
+ const res = await getGlobalEnvironments()
+
+ if (E.isRight(res)) {
+ const globalEnv = res.right.me.globalEnvironments
+
+ if (globalEnv) {
+ const globalEnvVariableEntries = JSON.parse(globalEnv.variables)
+
+ const result = entityReference(GlobalEnvironment).safeParse(
+ globalEnvVariableEntries
+ )
+
+ runDispatchWithOutSyncing(() => {
+ setGlobalEnvVariables(
+ result.success ? result.data : globalEnvVariableEntries
+ )
+ setGlobalEnvID(globalEnv.id)
+ })
+ }
+ } else if (res.left.error == "user_environment/user_env_does_not_exists") {
+ const res = await createUserGlobalEnvironment(JSON.stringify([]))
+
+ if (E.isRight(res)) {
+ const backendId = res.right.createUserGlobalEnvironment.id
+ setGlobalEnvID(backendId)
+ }
+ }
+}
+
+async function loadAllEnvironments() {
+ await loadUserEnvironments()
+ await loadGlobalEnvironments()
+}
+
+function setupUserEnvironmentCreatedSubscription() {
+ const [userEnvironmentCreated$, userEnvironmentCreatedSub] =
+ runUserEnvironmentCreatedSubscription()
+
+ userEnvironmentCreated$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const { name, variables, id } = res.right.userEnvironmentCreated
+
+ const isAlreadyExisting = environmentsStore.value.environments.some(
+ (env) => env.id == id
+ )
+
+ if (name && !isAlreadyExisting) {
+ runDispatchWithOutSyncing(() => {
+ createEnvironment(name, JSON.parse(variables), id)
+ })
+ }
+ }
+ })
+
+ return userEnvironmentCreatedSub
+}
+
+function setupUserEnvironmentUpdatedSubscription() {
+ const [userEnvironmentUpdated$, userEnvironmentUpdatedSub] =
+ runUserEnvironmentUpdatedSubscription()
+
+ userEnvironmentUpdated$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const { name, variables, id, isGlobal } = res.right.userEnvironmentUpdated
+
+ // handle the case for global environments
+ if (isGlobal) {
+ runDispatchWithOutSyncing(() => {
+ setGlobalEnvVariables(JSON.parse(variables))
+ })
+ } else {
+ // handle the case for normal environments
+
+ const localIndex = environmentsStore.value.environments.findIndex(
+ (env) => env.id == id
+ )
+
+ if ((localIndex || localIndex == 0) && name) {
+ runDispatchWithOutSyncing(() => {
+ updateEnvironment(localIndex, {
+ v: 1,
+ id,
+ name,
+ variables: JSON.parse(variables),
+ })
+ })
+ }
+ }
+ }
+ })
+
+ return userEnvironmentUpdatedSub
+}
+
+function setupUserEnvironmentDeletedSubscription() {
+ const [userEnvironmentDeleted$, userEnvironmentDeletedSub] =
+ runUserEnvironmentDeletedSubscription()
+
+ userEnvironmentDeleted$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const { id } = res.right.userEnvironmentDeleted
+
+ // TODO: move getLocalIndexByID to a getter in the environmentsStore
+ const localIndex = getLocalIndexByEnvironmentID(id)
+
+ if (localIndex || localIndex === 0) {
+ runDispatchWithOutSyncing(() => {
+ deleteEnvironment(localIndex)
+ })
+ }
+ }
+ })
+
+ return userEnvironmentDeletedSub
+}
diff --git a/packages/hoppscotch-selfhost-web/src/platform/environments/web/sync.ts b/packages/hoppscotch-selfhost-web/src/platform/environments/web/sync.ts
new file mode 100644
index 000000000..b122daa32
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/environments/web/sync.ts
@@ -0,0 +1,131 @@
+import {
+ environmentsStore,
+ getGlobalVariableID,
+ removeDuplicateEntry,
+} from "@hoppscotch/common/newstore/environments"
+import {
+ getSettingSubject,
+ settingsStore,
+} from "@hoppscotch/common/newstore/settings"
+
+import { getSyncInitFunction } from "@lib/sync"
+
+import * as E from "fp-ts/Either"
+
+import { StoreSyncDefinitionOf } from "@lib/sync"
+import { createMapper } from "@lib/sync/mapper"
+import {
+ clearGlobalEnvironmentVariables,
+ createUserEnvironment,
+ deleteUserEnvironment,
+ updateUserEnvironment,
+} from "./api"
+import { SecretEnvironmentService } from "@hoppscotch/common/services/secret-environment.service"
+import { getService } from "@hoppscotch/common/modules/dioc"
+
+export const environmentsMapper = createMapper<number, string>()
+export const globalEnvironmentMapper = createMapper<number, string>()
+
+const secretEnvironmentService = getService(SecretEnvironmentService)
+
+export const storeSyncDefinition: StoreSyncDefinitionOf<
+ typeof environmentsStore
+> = {
+ async createEnvironment({ name, variables }) {
+ const lastCreatedEnvIndex = environmentsStore.value.environments.length - 1
+
+ const res = await createUserEnvironment(name, JSON.stringify(variables))
+
+ if (E.isRight(res)) {
+ const id = res.right.createUserEnvironment.id
+
+ secretEnvironmentService.updateSecretEnvironmentID(
+ environmentsStore.value.environments[lastCreatedEnvIndex].id,
+ id
+ )
+
+ environmentsStore.value.environments[lastCreatedEnvIndex].id = id
+ removeDuplicateEntry(id)
+ }
+ },
+ async appendEnvironments({ envs }) {
+ const appendListLength = envs.length
+ let appendStart =
+ environmentsStore.value.environments.length - appendListLength - 1
+
+ envs.forEach((env) => {
+ const envId = ++appendStart
+
+ ;(async function () {
+ const res = await createUserEnvironment(
+ env.name,
+ JSON.stringify(env.variables)
+ )
+
+ if (E.isRight(res)) {
+ const id = res.right.createUserEnvironment.id
+ environmentsStore.value.environments[envId].id = id
+
+ removeDuplicateEntry(id)
+ }
+ })()
+ })
+ },
+ async duplicateEnvironment({ envIndex }) {
+ const environmentToDuplicate = environmentsStore.value.environments.find(
+ (_, index) => index === envIndex
+ )
+
+ const lastCreatedEnvIndex = environmentsStore.value.environments.length - 1
+
+ if (environmentToDuplicate) {
+ const res = await createUserEnvironment(
+ `${environmentToDuplicate?.name} - Duplicate`,
+ JSON.stringify(environmentToDuplicate?.variables)
+ )
+
+ if (E.isRight(res)) {
+ const id = res.right.createUserEnvironment.id
+ environmentsStore.value.environments[lastCreatedEnvIndex].id = id
+
+ removeDuplicateEntry(id)
+ }
+ }
+ },
+ updateEnvironment({ envIndex, updatedEnv }) {
+ const backendId = environmentsStore.value.environments[envIndex].id
+ if (backendId) {
+ updateUserEnvironment(backendId, updatedEnv)()
+ }
+ },
+ async deleteEnvironment({ envID }) {
+ if (envID) {
+ await deleteUserEnvironment(envID)()
+ }
+ },
+ setGlobalVariables({ entries }) {
+ const backendId = getGlobalVariableID()
+ if (backendId) {
+ updateUserEnvironment(backendId, {
+ name: "",
+ variables: entries,
+ id: "",
+ v: 1,
+ })()
+ }
+ },
+ clearGlobalVariables() {
+ const backendId = getGlobalVariableID()
+
+ if (backendId) {
+ clearGlobalEnvironmentVariables(backendId)
+ }
+ },
+}
+
+export const environnmentsSyncer = getSyncInitFunction(
+ environmentsStore,
+ storeSyncDefinition,
+ () => settingsStore.value.syncEnvironments,
+ getSettingSubject("syncEnvironments")
+)
diff --git a/packages/hoppscotch-selfhost-web/src/platform/history/history.api.ts b/packages/hoppscotch-selfhost-web/src/platform/history/desktop/api.ts
similarity index 98%
rename from packages/hoppscotch-selfhost-web/src/platform/history/history.api.ts
rename to packages/hoppscotch-selfhost-web/src/platform/history/desktop/api.ts
index 0b8c46973..67f67467e 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/history/history.api.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/history/desktop/api.ts
@@ -30,7 +30,7 @@ import {
IsUserHistoryEnabledDocument,
UserHistoryStoreStatusChangedDocument,
UserHistoryAllDeletedDocument,
-} from "../../api/generated/graphql"
+} from "@api/generated/graphql"
export const getUserHistoryEntries = () =>
runGQLQuery<GetRestUserHistoryQuery, GetRestUserHistoryQueryVariables, "">({
diff --git a/packages/hoppscotch-selfhost-web/src/platform/history/history.platform.ts b/packages/hoppscotch-selfhost-web/src/platform/history/desktop/index.ts
similarity index 97%
rename from packages/hoppscotch-selfhost-web/src/platform/history/history.platform.ts
rename to packages/hoppscotch-selfhost-web/src/platform/history/desktop/index.ts
index 793761dc8..82b419fb7 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/history/history.platform.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/history/desktop/index.ts
@@ -1,4 +1,4 @@
-import { authEvents$, def as platformAuth } from "@platform/auth/auth.platform"
+import { authEvents$, def as platformAuth } from "@platform/auth/desktop"
import {
restHistoryStore,
RESTHistoryEntry,
@@ -25,13 +25,13 @@ import {
runUserHistoryDeletedSubscription,
runUserHistoryStoreStatusChangedSubscription,
runUserHistoryUpdatedSubscription,
-} from "./history.api"
+} from "./api"
import * as E from "fp-ts/Either"
-import { restHistorySyncer, gqlHistorySyncer } from "./history.sync"
+import { restHistorySyncer, gqlHistorySyncer } from "./sync"
import { runGQLSubscription } from "@hoppscotch/common/helpers/backend/GQLClient"
import { runDispatchWithOutSyncing } from "@lib/sync"
-import { ReqType, ServiceStatus } from "../../api/generated/graphql"
+import { ReqType, ServiceStatus } from "@api/generated/graphql"
import { ref } from "vue"
function initHistorySync() {
@@ -49,7 +49,7 @@ function initHistorySync() {
getUserHistoryStatus()
if (user) {
- loadHistoryEntries()
+ await loadHistoryEntries()
}
})
diff --git a/packages/hoppscotch-selfhost-web/src/platform/history/history.sync.ts b/packages/hoppscotch-selfhost-web/src/platform/history/desktop/sync.ts
similarity index 90%
rename from packages/hoppscotch-selfhost-web/src/platform/history/history.sync.ts
rename to packages/hoppscotch-selfhost-web/src/platform/history/desktop/sync.ts
index 50ffc2c1f..5864a36f9 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/history/history.sync.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/history/desktop/sync.ts
@@ -9,20 +9,20 @@ import {
settingsStore,
} from "@hoppscotch/common/newstore/settings"
-import { getSyncInitFunction } from "../../lib/sync"
+import { getSyncInitFunction } from "@lib/sync"
import * as E from "fp-ts/Either"
-import { StoreSyncDefinitionOf } from "../../lib/sync"
+import { StoreSyncDefinitionOf } from "@lib/sync"
import {
createUserHistory,
deleteAllUserHistory,
removeRequestFromHistory,
toggleHistoryStarStatus,
-} from "./history.api"
-import { ReqType } from "../../api/generated/graphql"
+} from "@platform/history/desktop/api"
+import { ReqType } from "@api/generated/graphql"
-import { isHistoryStoreEnabled } from "./history.platform"
+import { isHistoryStoreEnabled } from "."
export const restHistoryStoreSyncDefinition: StoreSyncDefinitionOf<
typeof restHistoryStore
diff --git a/packages/hoppscotch-selfhost-web/src/platform/history/web/api.ts b/packages/hoppscotch-selfhost-web/src/platform/history/web/api.ts
new file mode 100644
index 000000000..67f67467e
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/history/web/api.ts
@@ -0,0 +1,127 @@
+import {
+ runMutation,
+ runGQLQuery,
+ runGQLSubscription,
+} from "@hoppscotch/common/helpers/backend/GQLClient"
+
+import {
+ CreateUserHistoryDocument,
+ CreateUserHistoryMutation,
+ CreateUserHistoryMutationVariables,
+ DeleteAllUserHistoryDocument,
+ DeleteAllUserHistoryMutation,
+ DeleteAllUserHistoryMutationVariables,
+ GetRestUserHistoryDocument,
+ GetRestUserHistoryQuery,
+ GetRestUserHistoryQueryVariables,
+ RemoveRequestFromHistoryDocument,
+ RemoveRequestFromHistoryMutation,
+ RemoveRequestFromHistoryMutationVariables,
+ ReqType,
+ ToggleHistoryStarStatusDocument,
+ ToggleHistoryStarStatusMutation,
+ ToggleHistoryStarStatusMutationVariables,
+ UserHistoryCreatedDocument,
+ UserHistoryDeletedDocument,
+ UserHistoryDeletedManyDocument,
+ UserHistoryUpdatedDocument,
+ IsUserHistoryEnabledQuery,
+ IsUserHistoryEnabledQueryVariables,
+ IsUserHistoryEnabledDocument,
+ UserHistoryStoreStatusChangedDocument,
+ UserHistoryAllDeletedDocument,
+} from "@api/generated/graphql"
+
+export const getUserHistoryEntries = () =>
+ runGQLQuery<GetRestUserHistoryQuery, GetRestUserHistoryQueryVariables, "">({
+ query: GetRestUserHistoryDocument,
+ variables: {},
+ })
+
+export const getUserHistoryStore = () =>
+ runGQLQuery<
+ IsUserHistoryEnabledQuery,
+ IsUserHistoryEnabledQueryVariables,
+ ""
+ >({
+ query: IsUserHistoryEnabledDocument,
+ variables: {},
+ })
+
+export const createUserHistory = (
+ reqData: string,
+ resMetadata: string,
+ reqType: ReqType
+) =>
+ runMutation<
+ CreateUserHistoryMutation,
+ CreateUserHistoryMutationVariables,
+ ""
+ >(CreateUserHistoryDocument, {
+ reqData,
+ resMetadata,
+ reqType,
+ })()
+
+export const toggleHistoryStarStatus = (id: string) =>
+ runMutation<
+ ToggleHistoryStarStatusMutation,
+ ToggleHistoryStarStatusMutationVariables,
+ ""
+ >(ToggleHistoryStarStatusDocument, {
+ id,
+ })()
+
+export const removeRequestFromHistory = (id: string) =>
+ runMutation<
+ RemoveRequestFromHistoryMutation,
+ RemoveRequestFromHistoryMutationVariables,
+ ""
+ >(RemoveRequestFromHistoryDocument, {
+ id,
+ })()
+
+export const deleteAllUserHistory = (reqType: ReqType) =>
+ runMutation<
+ DeleteAllUserHistoryMutation,
+ DeleteAllUserHistoryMutationVariables,
+ ""
+ >(DeleteAllUserHistoryDocument, {
+ reqType,
+ })()
+
+export const runUserHistoryCreatedSubscription = () =>
+ runGQLSubscription({
+ query: UserHistoryCreatedDocument,
+ variables: {},
+ })
+
+export const runUserHistoryUpdatedSubscription = () =>
+ runGQLSubscription({
+ query: UserHistoryUpdatedDocument,
+ variables: {},
+ })
+
+export const runUserHistoryDeletedSubscription = () =>
+ runGQLSubscription({
+ query: UserHistoryDeletedDocument,
+ variables: {},
+ })
+
+export const runUserHistoryDeletedManySubscription = () =>
+ runGQLSubscription({
+ query: UserHistoryDeletedManyDocument,
+ variables: {},
+ })
+
+export const runUserHistoryStoreStatusChangedSubscription = () =>
+ runGQLSubscription({
+ query: UserHistoryStoreStatusChangedDocument,
+ variables: {},
+ })
+
+export const runUserHistoryAllDeletedSubscription = () =>
+ runGQLSubscription({
+ query: UserHistoryAllDeletedDocument,
+ variables: {},
+ })
diff --git a/packages/hoppscotch-selfhost-web/src/platform/history/web/index.ts b/packages/hoppscotch-selfhost-web/src/platform/history/web/index.ts
new file mode 100644
index 000000000..45eb941e8
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/history/web/index.ts
@@ -0,0 +1,338 @@
+import { authEvents$, def as platformAuth } from "@platform/auth/web"
+import {
+ restHistoryStore,
+ RESTHistoryEntry,
+ setRESTHistoryEntries,
+ addRESTHistoryEntry,
+ toggleRESTHistoryEntryStar,
+ deleteRESTHistoryEntry,
+ clearRESTHistory,
+ setGraphqlHistoryEntries,
+ GQLHistoryEntry,
+ addGraphqlHistoryEntry,
+ toggleGraphqlHistoryEntryStar,
+ graphqlHistoryStore,
+ deleteGraphqlHistoryEntry,
+ clearGraphqlHistory,
+} from "@hoppscotch/common/newstore/history"
+import { HistoryPlatformDef } from "@hoppscotch/common/platform/history"
+import {
+ getUserHistoryEntries,
+ getUserHistoryStore,
+ runUserHistoryAllDeletedSubscription,
+ runUserHistoryCreatedSubscription,
+ runUserHistoryDeletedManySubscription,
+ runUserHistoryDeletedSubscription,
+ runUserHistoryStoreStatusChangedSubscription,
+ runUserHistoryUpdatedSubscription,
+} from "@platform/history/web/api"
+
+import * as E from "fp-ts/Either"
+import { restHistorySyncer, gqlHistorySyncer } from "@platform/history/web/sync"
+import { runGQLSubscription } from "@hoppscotch/common/helpers/backend/GQLClient"
+import { runDispatchWithOutSyncing } from "@lib/sync"
+import { ReqType, ServiceStatus } from "@api/generated/graphql"
+import { ref } from "vue"
+
+function initHistorySync() {
+ const currentUser$ = platformAuth.getCurrentUserStream()
+
+ restHistorySyncer.startStoreSync()
+ restHistorySyncer.setupSubscriptions(setupSubscriptions)
+
+ gqlHistorySyncer.startStoreSync()
+
+ getUserHistoryStatus()
+ loadHistoryEntries()
+
+ currentUser$.subscribe(async (user) => {
+ getUserHistoryStatus()
+
+ if (user) {
+ await loadHistoryEntries()
+ }
+ })
+
+ authEvents$.subscribe((event) => {
+ if (event.event == "login" || event.event == "token_refresh") {
+ restHistorySyncer.startListeningToSubscriptions()
+ }
+
+ if (event.event == "logout") {
+ restHistorySyncer.stopListeningToSubscriptions()
+ }
+ })
+}
+
+function setupSubscriptions() {
+ let subs: ReturnType<typeof runGQLSubscription>[1][] = []
+
+ const userHistoryCreatedSub = setupUserHistoryCreatedSubscription()
+ const userHistoryUpdatedSub = setupUserHistoryUpdatedSubscription()
+ const userHistoryDeletedSub = setupUserHistoryDeletedSubscription()
+ const userHistoryDeletedManySub = setupUserHistoryDeletedManySubscription()
+ const userHistoryStoreStatusChangedSub =
+ setupUserHistoryStoreStatusChangedSubscription()
+ const userHistoryAllDeletedSub = setupUserHistoryAllDeletedSubscription()
+
+ subs = [
+ userHistoryCreatedSub,
+ userHistoryUpdatedSub,
+ userHistoryDeletedSub,
+ userHistoryDeletedManySub,
+ userHistoryStoreStatusChangedSub,
+ userHistoryAllDeletedSub,
+ ]
+
+ return () => {
+ subs.forEach((sub) => sub.unsubscribe())
+ }
+}
+
+async function loadHistoryEntries() {
+ const res = await getUserHistoryEntries()
+
+ if (E.isRight(res)) {
+ const restEntries = res.right.me.RESTHistory
+ const gqlEntries = res.right.me.GQLHistory
+
+ const restHistoryEntries: RESTHistoryEntry[] = restEntries.map((entry) => ({
+ v: 1,
+ request: JSON.parse(entry.request),
+ responseMeta: JSON.parse(entry.responseMetadata),
+ star: entry.isStarred,
+ updatedOn: new Date(entry.executedOn),
+ id: entry.id,
+ }))
+
+ const gqlHistoryEntries: GQLHistoryEntry[] = gqlEntries.map((entry) => ({
+ v: 1,
+ request: JSON.parse(entry.request),
+ response: JSON.parse(entry.responseMetadata),
+ star: entry.isStarred,
+ updatedOn: new Date(entry.executedOn),
+ id: entry.id,
+ }))
+
+ runDispatchWithOutSyncing(() => {
+ setRESTHistoryEntries(restHistoryEntries)
+ setGraphqlHistoryEntries(gqlHistoryEntries)
+ })
+ }
+}
+
+async function getUserHistoryStatus() {
+ const currentUser = platformAuth.getCurrentUser()
+
+ if (!currentUser) {
+ isHistoryStoreEnabled.value = true
+ return
+ }
+
+ isFetchingHistoryStoreStatus.value = true
+
+ const res = await getUserHistoryStore()
+
+ if (E.isLeft(res)) {
+ hasErrorFetchingHistoryStoreStatus.value = true
+ isFetchingHistoryStoreStatus.value = false
+ return
+ }
+
+ isHistoryStoreEnabled.value =
+ res.right.isUserHistoryEnabled.value === ServiceStatus.Enable
+
+ isFetchingHistoryStoreStatus.value = false
+}
+
+function setupUserHistoryCreatedSubscription() {
+ const [userHistoryCreated$, userHistoryCreatedSub] =
+ runUserHistoryCreatedSubscription()
+
+ userHistoryCreated$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const { id, reqType, request, responseMetadata, isStarred, executedOn } =
+ res.right.userHistoryCreated
+
+ const hasAlreadyBeenAdded =
+ reqType == ReqType.Rest
+ ? restHistoryStore.value.state.some((entry) => entry.id == id)
+ : graphqlHistoryStore.value.state.some((entry) => entry.id == id)
+
+ !hasAlreadyBeenAdded &&
+ runDispatchWithOutSyncing(() => {
+ reqType == ReqType.Rest
+ ? addRESTHistoryEntry({
+ v: 1,
+ id,
+ request: JSON.parse(request),
+ responseMeta: JSON.parse(responseMetadata),
+ star: isStarred,
+ updatedOn: new Date(executedOn),
+ })
+ : addGraphqlHistoryEntry({
+ v: 1,
+ id,
+ request: JSON.parse(request),
+ response: JSON.parse(responseMetadata),
+ star: isStarred,
+ updatedOn: new Date(executedOn),
+ })
+ })
+ }
+ })
+
+ return userHistoryCreatedSub
+}
+
+// currently the updates are only for toggling the star
+function setupUserHistoryUpdatedSubscription() {
+ const [userHistoryUpdated$, userHistoryUpdatedSub] =
+ runUserHistoryUpdatedSubscription()
+
+ userHistoryUpdated$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const { id, executedOn, isStarred, request, responseMetadata, reqType } =
+ res.right.userHistoryUpdated
+
+ if (reqType == ReqType.Rest) {
+ const updatedRestEntryIndex = restHistoryStore.value.state.findIndex(
+ (entry) => entry.id == id
+ )
+
+ if (updatedRestEntryIndex != -1) {
+ runDispatchWithOutSyncing(() => {
+ toggleRESTHistoryEntryStar({
+ v: 1,
+ id,
+ request: JSON.parse(request),
+ responseMeta: JSON.parse(responseMetadata),
+ // because the star will be toggled in the store, we need to pass the opposite value
+ star: !isStarred,
+ updatedOn: new Date(executedOn),
+ })
+ })
+ }
+ }
+
+ if (reqType == ReqType.Gql) {
+ const updatedGQLEntryIndex = graphqlHistoryStore.value.state.findIndex(
+ (entry) => entry.id == id
+ )
+
+ if (updatedGQLEntryIndex != -1) {
+ runDispatchWithOutSyncing(() => {
+ toggleGraphqlHistoryEntryStar({
+ v: 1,
+ id,
+ request: JSON.parse(request),
+ response: JSON.parse(responseMetadata),
+ // because the star will be toggled in the store, we need to pass the opposite value
+ star: !isStarred,
+ updatedOn: new Date(executedOn),
+ })
+ })
+ }
+ }
+ }
+ })
+
+ return userHistoryUpdatedSub
+}
+
+function setupUserHistoryDeletedSubscription() {
+ const [userHistoryDeleted$, userHistoryDeletedSub] =
+ runUserHistoryDeletedSubscription()
+
+ userHistoryDeleted$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const { id, reqType } = res.right.userHistoryDeleted
+
+ if (reqType == ReqType.Gql) {
+ const deletedEntry = graphqlHistoryStore.value.state.find(
+ (entry) => entry.id == id
+ )
+
+ deletedEntry &&
+ runDispatchWithOutSyncing(() => {
+ deleteGraphqlHistoryEntry(deletedEntry)
+ })
+ }
+
+ if (reqType == ReqType.Rest) {
+ const deletedEntry = restHistoryStore.value.state.find(
+ (entry) => entry.id == id
+ )
+
+ deletedEntry &&
+ runDispatchWithOutSyncing(() => {
+ deleteRESTHistoryEntry(deletedEntry)
+ })
+ }
+ }
+ })
+
+ return userHistoryDeletedSub
+}
+
+function setupUserHistoryDeletedManySubscription() {
+ const [userHistoryDeletedMany$, userHistoryDeletedManySub] =
+ runUserHistoryDeletedManySubscription()
+
+ userHistoryDeletedMany$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const { reqType } = res.right.userHistoryDeletedMany
+
+ runDispatchWithOutSyncing(() => {
+ reqType == ReqType.Rest ? clearRESTHistory() : clearGraphqlHistory()
+ })
+ }
+ })
+
+ return userHistoryDeletedManySub
+}
+
+function setupUserHistoryStoreStatusChangedSubscription() {
+ const [userHistoryStoreStatusChanged$, userHistoryStoreStatusChangedSub] =
+ runUserHistoryStoreStatusChangedSubscription()
+
+ userHistoryStoreStatusChanged$.subscribe((res) => {
+ if (E.isRight(res)) {
+ const status =
+ res.right.infraConfigUpdate == ServiceStatus.Enable ? true : false
+
+ isHistoryStoreEnabled.value = status
+ }
+ })
+
+ return userHistoryStoreStatusChangedSub
+}
+
+function setupUserHistoryAllDeletedSubscription() {
+ const [userHistoryAllDeleted$, userHistoryAllDeletedSub] =
+ runUserHistoryAllDeletedSubscription()
+
+ userHistoryAllDeleted$.subscribe((res) => {
+ if (E.isRight(res)) {
+ runDispatchWithOutSyncing(() => {
+ clearRESTHistory()
+ clearGraphqlHistory()
+ })
+ }
+ })
+
+ return userHistoryAllDeletedSub
+}
+
+export const isHistoryStoreEnabled = ref(false)
+const isFetchingHistoryStoreStatus = ref(false)
+const hasErrorFetchingHistoryStoreStatus = ref(false)
+
+export const def: HistoryPlatformDef = {
+ initHistorySync,
+ requestHistoryStore: {
+ isHistoryStoreEnabled,
+ isFetchingHistoryStoreStatus,
+ hasErrorFetchingHistoryStoreStatus,
+ },
+}
diff --git a/packages/hoppscotch-selfhost-web/src/platform/history/web/sync.ts b/packages/hoppscotch-selfhost-web/src/platform/history/web/sync.ts
new file mode 100644
index 000000000..04785dbe8
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/history/web/sync.ts
@@ -0,0 +1,111 @@
+import {
+ graphqlHistoryStore,
+ removeDuplicateRestHistoryEntry,
+ removeDuplicateGraphqlHistoryEntry,
+ restHistoryStore,
+} from "@hoppscotch/common/newstore/history"
+import {
+ getSettingSubject,
+ settingsStore,
+} from "@hoppscotch/common/newstore/settings"
+
+import { getSyncInitFunction } from "@lib/sync"
+
+import * as E from "fp-ts/Either"
+
+import { StoreSyncDefinitionOf } from "@lib/sync"
+import {
+ createUserHistory,
+ deleteAllUserHistory,
+ removeRequestFromHistory,
+ toggleHistoryStarStatus,
+} from "./api"
+import { ReqType } from "@api/generated/graphql"
+
+import { isHistoryStoreEnabled } from "."
+
+export const restHistoryStoreSyncDefinition: StoreSyncDefinitionOf<
+ typeof restHistoryStore
+> = {
+ async addEntry({ entry }) {
+ if (!isHistoryStoreEnabled.value) {
+ return
+ }
+
+ const res = await createUserHistory(
+ JSON.stringify(entry.request),
+ JSON.stringify(entry.responseMeta),
+ ReqType.Rest
+ )
+
+ if (E.isRight(res)) {
+ entry.id = res.right.createUserHistory.id
+
+ // preventing double insertion from here and subscription
+ removeDuplicateRestHistoryEntry(entry.id)
+ }
+ },
+ deleteEntry({ entry }) {
+ if (entry.id) {
+ removeRequestFromHistory(entry.id)
+ }
+ },
+ toggleStar({ entry }) {
+ if (entry.id) {
+ toggleHistoryStarStatus(entry.id)
+ }
+ },
+ clearHistory() {
+ deleteAllUserHistory(ReqType.Rest)
+ },
+}
+
+export const gqlHistoryStoreSyncDefinition: StoreSyncDefinitionOf<
+ typeof graphqlHistoryStore
+> = {
+ async addEntry({ entry }) {
+ if (!isHistoryStoreEnabled.value) {
+ return
+ }
+
+ const res = await createUserHistory(
+ JSON.stringify(entry.request),
+ JSON.stringify(entry.response),
+ ReqType.Gql
+ )
+
+ if (E.isRight(res)) {
+ entry.id = res.right.createUserHistory.id
+
+ // preventing double insertion from here and subscription
+ removeDuplicateGraphqlHistoryEntry(entry.id)
+ }
+ },
+ deleteEntry({ entry }) {
+ if (entry.id) {
+ removeRequestFromHistory(entry.id)
+ }
+ },
+ toggleStar({ entry }) {
+ if (entry.id) {
+ toggleHistoryStarStatus(entry.id)
+ }
+ },
+ clearHistory() {
+ deleteAllUserHistory(ReqType.Gql)
+ },
+}
+
+export const restHistorySyncer = getSyncInitFunction(
+ restHistoryStore,
+ restHistoryStoreSyncDefinition,
+ () => settingsStore.value.syncHistory,
+ getSettingSubject("syncHistory")
+)
+
+export const gqlHistorySyncer = getSyncInitFunction(
+ graphqlHistoryStore,
+ gqlHistoryStoreSyncDefinition,
+ () => settingsStore.value.syncHistory,
+ getSettingSubject("syncHistory")
+)
diff --git a/packages/hoppscotch-selfhost-web/src/platform/infra/infra.platform.ts b/packages/hoppscotch-selfhost-web/src/platform/infra/infra.platform.ts
index 7eac2c197..6d6ea85ba 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/infra/infra.platform.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/infra/infra.platform.ts
@@ -1,6 +1,6 @@
import { runGQLQuery } from "@hoppscotch/common/helpers/backend/GQLClient"
import { InfraPlatformDef } from "@hoppscotch/common/platform/infra"
-import { GetSmtpStatusDocument } from "../../api/generated/graphql"
+import { GetSmtpStatusDocument } from "@api/generated/graphql"
import * as E from "fp-ts/Either"
const getSMTPStatus = () => {
diff --git a/packages/hoppscotch-selfhost-web/src/platform/settings/settings.api.ts b/packages/hoppscotch-selfhost-web/src/platform/settings/desktop/api.ts
similarity index 97%
rename from packages/hoppscotch-selfhost-web/src/platform/settings/settings.api.ts
rename to packages/hoppscotch-selfhost-web/src/platform/settings/desktop/api.ts
index 198701a56..d3aff03f9 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/settings/settings.api.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/settings/desktop/api.ts
@@ -14,7 +14,7 @@ import {
UpdateUserSettingsMutation,
UpdateUserSettingsMutationVariables,
UserSettingsUpdatedDocument,
-} from "../../api/generated/graphql"
+} from "@api/generated/graphql"
export const getUserSettings = () =>
runGQLQuery<
diff --git a/packages/hoppscotch-selfhost-web/src/platform/settings/settings.platform.ts b/packages/hoppscotch-selfhost-web/src/platform/settings/desktop/index.ts
similarity index 96%
rename from packages/hoppscotch-selfhost-web/src/platform/settings/settings.platform.ts
rename to packages/hoppscotch-selfhost-web/src/platform/settings/desktop/index.ts
index 61b838810..b5505a25a 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/settings/settings.platform.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/settings/desktop/index.ts
@@ -1,11 +1,11 @@
import { SettingsPlatformDef } from "@hoppscotch/common/platform/settings"
-import { settingsSyncer } from "./settings.sync"
-import { authEvents$, def as platformAuth } from "@platform/auth/auth.platform"
+import { settingsSyncer } from "./sync"
+import { authEvents$, def as platformAuth } from "@platform/auth/desktop"
import {
createUserSettings,
getUserSettings,
runUserSettingsUpdatedSubscription,
-} from "./settings.api"
+} from "./api"
import * as E from "fp-ts/Either"
import { runGQLSubscription } from "@hoppscotch/common/helpers/backend/GQLClient"
import {
diff --git a/packages/hoppscotch-selfhost-web/src/platform/settings/settings.sync.ts b/packages/hoppscotch-selfhost-web/src/platform/settings/desktop/sync.ts
similarity index 79%
rename from packages/hoppscotch-selfhost-web/src/platform/settings/settings.sync.ts
rename to packages/hoppscotch-selfhost-web/src/platform/settings/desktop/sync.ts
index bc42556c5..8dfa1fe16 100644
--- a/packages/hoppscotch-selfhost-web/src/platform/settings/settings.sync.ts
+++ b/packages/hoppscotch-selfhost-web/src/platform/settings/desktop/sync.ts
@@ -1,10 +1,10 @@
import { settingsStore } from "@hoppscotch/common/newstore/settings"
-import { getSyncInitFunction } from "../../lib/sync"
+import { getSyncInitFunction } from "@lib/sync"
-import { StoreSyncDefinitionOf } from "../../lib/sync"
+import { StoreSyncDefinitionOf } from "@lib/sync"
-import { updateUserSettings } from "./settings.api"
+import { updateUserSettings } from "./api"
export const settingsSyncDefinition: StoreSyncDefinitionOf<
typeof settingsStore
diff --git a/packages/hoppscotch-selfhost-web/src/platform/settings/web/api.ts b/packages/hoppscotch-selfhost-web/src/platform/settings/web/api.ts
new file mode 100644
index 000000000..d3aff03f9
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/settings/web/api.ts
@@ -0,0 +1,51 @@
+import {
+ runGQLQuery,
+ runGQLSubscription,
+ runMutation,
+} from "@hoppscotch/common/helpers/backend/GQLClient"
+import {
+ CreateUserSettingsDocument,
+ CreateUserSettingsMutation,
+ CreateUserSettingsMutationVariables,
+ GetUserSettingsDocument,
+ GetUserSettingsQuery,
+ GetUserSettingsQueryVariables,
+ UpdateUserSettingsDocument,
+ UpdateUserSettingsMutation,
+ UpdateUserSettingsMutationVariables,
+ UserSettingsUpdatedDocument,
+} from "@api/generated/graphql"
+
+export const getUserSettings = () =>
+ runGQLQuery<
+ GetUserSettingsQuery,
+ GetUserSettingsQueryVariables,
+ "user_settings/not_found"
+ >({
+ query: GetUserSettingsDocument,
+ variables: {},
+ })
+
+export const createUserSettings = (properties: string) =>
+ runMutation<
+ CreateUserSettingsMutation,
+ CreateUserSettingsMutationVariables,
+ ""
+ >(CreateUserSettingsDocument, {
+ properties,
+ })()
+
+export const updateUserSettings = (properties: string) =>
+ runMutation<
+ UpdateUserSettingsMutation,
+ UpdateUserSettingsMutationVariables,
+ ""
+ >(UpdateUserSettingsDocument, {
+ properties,
+ })()
+
+export const runUserSettingsUpdatedSubscription = () =>
+ runGQLSubscription({
+ query: UserSettingsUpdatedDocument,
+ variables: {},
+ })
diff --git a/packages/hoppscotch-selfhost-web/src/platform/settings/web/index.ts b/packages/hoppscotch-selfhost-web/src/platform/settings/web/index.ts
new file mode 100644
index 000000000..fc59447de
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/settings/web/index.ts
@@ -0,0 +1,88 @@
+import { SettingsPlatformDef } from "@hoppscotch/common/platform/settings"
+import { settingsSyncer } from "./sync"
+import { authEvents$, def as platformAuth } from "@platform/auth/web"
+import {
+ createUserSettings,
+ getUserSettings,
+ runUserSettingsUpdatedSubscription,
+} from "./api"
+import * as E from "fp-ts/Either"
+import { runGQLSubscription } from "@hoppscotch/common/helpers/backend/GQLClient"
+import {
+ bulkApplySettings,
+ getDefaultSettings,
+} from "@hoppscotch/common/newstore/settings"
+import { runDispatchWithOutSyncing } from "@lib/sync"
+
+function initSettingsSync() {
+ const currentUser$ = platformAuth.getCurrentUserStream()
+ settingsSyncer.startStoreSync()
+ settingsSyncer.setupSubscriptions(setupSubscriptions)
+
+ // load the settings
+
+ loadUserSettings()
+
+ currentUser$.subscribe(async (user) => {
+ if (user) {
+ // load the settings
+ loadUserSettings()
+ }
+ })
+
+ authEvents$.subscribe((event) => {
+ if (event.event == "login" || event.event == "token_refresh") {
+ settingsSyncer.startListeningToSubscriptions()
+ }
+
+ if (event.event == "logout") {
+ settingsSyncer.stopListeningToSubscriptions()
+ }
+ })
+}
+
+async function loadUserSettings() {
+ const res = await getUserSettings()
+
+ // create user settings if it doesn't exist
+ E.isLeft(res) &&
+ res.left.error == "user_settings/not_found" &&
+ (await createUserSettings(JSON.stringify(getDefaultSettings())))
+
+ if (E.isRight(res)) {
+ runDispatchWithOutSyncing(() => {
+ bulkApplySettings(JSON.parse(res.right.me.settings.properties))
+ })
+ }
+}
+
+function setupSubscriptions() {
+ let subs: ReturnType<typeof runGQLSubscription>[1][] = []
+
+ const userSettingsUpdatedSub = setupUserSettingsUpdatedSubscription()
+
+ subs = [userSettingsUpdatedSub]
+
+ return () => {
+ subs.forEach((sub) => sub.unsubscribe())
+ }
+}
+
+function setupUserSettingsUpdatedSubscription() {
+ const [userSettingsUpdated$, userSettingsUpdatedSub] =
+ runUserSettingsUpdatedSubscription()
+
+ userSettingsUpdated$.subscribe((res) => {
+ if (E.isRight(res)) {
+ runDispatchWithOutSyncing(() => {
+ bulkApplySettings(JSON.parse(res.right.userSettingsUpdated.properties))
+ })
+ }
+ })
+
+ return userSettingsUpdatedSub
+}
+
+export const def: SettingsPlatformDef = {
+ initSettingsSync,
+}
diff --git a/packages/hoppscotch-selfhost-web/src/platform/settings/web/sync.ts b/packages/hoppscotch-selfhost-web/src/platform/settings/web/sync.ts
new file mode 100644
index 000000000..8dfa1fe16
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/src/platform/settings/web/sync.ts
@@ -0,0 +1,30 @@
+import { settingsStore } from "@hoppscotch/common/newstore/settings"
+
+import { getSyncInitFunction } from "@lib/sync"
+
+import { StoreSyncDefinitionOf } from "@lib/sync"
+
+import { updateUserSettings } from "./api"
+
+export const settingsSyncDefinition: StoreSyncDefinitionOf<
+ typeof settingsStore
+> = {
+ toggleSetting() {
+ updateUserSettings(JSON.stringify(settingsStore.value))
+ },
+ toggleNestedSetting() {
+ updateUserSettings(JSON.stringify(settingsStore.value))
+ },
+ applySetting() {
+ updateUserSettings(JSON.stringify(settingsStore.value))
+ },
+ applyNestedSetting() {
+ updateUserSettings(JSON.stringify(settingsStore.value))
+ },
+}
+
+export const settingsSyncer = getSyncInitFunction(
+ settingsStore,
+ settingsSyncDefinition,
+ () => true
+)
diff --git a/packages/hoppscotch-selfhost-web/src/platform/tabState/tabState.platform.ts b/packages/hoppscotch-selfhost-web/src/platform/tabState/tabState.platform.ts
deleted file mode 100644
index 4c1386af7..000000000
--- a/packages/hoppscotch-selfhost-web/src/platform/tabState/tabState.platform.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { PersistableTabState } from "@hoppscotch/common/services/tab"
-import { HoppTabDocument } from "@hoppscotch/common/helpers/rest/document"
-import { HoppUser } from "@hoppscotch/common/platform/auth"
-import { TabStatePlatformDef } from "@hoppscotch/common/platform/tab"
-import { def as platformAuth } from "@platform/auth"
-import { getCurrentRestSession, updateUserSession } from "./tabState.api"
-import { SessionType } from "../../api/generated/graphql"
-import * as E from "fp-ts/Either"
-
-async function writeCurrentTabState(
- _: HoppUser,
- persistableTabState: PersistableTabState<HoppTabDocument>
-) {
- await updateUserSession(JSON.stringify(persistableTabState), SessionType.Rest)
-}
-
-async function loadTabStateFromSync(): Promise<PersistableTabState<HoppTabDocument> | null> {
- const currentUser = platformAuth.getCurrentUser()
-
- if (!currentUser)
- throw new Error("Cannot load request from sync without login")
-
- const res = await getCurrentRestSession()
-
- if (E.isRight(res)) {
- const currentRESTSession = res.right.me.currentRESTSession
-
- return currentRESTSession ? JSON.parse(currentRESTSession) : null
- } else {
- }
-
- return null
-}
-
-export const def: TabStatePlatformDef = {
- loadTabStateFromSync,
- writeCurrentTabState,
-}
diff --git a/packages/hoppscotch-selfhost-web/tsconfig.json b/packages/hoppscotch-selfhost-web/tsconfig.json
index ddfa1e47e..d4b1c7845 100644
--- a/packages/hoppscotch-selfhost-web/tsconfig.json
+++ b/packages/hoppscotch-selfhost-web/tsconfig.json
@@ -16,6 +16,8 @@
"@hoppscotch/common": ["../hoppscotch-common/src/index.ts"],
"@hoppscotch/common/*": ["../hoppscotch-common/src/*"],
"@platform/*": ["./src/platform/*"],
+ "@platform-components/*": ["./src/components/*"],
+ "@api/*": ["./src/api/*"],
"@lib/*": ["./src/lib/*"]
}
},
diff --git a/packages/hoppscotch-selfhost-web/vite.config.ts b/packages/hoppscotch-selfhost-web/vite.config.ts
index a052edbaa..4a169e474 100644
--- a/packages/hoppscotch-selfhost-web/vite.config.ts
+++ b/packages/hoppscotch-selfhost-web/vite.config.ts
@@ -72,6 +72,8 @@ export default defineConfig({
),
"@workers": path.resolve(__dirname, "../hoppscotch-common/src/workers"),
"@platform": path.resolve(__dirname, "./src/platform"),
+ "@platform-components": path.resolve(__dirname, "./src/components"),
+ "@api": path.resolve(__dirname, "./src/api"),
"@lib": path.resolve(__dirname, "./src/lib"),
stream: "stream-browserify",
util: "util",
@@ -87,7 +89,7 @@ export default defineConfig({
Vue(),
Pages({
routeStyle: "nuxt",
- dirs: "../hoppscotch-common/src/pages",
+ dirs: ["../hoppscotch-common/src/pages", "./src/pages"],
importMode: "async",
onRoutesGenerated(routes) {
generateSitemap({
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/.gitignore b/packages/hoppscotch-selfhost-web/webapp-server/.gitignore
new file mode 100644
index 000000000..6cf4d6811
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/.gitignore
@@ -0,0 +1,21 @@
+# Devenv
+.devenv*
+devenv.local.nix
+
+# direnv
+.direnv
+
+# pre-commit
+.pre-commit-config.yaml
+
+/target/
+
+/gen/schemas
+
+.env
+
+bundles
+
+trust/
+
+site/
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/Cargo.lock b/packages/hoppscotch-selfhost-web/webapp-server/Cargo.lock
new file mode 100644
index 000000000..e591515e0
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/Cargo.lock
@@ -0,0 +1,1925 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "addr2line"
+version = "0.24.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
+dependencies = [
+ "gimli",
+]
+
+[[package]]
+name = "adler2"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
+
+[[package]]
+name = "aes"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
+dependencies = [
+ "cfg-if",
+ "cipher",
+ "cpufeatures",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "arbitrary"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223"
+dependencies = [
+ "derive_arbitrary",
+]
+
+[[package]]
+name = "arrayref"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"
+
+[[package]]
+name = "arrayvec"
+version = "0.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
+
+[[package]]
+name = "async-compression"
+version = "0.4.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0cb8f1d480b0ea3783ab015936d2a55c87e219676f0c0b7dec61494043f21857"
+dependencies = [
+ "futures-core",
+ "memchr",
+ "pin-project-lite",
+ "tokio",
+ "zstd",
+ "zstd-safe",
+]
+
+[[package]]
+name = "async-trait"
+version = "0.1.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+
+[[package]]
+name = "axum"
+version = "0.7.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae"
+dependencies = [
+ "async-trait",
+ "axum-core",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "http-body-util",
+ "hyper",
+ "hyper-util",
+ "itoa",
+ "matchit",
+ "memchr",
+ "mime",
+ "percent-encoding",
+ "pin-project-lite",
+ "rustversion",
+ "serde",
+ "serde_json",
+ "serde_path_to_error",
+ "serde_urlencoded",
+ "sync_wrapper 1.0.1",
+ "tokio",
+ "tower",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "axum-core"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199"
+dependencies = [
+ "async-trait",
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "http-body-util",
+ "mime",
+ "pin-project-lite",
+ "rustversion",
+ "sync_wrapper 1.0.1",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "backtrace"
+version = "0.3.74"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"
+dependencies = [
+ "addr2line",
+ "cfg-if",
+ "libc",
+ "miniz_oxide",
+ "object",
+ "rustc-demangle",
+ "windows-targets",
+]
+
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
+[[package]]
+name = "base64ct"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
+
+[[package]]
+name = "bitflags"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
+
+[[package]]
+name = "blake3"
+version = "1.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7"
+dependencies = [
+ "arrayref",
+ "arrayvec",
+ "cc",
+ "cfg-if",
+ "constant_time_eq",
+ "serde",
+]
+
+[[package]]
+name = "block-buffer"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
+
+[[package]]
+name = "byteorder"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+
+[[package]]
+name = "bytes"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"
+
+[[package]]
+name = "bzip2"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
+dependencies = [
+ "bzip2-sys",
+ "libc",
+]
+
+[[package]]
+name = "bzip2-sys"
+version = "0.1.11+1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+]
+
+[[package]]
+name = "cc"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47"
+dependencies = [
+ "jobserver",
+ "libc",
+ "shlex",
+]
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "chrono"
+version = "0.4.38"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "serde",
+ "wasm-bindgen",
+ "windows-targets",
+]
+
+[[package]]
+name = "cipher"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
+dependencies = [
+ "crypto-common",
+ "inout",
+]
+
+[[package]]
+name = "const-oid"
+version = "0.9.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
+
+[[package]]
+name = "constant_time_eq"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6"
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc"
+version = "3.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
+dependencies = [
+ "crc-catalog",
+]
+
+[[package]]
+name = "crc-catalog"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
+
+[[package]]
+name = "crc32fast"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
+dependencies = [
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "curve25519-dalek"
+version = "4.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "curve25519-dalek-derive",
+ "digest",
+ "fiat-crypto",
+ "rustc_version",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "curve25519-dalek-derive"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "deflate64"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b"
+
+[[package]]
+name = "der"
+version = "0.7.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0"
+dependencies = [
+ "const-oid",
+ "zeroize",
+]
+
+[[package]]
+name = "deranged"
+version = "0.3.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
+dependencies = [
+ "powerfmt",
+]
+
+[[package]]
+name = "derive_arbitrary"
+version = "1.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+dependencies = [
+ "block-buffer",
+ "crypto-common",
+ "subtle",
+]
+
+[[package]]
+name = "displaydoc"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "ed25519"
+version = "2.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53"
+dependencies = [
+ "pkcs8",
+ "serde",
+ "signature",
+]
+
+[[package]]
+name = "ed25519-dalek"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871"
+dependencies = [
+ "curve25519-dalek",
+ "ed25519",
+ "rand_core",
+ "serde",
+ "sha2",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "either"
+version = "1.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
+
+[[package]]
+name = "equivalent"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+
+[[package]]
+name = "fiat-crypto"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
+
+[[package]]
+name = "flate2"
+version = "1.0.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "fnv"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
+dependencies = [
+ "futures-core",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
+
+[[package]]
+name = "futures-sink"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
+
+[[package]]
+name = "futures-task"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
+
+[[package]]
+name = "futures-util"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "pin-project-lite",
+ "pin-utils",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "wasi",
+]
+
+[[package]]
+name = "gimli"
+version = "0.31.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
+
+[[package]]
+name = "hashbrown"
+version = "0.15.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3"
+
+[[package]]
+name = "hermit-abi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
+
+[[package]]
+name = "hmac"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
+dependencies = [
+ "digest",
+]
+
+[[package]]
+name = "http"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
+dependencies = [
+ "bytes",
+ "fnv",
+ "itoa",
+]
+
+[[package]]
+name = "http-body"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
+dependencies = [
+ "bytes",
+ "http",
+]
+
+[[package]]
+name = "http-body-util"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
+dependencies = [
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "pin-project-lite",
+]
+
+[[package]]
+name = "http-range-header"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08a397c49fec283e3d6211adbe480be95aae5f304cfb923e9970e08956d5168a"
+
+[[package]]
+name = "httparse"
+version = "1.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946"
+
+[[package]]
+name = "httpdate"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
+
+[[package]]
+name = "hyper"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a"
+dependencies = [
+ "bytes",
+ "futures-channel",
+ "futures-util",
+ "http",
+ "http-body",
+ "httparse",
+ "httpdate",
+ "itoa",
+ "pin-project-lite",
+ "smallvec",
+ "tokio",
+]
+
+[[package]]
+name = "hyper-util"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"
+dependencies = [
+ "bytes",
+ "futures-util",
+ "http",
+ "http-body",
+ "hyper",
+ "pin-project-lite",
+ "tokio",
+ "tower-service",
+]
+
+[[package]]
+name = "iana-time-zone"
+version = "0.1.61"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
+dependencies = [
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows-core",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
+]
+
+[[package]]
+name = "indexmap"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
+dependencies = [
+ "equivalent",
+ "hashbrown",
+]
+
+[[package]]
+name = "inout"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
+
+[[package]]
+name = "jobserver"
+version = "0.1.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "js-sys"
+version = "0.3.72"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+
+[[package]]
+name = "libc"
+version = "0.2.162"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398"
+
+[[package]]
+name = "lock_api"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
+dependencies = [
+ "autocfg",
+ "scopeguard",
+]
+
+[[package]]
+name = "lockfree-object-pool"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e"
+
+[[package]]
+name = "log"
+version = "0.4.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
+
+[[package]]
+name = "lzma-rs"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e"
+dependencies = [
+ "byteorder",
+ "crc",
+]
+
+[[package]]
+name = "matchers"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
+dependencies = [
+ "regex-automata 0.1.10",
+]
+
+[[package]]
+name = "matchit"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
+
+[[package]]
+name = "memchr"
+version = "2.7.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+
+[[package]]
+name = "mime"
+version = "0.3.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
+
+[[package]]
+name = "mime_guess"
+version = "2.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
+dependencies = [
+ "mime",
+ "unicase",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
+dependencies = [
+ "adler2",
+]
+
+[[package]]
+name = "mio"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "wasi",
+ "windows-sys",
+]
+
+[[package]]
+name = "nu-ansi-term"
+version = "0.46.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
+dependencies = [
+ "overload",
+ "winapi",
+]
+
+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "object"
+version = "0.36.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.20.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
+
+[[package]]
+name = "overload"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
+
+[[package]]
+name = "parking_lot"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
+dependencies = [
+ "lock_api",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "redox_syscall",
+ "smallvec",
+ "windows-targets",
+]
+
+[[package]]
+name = "pbkdf2"
+version = "0.12.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
+dependencies = [
+ "digest",
+ "hmac",
+]
+
+[[package]]
+name = "percent-encoding"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
+
+[[package]]
+name = "pkcs8"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
+dependencies = [
+ "der",
+ "spki",
+]
+
+[[package]]
+name = "pkg-config"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
+
+[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
+dependencies = [
+ "zerocopy",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.89"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rand"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
+dependencies = [
+ "libc",
+ "rand_chacha",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
+dependencies = [
+ "ppv-lite86",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom",
+]
+
+[[package]]
+name = "rayon"
+version = "1.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
+dependencies = [
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
+dependencies = [
+ "crossbeam-deque",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "regex"
+version = "1.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata 0.4.9",
+ "regex-syntax 0.8.5",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
+dependencies = [
+ "regex-syntax 0.6.29",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax 0.8.5",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.29"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+
+[[package]]
+name = "rustc-demangle"
+version = "0.1.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+
+[[package]]
+name = "rustc_version"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
+dependencies = [
+ "semver",
+]
+
+[[package]]
+name = "rustversion"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"
+
+[[package]]
+name = "ryu"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "scopeguard"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+
+[[package]]
+name = "semver"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
+
+[[package]]
+name = "serde"
+version = "1.0.215"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.215"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.133"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
+dependencies = [
+ "itoa",
+ "memchr",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "serde_path_to_error"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6"
+dependencies = [
+ "itoa",
+ "serde",
+]
+
+[[package]]
+name = "serde_urlencoded"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
+dependencies = [
+ "form_urlencoded",
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "sha1"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
+[[package]]
+name = "sharded-slab"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
+dependencies = [
+ "lazy_static",
+]
+
+[[package]]
+name = "shlex"
+version = "1.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+
+[[package]]
+name = "signal-hook-registry"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "signature"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
+dependencies = [
+ "rand_core",
+]
+
+[[package]]
+name = "simd-adler32"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
+
+[[package]]
+name = "smallvec"
+version = "1.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
+
+[[package]]
+name = "socket2"
+version = "0.5.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c"
+dependencies = [
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "spki"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
+dependencies = [
+ "base64ct",
+ "der",
+]
+
+[[package]]
+name = "subtle"
+version = "2.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
+
+[[package]]
+name = "syn"
+version = "2.0.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "sync_wrapper"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
+
+[[package]]
+name = "sync_wrapper"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"
+
+[[package]]
+name = "thiserror"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl 1.0.69",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa"
+dependencies = [
+ "thiserror-impl 2.0.3",
+]
+
+[[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",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.1.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+]
+
+[[package]]
+name = "time"
+version = "0.3.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
+dependencies = [
+ "deranged",
+ "num-conv",
+ "powerfmt",
+ "serde",
+ "time-core",
+]
+
+[[package]]
+name = "time-core"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
+
+[[package]]
+name = "tokio"
+version = "1.41.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33"
+dependencies = [
+ "backtrace",
+ "bytes",
+ "libc",
+ "mio",
+ "parking_lot",
+ "pin-project-lite",
+ "signal-hook-registry",
+ "socket2",
+ "tokio-macros",
+ "windows-sys",
+]
+
+[[package]]
+name = "tokio-macros"
+version = "2.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tokio-util"
+version = "0.7.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a"
+dependencies = [
+ "bytes",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite",
+ "tokio",
+]
+
+[[package]]
+name = "tower"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "pin-project-lite",
+ "sync_wrapper 0.1.2",
+ "tokio",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "tower-http"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8437150ab6bbc8c5f0f519e3d5ed4aa883a83dd4cdd3d1b21f9482936046cb97"
+dependencies = [
+ "async-compression",
+ "bitflags",
+ "bytes",
+ "futures-core",
+ "futures-util",
+ "http",
+ "http-body",
+ "http-body-util",
+ "http-range-header",
+ "httpdate",
+ "mime",
+ "mime_guess",
+ "percent-encoding",
+ "pin-project-lite",
+ "tokio",
+ "tokio-util",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "tower-layer"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
+
+[[package]]
+name = "tower-service"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
+
+[[package]]
+name = "tracing"
+version = "0.1.40"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
+dependencies = [
+ "log",
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.32"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
+dependencies = [
+ "once_cell",
+ "valuable",
+]
+
+[[package]]
+name = "tracing-log"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
+dependencies = [
+ "log",
+ "once_cell",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-subscriber"
+version = "0.3.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
+dependencies = [
+ "matchers",
+ "nu-ansi-term",
+ "once_cell",
+ "regex",
+ "sharded-slab",
+ "smallvec",
+ "thread_local",
+ "tracing",
+ "tracing-core",
+ "tracing-log",
+]
+
+[[package]]
+name = "typenum"
+version = "1.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
+
+[[package]]
+name = "unicase"
+version = "2.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
+
+[[package]]
+name = "valuable"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
+
+[[package]]
+name = "version_check"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
+
+[[package]]
+name = "walkdir"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
+dependencies = [
+ "same-file",
+ "winapi-util",
+]
+
+[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.95"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
+
+[[package]]
+name = "webapp-server"
+version = "0.1.0"
+dependencies = [
+ "axum",
+ "base64",
+ "blake3",
+ "bytes",
+ "chrono",
+ "ed25519-dalek",
+ "mime_guess",
+ "rand",
+ "rayon",
+ "serde",
+ "serde_json",
+ "thiserror 2.0.3",
+ "tokio",
+ "tower-http",
+ "tracing",
+ "tracing-subscriber",
+ "walkdir",
+ "zip",
+ "zstd",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows-core"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "zerocopy"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
+dependencies = [
+ "byteorder",
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.7.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "zeroize"
+version = "1.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
+dependencies = [
+ "zeroize_derive",
+]
+
+[[package]]
+name = "zeroize_derive"
+version = "1.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "zip"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494"
+dependencies = [
+ "aes",
+ "arbitrary",
+ "bzip2",
+ "constant_time_eq",
+ "crc32fast",
+ "crossbeam-utils",
+ "deflate64",
+ "displaydoc",
+ "flate2",
+ "hmac",
+ "indexmap",
+ "lzma-rs",
+ "memchr",
+ "pbkdf2",
+ "rand",
+ "sha1",
+ "thiserror 1.0.69",
+ "time",
+ "zeroize",
+ "zopfli",
+ "zstd",
+]
+
+[[package]]
+name = "zopfli"
+version = "0.8.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946"
+dependencies = [
+ "bumpalo",
+ "crc32fast",
+ "lockfree-object-pool",
+ "log",
+ "once_cell",
+ "simd-adler32",
+]
+
+[[package]]
+name = "zstd"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9"
+dependencies = [
+ "zstd-safe",
+]
+
+[[package]]
+name = "zstd-safe"
+version = "7.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059"
+dependencies = [
+ "zstd-sys",
+]
+
+[[package]]
+name = "zstd-sys"
+version = "2.0.13+zstd.1.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa"
+dependencies = [
+ "cc",
+ "pkg-config",
+]
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/Cargo.toml b/packages/hoppscotch-selfhost-web/webapp-server/Cargo.toml
new file mode 100644
index 000000000..09c387936
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/Cargo.toml
@@ -0,0 +1,26 @@
+[package]
+name = "webapp-server"
+version = "0.1.0"
+edition = "2021"
+publish = false
+
+[dependencies]
+axum = { version = "0.7" }
+base64 = "0.22.1"
+blake3 = { version = "1.5.4", features = ["serde"] }
+bytes = "1.8.0"
+chrono = { version = "0.4.38", features = ["serde"] }
+ed25519-dalek = { version = "2.1.1", features = ["rand_core", "serde"] }
+mime_guess = "2.0.5"
+rand = "0.8.5"
+rayon = "1.10.0"
+serde = { version = "1.0.215", features = ["derive"] }
+serde_json = "1.0.133"
+thiserror = "2.0.3"
+tokio = { version = "1.0", features = ["full"] }
+tower-http = { version = "0.6", features = ["compression-zstd", "fs", "trace"] }
+tracing = "0.1"
+tracing-subscriber = { version = "0.3", features = ["env-filter"] }
+walkdir = "2.5.0"
+zip = "2.2.0"
+zstd = "0.13.2"
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/README.md b/packages/hoppscotch-selfhost-web/webapp-server/README.md
new file mode 100644
index 000000000..277e00347
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/README.md
@@ -0,0 +1,33 @@
+# Hoppscotch Webapp Server
+
+A secure static web server for Hoppscotch Webapp with content bundling (`zstd` + `zip`) and verification (`blake3` + `ed25519`).
+
+## Quick Start
+
+```bash
+# Build from source
+cargo build --release
+
+# or use Docker
+docker build -t hoppscotch-webapp-server .
+```
+
+> [!note]
+> Configuration via environment variables:
+> - `FRONTEND_PATH`: UI assets build location
+> - `DEFAULT_PORT`: Server port (default: 3200)
+
+## API Endpoints
+
+- Health check: `GET /health`
+- Bundle manifest: `GET /api/v1/manifest`
+- Download bundle: `GET /api/v1/bundle`
+- Public key info: `GET /api/v1/key`
+
+## Development
+
+```bash
+cargo watch -x run # Dev build with hot reload
+cargo test # Run tests
+cargo build --release # Production build
+```
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/api/error.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/api/error.rs
new file mode 100644
index 000000000..681890bd2
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/api/error.rs
@@ -0,0 +1,46 @@
+use axum::http::StatusCode;
+use thiserror::Error;
+
+#[derive(Debug, Error)]
+pub enum ApiError {
+ #[error("Failed to download bundle: {0}")]
+ DownloadFailed(String),
+
+ #[error("Invalid request: {0}")]
+ InvalidRequest(String),
+
+ #[error(transparent)]
+ Bundle(#[from] crate::bundle::BundleError),
+
+ #[error(transparent)]
+ Json(#[from] serde_json::Error),
+
+ #[error(transparent)]
+ Axum(#[from] axum::Error),
+}
+
+pub type Result<T> = std::result::Result<T, ApiError>;
+
+impl axum::response::IntoResponse for ApiError {
+ fn into_response(self) -> axum::response::Response {
+ let (status, error_message) = match &self {
+ ApiError::DownloadFailed(_) => (StatusCode::INTERNAL_SERVER_ERROR, self.to_string()),
+ ApiError::InvalidRequest(_) => (StatusCode::BAD_REQUEST, self.to_string()),
+ _ => {
+ tracing::error!(error = ?self, "Internal server error");
+ (
+ StatusCode::INTERNAL_SERVER_ERROR,
+ "Internal server error".to_string(),
+ )
+ }
+ };
+
+ let body = serde_json::json!({
+ "success": false,
+ "error": error_message,
+ "code": status.as_u16()
+ });
+
+ (status, axum::Json(body)).into_response()
+ }
+}
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/api/handler.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/api/handler.rs
new file mode 100644
index 000000000..16d5cf2dd
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/api/handler.rs
@@ -0,0 +1,83 @@
+use std::sync::Arc;
+
+use axum::{
+ body::Body,
+ response::{IntoResponse, Response},
+ Json,
+};
+use base64::{engine::general_purpose::STANDARD, Engine};
+
+use super::error::{ApiError, Result};
+use super::model::{ApiResponse, BundleManifest, PublicKeyInfo};
+use crate::bundle::BundleManager;
+
+pub struct ApiHandler {
+ pub bundle_manager: Arc<BundleManager>,
+}
+
+impl ApiHandler {
+ pub fn new(bundle_manager: Arc<BundleManager>) -> Self {
+ Self { bundle_manager }
+ }
+
+ pub async fn get_manifest(&self) -> Result<impl IntoResponse> {
+ tracing::info!("Fetching bundle manifest");
+ let bundle = self.bundle_manager.bundle().await;
+
+ let version = bundle.metadata.version;
+ let created_at = bundle.metadata.created_at;
+ let signature = bundle.metadata.signature;
+ let manifest = bundle.metadata.manifest;
+
+ let manifest = BundleManifest {
+ version,
+ created_at,
+ signature,
+ manifest,
+ };
+
+ tracing::info!("Successfully retrieved bundle manifest");
+
+ Ok(Json(ApiResponse::ok(manifest)))
+ }
+
+ pub async fn download_bundle(&self) -> Result<impl IntoResponse> {
+ tracing::info!("Starting bundle download");
+ let bundle = self.bundle_manager.bundle().await;
+
+ let response = Response::builder()
+ .header("content-type", "application/zip")
+ .header("content-length", bundle.content.len().to_string())
+ .header("content-disposition", "attachment; filename=\"bundle.zip\"")
+ .body(Body::from(bundle.content.clone()))
+ .map_err(|e| {
+ tracing::error!(error = ?e, "Failed to create download response");
+ ApiError::DownloadFailed(e.to_string())
+ })?;
+
+ tracing::info!(
+ content_length = bundle.content.len(),
+ "Successfully prepared bundle for download"
+ );
+ Ok(response)
+ }
+
+ pub async fn key(&self) -> Result<impl IntoResponse> {
+ tracing::info!("Listing public key");
+ let server_config = self.bundle_manager.server_config();
+ let verifying_key = server_config.verifying_key;
+
+ let verifying_key = verifying_key.as_ref().ok_or_else(|| {
+ tracing::error!("No signing key configured");
+ ApiError::InvalidRequest("No signing key configured".into())
+ })?;
+
+ let verifying_key = STANDARD.encode(verifying_key.to_bytes());
+ tracing::debug!(verifying_key = ?verifying_key);
+
+ let key_info = PublicKeyInfo { key: verifying_key };
+
+ tracing::info!("Successfully retrieved public key info");
+ Ok(Json(ApiResponse::ok(key_info)))
+ }
+}
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/api/mod.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/api/mod.rs
new file mode 100644
index 000000000..f021f846f
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/api/mod.rs
@@ -0,0 +1,46 @@
+use std::sync::Arc;
+
+use axum::{extract::State, routing::get, Router};
+
+mod error;
+mod handler;
+mod model;
+
+use error::Result;
+use handler::ApiHandler;
+
+pub fn routes(bundle_manager: Arc<crate::bundle::BundleManager>) -> Router {
+ tracing::info!("Setting up API routes");
+ let handler = Arc::new(ApiHandler::new(bundle_manager));
+
+ let api_routes = Router::new()
+ .route("/api/v1/manifest", get(get_manifest))
+ .route("/api/v1/bundle", get(download_bundle))
+ .route("/api/v1/key", get(key))
+ .with_state(handler.clone());
+
+ // NOTE: A hack to allow subpath access override
+ let desktop_app_routes = Router::new()
+ .nest("/desktop-app-server", api_routes.clone());
+
+ api_routes.merge(desktop_app_routes)
+}
+
+async fn get_manifest(
+ State(handler): State<Arc<ApiHandler>>,
+) -> Result<impl axum::response::IntoResponse> {
+ tracing::debug!("Received request for bundle manifest");
+ handler.get_manifest().await
+}
+
+async fn download_bundle(
+ State(handler): State<Arc<ApiHandler>>,
+) -> Result<impl axum::response::IntoResponse> {
+ tracing::debug!("Received request to download bundle");
+ handler.download_bundle().await
+}
+
+async fn key(State(handler): State<Arc<ApiHandler>>) -> Result<impl axum::response::IntoResponse> {
+ tracing::debug!("Received request to list public keys");
+ handler.key().await
+}
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/api/model.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/api/model.rs
new file mode 100644
index 000000000..78fcf5b32
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/api/model.rs
@@ -0,0 +1,46 @@
+use chrono::{DateTime, Utc};
+use ed25519_dalek::Signature;
+use serde::Serialize;
+
+use crate::model::Manifest;
+
+#[derive(Debug, Serialize)]
+pub struct ApiResponse<T> {
+ pub success: bool,
+ pub data: T,
+}
+
+impl<T> ApiResponse<T> {
+ pub fn ok(data: T) -> Self {
+ Self {
+ success: true,
+ data,
+ }
+ }
+}
+
+#[derive(Debug, Serialize)]
+pub struct BundleManifest {
+ pub version: String,
+ pub created_at: DateTime<Utc>,
+ #[serde(with = "signature_serde")]
+ pub signature: Signature,
+ pub manifest: Manifest,
+}
+
+#[derive(Debug, Serialize)]
+pub struct PublicKeyInfo {
+ pub key: String,
+}
+
+mod signature_serde {
+ use super::*;
+ use base64::{engine::general_purpose::STANDARD, Engine};
+
+ pub fn serialize<S>(sig: &Signature, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: serde::Serializer,
+ {
+ serializer.serialize_str(&STANDARD.encode(sig.to_bytes()))
+ }
+}
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/builder.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/builder.rs
new file mode 100644
index 000000000..8cb613f75
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/builder.rs
@@ -0,0 +1,109 @@
+use rayon::prelude::*;
+use std::io::{Cursor, Write};
+use std::path::Path;
+use walkdir::WalkDir;
+use zip::{write::SimpleFileOptions, CompressionMethod, ZipWriter};
+
+use super::error::{BundleError, Result};
+use crate::model::FileEntry;
+
+pub struct BundleBuilder {
+ writer: ZipWriter<Cursor<Vec<u8>>>,
+ files: Vec<FileEntry>,
+}
+
+impl BundleBuilder {
+ pub fn new<P: AsRef<Path>>(frontend_path: P) -> Result<Self> {
+ let frontend_path = frontend_path.as_ref();
+
+ if !frontend_path.exists() {
+ return Err(BundleError::Config(format!(
+ "Frontend path {} does not exist",
+ frontend_path.display()
+ )));
+ }
+
+ struct FileInfo {
+ relative_path: String,
+ content: Vec<u8>,
+ hash: blake3::Hash,
+ size: u64,
+ mime_type: Option<String>,
+ }
+
+ let file_infos: Vec<FileInfo> = WalkDir::new(frontend_path)
+ .into_iter()
+ .filter_map(|entry| entry.ok())
+ .filter(|entry| entry.file_type().is_file())
+ .par_bridge()
+ .map(|entry| {
+ let path = entry.path();
+ let relative_path = path
+ .strip_prefix(frontend_path)
+ .unwrap()
+ .components()
+ .map(|comp| comp.as_os_str().to_string_lossy())
+ .collect::<Vec<_>>()
+ .join("/");
+
+ let content = std::fs::read(path).map_err(|e| {
+ BundleError::Config(format!("Failed to read file {}: {}", path.display(), e))
+ })?;
+
+ let hash = blake3::hash(&content);
+ let size = content.len() as u64;
+
+ let mime_type = mime_guess::from_path(path)
+ .first()
+ .map(|mime| mime.to_string());
+
+ Ok(FileInfo {
+ relative_path,
+ content,
+ hash,
+ size,
+ mime_type,
+ })
+ })
+ .collect::<Result<Vec<_>>>()?;
+
+ let mut builder = Self {
+ writer: ZipWriter::new(Cursor::new(Vec::new())),
+ files: Vec::with_capacity(file_infos.len()),
+ };
+
+ for file_info in file_infos {
+ let options = SimpleFileOptions::default()
+ .compression_method(CompressionMethod::Zstd)
+ .unix_permissions(0o644);
+
+ builder
+ .writer
+ .start_file(&file_info.relative_path, options)
+ .map_err(|e| BundleError::Config(format!("Failed to start file in zip: {}", e)))?;
+
+ builder
+ .writer
+ .write_all(&file_info.content)
+ .map_err(|e| BundleError::Config(format!("Failed to write file to zip: {}", e)))?;
+
+ builder.files.push(FileEntry {
+ path: file_info.relative_path,
+ size: file_info.size,
+ hash: file_info.hash,
+ mime_type: file_info.mime_type,
+ });
+ }
+
+ Ok(builder)
+ }
+
+ pub fn finish(self) -> Result<(Vec<u8>, Vec<FileEntry>)> {
+ let writer = self
+ .writer
+ .finish()
+ .map_err(|e| BundleError::Config(format!("Failed to finish zip archive: {}", e)))?;
+
+ Ok((writer.into_inner(), self.files))
+ }
+}
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/error.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/error.rs
new file mode 100644
index 000000000..500875530
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/error.rs
@@ -0,0 +1,36 @@
+use thiserror::Error;
+
+#[derive(Debug, Error)]
+pub enum BundleError {
+ #[error("Bundle not found: {0}")]
+ NotFound(String),
+
+ #[error("Bundle validation failed: {0}")]
+ ValidationFailed(String),
+
+ #[error("Path access error: {0}")]
+ PathAccess(String),
+
+ #[error("Unknown public key: {0}")]
+ UnknownKey(String),
+
+ #[error("Bundle too large: {size} bytes (max: {max} bytes)")]
+ TooLarge { size: usize, max: usize },
+
+ #[error("Configuration error: {0}")]
+ Config(String),
+
+ #[error(transparent)]
+ Io(#[from] std::io::Error),
+
+ #[error(transparent)]
+ Zip(#[from] zip::result::ZipError),
+
+ #[error(transparent)]
+ Serialization(#[from] serde_json::Error),
+
+ #[error(transparent)]
+ Signing(#[from] crate::signing::SigningError),
+}
+
+pub type Result<T> = std::result::Result<T, BundleError>;
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/manager.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/manager.rs
new file mode 100644
index 000000000..d8fe0f129
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/manager.rs
@@ -0,0 +1,68 @@
+use std::io::Cursor;
+use std::sync::Arc;
+
+use ed25519_dalek::Signer;
+use tokio::sync::RwLock;
+use zip::ZipArchive;
+
+use super::error::{BundleError, Result};
+use super::model::Bundle;
+use crate::config::ServerConfig;
+use crate::model::FileEntry;
+
+#[derive(Clone)]
+pub struct BundleManager {
+ current_bundle: Arc<RwLock<Bundle>>,
+ config: Arc<ServerConfig>,
+}
+
+impl BundleManager {
+ pub fn new(config: Arc<ServerConfig>, content: Vec<u8>, files: Vec<FileEntry>) -> Result<Self> {
+ tracing::info!("Initializing BundleManager with a new bundle");
+
+ { content.len() <= config.max_bundle_size }
+ .then_some(())
+ .ok_or_else(|| {
+ let err = BundleError::TooLarge {
+ size: content.len(),
+ max: config.max_bundle_size,
+ };
+ tracing::error!(
+ size = content.len(),
+ max_size = config.max_bundle_size,
+ "Bundle exceeds size limit"
+ );
+ err
+ })?;
+
+ ZipArchive::new(Cursor::new(&content)).map_err(|e| {
+ tracing::error!(error = ?e, "Invalid ZIP archive");
+ BundleError::Zip(e)
+ })?;
+
+ let signing_key = config.signing_key.as_ref().ok_or_else(|| {
+ tracing::error!("No signing key configured");
+ BundleError::Config("No signing key configured".into())
+ })?;
+ let signature = signing_key.sign(&content);
+
+ let bundle_version = &config.bundle_version;
+ let bundle = Bundle::new(bundle_version.clone(), content, signature, files);
+ tracing::info!("Successfully created initial bundle");
+
+ Ok(Self {
+ current_bundle: Arc::new(RwLock::new(bundle)),
+ config,
+ })
+ }
+
+ pub fn server_config(&self) -> &ServerConfig {
+ tracing::info!("Retrieving the current config");
+ &self.config
+ }
+
+ pub async fn bundle(&self) -> Bundle {
+ tracing::info!("Retrieving the current bundle");
+ self.current_bundle.read().await.clone()
+ }
+}
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/mod.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/mod.rs
new file mode 100644
index 000000000..9c2c4f0f5
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/mod.rs
@@ -0,0 +1,8 @@
+mod builder;
+mod error;
+mod manager;
+mod model;
+
+pub use builder::BundleBuilder;
+pub use error::BundleError;
+pub use manager::BundleManager;
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/model.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/model.rs
new file mode 100644
index 000000000..1620c9f14
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/bundle/model.rs
@@ -0,0 +1,58 @@
+use chrono::{DateTime, Utc};
+use ed25519_dalek::Signature;
+use serde::{Deserialize, Serialize};
+
+use crate::model::{FileEntry, Manifest};
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct BundleMetadata {
+ pub version: String,
+ pub created_at: DateTime<Utc>,
+ #[serde(with = "signature_serde")]
+ pub signature: Signature,
+ pub manifest: Manifest,
+}
+
+mod signature_serde {
+ use super::*;
+ use base64::{engine::general_purpose::STANDARD, Engine};
+
+ pub fn serialize<S>(sig: &Signature, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: serde::Serializer,
+ {
+ serializer.serialize_str(&STANDARD.encode(sig.to_bytes()))
+ }
+
+ pub fn deserialize<'de, D>(deserializer: D) -> Result<Signature, D::Error>
+ where
+ D: serde::Deserializer<'de>,
+ {
+ use serde::de::Error;
+ let s = String::deserialize(deserializer)?;
+ let bytes = STANDARD.decode(&s).map_err(D::Error::custom)?;
+ let bytes: [u8; 64] = bytes
+ .try_into()
+ .map_err(|_| D::Error::custom("invalid signature length"))?;
+ Ok(Signature::from_bytes(&bytes))
+ }
+}
+
+#[derive(Debug, Clone)]
+pub struct Bundle {
+ pub metadata: BundleMetadata,
+ pub content: Vec<u8>,
+}
+
+impl Bundle {
+ pub fn new(bundle_version: Option<String>, content: Vec<u8>, signature: Signature, files: Vec<FileEntry>) -> Self {
+ let metadata = BundleMetadata {
+ version: bundle_version.unwrap_or_else(|| env!("CARGO_PKG_VERSION").to_string()),
+ created_at: Utc::now(),
+ signature,
+ manifest: Manifest { files },
+ };
+
+ Self { metadata, content }
+ }
+}
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/config.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/config.rs
new file mode 100644
index 000000000..51948f2b1
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/config.rs
@@ -0,0 +1,88 @@
+use ed25519_dalek::{SigningKey, VerifyingKey};
+use serde::{Deserialize, Serialize};
+
+use crate::signing::SigningKeyPair;
+
+pub const DEFAULT_MAX_BUNDLE_SIZE: usize = 50 * 1024 * 1024; // 50MB
+pub const DEFAULT_PORT: u16 = 3200;
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ServerConfig {
+ #[serde(default = "default_port")]
+ pub port: u16,
+
+ #[serde(default = "default_max_bundle_size")]
+ pub max_bundle_size: usize,
+
+ #[serde(default)]
+ pub bundle_version: Option<String>,
+
+ #[serde(default)]
+ pub csp_directives: Option<String>,
+
+ #[serde(skip)]
+ pub signing_key: Option<SigningKey>,
+
+ #[serde(skip)]
+ pub verifying_key: Option<VerifyingKey>,
+
+ #[serde(default = "default_frontend_path")]
+ pub frontend_path: String,
+
+ #[serde(default = "default_is_dev")]
+ pub is_dev: bool,
+}
+
+fn default_port() -> u16 {
+ DEFAULT_PORT
+}
+
+fn default_max_bundle_size() -> usize {
+ DEFAULT_MAX_BUNDLE_SIZE
+}
+
+fn default_frontend_path() -> String {
+ "/site/selfhost-web".to_string()
+}
+
+fn default_is_dev() -> bool {
+ false
+}
+
+impl Default for ServerConfig {
+ fn default() -> Self {
+ Self {
+ port: default_port(),
+ max_bundle_size: default_max_bundle_size(),
+ bundle_version: None,
+ csp_directives: None,
+ signing_key: None,
+ verifying_key: None,
+ frontend_path: default_frontend_path(),
+ is_dev: default_is_dev(),
+ }
+ }
+}
+
+impl ServerConfig {
+ pub fn load(key_pair: SigningKeyPair) -> Self {
+ let frontend_path = if cfg!(debug_assertions) {
+ "../dist".to_string()
+ } else {
+ "/site/selfhost-web".to_string()
+ };
+
+ Self {
+ signing_key: Some(key_pair.signing_key),
+ verifying_key: Some(key_pair.verifying_key),
+ bundle_version: std::env::var("WEBAPP_BUNDLE_VERSION").ok(),
+ frontend_path,
+ is_dev: cfg!(debug_assertions),
+ ..Default::default()
+ }
+ }
+
+ pub fn frontend_path(&self) -> &str {
+ &self.frontend_path
+ }
+}
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/error.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/error.rs
new file mode 100644
index 000000000..c92ab4569
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/error.rs
@@ -0,0 +1,125 @@
+use axum::{
+ http::StatusCode,
+ response::{IntoResponse, Response},
+ Json,
+};
+use serde::Serialize;
+
+pub type Result<T> = std::result::Result<T, Error>;
+
+#[derive(Debug, thiserror::Error)]
+pub enum Error {
+ #[error(transparent)]
+ Io(#[from] std::io::Error),
+
+ #[error("Bundle not found: {0}")]
+ BundleNotFound(String),
+
+ #[error("Validation error: {0}")]
+ ValidationError(String),
+
+ #[error("Configuration error: {0}")]
+ Config(String),
+
+ #[error(transparent)]
+ Bundle(#[from] crate::bundle::BundleError),
+
+ #[error(transparent)]
+ Signing(#[from] crate::signing::SigningError),
+
+ #[error(transparent)]
+ SerdeJson(#[from] serde_json::Error),
+
+ #[error(transparent)]
+ Axum(#[from] axum::Error),
+
+ #[error(transparent)]
+ Http(#[from] axum::http::Error),
+}
+
+#[derive(Serialize)]
+struct ErrorResponse {
+ success: bool,
+ error: String,
+ code: u16,
+}
+
+impl IntoResponse for Error {
+ fn into_response(self) -> Response {
+ let (status, error_message) = match &self {
+ Error::BundleNotFound(name) => {
+ tracing::warn!(bundle_name = %name, "Bundle not found");
+ (StatusCode::NOT_FOUND, self.to_string())
+ }
+ Error::ValidationError(msg) => {
+ tracing::warn!(message = %msg, "Validation error");
+ (StatusCode::BAD_REQUEST, self.to_string())
+ }
+ Error::Bundle(crate::bundle::BundleError::NotFound(msg)) => {
+ tracing::warn!(message = %msg, "Bundle not found");
+ (StatusCode::NOT_FOUND, msg.clone())
+ }
+ Error::Bundle(crate::bundle::BundleError::ValidationFailed(msg)) => {
+ tracing::warn!(message = %msg, "Bundle validation failed");
+ (StatusCode::BAD_REQUEST, msg.clone())
+ }
+ Error::Config(msg) => {
+ tracing::error!(error = %msg, "Configuration error");
+ (StatusCode::INTERNAL_SERVER_ERROR, self.to_string())
+ }
+ _ => {
+ tracing::error!(error = ?self, "Internal server error");
+ (
+ StatusCode::INTERNAL_SERVER_ERROR,
+ "Internal server error".to_string(),
+ )
+ }
+ };
+
+ let body = ErrorResponse {
+ success: false,
+ error: error_message,
+ code: status.as_u16(),
+ };
+
+ tracing::debug!(
+ status = %status,
+ error = %body.error,
+ code = body.code,
+ "Generating error response"
+ );
+
+ (status, Json(body)).into_response()
+ }
+}
+
+impl From<Error> for StatusCode {
+ fn from(error: Error) -> Self {
+ match error {
+ Error::BundleNotFound(_) => StatusCode::NOT_FOUND,
+ Error::ValidationError(_) => StatusCode::BAD_REQUEST,
+ Error::Bundle(crate::bundle::BundleError::NotFound(_)) => StatusCode::NOT_FOUND,
+ Error::Bundle(crate::bundle::BundleError::ValidationFailed(_)) => {
+ StatusCode::BAD_REQUEST
+ }
+ _ => StatusCode::INTERNAL_SERVER_ERROR,
+ }
+ }
+}
+
+impl Error {
+ pub fn is_not_found(&self) -> bool {
+ matches!(
+ self,
+ Error::BundleNotFound(_) | Error::Bundle(crate::bundle::BundleError::NotFound(_))
+ )
+ }
+
+ pub fn is_validation_error(&self) -> bool {
+ matches!(
+ self,
+ Error::ValidationError(_)
+ | Error::Bundle(crate::bundle::BundleError::ValidationFailed(_))
+ )
+ }
+}
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/main.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/main.rs
new file mode 100644
index 000000000..893062152
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/main.rs
@@ -0,0 +1,69 @@
+use std::net::SocketAddr;
+use std::path::Path;
+
+use axum::{http::StatusCode, routing::get, Router};
+use tower_http::trace::TraceLayer;
+use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
+
+mod api;
+mod bundle;
+mod config;
+mod error;
+mod model;
+mod signing;
+
+use bundle::{BundleBuilder, BundleManager};
+use config::{ServerConfig, DEFAULT_PORT};
+use signing::SigningKeyPair;
+
+#[tokio::main]
+async fn main() -> error::Result<()> {
+ tracing_subscriber::registry()
+ .with(
+ tracing_subscriber::EnvFilter::try_from_default_env()
+ .unwrap_or_else(|_| "info,tower_http=debug".into()),
+ )
+ .with(tracing_subscriber::fmt::layer().without_time())
+ .init();
+
+ tracing::info!("Initializing Hoppscotch Web Static Server");
+
+ let key_pair = SigningKeyPair::new();
+ tracing::debug!("Generated new signing key pair");
+
+ let config = ServerConfig::load(key_pair);
+ tracing::debug!(?config, "Configuration loaded successfully");
+
+ let frontend_path = Path::new(config.frontend_path()).canonicalize()?;
+ if !frontend_path.exists() {
+ tracing::error!(?frontend_path, "Frontend path does not exist");
+ panic!("Frontend path does not exist");
+ }
+ tracing::info!(?frontend_path, "Frontend path verified");
+
+ let builder = BundleBuilder::new(&frontend_path)?;
+ tracing::info!(?frontend_path, "Initialized bundle builder from path",);
+
+ let (content, files) = builder.finish()?;
+ tracing::info!("Bundle built successfully with {} files", files.len());
+
+ tracing::debug!("Initialized bundle manager");
+ let bundle_manager = BundleManager::new(config.into(), content, files)?;
+ tracing::info!("Bundle signed and stored successfully in the bundle manager");
+
+ let app = Router::new()
+ .route("/health", get(|| async { StatusCode::OK }))
+ .merge(api::routes(bundle_manager.into()))
+ .layer(TraceLayer::new_for_http());
+
+ let addr = SocketAddr::from(([0, 0, 0, 0], DEFAULT_PORT));
+ tracing::info!("Attempting to bind to address: {}", addr);
+
+ let listener = tokio::net::TcpListener::bind(addr).await?;
+ tracing::info!("Server successfully bound to {}", listener.local_addr()?);
+
+ tracing::info!("Starting server");
+ axum::serve(listener, app).await?;
+
+ Ok(())
+}
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/model.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/model.rs
new file mode 100644
index 000000000..fb15fb036
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/model.rs
@@ -0,0 +1,42 @@
+use blake3::Hash;
+use serde::{Deserialize, Serialize};
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct FileEntry {
+ pub path: String,
+ pub size: u64,
+ #[serde(with = "hash_serde")]
+ pub hash: Hash,
+ pub mime_type: Option<String>,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct Manifest {
+ pub files: Vec<FileEntry>,
+}
+
+mod hash_serde {
+ use super::*;
+ use base64::{engine::general_purpose::STANDARD, Engine};
+ use blake3::Hash;
+
+ pub fn serialize<S>(hash: &Hash, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: serde::Serializer,
+ {
+ serializer.serialize_str(&STANDARD.encode(hash.as_bytes()))
+ }
+
+ pub fn deserialize<'de, D>(deserializer: D) -> Result<Hash, D::Error>
+ where
+ D: serde::Deserializer<'de>,
+ {
+ use serde::de::Error;
+ let s = String::deserialize(deserializer)?;
+ let bytes = STANDARD.decode(&s).map_err(D::Error::custom)?;
+ let bytes: [u8; 32] = bytes
+ .try_into()
+ .map_err(|_| D::Error::custom("invalid hash length"))?;
+ Ok(Hash::from_bytes(bytes))
+ }
+}
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/signing/error.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/signing/error.rs
new file mode 100644
index 000000000..2e959f29b
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/signing/error.rs
@@ -0,0 +1,51 @@
+use base64::DecodeError;
+use thiserror::Error;
+
+#[derive(Debug, Error)]
+pub enum SigningError {
+ #[error("Environment variable not found")]
+ EnvVarMissing,
+
+ #[error("Invalid base64 encoding: {0}")]
+ InvalidBase64(#[from] DecodeError),
+
+ #[error("Invalid key length: expected 32 bytes")]
+ InvalidKeyLength,
+
+ #[error("Invalid signature")]
+ InvalidSignature,
+
+ #[error("Invalid key format: {0}")]
+ InvalidKeyFormat(String),
+
+ #[error("Signature verification failed: {0}")]
+ VerificationFailed(String),
+
+ #[error("Key generation failed: {0}")]
+ GenerationFailed(String),
+}
+
+impl SigningError {
+ pub fn is_invalid_signature(&self) -> bool {
+ matches!(
+ self,
+ SigningError::InvalidSignature | SigningError::VerificationFailed(_)
+ )
+ }
+
+ pub fn is_configuration_error(&self) -> bool {
+ matches!(
+ self,
+ SigningError::EnvVarMissing
+ | SigningError::InvalidKeyFormat(_)
+ | SigningError::InvalidKeyLength
+ )
+ }
+}
+
+impl From<ed25519_dalek::SignatureError> for SigningError {
+ fn from(err: ed25519_dalek::SignatureError) -> Self {
+ tracing::error!(error = ?err, "Signature verification failed");
+ SigningError::InvalidSignature
+ }
+}
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/signing/key.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/signing/key.rs
new file mode 100644
index 000000000..a3a293dbc
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/signing/key.rs
@@ -0,0 +1,37 @@
+use base64::{engine::general_purpose::STANDARD, Engine};
+use chrono::Utc;
+use ed25519_dalek::{SigningKey, VerifyingKey};
+
+#[derive(Debug, Clone)]
+pub struct SigningKeyPair {
+ pub signing_key: SigningKey,
+ pub verifying_key: VerifyingKey,
+ pub key_id: String,
+}
+
+impl SigningKeyPair {
+ pub fn new() -> Self {
+ tracing::info!("Generating new signing key pair");
+
+ let signing_key = SigningKey::generate(&mut rand::rngs::OsRng);
+ let verifying_key = VerifyingKey::from(&signing_key);
+
+ let key_id = format!("key_{}", Utc::now().format("%Y%m%d_%H%M%S"));
+
+ tracing::info!(key_id = %key_id, "Generated new signing key pair");
+ tracing::info!(signing_key_bytes_encoded = ?STANDARD.encode(signing_key.to_bytes()));
+ tracing::info!(verifying_key_bytes_encoded = ?STANDARD.encode(verifying_key.to_bytes()));
+
+ Self {
+ signing_key,
+ verifying_key,
+ key_id,
+ }
+ }
+}
+
+impl std::fmt::Display for SigningKeyPair {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "SigningKeyPair(id: {})", self.key_id)
+ }
+}
diff --git a/packages/hoppscotch-selfhost-web/webapp-server/src/signing/mod.rs b/packages/hoppscotch-selfhost-web/webapp-server/src/signing/mod.rs
new file mode 100644
index 000000000..1190add77
--- /dev/null
+++ b/packages/hoppscotch-selfhost-web/webapp-server/src/signing/mod.rs
@@ -0,0 +1,5 @@
+mod error;
+mod key;
+
+pub use error::SigningError;
+pub use key::SigningKeyPair;
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 5efdee6ec..91475fb83 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -29,13 +29,13 @@ importers:
devDependencies:
'@commitlint/cli':
specifier: 19.5.0
- version: 19.5.0(@types/[email protected])([email protected])
+ version: 19.5.0(@types/[email protected])([email protected])
'@commitlint/config-conventional':
specifier: 19.5.0
version: 19.5.0
'@hoppscotch/ui':
specifier: 0.2.2
'@types/node':
specifier: 22.7.6
version: 22.7.6
@@ -100,6 +100,9 @@ importers:
fp-ts:
specifier: ^2.16.9
version: 2.16.9
+ lodash-es:
+ specifier: 4.17.21
+ version: 4.17.21
vue:
specifier: 3.5.12
version: 3.5.12([email protected])
@@ -110,6 +113,9 @@ importers:
'@tauri-apps/cli':
specifier: ^2.0.3
version: 2.0.4
+ '@types/lodash-es':
+ specifier: 4.17.12
+ version: 4.17.12
'@types/node':
specifier: ^22.7.5
version: 22.7.5
@@ -444,13 +450,13 @@ importers:
version: 7.6.3
tsup:
specifier: 8.3.0
typescript:
specifier: 5.6.3
version: 5.6.3
vitest:
specifier: 2.1.2
packages/hoppscotch-common:
dependencies:
@@ -505,9 +511,15 @@ importers:
'@hoppscotch/js-sandbox':
specifier: workspace:^
version: link:../hoppscotch-js-sandbox
+ '@hoppscotch/kernel':
+ specifier: workspace:^
+ version: link:../hoppscotch-kernel
+ '@hoppscotch/plugin-appload':
+ specifier: github:CuriousCorrelation/tauri-plugin-appload
+ version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/2faadf6528d175f0fe3a0861bcda2025030b856b'
'@hoppscotch/ui':
specifier: 0.2.2
'@hoppscotch/vue-toasted':
specifier: 0.1.0
@@ -523,6 +535,9 @@ importers:
'@shopify/lang-jsonc':
specifier: 1.0.0
version: 1.0.0
+ '@tauri-apps/plugin-store':
+ specifier: 2.2.0
+ version: 2.2.0
'@types/markdown-it':
specifier: 14.1.2
version: 14.1.2
@@ -576,7 +591,7 @@ importers:
version: 16.9.0
graphql-language-service-interface:
specifier: 2.10.2
- version: 2.10.2(@types/[email protected])([email protected])
+ version: 2.10.2(@types/[email protected])([email protected])
graphql-tag:
specifier: 2.12.6
version: 2.12.6([email protected])
@@ -661,6 +676,9 @@ importers:
subscriptions-transport-ws:
specifier: 0.11.0
version: 0.11.0([email protected])
+ superjson:
+ specifier: 2.2.2
+ version: 2.2.2
tern:
specifier: 0.24.3
version: 0.24.3
@@ -727,7 +745,7 @@ importers:
version: 5.0.3([email protected])
'@graphql-codegen/cli':
specifier: 5.0.3
'@graphql-codegen/typed-document-node':
specifier: 5.0.10
version: 5.0.10([email protected])
@@ -751,7 +769,7 @@ importers:
version: 1.2.9
'@intlify/vite-plugin-vue-i18n':
specifier: 7.0.0
'@relmify/jest-fp-ts':
specifier: 2.1.1
@@ -802,7 +820,7 @@ importers:
version: 6.5.1([email protected])
'@vitejs/plugin-vue':
specifier: 5.1.4
'@vue/compiler-sfc':
specifier: 3.5.12
version: 3.5.12
@@ -859,13 +877,13 @@ importers:
version: 1.79.5
tailwindcss:
specifier: 3.4.14
typescript:
specifier: 5.3.3
version: 5.3.3
unplugin-fonts:
specifier: 1.1.1
unplugin-icons:
specifier: 0.19.3
@@ -874,31 +892,31 @@ importers:
vite:
specifier: 5.4.9
vite-plugin-checker:
specifier: 0.6.4
vite-plugin-fonts:
specifier: 0.7.0
vite-plugin-html-config:
specifier: 2.0.2
vite-plugin-pages:
specifier: 0.32.3
vite-plugin-pages-sitemap:
specifier: 1.7.1
version: 1.7.1
vite-plugin-pwa:
specifier: 0.20.5
vite-plugin-vue-layouts:
specifier: 0.11.0
vitest:
specifier: 2.1.3
vue-tsc:
specifier: 1.8.24
version: 1.8.24([email protected])
@@ -938,7 +956,149 @@ importers:
version: 5.6.3
vite:
specifier: 5.4.9
+
+ packages/hoppscotch-desktop:
+ dependencies:
+ '@fontsource-variable/inter':
+ specifier: 5.1.0
+ version: 5.1.0
+ '@fontsource-variable/material-symbols-rounded':
+ specifier: 5.1.3
+ version: 5.1.3
+ '@fontsource-variable/roboto-mono':
+ specifier: 5.1.0
+ version: 5.1.0
+ '@hoppscotch/kernel':
+ specifier: workspace:^
+ version: link:../hoppscotch-kernel
+ '@hoppscotch/plugin-appload':
+ specifier: github:CuriousCorrelation/tauri-plugin-appload
+ version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/2faadf6528d175f0fe3a0861bcda2025030b856b'
+ '@hoppscotch/ui':
+ specifier: 0.2.1
+ '@tauri-apps/api':
+ specifier: 2.1.1
+ version: 2.1.1
+ '@tauri-apps/plugin-shell':
+ specifier: 2.0.1
+ version: 2.0.1
+ '@tauri-apps/plugin-store':
+ specifier: 2.2.0
+ version: 2.2.0
+ '@vueuse/core':
+ specifier: 11.1.0
+ fp-ts:
+ specifier: 2.16.9
+ version: 2.16.9
+ vue:
+ specifier: 3.5.12
+ version: 3.5.12([email protected])
+ vue-router:
+ specifier: 4.4.5
+ vue-tippy:
+ specifier: 6.5.0
+ devDependencies:
+ '@iconify-json/lucide':
+ specifier: 1.2.10
+ version: 1.2.10
+ '@tauri-apps/cli':
+ specifier: ^2
+ version: 2.0.4
+ '@vitejs/plugin-vue':
+ specifier: ^5.0.5
+ autoprefixer:
+ specifier: 10.4.20
+ version: 10.4.20([email protected])
+ postcss:
+ specifier: 8.4.49
+ version: 8.4.49
+ sass:
+ specifier: 1.80.3
+ version: 1.80.3
+ tailwindcss:
+ specifier: 3.4.14
+ typescript:
+ specifier: ^5.2.2
+ version: 5.7.2
+ unplugin-icons:
+ specifier: 0.19.3
+ unplugin-vue-components:
+ specifier: 0.27.4
+ vite:
+ specifier: ^5.3.1
+ vue-tsc:
+ specifier: ^2.2.0
+ version: 2.2.0([email protected])
+
+ packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload:
+ dependencies:
+ '@tauri-apps/api':
+ specifier: ^2.0.0
+ version: 2.1.1
+ devDependencies:
+ '@rollup/plugin-typescript':
+ specifier: ^11.1.6
+ rollup:
+ specifier: ^4.9.6
+ version: 4.24.0
+ tslib:
+ specifier: ^2.6.2
+ version: 2.8.0
+ typescript:
+ specifier: ^5.3.3
+ version: 5.7.2
+
+ packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app:
+ dependencies:
+ '@tauri-apps/api':
+ specifier: ^2.0.0-alpha.11
+ version: 2.1.1
+ tauri-plugin-appload-api:
+ specifier: file:../../
+ version: link:../..
+ devDependencies:
+ '@sveltejs/vite-plugin-svelte':
+ specifier: ^1.0.1
+ '@tauri-apps/cli':
+ specifier: ^2.0.0-alpha.17
+ version: 2.0.4
+ svelte:
+ specifier: ^3.49.0
+ version: 3.59.2
+ vite:
+ specifier: ^3.0.2
+
+ packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay:
+ dependencies:
+ '@tauri-apps/api':
+ specifier: ^2.0.0
+ version: 2.1.1
+ devDependencies:
+ '@rollup/plugin-typescript':
+ specifier: ^11.1.6
+ rollup:
+ specifier: ^4.9.6
+ version: 4.24.0
+ tslib:
+ specifier: ^2.6.2
+ version: 2.8.0
+ typescript:
+ specifier: ^5.3.3
+ version: 5.7.2
packages/hoppscotch-js-sandbox:
dependencies:
@@ -1007,6 +1167,52 @@ importers:
specifier: 2.1.3
+ packages/hoppscotch-kernel:
+ dependencies:
+ '@hoppscotch/plugin-relay':
+ specifier: github:CuriousCorrelation/tauri-plugin-relay
+ version: '@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/bbf25139962fd59b6e0c09f2a8034df29ac10bdf'
+ '@tauri-apps/api':
+ specifier: 2.1.1
+ version: 2.1.1
+ '@tauri-apps/plugin-dialog':
+ specifier: 2.0.1
+ version: 2.0.1
+ '@tauri-apps/plugin-fs':
+ specifier: 2.0.2
+ version: 2.0.2
+ '@tauri-apps/plugin-shell':
+ specifier: 2.0.1
+ version: 2.0.1
+ '@tauri-apps/plugin-store':
+ specifier: 2.2.0
+ version: 2.2.0
+ aws4fetch:
+ specifier: 1.0.20
+ version: 1.0.20
+ axios:
+ specifier: 1.6.2
+ version: 1.6.2
+ fp-ts:
+ specifier: 2.16.9
+ version: 2.16.9
+ superjson:
+ specifier: 2.2.2
+ version: 2.2.2
+ zod:
+ specifier: 3.22.4
+ version: 3.22.4
+ devDependencies:
+ '@types/node':
+ specifier: 22.9.3
+ version: 22.9.3
+ typescript:
+ specifier: 5.7.2
+ version: 5.7.2
+ vite:
+ specifier: 5.4.11
+
packages/hoppscotch-selfhost-desktop:
dependencies:
'@fontsource-variable/inter':
@@ -1119,8 +1325,8 @@ importers:
specifier: 1.1.144
version: 1.1.144
'@intlify/vite-plugin-vue-i18n':
- specifier: 6.0.1
+ specifier: 7.0.0
'@rushstack/eslint-patch':
specifier: 1.3.3
version: 1.3.3
@@ -1226,18 +1432,39 @@ importers:
'@hoppscotch/data':
specifier: workspace:^
version: link:../hoppscotch-data
+ '@hoppscotch/kernel':
+ specifier: workspace:^
+ version: link:../hoppscotch-kernel
'@hoppscotch/ui':
specifier: 0.2.1
'@import-meta-env/unplugin':
specifier: 0.6.0
version: 0.6.0(@import-meta-env/[email protected])([email protected])
+ '@tauri-apps/api':
+ specifier: 2.1.1
+ version: 2.1.1
+ '@tauri-apps/plugin-dialog':
+ specifier: 2.0.1
+ version: 2.0.1
+ '@tauri-apps/plugin-fs':
+ specifier: 2.0.2
+ version: 2.0.2
+ '@tauri-apps/plugin-shell':
+ specifier: 2.0.1
+ version: 2.0.1
+ '@vueuse/core':
+ specifier: 10.5.0
axios:
specifier: 1.7.7
version: 1.7.7
buffer:
specifier: 6.0.3
version: 6.0.3
+ dioc:
+ specifier: 3.0.2
fp-ts:
specifier: 2.16.9
version: 2.16.9
@@ -1271,7 +1498,7 @@ importers:
version: 5.0.3([email protected])
'@graphql-codegen/cli':
specifier: 5.0.3
'@graphql-codegen/typed-document-node':
specifier: 5.0.10
version: 5.0.10([email protected])
@@ -1295,7 +1522,7 @@ importers:
version: 1.2.8
'@intlify/vite-plugin-vue-i18n':
specifier: 7.0.0
'@rushstack/eslint-patch':
specifier: 1.10.4
version: 1.10.4
@@ -1310,10 +1537,10 @@ importers:
version: 6.5.1([email protected])
'@vitejs/plugin-legacy':
specifier: 5.4.2
'@vitejs/plugin-vue':
specifier: 5.1.4
'@vue/eslint-config-typescript':
specifier: 13.0.0
@@ -1343,13 +1570,13 @@ importers:
version: 0.6.8([email protected])
tailwindcss:
specifier: 3.4.13
typescript:
specifier: 5.3.3
version: 5.3.3
unplugin-fonts:
specifier: 1.1.1
unplugin-icons:
specifier: 0.19.3
@@ -1358,31 +1585,31 @@ importers:
vite:
specifier: 5.4.9
vite-plugin-fonts:
specifier: 0.7.0
vite-plugin-html-config:
specifier: 2.0.2
vite-plugin-inspect:
specifier: 0.8.7
vite-plugin-pages:
specifier: 0.32.3
vite-plugin-pages-sitemap:
specifier: 1.7.1
version: 1.7.1
vite-plugin-pwa:
specifier: 0.20.5
vite-plugin-static-copy:
specifier: 2.0.0
vite-plugin-vue-layouts:
specifier: 0.11.0
vue-tsc:
specifier: 2.1.6
version: 2.1.6([email protected])
@@ -1403,7 +1630,7 @@ importers:
version: 3.2.0([email protected])
'@hoppscotch/ui':
specifier: 0.2.1
'@hoppscotch/vue-toasted':
specifier: 0.1.0
@@ -1454,13 +1681,13 @@ importers:
version: 7.8.1
tailwindcss:
specifier: 3.4.14
tippy.js:
specifier: 6.3.7
version: 6.3.7
ts-node-dev:
specifier: 2.0.0
unplugin-icons:
specifier: 0.19.3
@@ -1482,7 +1709,7 @@ importers:
devDependencies:
'@graphql-codegen/cli':
specifier: 5.0.3
'@graphql-codegen/client-preset':
specifier: 4.4.0
version: 4.4.0([email protected])
@@ -1518,7 +1745,7 @@ importers:
version: 4.17.12
'@vitejs/plugin-vue':
specifier: 5.1.4
'@vue/compiler-sfc':
specifier: 3.5.12
version: 3.5.12
@@ -1539,22 +1766,22 @@ importers:
version: 1.80.3
ts-node:
specifier: 10.9.2
typescript:
specifier: 5.6.3
version: 5.6.3
unplugin-fonts:
specifier: 1.1.1
vite:
specifier: 5.4.9
vite-plugin-pages:
specifier: 0.32.3
vite-plugin-vue-layouts:
specifier: 0.11.0
vue-tsc:
specifier: 2.1.6
version: 2.1.6([email protected])
@@ -1569,6 +1796,14 @@ packages:
graphql:
optional: true
+ '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/2faadf6528d175f0fe3a0861bcda2025030b856b':
+ resolution: {tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/2faadf6528d175f0fe3a0861bcda2025030b856b}
+ version: 0.1.0
+
+ '@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/bbf25139962fd59b6e0c09f2a8034df29ac10bdf':
+ resolution: {tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/bbf25139962fd59b6e0c09f2a8034df29ac10bdf}
+ version: 0.1.0
+
resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==}
engines: {node: '>=10'}
@@ -2639,6 +2874,12 @@ packages:
cpu: [arm64]
os: [android]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==}
+ engines: {node: '>=12'}
+ cpu: [arm]
+ os: [android]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==}
engines: {node: '>=12'}
@@ -2909,6 +3150,12 @@ packages:
cpu: [ia32]
os: [linux]
+ '@esbuild/[email protected]':
+ resolution: {integrity: sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ==}
+ engines: {node: '>=12'}
+ cpu: [loong64]
+ os: [linux]
+
'@esbuild/[email protected]':
resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==}
engines: {node: '>=12'}
@@ -3333,6 +3580,7 @@ packages:
'@faker-js/[email protected]':
resolution: {integrity: sha512-R11tGE6yIFwqpaIqcfkcg7AICXzFg14+5h5v0TfF/9+RMDL6jhzCy/pxHVOfbALGdtVYdt6JdR21tuxEgl34dw==}
+ deprecated: Please update to a newer version.
'@fontsource-variable/[email protected]':
resolution: {integrity: sha512-CdQPQQgOVxg6ifmbrqYZeUqtQf7p2wPn6EvJ4M+vdNnsmYZgYwPPPQDNlIOU7LCUlSGaN26v6H0uA030WKn61g==}
@@ -3880,18 +4128,6 @@ packages:
vue-i18n:
optional: true
- '@intlify/[email protected]':
- resolution: {integrity: sha512-+/RBsYWbiZcs97RyVb4mrsSrLmIMaI6evj30jI9f1psjXx+syRbf0ab63I5SIz290EOm6TE80fTst/Xjel+D9w==}
- engines: {node: '>= 14.16'}
- peerDependencies:
- petite-vue-i18n: '*'
- vue-i18n: '*'
- peerDependenciesMeta:
- petite-vue-i18n:
- optional: true
- vue-i18n:
- optional: true
-
'@intlify/[email protected]':
resolution: {integrity: sha512-xVaMrgbr60fYE1Jkq+k6grs2ZoXqh1EU71RVKkHkKh3KP7T6OYtG1Vbp1T09/jCUbv1GBd8Ir5WdZDyN+e8BpQ==}
engines: {node: '>= 18'}
@@ -3916,10 +4152,6 @@ packages:
resolution: {integrity: sha512-TGw2uBfuTFTegZf/BHtUQBEKxl7Q/dVGLoqRIdw8lFsp9g/53sYn5iD+0HxIzdYjbWL6BTJMXCPUHp9PxDTRPw==}
engines: {node: '>= 16'}
- '@intlify/[email protected]':
- resolution: {integrity: sha512-hwqQXyTnDzAVZ300SU31jO0+3OJbpOdfVU6iBkrmNpS7t2HRnVACo0EwcEXzJa++4EVDreqz5OeqJbt+PeSGGA==}
- engines: {node: '>= 16'}
-
'@intlify/[email protected]':
resolution: {integrity: sha512-ukFn0I01HsSgr3VYhYcvkTCLS7rGa0gw4A4AMpcy/A9xx/zRJy7PS2BElMXLwUazVFMAr5zuiTk3MQeoeGXaJg==}
engines: {node: '>= 16'}
@@ -3928,10 +4160,6 @@ packages:
resolution: {integrity: sha512-8tR1xe7ZEbkabTuE/tNhzpolygUn9OaYp9yuYAF4MgDNZg06C3Qny80bes2/e9/Wm3aVkPUlCw6WgU7mQd0yEg==}
engines: {node: '>= 16'}
- '@intlify/[email protected]':
- resolution: {integrity: sha512-RucSPqh8O9FFxlYUysQTerSw0b9HIRpyoN1Zjogpm0qLiHK+lBNSa5sh1nCJ4wSsNcjphzgpLQCyR60GZlRV8g==}
- engines: {node: '>= 16'}
-
'@intlify/[email protected]':
resolution: {integrity: sha512-pmRiPY2Nj9mmSrixT69aO45XxGUr5fDBy/IIw4ajLlDTJm5TSmQKA5YNdsH0uxVDCPWy5tlQrF18hkDwI7UJvg==}
engines: {node: '>= 18'}
@@ -3945,21 +4173,6 @@ packages:
vue-i18n:
optional: true
- '@intlify/[email protected]':
- resolution: {integrity: sha512-FFVcxVU4bR9vdDLNbltM5mrhndnXMErO01i0RrpdyMegEt3Nu/YLoH0sFdjRun7/RY4vaEnhTnFvVf9uO0dQvg==}
- engines: {node: '>= 14.6'}
- peerDependencies:
- petite-vue-i18n: '*'
- vite: ^2.9.0 || ^3.0.0
- vue-i18n: '*'
- peerDependenciesMeta:
- petite-vue-i18n:
- optional: true
- vite:
- optional: true
- vue-i18n:
- optional: true
-
'@intlify/[email protected]':
resolution: {integrity: sha512-2TbDOQ8XD+vkc0s5OFmr+IY/k4mYMC7pzvx0xGQn+cU/ev314+yi7Z7N7rWcBgiYk1WOUalbGSo3d4nJDxOOyw==}
engines: {node: '>= 14.6'}
@@ -4648,6 +4861,19 @@ packages:
rollup:
optional: true
+ '@rollup/[email protected]':
+ resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==}
+ engines: {node: '>=14.0.0'}
+ peerDependencies:
+ rollup: ^2.14.0||^3.0.0||^4.0.0
+ tslib: '*'
+ typescript: '>=3.7.0'
+ peerDependenciesMeta:
+ rollup:
+ optional: true
+ tslib:
+ optional: true
+
'@rollup/[email protected]':
resolution: {integrity: sha512-t7O653DpfB5MbFrqPe/VcKFFkvRuFNp9qId3xq4Eth5xlyymzxNpye2z8Hrl0RIMuXTSr5GGcFpkdlMeacUiFQ==}
engines: {node: '>=14.0.0'}
@@ -4790,6 +5016,13 @@ packages:
resolution: {integrity: sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ==}
+ '@sveltejs/[email protected]':
+ resolution: {integrity: sha512-6QupI/jemMfK+yI2pMtJcu5iO2gtgTfcBdGwMZZt+lgbFELhszbDl6Qjh000HgAV8+XUA+8EY8DusOFk8WhOIg==}
+ engines: {node: ^14.18.0 || >= 16}
+ peerDependencies:
+ svelte: ^3.44.0
+ vite: ^3.0.0
+
resolution: {integrity: sha512-1uSdAn1MRK5C1m/TvLZ2RDvr0zLvochgrZ2xL+lRzugLlCTlSA+Q4TWtrZaOz+vnnFVliCpw7c7qu0JouhgQIw==}
engines: {node: '>=10'}
@@ -4872,6 +5105,9 @@ packages:
'@tauri-apps/[email protected]':
resolution: {integrity: sha512-3wSwmG+1kr6WrgAFKK5ijkNFPp8TT3FLj3YHUb5EwMO+3FxX4uWlfSWkeeBy+Kc1RsKzugtYLuuya+98Flj+3w==}
+ '@tauri-apps/[email protected]':
+ resolution: {integrity: sha512-fzUfFFKo4lknXGJq8qrCidkUcKcH2UHhfaaCNt4GzgzGaW2iS26uFOg4tS3H4P8D6ZEeUxtiD5z0nwFF0UN30A==}
+
'@tauri-apps/[email protected]':
resolution: {integrity: sha512-NNvG3XLtciCMsBahbDNUEvq184VZmOveTGOuy0So2R33b/6FDkuWaSgWZsR1mISpOuP034htQYW0VITCLelfqg==}
engines: {node: '>= 10'}
@@ -5002,9 +5238,21 @@ packages:
engines: {node: '>= 10'}
hasBin: true
+ '@tauri-apps/[email protected]':
+ resolution: {integrity: sha512-fnUrNr6EfvTqdls/ufusU7h6UbNFzLKvHk/zTuOiBq01R3dTODqwctZlzakdbfSp/7pNwTKvgKTAgl/NAP/Z0Q==}
+
+ '@tauri-apps/[email protected]':
+ resolution: {integrity: sha512-4YZaX2j7ta81M5/DL8aN10kTnpUkEpkPo1FTYPT8Dd0ImHe3azM8i8MrtjrDGoyBYLPO3zFv7df/mSCYF8oA0Q==}
+
'@tauri-apps/[email protected]':
resolution: {integrity: sha512-OpW2+ycgJLrEoZityWeWYk+6ZWP9VyiAfbO+N/O8VfLkqyOym8kXh7odKDfINx9RAotkSGBtQM4abyKfJDkcUg==}
+ '@tauri-apps/[email protected]':
+ resolution: {integrity: sha512-akU1b77sw3qHiynrK0s930y8zKmcdrSD60htjH+mFZqv5WaakZA/XxHR3/sF1nNv9Mgmt/Shls37HwnOr00aSw==}
+
+ '@tauri-apps/[email protected]':
+ resolution: {integrity: sha512-hJTRtuJis4w5fW1dkcgftsYxKXK0+DbAqurZ3CURHG5WkAyyZgbxpeYctw12bbzF9ZbZREXZklPq8mocCC3Sgg==}
+
'@trysound/[email protected]':
resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==}
engines: {node: '>=10.13.0'}
@@ -5177,6 +5425,9 @@ packages:
resolution: {integrity: sha512-/d7Rnj0/ExXDMcioS78/kf1lMzYk4BZV8MZGTBKzTGZ6/406ukkbYlIsZmMPhcR5KlkunDHQLrtAVmSq7r+mSw==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==}
+
resolution: {integrity: sha512-uz6hN6Pp0upXMcilM61CoKyjT7sskBoOWpptkjjJp8jIMlTdc3xG01U7proKkXzruMS4hS0zqtHNkNPFB20rKQ==}
@@ -5668,6 +5919,9 @@ packages:
resolution: {integrity: sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==}
+ '@volar/[email protected]':
+ resolution: {integrity: sha512-lN2C1+ByfW9/JRPpqScuZt/4OrUUse57GLI6TbLgTIqBVemdl1wNcZ1qYGEo2+Gw8coYLgCy7SuKqn6IrQcQgg==}
+
resolution: {integrity: sha512-F4tA0DCO5Q1F5mScHmca0umsi2ufKULAnMOVBfMsZdT4myhVl4WdKRwCaKcfOkIEuyrAVvtq1ESBdZ+rSyLVww==}
@@ -5677,6 +5931,9 @@ packages:
resolution: {integrity: sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==}
+ '@volar/[email protected]':
+ resolution: {integrity: sha512-ZQpmafIGvaZMn/8iuvCFGrW3smeqkq/IIh9F1SdSx9aUl0J4Iurzd6/FhmjNO5g2ejF3rT45dKskgXWiofqlZQ==}
+
resolution: {integrity: sha512-varwD7RaKE2J/Z+Zu6j3mNNJbNT394qIxXwdvz/4ao/vxOfyClZpSDtLKkwWmecinkOVos5+PWkWraelfMLfpw==}
@@ -5686,6 +5943,9 @@ packages:
resolution: {integrity: sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==}
+ '@volar/[email protected]':
+ resolution: {integrity: sha512-2DT+Tdh88Spp5PyPbqhyoYavYCPDsqbHLFwcUI9K1NlY1YgUJvujGdrqUp0zWxnW7KWNTr3xSpMuv2WnaTKDAw==}
+
resolution: {integrity: sha512-mcT1mHvLljAEtHviVcBuOyAwwMKz1ibXTi5uYtP/pf4XxoAzpdkQ+Br2IC0NPCvLCbjPZmbf3I0udndkfB1CDg==}
@@ -5753,6 +6013,14 @@ packages:
typescript:
optional: true
+ resolution: {integrity: sha512-O1ZZFaaBGkKbsRfnVH1ifOK1/1BUkyK+3SQsfnh6PmMmD4qJcTU8godCeA96jjDRTL6zgnK7YzCHfaUlH2r0Mw==}
+ peerDependencies:
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+
resolution: {integrity: sha512-Nqo5VZEn8MJWlCce8XoyVqHZbd5P2NH+yuAaFzuNSR96I+y1cnuUiq7xfSG+kyvLSiWmaHTKP1r3OZY4mMD50w==}
@@ -5994,6 +6262,9 @@ packages:
resolution: {integrity: sha512-XppPf2S42nO2WhvKzlwzlfcApcXHzjlod30pKmcWjRgLOtqoe5DMuqdiYoM6AgyXksc6A6pV4v1L/WW217e57w==}
engines: {node: '>=0.8.0'}
+ resolution: {integrity: sha512-itUAVzhczTmP2U5yX67xVpsbbOiquusbWVyA9N+sy6+r6YVbFkahXvNCeEPWEOMhwDYwbVbGHFkVL03N9I5g+Q==}
+
resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==}
@@ -6158,6 +6429,9 @@ packages:
resolution: {integrity: sha512-/djoAN709iY65ETD6LKCtyyEI04XIBP5xVvfmNxsEP0uJB5tyaGBztSryRr4HqMStr9R06PisQE7m9zDTXKu6g==}
+ resolution: {integrity: sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==}
+
resolution: {integrity: sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==}
@@ -6697,6 +6971,10 @@ packages:
resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==}
+ resolution: {integrity: sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==}
+ engines: {node: '>=12.13'}
+
resolution: {integrity: sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==}
@@ -7269,57 +7547,182 @@ packages:
resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==}
engines: {node: '>= 0.4'}
- resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==}
+ resolution: {integrity: sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==}
engines: {node: '>=12'}
- hasBin: true
+ cpu: [x64]
+ os: [android]
- resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==}
+ resolution: {integrity: sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ==}
engines: {node: '>=12'}
- hasBin: true
+ cpu: [arm64]
+ os: [android]
- resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==}
+ resolution: {integrity: sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==}
engines: {node: '>=12'}
- hasBin: true
+ cpu: [x64]
+ os: [darwin]
- resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==}
- engines: {node: '>=18'}
- hasBin: true
+ resolution: {integrity: sha512-tKPSxcTJ5OmNb1btVikATJ8NftlyNlc8BVNtyT/UAr62JFOhwHlnoPrhYWz09akBLHI9nElFVfWSTSRsrZiDUA==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [darwin]
- resolution: {integrity: sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==}
- engines: {node: '>=18'}
- hasBin: true
+ resolution: {integrity: sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [freebsd]
- resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==}
- engines: {node: '>=6'}
+ resolution: {integrity: sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [freebsd]
- resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
- engines: {node: '>=6'}
+ resolution: {integrity: sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg==}
+ engines: {node: '>=12'}
+ cpu: [ia32]
+ os: [linux]
- resolution: {integrity: sha512-w3PwNZJwRxlp47QGzhuEBldEqVHHhh8/tIPcl6ecf2Bou99cdAt0knihBV0Ecc7CGxYduXVBDheH1K2oADRlvw==}
- engines: {node: '>=10'}
+ resolution: {integrity: sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [linux]
- resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==}
+ resolution: {integrity: sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [linux]
- resolution: {integrity: sha512-4/hFwoYaC6TkpDn9A3pTC52zQPArFeXuIfhUtCGYdauTzXVP9H3BDr3oO/QzQehMpLDC7srvYgfwvImPFGfvBA==}
- engines: {node: '>=0.10.0'}
+ resolution: {integrity: sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA==}
+ engines: {node: '>=12'}
+ cpu: [arm]
+ os: [linux]
- resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==}
- engines: {node: '>=0.8.0'}
+ resolution: {integrity: sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ==}
+ engines: {node: '>=12'}
+ cpu: [mips64el]
+ os: [linux]
- resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==}
- engines: {node: '>=8'}
+ resolution: {integrity: sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w==}
+ engines: {node: '>=12'}
+ cpu: [ppc64]
+ os: [linux]
+
+ resolution: {integrity: sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg==}
+ engines: {node: '>=12'}
+ cpu: [riscv64]
+ os: [linux]
+
+ resolution: {integrity: sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ==}
+ engines: {node: '>=12'}
+ cpu: [s390x]
+ os: [linux]
+
+ resolution: {integrity: sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [netbsd]
+
+ resolution: {integrity: sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [openbsd]
+
+ resolution: {integrity: sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [sunos]
+
+ resolution: {integrity: sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ==}
+ engines: {node: '>=12'}
+ cpu: [ia32]
+ os: [win32]
+
+ resolution: {integrity: sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [win32]
+
+ resolution: {integrity: sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [win32]
+
+ resolution: {integrity: sha512-x/R72SmW3sSFRm5zrrIjAhCeQSAWoni3CmHEqfQrZIQTM3lVCdehdwuIqaOtfC2slvpdlLa62GYoN8SxT23m6Q==}
+ engines: {node: '>=12'}
+ hasBin: true
+
+ resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==}
+ engines: {node: '>=12'}
+ hasBin: true
+
+ resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==}
+ engines: {node: '>=12'}
+ hasBin: true
+
+ resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==}
+ engines: {node: '>=12'}
+ hasBin: true
+
+ resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==}
+ engines: {node: '>=18'}
+ hasBin: true
+
+ resolution: {integrity: sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==}
+ engines: {node: '>=18'}
+ hasBin: true
+
+ resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==}
+ engines: {node: '>=6'}
+
+ resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
+ engines: {node: '>=6'}
+
+ resolution: {integrity: sha512-w3PwNZJwRxlp47QGzhuEBldEqVHHhh8/tIPcl6ecf2Bou99cdAt0knihBV0Ecc7CGxYduXVBDheH1K2oADRlvw==}
+ engines: {node: '>=10'}
+
+ resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==}
+
+ resolution: {integrity: sha512-4/hFwoYaC6TkpDn9A3pTC52zQPArFeXuIfhUtCGYdauTzXVP9H3BDr3oO/QzQehMpLDC7srvYgfwvImPFGfvBA==}
+ engines: {node: '>=0.10.0'}
+
+ resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==}
+ engines: {node: '>=0.8.0'}
+
+ resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==}
+ engines: {node: '>=8'}
resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
@@ -8476,6 +8879,10 @@ packages:
resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==}
+ engines: {node: '>=12.13'}
+
resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==}
engines: {node: '>=0.10.0'}
@@ -8849,6 +9256,10 @@ packages:
resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==}
engines: {node: '>=6'}
+ resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
+ engines: {node: '>=6'}
+
resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==}
@@ -8974,6 +9385,7 @@ packages:
resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==}
+ deprecated: This package is deprecated. Use the optional chaining (?.) operator instead.
resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==}
@@ -8986,6 +9398,7 @@ packages:
resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==}
+ deprecated: This package is deprecated. Use require('node:util').isDeepStrictEqual instead.
resolution: {integrity: sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==}
@@ -9013,6 +9426,7 @@ packages:
resolution: {integrity: sha512-XeqSp49hNGmlkj2EJlfrQFIzQ6lXdNro9sddtQzcJY8QaoC2GO0DT7xaIokHeyM+mIT0mPMlPvkYzg2xCuHdZg==}
+ deprecated: This package is deprecated. Use destructuring assignment syntax instead.
resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==}
@@ -9395,9 +9809,6 @@ packages:
resolution: {integrity: sha512-U9SDaXGEREBYQgfejV97coK0UL1r+qnF2SyO9A3qcI8MzKnsIFKHNVEkrDyNncQTKQQumsasmeq84eNMdBfsNQ==}
- resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==}
-
resolution: {integrity: sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==}
@@ -9907,15 +10318,15 @@ packages:
resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==}
- resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
-
resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==}
resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==}
+ resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
+
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
engines: {node: '>=8.6'}
@@ -10201,6 +10612,10 @@ packages:
resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==}
engines: {node: ^10 || ^12 || >=14}
+ resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==}
+ engines: {node: ^10 || ^12 || >=14}
+
resolution: {integrity: sha512-hgyCYMyzMvuF3qWMw6JvS8gT55v7Mtp5wKWcnDrw+nu39D0Tk9BXD7I0LOBp0lGlHEPaXCEVYUtviNKrhMALGA==}
engines: {node: '>=15.0.0'}
@@ -11091,6 +11506,10 @@ packages:
resolution: {integrity: sha512-xuW7dzkUpcJq7QnhOsnNUgtYp3xRwpt2F7abdRYIpCsAt0hhUqia0EdxyXZQQpNmGtsCzYHryaKSV3q3GJnq7w==}
engines: {node: '>=14.18.0'}
+ resolution: {integrity: sha512-5JRxVqC8I8NuOUjzBbvVJAKNM8qoVuH0O77h4WInc/qC2q5IreqKxYwgkga3PfA22OayK2ikceb/B26dztPl+Q==}
+ engines: {node: '>=16'}
+
resolution: {integrity: sha512-qlsr7fIC0lSddmA3tzojvzubYxvlGtzumcdHgPwbFWMISQwL22MhM2Y3LNt+6w9Yyx7559VW5ab70dgphm8qQA==}
engines: {node: '>=14.18.0'}
@@ -11111,6 +11530,16 @@ packages:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ==}
+ engines: {node: ^12.20 || ^14.13.1 || >= 16}
+ peerDependencies:
+ svelte: ^3.19.0 || ^4.0.0
+
+ resolution: {integrity: sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA==}
+ engines: {node: '>= 8'}
+
resolution: {integrity: sha512-OoohrmuUlBs8B8o6MB2Aevn+pRIH9zDALSR+6hhqVfa6fRwG/Qw9VUMSMW9VNg2CFc/MTIfabtdOVl9ODIJjpw==}
engines: {node: '>=14.0.0'}
@@ -11547,6 +11976,11 @@ packages:
engines: {node: '>=14.17'}
hasBin: true
+ resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==}
+ engines: {node: '>=14.17'}
+ hasBin: true
+
resolution: {integrity: sha512-k24RCVWlEcjkdOxYmVJgeD/0a1TiSpqLg+ZalVGV9lsnr4yqu0w7tX/x2xX6G4zpkgQnRf89lxuZ1wsbjXM8lw==}
hasBin: true
@@ -11996,6 +12430,31 @@ packages:
vue: 3.5.12
vue-router: ^3.5.1 || ^ 4.0.11
+ resolution: {integrity: sha512-K/jGKL/PgbIgKCiJo5QbASQhFiV02X9Jh+Qq0AKCRCRKZtOTVi4t6wh75FDpGf2N9rYOnzH87OEFQNaFy6pdxQ==}
+ engines: {node: ^14.18.0 || >=16.0.0}
+ hasBin: true
+ peerDependencies:
+ '@types/node': '>= 14'
+ less: '*'
+ sass: '*'
+ stylus: '*'
+ sugarss: '*'
+ terser: ^5.4.0
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+ less:
+ optional: true
+ sass:
+ optional: true
+ stylus:
+ optional: true
+ sugarss:
+ optional: true
+ terser:
+ optional: true
+
resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==}
engines: {node: ^14.18.0 || >=16.0.0}
@@ -12024,6 +12483,37 @@ packages:
terser:
optional: true
+ resolution: {integrity: sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==}
+ engines: {node: ^18.0.0 || >=20.0.0}
+ hasBin: true
+ peerDependencies:
+ '@types/node': ^18.0.0 || >=20.0.0
+ less: '*'
+ lightningcss: ^1.21.0
+ sass: '*'
+ sass-embedded: '*'
+ stylus: '*'
+ sugarss: '*'
+ terser: ^5.4.0
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+ less:
+ optional: true
+ lightningcss:
+ optional: true
+ sass:
+ optional: true
+ sass-embedded:
+ optional: true
+ stylus:
+ optional: true
+ sugarss:
+ optional: true
+ terser:
+ optional: true
+
resolution: {integrity: sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==}
engines: {node: ^18.0.0 || >=20.0.0}
@@ -12055,6 +12545,14 @@ packages:
terser:
optional: true
+ resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==}
+ peerDependencies:
+ vite: ^3.0.0 || ^4.0.0 || ^5.0.0
+ peerDependenciesMeta:
+ vite:
+ optional: true
+
resolution: {integrity: sha512-veNjLizOMkRrJ6xxb+pvxN6/QAWg95mzcRjtmkepXdN87FNfxAss9RKe2far/G9cQpipfgP2taqg0KiWsquj8A==}
engines: {node: ^18.0.0 || >=20.0.0}
@@ -12209,6 +12707,12 @@ packages:
peerDependencies:
typescript: '>=5.0.0'
+ resolution: {integrity: sha512-gtmM1sUuJ8aSb0KoAFmK9yMxb8TxjewmxqTJ1aKphD5Cbu0rULFY6+UQT51zW7SpUcenfPUuflKyVwyx9Qdnxg==}
+ hasBin: true
+ peerDependencies:
+ typescript: '>=5.0.0'
+
resolution: {integrity: sha512-CLVZtXtn2ItBIi/zHZ0Sg1Xkb7+PU32bJJ8Bmy7ts3jxXTcbfsEfBivFYYWz1Hur+lalqGAh65Coin0r+HRUfg==}
peerDependencies:
@@ -12647,6 +13151,14 @@ snapshots:
optionalDependencies:
graphql: 16.9.0
+ '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/2faadf6528d175f0fe3a0861bcda2025030b856b':
+ dependencies:
+ '@tauri-apps/api': 2.1.1
+
+ '@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/bbf25139962fd59b6e0c09f2a8034df29ac10bdf':
+ dependencies:
+ '@tauri-apps/api': 2.1.1
+
'@alloc/[email protected]': {}
'@ampproject/[email protected]':
@@ -12898,7 +13410,7 @@ snapshots:
dependencies:
'@babel/highlight': 7.24.5
- picocolors: 1.0.0
+ picocolors: 1.1.0
dependencies:
@@ -13072,7 +13584,7 @@ snapshots:
'@babel/helper-validator-identifier': 7.24.5
chalk: 2.4.2
js-tokens: 4.0.0
- picocolors: 1.0.0
+ picocolors: 1.1.0
dependencies:
@@ -13739,6 +14251,10 @@ snapshots:
dependencies:
vue: 3.5.12([email protected])
+ dependencies:
+ vue: 3.5.12([email protected])
+
'@codemirror/[email protected](@codemirror/[email protected])(@codemirror/[email protected])(@codemirror/[email protected])(@lezer/[email protected])':
dependencies:
'@codemirror/language': 6.10.1
@@ -13827,11 +14343,11 @@ snapshots:
'@colors/[email protected]':
optional: true
dependencies:
'@commitlint/format': 19.5.0
'@commitlint/lint': 19.5.0
- '@commitlint/load': 19.5.0(@types/[email protected])([email protected])
+ '@commitlint/load': 19.5.0(@types/[email protected])([email protected])
'@commitlint/read': 19.5.0
'@commitlint/types': 19.5.0
tinyexec: 0.3.0
@@ -13878,15 +14394,15 @@ snapshots:
'@commitlint/rules': 19.5.0
'@commitlint/types': 19.5.0
dependencies:
'@commitlint/config-validator': 19.5.0
'@commitlint/execute-rule': 19.5.0
'@commitlint/resolve-extends': 19.5.0
'@commitlint/types': 19.5.0
chalk: 5.3.0
- cosmiconfig: 9.0.0([email protected])
- cosmiconfig-typescript-loader: 5.1.0(@types/[email protected])([email protected]([email protected]))([email protected])
+ cosmiconfig: 9.0.0([email protected])
+ cosmiconfig-typescript-loader: 5.1.0(@types/[email protected])([email protected]([email protected]))([email protected])
lodash.isplainobject: 4.0.6
lodash.merge: 4.6.2
lodash.uniq: 4.5.0
@@ -14026,6 +14542,9 @@ snapshots:
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
@@ -14161,6 +14680,9 @@ snapshots:
'@esbuild/[email protected]':
optional: true
+ '@esbuild/[email protected]':
+ optional: true
+
'@esbuild/[email protected]':
optional: true
@@ -14480,7 +15002,7 @@ snapshots:
shell-quote: 1.8.1
string-env-interpolation: 1.0.1
ts-log: 2.2.5
- tslib: 2.7.0
+ tslib: 2.8.0
yaml: 2.5.1
yargs: 17.7.2
optionalDependencies:
@@ -14495,7 +15017,7 @@ snapshots:
- typescript
- utf-8-validate
dependencies:
'@babel/generator': 7.25.7
'@babel/template': 7.25.7
@@ -14506,12 +15028,12 @@ snapshots:
'@graphql-tools/apollo-engine-loader': 8.0.1([email protected])
'@graphql-tools/code-file-loader': 8.1.3([email protected])
'@graphql-tools/git-loader': 8.0.7([email protected])
- '@graphql-tools/github-loader': 8.0.1(@types/[email protected])([email protected])
+ '@graphql-tools/github-loader': 8.0.1(@types/[email protected])([email protected])
'@graphql-tools/graphql-file-loader': 8.0.1([email protected])
'@graphql-tools/json-file-loader': 8.0.1([email protected])
'@graphql-tools/load': 8.0.2([email protected])
- '@graphql-tools/prisma-loader': 8.0.4(@types/[email protected])([email protected])
- '@graphql-tools/url-loader': 8.0.2(@types/[email protected])([email protected])
+ '@graphql-tools/prisma-loader': 8.0.4(@types/[email protected])([email protected])
+ '@graphql-tools/url-loader': 8.0.2(@types/[email protected])([email protected])
'@graphql-tools/utils': 10.5.4([email protected])
'@whatwg-node/fetch': 0.9.21
chalk: 4.1.2
@@ -14519,7 +15041,7 @@ snapshots:
debounce: 1.2.1
detect-indent: 6.1.0
graphql: 16.9.0
- graphql-config: 5.1.3(@types/[email protected])([email protected])([email protected])
+ graphql-config: 5.1.3(@types/[email protected])([email protected])([email protected])
inquirer: 8.2.6
is-glob: 4.0.3
jiti: 1.21.6
@@ -14545,7 +15067,7 @@ snapshots:
- typescript
- utf-8-validate
dependencies:
'@babel/generator': 7.25.7
'@babel/template': 7.25.7
@@ -14556,12 +15078,12 @@ snapshots:
'@graphql-tools/apollo-engine-loader': 8.0.1([email protected])
'@graphql-tools/code-file-loader': 8.1.3([email protected])
'@graphql-tools/git-loader': 8.0.7([email protected])
- '@graphql-tools/github-loader': 8.0.1(@types/[email protected])([email protected])
+ '@graphql-tools/github-loader': 8.0.1(@types/[email protected])([email protected])
'@graphql-tools/graphql-file-loader': 8.0.1([email protected])
'@graphql-tools/json-file-loader': 8.0.1([email protected])
'@graphql-tools/load': 8.0.2([email protected])
- '@graphql-tools/prisma-loader': 8.0.4(@types/[email protected])([email protected])
- '@graphql-tools/url-loader': 8.0.2(@types/[email protected])([email protected])
+ '@graphql-tools/prisma-loader': 8.0.4(@types/[email protected])([email protected])
+ '@graphql-tools/url-loader': 8.0.2(@types/[email protected])([email protected])
'@graphql-tools/utils': 10.5.4([email protected])
'@whatwg-node/fetch': 0.9.21
chalk: 4.1.2
@@ -14569,7 +15091,7 @@ snapshots:
debounce: 1.2.1
detect-indent: 6.1.0
graphql: 16.9.0
- graphql-config: 5.1.3(@types/[email protected])([email protected])([email protected])
+ graphql-config: 5.1.3(@types/[email protected])([email protected])([email protected])
inquirer: 8.2.6
is-glob: 4.0.3
jiti: 1.21.6
@@ -14864,7 +15386,7 @@ snapshots:
'@graphql-tools/utils': 10.5.4([email protected])
'@whatwg-node/fetch': 0.9.21
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
transitivePeerDependencies:
- encoding
@@ -14873,7 +15395,7 @@ snapshots:
'@graphql-tools/utils': 9.2.1([email protected])
dataloader: 2.2.2
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
value-or-promise: 1.0.12
@@ -14881,7 +15403,7 @@ snapshots:
'@graphql-tools/utils': 10.5.4([email protected])
dataloader: 2.2.2
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
value-or-promise: 1.0.12
@@ -14890,7 +15412,7 @@ snapshots:
'@graphql-tools/utils': 10.5.4([email protected])
globby: 11.1.0
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
unixify: 1.0.0
transitivePeerDependencies:
- supports-color
@@ -14904,7 +15426,7 @@ snapshots:
'@repeaterjs/repeater': 3.0.6
dataloader: 2.2.2
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
@@ -14914,14 +15436,14 @@ snapshots:
'@graphql-tools/utils': 9.2.1([email protected])
dataloader: 2.2.2
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
value-or-promise: 1.0.12
dependencies:
graphql: 16.9.0
lodash.sortby: 4.7.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
@@ -14931,7 +15453,7 @@ snapshots:
graphql: 16.9.0
graphql-ws: 5.12.1([email protected])
isomorphic-ws: 5.0.0([email protected])
- tslib: 2.7.0
+ tslib: 2.8.0
ws: 8.13.0
transitivePeerDependencies:
- bufferutil
@@ -14944,13 +15466,13 @@ snapshots:
graphql: 16.9.0
graphql-ws: 5.16.0([email protected])
isomorphic-ws: 5.0.0([email protected])
- tslib: 2.7.0
+ tslib: 2.8.0
ws: 8.18.0
transitivePeerDependencies:
- bufferutil
- utf-8-validate
dependencies:
'@graphql-tools/utils': 9.2.1([email protected])
'@repeaterjs/repeater': 3.0.5
@@ -14958,8 +15480,8 @@ snapshots:
dset: 3.1.4
extract-files: 11.0.0
graphql: 16.9.0
- meros: 1.3.0(@types/[email protected])
- tslib: 2.7.0
+ meros: 1.3.0(@types/[email protected])
+ tslib: 2.8.0
value-or-promise: 1.0.12
transitivePeerDependencies:
- '@types/node'
@@ -14972,20 +15494,20 @@ snapshots:
extract-files: 11.0.0
graphql: 16.9.0
meros: 1.3.0(@types/[email protected])
- tslib: 2.7.0
+ tslib: 2.8.0
value-or-promise: 1.0.12
transitivePeerDependencies:
- '@types/node'
dependencies:
'@graphql-tools/utils': 10.5.4([email protected])
'@repeaterjs/repeater': 3.0.6
'@whatwg-node/fetch': 0.9.21
extract-files: 11.0.0
graphql: 16.9.0
- meros: 1.3.0(@types/[email protected])
- tslib: 2.7.0
+ meros: 1.3.0(@types/[email protected])
+ tslib: 2.8.0
value-or-promise: 1.0.12
transitivePeerDependencies:
- '@types/node'
@@ -14996,7 +15518,7 @@ snapshots:
'@types/ws': 8.5.10
graphql: 16.9.0
isomorphic-ws: 5.0.0([email protected])
- tslib: 2.7.0
+ tslib: 2.8.0
ws: 8.13.0
transitivePeerDependencies:
- bufferutil
@@ -15008,7 +15530,7 @@ snapshots:
'@types/ws': 8.5.12
graphql: 16.9.0
isomorphic-ws: 5.0.0([email protected])
- tslib: 2.7.0
+ tslib: 2.8.0
ws: 8.18.0
transitivePeerDependencies:
- bufferutil
@@ -15020,7 +15542,7 @@ snapshots:
'@graphql-typed-document-node/core': 3.2.0([email protected])
'@repeaterjs/repeater': 3.0.6
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
value-or-promise: 1.0.12
@@ -15029,7 +15551,7 @@ snapshots:
'@graphql-typed-document-node/core': 3.2.0([email protected])
'@repeaterjs/repeater': 3.0.6
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
value-or-promise: 1.0.12
@@ -15039,7 +15561,7 @@ snapshots:
graphql: 16.9.0
is-glob: 4.0.3
micromatch: 4.0.8
- tslib: 2.7.0
+ tslib: 2.8.0
unixify: 1.0.0
transitivePeerDependencies:
- supports-color
@@ -15059,10 +15581,10 @@ snapshots:
- encoding
- supports-color
dependencies:
'@ardatan/sync-fetch': 0.0.1
- '@graphql-tools/executor-http': 1.1.6(@types/[email protected])([email protected])
+ '@graphql-tools/executor-http': 1.1.6(@types/[email protected])([email protected])
'@graphql-tools/graphql-tag-pluck': 8.3.2([email protected])
'@graphql-tools/utils': 10.5.4([email protected])
'@whatwg-node/fetch': 0.9.21
@@ -15080,7 +15602,7 @@ snapshots:
'@graphql-tools/utils': 9.2.1([email protected])
globby: 11.1.0
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
unixify: 1.0.0
@@ -15089,7 +15611,7 @@ snapshots:
'@graphql-tools/utils': 10.5.4([email protected])
globby: 11.1.0
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
unixify: 1.0.0
@@ -15101,7 +15623,7 @@ snapshots:
'@babel/types': 7.25.7
'@graphql-tools/utils': 10.5.4([email protected])
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
transitivePeerDependencies:
- supports-color
@@ -15110,21 +15632,21 @@ snapshots:
'@graphql-tools/utils': 9.2.1([email protected])
graphql: 16.9.0
resolve-from: 5.0.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
'@graphql-tools/utils': 10.5.4([email protected])
graphql: 16.9.0
resolve-from: 5.0.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
'@graphql-tools/utils': 9.2.1([email protected])
globby: 11.1.0
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
unixify: 1.0.0
@@ -15132,7 +15654,7 @@ snapshots:
'@graphql-tools/utils': 10.5.4([email protected])
globby: 11.1.0
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
unixify: 1.0.0
@@ -15141,7 +15663,7 @@ snapshots:
'@graphql-tools/utils': 9.2.1([email protected])
graphql: 16.9.0
p-limit: 3.1.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
@@ -15149,35 +15671,35 @@ snapshots:
'@graphql-tools/utils': 10.5.4([email protected])
graphql: 16.9.0
p-limit: 3.1.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
'@graphql-tools/utils': 9.2.1([email protected])
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
'@graphql-tools/utils': 10.5.4([email protected])
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
'@graphql-tools/utils': 10.5.4([email protected])
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
@@ -15196,7 +15718,7 @@ snapshots:
js-yaml: 4.1.0
lodash: 4.17.21
scuid: 1.1.0
- tslib: 2.7.0
+ tslib: 2.8.0
yaml-ast-parser: 0.0.43
transitivePeerDependencies:
- '@types/node'
@@ -15205,9 +15727,9 @@ snapshots:
- supports-color
- utf-8-validate
dependencies:
- '@graphql-tools/url-loader': 8.0.2(@types/[email protected])([email protected])
+ '@graphql-tools/url-loader': 8.0.2(@types/[email protected])([email protected])
'@graphql-tools/utils': 10.5.4([email protected])
'@types/js-yaml': 4.0.9
'@whatwg-node/fetch': 0.9.21
@@ -15222,7 +15744,7 @@ snapshots:
js-yaml: 4.1.0
lodash: 4.17.21
scuid: 1.1.0
- tslib: 2.7.0
+ tslib: 2.8.0
yaml-ast-parser: 0.0.43
transitivePeerDependencies:
- '@types/node'
@@ -15236,7 +15758,7 @@ snapshots:
'@ardatan/relay-compiler': 12.0.0([email protected])
'@graphql-tools/utils': 9.2.1([email protected])
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
transitivePeerDependencies:
- encoding
- supports-color
@@ -15246,7 +15768,7 @@ snapshots:
'@ardatan/relay-compiler': 12.0.0([email protected])
'@graphql-tools/utils': 10.5.4([email protected])
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
transitivePeerDependencies:
- encoding
- supports-color
@@ -15256,7 +15778,7 @@ snapshots:
'@graphql-tools/merge': 9.0.7([email protected])
'@graphql-tools/utils': 10.5.4([email protected])
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
value-or-promise: 1.0.12
@@ -15264,7 +15786,7 @@ snapshots:
'@graphql-tools/merge': 9.0.7([email protected])
'@graphql-tools/utils': 10.5.4([email protected])
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
value-or-promise: 1.0.12
@@ -15272,15 +15794,15 @@ snapshots:
'@graphql-tools/merge': 8.4.2([email protected])
'@graphql-tools/utils': 9.2.1([email protected])
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
value-or-promise: 1.0.12
dependencies:
'@ardatan/sync-fetch': 0.0.1
'@graphql-tools/delegate': 9.0.35([email protected])
'@graphql-tools/executor-graphql-ws': 0.0.14([email protected])
- '@graphql-tools/executor-http': 0.1.10(@types/[email protected])([email protected])
+ '@graphql-tools/executor-http': 0.1.10(@types/[email protected])([email protected])
'@graphql-tools/executor-legacy-ws': 0.0.11([email protected])
'@graphql-tools/utils': 9.2.1([email protected])
'@graphql-tools/wrap': 9.4.2([email protected])
@@ -15288,7 +15810,7 @@ snapshots:
'@whatwg-node/fetch': 0.8.8
graphql: 16.9.0
isomorphic-ws: 5.0.0([email protected])
- tslib: 2.7.0
+ tslib: 2.8.0
value-or-promise: 1.0.12
ws: 8.18.0
transitivePeerDependencies:
@@ -15310,7 +15832,7 @@ snapshots:
'@whatwg-node/fetch': 0.9.21
graphql: 16.9.0
isomorphic-ws: 5.0.0([email protected])
- tslib: 2.7.0
+ tslib: 2.8.0
value-or-promise: 1.0.12
ws: 8.18.0
transitivePeerDependencies:
@@ -15319,12 +15841,12 @@ snapshots:
- encoding
- utf-8-validate
dependencies:
'@ardatan/sync-fetch': 0.0.1
'@graphql-tools/delegate': 10.0.21([email protected])
'@graphql-tools/executor-graphql-ws': 1.3.0([email protected])
- '@graphql-tools/executor-http': 1.1.6(@types/[email protected])([email protected])
+ '@graphql-tools/executor-http': 1.1.6(@types/[email protected])([email protected])
'@graphql-tools/executor-legacy-ws': 1.1.0([email protected])
'@graphql-tools/utils': 10.5.4([email protected])
'@graphql-tools/wrap': 10.0.5([email protected])
@@ -15332,7 +15854,7 @@ snapshots:
'@whatwg-node/fetch': 0.9.21
graphql: 16.9.0
isomorphic-ws: 5.0.0([email protected])
- tslib: 2.7.0
+ tslib: 2.8.0
value-or-promise: 1.0.12
ws: 8.18.0
transitivePeerDependencies:
@@ -15347,7 +15869,7 @@ snapshots:
cross-inspect: 1.0.0
dset: 3.1.4
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
@@ -15355,18 +15877,18 @@ snapshots:
cross-inspect: 1.0.1
dset: 3.1.4
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
'@graphql-typed-document-node/core': 3.2.0([email protected])
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
@@ -15374,7 +15896,7 @@ snapshots:
'@graphql-tools/schema': 10.0.6([email protected])
'@graphql-tools/utils': 10.5.4([email protected])
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
value-or-promise: 1.0.12
@@ -15383,7 +15905,7 @@ snapshots:
'@graphql-tools/schema': 9.0.19([email protected])
'@graphql-tools/utils': 9.2.1([email protected])
graphql: 16.9.0
- tslib: 2.7.0
+ tslib: 2.8.0
value-or-promise: 1.0.12
'@graphql-typed-document-node/[email protected]([email protected])':
@@ -15400,7 +15922,7 @@ snapshots:
stringify-object: 3.3.0
yargs: 17.7.2
dependencies:
'@boringer-avatars/vue3': 0.2.1([email protected]([email protected]))
'@fontsource-variable/inter': 5.1.0
@@ -15408,12 +15930,12 @@ snapshots:
'@fontsource-variable/roboto-mono': 5.1.0
'@hoppscotch/vue-sonner': 1.2.3
'@hoppscotch/vue-toasted': 0.1.0([email protected]([email protected]))
'@vueuse/core': 8.9.4([email protected]([email protected]))
fp-ts: 2.16.9
lodash-es: 4.17.21
path: 0.12.7
vue: 3.5.12([email protected])
vue-promise-modals: 0.1.0([email protected])
vuedraggable-es: 4.1.1([email protected]([email protected]))
@@ -15448,7 +15970,7 @@ snapshots:
- typescript
- vite
dependencies:
'@boringer-avatars/vue3': 0.2.1([email protected]([email protected]))
'@fontsource-variable/inter': 5.1.0
@@ -15456,12 +15978,12 @@ snapshots:
'@fontsource-variable/roboto-mono': 5.1.0
'@hoppscotch/vue-sonner': 1.2.3
'@hoppscotch/vue-toasted': 0.1.0([email protected]([email protected]))
'@vueuse/core': 8.9.4([email protected]([email protected]))
fp-ts: 2.16.9
lodash-es: 4.17.21
path: 0.12.7
vue: 3.5.12([email protected])
vue-promise-modals: 0.1.0([email protected])
vuedraggable-es: 4.1.1([email protected]([email protected]))
@@ -15472,7 +15994,31 @@ snapshots:
- typescript
- vite
+ dependencies:
+ '@boringer-avatars/vue3': 0.2.1([email protected]([email protected]))
+ '@fontsource-variable/inter': 5.1.0
+ '@fontsource-variable/material-symbols-rounded': 5.1.3
+ '@fontsource-variable/roboto-mono': 5.1.0
+ '@hoppscotch/vue-sonner': 1.2.3
+ '@hoppscotch/vue-toasted': 0.1.0([email protected]([email protected]))
+ '@vueuse/core': 8.9.4([email protected]([email protected]))
+ fp-ts: 2.16.9
+ lodash-es: 4.17.21
+ path: 0.12.7
+ vue: 3.5.12([email protected])
+ vue-promise-modals: 0.1.0([email protected])
+ vuedraggable-es: 4.1.1([email protected]([email protected]))
+ transitivePeerDependencies:
+ - '@vue/composition-api'
+ - eslint
+ - terser
+ - typescript
+ - vite
+
dependencies:
'@boringer-avatars/vue3': 0.2.1([email protected]([email protected]))
'@fontsource-variable/inter': 5.0.15
@@ -15480,12 +16026,12 @@ snapshots:
'@fontsource-variable/roboto-mono': 5.0.16
'@hoppscotch/vue-sonner': 1.2.3
'@hoppscotch/vue-toasted': 0.1.0([email protected]([email protected]))
'@vueuse/core': 8.9.4([email protected]([email protected]))
fp-ts: 2.16.9
lodash-es: 4.17.21
path: 0.12.7
vue: 3.5.12([email protected])
vue-promise-modals: 0.1.0([email protected])
vuedraggable-es: 4.1.1([email protected]([email protected]))
@@ -15496,23 +16042,23 @@ snapshots:
- typescript
- vite
dependencies:
- '@boringer-avatars/vue3': 0.2.1([email protected]([email protected]))
+ '@boringer-avatars/vue3': 0.2.1([email protected]([email protected]))
'@fontsource-variable/inter': 5.0.15
'@fontsource-variable/material-symbols-rounded': 5.0.16
'@fontsource-variable/roboto-mono': 5.0.16
'@hoppscotch/vue-sonner': 1.2.3
- '@hoppscotch/vue-toasted': 0.1.0([email protected]([email protected]))
- '@vueuse/core': 8.9.4([email protected]([email protected]))
+ '@hoppscotch/vue-toasted': 0.1.0([email protected]([email protected]))
+ '@vueuse/core': 8.9.4([email protected]([email protected]))
fp-ts: 2.16.9
lodash-es: 4.17.21
path: 0.12.7
- vue: 3.5.12([email protected])
- vue-promise-modals: 0.1.0([email protected])
- vuedraggable-es: 4.1.1([email protected]([email protected]))
+ vue: 3.5.12([email protected])
+ vue-promise-modals: 0.1.0([email protected])
+ vuedraggable-es: 4.1.1([email protected]([email protected]))
transitivePeerDependencies:
- '@vue/composition-api'
- eslint
@@ -15530,6 +16076,10 @@ snapshots:
dependencies:
vue: 3.5.12([email protected])
+ dependencies:
+ vue: 3.5.12([email protected])
+
'@humanfs/[email protected]': {}
'@humanfs/[email protected]':
@@ -15590,7 +16140,7 @@ snapshots:
debug: 4.3.7
kolorist: 1.8.0
local-pkg: 0.5.0
- mlly: 1.7.1
+ mlly: 1.7.2
transitivePeerDependencies:
- supports-color
@@ -15616,7 +16166,7 @@ snapshots:
transitivePeerDependencies:
- webpack-sources
dependencies:
'@intlify/message-compiler': 11.0.0-rc.1
'@intlify/shared': 11.0.0-rc.1
@@ -15624,22 +16174,17 @@ snapshots:
source-map: 0.6.1
yaml-eslint-parser: 0.3.2
optionalDependencies:
dependencies:
- '@intlify/message-compiler': 9.3.0-beta.20
- '@intlify/shared': 9.3.0-beta.20
- acorn: 8.12.1
- escodegen: 2.1.0
- estree-walker: 2.0.2
+ '@intlify/message-compiler': 11.0.0-rc.1
+ '@intlify/shared': 11.0.0-rc.1
jsonc-eslint-parser: 1.4.1
- magic-string: 0.30.11
- mlly: 1.7.2
source-map: 0.6.1
yaml-eslint-parser: 0.3.2
optionalDependencies:
dependencies:
@@ -15670,17 +16215,10 @@ snapshots:
'@intlify/shared': 11.0.0-rc.1
source-map-js: 1.2.1
- '@intlify/[email protected]':
- dependencies:
- '@intlify/shared': 9.3.0-beta.20
- source-map-js: 1.2.1
-
'@intlify/[email protected]': {}
'@intlify/[email protected]': {}
- '@intlify/[email protected]': {}
-
dependencies:
'@eslint-community/eslint-utils': 4.4.0([email protected]([email protected]))
@@ -15709,9 +16247,9 @@ snapshots:
- typescript
- webpack-sources
dependencies:
- '@intlify/bundle-utils': 7.0.0([email protected]([email protected]([email protected])))
+ '@intlify/bundle-utils': 3.4.0([email protected]([email protected]([email protected])))
'@intlify/shared': 11.0.0-rc.1
'@rollup/pluginutils': 4.2.1
debug: 4.3.7
@@ -15723,7 +16261,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@intlify/bundle-utils': 3.4.0([email protected]([email protected]([email protected])))
'@intlify/shared': 11.0.0-rc.1
@@ -15732,12 +16270,12 @@ snapshots:
fast-glob: 3.3.2
source-map: 0.6.1
optionalDependencies:
transitivePeerDependencies:
- supports-color
dependencies:
'@intlify/bundle-utils': 3.4.0([email protected]([email protected]([email protected])))
'@intlify/shared': 11.0.0-rc.1
@@ -15746,7 +16284,7 @@ snapshots:
fast-glob: 3.3.2
source-map: 0.6.1
optionalDependencies:
transitivePeerDependencies:
- supports-color
@@ -15785,7 +16323,7 @@ snapshots:
dependencies:
'@jest/types': 29.6.3
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
chalk: 4.1.2
jest-message-util: 29.7.0
jest-util: 29.7.0
@@ -15798,14 +16336,14 @@ snapshots:
'@jest/test-result': 29.7.0
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
ansi-escapes: 4.3.2
chalk: 4.1.2
ci-info: 3.9.0
exit: 0.1.2
graceful-fs: 4.2.11
jest-changed-files: 29.7.0
jest-haste-map: 29.7.0
jest-message-util: 29.7.0
jest-regex-util: 29.6.3
@@ -15830,7 +16368,7 @@ snapshots:
dependencies:
'@jest/fake-timers': 29.7.0
'@jest/types': 29.6.3
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
jest-mock: 29.7.0
@@ -15848,7 +16386,7 @@ snapshots:
dependencies:
'@jest/types': 29.6.3
'@sinonjs/fake-timers': 10.3.0
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
jest-message-util: 29.7.0
jest-mock: 29.7.0
jest-util: 29.7.0
@@ -15870,7 +16408,7 @@ snapshots:
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
'@jridgewell/trace-mapping': 0.3.25
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
chalk: 4.1.2
collect-v8-coverage: 1.0.2
exit: 0.1.2
@@ -15940,7 +16478,7 @@ snapshots:
'@jest/schemas': 29.6.3
'@types/istanbul-lib-coverage': 2.0.6
'@types/istanbul-reports': 3.0.4
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
'@types/yargs': 17.0.33
chalk: 4.1.2
@@ -16373,18 +16911,18 @@ snapshots:
dependencies:
asn1js: 3.0.5
pvtsutils: 1.3.5
- tslib: 2.7.0
+ tslib: 2.8.0
'@peculiar/[email protected]':
dependencies:
- tslib: 2.7.0
+ tslib: 2.8.0
'@peculiar/[email protected]':
dependencies:
'@peculiar/asn1-schema': 2.3.8
'@peculiar/json-schema': 1.1.12
pvtsutils: 1.3.5
- tslib: 2.7.0
+ tslib: 2.8.0
webcrypto-core: 1.7.9
'@phc/[email protected]': {}
@@ -16517,6 +17055,15 @@ snapshots:
optionalDependencies:
rollup: 2.79.2
+ dependencies:
+ '@rollup/pluginutils': 5.1.2([email protected])
+ resolve: 1.22.8
+ typescript: 5.7.2
+ optionalDependencies:
+ rollup: 4.24.0
+ tslib: 2.8.0
+
dependencies:
'@rollup/pluginutils': 5.1.2([email protected])
@@ -16646,6 +17193,19 @@ snapshots:
magic-string: 0.25.9
string.prototype.matchall: 4.0.11
+ dependencies:
+ debug: 4.3.7
+ deepmerge: 4.3.1
+ kleur: 4.1.5
+ magic-string: 0.26.7
+ svelte: 3.59.2
+ svelte-hmr: 0.15.3([email protected])
+ transitivePeerDependencies:
+ - supports-color
+
optional: true
@@ -16705,6 +17265,8 @@ snapshots:
'@tauri-apps/[email protected]': {}
+ '@tauri-apps/[email protected]': {}
+
'@tauri-apps/[email protected]':
optional: true
@@ -16791,10 +17353,26 @@ snapshots:
'@tauri-apps/cli-win32-ia32-msvc': 2.0.4
'@tauri-apps/cli-win32-x64-msvc': 2.0.4
+ '@tauri-apps/[email protected]':
+ dependencies:
+ '@tauri-apps/api': 2.1.1
+
+ '@tauri-apps/[email protected]':
+ dependencies:
+ '@tauri-apps/api': 2.1.1
+
'@tauri-apps/[email protected]':
dependencies:
'@tauri-apps/api': 2.0.2
+ '@tauri-apps/[email protected]':
+ dependencies:
+ '@tauri-apps/api': 2.1.1
+
+ '@tauri-apps/[email protected]':
+ dependencies:
+ '@tauri-apps/api': 2.1.1
+
'@trysound/[email protected]':
optional: true
@@ -16834,15 +17412,15 @@ snapshots:
dependencies:
'@types/connect': 3.4.38
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
dependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
dependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
dependencies:
@@ -16854,7 +17432,7 @@ snapshots:
dependencies:
- '@types/node': 22.7.5
+ '@types/node': 22.9.3
dependencies:
@@ -16874,14 +17452,14 @@ snapshots:
dependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
'@types/qs': 6.9.16
'@types/range-parser': 1.2.7
'@types/send': 0.17.4
dependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
'@types/qs': 6.9.16
'@types/range-parser': 1.2.7
'@types/send': 0.17.4
@@ -16902,7 +17480,7 @@ snapshots:
dependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
'@types/[email protected]': {}
@@ -16931,11 +17509,11 @@ snapshots:
dependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
dependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
'@types/[email protected]': {}
@@ -16978,7 +17556,7 @@ snapshots:
dependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
form-data: 4.0.1
'@types/[email protected]': {}
@@ -16995,6 +17573,10 @@ snapshots:
dependencies:
undici-types: 6.19.8
+ '@types/[email protected]':
+ dependencies:
+ undici-types: 6.19.8
+
dependencies:
'@types/node': 22.7.5
@@ -17003,7 +17585,7 @@ snapshots:
dependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
'@types/[email protected]': {}
@@ -17066,19 +17648,19 @@ snapshots:
dependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
'@types/[email protected]': {}
dependencies:
'@types/mime': 1.3.5
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
dependencies:
'@types/http-errors': 2.0.4
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
'@types/send': 0.17.4
@@ -17097,7 +17679,7 @@ snapshots:
dependencies:
'@types/cookiejar': 2.1.5
'@types/methods': 1.1.4
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
dependencies:
@@ -17118,11 +17700,11 @@ snapshots:
dependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
dependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
'@types/[email protected]': {}
@@ -17622,6 +18204,26 @@ snapshots:
terser: 5.34.1
+ dependencies:
+ '@babel/standalone': 7.24.5
+ core-js: 3.38.1
+ magic-string: 0.26.7
+ regenerator-runtime: 0.13.11
+ systemjs: 6.15.1
+ terser: 5.34.1
+
+ dependencies:
+ '@babel/standalone': 7.24.5
+ core-js: 3.38.1
+ magic-string: 0.26.7
+ regenerator-runtime: 0.13.11
+ systemjs: 6.15.1
+ terser: 5.34.1
+
dependencies:
'@babel/standalone': 7.24.5
@@ -17632,7 +18234,7 @@ snapshots:
terser: 5.34.1
dependencies:
'@babel/standalone': 7.24.5
core-js: 3.38.1
@@ -17640,9 +18242,9 @@ snapshots:
regenerator-runtime: 0.13.11
systemjs: 6.15.1
terser: 5.34.1
dependencies:
'@babel/standalone': 7.24.5
core-js: 3.38.1
@@ -17650,9 +18252,9 @@ snapshots:
regenerator-runtime: 0.13.11
systemjs: 6.15.1
terser: 5.34.1
dependencies:
'@babel/core': 7.25.7
'@babel/preset-env': 7.25.7(@babel/[email protected])
@@ -17663,7 +18265,7 @@ snapshots:
regenerator-runtime: 0.14.1
systemjs: 6.15.1
terser: 5.34.1
transitivePeerDependencies:
- supports-color
@@ -17672,24 +18274,29 @@ snapshots:
vue: 3.5.12([email protected])
+ dependencies:
+ vue: 3.5.12([email protected])
+
dependencies:
vue: 3.5.12([email protected])
dependencies:
vue: 3.5.12([email protected])
dependencies:
vue: 3.5.12([email protected])
dependencies:
vue: 3.5.12([email protected])
'@vitest/[email protected]':
@@ -17706,13 +18313,13 @@ snapshots:
chai: 5.1.2
tinyrainbow: 1.2.0
dependencies:
'@vitest/spy': 2.1.2
estree-walker: 3.0.3
magic-string: 0.30.11
optionalDependencies:
dependencies:
@@ -17722,13 +18329,13 @@ snapshots:
optionalDependencies:
dependencies:
'@vitest/spy': 2.1.3
estree-walker: 3.0.3
magic-string: 0.30.11
optionalDependencies:
'@vitest/[email protected]':
dependencies:
@@ -17788,6 +18395,10 @@ snapshots:
dependencies:
'@volar/source-map': 1.11.1
+ '@volar/[email protected]':
+ dependencies:
+ '@volar/source-map': 2.4.11
+
dependencies:
'@volar/source-map': 2.4.5
@@ -17800,6 +18411,8 @@ snapshots:
dependencies:
muggle-string: 0.3.1
+ '@volar/[email protected]': {}
+
'@volar/[email protected]': {}
@@ -17812,6 +18425,12 @@ snapshots:
'@volar/language-core': 1.11.1
path-browserify: 1.0.1
+ '@volar/[email protected]':
+ dependencies:
+ '@volar/language-core': 2.4.11
+ path-browserify: 1.0.1
+ vscode-uri: 3.0.8
+
dependencies:
'@volar/language-core': 2.4.5
@@ -17932,6 +18551,19 @@ snapshots:
optionalDependencies:
typescript: 5.6.3
+ dependencies:
+ '@volar/language-core': 2.4.11
+ '@vue/compiler-dom': 3.5.12
+ '@vue/compiler-vue2': 2.7.16
+ '@vue/shared': 3.5.12
+ alien-signals: 0.4.14
+ minimatch: 9.0.5
+ muggle-string: 0.4.1
+ path-browserify: 1.0.1
+ optionalDependencies:
+ typescript: 5.7.2
+
dependencies:
'@vue/shared': 3.5.11
@@ -17970,6 +18602,12 @@ snapshots:
'@vue/shared': 3.5.12
vue: 3.5.12([email protected])
+ dependencies:
+ '@vue/compiler-ssr': 3.5.12
+ '@vue/shared': 3.5.12
+ vue: 3.5.12([email protected])
+
'@vue/[email protected]': {}
'@vue/[email protected]': {}
@@ -17991,6 +18629,16 @@ snapshots:
- '@vue/composition-api'
- vue
+ dependencies:
+ '@types/web-bluetooth': 0.0.18
+ '@vueuse/metadata': 10.5.0
+ '@vueuse/shared': 10.5.0([email protected]([email protected]))
+ transitivePeerDependencies:
+ - '@vue/composition-api'
+ - vue
+
dependencies:
'@types/web-bluetooth': 0.0.20
@@ -18011,6 +18659,16 @@ snapshots:
- '@vue/composition-api'
- vue
+ dependencies:
+ '@types/web-bluetooth': 0.0.20
+ '@vueuse/metadata': 11.1.0
+ '@vueuse/shared': 11.1.0([email protected]([email protected]))
+ transitivePeerDependencies:
+ - '@vue/composition-api'
+ - vue
+
dependencies:
'@types/web-bluetooth': 0.0.14
@@ -18029,6 +18687,15 @@ snapshots:
optionalDependencies:
vue: 3.5.12([email protected])
+ dependencies:
+ '@types/web-bluetooth': 0.0.14
+ '@vueuse/metadata': 8.9.4
+ '@vueuse/shared': 8.9.4([email protected]([email protected]))
+ optionalDependencies:
+ vue: 3.5.12([email protected])
+
'@vueuse/[email protected]': {}
'@vueuse/[email protected]': {}
@@ -18042,6 +18709,13 @@ snapshots:
- '@vue/composition-api'
- vue
+ dependencies:
+ transitivePeerDependencies:
+ - '@vue/composition-api'
+ - vue
+
dependencies:
@@ -18056,6 +18730,13 @@ snapshots:
- '@vue/composition-api'
- vue
+ dependencies:
+ transitivePeerDependencies:
+ - '@vue/composition-api'
+ - vue
+
dependencies:
@@ -18068,6 +18749,12 @@ snapshots:
optionalDependencies:
vue: 3.5.12([email protected])
+ dependencies:
+ optionalDependencies:
+ vue: 3.5.12([email protected])
+
'@webassemblyjs/[email protected]':
dependencies:
'@webassemblyjs/helper-numbers': 1.11.6
@@ -18165,14 +18852,14 @@ snapshots:
busboy: 1.6.0
fast-querystring: 1.1.2
fast-url-parser: 1.1.3
- tslib: 2.7.0
+ tslib: 2.8.0
'@whatwg-node/[email protected]':
dependencies:
'@kamilkisiela/fast-url-parser': 1.1.4
busboy: 1.6.0
fast-querystring: 1.1.2
- tslib: 2.7.0
+ tslib: 2.8.0
'@xtuc/[email protected]': {}
@@ -18287,6 +18974,8 @@ snapshots:
estraverse: 1.9.3
optional: true
+
dependencies:
string-width: 4.2.3
@@ -18395,7 +19084,7 @@ snapshots:
dependencies:
pvtsutils: 1.3.5
pvutils: 1.1.3
- tslib: 2.7.0
+ tslib: 2.8.0
optional: true
@@ -18440,12 +19129,30 @@ snapshots:
postcss: 8.4.47
postcss-value-parser: 4.2.0
+ dependencies:
+ browserslist: 4.24.0
+ caniuse-lite: 1.0.30001667
+ fraction.js: 4.3.7
+ normalize-range: 0.1.2
+ picocolors: 1.1.0
+ postcss: 8.4.49
+ postcss-value-parser: 4.2.0
+
dependencies:
possible-typed-array-names: 1.0.0
+ dependencies:
+ follow-redirects: 1.15.6
+ form-data: 4.0.1
+ proxy-from-env: 1.1.0
+ transitivePeerDependencies:
+ - debug
+
dependencies:
follow-redirects: 1.15.6
@@ -18738,7 +19445,7 @@ snapshots:
dependencies:
pascal-case: 3.1.2
- tslib: 2.7.0
+ tslib: 2.8.0
@@ -18769,7 +19476,7 @@ snapshots:
dependencies:
no-case: 3.0.4
- tslib: 2.7.0
+ tslib: 2.8.0
upper-case-first: 2.0.2
@@ -18838,7 +19545,7 @@ snapshots:
path-case: 3.0.4
sentence-case: 3.0.4
snake-case: 3.0.4
- tslib: 2.7.0
+ tslib: 2.8.0
@@ -19069,7 +19776,7 @@ snapshots:
dependencies:
no-case: 3.0.4
- tslib: 2.7.0
+ tslib: 2.8.0
upper-case: 2.0.2
@@ -19116,6 +19823,10 @@ snapshots:
+ dependencies:
+ is-what: 4.1.16
+
dependencies:
browserslist: 4.24.0
@@ -19131,12 +19842,12 @@ snapshots:
dependencies:
'@types/node': 22.7.6
- cosmiconfig: 9.0.0([email protected])
+ cosmiconfig: 9.0.0([email protected])
jiti: 1.21.6
- typescript: 5.6.3
+ typescript: 5.7.2
dependencies:
@@ -19182,14 +19893,14 @@ snapshots:
typescript: 5.5.4
optional: true
dependencies:
env-paths: 2.2.1
import-fresh: 3.3.0
js-yaml: 4.1.0
parse-json: 5.2.0
optionalDependencies:
- typescript: 5.6.3
+ typescript: 5.7.2
dependencies:
@@ -19233,11 +19944,11 @@ snapshots:
dependencies:
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
@@ -19247,9 +19958,9 @@ snapshots:
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
optional: true
@@ -19280,51 +19991,51 @@ snapshots:
dependencies:
browserslist: 4.24.0
- css-declaration-sorter: 7.2.0([email protected])
- cssnano-utils: 5.0.0([email protected])
- postcss: 8.4.47
- postcss-calc: 10.0.2([email protected])
- postcss-colormin: 7.0.2([email protected])
- postcss-convert-values: 7.0.4([email protected])
- postcss-discard-comments: 7.0.3([email protected])
- postcss-discard-duplicates: 7.0.1([email protected])
- postcss-discard-empty: 7.0.0([email protected])
- postcss-discard-overridden: 7.0.0([email protected])
- postcss-merge-longhand: 7.0.4([email protected])
- postcss-merge-rules: 7.0.4([email protected])
- postcss-minify-font-values: 7.0.0([email protected])
- postcss-minify-gradients: 7.0.0([email protected])
- postcss-minify-params: 7.0.2([email protected])
- postcss-minify-selectors: 7.0.4([email protected])
- postcss-normalize-charset: 7.0.0([email protected])
- postcss-normalize-display-values: 7.0.0([email protected])
- postcss-normalize-positions: 7.0.0([email protected])
- postcss-normalize-repeat-style: 7.0.0([email protected])
- postcss-normalize-string: 7.0.0([email protected])
- postcss-normalize-timing-functions: 7.0.0([email protected])
- postcss-normalize-unicode: 7.0.2([email protected])
- postcss-normalize-url: 7.0.0([email protected])
- postcss-normalize-whitespace: 7.0.0([email protected])
- postcss-ordered-values: 7.0.1([email protected])
- postcss-reduce-initial: 7.0.2([email protected])
- postcss-reduce-transforms: 7.0.0([email protected])
- postcss-svgo: 7.0.1([email protected])
- postcss-unique-selectors: 7.0.3([email protected])
- optional: true
-
- dependencies:
- postcss: 8.4.47
- optional: true
-
- dependencies:
- cssnano-preset-default: 7.0.6([email protected])
+ css-declaration-sorter: 7.2.0([email protected])
+ cssnano-utils: 5.0.0([email protected])
+ postcss: 8.4.49
+ postcss-calc: 10.0.2([email protected])
+ postcss-colormin: 7.0.2([email protected])
+ postcss-convert-values: 7.0.4([email protected])
+ postcss-discard-comments: 7.0.3([email protected])
+ postcss-discard-duplicates: 7.0.1([email protected])
+ postcss-discard-empty: 7.0.0([email protected])
+ postcss-discard-overridden: 7.0.0([email protected])
+ postcss-merge-longhand: 7.0.4([email protected])
+ postcss-merge-rules: 7.0.4([email protected])
+ postcss-minify-font-values: 7.0.0([email protected])
+ postcss-minify-gradients: 7.0.0([email protected])
+ postcss-minify-params: 7.0.2([email protected])
+ postcss-minify-selectors: 7.0.4([email protected])
+ postcss-normalize-charset: 7.0.0([email protected])
+ postcss-normalize-display-values: 7.0.0([email protected])
+ postcss-normalize-positions: 7.0.0([email protected])
+ postcss-normalize-repeat-style: 7.0.0([email protected])
+ postcss-normalize-string: 7.0.0([email protected])
+ postcss-normalize-timing-functions: 7.0.0([email protected])
+ postcss-normalize-unicode: 7.0.2([email protected])
+ postcss-normalize-url: 7.0.0([email protected])
+ postcss-normalize-whitespace: 7.0.0([email protected])
+ postcss-ordered-values: 7.0.1([email protected])
+ postcss-reduce-initial: 7.0.2([email protected])
+ postcss-reduce-transforms: 7.0.0([email protected])
+ postcss-svgo: 7.0.1([email protected])
+ postcss-unique-selectors: 7.0.3([email protected])
+ optional: true
+
+ dependencies:
+ postcss: 8.4.49
+ optional: true
+
+ dependencies:
+ cssnano-preset-default: 7.0.6([email protected])
lilconfig: 3.1.2
- postcss: 8.4.47
+ postcss: 8.4.49
optional: true
@@ -19597,7 +20308,7 @@ snapshots:
dependencies:
no-case: 3.0.4
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
@@ -19810,26 +20521,111 @@ snapshots:
is-date-object: 1.0.5
is-symbol: 1.0.4
- optionalDependencies:
- '@esbuild/android-arm': 0.17.19
- '@esbuild/android-arm64': 0.17.19
- '@esbuild/android-x64': 0.17.19
- '@esbuild/darwin-arm64': 0.17.19
- '@esbuild/darwin-x64': 0.17.19
- '@esbuild/freebsd-arm64': 0.17.19
- '@esbuild/freebsd-x64': 0.17.19
- '@esbuild/linux-arm': 0.17.19
- '@esbuild/linux-arm64': 0.17.19
- '@esbuild/linux-ia32': 0.17.19
- '@esbuild/linux-loong64': 0.17.19
- '@esbuild/linux-mips64el': 0.17.19
- '@esbuild/linux-ppc64': 0.17.19
- '@esbuild/linux-riscv64': 0.17.19
- '@esbuild/linux-s390x': 0.17.19
- '@esbuild/linux-x64': 0.17.19
- '@esbuild/netbsd-x64': 0.17.19
- '@esbuild/openbsd-x64': 0.17.19
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optional: true
+
+ optionalDependencies:
+ '@esbuild/android-arm': 0.15.18
+ '@esbuild/linux-loong64': 0.15.18
+ esbuild-android-64: 0.15.18
+ esbuild-android-arm64: 0.15.18
+ esbuild-darwin-64: 0.15.18
+ esbuild-darwin-arm64: 0.15.18
+ esbuild-freebsd-64: 0.15.18
+ esbuild-freebsd-arm64: 0.15.18
+ esbuild-linux-32: 0.15.18
+ esbuild-linux-64: 0.15.18
+ esbuild-linux-arm: 0.15.18
+ esbuild-linux-arm64: 0.15.18
+ esbuild-linux-mips64le: 0.15.18
+ esbuild-linux-ppc64le: 0.15.18
+ esbuild-linux-riscv64: 0.15.18
+ esbuild-linux-s390x: 0.15.18
+ esbuild-netbsd-64: 0.15.18
+ esbuild-openbsd-64: 0.15.18
+ esbuild-sunos-64: 0.15.18
+ esbuild-windows-32: 0.15.18
+ esbuild-windows-64: 0.15.18
+ esbuild-windows-arm64: 0.15.18
+
+ optionalDependencies:
+ '@esbuild/android-arm': 0.17.19
+ '@esbuild/android-arm64': 0.17.19
+ '@esbuild/android-x64': 0.17.19
+ '@esbuild/darwin-arm64': 0.17.19
+ '@esbuild/darwin-x64': 0.17.19
+ '@esbuild/freebsd-arm64': 0.17.19
+ '@esbuild/freebsd-x64': 0.17.19
+ '@esbuild/linux-arm': 0.17.19
+ '@esbuild/linux-arm64': 0.17.19
+ '@esbuild/linux-ia32': 0.17.19
+ '@esbuild/linux-loong64': 0.17.19
+ '@esbuild/linux-mips64el': 0.17.19
+ '@esbuild/linux-ppc64': 0.17.19
+ '@esbuild/linux-riscv64': 0.17.19
+ '@esbuild/linux-s390x': 0.17.19
+ '@esbuild/linux-x64': 0.17.19
+ '@esbuild/netbsd-x64': 0.17.19
+ '@esbuild/openbsd-x64': 0.17.19
'@esbuild/sunos-x64': 0.17.19
'@esbuild/win32-arm64': 0.17.19
'@esbuild/win32-ia32': 0.17.19
@@ -20830,20 +21626,20 @@ snapshots:
dependencies:
'@graphql-tools/graphql-file-loader': 7.5.17([email protected])
'@graphql-tools/json-file-loader': 7.4.18([email protected])
'@graphql-tools/load': 7.8.14([email protected])
'@graphql-tools/merge': 8.4.2([email protected])
- '@graphql-tools/url-loader': 7.17.18(@types/[email protected])([email protected])
+ '@graphql-tools/url-loader': 7.17.18(@types/[email protected])([email protected])
'@graphql-tools/utils': 9.2.1([email protected])
cosmiconfig: 8.0.0
graphql: 16.9.0
jiti: 1.17.1
minimatch: 4.2.3
string-env-interpolation: 1.0.1
- tslib: 2.7.0
+ tslib: 2.8.0
transitivePeerDependencies:
- '@types/node'
- bufferutil
@@ -20863,7 +21659,7 @@ snapshots:
jiti: 2.3.3
minimatch: 9.0.5
string-env-interpolation: 1.0.1
- tslib: 2.7.0
+ tslib: 2.8.0
transitivePeerDependencies:
- '@types/node'
- bufferutil
@@ -20871,20 +21667,20 @@ snapshots:
- typescript
- utf-8-validate
dependencies:
'@graphql-tools/graphql-file-loader': 8.0.1([email protected])
'@graphql-tools/json-file-loader': 8.0.1([email protected])
'@graphql-tools/load': 8.0.2([email protected])
'@graphql-tools/merge': 9.0.7([email protected])
- '@graphql-tools/url-loader': 8.0.2(@types/[email protected])([email protected])
+ '@graphql-tools/url-loader': 8.0.2(@types/[email protected])([email protected])
'@graphql-tools/utils': 10.5.4([email protected])
cosmiconfig: 8.3.6([email protected])
graphql: 16.9.0
jiti: 2.3.3
minimatch: 9.0.5
string-env-interpolation: 1.0.1
- tslib: 2.7.0
+ tslib: 2.8.0
transitivePeerDependencies:
- '@types/node'
- bufferutil
@@ -20892,20 +21688,20 @@ snapshots:
- typescript
- utf-8-validate
dependencies:
'@graphql-tools/graphql-file-loader': 8.0.1([email protected])
'@graphql-tools/json-file-loader': 8.0.1([email protected])
'@graphql-tools/load': 8.0.2([email protected])
'@graphql-tools/merge': 9.0.7([email protected])
- '@graphql-tools/url-loader': 8.0.2(@types/[email protected])([email protected])
+ '@graphql-tools/url-loader': 8.0.2(@types/[email protected])([email protected])
'@graphql-tools/utils': 10.5.4([email protected])
cosmiconfig: 8.3.6([email protected])
graphql: 16.9.0
jiti: 2.3.3
minimatch: 9.0.5
string-env-interpolation: 1.0.1
- tslib: 2.7.0
+ tslib: 2.8.0
transitivePeerDependencies:
- '@types/node'
- bufferutil
@@ -20913,13 +21709,13 @@ snapshots:
- typescript
- utf-8-validate
dependencies:
graphql: 16.9.0
- graphql-config: 4.5.0(@types/[email protected])([email protected])
- graphql-language-service-parser: 1.10.4(@types/[email protected])([email protected])
- graphql-language-service-types: 1.8.7(@types/[email protected])([email protected])
- graphql-language-service-utils: 2.7.1(@types/[email protected])([email protected])
+ graphql-config: 4.5.0(@types/[email protected])([email protected])
+ graphql-language-service-parser: 1.10.4(@types/[email protected])([email protected])
+ graphql-language-service-types: 1.8.7(@types/[email protected])([email protected])
+ graphql-language-service-utils: 2.7.1(@types/[email protected])([email protected])
vscode-languageserver-types: 3.17.5
transitivePeerDependencies:
- '@types/node'
@@ -20928,10 +21724,10 @@ snapshots:
- encoding
- utf-8-validate
dependencies:
graphql: 16.9.0
- graphql-language-service-types: 1.8.7(@types/[email protected])([email protected])
+ graphql-language-service-types: 1.8.7(@types/[email protected])([email protected])
transitivePeerDependencies:
- '@types/node'
- bufferutil
@@ -20939,10 +21735,10 @@ snapshots:
- encoding
- utf-8-validate
dependencies:
graphql: 16.9.0
- graphql-config: 4.5.0(@types/[email protected])([email protected])
+ graphql-config: 4.5.0(@types/[email protected])([email protected])
vscode-languageserver-types: 3.17.5
transitivePeerDependencies:
- '@types/node'
@@ -20951,11 +21747,11 @@ snapshots:
- encoding
- utf-8-validate
dependencies:
'@types/json-schema': 7.0.9
graphql: 16.9.0
- graphql-language-service-types: 1.8.7(@types/[email protected])([email protected])
+ graphql-language-service-types: 1.8.7(@types/[email protected])([email protected])
nullthrows: 1.1.1
transitivePeerDependencies:
- '@types/node'
@@ -21055,7 +21851,7 @@ snapshots:
dependencies:
capital-case: 1.0.4
- tslib: 2.7.0
+ tslib: 2.8.0
@@ -21082,14 +21878,14 @@ snapshots:
selderee: 0.11.0
optional: true
dependencies:
cosmiconfig: 9.0.0([email protected])
posthtml: 0.16.6
timsort: 0.3.0
optionalDependencies:
- cssnano: 7.0.6([email protected])
- postcss: 8.4.47
+ cssnano: 7.0.6([email protected])
+ postcss: 8.4.49
relateurl: 0.2.7
svgo: 3.3.2
terser: 5.34.1
@@ -21415,7 +22211,7 @@ snapshots:
dependencies:
- tslib: 2.7.0
+ tslib: 2.8.0
@@ -21487,7 +22283,7 @@ snapshots:
dependencies:
- tslib: 2.7.0
+ tslib: 2.8.0
@@ -21502,6 +22298,8 @@ snapshots:
call-bind: 1.0.7
get-intrinsic: 1.2.4
+
@@ -21612,7 +22410,7 @@ snapshots:
'@jest/expect': 29.7.0
'@jest/test-result': 29.7.0
'@jest/types': 29.6.3
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
chalk: 4.1.2
co: 4.6.0
dedent: 1.5.3
@@ -21682,7 +22480,7 @@ snapshots:
- babel-plugin-macros
- supports-color
dependencies:
'@babel/core': 7.25.7
'@jest/test-sequencer': 29.7.0
@@ -21707,7 +22505,7 @@ snapshots:
slash: 3.0.0
strip-json-comments: 3.1.1
optionalDependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
transitivePeerDependencies:
- babel-plugin-macros
@@ -21737,7 +22535,7 @@ snapshots:
'@jest/environment': 29.7.0
'@jest/fake-timers': 29.7.0
'@jest/types': 29.6.3
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
jest-mock: 29.7.0
jest-util: 29.7.0
@@ -21747,7 +22545,7 @@ snapshots:
dependencies:
'@jest/types': 29.6.3
'@types/graceful-fs': 4.1.9
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
anymatch: 3.1.3
fb-watchman: 2.0.2
graceful-fs: 4.2.11
@@ -21793,7 +22591,7 @@ snapshots:
dependencies:
'@jest/types': 29.6.3
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
jest-util: 29.7.0
@@ -21828,7 +22626,7 @@ snapshots:
'@jest/test-result': 29.7.0
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
chalk: 4.1.2
emittery: 0.13.1
graceful-fs: 4.2.11
@@ -21856,7 +22654,7 @@ snapshots:
'@jest/test-result': 29.7.0
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
chalk: 4.1.2
cjs-module-lexer: 1.4.1
collect-v8-coverage: 1.0.2
@@ -21902,7 +22700,7 @@ snapshots:
dependencies:
'@jest/types': 29.6.3
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
chalk: 4.1.2
ci-info: 3.9.0
graceful-fs: 4.2.11
@@ -21921,7 +22719,7 @@ snapshots:
dependencies:
'@jest/test-result': 29.7.0
'@jest/types': 29.6.3
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
ansi-escapes: 4.3.2
chalk: 4.1.2
emittery: 0.13.1
@@ -21930,13 +22728,13 @@ snapshots:
dependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
merge-stream: 2.0.0
supports-color: 8.1.1
dependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
jest-util: 29.7.0
merge-stream: 2.0.0
supports-color: 8.1.1
@@ -22133,6 +22931,8 @@ snapshots:
+
@@ -22347,11 +23147,11 @@ snapshots:
dependencies:
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
- tslib: 2.7.0
+ tslib: 2.8.0
@@ -22469,9 +23269,9 @@ snapshots:
optionalDependencies:
'@types/node': 18.18.8
optionalDependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
@@ -22652,14 +23452,14 @@ snapshots:
dependencies:
'@babel/runtime': 7.25.7
cheerio: 1.0.0-rc.12
- cssnano: 7.0.6([email protected])
+ cssnano: 7.0.6([email protected])
detect-node: 2.1.0
juice: 10.0.1
lodash: 4.17.21
mjml-parser-xml: 5.0.0-alpha.4
mjml-validator: 5.0.0-alpha.4
- postcss: 8.4.47
+ postcss: 8.4.49
prettier: 3.3.3
transitivePeerDependencies:
- encoding
@@ -23078,13 +23878,6 @@ snapshots:
pkg-types: 1.2.1
ufo: 1.5.4
- dependencies:
- acorn: 8.12.1
- pathe: 1.1.2
- pkg-types: 1.2.1
- ufo: 1.5.4
-
dependencies:
acorn: 8.12.1
@@ -23171,7 +23964,7 @@ snapshots:
dependencies:
lower-case: 2.0.2
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
@@ -23430,7 +24223,7 @@ snapshots:
dependencies:
dot-case: 3.0.4
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
@@ -23486,7 +24279,7 @@ snapshots:
dependencies:
no-case: 3.0.4
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
@@ -23530,7 +24323,7 @@ snapshots:
dependencies:
dot-case: 3.0.4
- tslib: 2.7.0
+ tslib: 2.8.0
@@ -23603,12 +24396,12 @@ snapshots:
-
+
@@ -23653,48 +24446,48 @@ snapshots:
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-selector-parser: 6.1.2
postcss-value-parser: 4.2.0
optional: true
dependencies:
browserslist: 4.24.0
caniuse-api: 3.0.0
colord: 2.9.3
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
dependencies:
browserslist: 4.24.0
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-selector-parser: 6.1.2
optional: true
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
optional: true
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
optional: true
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
optional: true
@@ -23704,93 +24497,121 @@ snapshots:
read-cache: 1.0.0
resolve: 1.22.8
+ dependencies:
+ postcss: 8.4.49
+ postcss-value-parser: 4.2.0
+ read-cache: 1.0.0
+ resolve: 1.22.8
+
dependencies:
camelcase-css: 2.0.1
postcss: 8.4.47
+ dependencies:
+ camelcase-css: 2.0.1
+ postcss: 8.4.49
+
dependencies:
lilconfig: 3.1.2
yaml: 2.4.2
optionalDependencies:
postcss: 8.4.47
dependencies:
lilconfig: 3.1.2
yaml: 2.4.2
optionalDependencies:
postcss: 8.4.47
dependencies:
lilconfig: 3.1.2
yaml: 2.4.2
optionalDependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
dependencies:
lilconfig: 3.1.2
yaml: 2.4.2
optionalDependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
+
+ dependencies:
+ lilconfig: 3.1.2
+ yaml: 2.4.2
+ optionalDependencies:
+ postcss: 8.4.49
+
+ dependencies:
+ lilconfig: 3.1.2
+ yaml: 2.4.2
+ optionalDependencies:
+ postcss: 8.4.49
dependencies:
lilconfig: 3.1.2
optionalDependencies:
jiti: 2.3.3
- postcss: 8.4.47
+ postcss: 8.4.49
yaml: 2.5.1
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
- stylehacks: 7.0.4([email protected])
+ stylehacks: 7.0.4([email protected])
optional: true
dependencies:
browserslist: 4.24.0
caniuse-api: 3.0.0
- cssnano-utils: 5.0.0([email protected])
- postcss: 8.4.47
+ cssnano-utils: 5.0.0([email protected])
+ postcss: 8.4.49
postcss-selector-parser: 6.1.2
optional: true
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
dependencies:
colord: 2.9.3
- cssnano-utils: 5.0.0([email protected])
- postcss: 8.4.47
+ cssnano-utils: 5.0.0([email protected])
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
dependencies:
browserslist: 4.24.0
- cssnano-utils: 5.0.0([email protected])
- postcss: 8.4.47
+ cssnano-utils: 5.0.0([email protected])
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
dependencies:
cssesc: 3.0.0
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-selector-parser: 6.1.2
optional: true
@@ -23799,77 +24620,82 @@ snapshots:
postcss: 8.4.47
postcss-selector-parser: 6.1.1
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
+ postcss-selector-parser: 6.1.1
+
+ dependencies:
+ postcss: 8.4.49
optional: true
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
dependencies:
browserslist: 4.24.0
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
dependencies:
- cssnano-utils: 5.0.0([email protected])
- postcss: 8.4.47
+ cssnano-utils: 5.0.0([email protected])
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
dependencies:
browserslist: 4.24.0
caniuse-api: 3.0.0
- postcss: 8.4.47
+ postcss: 8.4.49
optional: true
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
optional: true
@@ -23883,16 +24709,16 @@ snapshots:
cssesc: 3.0.0
util-deprecate: 1.0.2
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-value-parser: 4.2.0
svgo: 3.3.2
optional: true
dependencies:
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-selector-parser: 6.1.2
optional: true
@@ -23910,6 +24736,12 @@ snapshots:
picocolors: 1.1.0
source-map-js: 1.2.1
+ dependencies:
+ nanoid: 3.3.8
+ picocolors: 1.1.1
+ source-map-js: 1.2.1
+
dependencies:
axios: 1.7.7
@@ -24125,7 +24957,7 @@ snapshots:
dependencies:
- tslib: 2.7.0
+ tslib: 2.8.0
@@ -24433,7 +25265,7 @@ snapshots:
dependencies:
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
@@ -24520,7 +25352,7 @@ snapshots:
dependencies:
no-case: 3.0.4
- tslib: 2.7.0
+ tslib: 2.8.0
upper-case-first: 2.0.2
@@ -24665,7 +25497,7 @@ snapshots:
dependencies:
dot-case: 3.0.4
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
@@ -24761,7 +25593,7 @@ snapshots:
dependencies:
- tslib: 2.7.0
+ tslib: 2.8.0
@@ -24900,10 +25732,10 @@ snapshots:
dependencies:
browserslist: 4.24.0
- postcss: 8.4.47
+ postcss: 8.4.49
postcss-selector-parser: 6.1.2
optional: true
@@ -24943,6 +25775,10 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ dependencies:
+ copy-anything: 3.0.5
+
dependencies:
methods: 1.1.2
@@ -24964,6 +25800,12 @@ snapshots:
+ dependencies:
+ svelte: 3.59.2
+
+
dependencies:
'@trysound/sax': 0.2.0
@@ -24991,7 +25833,7 @@ snapshots:
dependencies:
- tslib: 2.7.0
+ tslib: 2.8.0
@@ -25002,7 +25844,7 @@ snapshots:
dependencies:
'@pkgr/core': 0.1.1
- tslib: 2.7.0
+ tslib: 2.8.0
@@ -25022,11 +25864,11 @@ snapshots:
normalize-path: 3.0.0
object-hash: 3.0.0
picocolors: 1.1.0
- postcss: 8.4.47
- postcss-import: 15.1.0([email protected])
- postcss-js: 4.0.1([email protected])
- postcss-nested: 6.0.1([email protected])
+ postcss: 8.4.49
+ postcss-import: 15.1.0([email protected])
+ postcss-js: 4.0.1([email protected])
+ postcss-nested: 6.0.1([email protected])
postcss-selector-parser: 6.1.2
resolve: 1.22.8
sucrase: 3.35.0
@@ -25060,7 +25902,7 @@ snapshots:
transitivePeerDependencies:
- ts-node
dependencies:
'@alloc/quick-lru': 5.2.0
arg: 5.0.2
@@ -25079,7 +25921,7 @@ snapshots:
postcss: 8.4.47
postcss-import: 15.1.0([email protected])
postcss-js: 4.0.1([email protected])
postcss-nested: 6.0.1([email protected])
postcss-selector-parser: 6.1.2
resolve: 1.22.8
@@ -25087,7 +25929,7 @@ snapshots:
transitivePeerDependencies:
- ts-node
dependencies:
'@alloc/quick-lru': 5.2.0
arg: 5.0.2
@@ -25103,18 +25945,18 @@ snapshots:
normalize-path: 3.0.0
object-hash: 3.0.0
picocolors: 1.1.0
- postcss: 8.4.47
- postcss-import: 15.1.0([email protected])
- postcss-js: 4.0.1([email protected])
- postcss-nested: 6.0.1([email protected])
+ postcss: 8.4.49
+ postcss-import: 15.1.0([email protected])
+ postcss-js: 4.0.1([email protected])
+ postcss-nested: 6.0.1([email protected])
postcss-selector-parser: 6.1.2
resolve: 1.22.8
sucrase: 3.35.0
transitivePeerDependencies:
- ts-node
dependencies:
'@alloc/quick-lru': 5.2.0
arg: 5.0.2
@@ -25130,11 +25972,38 @@ snapshots:
normalize-path: 3.0.0
object-hash: 3.0.0
picocolors: 1.1.0
- postcss: 8.4.47
- postcss-import: 15.1.0([email protected])
- postcss-js: 4.0.1([email protected])
- postcss-nested: 6.0.1([email protected])
+ postcss: 8.4.49
+ postcss-import: 15.1.0([email protected])
+ postcss-js: 4.0.1([email protected])
+ postcss-nested: 6.0.1([email protected])
+ postcss-selector-parser: 6.1.2
+ resolve: 1.22.8
+ sucrase: 3.35.0
+ transitivePeerDependencies:
+ - ts-node
+
+ dependencies:
+ '@alloc/quick-lru': 5.2.0
+ arg: 5.0.2
+ chokidar: 3.6.0
+ didyoumean: 1.2.2
+ dlv: 1.1.3
+ fast-glob: 3.3.2
+ glob-parent: 6.0.2
+ is-glob: 4.0.3
+ jiti: 1.21.6
+ lilconfig: 2.1.0
+ micromatch: 4.0.8
+ normalize-path: 3.0.0
+ object-hash: 3.0.0
+ picocolors: 1.1.0
+ postcss: 8.4.49
+ postcss-import: 15.1.0([email protected])
+ postcss-js: 4.0.1([email protected])
+ postcss-nested: 6.0.1([email protected])
postcss-selector-parser: 6.1.2
resolve: 1.22.8
sucrase: 3.35.0
@@ -25273,7 +26142,7 @@ snapshots:
dependencies:
- tslib: 2.7.0
+ tslib: 2.8.0
@@ -25372,7 +26241,7 @@ snapshots:
dependencies:
chokidar: 3.6.0
dynamic-dedupe: 0.3.0
@@ -25382,7 +26251,7 @@ snapshots:
rimraf: 2.7.1
source-map-support: 0.5.21
tree-kill: 1.2.2
tsconfig: 7.0.0
typescript: 5.6.3
transitivePeerDependencies:
@@ -25452,14 +26321,14 @@ snapshots:
'@swc/core': 1.4.2
optional: true
dependencies:
'@cspotcode/source-map-support': 0.8.1
'@tsconfig/node10': 1.0.11
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
acorn: 8.12.1
acorn-walk: 8.3.4
arg: 4.1.3
@@ -25473,14 +26342,14 @@ snapshots:
'@swc/core': 1.4.2
optional: true
dependencies:
'@cspotcode/source-map-support': 0.8.1
'@tsconfig/node10': 1.0.11
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
acorn: 8.12.1
acorn-walk: 8.3.4
arg: 4.1.3
@@ -25493,6 +26362,27 @@ snapshots:
optionalDependencies:
'@swc/core': 1.4.2
+ dependencies:
+ '@cspotcode/source-map-support': 0.8.1
+ '@tsconfig/node10': 1.0.11
+ '@tsconfig/node12': 1.0.11
+ '@tsconfig/node14': 1.0.3
+ '@tsconfig/node16': 1.0.4
+ '@types/node': 22.9.3
+ acorn: 8.12.1
+ acorn-walk: 8.3.4
+ arg: 4.1.3
+ create-require: 1.1.1
+ diff: 4.0.2
+ make-error: 1.3.6
+ typescript: 5.7.2
+ v8-compile-cache-lib: 3.0.1
+ yn: 3.1.1
+ optionalDependencies:
+ '@swc/core': 1.4.2
+ optional: true
+
@@ -25528,7 +26418,7 @@ snapshots:
dependencies:
bundle-require: 5.0.0([email protected])
cac: 6.7.14
@@ -25539,7 +26429,7 @@ snapshots:
execa: 5.1.1
joycon: 3.1.1
picocolors: 1.1.0
resolve-from: 5.0.0
rollup: 4.24.0
source-map: 0.8.0-beta.0
@@ -25548,7 +26438,7 @@ snapshots:
tree-kill: 1.2.2
optionalDependencies:
'@swc/core': 1.4.2
- postcss: 8.4.47
+ postcss: 8.4.49
typescript: 5.6.3
transitivePeerDependencies:
- jiti
@@ -25626,6 +26516,8 @@ snapshots:
+
@@ -25710,17 +26602,17 @@ snapshots:
unplugin: 1.10.1
dependencies:
fast-glob: 3.3.2
unplugin: 1.10.1
dependencies:
fast-glob: 3.3.2
unplugin: 1.10.1
dependencies:
@@ -25815,6 +26707,26 @@ snapshots:
- supports-color
- webpack-sources
+ dependencies:
+ '@antfu/utils': 0.7.10
+ '@rollup/pluginutils': 5.1.2([email protected])
+ chokidar: 3.6.0
+ debug: 4.3.7
+ fast-glob: 3.3.2
+ local-pkg: 0.5.0
+ magic-string: 0.30.11
+ minimatch: 9.0.5
+ mlly: 1.7.2
+ unplugin: 1.14.1([email protected])
+ vue: 3.5.12([email protected])
+ optionalDependencies:
+ '@babel/parser': 7.25.7
+ transitivePeerDependencies:
+ - rollup
+ - supports-color
+ - webpack-sources
+
dependencies:
acorn: 8.12.1
@@ -25860,11 +26772,11 @@ snapshots:
dependencies:
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
- tslib: 2.7.0
+ tslib: 2.8.0
dependencies:
@@ -25935,12 +26847,12 @@ snapshots:
dependencies:
zod: 3.23.8
dependencies:
cac: 6.7.14
debug: 4.3.7
pathe: 1.1.2
transitivePeerDependencies:
- '@types/node'
- less
@@ -25957,7 +26869,7 @@ snapshots:
cac: 6.7.14
debug: 4.3.7
pathe: 1.1.2
transitivePeerDependencies:
- '@types/node'
- less
@@ -25969,12 +26881,12 @@ snapshots:
- supports-color
- terser
dependencies:
cac: 6.7.14
debug: 4.3.7
pathe: 1.1.2
transitivePeerDependencies:
- '@types/node'
- less
@@ -25986,7 +26898,7 @@ snapshots:
- supports-color
- terser
dependencies:
'@babel/code-frame': 7.25.7
ansi-escapes: 4.3.2
@@ -25999,7 +26911,7 @@ snapshots:
semver: 7.6.3
strip-ansi: 6.0.1
tiny-invariant: 1.3.3
vscode-languageclient: 7.0.0
vscode-languageserver: 7.0.0
vscode-languageserver-textdocument: 1.0.11
@@ -26010,21 +26922,37 @@ snapshots:
typescript: 5.3.3
vue-tsc: 1.8.24([email protected])
dependencies:
'@rollup/pluginutils': 4.2.1
'@types/eslint': 8.56.10
eslint: 8.57.0
rollup: 2.79.2
dependencies:
'@rollup/pluginutils': 4.2.1
'@types/eslint': 8.56.10
eslint: 8.57.0
rollup: 2.79.2
+
+ dependencies:
+ '@rollup/pluginutils': 4.2.1
+ '@types/eslint': 8.56.10
+ eslint: 9.12.0([email protected])
+ rollup: 2.79.2
+
+ dependencies:
+ '@rollup/pluginutils': 4.2.1
+ '@types/eslint': 8.56.10
+ eslint: 9.12.0([email protected])
+ rollup: 2.79.2
dependencies:
@@ -26034,35 +26962,35 @@ snapshots:
rollup: 2.79.2
dependencies:
'@rollup/pluginutils': 4.2.1
'@types/eslint': 8.56.10
eslint: 9.12.0([email protected])
rollup: 2.79.2
dependencies:
fast-glob: 3.3.2
dependencies:
fast-glob: 3.3.2
dependencies:
dependencies:
dependencies:
dependencies:
@@ -26079,7 +27007,7 @@ snapshots:
- rollup
- supports-color
dependencies:
'@antfu/utils': 0.7.10
'@rollup/pluginutils': 5.1.2([email protected])
@@ -26090,7 +27018,7 @@ snapshots:
perfect-debounce: 1.0.0
picocolors: 1.1.0
sirv: 2.0.4
transitivePeerDependencies:
- rollup
- supports-color
@@ -26119,7 +27047,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@types/debug': 4.1.12
debug: 4.3.7
@@ -26129,7 +27057,7 @@ snapshots:
json5: 2.2.3
local-pkg: 0.5.0
picocolors: 1.1.0
yaml: 2.5.1
optionalDependencies:
'@vue/compiler-sfc': 3.5.12
@@ -26137,7 +27065,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@types/debug': 4.1.12
debug: 4.3.7
@@ -26147,7 +27075,7 @@ snapshots:
json5: 2.2.3
local-pkg: 0.5.0
picocolors: 1.1.0
yaml: 2.5.1
optionalDependencies:
'@vue/compiler-sfc': 3.5.12
@@ -26155,7 +27083,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@types/debug': 4.1.12
debug: 4.3.7
@@ -26165,7 +27093,7 @@ snapshots:
json5: 2.2.3
local-pkg: 0.5.0
picocolors: 1.1.0
yaml: 2.5.1
optionalDependencies:
'@vue/compiler-sfc': 3.5.12
@@ -26185,23 +27113,23 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
debug: 4.3.7
pretty-bytes: 6.1.1
tinyglobby: 0.2.9
workbox-build: 7.1.0(@types/[email protected])
workbox-window: 7.1.0
transitivePeerDependencies:
- supports-color
dependencies:
debug: 4.3.7
pretty-bytes: 6.1.1
tinyglobby: 0.2.9
workbox-build: 7.1.0(@types/[email protected])
workbox-window: 7.1.0
transitivePeerDependencies:
@@ -26215,39 +27143,39 @@ snapshots:
picocolors: 1.1.0
dependencies:
chokidar: 3.6.0
fast-glob: 3.3.2
fs-extra: 11.2.0
picocolors: 1.1.0
dependencies:
debug: 4.3.7
fast-glob: 3.3.2
vue: 3.5.12([email protected])
transitivePeerDependencies:
- supports-color
dependencies:
debug: 4.3.7
fast-glob: 3.3.2
vue: 3.5.12([email protected])
transitivePeerDependencies:
- supports-color
dependencies:
debug: 4.3.7
fast-glob: 3.3.2
vue: 3.5.12([email protected])
transitivePeerDependencies:
@@ -26264,10 +27192,22 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ dependencies:
+ esbuild: 0.15.18
+ postcss: 8.4.49
+ resolve: 1.22.8
+ rollup: 2.79.2
+ optionalDependencies:
+ '@types/node': 22.9.3
+ fsevents: 2.3.3
+ sass: 1.80.3
+ terser: 5.34.1
+
dependencies:
esbuild: 0.18.20
- postcss: 8.4.47
+ postcss: 8.4.49
rollup: 3.29.4
optionalDependencies:
'@types/node': 18.18.8
@@ -26275,6 +27215,50 @@ snapshots:
sass: 1.80.3
terser: 5.34.1
+ dependencies:
+ esbuild: 0.21.5
+ postcss: 8.4.49
+ rollup: 4.24.0
+ optionalDependencies:
+ '@types/node': 22.7.5
+ fsevents: 2.3.3
+ sass: 1.80.3
+ terser: 5.34.1
+
+ dependencies:
+ esbuild: 0.21.5
+ postcss: 8.4.49
+ rollup: 4.24.0
+ optionalDependencies:
+ '@types/node': 22.7.6
+ fsevents: 2.3.3
+ sass: 1.80.3
+ terser: 5.34.1
+
+ dependencies:
+ esbuild: 0.21.5
+ postcss: 8.4.49
+ rollup: 4.24.0
+ optionalDependencies:
+ '@types/node': 22.9.3
+ fsevents: 2.3.3
+ sass: 1.79.5
+ terser: 5.34.1
+
+ dependencies:
+ esbuild: 0.21.5
+ postcss: 8.4.49
+ rollup: 4.24.0
+ optionalDependencies:
+ '@types/node': 22.9.3
+ fsevents: 2.3.3
+ sass: 1.80.3
+ terser: 5.34.1
+
dependencies:
esbuild: 0.21.5
@@ -26286,32 +27270,36 @@ snapshots:
sass: 1.80.3
terser: 5.34.1
dependencies:
esbuild: 0.21.5
postcss: 8.4.47
rollup: 4.24.0
optionalDependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
fsevents: 2.3.3
sass: 1.79.5
terser: 5.34.1
dependencies:
esbuild: 0.21.5
postcss: 8.4.47
rollup: 4.24.0
optionalDependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
fsevents: 2.3.3
sass: 1.80.3
terser: 5.34.1
+ optionalDependencies:
+
dependencies:
'@vitest/expect': 2.1.2
'@vitest/pretty-format': 2.1.3
'@vitest/runner': 2.1.2
'@vitest/snapshot': 2.1.2
@@ -26326,11 +27314,11 @@ snapshots:
tinyexec: 0.3.0
tinypool: 1.0.1
tinyrainbow: 1.2.0
why-is-node-running: 2.3.0
optionalDependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
jsdom: 25.0.1([email protected])
transitivePeerDependencies:
- less
@@ -26378,10 +27366,10 @@ snapshots:
- supports-color
- terser
dependencies:
'@vitest/expect': 2.1.3
'@vitest/pretty-format': 2.1.3
'@vitest/runner': 2.1.3
'@vitest/snapshot': 2.1.3
@@ -26396,11 +27384,11 @@ snapshots:
tinyexec: 0.3.0
tinypool: 1.0.1
tinyrainbow: 1.2.0
why-is-node-running: 2.3.0
optionalDependencies:
- '@types/node': 22.7.6
+ '@types/node': 22.9.3
jsdom: 25.0.1([email protected])
transitivePeerDependencies:
- less
@@ -26453,6 +27441,10 @@ snapshots:
dependencies:
vue: 3.5.12([email protected])
+ dependencies:
+ vue: 3.5.12([email protected])
+
dependencies:
vue: 3.5.12([email protected])
@@ -26461,6 +27453,10 @@ snapshots:
dependencies:
vue: 3.5.12([email protected])
+ dependencies:
+ vue: 3.5.12([email protected])
+
dependencies:
debug: 4.3.7
@@ -26529,6 +27525,12 @@ snapshots:
transitivePeerDependencies:
- typescript
+ dependencies:
+ vue: 3.5.12([email protected])
+ transitivePeerDependencies:
+ - typescript
+
dependencies:
'@vue/devtools-api': 6.6.4
@@ -26544,6 +27546,11 @@ snapshots:
'@vue/devtools-api': 6.6.4
vue: 3.5.12([email protected])
+ dependencies:
+ '@vue/devtools-api': 6.6.4
+ vue: 3.5.12([email protected])
+
dependencies:
de-indent: 1.0.2
@@ -26559,6 +27566,11 @@ snapshots:
tippy.js: 6.3.7
vue: 3.5.12([email protected])
+ dependencies:
+ tippy.js: 6.3.7
+ vue: 3.5.12([email protected])
+
dependencies:
'@volar/typescript': 1.11.1
@@ -26587,6 +27599,12 @@ snapshots:
semver: 7.6.3
typescript: 5.6.3
+ dependencies:
+ '@volar/typescript': 2.4.11
+ '@vue/language-core': 2.2.0([email protected])
+ typescript: 5.7.2
+
dependencies:
'@vue/compiler-dom': 3.5.12
@@ -26617,6 +27635,16 @@ snapshots:
optionalDependencies:
typescript: 5.6.3
+ dependencies:
+ '@vue/compiler-dom': 3.5.12
+ '@vue/compiler-sfc': 3.5.12
+ '@vue/runtime-dom': 3.5.12
+ '@vue/server-renderer': 3.5.12([email protected]([email protected]))
+ '@vue/shared': 3.5.12
+ optionalDependencies:
+ typescript: 5.7.2
+
dependencies:
sortablejs: 1.14.0
@@ -26627,6 +27655,11 @@ snapshots:
sortablejs: 1.14.0
vue: 3.5.12([email protected])
+ dependencies:
+ sortablejs: 1.14.0
+ vue: 3.5.12([email protected])
+
@@ -26666,7 +27699,7 @@ snapshots:
'@peculiar/json-schema': 1.1.12
asn1js: 3.0.5
pvtsutils: 1.3.5
- tslib: 2.7.0
+ tslib: 2.8.0
diff --git a/prod.Dockerfile b/prod.Dockerfile
index 5dc36cf5d..4e1f48596 100644
--- a/prod.Dockerfile
+++ b/prod.Dockerfile
@@ -45,7 +45,7 @@ COPY pnpm-lock.yaml .
RUN pnpm fetch
COPY . .
-RUN pnpm install -f --offline
+RUN pnpm install -f --prefer-offline
@@ -91,6 +91,12 @@ FROM base_builder AS fe_builder
WORKDIR /usr/src/app/packages/hoppscotch-selfhost-web
RUN pnpm run generate
+FROM rust:1-alpine AS webapp_server_builder
+WORKDIR /usr/src/app
+RUN apk add --no-cache musl-dev
+COPY . .
+WORKDIR /usr/src/app/packages/hoppscotch-selfhost-web/webapp-server
+RUN cargo build --release
@@ -158,6 +164,17 @@ WORKDIR /site
CMD ["node","/site/prod_run.mjs"]
+FROM node:20-alpine AS webapp_server
+COPY --from=webapp_server_builder /usr/src/app/packages/hoppscotch-selfhost-web/webapp-server/target/release/webapp-server /usr/local/bin/
+RUN mkdir -p /site/selfhost-web
+COPY --from=fe_builder /usr/src/app/packages/hoppscotch-selfhost-web/dist /site/selfhost-web
+COPY --from=fe_builder /usr/src/app/packages/hoppscotch-selfhost-web/prod_run.mjs /site/prod_run.mjs
+RUN apk add nodejs npm
+RUN npm install -g @import-meta-env/cli
+WORKDIR /site
+CMD ["/bin/sh", "-c", "node /site/prod_run.mjs && webapp-server"]
+EXPOSE 3200
+
FROM alpine:3.19.6 AS aio
RUN apk add nodejs curl
@@ -189,6 +206,11 @@ COPY --from=base_builder /usr/src/app/packages/hoppscotch-backend/backend.Caddyf
COPY --from=backend_builder /dist/backend /dist/backend
COPY --from=base_builder /usr/src/app/packages/hoppscotch-backend/prod_run.mjs /dist/backend
+# Static Server
+COPY --from=webapp_server_builder /usr/src/app/packages/hoppscotch-selfhost-web/webapp-server/target/release/webapp-server /usr/local/bin/
+RUN mkdir -p /site/selfhost-web
+COPY --from=fe_builder /usr/src/app/packages/hoppscotch-selfhost-web/dist /site/selfhost-web
+
# FE Files
COPY --from=base_builder /usr/src/app/aio_run.mjs /usr/src/app/aio_run.mjs
COPY --from=fe_builder /usr/src/app/packages/hoppscotch-selfhost-web/dist /site/selfhost-web
@@ -211,4 +233,5 @@ CMD ["node", "/usr/src/app/aio_run.mjs"]
EXPOSE 3170
EXPOSE 3000
EXPOSE 3100
+EXPOSE 3200
EXPOSE 80
diff --git a/tailwind.config.ts b/tailwind.config.ts
index a02993c1b..916a62176 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -4,6 +4,7 @@ export default {
content: [
"packages/hoppscotch-common/src/**/*.{vue,html}",
"packages/hoppscotch-sh-admin/src/**/*.{vue,html}",
+ "packages/hoppscotch-desktop/src/**/*.{vue,html}",
],
presets: [preset],
}