commit
Move to an electron app (ikik)
diff --git a/.dockerignore b/.dockerignore
index 4b41fd0..f2ae1c6 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -5,3 +5,8 @@ data/
.env.keys
.git
*.log
+
+# The server image only needs the web/ workspaces. Excluding apps/ keeps the
+# Electron desktop app (its ~250MB Electron binary + electron-builder toolchain)
+# and the Android/Kotlin sources out of `bun install` and the image.
+apps/
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 408e22e..7c04cc6 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -4,13 +4,14 @@ version: 2
# semver bump so you get a few tidy PRs a week instead of a flood of individual
# ones. Weekly cadence; bump the interval to `daily` if you want them sooner.
updates:
- # JavaScript/TypeScript deps — root plus every workspace package. Uses the
- # native `bun` ecosystem (GA since Feb 2025) so bun.lock is updated too.
+ # JavaScript/TypeScript deps — root plus every workspace package (web/* and
+ # apps/*). Uses the native `bun` ecosystem (GA since Feb 2025) so bun.lock is
+ # updated too.
- package-ecosystem: bun
directories:
- "/"
+ - "/web/*"
- "/apps/*"
- - "/packages/*"
schedule:
interval: weekly
open-pull-requests-limit: 10
@@ -18,16 +19,6 @@ updates:
bun-minor-patch:
update-types: ["minor", "patch"]
- # Rust deps for the Tauri desktop app.
- - package-ecosystem: cargo
- directory: "/apps/desktop/src-tauri"
- schedule:
- interval: weekly
- open-pull-requests-limit: 10
- groups:
- cargo-minor-patch:
- update-types: ["minor", "patch"]
-
# The actions pinned in .github/workflows (checkout, docker/*, setup-*, etc.).
- package-ecosystem: github-actions
directory: "/"
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index bd38d56..ed77652 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,18 +1,23 @@
name: release
# Builds every platform for one tag and publishes a single GitHub Release:
-# desktop (macOS/Linux/Windows via tauri-action) plus the signed native
-# Android APK (apps/android — a WebView shell around the site with a native
-# Media3 playback service for background/locked playback; NOT built via the
-# Tauri Android target). The desktop job creates the release as a *draft*;
-# the android job attaches the APK last and then flips it to published +
-# "latest", so the release only goes live once all artifacts are present.
#
-# Used to be two workflows (this one covered desktop + a Tauri-built Android
-# APK; a separate android.yml covered the real apps/android APK under its own
-# "android-vX" tag). Merged into this single file/tag/release on 2026-08-22 —
-# the Tauri Android target never shipped background playback, so it was
-# always the wrong artifact to publish.
+# create-release makes the draft
+# build Electron desktop app for macOS / Linux / Windows via
+# electron-builder (apps/desktop — a thin shell over the live
+# site plus Discord Rich Presence over IPC; no Rust, no
+# proprietary SDK)
+# android the SIGNED native Android APK (apps/android — a WebView
+# shell with a native Media3 playback service for
+# background/locked playback), attached last, then the
+# release is flipped to published + "latest"
+# aur repackages the published Linux AppImage for the AUR
+#
+# The release only goes live once every artifact is present.
+#
+# Migrated off Tauri/Rust on 2026-08-30: gone are the Discord Social SDK fetch,
+# the Rust toolchain, the Linux WebKitGTK build deps, and the whole "unbundle
+# the GTK stack from the AppImage" dance — Electron ships its own Chromium.
#
# THIS FILE IS MADE BY CLAUDE, SO IF SHIT BREAKS, I'M SORRY!
on:
@@ -32,10 +37,25 @@ on:
type: string
jobs:
+ # Create the draft release up front so the matrix jobs (and android/aur) all
+ # have something to attach to without racing each other on creation.
+ create-release:
+ permissions:
+ contents: write
+ runs-on: ubuntu-latest
+ steps:
+ - uses: softprops/action-gh-release@v2
+ with:
+ tag_name: ${{ inputs.version || github.ref_name }}
+ name: >-
+ ${{ inputs.codename
+ && format('Doughmination Music {0} "{1}"', inputs.version || github.ref_name, inputs.codename)
+ || format('Doughmination Music {0}', inputs.version || github.ref_name) }}
+ draft: true
+ prerelease: false
+
build:
- # tauri-action creates/updates a GitHub Release, which needs write access.
- # The default GITHUB_TOKEN is read-only ("Resource not accessible by
- # integration"), so grant it explicitly.
+ needs: create-release
permissions:
contents: write
@@ -44,283 +64,51 @@ jobs:
matrix:
include:
- platform: macos-latest
- args: "--target universal-apple-darwin"
- # Pinned to 22.04 (not ubuntu-latest/24.04): builds an AppImage
- # against an older glibc/webkit so it runs on more distros, and
- # keeps libappindicator3-dev available.
- - platform: ubuntu-22.04
- args: ""
+ electronArgs: "--universal"
+ - platform: ubuntu-latest
+ electronArgs: ""
- platform: windows-latest
- args: ""
+ electronArgs: ""
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v7
- # The Discord SDK binaries used to be committed via Git LFS — 745MB of
- # debug/iOS/Android builds this project never uses, re-fetched in full
- # by all 3 matrix jobs on every run, which blew through GitHub's free
- # LFS bandwidth budget and blocked every release build. Now a lean
- # (~17MB), release-only, all-desktop-platforms re-host lives on our own
- # CDN instead — not subject to that quota. See .gitignore for why the
- # directory isn't tracked, and build.rs for how it's consumed once
- # unpacked here.
- - name: fetch Discord Social SDK
- shell: bash
- run: |
- curl -sSL -o discord-sdk.zip "https://m.doughmination.gay/sdks/discord-sdk.zip"
- unzip -q discord-sdk.zip -d apps/desktop/src-tauri
- rm discord-sdk.zip
-
- uses: oven-sh/setup-bun@v2
- - uses: dtolnay/rust-toolchain@stable
- with:
- targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
-
- - name: install Linux tauri deps
- if: matrix.platform == 'ubuntu-22.04'
- run: |
- sudo apt-get update
- # libfuse2: lets the AppImage tooling (linuxdeploy) run at all.
- # gstreamer*: Tauri's AppImage build runs linuxdeploy-plugin-gstreamer
- # (webkit2gtk uses gstreamer for HTML5 <audio>); without gstreamer
- # installed that plugin errors and linuxdeploy fails.
- # gstreamer *runtime* packages only — the -dev variants pull in
- # libunwind-dev, which conflicts with the runner's preinstalled
- # packages ("held broken packages"). The AppImage gstreamer plugin
- # only needs the runtime libs/plugins present, not headers.
- sudo apt-get install -y \
- libwebkit2gtk-4.1-dev \
- libappindicator3-dev \
- librsvg2-dev \
- patchelf \
- libfuse2 \
- gstreamer1.0-plugins-base \
- gstreamer1.0-plugins-good \
- gstreamer1.0-libav
-
- run: bun install
- - uses: tauri-apps/tauri-action@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- # Run the AppImage tools in extract-and-run mode so they don't need
- # FUSE (unavailable on GitHub runners) — the other half of the
- # "failed to run linuxdeploy" fix.
- APPIMAGE_EXTRACT_AND_RUN: "1"
- # Help linuxdeploy resolve the Discord SDK shared object when bundling
- # the AppImage (backs up the $ORIGIN rpath in build.rs). Linux-only
- # var; harmless on the macOS/Windows runners.
- LD_LIBRARY_PATH: ${{ github.workspace }}/apps/desktop/src-tauri/discord_social_sdk/lib/release
- with:
- projectPath: apps/desktop/src-tauri
- # Manual runs supply the tag via the `version` input; tag pushes use
- # the pushed tag name. tauri-action creates the tag + draft release.
- tagName: ${{ inputs.version || github.ref_name }}
- # Cosmetic only: `codename` decorates the release title and nothing
- # else — not the tag, not the artifact names, not the AUR pkgver.
- # Left off, the title is exactly what it always was.
- releaseName: >-
- ${{ inputs.codename
- && format('Doughmination Music {0} "{1}"', inputs.version || github.ref_name, inputs.codename)
- || format('Doughmination Music {0}', inputs.version || github.ref_name) }}
- # Kept as a draft here on purpose — the android job publishes it as
- # "latest" once the signed APK is uploaded (see the android job).
- releaseDraft: true
- prerelease: false
- # --verbose surfaces the underlying linuxdeploy/bundler output so a
- # failure shows the real error instead of just "failed to run …".
- args: ${{ matrix.args }} --verbose
-
- # Force the AppImage onto the host's GTK/WebKitGTK stack.
- #
- # Rationale (why we don't bundle WebKitGTK): a bundled WebKitGTK build
- # has been confirmed to hard-crash at startup — "Could not create
- # default EGL display: EGL_BAD_PARAMETER", before it ever touches a GPU
- # — on at least one real Wayland compositor + modern Mesa combination
- # where the SAME machine's system-installed WebKitGTK works fine.
- # GPU/Wayland-coupled libraries are fragile to bundle across distros,
- # which is exactly why every other WebKitGTK-based Linux package
- # (.deb/.rpm) declares it as a runtime dependency instead of shipping
- # its own copy. This app does the same — see ReadMe.md's "Linux runtime
- # requirement".
- #
- # Why we strip the WHOLE stack and not just libwebkit2gtk: these
- # libraries are one tightly version-coupled graph, so removing part of
- # it and keeping the rest is *worse* than either extreme — the host
- # loads its own copy of what we deleted, which then fails to resolve
- # symbols against the Ubuntu 22.04 copies we kept. Deleting only
- # libwebkit2gtk-4.1.so.0 (what this step used to do) shipped an
- # AppImage that died instantly on Arch with:
- # symbol lookup error: /usr/lib/libwebkit2gtk-4.1.so.0:
- # undefined symbol: _ZN3WTF20base64EncodeToString...
- # because host libwebkit2gtk was paired with the bundled (older)
- # libjavascriptcoregtk. Clearing that one exposed the next link in the
- # same chain, and so on: javascriptcoregtk -> gstreamer
- # (gst_debug_log_id) -> glib (g_once_init_leave_pointer) -> libmount
- # (MOUNT_2_40) -> ... It bottoms out only when the host provides the
- # entire graph, so that's what we do: drop every bundled library except
- # the app's own private one (the Discord SDK, which no distro ships).
- #
- # The linuxdeploy GTK hook is rewritten to match. Its stock version
- # points GTK_PATH / GDK_PIXBUF_MODULE_FILE / GIO_EXTRA_MODULES /
- # GTK_IM_MODULE_FILE / GSETTINGS_SCHEMA_DIR at module caches inside the
- # AppDir that no longer exist — and that host GTK must not load anyway.
- # GDK_BACKEND=x11 is kept from the stock hook (native Wayland crashes:
- # tauri-apps/tauri#8541).
- #
- # Everything the host must now provide (gtk3, glib, libsoup3,
- # gstreamer) is a hard dependency of webkit2gtk-4.1, so requiring that
- # one package is still the whole ask.
- #
- # Re-uploads over what tauri-action just attached to the draft release.
- - name: unbundle the GTK/WebKitGTK stack from the AppImage
- if: matrix.platform == 'ubuntu-22.04'
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- TAG: ${{ inputs.version || github.ref_name }}
- run: |
- # (no `pipefail`: `find | head -1` below can hand find an EPIPE.)
- set -eu
-
- APPIMAGE=$(find apps/desktop/src-tauri/target -maxdepth 5 -name "*.AppImage" | head -1)
- if [ -z "$APPIMAGE" ]; then
- echo "::error::No .AppImage found to patch"
- exit 1
- fi
-
- DIR=$(cd "$(dirname "$APPIMAGE")" && pwd)
- NAME=$(basename "$APPIMAGE")
- cd "$DIR"
- chmod +x "$NAME"
- ./"$NAME" --appimage-extract >/dev/null
-
- # Private, non-distro libraries that must survive the purge.
- KEEP='libdiscord_partner_sdk.so'
-
- echo "Bundled libraries before: $(find squashfs-root/usr/lib -type f -name '*.so*' | wc -l)"
- find squashfs-root/usr/lib -mindepth 1 -maxdepth 1 \
- ! -name "$KEEP" -exec rm -rf {} +
- echo "Bundled libraries after: $(find squashfs-root/usr/lib -type f -name '*.so*' | wc -l)"
-
- # linuxdeploy also drags in the Ubuntu packages' /usr/share/doc and a
- # copy of their GLib schemas. The docs are dead weight, and the
- # schemas would shadow the host's (XDG_DATA_DIRS puts the AppDir
- # first) with a 22.04-era set. Neither belongs here now.
- rm -rf squashfs-root/usr/share/doc squashfs-root/usr/share/glib-2.0
-
- # Fail loudly rather than shipping an AppImage missing its own lib.
- if [ ! -f "squashfs-root/usr/lib/$KEEP" ]; then
- echo "::error::$KEEP was removed — the app will not start"
- exit 1
- fi
-
- # Two fixes to Tauri's generated .desktop entry, which the AUR
- # package (packaging/aur/PKGBUILD) also installs verbatim:
- # - Exec had no %u, so the doughmination:// sign-in callback was
- # never passed to the app despite the MimeType line claiming
- # the scheme.
- # - Categories was emitted empty, which is invalid and leaves the
- # app uncategorised in menus.
- for d in squashfs-root/*.desktop \
- squashfs-root/usr/share/applications/*.desktop; do
- [ -f "$d" ] || continue
- grep -q '%u' "$d" || sed -i 's|^\(Exec=.*\)$|\1 %u|' "$d"
- sed -i 's|^Categories=$|Categories=AudioVideo;Audio;Player;|' "$d"
- done
-
- cat > squashfs-root/apprun-hooks/linuxdeploy-plugin-gtk.sh <<'HOOK'
- #! /usr/bin/env bash
- # Rewritten by .github/workflows/release.yml — see the comment on the
- # "unbundle the GTK/WebKitGTK stack" step. GTK, GLib, GdkPixbuf, GIO
- # and WebKitGTK all come from the host, so none of the stock hook's
- # AppDir module/schema paths apply; setting them would make host GTK
- # load Ubuntu 22.04 modules.
- export APPDIR="${APPDIR:-"$(dirname "$(realpath "$0")")"}"
- export GDK_BACKEND=x11 # native Wayland crashes: tauri-apps/tauri#8541
- export XDG_DATA_DIRS="$APPDIR/usr/share:/usr/share:$XDG_DATA_DIRS"
- HOOK
-
- curl -sSL -o appimagetool \
- https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
- chmod +x appimagetool
- # Same FUSE-less workaround as the tauri-action step above.
- APPIMAGE_EXTRACT_AND_RUN=1 ./appimagetool squashfs-root "$NAME"
-
- echo "Patched AppImage: $DIR/$NAME"
- gh release upload "$TAG" "$NAME" --clobber
-
- # appimagetool is itself an .AppImage sitting in the bundle
- # directory; the rename step below globs that directory by
- # extension, so both it and the extracted tree have to go.
- rm -rf squashfs-root appimagetool
-
- # Republish the desktop artifacts under version-less asset names.
- #
- # Tauri names bundles from `productName` plus tauri.conf.json's
- # `version` — which is still 1.0.0 and is not bumped per release — so
- # they land as Doughmination.Music_1.0.0_x64-setup.exe: a version that
- # is both wrong and, if it ever were bumped, unstable. Stable names are
- # what let the site's /download?platform=windows point at a release
- # without hardcoding a filename per version (see
- # apps/server/src/lib/downloads.json).
- #
- # tauri-action has already attached the versioned names to the draft
- # release, so each file is re-uploaded under its stripped name and the
- # versioned asset then deleted.
- - name: republish artifacts under version-less names
+ # Compiles apps/desktop/src -> dist, then electron-builder packages it.
+ # electron-builder reads apps/desktop/package.json `dependencies` to
+ # bundle @xhayper/discord-rpc. Artifact names are pinned (version-less)
+ # in apps/desktop/electron-builder.yml so no rename step is needed.
+ - name: build desktop app
+ working-directory: apps/desktop
shell: bash
+ run: bun run build:main && bunx electron-builder ${{ matrix.electronArgs }} --publish never
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- TAG: ${{ inputs.version || github.ref_name }}
- run: |
- set -eu
- STAGE=$(mktemp -d)
- found=0
-
- # /usr/bin/find explicitly: on the Windows runner a bare `find` can
- # resolve to Windows' FIND.EXE, which takes none of these flags.
- while IFS= read -r f; do
- [ -n "$f" ] || continue
- found=1
- old=$(basename "$f")
- # Strips a _1.2.3_ / -1.2.3- segment wherever the bundler put it:
- # Doughmination.Music_1.0.0_x64-setup.exe
- # -> Doughmination.Music_x64-setup.exe
- # Doughmination.Music-1.0.0-1.x86_64.rpm
- # -> Doughmination.Music-1.x86_64.rpm
- new=$(printf '%s' "$old" | sed -E 's/([._-])[0-9]+\.[0-9]+\.[0-9]+[._-]/\1/')
- if [ "$new" = "$old" ]; then
- echo "unchanged: $old"
- continue
- fi
- echo "$old -> $new"
- cp "$f" "$STAGE/$new"
- gh release upload "$TAG" "$STAGE/$new" --clobber
- gh release delete-asset "$TAG" "$old" --yes
- done <<EOF
- $(/usr/bin/find apps/desktop/src-tauri/target -type f -path '*/bundle/*' \
- \( -name '*.exe' -o -name '*.msi' -o -name '*.dmg' \
- -o -name '*.AppImage' -o -name '*.deb' -o -name '*.rpm' \
- -o -name '*.app.tar.gz' \))
- EOF
-
- if [ "$found" = 0 ]; then
- echo "::error::No bundled artifacts found to rename"
- exit 1
- fi
+ - name: attach artifacts to the draft release
+ uses: softprops/action-gh-release@v2
+ with:
+ tag_name: ${{ inputs.version || github.ref_name }}
+ draft: true
+ files: |
+ apps/desktop/release/*.dmg
+ apps/desktop/release/*.zip
+ apps/desktop/release/*.exe
+ apps/desktop/release/*.AppImage
+ apps/desktop/release/*.deb
android:
# Builds and publishes the SIGNED native Android APK (apps/android): a
# WebView shell around the site plus a native Media3 playback service
- # (background/locked playback + a media notification) — NOT the Tauri
- # Android target, which can't provide that. Runs after the desktop matrix
- # so the draft release already exists to attach the APK to. If any desktop
- # build fails, this is skipped and the release stays a draft — we don't
- # publish a half-built release.
+ # (background/locked playback + a media notification). Runs after the
+ # desktop matrix so the draft release already exists to attach the APK to.
+ # If any desktop build fails, this is skipped and the release stays a
+ # draft — we don't publish a half-built release.
needs: build
runs-on: ubuntu-latest
@@ -435,9 +223,9 @@ jobs:
PKGVER="${TAG#v}"
- # tauri.conf.json's `version` — not the git tag — is what ends up in
- # the artifact filename, so ask the release what it's actually
- # called instead of reconstructing it and 404ing on a mismatch.
+ # The AppImage name is pinned version-less in
+ # apps/desktop/electron-builder.yml, but ask the release what it's
+ # actually called rather than hardcoding it here too.
APPIMAGE_NAME=$(gh release view "$TAG" --repo "$REPO" \
--json assets --jq '.assets[].name | select(endswith(".AppImage"))' \
| head -1)
diff --git a/.gitignore b/.gitignore
index 65179ce..55a01be 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,12 +4,7 @@ data/
.env.keys
node_modules/
.DS_Store
-apps/desktop/src-tauri/target/
-apps/desktop/src-tauri/gen/
-# Discord Social SDK: no longer committed (was blowing through GitHub's LFS
-# bandwidth budget — 745MB of debug/iOS/Android binaries this project never
-# builds, re-downloaded in full by 3 parallel CI jobs on every run). CI fetches
-# a lean, release-only re-host from m.doughmination.gay instead — see
-# release.yml. For local dev, download the SDK from the Discord Developer
-# Portal and unzip it here, or grab the lean re-host from the same CDN URL.
-apps/desktop/src-tauri/discord_social_sdk/
\ No newline at end of file
+
+# Electron desktop build output (apps/desktop)
+apps/desktop/dist/
+apps/desktop/release/
diff --git a/Dockerfile b/Dockerfile
index 80773d3..fa16923 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,9 +8,15 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*
COPY . .
+
+# apps/ (the Electron desktop app + Android sources) is excluded via
+# .dockerignore, so `bun install` only resolves the web/ workspaces. This env
+# var is belt-and-suspenders: if apps/ ever slips into the build context, it
+# still stops the ~250MB Electron binary download in a server-only image.
+ENV ELECTRON_SKIP_BINARY_DOWNLOAD=1
RUN bun install
-# Bundle the frontend (apps/web/src/app.ts -> apps/web/dist/app.js).
+# Bundle the frontend (web/client/src/app.ts -> web/client/dist/app.js).
RUN bun run build
# dotenvx is a normal dependency (in package.json), so it installs into the
diff --git a/ReadMe.md b/ReadMe.md
index e9c695c..f2987c4 100644
--- a/ReadMe.md
+++ b/ReadMe.md
@@ -1,5 +1,5 @@
<p align="center">
- <img src="apps/server/public/favicon.png" alt="Doughmination Music" width="140" />
+ <img src="web/server/public/favicon.png" alt="Doughmination Music" width="140" />
</p>
<h1 align="center">Doughmination Music</h1>
@@ -28,7 +28,8 @@ account system.
| Runtime | [Bun](https://bun.sh) |
| Backend | [Hono](https://hono.dev) · PostgreSQL · Redis · `jose` (OIDC/JWT) |
| Web app | Vanilla TypeScript (no framework), bundled by Bun · Bootstrap Icons |
-| Desktop/Android | [Tauri 2](https://tauri.app) (Rust) · deep-link + opener plugins · Discord Social SDK |
+| Desktop | [Electron](https://www.electronjs.org/) (TypeScript) · Discord Rich Presence over IPC |
+| Android | Native Kotlin · WebView UI + Media3/ExoPlayer for background playback |
| Auth | Pocket ID (OIDC) — session cookie for web, bearer token for native apps |
| Media | FFmpeg (Opus transcode) · optional nginx `X-Accel-Redirect` offload |
| Tooling | Bun workspaces monorepo · Docker / Compose |
@@ -36,19 +37,21 @@ account system.
## Project structure
```
-apps/
- server/ Hono API — auth, streaming, uploads; also serves the web app
- web/ Vanilla-TS single-page frontend
- desktop/ Tauri shell (desktop + Android), Rust side owns Discord presence
-packages/
+web/
+ server/ Hono API — auth, streaming, uploads; also serves the web client
+ client/ Vanilla-TS single-page frontend
shared/ Typed API client + shared types
player/ Framework-agnostic <audio> controller (queue, shuffle, visualiser)
+apps/
+ desktop/ Electron shell (TS main + preload) — deep-link SSO + Discord presence
+ android/ Native Kotlin app — WebView UI + Media3 background playback
```
## Getting started
-**Prerequisites:** [Bun](https://bun.sh), PostgreSQL, and Redis. (For the desktop/
-Android apps you'll also need the Rust toolchain and the Android SDK/NDK.)
+**Prerequisites:** [Bun](https://bun.sh), PostgreSQL, and Redis. The desktop app
+needs only Bun (Electron installs as a dev dependency); the Android app needs
+JDK 17 and the Android SDK.
```bash
# 1. Install dependencies
@@ -88,68 +91,31 @@ list. The essentials:
# Web (production bundle)
bun run build
-# Desktop dev / release
+# Desktop (Electron) — dev run / packaged build
bun run desktop:dev
-bun run desktop:build
+bun run desktop:build # writes apps/desktop/release/
-# Android
-bun run android:init # first time only
-bun run android:dev
-bun run android:build # produces an APK
+# Android — native Kotlin app, built with Gradle
+cd apps/android && gradle assembleRelease
```
-### Linux runtime requirement
-
-The Linux build (AppImage) does **not** bundle WebKitGTK or the GTK stack
-around it — you need `webkit2gtk-4.1` (Arch/Fedora package name;
-Debian/Ubuntu: `libwebkit2gtk-4.1-0`) installed system-wide for the app to
-launch. Everything else it now takes from your system (GTK 3, GLib, libsoup3,
-GStreamer) is a hard dependency of that one package, so installing it is the
-whole requirement.
-
-This is deliberate, not an oversight: an AppImage-bundled WebKitGTK build has
-been observed to hard-crash at startup (`Could not create default EGL display:
-EGL_BAD_PARAMETER`) on at least one real Wayland compositor + modern Mesa
-combination that the same machine's system-installed WebKitGTK handles fine —
-GPU/Wayland-coupled libraries like this are fragile to bundle across distros,
-which is exactly why every other WebKitGTK-based Linux package (`.deb`/`.rpm`)
-declares it as a runtime dependency instead of shipping its own copy. This app
-does the same.
-
-The unbundling has to be all-or-nothing. WebKitGTK, JavaScriptCore, GStreamer
-and GLib are one version-coupled graph: an earlier build shipped the rest of
-the graph while dropping only `libwebkit2gtk`, which made your system's
-WebKitGTK load against the AppImage's older JavaScriptCore and die instantly
-with `undefined symbol: _ZN3WTF20base64EncodeToString...`. The release
-workflow therefore strips *every* bundled library except the app's own Discord
-SDK — see the "unbundle the GTK/WebKitGTK stack" step in
-`.github/workflows/release.yml`.
-
-```bash
-# Arch / Manjaro
-sudo pacman -S webkit2gtk-4.1
-
-# Debian / Ubuntu
-sudo apt install libwebkit2gtk-4.1-0
-
-# Fedora
-sudo dnf install webkit2gtk4.1
-```
+The desktop app is a thin shell: it loads the live site (default
+`https://doughmination.me`, overridable via `DMND_SERVER_URL` or **File → Set
+Server URL…**) and adds `doughmination://` deep-link sign-in plus Discord Rich
+Presence over the local Discord IPC socket.
### Arch: install from the AUR
-Arch users can skip the AppImage entirely — `doughmination-music`
-repackages it as a normal system package (`/usr/bin/doughmination-music`, a
-desktop entry, and hicolor icons), so `webkit2gtk-4.1` and the rest arrive as
-pacman dependencies:
+Arch users can skip the AppImage — `doughmination-music` repackages it as a
+normal system package (`/usr/bin/doughmination-music`, a desktop entry, and
+hicolor icons). Electron bundles its own Chromium, so the only dependencies are
+the system libraries Chromium loads at runtime (`gtk3`, `nss`, `alsa-lib`, …),
+pulled in automatically by pacman:
```bash
paru -S doughmination-music # or: yay -S doughmination-music
```
-> [!NOTE]
-> There are some issues with attaching to the Wayland display, if this happens, run the app with `WEBKIT_DISABLE_DMABUF_RENDERER=1` as this is a found fix
-
The PKGBUILD lives at [`packaging/aur/PKGBUILD`](packaging/aur/PKGBUILD) and is
the source of truth — the release workflow's `aur` job rewrites its `pkgver`,
fills the checksums, test-builds it and pushes it to the AUR after each
diff --git a/apps/android/BRIDGE.md b/apps/android/BRIDGE.md
index e5fef78..90bae03 100644
--- a/apps/android/BRIDGE.md
+++ b/apps/android/BRIDGE.md
@@ -7,7 +7,7 @@ screen controls.
The web player keeps owning the *library, queue, shuffle/repeat, and UI*. It no
longer produces sound on Android — instead it drives a native audio element
-(`NativeAudio`, see `packages/player/src/native-audio.ts`) that forwards every
+(`NativeAudio`, see `web/player/src/native-audio.ts`) that forwards every
call across this bridge. Native is the single source of truth for playback
position and play/pause state, and reports both back to the web layer.
diff --git a/apps/android/README.md b/apps/android/README.md
index 22be7cd..de28f36 100644
--- a/apps/android/README.md
+++ b/apps/android/README.md
@@ -31,7 +31,7 @@ web ⇄ native contract.
```
* **WebView** keeps owning the library, queue, shuffle/repeat and all UI.
-* **`packages/player`** detects the native host and swaps its `<audio>` element
+* **`web/player`** detects the native host and swaps its `<audio>` element
for a native-backed shim (`native-audio.ts`) — the Player logic is unchanged.
* **`PlaybackService`** is a Media3 `MediaSessionService`; Media3 builds the
media notification/lock-screen controls for us.
@@ -43,7 +43,7 @@ web ⇄ native contract.
## Requirements to actually work end-to-end
1. **The site must be redeployed with the web-side changes** in this repo
- (`packages/player/src/native-audio.ts`, `apps/web/src/native.ts`, and the
+ (`web/player/src/native-audio.ts`, `web/client/src/native.ts`, and the
Player/app wiring). The APK loads the live site, so until those ship, the
native bridge is dormant and audio falls back to the (suspended) WebView.
2. Sign-in happens **inside the WebView** (normal web OIDC flow); the resulting
@@ -81,16 +81,16 @@ build still succeeds locally.
## CI
-`.github/workflows/android.yml` builds and publishes the signed APK on manual
-dispatch, reusing the existing `ANDROID_KEY_ALIAS` / `ANDROID_KEY_PASSWORD` /
-`ANDROID_KEY_BASE64` secrets. It's fully independent of the Tauri `release`
-workflow.
+The `android` job in `.github/workflows/release.yml` builds and signs this APK
+and attaches it to the same GitHub Release as the desktop (Electron) builds,
+using the `ANDROID_KEY_ALIAS` / `ANDROID_KEY_PASSWORD` / `ANDROID_KEY_BASE64`
+secrets.
## Notes / limitations
-* App id is `uk.doughmination.music` (the Tauri build was
- `uk.doughmination.music.desktop`), so this installs **alongside** the old
- APK rather than upgrading it. Uninstall the old one if you want just this.
+* App id is `uk.doughmination.music` (the desktop build is
+ `uk.doughmination.music.desktop`), so this installs **alongside** the desktop
+ app rather than upgrading it.
* The audio visualizer (Web Audio) is disabled on Android — native owns the
audio pipeline, which Web Audio can't tap.
* Not yet compiled on-device here; expect a round or two of on-device iteration.
diff --git a/apps/desktop/src-tauri/icons/icon.icns b/apps/desktop/build/icon.icns
similarity index 100%
rename from apps/desktop/src-tauri/icons/icon.icns
rename to apps/desktop/build/icon.icns
diff --git a/apps/desktop/src-tauri/icons/icon.ico b/apps/desktop/build/icon.ico
similarity index 100%
rename from apps/desktop/src-tauri/icons/icon.ico
rename to apps/desktop/build/icon.ico
diff --git a/apps/desktop/src-tauri/icons/icon.png b/apps/desktop/build/icon.png
similarity index 100%
rename from apps/desktop/src-tauri/icons/icon.png
rename to apps/desktop/build/icon.png
diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml
new file mode 100644
index 0000000..a0e903e
--- /dev/null
+++ b/apps/desktop/electron-builder.yml
@@ -0,0 +1,53 @@
+appId: uk.doughmination.music.desktop
+productName: Doughmination Music
+copyright: © Clove Twilight
+
+directories:
+ output: release
+ buildResources: build
+
+# The compiled main/preload plus package.json (electron-builder reads
+# `dependencies` from it to bundle @xhayper/discord-rpc).
+files:
+ - dist/**/*
+ - package.json
+
+# Register doughmination:// so the SSO deep link comes back to the app
+# (writes the nsis registry keys / Info.plist CFBundleURLTypes / .desktop
+# MimeType).
+protocols:
+ - name: Doughmination Music
+ schemes:
+ - doughmination
+
+# Stable, version-less asset names so the site's /download?platform=… links
+# and the AUR PKGBUILD can point at a release without a per-version filename
+# (see web/server/src/lib/downloads.json).
+mac:
+ target:
+ - dmg
+ - zip
+ category: public.app-category.music
+ icon: build/icon.icns
+ artifactName: Doughmination.Music_${arch}.${ext}
+
+win:
+ target:
+ - nsis
+ icon: build/icon.ico
+ artifactName: Doughmination.Music_x64-setup.${ext}
+
+nsis:
+ oneClick: false
+ perMachine: false
+ allowToChangeInstallationDirectory: true
+
+linux:
+ target:
+ - AppImage
+ - deb
+ category: Audio
+ icon: build/icon.png
+ maintainer: Clove Twilight <[email protected]>
+ executableName: doughmination-music
+ artifactName: Doughmination.Music_amd64.${ext}
diff --git a/apps/desktop/package.json b/apps/desktop/package.json
new file mode 100644
index 0000000..ee61e1e
--- /dev/null
+++ b/apps/desktop/package.json
@@ -0,0 +1,22 @@
+{
+ "name": "@musicapp/desktop",
+ "version": "1.0.0",
+ "private": true,
+ "description": "Doughmination Music desktop app (Electron shell + Discord Rich Presence)",
+ "main": "dist/main.js",
+ "scripts": {
+ "build:main": "tsc -p tsconfig.json",
+ "dev": "bun run build:main && electron .",
+ "build": "bun run build:main && electron-builder",
+ "typecheck": "tsc --noEmit"
+ },
+ "dependencies": {
+ "@xhayper/discord-rpc": "^1.2.1"
+ },
+ "devDependencies": {
+ "@types/node": "^22.10.0",
+ "electron": "^33.2.0",
+ "electron-builder": "^25.1.8",
+ "typescript": "^7.0.2"
+ }
+}
diff --git a/apps/desktop/src-tauri/.cargo/config.toml b/apps/desktop/src-tauri/.cargo/config.toml
deleted file mode 100644
index c5bf8e4..0000000
--- a/apps/desktop/src-tauri/.cargo/config.toml
+++ /dev/null
@@ -1,8 +0,0 @@
-[env]
-# "relative = true" resolves this against the parent of this .cargo/
-# directory, i.e. apps/desktop/src-tauri/discord_social_sdk — wherever this
-# checkout lives. Needed because discord_social_sdk_sys is pulled in as a
-# git dependency, so it sits outside this crate's own workspace and its
-# built-in "look in the workspace root" search can't find the SDK on its
-# own (see the build error this fixes).
-DISCORD_SOCIAL_SDK_DIR = { value = "discord_social_sdk", relative = true }
diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock
deleted file mode 100644
index 1f91e5e..0000000
--- a/apps/desktop/src-tauri/Cargo.lock
+++ /dev/null
@@ -1,5206 +0,0 @@
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
-version = 4
-
-[[package]]
-name = "adler2"
-version = "2.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
-
-[[package]]
-name = "aho-corasick"
-version = "1.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
-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.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195"
-dependencies = [
- "alloc-no-stdlib",
-]
-
-[[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.104"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
-
-[[package]]
-name = "async-broadcast"
-version = "0.7.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532"
-dependencies = [
- "event-listener",
- "event-listener-strategy",
- "futures-core",
- "pin-project-lite",
-]
-
-[[package]]
-name = "async-channel"
-version = "2.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2"
-dependencies = [
- "concurrent-queue",
- "event-listener-strategy",
- "futures-core",
- "pin-project-lite",
-]
-
-[[package]]
-name = "async-executor"
-version = "1.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a"
-dependencies = [
- "async-task",
- "concurrent-queue",
- "fastrand",
- "futures-lite",
- "pin-project-lite",
- "slab",
-]
-
-[[package]]
-name = "async-io"
-version = "2.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc"
-dependencies = [
- "autocfg",
- "cfg-if",
- "concurrent-queue",
- "futures-io",
- "futures-lite",
- "parking",
- "polling",
- "rustix",
- "slab",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "async-lock"
-version = "3.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311"
-dependencies = [
- "event-listener",
- "event-listener-strategy",
- "pin-project-lite",
-]
-
-[[package]]
-name = "async-process"
-version = "2.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75"
-dependencies = [
- "async-channel",
- "async-io",
- "async-lock",
- "async-signal",
- "async-task",
- "blocking",
- "cfg-if",
- "event-listener",
- "futures-lite",
- "rustix",
-]
-
-[[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.119",
-]
-
-[[package]]
-name = "async-signal"
-version = "0.2.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485"
-dependencies = [
- "async-io",
- "async-lock",
- "atomic-waker",
- "cfg-if",
- "futures-core",
- "futures-io",
- "rustix",
- "signal-hook-registry",
- "slab",
- "windows-sys 0.61.2",
-]
-
-[[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.91"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae36dc4177970ef04fde5178d3e2429882def40e57a451f919c098f72baa6cec"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 3.0.3",
-]
-
-[[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.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
-
-[[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 = "bindgen"
-version = "0.72.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
-dependencies = [
- "bitflags 2.13.1",
- "cexpr",
- "clang-sys",
- "itertools",
- "log",
- "prettyplease",
- "proc-macro2",
- "quote",
- "regex",
- "rustc-hash",
- "shlex 1.3.0",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "bit-set"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3"
-dependencies = [
- "bit-vec",
-]
-
-[[package]]
-name = "bit-vec"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
-
-[[package]]
-name = "bitflags"
-version = "1.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
-
-[[package]]
-name = "bitflags"
-version = "2.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
-dependencies = [
- "serde_core",
-]
-
-[[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.6.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5"
-dependencies = [
- "objc2",
-]
-
-[[package]]
-name = "blocking"
-version = "1.6.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21"
-dependencies = [
- "async-channel",
- "async-task",
- "futures-io",
- "futures-lite",
- "piper",
-]
-
-[[package]]
-name = "brotli"
-version = "8.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3"
-dependencies = [
- "alloc-no-stdlib",
- "alloc-stdlib",
- "brotli-decompressor",
-]
-
-[[package]]
-name = "brotli-decompressor"
-version = "5.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583"
-dependencies = [
- "alloc-no-stdlib",
- "alloc-stdlib",
-]
-
-[[package]]
-name = "bs58"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4"
-dependencies = [
- "tinyvec",
-]
-
-[[package]]
-name = "bumpalo"
-version = "3.20.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
-
-[[package]]
-name = "bytemuck"
-version = "1.25.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797"
-
-[[package]]
-name = "byteorder"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
-
-[[package]]
-name = "bytes"
-version = "1.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
-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.13.1",
- "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.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f2d30e4173c4026932d51d31d6b0613b1fd3014bf3f9f8943d4ba139c437ba0"
-dependencies = [
- "serde_core",
-]
-
-[[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.19.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba"
-dependencies = [
- "camino",
- "cargo-platform",
- "semver",
- "serde",
- "serde_json",
- "thiserror 2.0.19",
-]
-
-[[package]]
-name = "cargo_toml"
-version = "0.22.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "374b7c592d9c00c1f4972ea58390ac6b18cbb6ab79011f3bdc90a0b82ca06b77"
-dependencies = [
- "serde",
- "toml 0.9.12+spec-1.1.0",
-]
-
-[[package]]
-name = "cc"
-version = "1.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5add81bb678e6cb321aff7fa0dc7689ad82b112dbc032cea19f91d6b8e3582b9"
-dependencies = [
- "find-msvc-tools",
- "shlex 2.0.1",
-]
-
-[[package]]
-name = "cesu8"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
-
-[[package]]
-name = "cexpr"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
-dependencies = [
- "nom",
-]
-
-[[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.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
-
-[[package]]
-name = "chrono"
-version = "0.4.45"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"
-dependencies = [
- "iana-time-zone",
- "num-traits",
- "serde",
- "windows-link 0.2.1",
-]
-
-[[package]]
-name = "clang-sys"
-version = "1.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
-dependencies = [
- "glob",
- "libc",
- "libloading 0.8.9",
-]
-
-[[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-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.17",
- "once_cell",
- "tiny-keccak",
-]
-
-[[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.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6"
-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.25.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97"
-dependencies = [
- "bitflags 2.13.1",
- "core-foundation",
- "core-graphics-types",
- "foreign-types",
- "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.13.1",
- "core-foundation",
- "libc",
-]
-
-[[package]]
-name = "cpufeatures"
-version = "0.2.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
-dependencies = [
- "libc",
-]
-
-[[package]]
-name = "crc32fast"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
-dependencies = [
- "cfg-if",
-]
-
-[[package]]
-name = "crossbeam-channel"
-version = "0.5.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e"
-dependencies = [
- "crossbeam-utils",
-]
-
-[[package]]
-name = "crossbeam-utils"
-version = "0.8.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17"
-
-[[package]]
-name = "crunchy"
-version = "0.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
-
-[[package]]
-name = "crypto-common"
-version = "0.1.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
-dependencies = [
- "generic-array",
- "typenum",
-]
-
-[[package]]
-name = "cssparser"
-version = "0.36.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2"
-dependencies = [
- "cssparser-macros",
- "dtoa-short",
- "itoa",
- "phf",
- "smallvec",
-]
-
-[[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.119",
-]
-
-[[package]]
-name = "ctor"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "352d39c2f7bef1d6ad73db6f5160efcaed66d94ef8c6c573a8410c00bf909a98"
-dependencies = [
- "ctor-proc-macro",
- "dtor",
-]
-
-[[package]]
-name = "ctor-proc-macro"
-version = "0.0.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1"
-
-[[package]]
-name = "darling"
-version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d"
-dependencies = [
- "darling_core",
- "darling_macro",
-]
-
-[[package]]
-name = "darling_core"
-version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0"
-dependencies = [
- "ident_case",
- "proc-macro2",
- "quote",
- "strsim",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "darling_macro"
-version = "0.23.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d"
-dependencies = [
- "darling_core",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "dbus"
-version = "0.9.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ab69f03cc8c4340c9c8e315114e1658e6775a9b16a04357973aa21cec22b32e"
-dependencies = [
- "libc",
- "libdbus-sys",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "deranged"
-version = "0.5.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
-dependencies = [
- "serde_core",
-]
-
-[[package]]
-name = "derive_more"
-version = "2.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134"
-dependencies = [
- "derive_more-impl",
-]
-
-[[package]]
-name = "derive_more-impl"
-version = "2.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb"
-dependencies = [
- "proc-macro2",
- "quote",
- "rustc_version",
- "syn 2.0.119",
-]
-
-[[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 = "6.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e"
-dependencies = [
- "dirs-sys",
-]
-
-[[package]]
-name = "dirs-sys"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab"
-dependencies = [
- "libc",
- "option-ext",
- "redox_users",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "discord_social_sdk"
-version = "0.1.2"
-dependencies = [
- "discord_social_sdk_sys",
-]
-
-[[package]]
-name = "discord_social_sdk_sys"
-version = "0.1.2"
-dependencies = [
- "bindgen",
-]
-
-[[package]]
-name = "dispatch2"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38"
-dependencies = [
- "bitflags 2.13.1",
- "block2",
- "libc",
- "objc2",
-]
-
-[[package]]
-name = "displaydoc"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "dlopen2"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e2c5bd4158e66d1e215c49b837e11d62f3267b30c92f1d171c4d3105e3dc4d4"
-dependencies = [
- "dlopen2_derive",
- "libc",
- "once_cell",
- "winapi",
-]
-
-[[package]]
-name = "dlopen2_derive"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[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 = "dom_query"
-version = "0.27.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "521e380c0c8afb8d9a1e83a1822ee03556fc3e3e7dbc1fd30be14e37f9cb3f89"
-dependencies = [
- "bit-set",
- "cssparser",
- "foldhash",
- "html5ever",
- "precomputed-hash",
- "selectors",
- "tendril",
-]
-
-[[package]]
-name = "doughmination-music"
-version = "1.0.0"
-dependencies = [
- "discord_social_sdk",
- "serde",
- "serde_json",
- "tauri",
- "tauri-build",
- "tauri-plugin-deep-link",
- "tauri-plugin-opener",
- "tauri-plugin-single-instance",
-]
-
-[[package]]
-name = "dpi"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "dtoa"
-version = "1.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590"
-
-[[package]]
-name = "dtoa-short"
-version = "0.3.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87"
-dependencies = [
- "dtoa",
-]
-
-[[package]]
-name = "dtor"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1057d6c64987086ff8ed0fd3fbf377a6b7d205cc7715868cd401705f715cbe4"
-dependencies = [
- "dtor-proc-macro",
-]
-
-[[package]]
-name = "dtor-proc-macro"
-version = "0.0.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5"
-
-[[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.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
-
-[[package]]
-name = "either"
-version = "1.17.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d"
-
-[[package]]
-name = "embed-resource"
-version = "3.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fbfdaacccebec3b28e4866b8973543c7647797db5ada1bdab552e48fe665fbbd"
-dependencies = [
- "cc",
- "memchr",
- "rustc_version",
- "toml 1.1.3+spec-1.1.0",
- "vswhom",
- "winreg",
-]
-
-[[package]]
-name = "embed_plist"
-version = "1.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7"
-
-[[package]]
-name = "endi"
-version = "1.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099"
-
-[[package]]
-name = "enumflags2"
-version = "0.7.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef"
-dependencies = [
- "enumflags2_derive",
- "serde",
-]
-
-[[package]]
-name = "enumflags2_derive"
-version = "0.7.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "equivalent"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
-
-[[package]]
-name = "erased-serde"
-version = "0.4.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec"
-dependencies = [
- "serde",
- "serde_core",
- "typeid",
-]
-
-[[package]]
-name = "errno"
-version = "0.3.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
-dependencies = [
- "libc",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "event-listener"
-version = "5.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2"
-dependencies = [
- "parking",
- "pin-project-lite",
-]
-
-[[package]]
-name = "event-listener-strategy"
-version = "0.5.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93"
-dependencies = [
- "event-listener",
- "pin-project-lite",
-]
-
-[[package]]
-name = "fastrand"
-version = "2.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
-
-[[package]]
-name = "fdeflate"
-version = "0.3.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"
-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 = "find-msvc-tools"
-version = "0.1.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
-
-[[package]]
-name = "flate2"
-version = "1.1.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
-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.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
-
-[[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",
-]
-
-[[package]]
-name = "foreign-types-macros"
-version = "0.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 3.0.3",
-]
-
-[[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.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
-dependencies = [
- "percent-encoding",
-]
-
-[[package]]
-name = "futures-channel"
-version = "0.3.33"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae"
-dependencies = [
- "futures-core",
-]
-
-[[package]]
-name = "futures-core"
-version = "0.3.33"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7"
-
-[[package]]
-name = "futures-executor"
-version = "0.3.33"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458"
-dependencies = [
- "futures-core",
- "futures-task",
- "futures-util",
-]
-
-[[package]]
-name = "futures-io"
-version = "0.3.33"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a"
-
-[[package]]
-name = "futures-lite"
-version = "2.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad"
-dependencies = [
- "fastrand",
- "futures-core",
- "futures-io",
- "parking",
- "pin-project-lite",
-]
-
-[[package]]
-name = "futures-macro"
-version = "0.3.33"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "futures-sink"
-version = "0.3.33"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307"
-
-[[package]]
-name = "futures-task"
-version = "0.3.33"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109"
-
-[[package]]
-name = "futures-util"
-version = "0.3.33"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa"
-dependencies = [
- "futures-core",
- "futures-io",
- "futures-macro",
- "futures-sink",
- "futures-task",
- "memchr",
- "pin-project-lite",
- "slab",
-]
-
-[[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.2.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
-dependencies = [
- "cfg-if",
- "libc",
- "wasi",
-]
-
-[[package]]
-name = "getrandom"
-version = "0.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
-dependencies = [
- "cfg-if",
- "libc",
- "r-efi 5.3.0",
- "wasip2",
-]
-
-[[package]]
-name = "getrandom"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
-dependencies = [
- "cfg-if",
- "libc",
- "r-efi 6.0.0",
-]
-
-[[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.13.1",
- "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.119",
-]
-
-[[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.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b"
-
-[[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.119",
-]
-
-[[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.17.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
-
-[[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.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
-
-[[package]]
-name = "hex"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
-
-[[package]]
-name = "html5ever"
-version = "0.38.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1054432bae2f14e0061e33d23402fbaa67a921d319d56adc6bcf887ddad1cbc2"
-dependencies = [
- "log",
- "markup5ever",
-]
-
-[[package]]
-name = "http"
-version = "1.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425"
-dependencies = [
- "bytes",
- "itoa",
-]
-
-[[package]]
-name = "http-body"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c"
-dependencies = [
- "bytes",
- "http",
-]
-
-[[package]]
-name = "http-body-util"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2"
-dependencies = [
- "bytes",
- "futures-core",
- "http",
- "http-body",
- "pin-project-lite",
-]
-
-[[package]]
-name = "httparse"
-version = "1.10.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
-
-[[package]]
-name = "hyper"
-version = "1.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72"
-dependencies = [
- "atomic-waker",
- "bytes",
- "futures-channel",
- "futures-core",
- "http",
- "http-body",
- "httparse",
- "itoa",
- "pin-project-lite",
- "smallvec",
- "tokio",
- "want",
-]
-
-[[package]]
-name = "hyper-util"
-version = "0.1.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0"
-dependencies = [
- "base64 0.22.1",
- "bytes",
- "futures-channel",
- "futures-util",
- "http",
- "http-body",
- "hyper",
- "ipnet",
- "libc",
- "percent-encoding",
- "pin-project-lite",
- "socket2",
- "tokio",
- "tower-service",
- "tracing",
-]
-
-[[package]]
-name = "iana-time-zone"
-version = "0.1.65"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"
-dependencies = [
- "android_system_properties",
- "core-foundation-sys",
- "iana-time-zone-haiku",
- "js-sys",
- "log",
- "wasm-bindgen",
- "windows-core 0.62.2",
-]
-
-[[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.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e795dff5605e0f04bff85ca41b51a96b83e80b281e96231bcaaf1ac35103371"
-dependencies = [
- "byteorder",
- "png 0.17.16",
-]
-
-[[package]]
-name = "icu_collections"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c"
-dependencies = [
- "displaydoc",
- "potential_utf",
- "utf8_iter",
- "yoke",
- "zerofrom",
- "zerovec",
-]
-
-[[package]]
-name = "icu_locale_core"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29"
-dependencies = [
- "displaydoc",
- "litemap",
- "tinystr",
- "writeable",
- "zerovec",
-]
-
-[[package]]
-name = "icu_normalizer"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4"
-dependencies = [
- "icu_collections",
- "icu_normalizer_data",
- "icu_properties",
- "icu_provider",
- "smallvec",
- "zerovec",
-]
-
-[[package]]
-name = "icu_normalizer_data"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38"
-
-[[package]]
-name = "icu_properties"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de"
-dependencies = [
- "icu_collections",
- "icu_locale_core",
- "icu_properties_data",
- "icu_provider",
- "zerotrie",
- "zerovec",
-]
-
-[[package]]
-name = "icu_properties_data"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14"
-
-[[package]]
-name = "icu_provider"
-version = "2.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421"
-dependencies = [
- "displaydoc",
- "icu_locale_core",
- "writeable",
- "yoke",
- "zerofrom",
- "zerotrie",
- "zerovec",
-]
-
-[[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.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
-dependencies = [
- "idna_adapter",
- "smallvec",
- "utf8_iter",
-]
-
-[[package]]
-name = "idna_adapter"
-version = "1.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714"
-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.14.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
-dependencies = [
- "equivalent",
- "hashbrown 0.17.1",
- "serde",
- "serde_core",
-]
-
-[[package]]
-name = "infer"
-version = "0.19.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7"
-dependencies = [
- "cfb",
-]
-
-[[package]]
-name = "ipnet"
-version = "2.12.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"
-
-[[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 = "itertools"
-version = "0.13.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
-dependencies = [
- "either",
-]
-
-[[package]]
-name = "itoa"
-version = "1.0.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
-
-[[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 0.3.1",
- "log",
- "thiserror 1.0.69",
- "walkdir",
- "windows-sys 0.45.0",
-]
-
-[[package]]
-name = "jni-sys"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258"
-dependencies = [
- "jni-sys 0.4.1",
-]
-
-[[package]]
-name = "jni-sys"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2"
-dependencies = [
- "jni-sys-macros",
-]
-
-[[package]]
-name = "jni-sys-macros"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264"
-dependencies = [
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "js-sys"
-version = "0.3.103"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102"
-dependencies = [
- "cfg-if",
- "futures-util",
- "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.13.1",
- "serde",
- "unicode-segmentation",
-]
-
-[[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.189"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
-
-[[package]]
-name = "libdbus-sys"
-version = "0.2.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "328c4789d42200f1eeec05bd86c9c13c7f091d2ba9a6ea35acdf51f31bc0f043"
-dependencies = [
- "pkg-config",
-]
-
-[[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.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
-dependencies = [
- "cfg-if",
- "windows-link 0.2.1",
-]
-
-[[package]]
-name = "libredox"
-version = "0.1.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c943259e342f1e06ff2da7a83eabdfe7f92ce10262688dbf1895ff0b3e6e4652"
-dependencies = [
- "libc",
-]
-
-[[package]]
-name = "linux-raw-sys"
-version = "0.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
-
-[[package]]
-name = "litemap"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
-
-[[package]]
-name = "lock_api"
-version = "0.4.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
-dependencies = [
- "scopeguard",
-]
-
-[[package]]
-name = "log"
-version = "0.4.33"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
-
-[[package]]
-name = "markup5ever"
-version = "0.38.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8983d30f2915feeaaab2d6babdd6bc7e9ed1a00b66b5e6d74df19aa9c0e91862"
-dependencies = [
- "log",
- "tendril",
- "web_atoms",
-]
-
-[[package]]
-name = "memchr"
-version = "2.8.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
-
-[[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 = "minimal-lexical"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
-
-[[package]]
-name = "miniz_oxide"
-version = "0.8.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
-dependencies = [
- "adler2",
- "simd-adler32",
-]
-
-[[package]]
-name = "mio"
-version = "1.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427"
-dependencies = [
- "libc",
- "wasi",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "muda"
-version = "0.19.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1dd04e60bc0b07438a6771710ee1698f98f6ebbc7f89b61264af1563b8aeb878"
-dependencies = [
- "crossbeam-channel",
- "dpi",
- "gtk",
- "keyboard-types",
- "objc2",
- "objc2-app-kit",
- "objc2-core-foundation",
- "objc2-foundation",
- "once_cell",
- "png 0.18.1",
- "serde",
- "thiserror 2.0.19",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "ndk"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"
-dependencies = [
- "bitflags 2.13.1",
- "jni-sys 0.3.1",
- "log",
- "ndk-sys",
- "num_enum",
- "raw-window-handle",
- "thiserror 1.0.69",
-]
-
-[[package]]
-name = "ndk-sys"
-version = "0.6.0+11769913"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873"
-dependencies = [
- "jni-sys 0.3.1",
-]
-
-[[package]]
-name = "new_debug_unreachable"
-version = "1.0.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
-
-[[package]]
-name = "nom"
-version = "7.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
-dependencies = [
- "memchr",
- "minimal-lexical",
-]
-
-[[package]]
-name = "num-conv"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441"
-
-[[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.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26"
-dependencies = [
- "num_enum_derive",
- "rustversion",
-]
-
-[[package]]
-name = "num_enum_derive"
-version = "0.7.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8"
-dependencies = [
- "proc-macro-crate 3.5.0",
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "objc2"
-version = "0.6.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f"
-dependencies = [
- "objc2-encode",
- "objc2-exception-helper",
-]
-
-[[package]]
-name = "objc2-app-kit"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c"
-dependencies = [
- "bitflags 2.13.1",
- "block2",
- "objc2",
- "objc2-core-foundation",
- "objc2-foundation",
-]
-
-[[package]]
-name = "objc2-cloud-kit"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c"
-dependencies = [
- "bitflags 2.13.1",
- "objc2",
- "objc2-foundation",
-]
-
-[[package]]
-name = "objc2-core-data"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa"
-dependencies = [
- "objc2",
- "objc2-foundation",
-]
-
-[[package]]
-name = "objc2-core-foundation"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536"
-dependencies = [
- "bitflags 2.13.1",
- "dispatch2",
- "objc2",
-]
-
-[[package]]
-name = "objc2-core-graphics"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807"
-dependencies = [
- "bitflags 2.13.1",
- "dispatch2",
- "objc2",
- "objc2-core-foundation",
- "objc2-io-surface",
-]
-
-[[package]]
-name = "objc2-core-image"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006"
-dependencies = [
- "objc2",
- "objc2-foundation",
-]
-
-[[package]]
-name = "objc2-core-location"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009"
-dependencies = [
- "objc2",
- "objc2-foundation",
-]
-
-[[package]]
-name = "objc2-core-text"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d"
-dependencies = [
- "bitflags 2.13.1",
- "objc2",
- "objc2-core-foundation",
- "objc2-core-graphics",
-]
-
-[[package]]
-name = "objc2-encode"
-version = "4.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33"
-
-[[package]]
-name = "objc2-exception-helper"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a"
-dependencies = [
- "cc",
-]
-
-[[package]]
-name = "objc2-foundation"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"
-dependencies = [
- "bitflags 2.13.1",
- "block2",
- "objc2",
- "objc2-core-foundation",
-]
-
-[[package]]
-name = "objc2-io-surface"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d"
-dependencies = [
- "bitflags 2.13.1",
- "objc2",
- "objc2-core-foundation",
-]
-
-[[package]]
-name = "objc2-quartz-core"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f"
-dependencies = [
- "bitflags 2.13.1",
- "objc2",
- "objc2-core-foundation",
- "objc2-foundation",
-]
-
-[[package]]
-name = "objc2-ui-kit"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22"
-dependencies = [
- "bitflags 2.13.1",
- "block2",
- "objc2",
- "objc2-cloud-kit",
- "objc2-core-data",
- "objc2-core-foundation",
- "objc2-core-graphics",
- "objc2-core-image",
- "objc2-core-location",
- "objc2-core-text",
- "objc2-foundation",
- "objc2-quartz-core",
- "objc2-user-notifications",
-]
-
-[[package]]
-name = "objc2-user-notifications"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e"
-dependencies = [
- "objc2",
- "objc2-foundation",
-]
-
-[[package]]
-name = "objc2-web-kit"
-version = "0.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f"
-dependencies = [
- "bitflags 2.13.1",
- "block2",
- "objc2",
- "objc2-app-kit",
- "objc2-core-foundation",
- "objc2-foundation",
-]
-
-[[package]]
-name = "once_cell"
-version = "1.21.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
-
-[[package]]
-name = "open"
-version = "5.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0b3d059e795d52b8a72fef45658620edd4d9c359b338564aa14391ffa511ed5"
-dependencies = [
- "dunce",
- "is-wsl",
- "libc",
-]
-
-[[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 = "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.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
-dependencies = [
- "lock_api",
- "parking_lot_core",
-]
-
-[[package]]
-name = "parking_lot_core"
-version = "0.9.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
-dependencies = [
- "cfg-if",
- "libc",
- "redox_syscall",
- "smallvec",
- "windows-link 0.2.1",
-]
-
-[[package]]
-name = "percent-encoding"
-version = "2.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
-
-[[package]]
-name = "phf"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf"
-dependencies = [
- "phf_macros",
- "phf_shared",
- "serde",
-]
-
-[[package]]
-name = "phf_codegen"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1"
-dependencies = [
- "phf_generator",
- "phf_shared",
-]
-
-[[package]]
-name = "phf_generator"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737"
-dependencies = [
- "fastrand",
- "phf_shared",
-]
-
-[[package]]
-name = "phf_macros"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef"
-dependencies = [
- "phf_generator",
- "phf_shared",
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "phf_shared"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266"
-dependencies = [
- "siphasher",
-]
-
-[[package]]
-name = "pin-project-lite"
-version = "0.2.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
-
-[[package]]
-name = "piper"
-version = "0.2.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1"
-dependencies = [
- "atomic-waker",
- "fastrand",
- "futures-io",
-]
-
-[[package]]
-name = "pkg-config"
-version = "0.3.33"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"
-
-[[package]]
-name = "plist"
-version = "1.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7da1d65da6dd5d1e44199ac0f58712d241c0f439f80adea8924d832384087f85"
-dependencies = [
- "base64 0.22.1",
- "indexmap 2.14.0",
- "quick-xml",
- "serde",
- "time",
-]
-
-[[package]]
-name = "png"
-version = "0.17.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526"
-dependencies = [
- "bitflags 1.3.2",
- "crc32fast",
- "fdeflate",
- "flate2",
- "miniz_oxide",
-]
-
-[[package]]
-name = "png"
-version = "0.18.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61"
-dependencies = [
- "bitflags 2.13.1",
- "crc32fast",
- "fdeflate",
- "flate2",
- "miniz_oxide",
-]
-
-[[package]]
-name = "polling"
-version = "3.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218"
-dependencies = [
- "cfg-if",
- "concurrent-queue",
- "hermit-abi",
- "pin-project-lite",
- "rustix",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "potential_utf"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564"
-dependencies = [
- "zerovec",
-]
-
-[[package]]
-name = "powerfmt"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
-
-[[package]]
-name = "precomputed-hash"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
-
-[[package]]
-name = "prettyplease"
-version = "0.2.37"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
-dependencies = [
- "proc-macro2",
- "syn 2.0.119",
-]
-
-[[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 0.6.3",
- "toml_edit 0.20.2",
-]
-
-[[package]]
-name = "proc-macro-crate"
-version = "3.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f"
-dependencies = [
- "toml_edit 0.25.13+spec-1.1.0",
-]
-
-[[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-macro2"
-version = "1.0.107"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
-dependencies = [
- "unicode-ident",
-]
-
-[[package]]
-name = "quick-xml"
-version = "0.41.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "quote"
-version = "1.0.47"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
-dependencies = [
- "proc-macro2",
-]
-
-[[package]]
-name = "r-efi"
-version = "5.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
-
-[[package]]
-name = "r-efi"
-version = "6.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
-
-[[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.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
-dependencies = [
- "bitflags 2.13.1",
-]
-
-[[package]]
-name = "redox_users"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
-dependencies = [
- "getrandom 0.2.17",
- "libredox",
- "thiserror 2.0.19",
-]
-
-[[package]]
-name = "ref-cast"
-version = "1.0.26"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d"
-dependencies = [
- "ref-cast-impl",
-]
-
-[[package]]
-name = "ref-cast-impl"
-version = "1.0.26"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 3.0.3",
-]
-
-[[package]]
-name = "regex"
-version = "1.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-automata",
- "regex-syntax",
-]
-
-[[package]]
-name = "regex-automata"
-version = "0.4.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-syntax",
-]
-
-[[package]]
-name = "regex-syntax"
-version = "0.8.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
-
-[[package]]
-name = "reqwest"
-version = "0.13.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3"
-dependencies = [
- "base64 0.22.1",
- "bytes",
- "futures-core",
- "futures-util",
- "http",
- "http-body",
- "http-body-util",
- "hyper",
- "hyper-util",
- "js-sys",
- "log",
- "percent-encoding",
- "pin-project-lite",
- "serde",
- "serde_json",
- "sync_wrapper",
- "tokio",
- "tokio-util",
- "tower",
- "tower-http",
- "tower-service",
- "url",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "wasm-streams",
- "web-sys",
-]
-
-[[package]]
-name = "rust-ini"
-version = "0.21.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "796e8d2b6696392a43bea58116b667fb4c29727dc5abd27d6acf338bb4f688c7"
-dependencies = [
- "cfg-if",
- "ordered-multimap",
-]
-
-[[package]]
-name = "rustc-hash"
-version = "2.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
-
-[[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 = "1.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
-dependencies = [
- "bitflags 2.13.1",
- "errno",
- "libc",
- "linux-raw-sys",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "rustversion"
-version = "1.0.23"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
-
-[[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.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615"
-dependencies = [
- "dyn-clone",
- "indexmap 1.9.3",
- "schemars_derive",
- "serde",
- "serde_json",
- "url",
- "uuid",
-]
-
-[[package]]
-name = "schemars"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f"
-dependencies = [
- "dyn-clone",
- "ref-cast",
- "serde",
- "serde_json",
-]
-
-[[package]]
-name = "schemars"
-version = "1.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc"
-dependencies = [
- "dyn-clone",
- "ref-cast",
- "serde",
- "serde_json",
-]
-
-[[package]]
-name = "schemars_derive"
-version = "0.8.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d"
-dependencies = [
- "proc-macro2",
- "quote",
- "serde_derive_internals",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "scopeguard"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
-
-[[package]]
-name = "selectors"
-version = "0.36.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5d9c0c92a92d33f08817311cf3f2c29a3538a8240e94a6a3c622ce652d7e00c"
-dependencies = [
- "bitflags 2.13.1",
- "cssparser",
- "derive_more",
- "log",
- "new_debug_unreachable",
- "phf",
- "phf_codegen",
- "precomputed-hash",
- "rustc-hash",
- "servo_arc",
- "smallvec",
-]
-
-[[package]]
-name = "semver"
-version = "1.0.28"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
-dependencies = [
- "serde",
- "serde_core",
-]
-
-[[package]]
-name = "serde"
-version = "1.0.229"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
-dependencies = [
- "serde_core",
- "serde_derive",
-]
-
-[[package]]
-name = "serde-untagged"
-version = "0.1.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058"
-dependencies = [
- "erased-serde",
- "serde",
- "serde_core",
- "typeid",
-]
-
-[[package]]
-name = "serde_core"
-version = "1.0.229"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
-dependencies = [
- "serde_derive",
-]
-
-[[package]]
-name = "serde_derive"
-version = "1.0.229"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 3.0.3",
-]
-
-[[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.119",
-]
-
-[[package]]
-name = "serde_json"
-version = "1.0.151"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
-dependencies = [
- "itoa",
- "memchr",
- "serde",
- "serde_core",
- "zmij",
-]
-
-[[package]]
-name = "serde_repr"
-version = "0.1.21"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 3.0.3",
-]
-
-[[package]]
-name = "serde_spanned"
-version = "0.6.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
-dependencies = [
- "serde",
-]
-
-[[package]]
-name = "serde_spanned"
-version = "1.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26"
-dependencies = [
- "serde_core",
-]
-
-[[package]]
-name = "serde_with"
-version = "3.21.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c"
-dependencies = [
- "base64 0.22.1",
- "bs58",
- "chrono",
- "hex",
- "indexmap 1.9.3",
- "indexmap 2.14.0",
- "schemars 0.9.0",
- "schemars 1.2.1",
- "serde_core",
- "serde_json",
- "serde_with_macros",
- "time",
-]
-
-[[package]]
-name = "serde_with_macros"
-version = "3.21.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660"
-dependencies = [
- "darling",
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "serialize-to-javascript"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5"
-dependencies = [
- "serde",
- "serde_json",
- "serialize-to-javascript-impl",
-]
-
-[[package]]
-name = "serialize-to-javascript-impl"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "servo_arc"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930"
-dependencies = [
- "stable_deref_trait",
-]
-
-[[package]]
-name = "sha2"
-version = "0.10.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
-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 = "shlex"
-version = "2.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
-
-[[package]]
-name = "signal-hook-registry"
-version = "1.4.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b"
-dependencies = [
- "errno",
- "libc",
-]
-
-[[package]]
-name = "simd-adler32"
-version = "0.3.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"
-
-[[package]]
-name = "siphasher"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649"
-
-[[package]]
-name = "slab"
-version = "0.4.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
-
-[[package]]
-name = "smallvec"
-version = "1.15.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
-
-[[package]]
-name = "socket2"
-version = "0.6.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4"
-dependencies = [
- "libc",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "softbuffer"
-version = "0.4.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3"
-dependencies = [
- "bytemuck",
- "js-sys",
- "ndk",
- "objc2",
- "objc2-core-foundation",
- "objc2-core-graphics",
- "objc2-foundation",
- "objc2-quartz-core",
- "raw-window-handle",
- "redox_syscall",
- "tracing",
- "wasm-bindgen",
- "web-sys",
- "windows-sys 0.61.2",
-]
-
-[[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.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
-
-[[package]]
-name = "string_cache"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901"
-dependencies = [
- "new_debug_unreachable",
- "parking_lot",
- "phf_shared",
- "precomputed-hash",
-]
-
-[[package]]
-name = "string_cache_codegen"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69"
-dependencies = [
- "phf_generator",
- "phf_shared",
- "proc-macro2",
- "quote",
-]
-
-[[package]]
-name = "strsim"
-version = "0.11.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
-
-[[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",
- "unicode-ident",
-]
-
-[[package]]
-name = "syn"
-version = "2.0.119"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
-dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
-]
-
-[[package]]
-name = "syn"
-version = "3.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"
-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.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[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.35.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d1c93047acf68669466a34690ac58cca7010bd1b201e1ec86f1fd0a75d3dd4a9"
-dependencies = [
- "bitflags 2.13.1",
- "block2",
- "core-foundation",
- "core-graphics",
- "crossbeam-channel",
- "dbus",
- "dispatch2",
- "dlopen2",
- "dpi",
- "gdkwayland-sys",
- "gdkx11-sys",
- "gtk",
- "jni",
- "libc",
- "log",
- "ndk",
- "ndk-sys",
- "objc2",
- "objc2-app-kit",
- "objc2-foundation",
- "objc2-ui-kit",
- "once_cell",
- "parking_lot",
- "percent-encoding",
- "raw-window-handle",
- "tao-macros",
- "unicode-segmentation",
- "url",
- "windows",
- "windows-core 0.61.2",
- "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.119",
-]
-
-[[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.11.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "667b20e2726d572dea2de7370da16e188eb06008faf9a92fab7cdc46791190b5"
-dependencies = [
- "anyhow",
- "bytes",
- "cookie",
- "dirs",
- "dunce",
- "embed_plist",
- "getrandom 0.3.4",
- "glob",
- "gtk",
- "heck 0.5.0",
- "http",
- "jni",
- "libc",
- "log",
- "mime",
- "muda",
- "objc2",
- "objc2-app-kit",
- "objc2-foundation",
- "objc2-ui-kit",
- "objc2-web-kit",
- "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.19",
- "tokio",
- "tray-icon",
- "url",
- "webkit2gtk",
- "webview2-com",
- "window-vibrancy",
- "windows",
-]
-
-[[package]]
-name = "tauri-build"
-version = "2.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc9ce40b16101cb6ea63d3e221567affd1c3a9205f95d7bc574941a10636b632"
-dependencies = [
- "anyhow",
- "cargo_toml",
- "dirs",
- "glob",
- "heck 0.5.0",
- "json-patch",
- "schemars 0.8.22",
- "semver",
- "serde",
- "serde_json",
- "tauri-utils",
- "tauri-winres",
- "walkdir",
-]
-
-[[package]]
-name = "tauri-codegen"
-version = "2.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08279169ff42f8fc45a1dbc9dcae888893ba95288142e5880c59b93a26d2cfc5"
-dependencies = [
- "base64 0.22.1",
- "brotli",
- "ico",
- "json-patch",
- "plist",
- "png 0.17.16",
- "proc-macro2",
- "quote",
- "semver",
- "serde",
- "serde_json",
- "sha2",
- "syn 2.0.119",
- "tauri-utils",
- "thiserror 2.0.19",
- "time",
- "url",
- "uuid",
- "walkdir",
-]
-
-[[package]]
-name = "tauri-macros"
-version = "2.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8b394794f399a421811d06966343e7933fcae92d59f5180b9388d1174497a45"
-dependencies = [
- "heck 0.5.0",
- "proc-macro2",
- "quote",
- "syn 2.0.119",
- "tauri-codegen",
- "tauri-utils",
-]
-
-[[package]]
-name = "tauri-plugin"
-version = "2.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "74be5dd4bed9afbd145e5716b5fa2ec28cbc29c34ffa61c258c9273d896c8020"
-dependencies = [
- "anyhow",
- "glob",
- "plist",
- "schemars 0.8.22",
- "serde",
- "serde_json",
- "tauri-utils",
- "walkdir",
-]
-
-[[package]]
-name = "tauri-plugin-deep-link"
-version = "2.4.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70ee75bc5627f77bfdf40c913255ebc258117b10ebe2b2239a1a1cf40b0b58aa"
-dependencies = [
- "dunce",
- "plist",
- "rust-ini",
- "serde",
- "serde_json",
- "tauri",
- "tauri-plugin",
- "tauri-utils",
- "thiserror 2.0.19",
- "tracing",
- "url",
- "windows-registry",
- "windows-result 0.3.4",
-]
-
-[[package]]
-name = "tauri-plugin-opener"
-version = "2.5.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17e1bea14edce6b793a04e2417e3fd924b9bc4faae83cdee7d714156cceeed29"
-dependencies = [
- "dunce",
- "glob",
- "objc2-app-kit",
- "objc2-foundation",
- "open",
- "schemars 0.8.22",
- "serde",
- "serde_json",
- "tauri",
- "tauri-plugin",
- "thiserror 2.0.19",
- "url",
- "windows",
- "zbus",
-]
-
-[[package]]
-name = "tauri-plugin-single-instance"
-version = "2.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3214becf9ef5783c0ae99a3bb25adf5353a7a16ebf53e74b909e29205735c6c"
-dependencies = [
- "serde",
- "serde_json",
- "tauri",
- "tauri-plugin-deep-link",
- "thiserror 2.0.19",
- "tokio",
- "tracing",
- "windows-sys 0.60.2",
- "zbus",
-]
-
-[[package]]
-name = "tauri-runtime"
-version = "2.11.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0b4bc95aed361b0019067d189a1174a603d460d0f6c72606512d59fc9c12ec8"
-dependencies = [
- "cookie",
- "dpi",
- "gtk",
- "http",
- "jni",
- "objc2",
- "objc2-ui-kit",
- "objc2-web-kit",
- "raw-window-handle",
- "serde",
- "serde_json",
- "tauri-utils",
- "thiserror 2.0.19",
- "url",
- "webkit2gtk",
- "webview2-com",
- "windows",
-]
-
-[[package]]
-name = "tauri-runtime-wry"
-version = "2.11.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e6fac707727b7a2f48e4ded90976324267371073edbb415ffb73bb0458d203f"
-dependencies = [
- "gtk",
- "http",
- "jni",
- "log",
- "objc2",
- "objc2-app-kit",
- "once_cell",
- "percent-encoding",
- "raw-window-handle",
- "softbuffer",
- "tao",
- "tauri-runtime",
- "tauri-utils",
- "url",
- "webkit2gtk",
- "webview2-com",
- "windows",
- "wry",
-]
-
-[[package]]
-name = "tauri-utils"
-version = "2.9.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e176a18e67764923c4f1ce66f25ae4abe5f688384d5eb1a0fa6c77f3d90f887"
-dependencies = [
- "anyhow",
- "brotli",
- "cargo_metadata",
- "ctor",
- "dom_query",
- "dunce",
- "glob",
- "http",
- "infer",
- "json-patch",
- "log",
- "memchr",
- "phf",
- "plist",
- "proc-macro2",
- "quote",
- "regex",
- "schemars 0.8.22",
- "semver",
- "serde",
- "serde-untagged",
- "serde_json",
- "serde_with",
- "swift-rs",
- "thiserror 2.0.19",
- "toml 1.1.3+spec-1.1.0",
- "url",
- "urlpattern",
- "uuid",
- "walkdir",
-]
-
-[[package]]
-name = "tauri-winres"
-version = "0.3.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc65d45c68858bfe420dd29e834b5d15dbecf8a07a8a16cf4d532c7b1f69d4b6"
-dependencies = [
- "dunce",
- "embed-resource",
- "toml 1.1.3+spec-1.1.0",
-]
-
-[[package]]
-name = "tempfile"
-version = "3.27.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
-dependencies = [
- "fastrand",
- "getrandom 0.4.3",
- "once_cell",
- "rustix",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "tendril"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08"
-dependencies = [
- "new_debug_unreachable",
-]
-
-[[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.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9"
-dependencies = [
- "thiserror-impl 2.0.19",
-]
-
-[[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.119",
-]
-
-[[package]]
-name = "thiserror-impl"
-version = "2.0.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 3.0.3",
-]
-
-[[package]]
-name = "time"
-version = "0.3.54"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e1d5e639ff6bab73cb6885cc7e7b1de96c3f32c68ec55f3952614bec1092244"
-dependencies = [
- "deranged",
- "num-conv",
- "powerfmt",
- "serde_core",
- "time-core",
- "time-macros",
-]
-
-[[package]]
-name = "time-core"
-version = "0.1.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109"
-
-[[package]]
-name = "time-macros"
-version = "0.2.32"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85"
-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.8.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d"
-dependencies = [
- "displaydoc",
- "zerovec",
-]
-
-[[package]]
-name = "tinyvec"
-version = "1.12.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f"
-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.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed"
-dependencies = [
- "bytes",
- "libc",
- "mio",
- "pin-project-lite",
- "socket2",
- "windows-sys 0.61.2",
-]
-
-[[package]]
-name = "tokio-util"
-version = "0.7.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52"
-dependencies = [
- "bytes",
- "futures-core",
- "futures-sink",
- "pin-project-lite",
- "tokio",
-]
-
-[[package]]
-name = "toml"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d"
-dependencies = [
- "serde",
- "serde_spanned 0.6.9",
- "toml_datetime 0.6.3",
- "toml_edit 0.20.2",
-]
-
-[[package]]
-name = "toml"
-version = "0.9.12+spec-1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863"
-dependencies = [
- "indexmap 2.14.0",
- "serde_core",
- "serde_spanned 1.1.1",
- "toml_datetime 0.7.5+spec-1.1.0",
- "toml_parser",
- "toml_writer",
- "winnow 0.7.15",
-]
-
-[[package]]
-name = "toml"
-version = "1.1.3+spec-1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53c96ecdfa941c8fc4fcaed14f99ada8ebed502eef533015095a07e3301d4c3c"
-dependencies = [
- "indexmap 2.14.0",
- "serde_core",
- "serde_spanned 1.1.1",
- "toml_datetime 1.1.1+spec-1.1.0",
- "toml_parser",
- "toml_writer",
- "winnow 1.0.4",
-]
-
-[[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_datetime"
-version = "0.7.5+spec-1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347"
-dependencies = [
- "serde_core",
-]
-
-[[package]]
-name = "toml_datetime"
-version = "1.1.1+spec-1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7"
-dependencies = [
- "serde_core",
-]
-
-[[package]]
-name = "toml_edit"
-version = "0.19.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
-dependencies = [
- "indexmap 2.14.0",
- "toml_datetime 0.6.3",
- "winnow 0.5.40",
-]
-
-[[package]]
-name = "toml_edit"
-version = "0.20.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338"
-dependencies = [
- "indexmap 2.14.0",
- "serde",
- "serde_spanned 0.6.9",
- "toml_datetime 0.6.3",
- "winnow 0.5.40",
-]
-
-[[package]]
-name = "toml_edit"
-version = "0.25.13+spec-1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b"
-dependencies = [
- "indexmap 2.14.0",
- "toml_datetime 1.1.1+spec-1.1.0",
- "toml_parser",
- "winnow 1.0.4",
-]
-
-[[package]]
-name = "toml_parser"
-version = "1.1.2+spec-1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526"
-dependencies = [
- "winnow 1.0.4",
-]
-
-[[package]]
-name = "toml_writer"
-version = "1.1.2+spec-1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2"
-
-[[package]]
-name = "tower"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4"
-dependencies = [
- "futures-core",
- "futures-util",
- "pin-project-lite",
- "sync_wrapper",
- "tokio",
- "tower-layer",
- "tower-service",
-]
-
-[[package]]
-name = "tower-http"
-version = "0.6.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840"
-dependencies = [
- "bitflags 2.13.1",
- "bytes",
- "futures-util",
- "http",
- "http-body",
- "pin-project-lite",
- "tower",
- "tower-layer",
- "tower-service",
- "url",
-]
-
-[[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.44"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
-dependencies = [
- "pin-project-lite",
- "tracing-attributes",
- "tracing-core",
-]
-
-[[package]]
-name = "tracing-attributes"
-version = "0.1.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "tracing-core"
-version = "0.1.36"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
-dependencies = [
- "once_cell",
-]
-
-[[package]]
-name = "tray-icon"
-version = "0.24.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65ba1e5f6b9ef9fd87e21b9c6f351554dbd717960089168fcfdef854686961dc"
-dependencies = [
- "crossbeam-channel",
- "dirs",
- "libappindicator",
- "muda",
- "objc2",
- "objc2-app-kit",
- "objc2-core-foundation",
- "objc2-core-graphics",
- "objc2-foundation",
- "once_cell",
- "png 0.18.1",
- "serde",
- "thiserror 2.0.19",
- "windows-sys 0.61.2",
-]
-
-[[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.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"
-
-[[package]]
-name = "typenum"
-version = "1.20.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
-
-[[package]]
-name = "uds_windows"
-version = "1.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e"
-dependencies = [
- "memoffset",
- "tempfile",
- "windows-sys 0.61.2",
-]
-
-[[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.24"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
-
-[[package]]
-name = "unicode-segmentation"
-version = "1.13.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"
-
-[[package]]
-name = "url"
-version = "2.5.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"
-dependencies = [
- "form_urlencoded",
- "idna",
- "percent-encoding",
- "serde",
- "serde_derive",
-]
-
-[[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 = "utf8_iter"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
-
-[[package]]
-name = "uuid"
-version = "1.24.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239"
-dependencies = [
- "getrandom 0.4.3",
- "js-sys",
- "serde_core",
- "wasm-bindgen",
-]
-
-[[package]]
-name = "version-compare"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e"
-
-[[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.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150"
-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.11.1+wasi-snapshot-preview1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
-
-[[package]]
-name = "wasip2"
-version = "1.0.4+wasi-0.2.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"
-dependencies = [
- "wit-bindgen",
-]
-
-[[package]]
-name = "wasm-bindgen"
-version = "0.2.126"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4"
-dependencies = [
- "cfg-if",
- "once_cell",
- "rustversion",
- "wasm-bindgen-macro",
- "wasm-bindgen-shared",
-]
-
-[[package]]
-name = "wasm-bindgen-futures"
-version = "0.4.76"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d"
-dependencies = [
- "js-sys",
- "wasm-bindgen",
-]
-
-[[package]]
-name = "wasm-bindgen-macro"
-version = "0.2.126"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1"
-dependencies = [
- "quote",
- "wasm-bindgen-macro-support",
-]
-
-[[package]]
-name = "wasm-bindgen-macro-support"
-version = "0.2.126"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e"
-dependencies = [
- "bumpalo",
- "proc-macro2",
- "quote",
- "syn 2.0.119",
- "wasm-bindgen-shared",
-]
-
-[[package]]
-name = "wasm-bindgen-shared"
-version = "0.2.126"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24"
-dependencies = [
- "unicode-ident",
-]
-
-[[package]]
-name = "wasm-streams"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb"
-dependencies = [
- "futures-util",
- "js-sys",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
-]
-
-[[package]]
-name = "web-sys"
-version = "0.3.103"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141"
-dependencies = [
- "js-sys",
- "wasm-bindgen",
-]
-
-[[package]]
-name = "web_atoms"
-version = "0.2.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "075474b12bcb3d2e3d4546580e9de478eeeead668a1761e2a8860c836b7ef297"
-dependencies = [
- "phf",
- "phf_codegen",
- "string_cache",
- "string_cache_codegen",
-]
-
-[[package]]
-name = "webkit2gtk"
-version = "2.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1027150013530fb2eaf806408df88461ae4815a45c541c8975e61d6f2fc4793"
-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.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "916a5f65c2ef0dfe12fff695960a2ec3d4565359fdbb2e9943c974e06c734ea5"
-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.38.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7130243a7a5b33c54a444e54842e6a9e133de08b5ad7b5861cd8ed9a6a5bc96a"
-dependencies = [
- "webview2-com-macros",
- "webview2-com-sys",
- "windows",
- "windows-core 0.61.2",
- "windows-implement",
- "windows-interface",
-]
-
-[[package]]
-name = "webview2-com-macros"
-version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "webview2-com-sys"
-version = "0.38.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c"
-dependencies = [
- "thiserror 2.0.19",
- "windows",
- "windows-core 0.61.2",
-]
-
-[[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.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
-dependencies = [
- "windows-sys 0.61.2",
-]
-
-[[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.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c"
-dependencies = [
- "objc2",
- "objc2-app-kit",
- "objc2-core-foundation",
- "objc2-foundation",
- "raw-window-handle",
- "windows-sys 0.59.0",
- "windows-version",
-]
-
-[[package]]
-name = "windows"
-version = "0.61.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893"
-dependencies = [
- "windows-collections",
- "windows-core 0.61.2",
- "windows-future",
- "windows-link 0.1.3",
- "windows-numerics",
-]
-
-[[package]]
-name = "windows-collections"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"
-dependencies = [
- "windows-core 0.61.2",
-]
-
-[[package]]
-name = "windows-core"
-version = "0.61.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
-dependencies = [
- "windows-implement",
- "windows-interface",
- "windows-link 0.1.3",
- "windows-result 0.3.4",
- "windows-strings 0.4.2",
-]
-
-[[package]]
-name = "windows-core"
-version = "0.62.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
-dependencies = [
- "windows-implement",
- "windows-interface",
- "windows-link 0.2.1",
- "windows-result 0.4.1",
- "windows-strings 0.5.1",
-]
-
-[[package]]
-name = "windows-future"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e"
-dependencies = [
- "windows-core 0.61.2",
- "windows-link 0.1.3",
- "windows-threading",
-]
-
-[[package]]
-name = "windows-implement"
-version = "0.60.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "windows-interface"
-version = "0.59.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "windows-link"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
-
-[[package]]
-name = "windows-link"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
-
-[[package]]
-name = "windows-numerics"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
-dependencies = [
- "windows-core 0.61.2",
- "windows-link 0.1.3",
-]
-
-[[package]]
-name = "windows-registry"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e"
-dependencies = [
- "windows-link 0.1.3",
- "windows-result 0.3.4",
- "windows-strings 0.4.2",
-]
-
-[[package]]
-name = "windows-result"
-version = "0.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
-dependencies = [
- "windows-link 0.1.3",
-]
-
-[[package]]
-name = "windows-result"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
-dependencies = [
- "windows-link 0.2.1",
-]
-
-[[package]]
-name = "windows-strings"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
-dependencies = [
- "windows-link 0.1.3",
-]
-
-[[package]]
-name = "windows-strings"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
-dependencies = [
- "windows-link 0.2.1",
-]
-
-[[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.59.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
-dependencies = [
- "windows-targets 0.52.6",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.60.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
-dependencies = [
- "windows-targets 0.53.5",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.61.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
-dependencies = [
- "windows-link 0.2.1",
-]
-
-[[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.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 0.52.6",
- "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-targets"
-version = "0.53.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
-dependencies = [
- "windows-link 0.2.1",
- "windows_aarch64_gnullvm 0.53.1",
- "windows_aarch64_msvc 0.53.1",
- "windows_i686_gnu 0.53.1",
- "windows_i686_gnullvm 0.53.1",
- "windows_i686_msvc 0.53.1",
- "windows_x86_64_gnu 0.53.1",
- "windows_x86_64_gnullvm 0.53.1",
- "windows_x86_64_msvc 0.53.1",
-]
-
-[[package]]
-name = "windows-threading"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6"
-dependencies = [
- "windows-link 0.1.3",
-]
-
-[[package]]
-name = "windows-version"
-version = "0.1.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631"
-dependencies = [
- "windows-link 0.2.1",
-]
-
-[[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.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
-
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
-
-[[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.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
-
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
-
-[[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.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
-
-[[package]]
-name = "windows_i686_gnu"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
-
-[[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_gnullvm"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
-
-[[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.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
-
-[[package]]
-name = "windows_i686_msvc"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
-
-[[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.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
-
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
-
-[[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.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
-
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
-
-[[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.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
-
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
-
-[[package]]
-name = "winnow"
-version = "0.5.40"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "winnow"
-version = "0.7.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
-
-[[package]]
-name = "winnow"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "winreg"
-version = "0.55.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97"
-dependencies = [
- "cfg-if",
- "windows-sys 0.59.0",
-]
-
-[[package]]
-name = "wit-bindgen"
-version = "0.57.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
-
-[[package]]
-name = "writeable"
-version = "0.6.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4"
-
-[[package]]
-name = "wry"
-version = "0.55.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "186f9871daa55fd9c016578b810d149de58367113db7fb72b462d2323ce19514"
-dependencies = [
- "base64 0.22.1",
- "block2",
- "cookie",
- "crossbeam-channel",
- "dirs",
- "dom_query",
- "dpi",
- "dunce",
- "gdkx11",
- "gtk",
- "http",
- "javascriptcore-rs",
- "jni",
- "libc",
- "ndk",
- "objc2",
- "objc2-app-kit",
- "objc2-core-foundation",
- "objc2-foundation",
- "objc2-ui-kit",
- "objc2-web-kit",
- "once_cell",
- "percent-encoding",
- "raw-window-handle",
- "sha2",
- "soup3",
- "tao-macros",
- "thiserror 2.0.19",
- "url",
- "webkit2gtk",
- "webkit2gtk-sys",
- "webview2-com",
- "windows",
- "windows-core 0.61.2",
- "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.8.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5"
-dependencies = [
- "stable_deref_trait",
- "yoke-derive",
- "zerofrom",
-]
-
-[[package]]
-name = "yoke-derive"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
- "synstructure",
-]
-
-[[package]]
-name = "zbus"
-version = "5.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe18fb60dc696039e738717b76eaea21e7a4489bbb1885020b43c94236d7e98a"
-dependencies = [
- "async-broadcast",
- "async-executor",
- "async-io",
- "async-lock",
- "async-process",
- "async-recursion",
- "async-task",
- "async-trait",
- "blocking",
- "enumflags2",
- "event-listener",
- "futures-core",
- "futures-lite",
- "hex",
- "libc",
- "ordered-stream",
- "rustix",
- "serde",
- "serde_repr",
- "tracing",
- "uds_windows",
- "uuid",
- "windows-sys 0.61.2",
- "winnow 1.0.4",
- "zbus_macros",
- "zbus_names",
- "zvariant",
-]
-
-[[package]]
-name = "zbus_macros"
-version = "5.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe96480bed92df2b442a1a30df364e12d08eed03aeb061f2b8dc6afb2be91119"
-dependencies = [
- "proc-macro-crate 3.5.0",
- "proc-macro2",
- "quote",
- "syn 2.0.119",
- "zbus_names",
- "zvariant",
- "zvariant_utils",
-]
-
-[[package]]
-name = "zbus_names"
-version = "4.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8bf88b4a3ff53e883001e0e0115b297a9d53c31b9c1edd2bfdd853e3428624e"
-dependencies = [
- "serde",
- "winnow 1.0.4",
- "zvariant",
-]
-
-[[package]]
-name = "zerofrom"
-version = "0.1.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272"
-dependencies = [
- "zerofrom-derive",
-]
-
-[[package]]
-name = "zerofrom-derive"
-version = "0.1.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
- "synstructure",
-]
-
-[[package]]
-name = "zerotrie"
-version = "0.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf"
-dependencies = [
- "displaydoc",
- "yoke",
- "zerofrom",
-]
-
-[[package]]
-name = "zerovec"
-version = "0.11.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239"
-dependencies = [
- "yoke",
- "zerofrom",
- "zerovec-derive",
-]
-
-[[package]]
-name = "zerovec-derive"
-version = "0.11.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.119",
-]
-
-[[package]]
-name = "zmij"
-version = "1.0.23"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
-
-[[package]]
-name = "zvariant"
-version = "5.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bee2a0bcd2a907786a456fff45aaaaf54c9ba5f50b71ae9ec1a4edd200c94911"
-dependencies = [
- "endi",
- "enumflags2",
- "serde",
- "winnow 1.0.4",
- "zvariant_derive",
- "zvariant_utils",
-]
-
-[[package]]
-name = "zvariant_derive"
-version = "5.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38a708216a18780796770bfe3f4739c7c83a3e8f789b755534bbbc06e4e23e12"
-dependencies = [
- "proc-macro-crate 3.5.0",
- "proc-macro2",
- "quote",
- "syn 2.0.119",
- "zvariant_utils",
-]
-
-[[package]]
-name = "zvariant_utils"
-version = "3.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90cb9383f9b45290407a1258b202d3f8f01db719eb60b4e4055c6375af4fc7c7"
-dependencies = [
- "proc-macro2",
- "quote",
- "serde",
- "syn 2.0.119",
- "winnow 1.0.4",
-]
diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml
deleted file mode 100644
index 7aa0e2d..0000000
--- a/apps/desktop/src-tauri/Cargo.toml
+++ /dev/null
@@ -1,49 +0,0 @@
-[package]
-name = "doughmination-music"
-version = "1.0.0"
-edition = "2024"
-
-# Mobile (Android/iOS) builds the app as a shared library that the generated
-# Gradle/Xcode project loads and calls `run()` on. `staticlib`/`cdylib` are
-# what those toolchains link against; `rlib` is what the desktop `main.rs`
-# binary uses. The name must be a valid Rust identifier (no dashes), so it
-# differs from the package name — `main.rs` refers to it as this.
-[lib]
-name = "doughmination_music_lib"
-crate-type = ["staticlib", "cdylib", "rlib"]
-
-[build-dependencies]
-tauri-build = { version = "2", features = [] }
-
-[dependencies]
-tauri = { version = "2", features = [] }
-serde = { version = "1", features = ["derive"] }
-serde_json = "1"
-
-# Sign-in runs in the system browser and returns via a doughmination://
-# deeplink (RFC 8252). `deep-link` receives the callback URL, `opener` opens
-# the browser, and `single-instance` makes sure the deeplink reaches the
-# already-running window on Windows/Linux instead of spawning a new process.
-tauri-plugin-deep-link = "2"
-tauri-plugin-opener = "2"
-
-# Discord Social SDK (safe wrapper crate). Desktop-only: it ships prebuilt
-# native libs for macOS/Windows/Linux and has no Android/iOS build, so it's
-# gated to the desktop OSes here — Android/iOS skip it entirely (the Rust
-# side gates the matching code behind `cfg(desktop)`).
-# Repo: https://github.com/SafeShows/discord_social_sdk
-# You must separately download the prebuilt SDK from the Discord Developer
-# Portal — see the note above the discord_social_sdk/ folder in this crate.
-[target."cfg(any(target_os = \"windows\", target_os = \"linux\", target_os = \"macos\"))".dependencies]
-discord_social_sdk = { git = "https://github.com/SafeShows/discord_social_sdk", package = "discord_social_sdk" }
-
-[target."cfg(any(target_os = \"windows\", target_os = \"linux\"))".dependencies]
-tauri-plugin-single-instance = { version = "2", features = ["deep-link"] }
-
-# Upstream's ActivityGamePlatforms/ErrorKind::Other assume the SDK's raw
-# bitmask type is i32; bindgen emits u32 for it on this target, which fails
-# to compile. Patched locally in vendor/discord_social_sdk until fixed
-# upstream — see the comment at the top of that crate's Cargo.toml.
-[patch."https://github.com/SafeShows/discord_social_sdk"]
-discord_social_sdk = { path = "../../../vendor/discord_social_sdk/crates/discord_social_sdk" }
-discord_social_sdk_sys = { path = "../../../vendor/discord_social_sdk/crates/discord_social_sdk_sys" }
diff --git a/apps/desktop/src-tauri/build.rs b/apps/desktop/src-tauri/build.rs
deleted file mode 100644
index e96c2c9..0000000
--- a/apps/desktop/src-tauri/build.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-fn main() {
- tauri_build::build();
-
- // The Discord SDK is a dylib whose install name is @rpath/… . The sys
- // crate emits -rpath link args, but cargo:rustc-link-arg from a *library*
- // dependency does not propagate to the final binary's link — so the
- // packaged .app ended up with "no LC_RPATH's found" and crashed at launch.
- // Emitting them here (the binary crate's own build script) does affect the
- // binary. Cover both layouts:
- // - dev: dylib is staged next to the binary -> @executable_path
- // - packaged app: dylib copied into Contents/Frameworks -> ../Frameworks
- // (A benign "duplicate -rpath ... ignored" warning may appear on the
- // packaged build; harmless, and kept for safety since this is what got the
- // app launching.)
- #[cfg(target_os = "macos")]
- {
- println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path");
- println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path/../Frameworks");
- println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path");
- }
-
- // Linux equivalent. libdiscord_partner_sdk.so is staged next to the binary,
- // but the sys crate's `$ORIGIN` rpath (a dependency link-arg) never reaches
- // this final binary — so linuxdeploy failed with "Could not find
- // dependency: libdiscord_partner_sdk.so" when building the AppImage.
- // Emitting $ORIGIN here lets both linuxdeploy (at bundle time) and the
- // runtime loader find the .so beside the executable. $ORIGIN is written
- // literally into DT_RPATH (cargo does not shell-expand link args).
- #[cfg(target_os = "linux")]
- {
- println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN");
- println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN/../lib");
- }
-}
diff --git a/apps/desktop/src-tauri/capabilities/default.json b/apps/desktop/src-tauri/capabilities/default.json
deleted file mode 100644
index 4cd684b..0000000
--- a/apps/desktop/src-tauri/capabilities/default.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "$schema": "../gen/schemas/desktop-schema.json",
- "identifier": "default",
- "description": "Capabilities for the main window",
- "windows": ["main"],
- "local": true,
- "remote": {
- "urls": ["https://doughmination.me", "https://*.doughmination.me"]
- },
- "permissions": [
- "core:default",
- "core:window:allow-close",
- "core:window:allow-minimize",
- "deep-link:default",
- "opener:default",
- "opener:allow-open-url"
- ]
-}
diff --git a/apps/desktop/src-tauri/icons/128x128.png b/apps/desktop/src-tauri/icons/128x128.png
deleted file mode 100644
index e888d45..0000000
Binary files a/apps/desktop/src-tauri/icons/128x128.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/[email protected] b/apps/desktop/src-tauri/icons/[email protected]
deleted file mode 100644
index f3ba773..0000000
Binary files a/apps/desktop/src-tauri/icons/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/32x32.png b/apps/desktop/src-tauri/icons/32x32.png
deleted file mode 100644
index 34a346a..0000000
Binary files a/apps/desktop/src-tauri/icons/32x32.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/64x64.png b/apps/desktop/src-tauri/icons/64x64.png
deleted file mode 100644
index 659dc82..0000000
Binary files a/apps/desktop/src-tauri/icons/64x64.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/Square107x107Logo.png b/apps/desktop/src-tauri/icons/Square107x107Logo.png
deleted file mode 100644
index c1d7bec..0000000
Binary files a/apps/desktop/src-tauri/icons/Square107x107Logo.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/Square142x142Logo.png b/apps/desktop/src-tauri/icons/Square142x142Logo.png
deleted file mode 100644
index 6c1e8ab..0000000
Binary files a/apps/desktop/src-tauri/icons/Square142x142Logo.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/Square150x150Logo.png b/apps/desktop/src-tauri/icons/Square150x150Logo.png
deleted file mode 100644
index 632ed3a..0000000
Binary files a/apps/desktop/src-tauri/icons/Square150x150Logo.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/Square284x284Logo.png b/apps/desktop/src-tauri/icons/Square284x284Logo.png
deleted file mode 100644
index 95b6981..0000000
Binary files a/apps/desktop/src-tauri/icons/Square284x284Logo.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/Square30x30Logo.png b/apps/desktop/src-tauri/icons/Square30x30Logo.png
deleted file mode 100644
index 47126eb..0000000
Binary files a/apps/desktop/src-tauri/icons/Square30x30Logo.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/Square310x310Logo.png b/apps/desktop/src-tauri/icons/Square310x310Logo.png
deleted file mode 100644
index 99ca222..0000000
Binary files a/apps/desktop/src-tauri/icons/Square310x310Logo.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/Square44x44Logo.png b/apps/desktop/src-tauri/icons/Square44x44Logo.png
deleted file mode 100644
index d654b8a..0000000
Binary files a/apps/desktop/src-tauri/icons/Square44x44Logo.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/Square71x71Logo.png b/apps/desktop/src-tauri/icons/Square71x71Logo.png
deleted file mode 100644
index ede6071..0000000
Binary files a/apps/desktop/src-tauri/icons/Square71x71Logo.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/Square89x89Logo.png b/apps/desktop/src-tauri/icons/Square89x89Logo.png
deleted file mode 100644
index fbcfded..0000000
Binary files a/apps/desktop/src-tauri/icons/Square89x89Logo.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/StoreLogo.png b/apps/desktop/src-tauri/icons/StoreLogo.png
deleted file mode 100644
index 06d5b37..0000000
Binary files a/apps/desktop/src-tauri/icons/StoreLogo.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-anydpi-v26/ic_launcher.xml b/apps/desktop/src-tauri/icons/android/mipmap-anydpi-v26/ic_launcher.xml
deleted file mode 100644
index 2ffbf24..0000000
--- a/apps/desktop/src-tauri/icons/android/mipmap-anydpi-v26/ic_launcher.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
- <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
- <background android:drawable="@color/ic_launcher_background"/>
-</adaptive-icon>
\ No newline at end of file
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png b/apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index 3c2aec1..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png b/apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png
deleted file mode 100644
index ed8f76d..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png b/apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index d7a73f5..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png b/apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index 2077538..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png b/apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png
deleted file mode 100644
index 8b26f8f..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png b/apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index 4979e46..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png b/apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index e48e748..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png b/apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png
deleted file mode 100644
index 60d781a..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png b/apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index 9891f45..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png b/apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 85c264e..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png b/apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png
deleted file mode 100644
index d9887f0..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png b/apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index b30d4df..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png b/apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index 90969d4..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png b/apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png
deleted file mode 100644
index a2a5e8b..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png b/apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index 1dfb7de..0000000
Binary files a/apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/android/values/ic_launcher_background.xml b/apps/desktop/src-tauri/icons/android/values/ic_launcher_background.xml
deleted file mode 100644
index ea9c223..0000000
--- a/apps/desktop/src-tauri/icons/android/values/ic_launcher_background.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <color name="ic_launcher_background">#fff</color>
-</resources>
\ No newline at end of file
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index 3391567..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index d4f33ea..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index d4f33ea..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index 461d6d9..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index 353f841..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index 7202160..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index 7202160..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index aefc5ad..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index d4f33ea..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index 71d8f59..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index 71d8f59..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index 0baf7ac..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index 4f33306..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index 0baf7ac..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index 7669894..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index 7e3825a..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index fc326e6..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/icons/ios/[email protected] b/apps/desktop/src-tauri/icons/ios/[email protected]
deleted file mode 100644
index 8be472c..0000000
Binary files a/apps/desktop/src-tauri/icons/ios/[email protected] and /dev/null differ
diff --git a/apps/desktop/src-tauri/scripts/patch-android-signing.ts b/apps/desktop/src-tauri/scripts/patch-android-signing.ts
deleted file mode 100644
index b28ea30..0000000
--- a/apps/desktop/src-tauri/scripts/patch-android-signing.ts
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/env bun
-// Injects the release signing config into Tauri's generated Android
-// `build.gradle.kts`.
-//
-// `gen/android` is gitignored and regenerated by `tauri android init`, so the
-// signing block can't just live in a committed file — it has to be re-applied
-// after init on every CI run. This does that, driven by a `keystore.properties`
-// written from CI secrets (see the workflow).
-//
-// It's idempotent (safe to run twice) and fails loudly if Tauri's generated
-// file changes shape, so CI errors clearly instead of silently shipping an
-// unsigned APK.
-//
-// Run it from `apps/desktop/src-tauri`: bun scripts/patch-android-signing.ts
-
-import {
- readFileSync,
- writeFileSync,
-} from "node:fs";
-
-const GRADLE_PATH = "gen/android/app/build.gradle.kts";
-
-function fail(anchor: string): never {
- console.error(`[patch-android-signing] anchor not found: ${anchor}`);
- console.error(
- "Tauri's generated build.gradle.kts changed shape — update this script.",
- );
- process.exit(1);
-}
-
-let src = readFileSync(GRADLE_PATH, "utf8");
-
-if (src.includes("signingConfigs {")) {
- console.log("[patch-android-signing] already patched, skipping");
- process.exit(0);
-}
-
-// 1. Import needed by the signing block.
-const IMPORT_ANCHOR = "import java.util.Properties\n";
-if (!src.includes(IMPORT_ANCHOR)) fail("import java.util.Properties");
-if (!src.includes("import java.io.FileInputStream")) {
- src = src.replace(
- IMPORT_ANCHOR,
- IMPORT_ANCHOR + "import java.io.FileInputStream\n",
- );
-}
-
-// 2. The signing config itself, inserted just before `buildTypes`.
-const BUILD_TYPES_ANCHOR = " buildTypes {";
-if (!src.includes(BUILD_TYPES_ANCHOR)) fail("buildTypes block");
-
-const SIGNING_BLOCK = ` signingConfigs {
- create("release") {
- val keystorePropertiesFile = rootProject.file("keystore.properties")
- val keystoreProperties = Properties()
- if (keystorePropertiesFile.exists()) {
- keystoreProperties.load(FileInputStream(keystorePropertiesFile))
- }
- keyAlias = keystoreProperties["keyAlias"] as String
- keyPassword = keystoreProperties["password"] as String
- storeFile = file(keystoreProperties["storeFile"] as String)
- storePassword = keystoreProperties["password"] as String
- }
- }
-`;
-src = src.replace(BUILD_TYPES_ANCHOR, SIGNING_BLOCK + BUILD_TYPES_ANCHOR);
-
-// 3. Wire that config into the existing `release` build type.
-const RELEASE_ANCHOR = ` getByName("release") {\n`;
-if (!src.includes(RELEASE_ANCHOR)) fail(`getByName("release")`);
-src = src.replace(
- RELEASE_ANCHOR,
- RELEASE_ANCHOR +
- ` signingConfig = signingConfigs.getByName("release")\n`,
-);
-
-writeFileSync(GRADLE_PATH, src);
-console.log("[patch-android-signing] signing config injected");
diff --git a/apps/desktop/src-tauri/src/discord.rs b/apps/desktop/src-tauri/src/discord.rs
deleted file mode 100644
index 63dfa64..0000000
--- a/apps/desktop/src-tauri/src/discord.rs
+++ /dev/null
@@ -1,113 +0,0 @@
-// Owns the Discord Social SDK `Client` on a single dedicated thread — the
-// SDK is callback-driven and expects to be pumped from one thread only
-// (see the discord_social_sdk README, "Threading"). Everything else talks
-// to it through `PresenceUpdate` messages over an mpsc channel.
-//
-// Rich Presence works without OAuth/Client::Connect() as long as a Discord
-// desktop client is running locally — see "Rich Presence Without
-// Authentication" in Discord's docs. We only ever call SetApplicationId +
-// UpdateRichPresence, nothing that needs a signed-in session.
-
-use std::sync::mpsc::{Receiver, TryRecvError};
-use std::thread;
-use std::time::Duration;
-
-use discord_social_sdk::{
- activity::{Activity, ActivityAssets, ActivityTimestamps},
- enums::ActivityType,
- Client,
-};
-
-pub enum PresenceUpdate {
- NowPlaying {
- title: String,
- artist: String,
- album: Option<String>,
- duration_s: Option<f64>,
- // Public, absolute URL of the album cover. Discord fetches this from
- // its own servers to render the large presence image, so it must be
- // reachable without auth (see the public /cover route). Empty/None
- // just falls back to the app's default icon.
- cover_url: Option<String>,
- // Current playback position in seconds, so a resumed track's elapsed
- // bar starts from the right place instead of from zero.
- position_s: Option<f64>,
- // When false (paused) we omit the timestamps entirely, which stops
- // Discord from animating the elapsed/remaining bar past where it is.
- playing: bool,
- },
- Clear,
-}
-
-pub fn spawn(application_id: u64, rx: Receiver<PresenceUpdate>) {
- thread::spawn(move || {
- let mut client = Client::new();
- client.set_application_id(application_id);
-
- loop {
- discord_social_sdk::run_callbacks();
-
- match rx.try_recv() {
- Ok(PresenceUpdate::NowPlaying { title, artist, album, duration_s, cover_url, position_s, playing }) => {
- let mut activity = Activity::new();
- activity.set_activity_type(ActivityType::Listening);
- activity.set_details(Some(&title));
-
- // Borrow album (as_deref) rather than move it — it's also
- // used below as the large-image tooltip.
- let state = match album.as_deref() {
- Some(album) => format!("{artist} — {album}"),
- None => artist.clone(),
- };
- activity.set_state(Some(&state));
-
- // Only show the elapsed/remaining bar while actually
- // playing. When paused we omit timestamps so Discord stops
- // advancing the bar (it would otherwise keep ticking toward
- // `end` even though playback is stopped).
- if playing {
- if let Some(duration_s) = duration_s {
- let now_ms = std::time::SystemTime::now()
- .duration_since(std::time::UNIX_EPOCH)
- .unwrap_or_default()
- .as_millis() as u64;
- // Anchor `start` back by the current position so the
- // bar reflects real elapsed time on a resumed track.
- let position_ms = (position_s.unwrap_or(0.0).max(0.0) * 1000.0) as u64;
- let start_ms = now_ms.saturating_sub(position_ms);
- let end_ms = start_ms + (duration_s * 1000.0) as u64;
-
- let mut timestamps = ActivityTimestamps::new();
- timestamps.set_start(start_ms);
- timestamps.set_end(end_ms);
- activity.set_timestamps(Some(×tamps));
- }
- }
-
- // Album art as the large presence image. large_image takes
- // an external URL directly (per the SDK docs); large_text
- // is the hover tooltip (album, or the title as a fallback).
- if let Some(cover) = cover_url.as_deref().filter(|u| !u.is_empty()) {
- let mut assets = ActivityAssets::new();
- assets.set_large_image(Some(cover));
- let tooltip = album.as_deref().unwrap_or(title.as_str());
- // The SDK requires large_text to be 2-128 chars.
- if tooltip.chars().count() >= 2 {
- assets.set_large_text(Some(tooltip));
- }
- activity.set_assets(Some(&assets));
- }
-
- client.update_rich_presence(&mut activity, |_result| {});
- }
- Ok(PresenceUpdate::Clear) => {
- client.clear_rich_presence();
- }
- Err(TryRecvError::Empty) => {}
- Err(TryRecvError::Disconnected) => break,
- }
-
- thread::sleep(Duration::from_millis(16));
- }
- });
-}
diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rs
deleted file mode 100644
index 65e0335..0000000
--- a/apps/desktop/src-tauri/src/lib.rs
+++ /dev/null
@@ -1,151 +0,0 @@
-// Shared entry point for every platform.
-//
-// Desktop launches through `main.rs`, which just calls `run()`. Mobile
-// (Android/iOS) has no `main()` — the generated Gradle/Xcode project loads
-// this crate as a library and calls `run()` via the `mobile_entry_point`
-// macro. Keeping the whole app in `run()` means both paths share one setup.
-//
-// Discord Rich Presence is desktop-only: the Discord Social SDK ships no
-// Android/iOS build (see Cargo.toml), so the `discord` module, its state,
-// and its real commands are compiled only under `cfg(desktop)`. Mobile gets
-// no-op command stubs with the same names, so the frontend's `invoke()`
-// calls resolve cleanly instead of rejecting.
-
-#[cfg(desktop)]
-mod discord;
-
-#[cfg(desktop)]
-use std::sync::mpsc::{
- self,
- Sender,
-};
-#[cfg(desktop)]
-use std::sync::Mutex;
-
-#[cfg(desktop)]
-use tauri::State;
-
-#[cfg(desktop)]
-use discord::PresenceUpdate;
-
-// Doughmination Music Discord application ID (Rich Presence).
-#[cfg(desktop)]
-const DISCORD_APPLICATION_ID: u64 = 1531598882595930143;
-
-#[cfg(desktop)]
-struct DiscordHandle(Mutex<Sender<PresenceUpdate>>);
-
-#[cfg(desktop)]
-#[tauri::command]
-fn set_now_playing(
- title: String,
- artist: String,
- album: Option<String>,
- #[allow(non_snake_case)] durationS: Option<f64>,
- #[allow(non_snake_case)] coverUrl: Option<String>,
- #[allow(non_snake_case)] positionS: Option<f64>,
- playing: bool,
- handle: State<DiscordHandle>,
-) -> Result<(), String> {
- handle
- .0
- .lock()
- .map_err(|e| e.to_string())?
- .send(PresenceUpdate::NowPlaying {
- title,
- artist,
- album,
- duration_s: durationS,
- cover_url: coverUrl,
- position_s: positionS,
- playing,
- })
- .map_err(|e| e.to_string())
-}
-
-#[cfg(desktop)]
-#[tauri::command]
-fn clear_presence(handle: State<DiscordHandle>) -> Result<(), String> {
- handle
- .0
- .lock()
- .map_err(|e| e.to_string())?
- .send(PresenceUpdate::Clear)
- .map_err(|e| e.to_string())
-}
-
-// Mobile stubs — keep the command names AND argument names so `invoke()`
-// from the shared web frontend deserializes and resolves cleanly (Tauri
-// matches the JS payload keys to these parameter identifiers). Presence is
-// a desktop-only nicety, so the bodies just succeed and do nothing.
-#[cfg(not(desktop))]
-#[tauri::command]
-#[allow(unused_variables)]
-fn set_now_playing(
- title: String,
- artist: String,
- album: Option<String>,
- #[allow(non_snake_case)] durationS: Option<f64>,
- #[allow(non_snake_case)] coverUrl: Option<String>,
- #[allow(non_snake_case)] positionS: Option<f64>,
- playing: bool,
-) -> Result<(), String> {
- Ok(())
-}
-
-#[cfg(not(desktop))]
-#[tauri::command]
-fn clear_presence() -> Result<(), String> {
- Ok(())
-}
-
-#[cfg_attr(mobile, tauri::mobile_entry_point)]
-pub fn run() {
- // `mut` is only used on Windows/Linux (single-instance); harmless elsewhere.
- #[allow(unused_mut)]
- let mut builder = tauri::Builder::default();
-
- // Windows/Linux deliver a deeplink by launching a *second* process with
- // the URL as an argument. single-instance (with its `deep-link` feature)
- // catches that, focuses the existing window, and hands the URL to the
- // deep-link plugin so the frontend's onOpenUrl handler fires as usual.
- // Must be registered before any other plugin.
- #[cfg(any(target_os = "windows", target_os = "linux"))]
- {
- builder = builder.plugin(tauri_plugin_single_instance::init(|app, _argv, _cwd| {
- use tauri::Manager;
- if let Some(w) = app.get_webview_window("main") {
- let _ = w.set_focus();
- }
- }));
- }
-
- builder
- .plugin(tauri_plugin_opener::init())
- .plugin(tauri_plugin_deep_link::init())
- .setup(|_app| {
- // In dev there's no installer to register the scheme, so do it at
- // runtime. No-op / harmless on macOS, where Info.plist handles it,
- // and on mobile, where the manifest/Info.plist do.
- #[cfg(any(target_os = "windows", target_os = "linux"))]
- {
- use tauri_plugin_deep_link::DeepLinkExt;
- let _ = _app.deep_link().register_all();
- }
-
- // Spin up the Discord presence thread and hand the frontend a
- // channel to it. Desktop-only — mobile has no Discord SDK.
- #[cfg(desktop)]
- {
- use tauri::Manager;
- let (tx, rx) = mpsc::channel::<PresenceUpdate>();
- discord::spawn(DISCORD_APPLICATION_ID, rx);
- _app.manage(DiscordHandle(Mutex::new(tx)));
- }
-
- Ok(())
- })
- .invoke_handler(tauri::generate_handler![set_now_playing, clear_presence])
- .run(tauri::generate_context!())
- .expect("error while running tauri application");
-}
diff --git a/apps/desktop/src-tauri/src/main.rs b/apps/desktop/src-tauri/src/main.rs
deleted file mode 100644
index 5ca9157..0000000
--- a/apps/desktop/src-tauri/src/main.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// Desktop binary entry point. All the real wiring lives in `run()` (lib.rs)
-// so desktop and mobile share one setup — see the note there. Mobile never
-// builds this file; it calls `run()` directly through the generated project.
-
-#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
-
-fn main() {
- doughmination_music_lib::run()
-}
diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json
deleted file mode 100644
index d9ab731..0000000
--- a/apps/desktop/src-tauri/tauri.conf.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "$schema": "https://schema.tauri.app/config/2",
- "productName": "Doughmination Music",
- "version": "1.0.0",
- "identifier": "uk.doughmination.music.desktop",
- "build": {
- "frontendDist": "https://doughmination.me",
- "devUrl": "https://doughmination.me",
- "beforeDevCommand": "",
- "beforeBuildCommand": ""
- },
- "app": {
- "windows": [
- {
- "title": "Doughmination Music",
- "width": 1100,
- "height": 720,
- "minWidth": 720,
- "minHeight": 480
- }
- ],
- "security": {
- "csp": null
- }
- },
- "plugins": {
- "deep-link": {
- "mobile": [
- {
- "scheme": ["doughmination"],
- "appLink": false
- }
- ],
- "desktop": {
- "schemes": ["doughmination"]
- }
- }
- },
- "bundle": {
- "active": true,
- "icon": [
- "icons/32x32.png",
- "icons/128x128.png",
- "icons/[email protected]",
- "icons/icon.icns",
- "icons/icon.ico"
- ],
- "macOS": {
- "frameworks": [
- "discord_social_sdk/lib/release/libdiscord_partner_sdk.dylib"
- ]
- }
- }
-}
diff --git a/apps/desktop/src-tauri/tauri.windows.conf.json b/apps/desktop/src-tauri/tauri.windows.conf.json
deleted file mode 100644
index e2131dd..0000000
--- a/apps/desktop/src-tauri/tauri.windows.conf.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "$schema": "https://schema.tauri.app/config/2",
- "bundle": {
- "resources": [
- "discord_social_sdk/bin/release/discord_partner_sdk.dll"
- ]
- }
-}
diff --git a/apps/desktop/src/discord.ts b/apps/desktop/src/discord.ts
new file mode 100644
index 0000000..fb512cb
--- /dev/null
+++ b/apps/desktop/src/discord.ts
@@ -0,0 +1,96 @@
+// Discord Rich Presence over the local Discord IPC socket. Ported 1:1 from the
+// old Rust `discord.rs` (Discord Social SDK) — same payload, no OAuth, no
+// native SDK. `@xhayper/discord-rpc` handles the per-platform pipe/socket
+// discovery; we only ever SetActivity / ClearActivity.
+//
+// Everything here is best-effort: if Discord isn't running the connect just
+// fails and we retry on the next update. Nothing throws to the caller.
+
+import { Client } from "@xhayper/discord-rpc";
+
+// Doughmination Music Discord application id (Rich Presence).
+const CLIENT_ID = "1531598882595930143";
+const LISTENING = 2; // discord ActivityType.Listening
+
+export type NowPlaying = {
+ title: string;
+ artist: string;
+ album: string | null;
+ durationS: number | null;
+ coverUrl: string | null;
+ positionS: number;
+ playing: boolean;
+};
+
+let client: Client | null = null;
+let connected = false;
+let connecting: Promise<boolean> | null = null;
+
+async function ensureConnected(): Promise<boolean> {
+ if (connected && client) return true;
+ if (connecting) return connecting;
+
+ connecting = (async () => {
+ try {
+ const c = new Client({ clientId: CLIENT_ID });
+ c.on("disconnected", () => {
+ connected = false;
+ });
+ await c.login();
+ client = c;
+ connected = true;
+ return true;
+ } catch {
+ client = null;
+ connected = false;
+ return false;
+ } finally {
+ connecting = null;
+ }
+ })();
+
+ return connecting;
+}
+
+export async function setNowPlaying(np: NowPlaying): Promise<void> {
+ if (!(await ensureConnected()) || !client?.user) return;
+
+ const state = np.album ? `${np.artist} — ${np.album}` : np.artist;
+ const activity: Record<string, unknown> = {
+ type: LISTENING,
+ details: np.title,
+ state,
+ instance: false,
+ };
+
+ // Elapsed/remaining bar only while actually playing — anchor `start` back by
+ // the current position so a resumed track shows real elapsed time.
+ if (np.playing && np.durationS && np.durationS > 0) {
+ const start = Date.now() - Math.max(0, np.positionS) * 1000;
+ activity.startTimestamp = Math.round(start);
+ activity.endTimestamp = Math.round(start + np.durationS * 1000);
+ }
+
+ if (np.coverUrl) {
+ activity.largeImageKey = np.coverUrl;
+ const tooltip = np.album ?? np.title;
+ if (tooltip.length >= 2 && tooltip.length <= 128) {
+ activity.largeImageText = tooltip;
+ }
+ }
+
+ try {
+ await client.user.setActivity(activity as Parameters<typeof client.user.setActivity>[0]);
+ } catch {
+ connected = false; // drop the connection so the next update reconnects
+ }
+}
+
+export async function clear(): Promise<void> {
+ if (!connected || !client?.user) return;
+ try {
+ await client.user.clearActivity();
+ } catch {
+ connected = false;
+ }
+}
diff --git a/apps/desktop/src/ipc.ts b/apps/desktop/src/ipc.ts
new file mode 100644
index 0000000..f0304e5
--- /dev/null
+++ b/apps/desktop/src/ipc.ts
@@ -0,0 +1,18 @@
+// The renderer (the loaded web app, via preload.ts) can reach exactly these
+// four things and nothing else.
+
+import { ipcMain, shell } from "electron";
+
+import { clear, setNowPlaying, type NowPlaying } from "./discord";
+import { getServerUrl } from "./settings";
+
+export function registerIpc(): void {
+ ipcMain.handle("presence:set", (_e, np: NowPlaying) => setNowPlaying(np));
+ ipcMain.handle("presence:clear", () => clear());
+ ipcMain.handle("settings:server-url", () => getServerUrl());
+ ipcMain.handle("shell:open-external", (_e, url: string) => {
+ // Only http(s) — never let the page hand us a file:// or custom scheme.
+ if (/^https?:\/\//i.test(url)) return shell.openExternal(url);
+ return undefined;
+ });
+}
diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts
new file mode 100644
index 0000000..5e532b6
--- /dev/null
+++ b/apps/desktop/src/main.ts
@@ -0,0 +1,208 @@
+// Electron shell for Doughmination Music. Replaces the old Tauri/Rust shell:
+// a single window pointed at the live web player, plus the two things a plain
+// browser tab can't do —
+// * catch the doughmination://auth/callback deep link from the SSO round trip
+// * push Discord Rich Presence (see discord.ts)
+// Everything else (library, queue, playback, UI) is the web app, unchanged.
+
+import { app, BrowserWindow, Menu, shell, ipcMain, type MenuItemConstructorOptions } from "electron";
+import { join } from "node:path";
+
+import { registerIpc } from "./ipc";
+import { getServerUrl, setServerUrl } from "./settings";
+
+const isDev = !app.isPackaged;
+let win: BrowserWindow | null = null;
+
+// Deep links that arrive before the window/page is ready are queued and
+// replayed once it has loaded.
+let pageReady = false;
+const pendingDeepLinks: string[] = [];
+
+function deliverDeepLink(url: string): void {
+ if (!url.startsWith("doughmination://")) return;
+ if (pageReady && win) win.webContents.send("deep-link", url);
+ else pendingDeepLinks.push(url);
+}
+
+// Pull a doughmination:// URL out of a process argv list (Windows/Linux deliver
+// the deep link as a launch argument of a second process).
+function deepLinkFromArgv(argv: string[]): string | undefined {
+ return argv.find((a) => a.startsWith("doughmination://"));
+}
+
+if (!app.requestSingleInstanceLock()) {
+ app.quit();
+} else {
+ app.on("second-instance", (_e, argv) => {
+ if (win) {
+ if (win.isMinimized()) win.restore();
+ win.focus();
+ }
+ const link = deepLinkFromArgv(argv);
+ if (link) deliverDeepLink(link);
+ });
+
+ // macOS delivers the deep link through this event, not argv.
+ app.on("open-url", (event, url) => {
+ event.preventDefault();
+ deliverDeepLink(url);
+ });
+
+ app.whenReady().then(() => {
+ app.setAsDefaultProtocolClient("doughmination");
+ registerIpc();
+ buildMenu();
+ createWindow();
+
+ // Windows/Linux: the deep link may be in this very process's argv (app
+ // launched by the browser handing off the callback URL).
+ const link = deepLinkFromArgv(process.argv);
+ if (link) deliverDeepLink(link);
+
+ app.on("activate", () => {
+ if (BrowserWindow.getAllWindows().length === 0) createWindow();
+ });
+ });
+
+ app.on("window-all-closed", () => {
+ if (process.platform !== "darwin") app.quit();
+ });
+}
+
+function createWindow(): void {
+ win = new BrowserWindow({
+ width: 1100,
+ height: 720,
+ minWidth: 720,
+ minHeight: 480,
+ title: "Doughmination Music",
+ backgroundColor: "#0a0b10",
+ webPreferences: {
+ preload: join(__dirname, "preload.js"),
+ contextIsolation: true,
+ nodeIntegration: false,
+ sandbox: true,
+ },
+ });
+
+ // Outbound links (and the SSO "open in your browser" click) leave the app.
+ win.webContents.setWindowOpenHandler(({ url }) => {
+ if (/^https?:\/\//i.test(url)) shell.openExternal(url);
+ return { action: "deny" };
+ });
+
+ win.webContents.on("did-finish-load", () => {
+ pageReady = true;
+ for (const url of pendingDeepLinks.splice(0)) win!.webContents.send("deep-link", url);
+ });
+
+ win.on("closed", () => {
+ win = null;
+ pageReady = false;
+ });
+
+ void win.loadURL(getServerUrl());
+}
+
+function buildMenu(): void {
+ const template: MenuItemConstructorOptions[] = [
+ ...(process.platform === "darwin"
+ ? [{ role: "appMenu" as const }]
+ : []),
+ {
+ label: "File",
+ submenu: [
+ {
+ label: "Set Server URL…",
+ click: () => void promptServerUrl(),
+ },
+ { type: "separator" as const },
+ { role: "quit" as const },
+ ],
+ },
+ {
+ label: "View",
+ submenu: [
+ { role: "reload" as const },
+ { role: "forceReload" as const },
+ ...(isDev ? [{ role: "toggleDevTools" as const }] : []),
+ { type: "separator" as const },
+ { role: "resetZoom" as const },
+ { role: "zoomIn" as const },
+ { role: "zoomOut" as const },
+ { type: "separator" as const },
+ { role: "togglefullscreen" as const },
+ ],
+ },
+ { role: "windowMenu" },
+ ];
+ Menu.setApplicationMenu(Menu.buildFromTemplate(template));
+}
+
+// Tiny modal input window — Electron's dialog has no text field, so this is
+// our own ~1-screen HTML form. It's local content, so nodeIntegration here is
+// safe (unlike the remote page the main window loads).
+function promptServerUrl(): Promise<void> {
+ return new Promise((resolve) => {
+ const current = getServerUrl();
+ const prompt = new BrowserWindow({
+ width: 460,
+ height: 180,
+ parent: win ?? undefined,
+ modal: true,
+ resizable: false,
+ minimizable: false,
+ maximizable: false,
+ title: "Server URL",
+ backgroundColor: "#12141c",
+ webPreferences: { nodeIntegration: true, contextIsolation: false },
+ });
+ prompt.setMenuBarVisibility(false);
+
+ const html = `<!doctype html><meta charset="utf-8">
+<style>
+ body{font:13px system-ui,sans-serif;background:#12141c;color:#f4f6fb;margin:0;padding:16px}
+ input{width:100%;box-sizing:border-box;padding:8px;margin:8px 0 12px;border:1px solid #232838;
+ border-radius:8px;background:#1b1e2a;color:#f4f6fb}
+ .row{display:flex;gap:8px;justify-content:flex-end}
+ button{padding:7px 14px;border-radius:8px;border:1px solid #232838;background:#1b1e2a;color:#f4f6fb;cursor:pointer}
+ button.primary{background:#f5a9b8;border-color:#f5a9b8;color:#0a0b10;font-weight:700}
+</style>
+<label for="u">Load the player from:</label>
+<input id="u" value="${current.replace(/"/g, """)}" spellcheck="false" autofocus>
+<div class="row">
+ <button id="cancel">Cancel</button>
+ <button id="ok" class="primary">Save & reload</button>
+</div>
+<script>
+ const { ipcRenderer } = require("electron");
+ const u = document.getElementById("u");
+ u.select();
+ document.getElementById("cancel").onclick = () => ipcRenderer.send("prompt:cancel");
+ document.getElementById("ok").onclick = () => ipcRenderer.send("prompt:submit", u.value);
+ addEventListener("keydown", (e) => {
+ if (e.key === "Enter") ipcRenderer.send("prompt:submit", u.value);
+ if (e.key === "Escape") ipcRenderer.send("prompt:cancel");
+ });
+</script>`;
+ void prompt.loadURL("data:text/html;charset=utf-8," + encodeURIComponent(html));
+
+ const done = () => {
+ ipcMain.removeAllListeners("prompt:submit");
+ ipcMain.removeAllListeners("prompt:cancel");
+ if (!prompt.isDestroyed()) prompt.close();
+ resolve();
+ };
+ ipcMain.once("prompt:cancel", done);
+ ipcMain.once("prompt:submit", (_e, value: string) => {
+ const v = String(value ?? "").trim();
+ if (v) {
+ setServerUrl(v);
+ win?.loadURL(getServerUrl());
+ }
+ done();
+ });
+ prompt.on("closed", () => resolve());
+ });
+}
diff --git a/apps/desktop/src/preload.ts b/apps/desktop/src/preload.ts
new file mode 100644
index 0000000..9327bfd
--- /dev/null
+++ b/apps/desktop/src/preload.ts
@@ -0,0 +1,24 @@
+// The bridge the loaded web app sees as `window.dmndDesktop`. Mirrors what the
+// old Tauri build exposed via `invoke(...)` / the deep-link plugin. Context
+// isolation is on, so this whitelist is the entire native surface the remote
+// page can reach.
+
+import { contextBridge, ipcRenderer } from "electron";
+
+import type { NowPlaying } from "./discord";
+
+const api = {
+ setNowPlaying: (np: NowPlaying): Promise<void> => ipcRenderer.invoke("presence:set", np),
+ clearPresence: (): Promise<void> => ipcRenderer.invoke("presence:clear"),
+ openExternal: (url: string): Promise<void> => ipcRenderer.invoke("shell:open-external", url),
+ serverUrl: (): Promise<string> => ipcRenderer.invoke("settings:server-url"),
+ // The system browser bounced a doughmination://auth/callback?code=… back to
+ // the app; the main process forwards it here.
+ onDeepLink: (cb: (url: string) => void): void => {
+ ipcRenderer.on("deep-link", (_e, url: string) => cb(url));
+ },
+};
+
+contextBridge.exposeInMainWorld("dmndDesktop", api);
+
+export type DmndDesktop = typeof api;
diff --git a/apps/desktop/src/settings.ts b/apps/desktop/src/settings.ts
new file mode 100644
index 0000000..63aece0
--- /dev/null
+++ b/apps/desktop/src/settings.ts
@@ -0,0 +1,46 @@
+// Where the app points its window. The desktop app is a thin shell over the
+// live web player, so this is just a URL:
+//
+// DMND_SERVER_URL env var (highest priority; for dev / testing)
+// <userData>/settings.json (persisted "Set Server URL…" choice)
+// DEFAULT_URL (the hosted instance)
+
+import { app } from "electron";
+import { readFileSync, writeFileSync } from "node:fs";
+import { join } from "node:path";
+
+export const DEFAULT_URL = "https://doughmination.me";
+
+function settingsPath(): string {
+ return join(app.getPath("userData"), "settings.json");
+}
+
+function readFile(): Record<string, unknown> {
+ try {
+ return JSON.parse(readFileSync(settingsPath(), "utf8")) as Record<string, unknown>;
+ } catch {
+ return {};
+ }
+}
+
+export function getServerUrl(): string {
+ const fromEnv = process.env.DMND_SERVER_URL?.trim();
+ if (fromEnv) return normalize(fromEnv);
+ const stored = readFile().serverUrl;
+ if (typeof stored === "string" && stored.trim()) return normalize(stored);
+ return DEFAULT_URL;
+}
+
+export function setServerUrl(url: string): void {
+ const value = normalize(url);
+ const data = readFile();
+ data.serverUrl = value;
+ writeFileSync(settingsPath(), JSON.stringify(data, null, 2));
+}
+
+// Trim, add a scheme if missing, drop a trailing slash.
+function normalize(url: string): string {
+ let u = url.trim();
+ if (!/^https?:\/\//i.test(u)) u = `https://${u}`;
+ return u.replace(/\/+$/, "");
+}
diff --git a/apps/desktop/tsconfig.json b/apps/desktop/tsconfig.json
new file mode 100644
index 0000000..fe9a15c
--- /dev/null
+++ b/apps/desktop/tsconfig.json
@@ -0,0 +1,16 @@
+{
+ "extends": "../../tsconfig.base.json",
+ "compilerOptions": {
+ "lib": ["ESNext"],
+ "types": ["node", "electron"],
+ "module": "NodeNext",
+ "moduleResolution": "NodeNext",
+ "outDir": "dist",
+ "rootDir": "src",
+ "noEmit": false,
+ "allowImportingTsExtensions": false,
+ "verbatimModuleSyntax": false,
+ "sourceMap": true
+ },
+ "include": ["src"]
+}
diff --git a/apps/web/src/desktop.ts b/apps/web/src/desktop.ts
deleted file mode 100644
index 3a76532..0000000
--- a/apps/web/src/desktop.ts
+++ /dev/null
@@ -1,207 +0,0 @@
-// Everything that's different about running inside the Tauri desktop shell
-// vs a plain browser tab, in one place. The web app itself never checks
-// `window.__TAURI__` anywhere else — it calls these two functions and
-// they no-op in the browser.
-
-import {
- configureApiBase,
- configureAuthToken,
- startNativeLogin,
- completeNativeLogin,
- establishSessionCookie,
- absoluteApiUrl,
- type Song,
-} from "@musicapp/shared";
-
-declare global {
- interface Window {
- __TAURI__?: unknown;
- __TAURI_INTERNALS__?: unknown;
- }
-}
-
-const SERVER_URL_KEY = "music:desktop:serverUrl";
-const TOKEN_KEY = "music:desktop:token";
-const VERIFIER_KEY = "music:desktop:pkceVerifier";
-const REDIRECT_URI = "doughmination://auth/callback";
-
-// Tauri v2 does NOT inject `window.__TAURI__` unless `withGlobalTauri` is on,
-// but `__TAURI_INTERNALS__` is always present in the webview — that's the
-// reliable signal. (Without this, isDesktop was false and the app fell back
-// to the plain web login link, navigating the webview straight to SSO.)
-export const isDesktop =
- typeof window !== "undefined" &&
- (!!window.__TAURI__ || !!window.__TAURI_INTERNALS__);
-
-// True when the frontend is served from Tauri's own bundled content
-// (tauri://localhost, or http://tauri.localhost on Windows) rather than from
-// a real https origin. Only then is the API cross-origin and a base URL
-// needed. When the app loads a remote devUrl (e.g. https://doughmination.me)
-// the webview origin already IS the server, so calls are same-origin.
-function isLocalBundledOrigin(): boolean {
- if (typeof location === "undefined") return true;
- return location.protocol === "tauri:" || location.hostname === "tauri.localhost";
-}
-
-// Call once, before the first api.* call. Web is same-origin and this is a
-// no-op there. A remote-loaded desktop webview is *also* same-origin with the
-// API, so it skips the prompt too. Only a locally-bundled desktop build needs
-// to be told where its self-hosted server lives.
-export function initDesktopBridge(): void {
- if (!isDesktop) return;
-
- if (isLocalBundledOrigin()) {
- let serverUrl = "";
- try {
- serverUrl = localStorage.getItem(SERVER_URL_KEY) ?? "";
- } catch {
- /* ignore */
- }
-
- if (!serverUrl) {
- serverUrl = window.prompt("Server URL (e.g. https://music.example.com)") ?? "";
- try {
- if (serverUrl) localStorage.setItem(SERVER_URL_KEY, serverUrl);
- } catch {
- /* ignore */
- }
- }
-
- if (serverUrl) configureApiBase(serverUrl);
- }
-
- // Restore a previously-issued bearer token so the session survives restarts.
- // (localStorage is fine for a self-hosted desktop app; swap for the OS
- // keychain via tauri-plugin-stronghold if you want at-rest encryption.)
- try {
- const token = localStorage.getItem(TOKEN_KEY);
- if (token) configureAuthToken(token);
- } catch {
- /* ignore */
- }
-}
-
-// True once a token is stored — lets the UI skip the login screen on boot.
-export function hasDesktopToken(): boolean {
- try {
- return isDesktop && Boolean(localStorage.getItem(TOKEN_KEY));
- } catch {
- return false;
- }
-}
-
-// Kick off sign-in: mint PKCE, stash the verifier, and open the login page in
-// the user's *default browser* (not this webview — that's the whole point).
-export async function startDesktopLogin(): Promise<void> {
- if (!isDesktop) return;
- const { url, verifier } = await startNativeLogin({ redirect: REDIRECT_URI });
- try {
- sessionStorage.setItem(VERIFIER_KEY, verifier);
- } catch {
- /* ignore */
- }
- const { openUrl } = await import("@tauri-apps/plugin-opener");
- await openUrl(url);
-}
-
-// Register the deeplink handler once at startup. When the browser bounces back
-// to doughmination://auth/callback?code=..., trade the code for a token,
-// persist it, and fire `onLoggedIn` so the app can re-render as signed in.
-export async function initDesktopAuth(onLoggedIn: () => void): Promise<void> {
- if (!isDesktop) return;
-
- // Restored a token this launch? Make sure the webview also holds the
- // same-origin session cookie, so media (<audio>/<img>) authenticates. Awaited
- // here so it's in place before boot() kicks off any media requests.
- if (hasDesktopToken()) {
- try {
- await establishSessionCookie();
- } catch {
- /* ignore — API calls still work via the bearer token */
- }
- }
-
- const { onOpenUrl } = await import("@tauri-apps/plugin-deep-link");
- await onOpenUrl(async (urls) => {
- for (const raw of urls) {
- let code: string | null = null;
- try {
- code = new URL(raw).searchParams.get("code");
- } catch {
- /* not a URL we care about */
- }
- if (!code) continue;
-
- let verifier = "";
- try {
- verifier = sessionStorage.getItem(VERIFIER_KEY) ?? "";
- } catch {
- /* ignore */
- }
- if (!verifier) continue; // no login in flight on this device
-
- try {
- const token = await completeNativeLogin(code, verifier);
- try {
- localStorage.setItem(TOKEN_KEY, token);
- sessionStorage.removeItem(VERIFIER_KEY);
- } catch {
- /* ignore */
- }
- // Drop the same-origin cookie so media requests authenticate too.
- try {
- await establishSessionCookie();
- } catch {
- /* ignore */
- }
- onLoggedIn();
- } catch (err) {
- console.error("native login exchange failed", err);
- }
- return; // handled
- }
- });
-}
-
-// Clear the stored token on logout so the next boot shows the login screen.
-export function clearDesktopToken(): void {
- try {
- localStorage.removeItem(TOKEN_KEY);
- } catch {
- /* ignore */
- }
-}
-
-// Forwards the currently playing track to the Rust side, which owns the
-// actual Discord Social SDK client. Fire-and-forget: presence is cosmetic
-// and should never block or break playback.
-//
-// `playback` carries the live play/pause state and current position so Rust
-// can build (or omit) the elapsed-time bar: paused → no bar, and resuming
-// mid-track → the bar starts from the right place instead of from zero.
-export async function syncDiscordPresence(
- song: Song | null,
- playback?: { playing: boolean; positionS: number },
-): Promise<void> {
- if (!isDesktop) return;
- try {
- const { invoke } = await import("@tauri-apps/api/core");
- if (!song) {
- await invoke("clear_presence");
- return;
- }
- // Absolute URL so Discord (which fetches it server-side) can load the art.
- const coverUrl = song.coverUrl ? absoluteApiUrl(song.coverUrl) : null;
- await invoke("set_now_playing", {
- title: song.title,
- artist: song.artist,
- album: song.album,
- durationS: song.durationS,
- coverUrl,
- positionS: playback?.positionS ?? 0,
- playing: playback?.playing ?? true,
- });
- } catch {
- /* best-effort — never blocks playback */
- }
-}
diff --git a/bun.lock b/bun.lock
index ea5146a..c2794be 100644
--- a/bun.lock
+++ b/bun.lock
@@ -8,44 +8,37 @@
"@dotenvx/dotenvx": "^2.21.0",
},
"devDependencies": {
- "@tauri-apps/cli": "^2.11.4",
"@types/bun": "^1.4.0",
"concurrently": "^10.0.5",
"typescript": "^7.0.2",
},
},
- "apps/server": {
- "name": "@musicapp/server",
- "version": "0.1.0",
+ "apps/desktop": {
+ "name": "@musicapp/desktop",
+ "version": "1.0.0",
"dependencies": {
- "@musicapp/shared": "workspace:*",
- "hono": "^4.13.3",
- "ioredis": "^6.0.0",
- "jose": "^6.2.9",
- "music-metadata": "^11.15.0",
- "postgres": "^3.4.9",
+ "@xhayper/discord-rpc": "^1.2.1",
},
"devDependencies": {
- "@types/bun": "^1.4.0",
+ "@types/node": "^22.10.0",
+ "electron": "^33.2.0",
+ "electron-builder": "^25.1.8",
"typescript": "^7.0.2",
},
},
- "apps/web": {
- "name": "@musicapp/web",
+ "web/client": {
+ "name": "@musicapp/client",
"version": "0.1.0",
"dependencies": {
"@musicapp/player": "workspace:*",
"@musicapp/shared": "workspace:*",
- "@tauri-apps/api": "^2",
- "@tauri-apps/plugin-deep-link": "^2",
- "@tauri-apps/plugin-opener": "^2",
"music-metadata": "^11.15.0",
},
"devDependencies": {
"typescript": "^7.0.2",
},
},
- "packages/player": {
+ "web/player": {
"name": "@musicapp/player",
"version": "0.1.0",
"dependencies": {
@@ -55,7 +48,23 @@
"typescript": "^7.0.2",
},
},
- "packages/shared": {
+ "web/server": {
+ "name": "@musicapp/server",
+ "version": "0.1.0",
+ "dependencies": {
+ "@musicapp/shared": "workspace:*",
+ "hono": "^4.13.3",
+ "ioredis": "^6.0.0",
+ "jose": "^6.2.9",
+ "music-metadata": "^11.15.0",
+ "postgres": "^3.4.9",
+ },
+ "devDependencies": {
+ "@types/bun": "^1.4.0",
+ "typescript": "^7.0.2",
+ },
+ },
+ "web/shared": {
"name": "@musicapp/shared",
"version": "0.1.0",
"devDependencies": {
@@ -64,61 +73,99 @@
},
},
"packages": {
+ "7zip-bin": ["[email protected]", "", {}, "sha512-ukTPVhqG4jNzMro2qA9HSCSSVJN3aN7tlb+hfqYCt3ER0yWroeA2VR38MNrOHLQ/cVj+DaIMad0kFCtWWowh/A=="],
+
"@borewit/text-codec": ["@borewit/[email protected]", "", {}, "sha512-DDaRehssg1aNrH4+2hnj1B7vnUGEjU6OIlyRdkMd0aUdIUvKXrJfXsy8LVtXAy7DRvYVluWbMspsRhz2lcW0mQ=="],
+ "@develar/schema-utils": ["@develar/[email protected]", "", { "dependencies": { "ajv": "^6.12.0", "ajv-keywords": "^3.4.1" } }, "sha512-0cp4PsWQ/9avqTVMCtZ+GirikIA36ikvjtHweU4/j8yLtgObI0+JUPhYFScgwlteveGB1rt3Cm8UhN04XayDig=="],
+
+ "@discordjs/collection": ["@discordjs/[email protected]", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
+
+ "@discordjs/rest": ["@discordjs/[email protected]", "", { "dependencies": { "@discordjs/collection": "^2.1.1", "@discordjs/util": "^1.2.0", "@sapphire/async-queue": "^1.5.3", "@sapphire/snowflake": "^3.5.5", "@vladfrangu/async_event_emitter": "^2.4.6", "discord-api-types": "^0.38.50", "magic-bytes.js": "^1.13.0", "tslib": "^2.6.3", "undici": "^6.27.0" } }, "sha512-wvOylxNYJkwKjctS/Mn5GP1w9r3/rzyH+ThD1JlAca6zEdlHs8QWBBUQJpU5Q+W6DoIj/Ljh1IPlZs7hTU+UAg=="],
+
+ "@discordjs/util": ["@discordjs/[email protected]", "", { "dependencies": { "discord-api-types": "^0.38.33" } }, "sha512-3LKP7F2+atl9vJFhaBjn4nOaSWahZ/yWjOvA4e5pnXkt2qyXRCHLxoBQy81GFtLGCq7K9lPm9R517M1U+/90Qg=="],
+
"@dotenvx/dotenvx": ["@dotenvx/[email protected]", "", { "dependencies": { "@dotenvx/primitives": "^2.2.0", "@dotenvx/tooling": "^1.0.3", "yocto-spinner": "^1.2.1" }, "bin": { "dx": "src/cli/dotenvx.js", "dotenvx": "src/cli/dotenvx.js" } }, "sha512-BL6yuTmYeK2ak9YLpiBEI4Xuf9YkTJJH+DKK53CqR+TPaF5RiJ4VJpOy1pWjjipbZH9dcpfkkjf/PonJ+zcbFg=="],
"@dotenvx/primitives": ["@dotenvx/[email protected]", "", {}, "sha512-jrUocPqHfGeYuvNKmrzNJCIHW7Xb6m5CuxUESyCHmGlzQByho2EdX45ctfTgWSELeSrcfwuB0Q8iHdlmmlxhUA=="],
"@dotenvx/tooling": ["@dotenvx/[email protected]", "", {}, "sha512-Gd6qQol/ICb4MPRWpiIH56y+pR9AVB7kPBkbhrLSGLtAiF4Qgy+k651/f2pze0Xbm3H5XewbPfIm4y9K+ic30Q=="],
- "@ioredis/commands": ["@ioredis/[email protected]", "", {}, "sha512-vrx0AE/T0h7cRZwfo1M39Cr+ZhZrkf0V8mQN75wucKCxCLD9l/VX6no3gFvrLqD1IlG/1LtzWovqEw3t0Vr9zg=="],
+ "@electron/asar": ["@electron/[email protected]", "", { "dependencies": { "commander": "^5.0.0", "glob": "^7.1.6", "minimatch": "^3.0.4" }, "bin": { "asar": "bin/asar.js" } }, "sha512-i4/rNPRS84t0vSRa2HorerGRXWyF4vThfHesw0dmcWHp+cspK743UanA0suA5Q5y8kzY2y6YKrvbIUn69BCAiA=="],
- "@musicapp/player": ["@musicapp/player@workspace:packages/player"],
+ "@electron/get": ["@electron/[email protected]", "", { "dependencies": { "debug": "^4.1.1", "env-paths": "^2.2.0", "fs-extra": "^8.1.0", "got": "^11.8.5", "progress": "^2.0.3", "semver": "^6.2.0", "sumchecker": "^3.0.1" }, "optionalDependencies": { "global-agent": "^3.0.0" } }, "sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ=="],
- "@musicapp/server": ["@musicapp/server@workspace:apps/server"],
+ "@electron/notarize": ["@electron/[email protected]", "", { "dependencies": { "debug": "^4.1.1", "fs-extra": "^9.0.1", "promise-retry": "^2.0.1" } }, "sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A=="],
- "@musicapp/shared": ["@musicapp/shared@workspace:packages/shared"],
+ "@electron/osx-sign": ["@electron/[email protected]", "", { "dependencies": { "compare-version": "^0.1.2", "debug": "^4.3.4", "fs-extra": "^10.0.0", "isbinaryfile": "^4.0.8", "minimist": "^1.2.6", "plist": "^3.0.5" }, "bin": { "electron-osx-flat": "bin/electron-osx-flat.js", "electron-osx-sign": "bin/electron-osx-sign.js" } }, "sha512-BAfviURMHpmb1Yb50YbCxnOY0wfwaLXH5KJ4+80zS0gUkzDX3ec23naTlEqKsN+PwYn+a1cCzM7BJ4Wcd3sGzw=="],
- "@musicapp/web": ["@musicapp/web@workspace:apps/web"],
+ "@electron/rebuild": ["@electron/[email protected]", "", { "dependencies": { "@malept/cross-spawn-promise": "^2.0.0", "chalk": "^4.0.0", "debug": "^4.1.1", "detect-libc": "^2.0.1", "fs-extra": "^10.0.0", "got": "^11.7.0", "node-abi": "^3.45.0", "node-api-version": "^0.2.0", "node-gyp": "^9.0.0", "ora": "^5.1.0", "read-binary-file-arch": "^1.0.6", "semver": "^7.3.5", "tar": "^6.0.5", "yargs": "^17.0.1" }, "bin": { "electron-rebuild": "lib/cli.js" } }, "sha512-f6596ZHpEq/YskUd8emYvOUne89ij8mQgjYFA5ru25QwbrRO+t1SImofdDv7kKOuWCmVOuU5tvfkbgGxIl3E/w=="],
- "@tauri-apps/api": ["@tauri-apps/[email protected]", "", {}, "sha512-M2FPuYND2m+wh5hfW9ZpSdxMPdEJovPBWwoHJmwUpysTYNHaOkVFN419m/K0LIgjb/7KU2vBgsUepJWugQCvAA=="],
+ "@electron/universal": ["@electron/[email protected]", "", { "dependencies": { "@electron/asar": "^3.2.7", "@malept/cross-spawn-promise": "^2.0.0", "debug": "^4.3.1", "dir-compare": "^4.2.0", "fs-extra": "^11.1.1", "minimatch": "^9.0.3", "plist": "^3.1.0" } }, "sha512-fKpv9kg4SPmt+hY7SVBnIYULE9QJl8L3sCfcBsnqbJwwBwAeTLokJ9TRt9y7bK0JAzIW2y78TVVjvnQEms/yyA=="],
- "@tauri-apps/cli": ["@tauri-apps/[email protected]", "", { "optionalDependencies": { "@tauri-apps/cli-darwin-arm64": "2.11.4", "@tauri-apps/cli-darwin-x64": "2.11.4", "@tauri-apps/cli-linux-arm-gnueabihf": "2.11.4", "@tauri-apps/cli-linux-arm64-gnu": "2.11.4", "@tauri-apps/cli-linux-arm64-musl": "2.11.4", "@tauri-apps/cli-linux-riscv64-gnu": "2.11.4", "@tauri-apps/cli-linux-x64-gnu": "2.11.4", "@tauri-apps/cli-linux-x64-musl": "2.11.4", "@tauri-apps/cli-win32-arm64-msvc": "2.11.4", "@tauri-apps/cli-win32-ia32-msvc": "2.11.4", "@tauri-apps/cli-win32-x64-msvc": "2.11.4" }, "bin": { "tauri": "tauri.js" } }, "sha512-R8xGtMpwyetawSqm9kYOuMmEqkhUbvcUy8n0aNXIxollKBLESUu5f4Fx+64hgASYm1H+jSWq6jCW6zqTnH6hqQ=="],
+ "@gar/promisify": ["@gar/[email protected]", "", {}, "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw=="],
- "@tauri-apps/cli-darwin-arm64": ["@tauri-apps/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-1ryOF3ZhpZ/nemHV5zVwBQBz9jDGKmKPvWPADOhc83ig0P4bMc2iER4NbC6r9sjeIZ6RVQ4g3RZIYvezhcl4TQ=="],
+ "@ioredis/commands": ["@ioredis/[email protected]", "", {}, "sha512-vrx0AE/T0h7cRZwfo1M39Cr+ZhZrkf0V8mQN75wucKCxCLD9l/VX6no3gFvrLqD1IlG/1LtzWovqEw3t0Vr9zg=="],
- "@tauri-apps/cli-darwin-x64": ["@tauri-apps/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-uFsGQAAfuyz1k/yGLmkWfkBlgKAqZfxqlHmLWx81QU27RJWfmbNHCIq8T8w1e+VClleIuZUjpHWfoE4E3DLo3A=="],
+ "@isaacs/cliui": ["@isaacs/[email protected]", "", { "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" } }, "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA=="],
- "@tauri-apps/cli-linux-arm-gnueabihf": ["@tauri-apps/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-IaHZn5CdBL21oUmjiVOS1ctw6Ip1O0pjp70FwOWmYz1myWe0SY96ZIj2FYf7pT0m8bI2h/hrs5ZbEXXh44/MkQ=="],
+ "@malept/cross-spawn-promise": ["@malept/[email protected]", "", { "dependencies": { "cross-spawn": "^7.0.1" } }, "sha512-1DpKU0Z5ThltBwjNySMC14g0CkbyhCaz9FkhxqNsZI6uAPJXFS8cMXlBKo26FJ8ZuW6S9GCMcR9IO5k2X5/9Fg=="],
- "@tauri-apps/cli-linux-arm64-gnu": ["@tauri-apps/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-N41/ukTRVe6XSuUTESuFdGeOW2i7k62tK+6gHK5Kd5/q5RPvvi19GaWAVPPb9u95HSGmTChSolBfzynUsssFaA=="],
+ "@malept/flatpak-bundler": ["@malept/[email protected]", "", { "dependencies": { "debug": "^4.1.1", "fs-extra": "^9.0.0", "lodash": "^4.17.15", "tmp-promise": "^3.0.2" } }, "sha512-9QOtNffcOF/c1seMCDnjckb3R9WHcG34tky+FHpNKKCW0wc/scYLwMtO+ptyGUfMW0/b/n4qRiALlaFHc9Oj7Q=="],
- "@tauri-apps/cli-linux-arm64-musl": ["@tauri-apps/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-v277UnT/fB64xAfSroL5N3Km3tLmvATWqJJw/wRI+g6o+HkeD0slyE7gOhNs1MbjE41R7bQOTxMVoL3aomUJmw=="],
+ "@musicapp/client": ["@musicapp/client@workspace:web/client"],
- "@tauri-apps/cli-linux-riscv64-gnu": ["@tauri-apps/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-qqgNkQ2u1yZHxjhxsZaxUtRDW8dIqIYm33rx/mzwQv0SfY9x1B+iraj8vWeFiXjjSVVhEMepXSOts1TqPzvXNQ=="],
+ "@musicapp/desktop": ["@musicapp/desktop@workspace:apps/desktop"],
- "@tauri-apps/cli-linux-x64-gnu": ["@tauri-apps/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-2VRNWl84FOH0m2giiDkO2h0QXlcMJeX+zJDpI5kDIQAx6s+geF3v48F4DXfJez4GS/FdoDGnPnw1C2iYGbQ7bQ=="],
+ "@musicapp/player": ["@musicapp/player@workspace:web/player"],
- "@tauri-apps/cli-linux-x64-musl": ["@tauri-apps/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-o9GyhYor/nc7xarmwDE3ka2szuW3uuZzXjHWh64Q8YX5AtSgxdQkFWzrY4O8KiGtVNvFBI14H3Q49Qj5TOIP/A=="],
+ "@musicapp/server": ["@musicapp/server@workspace:web/server"],
- "@tauri-apps/cli-win32-arm64-msvc": ["@tauri-apps/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-ld5Ehb598m0VkYyylRPNeCFsBe/km0jxis6KgMpl3IGY6I/i1RwQXO05I1AsXUXO2WC6AvB/Lw4qTf/asiuEiQ=="],
+ "@musicapp/shared": ["@musicapp/shared@workspace:web/shared"],
- "@tauri-apps/cli-win32-ia32-msvc": ["@tauri-apps/[email protected]", "", { "os": "win32", "cpu": "ia32" }, "sha512-12Hxi0XX/H5VFxO/bGgHkFWhml9VMgEOu9CidjeCeTNQ1l6fpUlbiGgSP7CLI3PFtW9/FfbeHieZ+kyWK5H7CA=="],
+ "@npmcli/fs": ["@npmcli/[email protected]", "", { "dependencies": { "@gar/promisify": "^1.1.3", "semver": "^7.3.5" } }, "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ=="],
- "@tauri-apps/cli-win32-x64-msvc": ["@tauri-apps/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-+vDiqBIU5dMISg/wNvX3sF+ZHfgJGJ5T0AcO+EHNXV9GGAG+P5fzodlDXD3QdKCRgZxMoCm5PPvj3BqLNjBthw=="],
+ "@npmcli/move-file": ["@npmcli/[email protected]", "", { "dependencies": { "mkdirp": "^1.0.4", "rimraf": "^3.0.2" } }, "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ=="],
- "@tauri-apps/plugin-deep-link": ["@tauri-apps/[email protected]", "", { "dependencies": { "@tauri-apps/api": "^2.11.0" } }, "sha512-u0SKOUHnJ1wqeqXsDFq2+kASCBj9xxbG0g9XZWPy9SOmU4wXtp6b/wiYpm6oH6/5fBTQsLqnLhIvqLBRpgHJlA=="],
+ "@pkgjs/parseargs": ["@pkgjs/[email protected]", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="],
- "@tauri-apps/plugin-opener": ["@tauri-apps/[email protected]", "", { "dependencies": { "@tauri-apps/api": "^2.11.0" } }, "sha512-1HnPkb+AmgO29HBazm4uPLKB+r7zzcTBW1d0fyYp1uP+jwtpoiNDGKMMzz58SFp49nOIrxdE3aUJtT57lfO9CQ=="],
+ "@sapphire/async-queue": ["@sapphire/[email protected]", "", {}, "sha512-cvGzxbba6sav2zZkH8GPf2oGk9yYoD5qrNWdu9fRehifgnFZJMV+nuy2nON2roRO4yQQ+v7MK/Pktl/HgfsUXg=="],
+
+ "@sapphire/snowflake": ["@sapphire/[email protected]", "", {}, "sha512-xzvBr1Q1c4lCe7i6sRnrofxeO1QTP/LKQ6A6qy0iB4x5yfiSfARMEQEghojzTNALDTcv8En04qYNIco9/K9eZQ=="],
+
+ "@sindresorhus/is": ["@sindresorhus/[email protected]", "", {}, "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="],
+
+ "@szmarczak/http-timer": ["@szmarczak/[email protected]", "", { "dependencies": { "defer-to-connect": "^2.0.0" } }, "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w=="],
"@tokenizer/inflate": ["@tokenizer/[email protected]", "", { "dependencies": { "debug": "^4.4.3", "token-types": "^6.1.1" } }, "sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA=="],
"@tokenizer/token": ["@tokenizer/[email protected]", "", {}, "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="],
+ "@tootallnate/once": ["@tootallnate/[email protected]", "", {}, "sha512-HqmEUIGRJ5fSXchkVgR5F7qn48bDBzv0kWj/Kfu5e6uci4UlEeng4331LnBkWffb++Ei3FOVLxo8JJWMFBDMeQ=="],
+
"@types/bun": ["@types/[email protected]", "", { "dependencies": { "bun-types": "1.4.0" } }, "sha512-K+lZULY23vRgK/CfTjFIV+tyifaNdSMlPh9j+6mQ/cLfpOznLyAuzgV/JQysyECpkBQLVMSyvjlr2fBUSA9wFQ=="],
- "@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw=="],
+ "@types/cacheable-request": ["@types/[email protected]", "", { "dependencies": { "@types/http-cache-semantics": "*", "@types/keyv": "^3.1.4", "@types/node": "*", "@types/responselike": "^1.0.0" } }, "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw=="],
+
+ "@types/debug": ["@types/[email protected]", "", { "dependencies": { "@types/ms": "*" } }, "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw=="],
+
+ "@types/fs-extra": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA=="],
+
+ "@types/http-cache-semantics": ["@types/[email protected]", "", {}, "sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q=="],
+
+ "@types/keyv": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg=="],
+
+ "@types/ms": ["@types/[email protected]", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
+
+ "@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q=="],
+
+ "@types/plist": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*", "xmlbuilder": ">=11.0.1" } }, "sha512-E6OCaRmAe4WDmWNsL/9RMqdkkzDCY1etutkflWk4c+AcjDU07Pcz1fQwTX0TQz+Pxqn9i4L1TU3UFpjnrcDgxA=="],
+
+ "@types/responselike": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw=="],
+
+ "@types/verror": ["@types/[email protected]", "", {}, "sha512-RlDm9K7+o5stv0Co8i8ZRGxDbrTxhJtgjqjFyVh/tXQyl/rYtTKlnTvZ88oSTeYREWurwx20Js4kTuKCsFkUtg=="],
+
+ "@types/yauzl": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q=="],
"@typescript/typescript-aix-ppc64": ["@typescript/[email protected]", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="],
@@ -160,92 +207,964 @@
"@typescript/typescript-win32-x64": ["@typescript/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="],
+ "@vladfrangu/async_event_emitter": ["@vladfrangu/[email protected]", "", {}, "sha512-Xfe6rpCTxSxfbswi/W/Pz7zp1WWSNn4A0eW4mLkQUewCrXXtMj31lCg+iQyTkh/CkusZSq9eDflu7tjEDXUY6g=="],
+
+ "@xhayper/discord-rpc": ["@xhayper/[email protected]", "", { "dependencies": { "@discordjs/rest": "^2.6.1", "@vladfrangu/async_event_emitter": "^2.4.7", "discord-api-types": "^0.38.47", "ws": "^8.20.0" } }, "sha512-ff0uEXuibh9wi+l4vOj7xInLUjtlTaQBje/SCyQkeXZ0j2V0y+Zge5PQIQFRHH9TjjGaYJkTofEcQhncM2q7/w=="],
+
+ "@xmldom/xmldom": ["@xmldom/[email protected]", "", {}, "sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A=="],
+
+ "abbrev": ["[email protected]", "", {}, "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="],
+
+ "agent-base": ["[email protected]", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="],
+
+ "agentkeepalive": ["[email protected]", "", { "dependencies": { "humanize-ms": "^1.2.1" } }, "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ=="],
+
+ "aggregate-error": ["[email protected]", "", { "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" } }, "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA=="],
+
+ "ajv": ["[email protected]", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw=="],
+
+ "ajv-keywords": ["[email protected]", "", { "peerDependencies": { "ajv": "^6.9.1" } }, "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ=="],
+
"ansi-regex": ["[email protected]", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="],
- "ansi-styles": ["[email protected]", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="],
+ "ansi-styles": ["[email protected]", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
+
+ "app-builder-bin": ["[email protected]", "", {}, "sha512-Ev4jj3D7Bo+O0GPD2NMvJl+PGiBAfS7pUGawntBNpCbxtpncfUixqFj9z9Jme7V7s3LBGqsWZZP54fxBX3JKJw=="],
+
+ "app-builder-lib": ["[email protected]", "", { "dependencies": { "@develar/schema-utils": "~2.6.5", "@electron/notarize": "2.5.0", "@electron/osx-sign": "1.3.1", "@electron/rebuild": "3.6.1", "@electron/universal": "2.0.1", "@malept/flatpak-bundler": "^0.4.0", "@types/fs-extra": "9.0.13", "async-exit-hook": "^2.0.1", "bluebird-lst": "^1.0.9", "builder-util": "25.1.7", "builder-util-runtime": "9.2.10", "chromium-pickle-js": "^0.2.0", "config-file-ts": "0.2.8-rc1", "debug": "^4.3.4", "dotenv": "^16.4.5", "dotenv-expand": "^11.0.6", "ejs": "^3.1.8", "electron-publish": "25.1.7", "form-data": "^4.0.0", "fs-extra": "^10.1.0", "hosted-git-info": "^4.1.0", "is-ci": "^3.0.0", "isbinaryfile": "^5.0.0", "js-yaml": "^4.1.0", "json5": "^2.2.3", "lazy-val": "^1.0.5", "minimatch": "^10.0.0", "resedit": "^1.7.0", "sanitize-filename": "^1.6.3", "semver": "^7.3.8", "tar": "^6.1.12", "temp-file": "^3.4.0" }, "peerDependencies": { "dmg-builder": "25.1.8", "electron-builder-squirrel-windows": "25.1.8" } }, "sha512-pCqe7dfsQFBABC1jeKZXQWhGcCPF3rPCXDdfqVKjIeWBcXzyC1iOWZdfFhGl+S9MyE/k//DFmC6FzuGAUudNDg=="],
+
+ "aproba": ["[email protected]", "", {}, "sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew=="],
+
+ "archiver": ["[email protected]", "", { "dependencies": { "archiver-utils": "^2.1.0", "async": "^3.2.4", "buffer-crc32": "^0.2.1", "readable-stream": "^3.6.0", "readdir-glob": "^1.1.2", "tar-stream": "^2.2.0", "zip-stream": "^4.1.0" } }, "sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw=="],
+
+ "archiver-utils": ["[email protected]", "", { "dependencies": { "glob": "^7.1.4", "graceful-fs": "^4.2.0", "lazystream": "^1.0.0", "lodash.defaults": "^4.2.0", "lodash.difference": "^4.5.0", "lodash.flatten": "^4.4.0", "lodash.isplainobject": "^4.0.6", "lodash.union": "^4.6.0", "normalize-path": "^3.0.0", "readable-stream": "^2.0.0" } }, "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw=="],
+
+ "are-we-there-yet": ["[email protected]", "", { "dependencies": { "delegates": "^1.0.0", "readable-stream": "^3.6.0" } }, "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg=="],
+
+ "argparse": ["[email protected]", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="],
+
+ "assert-plus": ["[email protected]", "", {}, "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw=="],
+
+ "astral-regex": ["[email protected]", "", {}, "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ=="],
+
+ "async": ["[email protected]", "", {}, "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA=="],
+
+ "async-exit-hook": ["[email protected]", "", {}, "sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw=="],
+
+ "asynckit": ["[email protected]", "", {}, "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="],
+
+ "at-least-node": ["[email protected]", "", {}, "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg=="],
+
+ "balanced-match": ["[email protected]", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="],
+
+ "base64-js": ["[email protected]", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="],
+
+ "bl": ["[email protected]", "", { "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", "readable-stream": "^3.4.0" } }, "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w=="],
+
+ "bluebird": ["[email protected]", "", {}, "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="],
+
+ "bluebird-lst": ["[email protected]", "", { "dependencies": { "bluebird": "^3.5.5" } }, "sha512-7B1Rtx82hjnSD4PGLAjVWeYH3tHAcVUmChh85a3lltKQm6FresXh9ErQo6oAv6CqxttczC3/kEg8SY5NluPuUw=="],
+
+ "boolean": ["[email protected]", "", {}, "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw=="],
+
+ "brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg=="],
+
+ "buffer": ["[email protected]", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="],
+
+ "buffer-crc32": ["[email protected]", "", {}, "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ=="],
+
+ "buffer-from": ["[email protected]", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="],
+
+ "builder-util": ["[email protected]", "", { "dependencies": { "7zip-bin": "~5.2.0", "@types/debug": "^4.1.6", "app-builder-bin": "5.0.0-alpha.10", "bluebird-lst": "^1.0.9", "builder-util-runtime": "9.2.10", "chalk": "^4.1.2", "cross-spawn": "^7.0.3", "debug": "^4.3.4", "fs-extra": "^10.1.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.0", "is-ci": "^3.0.0", "js-yaml": "^4.1.0", "source-map-support": "^0.5.19", "stat-mode": "^1.0.0", "temp-file": "^3.4.0" } }, "sha512-7jPjzBwEGRbwNcep0gGNpLXG9P94VA3CPAZQCzxkFXiV2GMQKlziMbY//rXPI7WKfhsvGgFXjTcXdBEwgXw9ww=="],
+
+ "builder-util-runtime": ["[email protected]", "", { "dependencies": { "debug": "^4.3.4", "sax": "^1.2.4" } }, "sha512-6p/gfG1RJSQeIbz8TK5aPNkoztgY1q5TgmGFMAXcY8itsGW6Y2ld1ALsZ5UJn8rog7hKF3zHx5iQbNQ8uLcRlw=="],
"bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-iIKw23BspnQQYd3prITOBxeUsxBHnwzX6YJfGMuNOZzeNcMmVqzIIVGRm1l69ogaPQmb4wB6BN8mA5bE9YuC5Q=="],
+ "cacache": ["[email protected]", "", { "dependencies": { "@npmcli/fs": "^2.1.0", "@npmcli/move-file": "^2.0.0", "chownr": "^2.0.0", "fs-minipass": "^2.1.0", "glob": "^8.0.1", "infer-owner": "^1.0.4", "lru-cache": "^7.7.1", "minipass": "^3.1.6", "minipass-collect": "^1.0.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "mkdirp": "^1.0.4", "p-map": "^4.0.0", "promise-inflight": "^1.0.1", "rimraf": "^3.0.2", "ssri": "^9.0.0", "tar": "^6.1.11", "unique-filename": "^2.0.0" } }, "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ=="],
+
+ "cacheable-lookup": ["[email protected]", "", {}, "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA=="],
+
+ "cacheable-request": ["[email protected]", "", { "dependencies": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", "http-cache-semantics": "^4.0.0", "keyv": "^4.0.0", "lowercase-keys": "^2.0.0", "normalize-url": "^6.0.1", "responselike": "^2.0.0" } }, "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg=="],
+
+ "call-bind-apply-helpers": ["[email protected]", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="],
+
"chalk": ["[email protected]", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="],
+ "chownr": ["[email protected]", "", {}, "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ=="],
+
+ "chromium-pickle-js": ["[email protected]", "", {}, "sha512-1R5Fho+jBq0DDydt+/vHWj5KJNJCKdARKOCwZUen84I5BreWoLqRLANH1U87eJy1tiASPtMnGqJJq0ZsLoRPOw=="],
+
+ "ci-info": ["[email protected]", "", {}, "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ=="],
+
+ "clean-stack": ["[email protected]", "", {}, "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A=="],
+
+ "cli-cursor": ["[email protected]", "", { "dependencies": { "restore-cursor": "^3.1.0" } }, "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw=="],
+
+ "cli-spinners": ["[email protected]", "", {}, "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg=="],
+
+ "cli-truncate": ["[email protected]", "", { "dependencies": { "slice-ansi": "^3.0.0", "string-width": "^4.2.0" } }, "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg=="],
+
"cliui": ["[email protected]", "", { "dependencies": { "string-width": "^7.2.0", "strip-ansi": "^7.1.0", "wrap-ansi": "^9.0.0" } }, "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w=="],
+ "clone": ["[email protected]", "", {}, "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg=="],
+
+ "clone-response": ["[email protected]", "", { "dependencies": { "mimic-response": "^1.0.0" } }, "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA=="],
+
"cluster-key-slot": ["[email protected]", "", {}, "sha512-rwHwUfXL40Chm1r08yrhU3qpUvdVlgkKNeyeGPOxnW8/SyVDvgRaed/Uz54AqWNaTCAThlj6QAs3TZcKI0xDEw=="],
+ "color-convert": ["[email protected]", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],
+
+ "color-name": ["[email protected]", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
+
+ "color-support": ["[email protected]", "", { "bin": { "color-support": "bin.js" } }, "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="],
+
+ "combined-stream": ["[email protected]", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="],
+
+ "commander": ["[email protected]", "", {}, "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg=="],
+
+ "compare-version": ["[email protected]", "", {}, "sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A=="],
+
+ "compress-commons": ["[email protected]", "", { "dependencies": { "buffer-crc32": "^0.2.13", "crc32-stream": "^4.0.2", "normalize-path": "^3.0.0", "readable-stream": "^3.6.0" } }, "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg=="],
+
+ "concat-map": ["[email protected]", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="],
+
"concurrently": ["[email protected]", "", { "dependencies": { "chalk": "5.6.2", "rxjs": "7.8.2", "shell-quote": "1.9.0", "supports-color": "10.2.2", "tree-kill": "1.2.2", "yargs": "18.0.0" }, "bin": { "conc": "dist/bin/index.js", "concurrently": "dist/bin/index.js" } }, "sha512-JaP/CoftUrCcAFW/g//RbgEGwlelnEae6cfBLgH6ZdO6s8jPkn6p9SB9u6pdVxYXoiSnFqseOlHfrEfF82TVOg=="],
+ "config-file-ts": ["[email protected]", "", { "dependencies": { "glob": "^10.3.12", "typescript": "^5.4.3" } }, "sha512-GtNECbVI82bT4RiDIzBSVuTKoSHufnU7Ce7/42bkWZJZFLjmDF2WBpVsvRkhKCfKBnTBb3qZrBwPpFBU/Myvhg=="],
+
+ "console-control-strings": ["[email protected]", "", {}, "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ=="],
+
"content-type": ["[email protected]", "", {}, "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag=="],
+ "core-util-is": ["[email protected]", "", {}, "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ=="],
+
+ "crc": ["[email protected]", "", { "dependencies": { "buffer": "^5.1.0" } }, "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ=="],
+
+ "crc-32": ["[email protected]", "", { "bin": { "crc32": "bin/crc32.njs" } }, "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="],
+
+ "crc32-stream": ["[email protected]", "", { "dependencies": { "crc-32": "^1.2.0", "readable-stream": "^3.4.0" } }, "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw=="],
+
+ "cross-spawn": ["[email protected]", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],
+
"debug": ["[email protected]", "", { "dependencies": { "ms": "^2.1.3" }, "peerDependencies": { "supports-color": "*" }, "optionalPeers": ["supports-color"] }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="],
+ "decompress-response": ["[email protected]", "", { "dependencies": { "mimic-response": "^3.1.0" } }, "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ=="],
+
+ "defaults": ["[email protected]", "", { "dependencies": { "clone": "^1.0.2" } }, "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A=="],
+
+ "defer-to-connect": ["[email protected]", "", {}, "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg=="],
+
+ "define-data-property": ["[email protected]", "", { "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "gopd": "^1.0.1" } }, "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A=="],
+
+ "define-properties": ["[email protected]", "", { "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" } }, "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg=="],
+
+ "delayed-stream": ["[email protected]", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="],
+
+ "delegates": ["[email protected]", "", {}, "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ=="],
+
"denque": ["[email protected]", "", {}, "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="],
+ "detect-libc": ["[email protected]", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],
+
+ "detect-node": ["[email protected]", "", {}, "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g=="],
+
+ "dir-compare": ["[email protected]", "", { "dependencies": { "minimatch": "^3.0.5", "p-limit": "^3.1.0 " } }, "sha512-2xMCmOoMrdQIPHdsTawECdNPwlVFB9zGcz3kuhmBO6U3oU+UQjsue0i8ayLKpgBcm+hcXPMVSGUN9d+pvJ6+VQ=="],
+
+ "discord-api-types": ["[email protected]", "", {}, "sha512-3704EKdPtVl0Mozoe6uBJQ8GNmUkH8c81nfXkdSBx+Um8GN3FI/003uTY0Pg0A4KjL8g2Q+4v5cHR247kv6vwA=="],
+
+ "dmg-builder": ["[email protected]", "", { "dependencies": { "app-builder-lib": "25.1.8", "builder-util": "25.1.7", "builder-util-runtime": "9.2.10", "fs-extra": "^10.1.0", "iconv-lite": "^0.6.2", "js-yaml": "^4.1.0" }, "optionalDependencies": { "dmg-license": "^1.0.11" } }, "sha512-NoXo6Liy2heSklTI5OIZbCgXC1RzrDQsZkeEwXhdOro3FT1VBOvbubvscdPnjVuQ4AMwwv61oaH96AbiYg9EnQ=="],
+
+ "dmg-license": ["[email protected]", "", { "dependencies": { "@types/plist": "^3.0.1", "@types/verror": "^1.10.3", "ajv": "^6.10.0", "crc": "^3.8.0", "iconv-corefoundation": "^1.1.7", "plist": "^3.0.4", "smart-buffer": "^4.0.2", "verror": "^1.10.0" }, "os": "darwin", "bin": { "dmg-license": "bin/dmg-license.js" } }, "sha512-ZdzmqwKmECOWJpqefloC5OJy1+WZBBse5+MR88z9g9Zn4VY+WYUkAyojmhzJckH5YbbZGcYIuGAkY5/Ys5OM2Q=="],
+
+ "dotenv": ["[email protected]", "", {}, "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow=="],
+
+ "dotenv-expand": ["[email protected]", "", { "dependencies": { "dotenv": "^16.4.5" } }, "sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA=="],
+
+ "dunder-proto": ["[email protected]", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],
+
+ "eastasianwidth": ["[email protected]", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="],
+
+ "ejs": ["[email protected]", "", { "dependencies": { "jake": "^10.8.5" }, "bin": { "ejs": "bin/cli.js" } }, "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA=="],
+
+ "electron": ["[email protected]", "", { "dependencies": { "@electron/get": "^2.0.0", "@types/node": "^20.9.0", "extract-zip": "^2.0.1" }, "bin": { "electron": "cli.js" } }, "sha512-xmdAs5QWRkInC7TpXGNvzo/7exojubk+72jn1oJL7keNeIlw7xNglf8TGtJtkR4rWC5FJq0oXiIXPS9BcK2Irg=="],
+
+ "electron-builder": ["[email protected]", "", { "dependencies": { "app-builder-lib": "25.1.8", "builder-util": "25.1.7", "builder-util-runtime": "9.2.10", "chalk": "^4.1.2", "dmg-builder": "25.1.8", "fs-extra": "^10.1.0", "is-ci": "^3.0.0", "lazy-val": "^1.0.5", "simple-update-notifier": "2.0.0", "yargs": "^17.6.2" }, "bin": { "electron-builder": "cli.js", "install-app-deps": "install-app-deps.js" } }, "sha512-poRgAtUHHOnlzZnc9PK4nzG53xh74wj2Jy7jkTrqZ0MWPoHGh1M2+C//hGeYdA+4K8w4yiVCNYoLXF7ySj2Wig=="],
+
+ "electron-builder-squirrel-windows": ["[email protected]", "", { "dependencies": { "app-builder-lib": "25.1.8", "archiver": "^5.3.1", "builder-util": "25.1.7", "fs-extra": "^10.1.0" } }, "sha512-2ntkJ+9+0GFP6nAISiMabKt6eqBB0kX1QqHNWFWAXgi0VULKGisM46luRFpIBiU3u/TDmhZMM8tzvo2Abn3ayg=="],
+
+ "electron-publish": ["[email protected]", "", { "dependencies": { "@types/fs-extra": "^9.0.11", "builder-util": "25.1.7", "builder-util-runtime": "9.2.10", "chalk": "^4.1.2", "fs-extra": "^10.1.0", "lazy-val": "^1.0.5", "mime": "^2.5.2" } }, "sha512-+jbTkR9m39eDBMP4gfbqglDd6UvBC7RLh5Y0MhFSsc6UkGHj9Vj9TWobxevHYMMqmoujL11ZLjfPpMX+Pt6YEg=="],
+
"emoji-regex": ["[email protected]", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="],
+ "encoding": ["[email protected]", "", { "dependencies": { "iconv-lite": "^0.6.2" } }, "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A=="],
+
+ "end-of-stream": ["[email protected]", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg=="],
+
+ "env-paths": ["[email protected]", "", {}, "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A=="],
+
+ "err-code": ["[email protected]", "", {}, "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA=="],
+
+ "es-define-property": ["[email protected]", "", {}, "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="],
+
+ "es-errors": ["[email protected]", "", {}, "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="],
+
+ "es-object-atoms": ["[email protected]", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw=="],
+
+ "es-set-tostringtag": ["[email protected]", "", { "dependencies": { "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" } }, "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA=="],
+
+ "es6-error": ["[email protected]", "", {}, "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg=="],
+
"escalade": ["[email protected]", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="],
+ "escape-string-regexp": ["[email protected]", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],
+
+ "exponential-backoff": ["[email protected]", "", {}, "sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA=="],
+
+ "extract-zip": ["[email protected]", "", { "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", "yauzl": "^2.10.0" }, "optionalDependencies": { "@types/yauzl": "^2.9.1" }, "bin": { "extract-zip": "cli.js" } }, "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg=="],
+
+ "extsprintf": ["[email protected]", "", {}, "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA=="],
+
+ "fast-deep-equal": ["[email protected]", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="],
+
+ "fast-json-stable-stringify": ["[email protected]", "", {}, "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="],
+
+ "fd-slicer": ["[email protected]", "", { "dependencies": { "pend": "~1.2.0" } }, "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g=="],
+
"file-type": ["[email protected]", "", { "dependencies": { "@tokenizer/inflate": "^0.4.1", "strtok3": "^10.3.4", "token-types": "^6.1.1", "uint8array-extras": "^1.4.0" } }, "sha512-Ievi/yy8DS3ygGvT47PjSfdFoX+2isQueoYP1cntFW1JLYAuS4GD7NUPGg4zv2iZfV52uDyk5w5Z0TdpRS6Q1g=="],
+ "filelist": ["[email protected]", "", { "dependencies": { "minimatch": "^5.0.1" } }, "sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA=="],
+
+ "foreground-child": ["[email protected]", "", { "dependencies": { "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" } }, "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw=="],
+
+ "form-data": ["[email protected]", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "hasown": "^2.0.4", "mime-types": "^2.1.35" } }, "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ=="],
+
+ "fs-constants": ["[email protected]", "", {}, "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="],
+
+ "fs-extra": ["[email protected]", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ=="],
+
+ "fs-minipass": ["[email protected]", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg=="],
+
+ "fs.realpath": ["[email protected]", "", {}, "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="],
+
+ "function-bind": ["[email protected]", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="],
+
+ "gauge": ["[email protected]", "", { "dependencies": { "aproba": "^1.0.3 || ^2.0.0", "color-support": "^1.1.3", "console-control-strings": "^1.1.0", "has-unicode": "^2.0.1", "signal-exit": "^3.0.7", "string-width": "^4.2.3", "strip-ansi": "^6.0.1", "wide-align": "^1.1.5" } }, "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg=="],
+
"get-caller-file": ["[email protected]", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="],
"get-east-asian-width": ["[email protected]", "", {}, "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA=="],
+ "get-intrinsic": ["[email protected]", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="],
+
+ "get-proto": ["[email protected]", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="],
+
+ "get-stream": ["[email protected]", "", { "dependencies": { "pump": "^3.0.0" } }, "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA=="],
+
+ "glob": ["[email protected]", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg=="],
+
+ "global-agent": ["[email protected]", "", { "dependencies": { "boolean": "^3.0.1", "es6-error": "^4.1.1", "matcher": "^3.0.0", "roarr": "^2.15.3", "semver": "^7.3.2", "serialize-error": "^7.0.1" } }, "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q=="],
+
+ "globalthis": ["[email protected]", "", { "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" } }, "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ=="],
+
+ "gopd": ["[email protected]", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="],
+
+ "got": ["[email protected]", "", { "dependencies": { "@sindresorhus/is": "^4.0.0", "@szmarczak/http-timer": "^4.0.5", "@types/cacheable-request": "^6.0.1", "@types/responselike": "^1.0.0", "cacheable-lookup": "^5.0.3", "cacheable-request": "^7.0.2", "decompress-response": "^6.0.0", "http2-wrapper": "^1.0.0-beta.5.2", "lowercase-keys": "^2.0.0", "p-cancelable": "^2.0.0", "responselike": "^2.0.0" } }, "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g=="],
+
+ "graceful-fs": ["[email protected]", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="],
+
+ "has-flag": ["[email protected]", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="],
+
+ "has-property-descriptors": ["[email protected]", "", { "dependencies": { "es-define-property": "^1.0.0" } }, "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg=="],
+
+ "has-symbols": ["[email protected]", "", {}, "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="],
+
+ "has-tostringtag": ["[email protected]", "", { "dependencies": { "has-symbols": "^1.0.3" } }, "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw=="],
+
+ "has-unicode": ["[email protected]", "", {}, "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ=="],
+
+ "hasown": ["[email protected]", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A=="],
+
"hono": ["[email protected]", "", {}, "sha512-AGEwKIyRMHRv1t8Wjwa3LHxQ61X5CqrdFT+4BRNTpqS5aJNnpl5WLjADb7vFlJzI/8uK7T5QLVApCMQKNa3LgQ=="],
+ "hosted-git-info": ["[email protected]", "", { "dependencies": { "lru-cache": "^6.0.0" } }, "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA=="],
+
+ "http-cache-semantics": ["[email protected]", "", {}, "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ=="],
+
+ "http-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="],
+
+ "http2-wrapper": ["[email protected]", "", { "dependencies": { "quick-lru": "^5.1.1", "resolve-alpn": "^1.0.0" } }, "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg=="],
+
+ "https-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
+
+ "humanize-ms": ["[email protected]", "", { "dependencies": { "ms": "^2.0.0" } }, "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ=="],
+
+ "iconv-corefoundation": ["[email protected]", "", { "dependencies": { "cli-truncate": "^2.1.0", "node-addon-api": "^1.6.3" }, "os": "darwin" }, "sha512-T10qvkw0zz4wnm560lOEg0PovVqUXuOFhhHAkixw8/sycy7TJt7v/RrkEKEQnAw2viPSJu6iAkErxnzR0g8PpQ=="],
+
+ "iconv-lite": ["[email protected]", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="],
+
"ieee754": ["[email protected]", "", {}, "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="],
+ "imurmurhash": ["[email protected]", "", {}, "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="],
+
+ "indent-string": ["[email protected]", "", {}, "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg=="],
+
+ "infer-owner": ["[email protected]", "", {}, "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A=="],
+
+ "inflight": ["[email protected]", "", { "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA=="],
+
+ "inherits": ["[email protected]", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="],
+
"ioredis": ["[email protected]", "", { "dependencies": { "@ioredis/commands": "2.0.0", "cluster-key-slot": "1.1.1", "debug": "4.4.3", "denque": "2.1.0", "redis-errors": "1.2.0", "standard-as-callback": "2.1.0" } }, "sha512-f+Dtubxfpf6KYFq7WVXJoOLn0bk4TJrMrN9SzeE+jrWrCWj7XX3fA6vkryafhADX+GMymRxgDJDOI33COkJc0w=="],
+ "ip-address": ["[email protected]", "", {}, "sha512-BGFsyJd5mpXp3rK6jIdADLNgpJUK1jnjzvYF8lK+VyDab9JAmqN0YOKDdP17HlgKb2+ehPgDc8EtnRLbGCAMhA=="],
+
+ "is-ci": ["[email protected]", "", { "dependencies": { "ci-info": "^3.2.0" }, "bin": { "is-ci": "bin.js" } }, "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ=="],
+
+ "is-fullwidth-code-point": ["[email protected]", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
+
+ "is-interactive": ["[email protected]", "", {}, "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w=="],
+
+ "is-lambda": ["[email protected]", "", {}, "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ=="],
+
+ "is-unicode-supported": ["[email protected]", "", {}, "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw=="],
+
+ "isarray": ["[email protected]", "", {}, "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="],
+
+ "isbinaryfile": ["[email protected]", "", {}, "sha512-gnWD14Jh3FzS3CPhF0AxNOJ8CxqeblPTADzI38r0wt8ZyQl5edpy75myt08EG2oKvpyiqSqsx+Wkz9vtkbTqYQ=="],
+
+ "isexe": ["[email protected]", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],
+
+ "jackspeak": ["[email protected]", "", { "dependencies": { "@isaacs/cliui": "^8.0.2" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw=="],
+
+ "jake": ["[email protected]", "", { "dependencies": { "async": "^3.2.6", "filelist": "^1.0.4", "picocolors": "^1.1.1" }, "bin": { "jake": "bin/cli.js" } }, "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA=="],
+
"jose": ["[email protected]", "", {}, "sha512-iiW7J9qRFlGxvCOIBDBDxFePQSn7ZMAnrYGhrrOo6siO/MIqwfyilLR27pkfDgUk+raLuzADS8A3S/KLBisc0g=="],
+ "js-yaml": ["[email protected]", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA=="],
+
+ "json-buffer": ["[email protected]", "", {}, "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="],
+
+ "json-schema-traverse": ["[email protected]", "", {}, "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="],
+
+ "json-stringify-safe": ["[email protected]", "", {}, "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA=="],
+
+ "json5": ["[email protected]", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="],
+
+ "jsonfile": ["[email protected]", "", { "dependencies": { "universalify": "^2.0.0" }, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q=="],
+
+ "keyv": ["[email protected]", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="],
+
+ "lazy-val": ["[email protected]", "", {}, "sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q=="],
+
+ "lazystream": ["[email protected]", "", { "dependencies": { "readable-stream": "^2.0.5" } }, "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw=="],
+
+ "lodash": ["[email protected]", "", {}, "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q=="],
+
+ "lodash.defaults": ["[email protected]", "", {}, "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ=="],
+
+ "lodash.difference": ["[email protected]", "", {}, "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA=="],
+
+ "lodash.flatten": ["[email protected]", "", {}, "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g=="],
+
+ "lodash.isplainobject": ["[email protected]", "", {}, "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="],
+
+ "lodash.union": ["[email protected]", "", {}, "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw=="],
+
+ "log-symbols": ["[email protected]", "", { "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" } }, "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg=="],
+
+ "lowercase-keys": ["[email protected]", "", {}, "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA=="],
+
+ "lru-cache": ["[email protected]", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA=="],
+
+ "magic-bytes.js": ["[email protected]", "", {}, "sha512-x5sn4UX2k5gCWlcfmoFwG4TPie8+dctESyqOBdhB5p6MsgWXdBKGmt9nXPObj/JI50TTL928lc5Yt1WntMn1bw=="],
+
+ "make-fetch-happen": ["[email protected]", "", { "dependencies": { "agentkeepalive": "^4.2.1", "cacache": "^16.1.0", "http-cache-semantics": "^4.1.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", "lru-cache": "^7.7.1", "minipass": "^3.1.6", "minipass-collect": "^1.0.2", "minipass-fetch": "^2.0.3", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.3", "promise-retry": "^2.0.1", "socks-proxy-agent": "^7.0.0", "ssri": "^9.0.0" } }, "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w=="],
+
+ "matcher": ["[email protected]", "", { "dependencies": { "escape-string-regexp": "^4.0.0" } }, "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng=="],
+
+ "math-intrinsics": ["[email protected]", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="],
+
"media-typer": ["[email protected]", "", {}, "sha512-kOy3OxT2HH39N70UnKgu4NWDZjLOz8W/mfyvniHjRH/DrL3f2pOfvWQ4p60offbbtDAnXWp0v9LfMIqMec269Q=="],
+ "mime": ["[email protected]", "", { "bin": { "mime": "cli.js" } }, "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg=="],
+
+ "mime-db": ["[email protected]", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="],
+
+ "mime-types": ["[email protected]", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="],
+
+ "mimic-fn": ["[email protected]", "", {}, "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="],
+
+ "mimic-response": ["[email protected]", "", {}, "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="],
+
+ "minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^5.0.8" } }, "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A=="],
+
+ "minimist": ["[email protected]", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
+
+ "minipass": ["[email protected]", "", {}, "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ=="],
+
+ "minipass-collect": ["[email protected]", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA=="],
+
+ "minipass-fetch": ["[email protected]", "", { "dependencies": { "minipass": "^3.1.6", "minipass-sized": "^1.0.3", "minizlib": "^2.1.2" }, "optionalDependencies": { "encoding": "^0.1.13" } }, "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA=="],
+
+ "minipass-flush": ["[email protected]", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-TbqTz9cUwWyHS2Dy89P3ocAGUGxKjjLuR9z8w4WUTGAVgEj17/4nhgo2Du56i0Fm3Pm30g4iA8Lcqctc76jCzA=="],
+
+ "minipass-pipeline": ["[email protected]", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A=="],
+
+ "minipass-sized": ["[email protected]", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g=="],
+
+ "minizlib": ["[email protected]", "", { "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" } }, "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg=="],
+
+ "mkdirp": ["[email protected]", "", { "bin": { "mkdirp": "bin/cmd.js" } }, "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="],
+
"ms": ["[email protected]", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
"music-metadata": ["[email protected]", "", { "dependencies": { "@borewit/text-codec": "^0.2.2", "@tokenizer/token": "^0.3.0", "content-type": "^2.1.0", "debug": "^4.4.3", "file-type": "^21.3.4", "media-typer": "^2.0.0", "strtok3": "^10.3.5", "token-types": "^6.1.2", "uint8array-extras": "^1.5.0", "win-guid": "^0.2.1" } }, "sha512-TN+kO1/oOc8UzDW5N3vSDncBcv9WyNnQQe/NFMcFWq6G1+zVeYUkGvkYpQ/S8wb8vKtUD7i78dIaY0cv+cmPRA=="],
+ "negotiator": ["[email protected]", "", {}, "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w=="],
+
+ "node-abi": ["[email protected]", "", { "dependencies": { "semver": "^7.3.5" } }, "sha512-rebQ/lz7i0EkoLzUVSrKRzA69zMkwLp95kKMWoMDkkM00Suxz0D7zEQPwRml5fQum24mj7bPvmlgLAmu2JCiYg=="],
+
+ "node-addon-api": ["[email protected]", "", {}, "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="],
+
+ "node-api-version": ["[email protected]", "", { "dependencies": { "semver": "^7.3.5" } }, "sha512-2xP/IGGMmmSQpI1+O/k72jF/ykvZ89JeuKX3TLJAYPDVLUalrshrLHkeVcCCZqG/eEa635cr8IBYzgnDvM2O8Q=="],
+
+ "node-gyp": ["[email protected]", "", { "dependencies": { "env-paths": "^2.2.0", "exponential-backoff": "^3.1.1", "glob": "^7.1.4", "graceful-fs": "^4.2.6", "make-fetch-happen": "^10.0.3", "nopt": "^6.0.0", "npmlog": "^6.0.0", "rimraf": "^3.0.2", "semver": "^7.3.5", "tar": "^6.1.2", "which": "^2.0.2" }, "bin": { "node-gyp": "bin/node-gyp.js" } }, "sha512-OQkWKbjQKbGkMf/xqI1jjy3oCTgMKJac58G2+bjZb3fza6gW2YrCSdMQYaoTb70crvE//Gngr4f0AgVHmqHvBQ=="],
+
+ "nopt": ["[email protected]", "", { "dependencies": { "abbrev": "^1.0.0" }, "bin": { "nopt": "bin/nopt.js" } }, "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g=="],
+
+ "normalize-path": ["[email protected]", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="],
+
+ "normalize-url": ["[email protected]", "", {}, "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A=="],
+
+ "npmlog": ["[email protected]", "", { "dependencies": { "are-we-there-yet": "^3.0.0", "console-control-strings": "^1.1.0", "gauge": "^4.0.3", "set-blocking": "^2.0.0" } }, "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg=="],
+
+ "object-keys": ["[email protected]", "", {}, "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="],
+
+ "once": ["[email protected]", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
+
+ "onetime": ["[email protected]", "", { "dependencies": { "mimic-fn": "^2.1.0" } }, "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg=="],
+
+ "ora": ["[email protected]", "", { "dependencies": { "bl": "^4.1.0", "chalk": "^4.1.0", "cli-cursor": "^3.1.0", "cli-spinners": "^2.5.0", "is-interactive": "^1.0.0", "is-unicode-supported": "^0.1.0", "log-symbols": "^4.1.0", "strip-ansi": "^6.0.0", "wcwidth": "^1.0.1" } }, "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ=="],
+
+ "p-cancelable": ["[email protected]", "", {}, "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg=="],
+
+ "p-limit": ["[email protected]", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="],
+
+ "p-map": ["[email protected]", "", { "dependencies": { "aggregate-error": "^3.0.0" } }, "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ=="],
+
+ "package-json-from-dist": ["[email protected]", "", {}, "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="],
+
+ "path-is-absolute": ["[email protected]", "", {}, "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="],
+
+ "path-key": ["[email protected]", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],
+
+ "path-scurry": ["[email protected]", "", { "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" } }, "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA=="],
+
+ "pe-library": ["[email protected]", "", {}, "sha512-eRWB5LBz7PpDu4PUlwT0PhnQfTQJlDDdPa35urV4Osrm0t0AqQFGn+UIkU3klZvwJ8KPO3VbBFsXquA6p6kqZw=="],
+
+ "pend": ["[email protected]", "", {}, "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg=="],
+
+ "picocolors": ["[email protected]", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
+
+ "plist": ["[email protected]", "", { "dependencies": { "@xmldom/xmldom": "^0.9.10", "base64-js": "^1.5.1", "xmlbuilder": "^15.1.1" } }, "sha512-ZIfcLJC+7E7FBFnDxm9MPmt7D+DidyQ26lewieO75AdhA2ayMtsJSES0iWzqJQbcVRSrTufQoy0DR94xHue0oA=="],
+
"postgres": ["[email protected]", "", {}, "sha512-GD3qdB0x1z9xgFI6cdRD6xu2Sp2WCOEoe3mtnyB5Ee0XrrL5Pe+e4CCnJrRMnL1zYtRDZmQQVbvOttLnKDLnaw=="],
+ "process-nextick-args": ["[email protected]", "", {}, "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="],
+
+ "progress": ["[email protected]", "", {}, "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="],
+
+ "promise-inflight": ["[email protected]", "", {}, "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g=="],
+
+ "promise-retry": ["[email protected]", "", { "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" } }, "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g=="],
+
+ "pump": ["[email protected]", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA=="],
+
+ "punycode": ["[email protected]", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="],
+
+ "quick-lru": ["[email protected]", "", {}, "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA=="],
+
+ "read-binary-file-arch": ["[email protected]", "", { "dependencies": { "debug": "^4.3.4" }, "bin": { "read-binary-file-arch": "cli.js" } }, "sha512-BNg9EN3DD3GsDXX7Aa8O4p92sryjkmzYYgmgTAc6CA4uGLEDzFfxOxugu21akOxpcXHiEgsYkC6nPsQvLLLmEg=="],
+
+ "readable-stream": ["[email protected]", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
+
+ "readdir-glob": ["[email protected]", "", { "dependencies": { "minimatch": "^5.1.0" } }, "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA=="],
+
"redis-errors": ["[email protected]", "", {}, "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w=="],
+ "require-directory": ["[email protected]", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="],
+
+ "resedit": ["[email protected]", "", { "dependencies": { "pe-library": "^0.4.1" } }, "sha512-vHjcY2MlAITJhC0eRD/Vv8Vlgmu9Sd3LX9zZvtGzU5ZImdTN3+d6e/4mnTyV8vEbyf1sgNIrWxhWlrys52OkEA=="],
+
+ "resolve-alpn": ["[email protected]", "", {}, "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g=="],
+
+ "responselike": ["[email protected]", "", { "dependencies": { "lowercase-keys": "^2.0.0" } }, "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw=="],
+
+ "restore-cursor": ["[email protected]", "", { "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" } }, "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA=="],
+
+ "retry": ["[email protected]", "", {}, "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow=="],
+
+ "rimraf": ["[email protected]", "", { "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "bin.js" } }, "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA=="],
+
+ "roarr": ["[email protected]", "", { "dependencies": { "boolean": "^3.0.1", "detect-node": "^2.0.4", "globalthis": "^1.0.1", "json-stringify-safe": "^5.0.1", "semver-compare": "^1.0.0", "sprintf-js": "^1.1.2" } }, "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A=="],
+
"rxjs": ["[email protected]", "", { "dependencies": { "tslib": "^2.1.0" } }, "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA=="],
+ "safe-buffer": ["[email protected]", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="],
+
+ "safer-buffer": ["[email protected]", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],
+
+ "sanitize-filename": ["[email protected]", "", { "dependencies": { "truncate-utf8-bytes": "^1.0.0" } }, "sha512-9ZyI08PsvdQl2r/bBIGubpVdR3RR9sY6RDiWFPreA21C/EFlQhmgo20UZlNjZMMZNubusLhAQozkA0Od5J21Eg=="],
+
+ "sax": ["[email protected]", "", {}, "sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q=="],
+
+ "semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
+
+ "semver-compare": ["[email protected]", "", {}, "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow=="],
+
+ "serialize-error": ["[email protected]", "", { "dependencies": { "type-fest": "^0.13.1" } }, "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw=="],
+
+ "set-blocking": ["[email protected]", "", {}, "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="],
+
+ "shebang-command": ["[email protected]", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="],
+
+ "shebang-regex": ["[email protected]", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="],
+
"shell-quote": ["[email protected]", "", {}, "sha512-Iov+JwFv/2HcTpcwNMKd8+IWNb8tboQJNQTkAY/LLVK7gGH9jy+LGkVqPxfekHl+yMmiqXszdGWXgkfml7hjqA=="],
+ "signal-exit": ["[email protected]", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="],
+
+ "simple-update-notifier": ["[email protected]", "", { "dependencies": { "semver": "^7.5.3" } }, "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w=="],
+
+ "slice-ansi": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", "is-fullwidth-code-point": "^3.0.0" } }, "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ=="],
+
+ "smart-buffer": ["[email protected]", "", {}, "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="],
+
+ "socks": ["[email protected]", "", { "dependencies": { "ip-address": "^10.1.1", "smart-buffer": "^4.2.0" } }, "sha512-LJhUYUvItdQ0LkJTmPeaEObWXAqFyfmP85x0tch/ez9cahmhlBBLbIqDFnvBnUJGagb0JbIQrkBs1wJ+yRYpEw=="],
+
+ "socks-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "^6.0.2", "debug": "^4.3.3", "socks": "^2.6.2" } }, "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww=="],
+
+ "source-map": ["[email protected]", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
+
+ "source-map-support": ["[email protected]", "", { "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w=="],
+
+ "sprintf-js": ["[email protected]", "", {}, "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA=="],
+
+ "ssri": ["[email protected]", "", { "dependencies": { "minipass": "^3.1.1" } }, "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q=="],
+
"standard-as-callback": ["[email protected]", "", {}, "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A=="],
+ "stat-mode": ["[email protected]", "", {}, "sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg=="],
+
"string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="],
+ "string-width-cjs": ["[email protected]", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
+
+ "string_decoder": ["[email protected]", "", { "dependencies": { "safe-buffer": "~5.2.0" } }, "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA=="],
+
"strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="],
+ "strip-ansi-cjs": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
"strtok3": ["[email protected]", "", { "dependencies": { "@tokenizer/token": "^0.3.0" } }, "sha512-ki4hZQfh5rX0QDLLkOCj+h+CVNkqmp/CMf8v8kZpkNVK6jGQooMytqzLZYUVYIZcFZ6yDB70EfD8POcFXiF5oA=="],
+ "sumchecker": ["[email protected]", "", { "dependencies": { "debug": "^4.1.0" } }, "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg=="],
+
"supports-color": ["[email protected]", "", {}, "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g=="],
+ "tar": ["[email protected]", "", { "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" } }, "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A=="],
+
+ "tar-stream": ["[email protected]", "", { "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", "fs-constants": "^1.0.0", "inherits": "^2.0.3", "readable-stream": "^3.1.1" } }, "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ=="],
+
+ "temp-file": ["[email protected]", "", { "dependencies": { "async-exit-hook": "^2.0.1", "fs-extra": "^10.0.0" } }, "sha512-C5tjlC/HCtVUOi3KWVokd4vHVViOmGjtLwIh4MuzPo/nMYTV/p1urt3RnMz2IWXDdKEGJH3k5+KPxtqRsUYGtg=="],
+
+ "tmp": ["[email protected]", "", {}, "sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw=="],
+
+ "tmp-promise": ["[email protected]", "", { "dependencies": { "tmp": "^0.2.0" } }, "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ=="],
+
"token-types": ["[email protected]", "", { "dependencies": { "@borewit/text-codec": "^0.2.1", "@tokenizer/token": "^0.3.0", "ieee754": "^1.2.1" } }, "sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww=="],
"tree-kill": ["[email protected]", "", { "bin": { "tree-kill": "cli.js" } }, "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A=="],
+ "truncate-utf8-bytes": ["[email protected]", "", { "dependencies": { "utf8-byte-length": "^1.0.1" } }, "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ=="],
+
"tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
+ "type-fest": ["[email protected]", "", {}, "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg=="],
+
"typescript": ["[email protected]", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="],
"uint8array-extras": ["[email protected]", "", {}, "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A=="],
- "undici-types": ["[email protected]", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="],
+ "undici": ["[email protected]", "", {}, "sha512-LIY910g9TI13YS95lrMFrs8Rm/u/irgHeTWoKCoteeJ04CUJ92eEfj0rVn+7VKMPBpUPiUoBKfhNyLI23EE/KA=="],
+
+ "undici-types": ["[email protected]", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
+
+ "unique-filename": ["[email protected]", "", { "dependencies": { "unique-slug": "^3.0.0" } }, "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A=="],
+
+ "unique-slug": ["[email protected]", "", { "dependencies": { "imurmurhash": "^0.1.4" } }, "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w=="],
+
+ "universalify": ["[email protected]", "", {}, "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw=="],
+
+ "uri-js": ["[email protected]", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg=="],
+
+ "utf8-byte-length": ["[email protected]", "", {}, "sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA=="],
+
+ "util-deprecate": ["[email protected]", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="],
+
+ "verror": ["[email protected]", "", { "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", "extsprintf": "^1.2.0" } }, "sha512-veufcmxri4e3XSrT0xwfUR7kguIkaxBeosDg00yDWhk49wdwkSUrvvsm7nc75e1PUyvIeZj6nS8VQRYz2/S4Xg=="],
+
+ "wcwidth": ["[email protected]", "", { "dependencies": { "defaults": "^1.0.3" } }, "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg=="],
+
+ "which": ["[email protected]", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
+
+ "wide-align": ["[email protected]", "", { "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" } }, "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg=="],
"win-guid": ["[email protected]", "", {}, "sha512-gEIQU4mkgl2OPeoNrWflcJFJ3Ae2BPd4eCsHHA/XikslkIVms/nHhvnvzIZV7VLmBvtFlDOzLt9rrZT+n6D67A=="],
"wrap-ansi": ["[email protected]", "", { "dependencies": { "ansi-styles": "^6.2.1", "string-width": "^7.0.0", "strip-ansi": "^7.1.0" } }, "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww=="],
+ "wrap-ansi-cjs": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],
+
+ "wrappy": ["[email protected]", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],
+
+ "ws": ["[email protected]", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw=="],
+
+ "xmlbuilder": ["[email protected]", "", {}, "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="],
+
"y18n": ["[email protected]", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="],
+ "yallist": ["[email protected]", "", {}, "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="],
+
"yargs": ["[email protected]", "", { "dependencies": { "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "string-width": "^7.2.0", "y18n": "^5.0.5", "yargs-parser": "^22.0.0" } }, "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg=="],
"yargs-parser": ["[email protected]", "", {}, "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw=="],
+ "yauzl": ["[email protected]", "", { "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" } }, "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g=="],
+
+ "yocto-queue": ["[email protected]", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="],
+
"yocto-spinner": ["[email protected]", "", { "dependencies": { "yoctocolors": "^2.1.1" } }, "sha512-DODGl1wJjA/s5pnJFKau9lIYHT81lnhob1i3e1TjxZRxEhWRKl74nTbWE6H5KlkViQQTo/Z29YFdxzTZAMY3ng=="],
"yoctocolors": ["[email protected]", "", {}, "sha512-xYqdZFUK/VYazNl/oCDYN+3WloWQwMfZxBoiNt6qNyk+xfOdi598muWE42rNZFp1kNOiqW936q5RhUdnpqElSg=="],
+
+ "zip-stream": ["[email protected]", "", { "dependencies": { "archiver-utils": "^3.0.4", "compress-commons": "^4.1.2", "readable-stream": "^3.6.0" } }, "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ=="],
+
+ "@electron/asar/glob": ["[email protected]", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
+
+ "@electron/asar/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="],
+
+ "@electron/get/fs-extra": ["[email protected]", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } }, "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g=="],
+
+ "@electron/notarize/fs-extra": ["[email protected]", "", { "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ=="],
+
+ "@electron/osx-sign/isbinaryfile": ["[email protected]", "", {}, "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw=="],
+
+ "@electron/rebuild/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
+
+ "@electron/rebuild/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="],
+
+ "@electron/rebuild/yargs": ["[email protected]", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g=="],
+
+ "@electron/universal/fs-extra": ["[email protected]", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-EQsFzMUJkCKGr1ePqlYADkIUmHW1s3ZXr5Yqy6wbGrfUCphpl2maM/kyOIRA2HpP3AaFQTZXD4ldjek+nccddA=="],
+
+ "@electron/universal/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^2.0.2" } }, "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg=="],
+
+ "@isaacs/cliui/string-width": ["[email protected]", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="],
+
+ "@isaacs/cliui/wrap-ansi": ["[email protected]", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="],
+
+ "@malept/flatpak-bundler/fs-extra": ["[email protected]", "", { "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ=="],
+
+ "@npmcli/fs/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="],
+
+ "@types/cacheable-request/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw=="],
+
+ "@types/fs-extra/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw=="],
+
+ "@types/keyv/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw=="],
+
+ "@types/plist/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw=="],
+
+ "@types/responselike/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw=="],
+
+ "@types/yauzl/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw=="],
+
+ "app-builder-lib/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="],
+
+ "archiver-utils/glob": ["[email protected]", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
+
+ "archiver-utils/readable-stream": ["[email protected]", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
+
+ "builder-util/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
+
+ "bun-types/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw=="],
+
+ "cacache/glob": ["[email protected]", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^5.0.1", "once": "^1.3.0" } }, "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ=="],
+
+ "cacache/lru-cache": ["[email protected]", "", {}, "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA=="],
+
+ "cacache/minipass": ["[email protected]", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
+
+ "cli-truncate/string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
+
+ "clone-response/mimic-response": ["[email protected]", "", {}, "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ=="],
+
+ "config-file-ts/typescript": ["[email protected]", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
+
+ "dir-compare/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="],
+
+ "electron/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-6oYBAi5ikg4Pl+kGsoYtawUMBT2zZMCvPNF7pVLnHZfd1zf38DRiWn/gT01RYCdUqkv7Fhr+C9ot4/tb+2sVvA=="],
+
+ "electron-builder/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
+
+ "electron-builder/yargs": ["[email protected]", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g=="],
+
+ "electron-publish/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
+
+ "filelist/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw=="],
+
+ "fs-minipass/minipass": ["[email protected]", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
+
+ "gauge/signal-exit": ["[email protected]", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="],
+
+ "gauge/string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
+
+ "gauge/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
+ "glob/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^2.0.2" } }, "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg=="],
+
+ "glob/minipass": ["[email protected]", "", {}, "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A=="],
+
+ "global-agent/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="],
+
+ "lazystream/readable-stream": ["[email protected]", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
+
+ "log-symbols/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
+
+ "make-fetch-happen/http-proxy-agent": ["[email protected]", "", { "dependencies": { "@tootallnate/once": "2", "agent-base": "6", "debug": "4" } }, "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w=="],
+
+ "make-fetch-happen/https-proxy-agent": ["[email protected]", "", { "dependencies": { "agent-base": "6", "debug": "4" } }, "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA=="],
+
+ "make-fetch-happen/lru-cache": ["[email protected]", "", {}, "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA=="],
+
+ "make-fetch-happen/minipass": ["[email protected]", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
+
+ "minipass-collect/minipass": ["[email protected]", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
+
+ "minipass-fetch/minipass": ["[email protected]", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
+
+ "minipass-flush/minipass": ["[email protected]", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
+
+ "minipass-pipeline/minipass": ["[email protected]", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
+
+ "minipass-sized/minipass": ["[email protected]", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
+
+ "minizlib/minipass": ["[email protected]", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
+
+ "node-abi/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="],
+
+ "node-api-version/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="],
+
+ "node-gyp/glob": ["[email protected]", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
+
+ "node-gyp/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="],
+
+ "ora/chalk": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
+
+ "ora/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
+ "path-scurry/lru-cache": ["[email protected]", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],
+
+ "path-scurry/minipass": ["[email protected]", "", {}, "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A=="],
+
+ "readdir-glob/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw=="],
+
+ "restore-cursor/signal-exit": ["[email protected]", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="],
+
+ "rimraf/glob": ["[email protected]", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
+
+ "simple-update-notifier/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA=="],
+
+ "socks-proxy-agent/agent-base": ["[email protected]", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="],
+
+ "ssri/minipass": ["[email protected]", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="],
+
+ "string-width-cjs/emoji-regex": ["[email protected]", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
+
+ "string-width-cjs/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
+ "string_decoder/safe-buffer": ["[email protected]", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
+
+ "strip-ansi-cjs/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
+ "wide-align/string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
+
+ "wrap-ansi/ansi-styles": ["[email protected]", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="],
+
+ "wrap-ansi-cjs/string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
+
+ "wrap-ansi-cjs/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
+ "zip-stream/archiver-utils": ["[email protected]", "", { "dependencies": { "glob": "^7.2.3", "graceful-fs": "^4.2.0", "lazystream": "^1.0.0", "lodash.defaults": "^4.2.0", "lodash.difference": "^4.5.0", "lodash.flatten": "^4.4.0", "lodash.isplainobject": "^4.0.6", "lodash.union": "^4.6.0", "normalize-path": "^3.0.0", "readable-stream": "^3.6.0" } }, "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw=="],
+
+ "@electron/asar/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw=="],
+
+ "@electron/get/fs-extra/jsonfile": ["[email protected]", "", { "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg=="],
+
+ "@electron/get/fs-extra/universalify": ["[email protected]", "", {}, "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="],
+
+ "@electron/rebuild/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
+
+ "@electron/rebuild/yargs/cliui": ["[email protected]", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ=="],
+
+ "@electron/rebuild/yargs/string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
+
+ "@electron/rebuild/yargs/yargs-parser": ["[email protected]", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="],
+
+ "@electron/universal/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg=="],
+
+ "@isaacs/cliui/string-width/emoji-regex": ["[email protected]", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="],
+
+ "@isaacs/cliui/wrap-ansi/ansi-styles": ["[email protected]", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="],
+
+ "@types/cacheable-request/@types/node/undici-types": ["[email protected]", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="],
+
+ "@types/fs-extra/@types/node/undici-types": ["[email protected]", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="],
+
+ "@types/keyv/@types/node/undici-types": ["[email protected]", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="],
+
+ "@types/plist/@types/node/undici-types": ["[email protected]", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="],
+
+ "@types/responselike/@types/node/undici-types": ["[email protected]", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="],
+
+ "@types/yauzl/@types/node/undici-types": ["[email protected]", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="],
+
+ "archiver-utils/glob/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="],
+
+ "archiver-utils/readable-stream/string_decoder": ["[email protected]", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="],
+
+ "builder-util/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
+
+ "bun-types/@types/node/undici-types": ["[email protected]", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="],
+
+ "cacache/glob/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw=="],
+
+ "cli-truncate/string-width/emoji-regex": ["[email protected]", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
+
+ "cli-truncate/string-width/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
+ "dir-compare/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw=="],
+
+ "electron-builder/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
+
+ "electron-builder/yargs/cliui": ["[email protected]", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ=="],
+
+ "electron-builder/yargs/string-width": ["[email protected]", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
+
+ "electron-builder/yargs/yargs-parser": ["[email protected]", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="],
+
+ "electron-publish/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
+
+ "filelist/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg=="],
+
+ "gauge/string-width/emoji-regex": ["[email protected]", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
+
+ "gauge/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
+ "glob/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg=="],
+
+ "lazystream/readable-stream/string_decoder": ["[email protected]", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="],
+
+ "log-symbols/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
+
+ "make-fetch-happen/http-proxy-agent/agent-base": ["[email protected]", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="],
+
+ "make-fetch-happen/https-proxy-agent/agent-base": ["[email protected]", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="],
+
+ "node-gyp/glob/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="],
+
+ "ora/chalk/supports-color": ["[email protected]", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
+
+ "ora/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
+ "readdir-glob/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg=="],
+
+ "rimraf/glob/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="],
+
+ "string-width-cjs/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
+ "wide-align/string-width/emoji-regex": ["[email protected]", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
+
+ "wide-align/string-width/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
+ "wrap-ansi-cjs/string-width/emoji-regex": ["[email protected]", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
+
+ "wrap-ansi-cjs/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
+ "zip-stream/archiver-utils/glob": ["[email protected]", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
+
+ "@electron/asar/minimatch/brace-expansion/balanced-match": ["[email protected]", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
+
+ "@electron/rebuild/yargs/cliui/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
+ "@electron/rebuild/yargs/cliui/wrap-ansi": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],
+
+ "@electron/rebuild/yargs/string-width/emoji-regex": ["[email protected]", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
+
+ "@electron/rebuild/yargs/string-width/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
+ "@electron/universal/minimatch/brace-expansion/balanced-match": ["[email protected]", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
+
+ "archiver-utils/glob/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw=="],
+
+ "cacache/glob/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg=="],
+
+ "cli-truncate/string-width/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
+ "dir-compare/minimatch/brace-expansion/balanced-match": ["[email protected]", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
+
+ "electron-builder/yargs/cliui/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
+ "electron-builder/yargs/cliui/wrap-ansi": ["[email protected]", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],
+
+ "electron-builder/yargs/string-width/emoji-regex": ["[email protected]", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
+
+ "electron-builder/yargs/string-width/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
+
+ "filelist/minimatch/brace-expansion/balanced-match": ["[email protected]", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
+
+ "glob/minimatch/brace-expansion/balanced-match": ["[email protected]", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
+
+ "node-gyp/glob/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw=="],
+
+ "readdir-glob/minimatch/brace-expansion/balanced-match": ["[email protected]", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
+
+ "rimraf/glob/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw=="],
+
+ "wide-align/string-width/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
+ "zip-stream/archiver-utils/glob/minimatch": ["[email protected]", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="],
+
+ "@electron/rebuild/yargs/cliui/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
+ "@electron/rebuild/yargs/string-width/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
+ "archiver-utils/glob/minimatch/brace-expansion/balanced-match": ["[email protected]", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
+
+ "cacache/glob/minimatch/brace-expansion/balanced-match": ["[email protected]", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
+
+ "electron-builder/yargs/cliui/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
+ "electron-builder/yargs/string-width/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
+
+ "node-gyp/glob/minimatch/brace-expansion/balanced-match": ["[email protected]", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
+
+ "rimraf/glob/minimatch/brace-expansion/balanced-match": ["[email protected]", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
+
+ "zip-stream/archiver-utils/glob/minimatch/brace-expansion": ["[email protected]", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw=="],
+
+ "zip-stream/archiver-utils/glob/minimatch/brace-expansion/balanced-match": ["[email protected]", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
}
}
diff --git a/package.json b/package.json
index 5521306..84608e8 100644
--- a/package.json
+++ b/package.json
@@ -4,27 +4,22 @@
"private": true,
"type": "module",
"workspaces": [
- "apps/*",
- "packages/*"
+ "web/*",
+ "apps/*"
],
"scripts": {
- "dev": "concurrently -k -n api,web \"bun run --filter @musicapp/server dev\" \"bun run --filter @musicapp/web dev\"",
- "build": "bun run --filter @musicapp/web build",
+ "dev": "concurrently -k -n api,web \"bun run --filter @musicapp/server dev\" \"bun run --filter @musicapp/client dev\"",
+ "build": "bun run --filter @musicapp/client build",
"start": "bun run --filter @musicapp/server start",
"migrate": "bun run --filter @musicapp/server migrate",
"typecheck": "bun run --filter '*' typecheck",
- "tauri": "tauri",
- "desktop:dev": "cd apps/desktop/src-tauri && bunx tauri dev",
- "desktop:build": "cd apps/desktop/src-tauri && bunx tauri build",
- "android:init": "cd apps/desktop/src-tauri && bunx tauri android init",
- "android:dev": "cd apps/desktop/src-tauri && bunx tauri android dev",
- "android:build": "cd apps/desktop/src-tauri && bunx tauri android build --apk"
+ "desktop:dev": "bun run --filter @musicapp/desktop dev",
+ "desktop:build": "bun run --filter @musicapp/desktop build"
},
"dependencies": {
"@dotenvx/dotenvx": "^2.21.0"
},
"devDependencies": {
- "@tauri-apps/cli": "^2.11.4",
"concurrently": "^10.0.5",
"typescript": "^7.0.2",
"@types/bun": "^1.4.0"
diff --git a/packaging/aur/PKGBUILD b/packaging/aur/PKGBUILD
index ad20f9b..a814eaa 100644
--- a/packaging/aur/PKGBUILD
+++ b/packaging/aur/PKGBUILD
@@ -8,15 +8,11 @@
# will overwrite your change. `pkgrel` is likewise reset to 1 every release;
# a pkgrel-only bump means bumping it here and re-running the workflow.
#
-# It repackages the published AppImage rather than building from source:
-# building here would mean fetching the proprietary Discord Social SDK from
-# our own CDN mid-build and compiling the whole Tauri/Rust tree on the user's
-# machine. Note that Arch's naming guidelines would call this a `-bin`
-# package; the unsuffixed name is a deliberate maintainer preference.
-#
-# The AppImage deliberately bundles no system libraries (see the "unbundle the
-# GTK/WebKitGTK stack" step in the release workflow), so this really is just
-# the app binary plus the Discord SDK — `depends` below is the whole runtime.
+# It repackages the published Electron AppImage rather than building from
+# source (Arch's guidelines would call that a `-bin` package; the unsuffixed
+# name is a deliberate maintainer preference). The AppImage bundles its own
+# Chromium/Electron runtime, so `depends` below is just the system libraries
+# Chromium dlopen()s at runtime.
pkgname=doughmination-music
pkgver=1.0.0
@@ -26,35 +22,23 @@ arch=('x86_64')
url="https://github.com/Clove-Web/pocket-id-music-player"
license=('LicenseRef-DASL-1.0')
depends=(
- # Linked by the app binary itself.
- 'webkit2gtk-4.1'
'gtk3'
- 'libsoup3'
- 'glib2'
- 'gdk-pixbuf2'
- 'cairo'
- 'dbus'
- 'gcc-libs'
- 'glibc'
- # Linked by libdiscord_partner_sdk.so — all DT_NEEDED entries, so the app
- # fails to start outright if any are missing, not just Rich Presence.
+ 'nss'
'alsa-lib'
- 'libpulse'
- 'libx11'
- 'libatomic'
+ 'libnotify'
+ 'libxss'
# Owns the /usr/share/icons/hicolor hierarchy this package drops icons into.
'hicolor-icon-theme'
- # Sign-in hands the OIDC flow to the system browser via tauri-plugin-opener,
- # which shells out to xdg-open.
+ # Sign-in hands the OIDC flow to the system browser (shell.openExternal ->
+ # xdg-open).
'xdg-utils'
)
-# Prebuilt upstream binaries: nothing to strip, no debug package to split out.
options=('!strip' '!debug')
-# Tauri names the artifact from `productName` + the version in
-# tauri.conf.json, which is not necessarily the git tag — the workflow
-# overwrites this line with the asset name it actually finds on the release.
-_appimagefile="Doughmination.Music_${pkgver}_amd64.AppImage"
+# electron-builder names this from apps/desktop/electron-builder.yml's
+# `artifactName` (version-less). The workflow overwrites this line with the
+# asset name it actually finds on the release, so a mismatch can't 404.
+_appimagefile="Doughmination.Music_amd64.AppImage"
source=(
"$pkgname-$pkgver.AppImage::$url/releases/download/v$pkgver/$_appimagefile"
@@ -74,25 +58,28 @@ prepare() {
package() {
cd "$srcdir/squashfs-root"
- # The binary finds libdiscord_partner_sdk.so through a `$ORIGIN/../lib`
- # RUNPATH (see apps/desktop/src-tauri/build.rs), so bin/ and lib/ have to
- # stay siblings under /opt — hence no plain /usr/bin install.
- install -Dm755 "usr/bin/$pkgname" "$pkgdir/opt/$pkgname/bin/$pkgname"
- install -Dm755 usr/lib/libdiscord_partner_sdk.so \
- "$pkgdir/opt/$pkgname/lib/libdiscord_partner_sdk.so"
+ # Electron needs its resources (app.asar, locales, …) adjacent to the
+ # binary, so install the whole tree under /opt and symlink into PATH.
+ install -dm755 "$pkgdir/opt/$pkgname"
+ cp -a usr/lib/"$pkgname"/. "$pkgdir/opt/$pkgname/"
+ chmod 4755 "$pkgdir/opt/$pkgname/chrome-sandbox" 2>/dev/null || true
+
install -dm755 "$pkgdir/usr/bin"
- ln -s "/opt/$pkgname/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
+ ln -s "/opt/$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm644 usr/share/applications/*.desktop \
"$pkgdir/usr/share/applications/$pkgname.desktop"
+ # Point Exec at the installed path and make sure the deep-link callback URL
+ # is forwarded (Exec needs a %u for the doughmination:// sign-in bounce).
+ sed -i \
+ -e "s|^Exec=.*|Exec=/usr/bin/$pkgname %u|" \
+ "$pkgdir/usr/share/applications/$pkgname.desktop"
local icon dir
for icon in usr/share/icons/hicolor/*/apps/"$pkgname".png; do
+ [ -f "$icon" ] || continue
dir="${icon#usr/share/icons/hicolor/}"
dir="${dir%%/*}"
- # Tauri emits a "256x256@2" directory; hicolor's scaled-icon dirs are
- # named "...@2x", and anything else is ignored by the icon cache.
- [[ $dir == *@2 ]] && dir="${dir}x"
install -Dm644 "$icon" "$pkgdir/usr/share/icons/hicolor/$dir/apps/$pkgname.png"
done
diff --git a/vendor/discord_social_sdk/.gitignore b/vendor/discord_social_sdk/.gitignore
deleted file mode 100644
index f0f259c..0000000
--- a/vendor/discord_social_sdk/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/target
-/discord_social_sdk
-/.claude
\ No newline at end of file
diff --git a/vendor/discord_social_sdk/Cargo.lock b/vendor/discord_social_sdk/Cargo.lock
deleted file mode 100644
index ca29e57..0000000
--- a/vendor/discord_social_sdk/Cargo.lock
+++ /dev/null
@@ -1,235 +0,0 @@
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
-version = 4
-
-[[package]]
-name = "aho-corasick"
-version = "1.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "bindgen"
-version = "0.72.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
-dependencies = [
- "bitflags",
- "cexpr",
- "clang-sys",
- "itertools",
- "log",
- "prettyplease",
- "proc-macro2",
- "quote",
- "regex",
- "rustc-hash",
- "shlex",
- "syn",
-]
-
-[[package]]
-name = "bitflags"
-version = "2.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
-
-[[package]]
-name = "cexpr"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
-dependencies = [
- "nom",
-]
-
-[[package]]
-name = "cfg-if"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
-
-[[package]]
-name = "clang-sys"
-version = "1.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
-dependencies = [
- "glob",
- "libc",
- "libloading",
-]
-
-[[package]]
-name = "discord_social_sdk"
-version = "0.1.2"
-dependencies = [
- "discord_social_sdk_sys",
-]
-
-[[package]]
-name = "discord_social_sdk_sys"
-version = "0.1.2"
-dependencies = [
- "bindgen",
-]
-
-[[package]]
-name = "either"
-version = "1.16.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e"
-
-[[package]]
-name = "glob"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
-
-[[package]]
-name = "itertools"
-version = "0.13.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
-dependencies = [
- "either",
-]
-
-[[package]]
-name = "libc"
-version = "0.2.186"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
-
-[[package]]
-name = "libloading"
-version = "0.8.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
-dependencies = [
- "cfg-if",
- "windows-link",
-]
-
-[[package]]
-name = "log"
-version = "0.4.33"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
-
-[[package]]
-name = "memchr"
-version = "2.8.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
-
-[[package]]
-name = "minimal-lexical"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
-
-[[package]]
-name = "nom"
-version = "7.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
-dependencies = [
- "memchr",
- "minimal-lexical",
-]
-
-[[package]]
-name = "prettyplease"
-version = "0.2.37"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
-dependencies = [
- "proc-macro2",
- "syn",
-]
-
-[[package]]
-name = "proc-macro2"
-version = "1.0.107"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
-dependencies = [
- "unicode-ident",
-]
-
-[[package]]
-name = "quote"
-version = "1.0.47"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
-dependencies = [
- "proc-macro2",
-]
-
-[[package]]
-name = "regex"
-version = "1.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-automata",
- "regex-syntax",
-]
-
-[[package]]
-name = "regex-automata"
-version = "0.4.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-syntax",
-]
-
-[[package]]
-name = "regex-syntax"
-version = "0.8.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
-
-[[package]]
-name = "rustc-hash"
-version = "2.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
-
-[[package]]
-name = "shlex"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
-
-[[package]]
-name = "syn"
-version = "2.0.119"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
-dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
-]
-
-[[package]]
-name = "unicode-ident"
-version = "1.0.24"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
-
-[[package]]
-name = "windows-link"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
diff --git a/vendor/discord_social_sdk/Cargo.toml b/vendor/discord_social_sdk/Cargo.toml
deleted file mode 100644
index aa9268e..0000000
--- a/vendor/discord_social_sdk/Cargo.toml
+++ /dev/null
@@ -1,17 +0,0 @@
-[workspace]
-members = ["crates/discord_social_sdk_sys", "crates/discord_social_sdk"]
-resolver = "3"
-
-[workspace.package]
-# 0.1.0 of the -sys crate is already on crates.io with a build script that gave a
-# poor error when the SDK was missing, and without README or metadata. That
-# version cannot be replaced, so the fixes ship as 0.1.1.
-version = "0.1.2"
-edition = "2024"
-license = "MIT"
-repository = "https://github.com/SafeShows/discord_social_sdk"
-homepage = "https://github.com/SafeShows/discord_social_sdk"
-documentation = "https://safeshows.github.io/discord_social_sdk/"
-
-[workspace.dependencies]
-discord_social_sdk_sys = { path = "crates/discord_social_sdk_sys", version = "0.1.2" }
diff --git a/vendor/discord_social_sdk/PATCH_NOTES.md b/vendor/discord_social_sdk/PATCH_NOTES.md
deleted file mode 100644
index 8f75982..0000000
--- a/vendor/discord_social_sdk/PATCH_NOTES.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Local patch
-
-Vendored from https://github.com/SafeShows/discord_social_sdk @ 9d745d33
-(the exact commit this project's Cargo.lock had pinned).
-
-## Why
-
-`ActivityGamePlatforms` (crates/discord_social_sdk/src/enums.rs) and
-`ErrorKind::Other` (crates/discord_social_sdk/src/error.rs) were typed as
-`i32`, but bindgen generates `u32` (`c_uint`) for the corresponding raw SDK
-type on this target — causing a hard compile error. Both were widened to
-`u32` to match. Two files, four lines total — see git blame / diff against
-the upstream commit above for the exact change.
-
-## Removing this fork
-
-Once https://github.com/SafeShows/discord_social_sdk fixes this upstream
-(worth opening an issue with the compiler output if there isn't one
-already), delete `vendor/discord_social_sdk/` and the `[patch]` block in
-`apps/desktop/src-tauri/Cargo.toml`, then bump the `discord_social_sdk`
-git dependency to the fixed commit.
diff --git a/vendor/discord_social_sdk/README.md b/vendor/discord_social_sdk/README.md
deleted file mode 100644
index 28723b4..0000000
--- a/vendor/discord_social_sdk/README.md
+++ /dev/null
@@ -1,135 +0,0 @@
-# discord_social_sdk
-
-Rust bindings to the [Discord Social SDK](https://discord.com/developers/docs/discord-social-sdk/overview).
-
-📖 **[API documentation](https://safeshows.github.io/discord_social_sdk/)**
-
-Two crates:
-
-| Crate | What it is |
-| --- | --- |
-| `discord_social_sdk_sys` | Raw FFI. Generated by `bindgen` from `cdiscord.h`; covers all 513 exported functions. Entirely `unsafe`. |
-| `discord_social_sdk` | Safe wrapper. RAII handles, `Option` for optional fields, `Result` for fallible calls, closures for callbacks. |
-
-## Getting the SDK
-
-These crates bind a **prebuilt** SDK that Discord distributes separately; it is not
-vendored here. Download it from your application's page in the
-[Discord Developer Portal](https://discord.com/developers/applications), then either:
-
-- unpack it to `discord_social_sdk/` at the workspace root (the default), or
-- point `DISCORD_SOCIAL_SDK_DIR` at wherever you unpacked it.
-
-The build script locates the SDK, links the right library for the target, and copies
-the shared library next to the built binary so `cargo run` and `cargo test` work
-without any manual staging.
-
-Supported targets: Windows (`.lib` + `.dll`), Linux (`.so`), and macOS (`.dylib`, or
-the `.xcframework` slice when no flat dylib is present). Enable the `krisp` feature
-to link Discord's Krisp noise-cancellation build and stage its `.kef` model files.
-
-## Usage
-
-The SDK is callback-driven and single-threaded. Nothing happens until
-`run_callbacks()` is pumped, and every callback is delivered on the thread that
-calls it:
-
-```rust,no_run
-use discord_social_sdk::{Client, enums::ClientStatus, run_callbacks};
-
-let mut client = Client::new();
-client.set_application_id(YOUR_APP_ID);
-
-client.on_status_changed(|status, error, detail| {
- if let Some(error) = error {
- eprintln!("connection error: {error:?} ({detail})");
- }
- if status == ClientStatus::Ready {
- println!("connected");
- }
-});
-
-client.connect();
-
-loop {
- run_callbacks();
- std::thread::sleep(std::time::Duration::from_millis(16));
-}
-```
-
-Authorization follows OAuth2 with PKCE — see the `client::auth` module docs for the
-full flow.
-
-## How the C API maps to Rust
-
-The C API is regular enough that the mapping is mechanical:
-
-| C | Rust |
-| --- | --- |
-| `struct T { void* opaque; }` + `_Init`/`_Drop`/`_Clone` | a struct with `Drop` and `Clone` |
-| `Discord_String` out-param | `String` (the SDK's buffer is freed for you) |
-| `bool Get(self, T* out)` | `Option<T>` |
-| `Set(self, T* value)` with null meaning "clear" | `Option<T>` argument |
-| `Discord_XSpan` out-param | `Vec<X>` |
-| `Discord_ClientResult` | `Result<T, Error>` |
-| `(callback, userDataFree, userData)` | a boxed closure, freed by the SDK |
-
-Two rules the wrapper enforces so you do not have to:
-
-- **Strings passed in are borrowed, strings passed out are owned.** The SDK copies
- its inputs, and the wrapper frees every buffer it hands you.
-- **Everything a callback receives is owned, not lent** — handles, strings, spans,
- and the `ClientResult` itself. Each must be released exactly once, and the
- wrapper does that for you. (This is easy to get backwards: the natural
- assumption is that a callback argument is borrowed for the duration of the call.
- It is not, and treating it that way leaks on every event.)
-
-### A caveat worth knowing
-
-`Client::add_log_callback` and `add_voice_log_callback` are the one place the SDK
-does not promise to release your closure, and the two SDK builds disagree: the
-release library frees it when the client is dropped, the debug library keeps it
-for the whole process. Write log handlers that are fine either way — keep their
-captures small and free of anything lifetime-sensitive.
-
-## Threading
-
-Wrapper types are neither `Send` nor `Sync` by design: the SDK expects to be driven
-from a single thread. `set_free_threaded()` opts the underlying SDK into its
-thread-safe mode, which only matters if you use the `sys` crate directly.
-
-## Panics across FFI
-
-A panic inside one of your callbacks would otherwise abort the process, since
-unwinding out of an `extern "C"` function is not allowed. The wrapper catches
-panics at the boundary, reports them on stderr, and keeps the SDK running.
-
-## Documentation
-
-Docs are hosted on [GitHub Pages](https://safeshows.github.io/discord_social_sdk/),
-not docs.rs.
-
-docs.rs builds every crate itself, in a sandbox with no network access — and this
-crate cannot be built without Discord's SDK, whose header is not ours to
-redistribute inside a published package. So there is nothing for docs.rs to
-compile against, and it is left unconfigured rather than configured to fail.
-
-To rebuild and publish the docs from a machine that has the SDK:
-
-```bash
-./scripts/publish-docs.sh # build and stage on the gh-pages branch
-./scripts/publish-docs.sh --push # ...and push it
-```
-
-The script replaces the branch contents wholesale, adds the redirect and
-`.nojekyll` that Pages needs, and is a no-op when nothing changed. Pushing is
-opt-in because it rewrites the whole branch.
-
-Enable Pages once, under **Settings → Pages → Deploy from a branch → `gh-pages` / root**.
-
-Locally, `cargo doc --open` works as usual.
-
-## License
-
-The bindings are MIT licensed. The Discord Social SDK binaries they link against are
-covered by Discord's own license — see `License-Notices.txt` in the SDK download.
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/Cargo.toml b/vendor/discord_social_sdk/crates/discord_social_sdk/Cargo.toml
deleted file mode 100644
index 9301b5c..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/Cargo.toml
+++ /dev/null
@@ -1,22 +0,0 @@
-[package]
-name = "discord_social_sdk"
-version.workspace = true
-edition.workspace = true
-license.workspace = true
-repository.workspace = true
-homepage.workspace = true
-documentation.workspace = true
-description = "Safe Rust bindings to the Discord Social SDK"
-readme = "README.md"
-keywords = ["discord", "sdk", "bindings", "gamedev", "voice"]
-categories = ["api-bindings", "game-development"]
-
-[dependencies]
-discord_social_sdk_sys.workspace = true
-
-[features]
-default = []
-krisp = ["discord_social_sdk_sys/krisp"]
-
-# No `[package.metadata.docs.rs]`: docs.rs cannot build the `-sys` crate this
-# depends on. See that crate's manifest, and scripts/publish-docs.sh.
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/README.md b/vendor/discord_social_sdk/crates/discord_social_sdk/README.md
deleted file mode 100644
index f4c0666..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/README.md
+++ /dev/null
@@ -1,100 +0,0 @@
-# discord_social_sdk
-
-Safe Rust bindings to the [Discord Social SDK](https://discord.com/developers/docs/discord-social-sdk/overview)
-— friends, lobbies, messaging, voice calls, and rich presence.
-
-📖 **[API documentation](https://safeshows.github.io/discord_social_sdk/)**
-
-Handles become RAII types, optional fields become `Option`, fallible calls become
-`Result`, and callbacks become closures. 502 of the C API's 513 exported
-functions are wrapped; the raw layer lives in
-[`discord_social_sdk_sys`](https://crates.io/crates/discord_social_sdk_sys).
-
-## Supplying the SDK
-
-This crate binds a prebuilt SDK that Discord distributes separately. It is not
-vendored here and cannot be fetched automatically. Download it from the
-[Discord Developer Portal](https://discord.com/developers/applications), then
-either place it at `<workspace>/discord_social_sdk` or set
-`DISCORD_SOCIAL_SDK_DIR` to its absolute path. Requires `libclang` for `bindgen`.
-
-Windows, Linux, and macOS are supported. The build script links the right library
-and stages the shared library next to your binary, so `cargo run` works unaided.
-
-## Usage
-
-The SDK is callback-driven and single-threaded. Nothing happens until
-`run_callbacks()` is pumped, and every callback arrives on the thread that calls
-it:
-
-```rust,no_run
-use discord_social_sdk::{Client, enums::ClientStatus, run_callbacks};
-
-let mut client = Client::new();
-client.set_application_id(YOUR_APP_ID);
-
-client.on_status_changed(|status, error, detail| {
- if let Some(error) = error {
- eprintln!("connection error: {error:?} ({detail})");
- }
- if status == ClientStatus::Ready {
- println!("connected");
- }
-});
-
-client.connect();
-
-loop {
- run_callbacks();
- std::thread::sleep(std::time::Duration::from_millis(16));
-}
-```
-
-Authorization is OAuth2 with PKCE — see the `client::auth` module docs for the
-full flow.
-
-## How the C API maps to Rust
-
-| C | Rust |
-| --- | --- |
-| `struct T { void* opaque; }` + `_Init`/`_Drop`/`_Clone` | a struct with `Drop` and `Clone` |
-| `Discord_String` out-param | `String` (the SDK's buffer is freed for you) |
-| `bool Get(self, T* out)` | `Option<T>` |
-| `Set(self, T* value)`, null meaning "clear" | `Option<T>` argument |
-| `Discord_XSpan` out-param | `Vec<X>` |
-| `Discord_ClientResult` | `Result<T, Error>` |
-| `(callback, userDataFree, userData)` | a boxed closure, freed by the SDK |
-
-Two rules the wrapper enforces so you do not have to:
-
-- **Strings passed in are borrowed, strings passed out are owned.** The SDK
- copies its inputs, and the wrapper frees every buffer it hands you.
-- **Everything a callback receives is owned, not lent** — handles, strings,
- spans, and the `ClientResult` itself. Each must be released exactly once. This
- is easy to get backwards; treating a callback argument as borrowed leaks on
- every event.
-
-## Threading
-
-Wrapper types are neither `Send` nor `Sync` by design: the SDK expects to be
-driven from a single thread. `set_free_threaded()` opts the underlying SDK into
-its thread-safe mode, which only matters if you use the `sys` crate directly.
-
-## Panics across FFI
-
-A panic inside one of your callbacks would otherwise abort the process, since
-unwinding out of an `extern "C"` function is not allowed. The wrapper catches
-panics at the boundary, reports them on stderr, and keeps the SDK running.
-
-## One caveat
-
-`Client::add_log_callback` and `add_voice_log_callback` are the one place the SDK
-does not promise to release your closure, and the two SDK builds disagree: the
-release library frees it when the client is dropped, the debug library keeps it
-for the whole process. Keep log handlers' captures small and free of anything
-lifetime-sensitive.
-
-## License
-
-The bindings are MIT licensed. The Discord Social SDK binaries they link against
-are covered by Discord's own terms.
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/examples/leakcheck.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/examples/leakcheck.rs
deleted file mode 100644
index d1d4a16..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/examples/leakcheck.rs
+++ /dev/null
@@ -1,250 +0,0 @@
-//! Empirical leak detector: hammers each allocation path and watches whether the
-//! process's committed memory grows.
-//!
-//! The static audit checks that every `Discord_Free` matches an allocation. This
-//! checks the same thing from the other end, by running each path hundreds of
-//! thousands of times and measuring. A path that leaks even 8 bytes per call
-//! shows up as clear linear growth; a correct one flattens out once the
-//! allocator's free lists reach steady state.
-//!
-//! ```text
-//! cargo run --release --example leakcheck
-//! ```
-//!
-//! What it cannot cover: anything that needs a live authenticated connection.
-//! The callback-delivered strings, spans and `ClientResult`s — the paths whose
-//! ownership rules are the easiest to get wrong — are only reachable with a real
-//! Discord session, so they are exercised by the static audit alone.
-
-use discord_social_sdk::enums::{ActivityType, LoggingSeverity};
-use discord_social_sdk::{Activity, ActivityButton, ActivityParty, Client, run_callbacks};
-
-/// Bytes of private (committed) memory charged to this process.
-///
-/// Private commit is used rather than working set because the working set is
-/// perturbed by paging decisions the leak has nothing to do with.
-#[cfg(windows)]
-fn committed_bytes() -> usize {
- #[repr(C)]
- #[derive(Default)]
- struct ProcessMemoryCounters {
- cb: u32,
- page_fault_count: u32,
- peak_working_set_size: usize,
- working_set_size: usize,
- quota_peak_paged_pool_usage: usize,
- quota_paged_pool_usage: usize,
- quota_peak_non_paged_pool_usage: usize,
- quota_non_paged_pool_usage: usize,
- pagefile_usage: usize,
- peak_pagefile_usage: usize,
- }
-
- unsafe extern "system" {
- fn GetCurrentProcess() -> isize;
- fn K32GetProcessMemoryInfo(
- process: isize,
- counters: *mut ProcessMemoryCounters,
- cb: u32,
- ) -> i32;
- }
-
- let mut counters = ProcessMemoryCounters {
- cb: size_of::<ProcessMemoryCounters>() as u32,
- ..Default::default()
- };
- // SAFETY: `counters` is a correctly sized, fully initialised POD struct, and
- // `cb` reports its size as the API requires.
- let ok = unsafe {
- K32GetProcessMemoryInfo(
- GetCurrentProcess(),
- &mut counters,
- size_of::<ProcessMemoryCounters>() as u32,
- )
- };
- if ok == 0 { 0 } else { counters.pagefile_usage }
-}
-
-#[cfg(not(windows))]
-fn committed_bytes() -> usize {
- // /proc/self/statm reports resident pages; good enough to spot linear growth.
- // Absent on macOS, where this harness cannot measure and will report every
- // path as 0 B/iter — which reads as "clean" but means "not measured". Run it
- // on Windows or Linux for a meaningful result.
- std::fs::read_to_string("/proc/self/statm")
- .ok()
- .and_then(|s| s.split_whitespace().nth(1)?.parse::<usize>().ok())
- .map(|pages| pages * 4096)
- .unwrap_or_else(|| {
- eprintln!("warning: cannot read process memory on this platform; results are meaningless");
- 0
- })
-}
-
-/// Run `body` `iters` times and report bytes retained per iteration.
-///
-/// A warmup pass runs first so that one-off allocations — lazily initialised SDK
-/// state, allocator arena growth — are not misread as a leak.
-fn measure(name: &str, iters: usize, mut body: impl FnMut()) -> f64 {
- let warmup = (iters / 10).max(1_000);
- for _ in 0..warmup {
- body();
- }
-
- let before = committed_bytes();
- for _ in 0..iters {
- body();
- }
- let after = committed_bytes();
-
- let delta = after as i64 - before as i64;
- let per_iter = delta as f64 / iters as f64;
-
- // Allocator noise is a few KB either way; flag only sustained growth.
- let verdict = if per_iter > 1.0 {
- "LEAK?"
- } else if per_iter > 0.05 {
- "watch"
- } else {
- "ok"
- };
- println!(" {name:<44} {delta:>+10} B total {per_iter:>8.3} B/iter {verdict}");
- per_iter
-}
-
-fn main() {
- let iters: usize = std::env::args()
- .nth(1)
- .and_then(|a| a.parse().ok())
- .unwrap_or(200_000);
-
- println!("leakcheck: {iters} iterations per path\n");
- let mut worst: Vec<(String, f64)> = Vec::new();
-
- // --- strings out of the SDK (string::out) ---
- worst.push((
- "static scope getters".into(),
- measure("Client::default_presence_scopes()", iters, || {
- std::hint::black_box(Client::default_presence_scopes());
- }),
- ));
- worst.push((
- "version_hash".into(),
- measure("Client::version_hash()", iters, || {
- std::hint::black_box(Client::version_hash());
- }),
- ));
-
- // --- handle construction and destruction ---
- worst.push((
- "Activity new/drop".into(),
- measure("Activity::new() + drop", iters, || {
- std::hint::black_box(Activity::new());
- }),
- ));
-
- // --- strings into and back out of a handle ---
- let mut activity = Activity::new();
- worst.push((
- "string set/get".into(),
- measure("Activity set_name/name round trip", iters, || {
- activity.set_name("a moderately long activity name");
- std::hint::black_box(activity.name());
- }),
- ));
-
- // --- optional getters (string::out_opt), both present and absent ---
- worst.push((
- "optional string present".into(),
- measure("Activity set_state(Some)/state", iters, || {
- activity.set_state(Some("in a match"));
- std::hint::black_box(activity.state());
- }),
- ));
- activity.set_state(None);
- worst.push((
- "optional string absent".into(),
- measure("Activity state() == None", iters, || {
- std::hint::black_box(activity.state());
- }),
- ));
-
- // --- enums, a pure by-value path used as a control ---
- worst.push((
- "enum round trip (control)".into(),
- measure("Activity activity_type round trip", iters, || {
- activity.set_activity_type(ActivityType::Playing);
- std::hint::black_box(activity.activity_type());
- }),
- ));
-
- // --- spans (span::out): elements adopted, array freed ---
- let mut spanned = Activity::new();
- spanned.add_button(&ActivityButton::with_label_and_url(
- "Play",
- "https://example.com/1",
- ));
- spanned.add_button(&ActivityButton::with_label_and_url(
- "Watch",
- "https://example.com/2",
- ));
- worst.push((
- "span getter".into(),
- measure("Activity::buttons() -> Vec<ActivityButton>", iters, || {
- std::hint::black_box(spanned.buttons());
- }),
- ));
-
- // --- clone ---
- worst.push((
- "handle clone".into(),
- measure("Activity::clone() + drop", iters, || {
- std::hint::black_box(spanned.clone());
- }),
- ));
-
- // --- nested handle in/out (setter copies, getter transfers) ---
- let mut party = ActivityParty::new();
- party.set_id("party-1");
- worst.push((
- "nested handle set/get".into(),
- measure("Activity set_party/party round trip", iters, || {
- activity.set_party(Some(&party));
- std::hint::black_box(activity.party());
- }),
- ));
-
- // --- client construction ---
- worst.push((
- "Client new/drop".into(),
- measure("Client::new() + drop", iters / 20, || {
- std::hint::black_box(Client::new());
- }),
- ));
-
- // --- callback userdata: box, hand to SDK, replace, let SDK free ---
- let mut client = Client::new();
- worst.push((
- "callback register/replace".into(),
- measure("on_status_changed + run_callbacks", iters / 20, || {
- client.on_status_changed(|_, _, _| {});
- run_callbacks();
- }),
- ));
-
- // Log sinks are excluded on purpose: the SDK is documented not to release
- // them, so unbounded growth here is expected behaviour, not a wrapper bug.
- let _ = LoggingSeverity::Info;
-
- println!("\nsummary");
- worst.sort_by(|a, b| b.1.total_cmp(&a.1));
- for (name, per_iter) in worst.iter().take(3) {
- println!(" highest retention: {name:<32} {per_iter:>8.3} B/iter");
- }
- let suspicious = worst.iter().filter(|(_, v)| *v > 1.0).count();
- println!(
- "\n{} of {} paths retained more than 1 B/iter",
- suspicious,
- worst.len()
- );
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/activity.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/activity.rs
deleted file mode 100644
index 143f0ec..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/activity.rs
+++ /dev/null
@@ -1,965 +0,0 @@
-//! Rich presence: what a user is doing, as shown on their Discord profile.
-//!
-//! An [`Activity`] is the whole payload published with
-//! `Client::update_rich_presence`. The satellite types fill in its optional
-//! parts: [`ActivityAssets`] for artwork, [`ActivityTimestamps`] for elapsed and
-//! remaining timers, [`ActivityParty`] for group size, [`ActivitySecrets`] for
-//! the join secret that makes a presence joinable, and [`ActivityButton`] for
-//! custom link buttons.
-//!
-//! [`ActivityInvite`] travels the other direction — it is what the SDK hands the
-//! game when another user invites the current user to join their game.
-//!
-//! See the [rich presence overview] for how each field is rendered.
-//!
-//! [rich presence overview]: https://discord.com/developers/docs/rich-presence/overview
-
-use discord_social_sdk_sys as sys;
-use std::mem::MaybeUninit;
-
-use crate::enums::{
- ActivityActionType, ActivityGamePlatforms, ActivityPartyPrivacy, ActivityType,
- StatusDisplayType,
-};
-use crate::handle::handle;
-use crate::{span, string};
-
-/// Call an optional SDK getter of the shape `bool Get(self, T* out)`, where
-/// `false` means the field is absent and the out-parameter is left untouched.
-///
-/// The string-valued equivalent lives in [`crate::string::out_opt`]; this one
-/// covers plain values, enums and handles.
-///
-/// # Safety
-///
-/// `f` must fully initialise the out-parameter whenever it returns `true`, and
-/// must transfer ownership of it when the value is a handle.
-unsafe fn opt_out<T, F>(f: F) -> Option<T>
-where
- F: FnOnce(*mut T) -> bool,
-{
- let mut raw = MaybeUninit::<T>::uninit();
- if f(raw.as_mut_ptr()) {
- Some(unsafe { raw.assume_init() })
- } else {
- None
- }
-}
-
-// ---------------------------------------------------------------------------
-// ActivityAssets
-// ---------------------------------------------------------------------------
-
-handle! {
- /// Images used to customise how an [`Activity`] is displayed in Discord.
- ///
- /// If nothing is specified, the icon and name of the application are used as
- /// defaults.
- ///
- /// Every image field accepts either the unique identifier of an image
- /// uploaded to the application through the *Rich Presence* page of the
- /// Developer Portal, or an external image URL. So an asset uploaded under the
- /// name `goofy-icon` can be referenced as `"goofy-icon"`, and an image hosted
- /// at `http://my-site.com/goofy.jpg` can be referenced by that URL.
- ///
- /// See [adding custom art assets] for visual examples of what each field does.
- ///
- /// [adding custom art assets]: https://discord.com/developers/docs/rich-presence/overview#adding-custom-art-assets
- ActivityAssets(sys::Discord_ActivityAssets) {
- init: sys::Discord_ActivityAssets_Init,
- drop: sys::Discord_ActivityAssets_Drop,
- clone: sys::Discord_ActivityAssets_Clone,
- }
-}
-
-impl ActivityAssets {
- /// The primary image identifier or URL, rendered as a large square icon.
- ///
- /// If specified, must be between 1 and 300 characters.
- pub fn large_image(&self) -> Option<String> {
- // SAFETY: the getter only reads, and hands us ownership of the string it
- // writes when it returns `true`.
- unsafe { string::out_opt(|p| sys::Discord_ActivityAssets_LargeImage(self.raw_ptr(), p)) }
- }
-
- /// Set the primary image, or clear it with `None`.
- pub fn set_large_image(&mut self, value: Option<&str>) {
- // SAFETY: the SDK copies the string during the call, so borrowing is
- // sound; a null pointer clears the field.
- string::with_opt(value, |p| unsafe {
- sys::Discord_ActivityAssets_SetLargeImage(self.as_raw_mut(), p)
- })
- }
-
- /// A tooltip shown when the user hovers over the large image.
- ///
- /// If specified, must be between 2 and 128 characters.
- pub fn large_text(&self) -> Option<String> {
- // SAFETY: read-only getter transferring ownership of the string.
- unsafe { string::out_opt(|p| sys::Discord_ActivityAssets_LargeText(self.raw_ptr(), p)) }
- }
-
- /// Set the large image tooltip, or clear it with `None`.
- pub fn set_large_text(&mut self, value: Option<&str>) {
- // SAFETY: the SDK copies the string; null clears the field.
- string::with_opt(value, |p| unsafe {
- sys::Discord_ActivityAssets_SetLargeText(self.as_raw_mut(), p)
- })
- }
-
- /// A URL opened when the user clicks or taps the large image.
- ///
- /// If specified, must be between 1 and 256 characters.
- pub fn large_url(&self) -> Option<String> {
- // SAFETY: read-only getter transferring ownership of the string.
- unsafe { string::out_opt(|p| sys::Discord_ActivityAssets_LargeUrl(self.raw_ptr(), p)) }
- }
-
- /// Set the large image link, or clear it with `None`.
- pub fn set_large_url(&mut self, value: Option<&str>) {
- // SAFETY: the SDK copies the string; null clears the field.
- string::with_opt(value, |p| unsafe {
- sys::Discord_ActivityAssets_SetLargeUrl(self.as_raw_mut(), p)
- })
- }
-
- /// The secondary image, rendered as a small circle over the large image.
- ///
- /// If specified, must be between 1 and 300 characters.
- pub fn small_image(&self) -> Option<String> {
- // SAFETY: read-only getter transferring ownership of the string.
- unsafe { string::out_opt(|p| sys::Discord_ActivityAssets_SmallImage(self.raw_ptr(), p)) }
- }
-
- /// Set the secondary image, or clear it with `None`.
- pub fn set_small_image(&mut self, value: Option<&str>) {
- // SAFETY: the SDK copies the string; null clears the field.
- string::with_opt(value, |p| unsafe {
- sys::Discord_ActivityAssets_SetSmallImage(self.as_raw_mut(), p)
- })
- }
-
- /// A tooltip shown when the user hovers over the small image.
- ///
- /// If specified, must be between 2 and 128 characters.
- pub fn small_text(&self) -> Option<String> {
- // SAFETY: read-only getter transferring ownership of the string.
- unsafe { string::out_opt(|p| sys::Discord_ActivityAssets_SmallText(self.raw_ptr(), p)) }
- }
-
- /// Set the small image tooltip, or clear it with `None`.
- pub fn set_small_text(&mut self, value: Option<&str>) {
- // SAFETY: the SDK copies the string; null clears the field.
- string::with_opt(value, |p| unsafe {
- sys::Discord_ActivityAssets_SetSmallText(self.as_raw_mut(), p)
- })
- }
-
- /// A URL opened when the user clicks or taps the small image.
- ///
- /// If specified, must be between 1 and 256 characters.
- pub fn small_url(&self) -> Option<String> {
- // SAFETY: read-only getter transferring ownership of the string.
- unsafe { string::out_opt(|p| sys::Discord_ActivityAssets_SmallUrl(self.raw_ptr(), p)) }
- }
-
- /// Set the small image link, or clear it with `None`.
- pub fn set_small_url(&mut self, value: Option<&str>) {
- // SAFETY: the SDK copies the string; null clears the field.
- string::with_opt(value, |p| unsafe {
- sys::Discord_ActivityAssets_SetSmallUrl(self.as_raw_mut(), p)
- })
- }
-
- /// The image identifier or URL rendered as a banner on activity invites.
- ///
- /// If specified, must be between 1 and 300 characters.
- pub fn invite_cover_image(&self) -> Option<String> {
- // SAFETY: read-only getter transferring ownership of the string.
- unsafe {
- string::out_opt(|p| sys::Discord_ActivityAssets_InviteCoverImage(self.raw_ptr(), p))
- }
- }
-
- /// Set the invite cover image, or clear it with `None`.
- pub fn set_invite_cover_image(&mut self, value: Option<&str>) {
- // SAFETY: the SDK copies the string; null clears the field.
- string::with_opt(value, |p| unsafe {
- sys::Discord_ActivityAssets_SetInviteCoverImage(self.as_raw_mut(), p)
- })
- }
-}
-
-impl std::fmt::Debug for ActivityAssets {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("ActivityAssets")
- .field("large_image", &self.large_image())
- .field("large_text", &self.large_text())
- .field("large_url", &self.large_url())
- .field("small_image", &self.small_image())
- .field("small_text", &self.small_text())
- .field("small_url", &self.small_url())
- .field("invite_cover_image", &self.invite_cover_image())
- .finish()
- }
-}
-
-// ---------------------------------------------------------------------------
-// ActivityTimestamps
-// ---------------------------------------------------------------------------
-
-handle! {
- /// The start and end times of an [`Activity`].
- ///
- /// Used to render either a "time elapsed" count-up timer (by setting
- /// [`start`](ActivityTimestamps::set_start)) or a "time remaining" countdown
- /// (by setting [`end`](ActivityTimestamps::set_end)).
- ActivityTimestamps(sys::Discord_ActivityTimestamps) {
- init: sys::Discord_ActivityTimestamps_Init,
- drop: sys::Discord_ActivityTimestamps_Drop,
- clone: sys::Discord_ActivityTimestamps_Clone,
- }
-}
-
-impl ActivityTimestamps {
- /// The time the activity started, in milliseconds since the Unix epoch.
- pub fn start(&self) -> u64 {
- // SAFETY: read-only getter on an initialised handle.
- unsafe { sys::Discord_ActivityTimestamps_Start(self.raw_ptr()) }
- }
-
- /// Set the start time, in milliseconds since the Unix epoch.
- ///
- /// The SDK converts small-ish values from seconds to milliseconds. When set,
- /// Discord renders a count-up timer showing how long the user has been in
- /// this activity.
- pub fn set_start(&mut self, value: u64) {
- // SAFETY: passing a plain value to a setter on an initialised handle.
- unsafe { sys::Discord_ActivityTimestamps_SetStart(self.as_raw_mut(), value) }
- }
-
- /// The time the activity ends, in milliseconds since the Unix epoch.
- pub fn end(&self) -> u64 {
- // SAFETY: read-only getter on an initialised handle.
- unsafe { sys::Discord_ActivityTimestamps_End(self.raw_ptr()) }
- }
-
- /// Set the end time, in milliseconds since the Unix epoch.
- ///
- /// The SDK converts small-ish values from seconds to milliseconds. When set,
- /// Discord renders a countdown showing how long until the activity ends.
- pub fn set_end(&mut self, value: u64) {
- // SAFETY: passing a plain value to a setter on an initialised handle.
- unsafe { sys::Discord_ActivityTimestamps_SetEnd(self.as_raw_mut(), value) }
- }
-}
-
-impl std::fmt::Debug for ActivityTimestamps {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("ActivityTimestamps")
- .field("start", &self.start())
- .field("end", &self.end())
- .finish()
- }
-}
-
-// ---------------------------------------------------------------------------
-// ActivityParty
-// ---------------------------------------------------------------------------
-
-handle! {
- /// The group of players the current user is playing with.
- ///
- /// Drives the "In a group (2 of 3)" line of a rich presence.
- ActivityParty(sys::Discord_ActivityParty) {
- init: sys::Discord_ActivityParty_Init,
- drop: sys::Discord_ActivityParty_Drop,
- clone: sys::Discord_ActivityParty_Clone,
- }
-}
-
-impl ActivityParty {
- /// The id of the party.
- pub fn id(&self) -> String {
- // SAFETY: read-only getter that transfers ownership of the string to us.
- unsafe { string::out(|p| sys::Discord_ActivityParty_Id(self.raw_ptr(), p)) }
- }
-
- /// Set the id of the party.
- ///
- /// "Party" refers colloquially to a group of players in a shared context —
- /// a lobby id, server id, team id and so on. Every member of the party should
- /// publish the same party id so Discord knows to group them together. Must be
- /// between 2 and 128 characters.
- pub fn set_id(&mut self, value: &str) {
- // SAFETY: the string is passed by value and copied during the call, so
- // the borrow only needs to survive the call itself.
- unsafe { sys::Discord_ActivityParty_SetId(self.as_raw_mut(), string::borrow(value)) }
- }
-
- /// The number of people currently in the party.
- pub fn current_size(&self) -> i32 {
- // SAFETY: read-only getter on an initialised handle.
- unsafe { sys::Discord_ActivityParty_CurrentSize(self.raw_ptr()) }
- }
-
- /// Set the number of people currently in the party; must be at least 1.
- pub fn set_current_size(&mut self, value: i32) {
- // SAFETY: passing a plain value to a setter on an initialised handle.
- unsafe { sys::Discord_ActivityParty_SetCurrentSize(self.as_raw_mut(), value) }
- }
-
- /// The maximum number of people that can be in the party.
- pub fn max_size(&self) -> i32 {
- // SAFETY: read-only getter on an initialised handle.
- unsafe { sys::Discord_ActivityParty_MaxSize(self.raw_ptr()) }
- }
-
- /// Set the maximum party size; must be at least 0.
- ///
- /// When 0, Discord does not display a maximum.
- pub fn set_max_size(&mut self, value: i32) {
- // SAFETY: passing a plain value to a setter on an initialised handle.
- unsafe { sys::Discord_ActivityParty_SetMaxSize(self.as_raw_mut(), value) }
- }
-
- /// The privacy of the party.
- pub fn privacy(&self) -> ActivityPartyPrivacy {
- // SAFETY: read-only getter on an initialised handle.
- ActivityPartyPrivacy::from_raw(unsafe {
- sys::Discord_ActivityParty_Privacy(self.raw_ptr())
- })
- }
-
- /// Set the privacy of the party.
- pub fn set_privacy(&mut self, value: ActivityPartyPrivacy) {
- // SAFETY: passing a plain enum value to a setter on an initialised handle.
- unsafe { sys::Discord_ActivityParty_SetPrivacy(self.as_raw_mut(), value.into_raw()) }
- }
-}
-
-impl std::fmt::Debug for ActivityParty {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("ActivityParty")
- .field("id", &self.id())
- .field("current_size", &self.current_size())
- .field("max_size", &self.max_size())
- .field("privacy", &self.privacy())
- .finish()
- }
-}
-
-// ---------------------------------------------------------------------------
-// ActivitySecrets
-// ---------------------------------------------------------------------------
-
-handle! {
- /// The secret that makes an [`Activity`] joinable.
- ///
- /// Used together with [`ActivityParty`]: without a join secret, Discord has
- /// nothing to hand a user who accepts an invite.
- ActivitySecrets(sys::Discord_ActivitySecrets) {
- init: sys::Discord_ActivitySecrets_Init,
- drop: sys::Discord_ActivitySecrets_Drop,
- clone: sys::Discord_ActivitySecrets_Clone,
- }
-}
-
-impl ActivitySecrets {
- /// The join secret.
- pub fn join(&self) -> String {
- // SAFETY: read-only getter that transfers ownership of the string to us.
- unsafe { string::out(|p| sys::Discord_ActivitySecrets_Join(self.raw_ptr(), p)) }
- }
-
- /// Set the join secret.
- ///
- /// This string is shared with users who are accepted into the party, so the
- /// game knows how to join them — an internal game server id, or a Discord
- /// lobby id or secret, for example. Must be between 2 and 128 characters.
- pub fn set_join(&mut self, value: &str) {
- // SAFETY: the string is passed by value and copied during the call.
- unsafe { sys::Discord_ActivitySecrets_SetJoin(self.as_raw_mut(), string::borrow(value)) }
- }
-}
-
-impl std::fmt::Debug for ActivitySecrets {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- // The secret itself is deliberately not printed.
- f.debug_struct("ActivitySecrets")
- .field("join", &format_args!("<{} chars>", self.join().len()))
- .finish()
- }
-}
-
-// ---------------------------------------------------------------------------
-// ActivityButton
-// ---------------------------------------------------------------------------
-
-handle! {
- /// A custom link button rendered on a rich presence.
- ActivityButton(sys::Discord_ActivityButton) {
- init: sys::Discord_ActivityButton_Init,
- drop: sys::Discord_ActivityButton_Drop,
- clone: sys::Discord_ActivityButton_Clone,
- }
-}
-
-impl ActivityButton {
- /// Create a button with the given label and target URL.
- pub fn with_label_and_url(label: &str, url: &str) -> Self {
- let mut button = Self::new();
- button.set_label(label);
- button.set_url(url);
- button
- }
-
- /// The label of the button.
- pub fn label(&self) -> String {
- // SAFETY: read-only getter that transfers ownership of the string to us.
- unsafe { string::out(|p| sys::Discord_ActivityButton_Label(self.raw_ptr(), p)) }
- }
-
- /// Set the label of the button.
- pub fn set_label(&mut self, value: &str) {
- // SAFETY: the string is passed by value and copied during the call.
- unsafe { sys::Discord_ActivityButton_SetLabel(self.as_raw_mut(), string::borrow(value)) }
- }
-
- /// The URL the button opens.
- pub fn url(&self) -> String {
- // SAFETY: read-only getter that transfers ownership of the string to us.
- unsafe { string::out(|p| sys::Discord_ActivityButton_Url(self.raw_ptr(), p)) }
- }
-
- /// Set the URL the button opens.
- pub fn set_url(&mut self, value: &str) {
- // SAFETY: the string is passed by value and copied during the call.
- unsafe { sys::Discord_ActivityButton_SetUrl(self.as_raw_mut(), string::borrow(value)) }
- }
-}
-
-impl std::fmt::Debug for ActivityButton {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("ActivityButton")
- .field("label", &self.label())
- .field("url", &self.url())
- .finish()
- }
-}
-
-// ---------------------------------------------------------------------------
-// ActivityInvite
-// ---------------------------------------------------------------------------
-
-handle! {
- /// An invitation from one user to another to join their game.
- ///
- /// When a user invites another to join their game on Discord, Discord sends
- /// the recipient a message. The SDK parses those messages automatically, and
- /// this type carries everything needed to later accept the invite.
- ActivityInvite(sys::Discord_ActivityInvite) {
- init: sys::Discord_ActivityInvite_Init,
- drop: sys::Discord_ActivityInvite_Drop,
- clone: sys::Discord_ActivityInvite_Clone,
- }
-}
-
-impl ActivityInvite {
- /// The user id of the user who sent the invite.
- pub fn sender_id(&self) -> u64 {
- // SAFETY: read-only getter on an initialised handle.
- unsafe { sys::Discord_ActivityInvite_SenderId(self.raw_ptr()) }
- }
-
- /// Set the user id of the sender.
- pub fn set_sender_id(&mut self, value: u64) {
- // SAFETY: passing a plain value to a setter on an initialised handle.
- unsafe { sys::Discord_ActivityInvite_SetSenderId(self.as_raw_mut(), value) }
- }
-
- /// The id of the Discord channel the invite was sent in.
- pub fn channel_id(&self) -> u64 {
- // SAFETY: read-only getter on an initialised handle.
- unsafe { sys::Discord_ActivityInvite_ChannelId(self.raw_ptr()) }
- }
-
- /// Set the id of the channel the invite was sent in.
- pub fn set_channel_id(&mut self, value: u64) {
- // SAFETY: passing a plain value to a setter on an initialised handle.
- unsafe { sys::Discord_ActivityInvite_SetChannelId(self.as_raw_mut(), value) }
- }
-
- /// The id of the Discord message containing the invite.
- pub fn message_id(&self) -> u64 {
- // SAFETY: read-only getter on an initialised handle.
- unsafe { sys::Discord_ActivityInvite_MessageId(self.raw_ptr()) }
- }
-
- /// Set the id of the message containing the invite.
- pub fn set_message_id(&mut self, value: u64) {
- // SAFETY: passing a plain value to a setter on an initialised handle.
- unsafe { sys::Discord_ActivityInvite_SetMessageId(self.as_raw_mut(), value) }
- }
-
- /// The type of invite that was sent.
- pub fn invite_type(&self) -> ActivityActionType {
- // SAFETY: read-only getter on an initialised handle.
- ActivityActionType::from_raw(unsafe { sys::Discord_ActivityInvite_Type(self.raw_ptr()) })
- }
-
- /// Set the type of invite.
- pub fn set_invite_type(&mut self, value: ActivityActionType) {
- // SAFETY: passing a plain enum value to a setter on an initialised handle.
- unsafe { sys::Discord_ActivityInvite_SetType(self.as_raw_mut(), value.into_raw()) }
- }
-
- /// The target application of the invite.
- pub fn application_id(&self) -> u64 {
- // SAFETY: read-only getter on an initialised handle.
- unsafe { sys::Discord_ActivityInvite_ApplicationId(self.raw_ptr()) }
- }
-
- /// Set the target application of the invite.
- pub fn set_application_id(&mut self, value: u64) {
- // SAFETY: passing a plain value to a setter on an initialised handle.
- unsafe { sys::Discord_ActivityInvite_SetApplicationId(self.as_raw_mut(), value) }
- }
-
- /// The application id of the parent application, if there is one.
- ///
- /// Only applicable when the application belongs to a publisher's suite of
- /// applications.
- pub fn parent_application_id(&self) -> u64 {
- // SAFETY: read-only getter on an initialised handle.
- unsafe { sys::Discord_ActivityInvite_ParentApplicationId(self.raw_ptr()) }
- }
-
- /// Set the parent application id.
- pub fn set_parent_application_id(&mut self, value: u64) {
- // SAFETY: passing a plain value to a setter on an initialised handle.
- unsafe { sys::Discord_ActivityInvite_SetParentApplicationId(self.as_raw_mut(), value) }
- }
-
- /// The id of the party the invite was sent for.
- pub fn party_id(&self) -> String {
- // SAFETY: read-only getter that transfers ownership of the string to us.
- unsafe { string::out(|p| sys::Discord_ActivityInvite_PartyId(self.raw_ptr(), p)) }
- }
-
- /// Set the id of the party the invite is for.
- pub fn set_party_id(&mut self, value: &str) {
- // SAFETY: the string is passed by value and copied during the call.
- unsafe { sys::Discord_ActivityInvite_SetPartyId(self.as_raw_mut(), string::borrow(value)) }
- }
-
- /// The session id of the user who sent the invite.
- pub fn session_id(&self) -> String {
- // SAFETY: read-only getter that transfers ownership of the string to us.
- unsafe { string::out(|p| sys::Discord_ActivityInvite_SessionId(self.raw_ptr(), p)) }
- }
-
- /// Set the session id of the sender.
- pub fn set_session_id(&mut self, value: &str) {
- // SAFETY: the string is passed by value and copied during the call.
- unsafe { sys::Discord_ActivityInvite_SetSessionId(self.as_raw_mut(), string::borrow(value)) }
- }
-
- /// Whether the invite is currently joinable.
- ///
- /// An invite becomes invalid once it is more than six hours old, or once the
- /// sender stops playing the game the invite is for.
- pub fn is_valid(&self) -> bool {
- // SAFETY: read-only getter on an initialised handle.
- unsafe { sys::Discord_ActivityInvite_IsValid(self.raw_ptr()) }
- }
-
- /// Set whether the invite is currently joinable.
- pub fn set_is_valid(&mut self, value: bool) {
- // SAFETY: passing a plain value to a setter on an initialised handle.
- unsafe { sys::Discord_ActivityInvite_SetIsValid(self.as_raw_mut(), value) }
- }
-}
-
-impl std::fmt::Debug for ActivityInvite {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("ActivityInvite")
- .field("sender_id", &self.sender_id())
- .field("channel_id", &self.channel_id())
- .field("message_id", &self.message_id())
- .field("invite_type", &self.invite_type())
- .field("application_id", &self.application_id())
- .field("parent_application_id", &self.parent_application_id())
- .field("party_id", &self.party_id())
- .field("session_id", &self.session_id())
- .field("is_valid", &self.is_valid())
- .finish()
- }
-}
-
-// ---------------------------------------------------------------------------
-// Activity
-// ---------------------------------------------------------------------------
-
-handle! {
- /// One "thing" a user is doing on Discord — their rich presence.
- ///
- /// Rich presence supports several activity types, but the only one really
- /// relevant to this SDK is [`ActivityType::Playing`]. The SDK also only
- /// exposes activities associated with the current game, so a field such as
- /// [`name`](Activity::name) is always the current game's name from the SDK's
- /// point of view.
- ///
- /// # Customisation
- ///
- /// A rendered activity looks roughly like:
- ///
- /// ```text
- /// Playing "game name"
- /// Capture the flag | 2 - 1
- /// In a group (2 of 3)
- /// ```
- ///
- /// - Line 1 comes from the application's name on Discord.
- /// - Line 2 comes from [`details`](Activity::details), and should describe
- /// what the *player* is doing — dynamic data such as a match score is fine.
- /// - Line 3 describes the *party*: the first half comes from
- /// [`state`](Activity::state) and the second half from
- /// [`party`](Activity::party).
- ///
- /// # Invites
- ///
- /// To make an activity joinable, give it an [`ActivityParty`] and an
- /// [`ActivitySecrets`] carrying a join secret. When another user accepts the
- /// invite, that same secret is handed back to their game, which can use it to
- /// join — for example by passing it to `Client::create_or_join_lobby`.
- ///
- /// Further reading: the [rich presence overview] and [best practices].
- ///
- /// [rich presence overview]: https://discord.com/developers/docs/rich-presence/overview
- /// [best practices]: https://discord.com/developers/docs/rich-presence/best-practices
- Activity(sys::Discord_Activity) {
- init: sys::Discord_Activity_Init,
- drop: sys::Discord_Activity_Drop,
- clone: sys::Discord_Activity_Clone,
- }
-}
-
-impl Activity {
- /// Add a custom button to the rich presence.
- ///
- /// The button is copied, so `button` remains usable afterwards.
- pub fn add_button(&mut self, button: &ActivityButton) {
- // SAFETY: `button` is an initialised handle kept alive across the call;
- // the SDK copies it rather than taking ownership.
- unsafe { sys::Discord_Activity_AddButton(self.as_raw_mut(), button.as_raw()) }
- }
-
- /// The custom buttons on the rich presence.
- pub fn buttons(&self) -> Vec<ActivityButton> {
- // SAFETY: the getter fills the span and transfers ownership of both the
- // array and every element in it, which `span::out` then adopts.
- unsafe {
- span::out(
- |p| sys::Discord_Activity_GetButtons(self.raw_ptr(), p),
- |raw| ActivityButton::from_raw(raw),
- )
- }
- }
-
- /// The name of the game or application the activity is associated with.
- ///
- /// Defaults to the name of the current game.
- pub fn name(&self) -> String {
- // SAFETY: read-only getter that transfers ownership of the string to us.
- unsafe { string::out(|p| sys::Discord_Activity_Name(self.raw_ptr(), p)) }
- }
-
- /// Set the name of the game or application.
- pub fn set_name(&mut self, value: &str) {
- // SAFETY: the string is passed by value and copied during the call.
- unsafe { sys::Discord_Activity_SetName(self.as_raw_mut(), string::borrow(value)) }
- }
-
- /// The type of activity this is.
- pub fn activity_type(&self) -> ActivityType {
- // SAFETY: read-only getter on an initialised handle.
- ActivityType::from_raw(unsafe { sys::Discord_Activity_Type(self.raw_ptr()) })
- }
-
- /// Set the type of activity; this should almost always be
- /// [`ActivityType::Playing`].
- pub fn set_activity_type(&mut self, value: ActivityType) {
- // SAFETY: passing a plain enum value to a setter on an initialised handle.
- unsafe { sys::Discord_Activity_SetType(self.as_raw_mut(), value.into_raw()) }
- }
-
- /// Which field is used for the user's status message, if one is chosen.
- pub fn status_display_type(&self) -> Option<StatusDisplayType> {
- // SAFETY: read-only getter that initialises the out-parameter only when
- // it returns `true`.
- unsafe { opt_out(|p| sys::Discord_Activity_StatusDisplayType(self.raw_ptr(), p)) }
- .map(StatusDisplayType::from_raw)
- }
-
- /// Set which field is used for the user's status message, or clear the
- /// choice with `None`.
- pub fn set_status_display_type(&mut self, value: Option<StatusDisplayType>) {
- match value {
- Some(v) => {
- let mut raw = v.into_raw();
- // SAFETY: `raw` outlives the call and the SDK reads through the
- // pointer without retaining it.
- unsafe { sys::Discord_Activity_SetStatusDisplayType(self.as_raw_mut(), &mut raw) }
- }
- // SAFETY: a null pointer is the SDK's "clear this field" signal.
- None => unsafe {
- sys::Discord_Activity_SetStatusDisplayType(self.as_raw_mut(), std::ptr::null_mut())
- },
- }
- }
-
- /// The state *of the party* for this activity.
- pub fn state(&self) -> Option<String> {
- // SAFETY: read-only getter transferring ownership of the string.
- unsafe { string::out_opt(|p| sys::Discord_Activity_State(self.raw_ptr(), p)) }
- }
-
- /// Set the party state, or clear it with `None`.
- ///
- /// If specified, must be between 2 and 128 characters.
- pub fn set_state(&mut self, value: Option<&str>) {
- // SAFETY: the SDK copies the string; null clears the field.
- string::with_opt(value, |p| unsafe {
- sys::Discord_Activity_SetState(self.as_raw_mut(), p)
- })
- }
-
- /// A URL that opens when the user clicks or taps the state text.
- pub fn state_url(&self) -> Option<String> {
- // SAFETY: read-only getter transferring ownership of the string.
- unsafe { string::out_opt(|p| sys::Discord_Activity_StateUrl(self.raw_ptr(), p)) }
- }
-
- /// Set the state link, or clear it with `None`.
- ///
- /// If specified, must be between 2 and 256 characters.
- pub fn set_state_url(&mut self, value: Option<&str>) {
- // SAFETY: the SDK copies the string; null clears the field.
- string::with_opt(value, |p| unsafe {
- sys::Discord_Activity_SetStateUrl(self.as_raw_mut(), p)
- })
- }
-
- /// The state *of what the user is doing* for this activity.
- pub fn details(&self) -> Option<String> {
- // SAFETY: read-only getter transferring ownership of the string.
- unsafe { string::out_opt(|p| sys::Discord_Activity_Details(self.raw_ptr(), p)) }
- }
-
- /// Set the details, or clear them with `None`.
- ///
- /// If specified, must be between 2 and 128 characters.
- pub fn set_details(&mut self, value: Option<&str>) {
- // SAFETY: the SDK copies the string; null clears the field.
- string::with_opt(value, |p| unsafe {
- sys::Discord_Activity_SetDetails(self.as_raw_mut(), p)
- })
- }
-
- /// A URL that opens when the user clicks or taps the details text.
- pub fn details_url(&self) -> Option<String> {
- // SAFETY: read-only getter transferring ownership of the string.
- unsafe { string::out_opt(|p| sys::Discord_Activity_DetailsUrl(self.raw_ptr(), p)) }
- }
-
- /// Set the details link, or clear it with `None`.
- ///
- /// If specified, must be between 2 and 256 characters.
- pub fn set_details_url(&mut self, value: Option<&str>) {
- // SAFETY: the SDK copies the string; null clears the field.
- string::with_opt(value, |p| unsafe {
- sys::Discord_Activity_SetDetailsUrl(self.as_raw_mut(), p)
- })
- }
-
- /// The application id of the game the activity is associated with.
- ///
- /// This is always the application id of the current game, or of a game from
- /// the same publisher; it cannot meaningfully be chosen by the game.
- pub fn application_id(&self) -> Option<u64> {
- // SAFETY: read-only getter that initialises the out-parameter only when
- // it returns `true`.
- unsafe { opt_out(|p| sys::Discord_Activity_ApplicationId(self.raw_ptr(), p)) }
- }
-
- /// Set the application id, or clear it with `None`.
- pub fn set_application_id(&mut self, value: Option<u64>) {
- match value {
- // SAFETY: `v` outlives the call and the SDK only reads through it.
- Some(mut v) => unsafe {
- sys::Discord_Activity_SetApplicationId(self.as_raw_mut(), &mut v)
- },
- // SAFETY: a null pointer is the SDK's "clear this field" signal.
- None => unsafe {
- sys::Discord_Activity_SetApplicationId(self.as_raw_mut(), std::ptr::null_mut())
- },
- }
- }
-
- /// The application id of the parent application, if the game has one.
- ///
- /// Identifies a collection of games from the same publisher. Like
- /// [`application_id`](Activity::application_id), this is filled in by the SDK
- /// rather than chosen by the game.
- pub fn parent_application_id(&self) -> Option<u64> {
- // SAFETY: read-only getter that initialises the out-parameter only when
- // it returns `true`.
- unsafe { opt_out(|p| sys::Discord_Activity_ParentApplicationId(self.raw_ptr(), p)) }
- }
-
- /// Set the parent application id, or clear it with `None`.
- pub fn set_parent_application_id(&mut self, value: Option<u64>) {
- match value {
- // SAFETY: `v` outlives the call and the SDK only reads through it.
- Some(mut v) => unsafe {
- sys::Discord_Activity_SetParentApplicationId(self.as_raw_mut(), &mut v)
- },
- // SAFETY: a null pointer is the SDK's "clear this field" signal.
- None => unsafe {
- sys::Discord_Activity_SetParentApplicationId(self.as_raw_mut(), std::ptr::null_mut())
- },
- }
- }
-
- /// The images used to customise how the activity is displayed.
- pub fn assets(&self) -> Option<ActivityAssets> {
- // SAFETY: the getter writes an initialised handle we own into the
- // out-parameter, but only when it returns `true`.
- unsafe {
- opt_out(|p| sys::Discord_Activity_Assets(self.raw_ptr(), p))
- .map(|raw| ActivityAssets::from_raw(raw))
- }
- }
-
- /// Set the activity's images, or clear them with `None`.
- ///
- /// The handle is copied, so `value` remains usable afterwards.
- pub fn set_assets(&mut self, value: Option<&ActivityAssets>) {
- let ptr = value.map_or(std::ptr::null_mut(), |v| v.raw_ptr());
- // SAFETY: `ptr` is either null — meaning "clear" — or points at an
- // initialised handle that outlives the call.
- unsafe { sys::Discord_Activity_SetAssets(self.as_raw_mut(), ptr) }
- }
-
- /// The activity's start and end times.
- pub fn timestamps(&self) -> Option<ActivityTimestamps> {
- // SAFETY: the getter writes an initialised handle we own into the
- // out-parameter, but only when it returns `true`.
- unsafe {
- opt_out(|p| sys::Discord_Activity_Timestamps(self.raw_ptr(), p))
- .map(|raw| ActivityTimestamps::from_raw(raw))
- }
- }
-
- /// Set the activity's timestamps, or clear them with `None`.
- ///
- /// The handle is copied, so `value` remains usable afterwards.
- pub fn set_timestamps(&mut self, value: Option<&ActivityTimestamps>) {
- let ptr = value.map_or(std::ptr::null_mut(), |v| v.raw_ptr());
- // SAFETY: `ptr` is either null — meaning "clear" — or points at an
- // initialised handle that outlives the call.
- unsafe { sys::Discord_Activity_SetTimestamps(self.as_raw_mut(), ptr) }
- }
-
- /// The party the user is playing with.
- pub fn party(&self) -> Option<ActivityParty> {
- // SAFETY: the getter writes an initialised handle we own into the
- // out-parameter, but only when it returns `true`.
- unsafe {
- opt_out(|p| sys::Discord_Activity_Party(self.raw_ptr(), p))
- .map(|raw| ActivityParty::from_raw(raw))
- }
- }
-
- /// Set the activity's party, or clear it with `None`.
- ///
- /// The handle is copied, so `value` remains usable afterwards.
- pub fn set_party(&mut self, value: Option<&ActivityParty>) {
- let ptr = value.map_or(std::ptr::null_mut(), |v| v.raw_ptr());
- // SAFETY: `ptr` is either null — meaning "clear" — or points at an
- // initialised handle that outlives the call.
- unsafe { sys::Discord_Activity_SetParty(self.as_raw_mut(), ptr) }
- }
-
- /// The secrets that make the activity joinable.
- pub fn secrets(&self) -> Option<ActivitySecrets> {
- // SAFETY: the getter writes an initialised handle we own into the
- // out-parameter, but only when it returns `true`.
- unsafe {
- opt_out(|p| sys::Discord_Activity_Secrets(self.raw_ptr(), p))
- .map(|raw| ActivitySecrets::from_raw(raw))
- }
- }
-
- /// Set the activity's secrets, or clear them with `None`.
- ///
- /// The handle is copied, so `value` remains usable afterwards.
- pub fn set_secrets(&mut self, value: Option<&ActivitySecrets>) {
- let ptr = value.map_or(std::ptr::null_mut(), |v| v.raw_ptr());
- // SAFETY: `ptr` is either null — meaning "clear" — or points at an
- // initialised handle that outlives the call.
- unsafe { sys::Discord_Activity_SetSecrets(self.as_raw_mut(), ptr) }
- }
-
- /// The platforms the activity is joinable on.
- pub fn supported_platforms(&self) -> ActivityGamePlatforms {
- // SAFETY: read-only getter on an initialised handle.
- let raw = unsafe { sys::Discord_Activity_SupportedPlatforms(self.raw_ptr()) };
- // bindgen types this bitmask as u32 on macOS/Linux but c_int (i32) on
- // Windows; cast so the binding compiles on every target.
- ActivityGamePlatforms::from_bits(raw.0 as u32)
- }
-
- /// Set the platforms the activity is joinable on.
- ///
- /// Useful when an activity is joinable only from some platforms — if PC users
- /// cannot join mobile users and vice versa, this makes the activity show as
- /// joinable on Discord only for users on a compatible platform.
- pub fn set_supported_platforms(&mut self, value: ActivityGamePlatforms) {
- // `as _` infers the sys field type (u32 on macOS/Linux, i32 on Windows).
- let raw = sys::Discord_ActivityGamePlatforms(value.bits() as _);
- // SAFETY: passing a plain bitmask to a setter on an initialised handle.
- unsafe { sys::Discord_Activity_SetSupportedPlatforms(self.as_raw_mut(), raw) }
- }
-}
-
-/// Field-by-field comparison, as performed by the SDK itself.
-impl PartialEq for Activity {
- fn eq(&self, other: &Self) -> bool {
- // SAFETY: both handles are initialised and only read by the comparison.
- unsafe { sys::Discord_Activity_Equals(self.raw_ptr(), other.as_raw()) }
- }
-}
-
-impl std::fmt::Debug for Activity {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("Activity")
- .field("name", &self.name())
- .field("activity_type", &self.activity_type())
- .field("status_display_type", &self.status_display_type())
- .field("state", &self.state())
- .field("state_url", &self.state_url())
- .field("details", &self.details())
- .field("details_url", &self.details_url())
- .field("application_id", &self.application_id())
- .field("parent_application_id", &self.parent_application_id())
- .field("assets", &self.assets())
- .field("timestamps", &self.timestamps())
- .field("party", &self.party())
- .field("secrets", &self.secrets())
- .field("supported_platforms", &self.supported_platforms())
- .field("buttons", &self.buttons())
- .finish()
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/audio.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/audio.rs
deleted file mode 100644
index 00570dd..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/audio.rs
+++ /dev/null
@@ -1,146 +0,0 @@
-//! Audio devices and voice activity detection settings.
-//!
-//! Discord initialises its audio engine with the system default input and
-//! output devices. [`AudioDevice`] describes one such device — the `Client`
-//! enumerates them and accepts an [`AudioDevice::id`] to switch to a different
-//! one.
-//!
-//! [`VadThresholdSettings`] describes how sensitive voice auto detection is when
-//! deciding whether the user's microphone is picking up speech. It is read back
-//! from a call with [`Call::vad_threshold`](crate::call::Call::vad_threshold)
-//! and configured with
-//! [`Call::set_vad_threshold`](crate::call::Call::set_vad_threshold).
-
-use discord_social_sdk_sys as sys;
-
-use crate::handle::handle;
-use crate::string;
-
-handle! {
- /// A single input or output audio device available to the user.
- ///
- /// Discord initialises the audio engine with the system default input and
- /// output devices. You can change the device through the `Client` by passing
- /// the [`id`](AudioDevice::id) of the desired audio device.
- ///
- /// The SDK exposes no constructor for this type, so instances only arrive
- /// from the `Client`'s device enumeration callbacks.
- AudioDevice(sys::Discord_AudioDevice) {
- drop: sys::Discord_AudioDevice_Drop,
- clone: sys::Discord_AudioDevice_Clone,
- }
-}
-
-impl AudioDevice {
- /// The ID of the audio device.
- ///
- /// This is the value to hand back to the `Client` when selecting a device.
- pub fn id(&self) -> String {
- // SAFETY: the getter fills the out-parameter and transfers the buffer to us.
- unsafe { string::out(|out| sys::Discord_AudioDevice_Id(self.raw_ptr(), out)) }
- }
-
- /// Set the ID of the audio device.
- pub fn set_id(&mut self, value: &str) {
- // SAFETY: the SDK copies the string before returning, so borrowing is sound.
- unsafe { sys::Discord_AudioDevice_SetId(self.as_raw_mut(), string::borrow(value)) }
- }
-
- /// The display name of the audio device.
- pub fn name(&self) -> String {
- // SAFETY: the getter fills the out-parameter and transfers the buffer to us.
- unsafe { string::out(|out| sys::Discord_AudioDevice_Name(self.raw_ptr(), out)) }
- }
-
- /// Set the display name of the audio device.
- pub fn set_name(&mut self, value: &str) {
- // SAFETY: the SDK copies the string before returning, so borrowing is sound.
- unsafe { sys::Discord_AudioDevice_SetName(self.as_raw_mut(), string::borrow(value)) }
- }
-
- /// Whether the audio device is the system default device.
- pub fn is_default(&self) -> bool {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_AudioDevice_IsDefault(self.raw_ptr()) }
- }
-
- /// Set whether the audio device is the system default device.
- pub fn set_is_default(&mut self, value: bool) {
- // SAFETY: a plain setter on a live handle.
- unsafe { sys::Discord_AudioDevice_SetIsDefault(self.as_raw_mut(), value) }
- }
-}
-
-/// Compares the ID of two audio devices for equality.
-impl PartialEq for AudioDevice {
- fn eq(&self, other: &Self) -> bool {
- // SAFETY: both handles are live and the SDK only reads through them.
- unsafe { sys::Discord_AudioDevice_Equals(self.raw_ptr(), other.as_raw()) }
- }
-}
-
-impl Eq for AudioDevice {}
-
-impl std::fmt::Debug for AudioDevice {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("AudioDevice")
- .field("id", &self.id())
- .field("name", &self.name())
- .field("is_default", &self.is_default())
- .finish()
- }
-}
-
-handle! {
- /// Settings for the voice auto detection threshold used to pick up activity
- /// from a user's microphone.
- ///
- /// Obtained from [`Call::vad_threshold`](crate::call::Call::vad_threshold).
- /// The SDK exposes neither a constructor nor a clone for this type; to
- /// change a call's configuration use
- /// [`Call::set_vad_threshold`](crate::call::Call::set_vad_threshold) rather
- /// than mutating a settings object read back from a call.
- VadThresholdSettings(sys::Discord_VADThresholdSettings) {
- drop: sys::Discord_VADThresholdSettings_Drop,
- }
-}
-
-impl VadThresholdSettings {
- /// The current voice auto detection threshold value.
- ///
- /// Has a range of `-100` to `0` and defaults to `-60`.
- pub fn vad_threshold(&self) -> f32 {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_VADThresholdSettings_VadThreshold(self.raw_ptr()) }
- }
-
- /// Set the voice auto detection threshold value.
- ///
- /// Has a range of `-100` to `0` and defaults to `-60`.
- pub fn set_vad_threshold(&mut self, value: f32) {
- // SAFETY: a plain setter on a live handle.
- unsafe { sys::Discord_VADThresholdSettings_SetVadThreshold(self.as_raw_mut(), value) }
- }
-
- /// Whether Discord is currently automatically setting and detecting the
- /// appropriate threshold to use.
- pub fn automatic(&self) -> bool {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_VADThresholdSettings_Automatic(self.raw_ptr()) }
- }
-
- /// Set whether Discord automatically detects the appropriate threshold.
- pub fn set_automatic(&mut self, value: bool) {
- // SAFETY: a plain setter on a live handle.
- unsafe { sys::Discord_VADThresholdSettings_SetAutomatic(self.as_raw_mut(), value) }
- }
-}
-
-impl std::fmt::Debug for VadThresholdSettings {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("VadThresholdSettings")
- .field("automatic", &self.automatic())
- .field("vad_threshold", &self.vad_threshold())
- .finish()
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/auth.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/auth.rs
deleted file mode 100644
index 1cceaf4..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/auth.rs
+++ /dev/null
@@ -1,529 +0,0 @@
-//! OAuth2 authorization: arguments, PKCE code challenge/verifier pairs.
-//!
-//! Everything the SDK does on a user's behalf requires an OAuth2 access token.
-//! This module holds the parameter objects for the flows that obtain one; the
-//! functions that actually run those flows live on `Client`.
-//!
-//! # The flow the SDK models
-//!
-//! 1. **Authorize.** Build [`AuthorizationArgs`] — at minimum a scope string,
-//! which for most games is one of the client's default scope constants — and
-//! pass it to `Client::authorize`. The SDK opens Discord (or a browser),
-//! runs a loopback web server to catch the redirect, and hands back an
-//! *authorization code*. That code is not a token.
-//! 2. **Exchange.** The code must be traded for an access token. Public clients
-//! can do this in-process with `Client::get_token`, which requires the PKCE
-//! pair described below. Apps with a backend should instead perform the
-//! exchange server-side, which is also what lets provisional accounts later
-//! "upgrade" into full Discord accounts.
-//! 3. **Refresh.** Access tokens obtained this way expire (7 days for the
-//! device flow); the accompanying refresh token does not currently expire
-//! and is used to mint new access tokens.
-//!
-//! # PKCE
-//!
-//! When the token exchange happens inside the game process there is no client
-//! secret to prove the exchange came from whoever started the flow. PKCE closes
-//! that gap: `Client::create_authorization_code_verifier` generates an
-//! [`AuthorizationCodeVerifier`], whose
-//! [`challenge`](AuthorizationCodeVerifier::challenge) goes into
-//! [`AuthorizationArgs::set_code_challenge`] and whose
-//! [`verifier`](AuthorizationCodeVerifier::verifier) goes into the later token
-//! exchange. This crate never generates these values itself — the SDK does.
-//!
-//! # Device flow
-//!
-//! On consoles, smart TVs and other limited-input devices,
-//! [`DeviceAuthorizationArgs`] feeds `Client::get_token_from_device`, which
-//! shows a short code the user enters on a second device instead of having them
-//! type credentials in place.
-//!
-//! # Secrets
-//!
-//! Values here that must never reach logs, telemetry or crash reports:
-//!
-//! - the **code verifier** ([`AuthorizationCodeVerifier::verifier`]) — anyone
-//! holding it alongside an intercepted authorization code can redeem a token;
-//! - the **state** and **nonce** ([`AuthorizationArgs::state`],
-//! [`AuthorizationArgs::nonce`]) — anti-CSRF and anti-replay values whose
-//! whole security property is being unpredictable.
-//!
-//! The [`Debug`] impls in this module redact all three. The *challenge* is a
-//! hash of the verifier, travels in the clear as part of the authorization URL,
-//! and is safe to print.
-
-use discord_social_sdk_sys as sys;
-use std::mem::MaybeUninit;
-
-use crate::enums::{CodeChallengeMethod, IntegrationType};
-use crate::handle::handle;
-use crate::string;
-
-handle! {
- /// The challenge half of a PKCE code verification pair.
- ///
- /// A hash of the secret verifier, sent to Discord when the authorization
- /// flow begins. It is not secret and may be logged.
- ///
- /// Normally obtained from [`AuthorizationCodeVerifier::challenge`] rather
- /// than built by hand; the SDK generates matching pairs.
- AuthorizationCodeChallenge(sys::Discord_AuthorizationCodeChallenge) {
- init: sys::Discord_AuthorizationCodeChallenge_Init,
- drop: sys::Discord_AuthorizationCodeChallenge_Drop,
- clone: sys::Discord_AuthorizationCodeChallenge_Clone,
- }
-}
-
-impl AuthorizationCodeChallenge {
- /// The method used to generate the challenge.
- ///
- /// The only method the SDK uses is SHA-256.
- pub fn method(&self) -> CodeChallengeMethod {
- // SAFETY: `raw_ptr` yields a valid initialised handle; this getter only reads.
- CodeChallengeMethod::from_raw(unsafe {
- sys::Discord_AuthorizationCodeChallenge_Method(self.raw_ptr())
- })
- }
-
- /// Set the method used to generate the challenge.
- pub fn set_method(&mut self, value: CodeChallengeMethod) {
- // SAFETY: `as_raw_mut` yields a valid initialised handle; the enum is a plain value.
- unsafe {
- sys::Discord_AuthorizationCodeChallenge_SetMethod(self.as_raw_mut(), value.into_raw())
- }
- }
-
- /// The challenge value.
- pub fn challenge(&self) -> String {
- // SAFETY: the getter fully initialises the out-parameter and transfers ownership of it.
- unsafe {
- string::out(|out| sys::Discord_AuthorizationCodeChallenge_Challenge(self.raw_ptr(), out))
- }
- }
-
- /// Set the challenge value.
- pub fn set_challenge(&mut self, value: &str) {
- // SAFETY: the SDK copies the string during the call, so borrowing `value` is sound.
- unsafe {
- sys::Discord_AuthorizationCodeChallenge_SetChallenge(
- self.as_raw_mut(),
- string::borrow(value),
- )
- }
- }
-}
-
-impl std::fmt::Debug for AuthorizationCodeChallenge {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("AuthorizationCodeChallenge")
- .field("method", &self.method())
- .field("challenge", &self.challenge())
- .finish()
- }
-}
-
-handle! {
- /// A PKCE code verification pair: the secret verifier and its challenge.
- ///
- /// Produced by `Client::create_authorization_code_verifier`. There is
- /// deliberately no constructor — the SDK generates the pair, and this crate
- /// implements no cryptography of its own.
- ///
- /// # Secrets
- ///
- /// [`verifier`](Self::verifier) is a secret. Do not log it, do not persist
- /// it beyond the lifetime of the flow, and do not send it anywhere other
- /// than the token exchange. The [`Debug`] impl redacts it.
- AuthorizationCodeVerifier(sys::Discord_AuthorizationCodeVerifier) {
- drop: sys::Discord_AuthorizationCodeVerifier_Drop,
- clone: sys::Discord_AuthorizationCodeVerifier_Clone,
- }
-}
-
-impl AuthorizationCodeVerifier {
- /// The challenge half of the pair.
- ///
- /// Pass this to [`AuthorizationArgs::set_code_challenge`] when starting the
- /// authorization flow.
- pub fn challenge(&self) -> AuthorizationCodeChallenge {
- let mut raw = MaybeUninit::<sys::Discord_AuthorizationCodeChallenge>::uninit();
- // SAFETY: the getter fully initialises the out-parameter and transfers ownership of the
- // handle to us, so wrapping it in an owning `AuthorizationCodeChallenge` is correct.
- unsafe {
- sys::Discord_AuthorizationCodeVerifier_Challenge(self.raw_ptr(), raw.as_mut_ptr());
- AuthorizationCodeChallenge::from_raw(raw.assume_init())
- }
- }
-
- /// Set the challenge half of the pair.
- ///
- /// The SDK copies the challenge, so `value` stays owned by the caller.
- pub fn set_challenge(&mut self, value: &AuthorizationCodeChallenge) {
- // SAFETY: both handles are valid and initialised. The SDK clones the challenge rather
- // than adopting the pointer — the official C++ wrapper passes a temporary here and lets
- // it destruct immediately after the call.
- unsafe {
- sys::Discord_AuthorizationCodeVerifier_SetChallenge(self.as_raw_mut(), value.raw_ptr())
- }
- }
-
- /// The verifier half of the pair.
- ///
- /// **This value is a secret.** It is presented during the token exchange to
- /// prove the exchange comes from whoever began the authorization flow. Never
- /// log it or share it.
- pub fn verifier(&self) -> String {
- // SAFETY: the getter fully initialises the out-parameter and transfers ownership of it.
- unsafe {
- string::out(|out| sys::Discord_AuthorizationCodeVerifier_Verifier(self.raw_ptr(), out))
- }
- }
-
- /// Set the verifier half of the pair.
- ///
- /// Only useful for restoring a pair the SDK generated earlier. Do not invent
- /// verifier values.
- pub fn set_verifier(&mut self, value: &str) {
- // SAFETY: the SDK copies the string during the call, so borrowing `value` is sound.
- unsafe {
- sys::Discord_AuthorizationCodeVerifier_SetVerifier(
- self.as_raw_mut(),
- string::borrow(value),
- )
- }
- }
-}
-
-impl std::fmt::Debug for AuthorizationCodeVerifier {
- /// Redacts the verifier; the challenge is printed in full.
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("AuthorizationCodeVerifier")
- .field("challenge", &self.challenge())
- .field("verifier", &"<redacted>")
- .finish()
- }
-}
-
-handle! {
- /// Arguments to `Client::authorize`.
- ///
- /// Start from [`AuthorizationArgs::new`] and set at least
- /// [`set_scopes`](Self::set_scopes); everything else has a usable default.
- /// The `with_*` methods are the same setters in chainable form.
- ///
- /// # Secrets
- ///
- /// [`state`](Self::state) and [`nonce`](Self::nonce) are security values and
- /// are redacted by the [`Debug`] impl.
- AuthorizationArgs(sys::Discord_AuthorizationArgs) {
- init: sys::Discord_AuthorizationArgs_Init,
- drop: sys::Discord_AuthorizationArgs_Drop,
- clone: sys::Discord_AuthorizationArgs_Clone,
- }
-}
-
-impl AuthorizationArgs {
- /// The Discord application ID for the game.
- pub fn client_id(&self) -> u64 {
- // SAFETY: `raw_ptr` yields a valid initialised handle; this getter only reads.
- unsafe { sys::Discord_AuthorizationArgs_ClientId(self.raw_ptr()) }
- }
-
- /// Set the Discord application ID for the game.
- ///
- /// Optional; defaults to the value passed to `Client::set_application_id`.
- pub fn set_client_id(&mut self, value: u64) {
- // SAFETY: `as_raw_mut` yields a valid initialised handle.
- unsafe { sys::Discord_AuthorizationArgs_SetClientId(self.as_raw_mut(), value) }
- }
-
- /// The space-separated list of OAuth2 scopes being requested.
- pub fn scopes(&self) -> String {
- // SAFETY: the getter fully initialises the out-parameter and transfers ownership of it.
- unsafe { string::out(|out| sys::Discord_AuthorizationArgs_Scopes(self.raw_ptr(), out)) }
- }
-
- /// Set the space-separated list of OAuth2 scopes being requested.
- ///
- /// Most games should pass one of the client's default scope strings, which
- /// expand to `openid sdk.social_layer` or `openid sdk.social_layer_presence`
- /// plus everything those integrations need. Additional scopes are allowed,
- /// but each one is something the user must separately grant, so request only
- /// what is actually used.
- pub fn set_scopes(&mut self, value: &str) {
- // SAFETY: the SDK copies the string during the call, so borrowing `value` is sound.
- unsafe { sys::Discord_AuthorizationArgs_SetScopes(self.as_raw_mut(), string::borrow(value)) }
- }
-
- /// The OAuth2 `state` value, if one was set explicitly.
- ///
- /// **Security-sensitive.** See [`set_state`](Self::set_state).
- pub fn state(&self) -> Option<String> {
- // SAFETY: the getter initialises and transfers the out-parameter only when it returns true.
- unsafe { string::out_opt(|out| sys::Discord_AuthorizationArgs_State(self.raw_ptr(), out)) }
- }
-
- /// Set the OAuth2 `state` value, or clear it with `None`.
- ///
- /// `state` guards against CSRF during authorization. Leaving it unset is
- /// recommended: the SDK then generates a secure random value and checks it
- /// itself. If overriding it for a custom flow, the value must be
- /// unpredictable, and it must not be logged.
- ///
- /// See the [OAuth2 state documentation] for details.
- ///
- /// [OAuth2 state documentation]: https://discord.com/developers/docs/topics/oauth2#state-and-security
- pub fn set_state(&mut self, value: Option<&str>) {
- string::with_opt(value, |ptr| {
- // SAFETY: `ptr` is either null (meaning "clear") or a valid `Discord_String` that
- // the SDK copies during the call.
- unsafe { sys::Discord_AuthorizationArgs_SetState(self.as_raw_mut(), ptr) }
- })
- }
-
- /// The OpenID Connect `nonce`, if one was set.
- ///
- /// **Security-sensitive.** See [`set_nonce`](Self::set_nonce).
- pub fn nonce(&self) -> Option<String> {
- // SAFETY: the getter initialises and transfers the out-parameter only when it returns true.
- unsafe { string::out_opt(|out| sys::Discord_AuthorizationArgs_Nonce(self.raw_ptr(), out)) }
- }
-
- /// Set the OpenID Connect `nonce`, or clear it with `None`.
- ///
- /// Generally only useful for backend integrations that consume ID tokens,
- /// where the nonce ties the returned token to this particular request. It
- /// must be unpredictable and must not be logged.
- pub fn set_nonce(&mut self, value: Option<&str>) {
- string::with_opt(value, |ptr| {
- // SAFETY: `ptr` is either null (meaning "clear") or a valid `Discord_String` that
- // the SDK copies during the call.
- unsafe { sys::Discord_AuthorizationArgs_SetNonce(self.as_raw_mut(), ptr) }
- })
- }
-
- /// The PKCE code challenge, if one was set.
- pub fn code_challenge(&self) -> Option<AuthorizationCodeChallenge> {
- let mut raw = MaybeUninit::<sys::Discord_AuthorizationCodeChallenge>::uninit();
- // SAFETY: the out-parameter is initialised — and its ownership transferred — only when
- // the call returns true, so `assume_init` is confined to that branch.
- unsafe {
- if sys::Discord_AuthorizationArgs_CodeChallenge(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(AuthorizationCodeChallenge::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// Set the PKCE code challenge, or clear it with `None`.
- ///
- /// Required when the authorization code will be exchanged in-process with
- /// `Client::get_token`. Use `Client::create_authorization_code_verifier` to
- /// generate the pair, pass its
- /// [`challenge`](AuthorizationCodeVerifier::challenge) here, and keep the
- /// verifier for the exchange.
- ///
- /// The SDK copies the challenge, so `value` stays owned by the caller.
- pub fn set_code_challenge(&mut self, value: Option<&AuthorizationCodeChallenge>) {
- let ptr = value.map_or(std::ptr::null_mut(), |v| v.raw_ptr());
- // SAFETY: `ptr` is either null (meaning "clear") or a valid initialised challenge
- // handle, which the SDK clones rather than adopting.
- unsafe { sys::Discord_AuthorizationArgs_SetCodeChallenge(self.as_raw_mut(), ptr) }
- }
-
- /// The installation context the app will be authorized in, if set.
- pub fn integration_type(&self) -> Option<IntegrationType> {
- let mut raw = MaybeUninit::<sys::Discord_IntegrationType>::uninit();
- // SAFETY: the out-parameter is initialised only when the call returns true, so
- // `assume_init` is confined to that branch.
- unsafe {
- if sys::Discord_AuthorizationArgs_IntegrationType(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(IntegrationType::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// Set the installation context, or clear it with `None`.
- ///
- /// See the [installation context documentation].
- ///
- /// [installation context documentation]: https://discord.com/developers/docs/resources/application#installation-context
- pub fn set_integration_type(&mut self, value: Option<IntegrationType>) {
- let mut raw = value.map(IntegrationType::into_raw);
- let ptr = raw
- .as_mut()
- .map_or(std::ptr::null_mut(), |v| v as *mut sys::Discord_IntegrationType);
- // SAFETY: `ptr` is either null (meaning "clear") or points at `raw`, which outlives the
- // call; the SDK reads the value rather than retaining the pointer.
- unsafe { sys::Discord_AuthorizationArgs_SetIntegrationType(self.as_raw_mut(), ptr) }
- }
-
- /// The custom URI scheme used for mobile redirects, if set.
- pub fn custom_scheme_param(&self) -> Option<String> {
- // SAFETY: the getter initialises and transfers the out-parameter only when it returns true.
- unsafe {
- string::out_opt(|out| {
- sys::Discord_AuthorizationArgs_CustomSchemeParam(self.raw_ptr(), out)
- })
- }
- }
-
- /// Set the custom URI scheme used for mobile redirects, or clear it with `None`.
- ///
- /// Setting this to `mygame` produces redirect URIs of the form
- /// `mygame:/authorize/callback`. When unset, the standard Discord form
- /// `discord-123456789:/authorize/callback` is used. Useful for
- /// distinguishing several games from one developer, or for avoiding
- /// conflicts with other apps.
- pub fn set_custom_scheme_param(&mut self, value: Option<&str>) {
- string::with_opt(value, |ptr| {
- // SAFETY: `ptr` is either null (meaning "clear") or a valid `Discord_String` that
- // the SDK copies during the call.
- unsafe { sys::Discord_AuthorizationArgs_SetCustomSchemeParam(self.as_raw_mut(), ptr) }
- })
- }
-
- /// Chainable [`set_client_id`](Self::set_client_id).
- #[must_use]
- pub fn with_client_id(mut self, value: u64) -> Self {
- self.set_client_id(value);
- self
- }
-
- /// Chainable [`set_scopes`](Self::set_scopes).
- #[must_use]
- pub fn with_scopes(mut self, value: &str) -> Self {
- self.set_scopes(value);
- self
- }
-
- /// Chainable [`set_state`](Self::set_state).
- #[must_use]
- pub fn with_state(mut self, value: Option<&str>) -> Self {
- self.set_state(value);
- self
- }
-
- /// Chainable [`set_nonce`](Self::set_nonce).
- #[must_use]
- pub fn with_nonce(mut self, value: Option<&str>) -> Self {
- self.set_nonce(value);
- self
- }
-
- /// Chainable [`set_code_challenge`](Self::set_code_challenge).
- #[must_use]
- pub fn with_code_challenge(mut self, value: Option<&AuthorizationCodeChallenge>) -> Self {
- self.set_code_challenge(value);
- self
- }
-
- /// Chainable [`set_integration_type`](Self::set_integration_type).
- #[must_use]
- pub fn with_integration_type(mut self, value: Option<IntegrationType>) -> Self {
- self.set_integration_type(value);
- self
- }
-
- /// Chainable [`set_custom_scheme_param`](Self::set_custom_scheme_param).
- #[must_use]
- pub fn with_custom_scheme_param(mut self, value: Option<&str>) -> Self {
- self.set_custom_scheme_param(value);
- self
- }
-}
-
-impl std::fmt::Debug for AuthorizationArgs {
- /// Redacts `state` and `nonce`, reporting only whether each is present.
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- fn redacted(value: &Option<String>) -> &'static str {
- match value {
- Some(_) => "<redacted>",
- None => "None",
- }
- }
-
- f.debug_struct("AuthorizationArgs")
- .field("client_id", &self.client_id())
- .field("scopes", &self.scopes())
- .field("state", &redacted(&self.state()))
- .field("nonce", &redacted(&self.nonce()))
- .field("code_challenge", &self.code_challenge())
- .field("integration_type", &self.integration_type())
- .field("custom_scheme_param", &self.custom_scheme_param())
- .finish()
- }
-}
-
-handle! {
- /// Arguments to `Client::get_token_from_device`.
- ///
- /// The device authorization flow serves limited-input devices — consoles,
- /// smart TVs — where the user completes login on a second device.
- DeviceAuthorizationArgs(sys::Discord_DeviceAuthorizationArgs) {
- init: sys::Discord_DeviceAuthorizationArgs_Init,
- drop: sys::Discord_DeviceAuthorizationArgs_Drop,
- clone: sys::Discord_DeviceAuthorizationArgs_Clone,
- }
-}
-
-impl DeviceAuthorizationArgs {
- /// The Discord application ID for the game.
- pub fn client_id(&self) -> u64 {
- // SAFETY: `raw_ptr` yields a valid initialised handle; this getter only reads.
- unsafe { sys::Discord_DeviceAuthorizationArgs_ClientId(self.raw_ptr()) }
- }
-
- /// Set the Discord application ID for the game.
- ///
- /// Optional; defaults to the value passed to `Client::set_application_id`.
- pub fn set_client_id(&mut self, value: u64) {
- // SAFETY: `as_raw_mut` yields a valid initialised handle.
- unsafe { sys::Discord_DeviceAuthorizationArgs_SetClientId(self.as_raw_mut(), value) }
- }
-
- /// The space-separated list of OAuth2 scopes being requested.
- pub fn scopes(&self) -> String {
- // SAFETY: the getter fully initialises the out-parameter and transfers ownership of it.
- unsafe {
- string::out(|out| sys::Discord_DeviceAuthorizationArgs_Scopes(self.raw_ptr(), out))
- }
- }
-
- /// Set the space-separated list of OAuth2 scopes being requested.
- ///
- /// The same guidance as [`AuthorizationArgs::set_scopes`] applies: prefer
- /// the client's default scope strings and add extras only when needed.
- pub fn set_scopes(&mut self, value: &str) {
- // SAFETY: the SDK copies the string during the call, so borrowing `value` is sound.
- unsafe {
- sys::Discord_DeviceAuthorizationArgs_SetScopes(self.as_raw_mut(), string::borrow(value))
- }
- }
-
- /// Chainable [`set_client_id`](Self::set_client_id).
- #[must_use]
- pub fn with_client_id(mut self, value: u64) -> Self {
- self.set_client_id(value);
- self
- }
-
- /// Chainable [`set_scopes`](Self::set_scopes).
- #[must_use]
- pub fn with_scopes(mut self, value: &str) -> Self {
- self.set_scopes(value);
- self
- }
-}
-
-impl std::fmt::Debug for DeviceAuthorizationArgs {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("DeviceAuthorizationArgs")
- .field("client_id", &self.client_id())
- .field("scopes", &self.scopes())
- .finish()
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/call.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/call.rs
deleted file mode 100644
index ebc2a6d..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/call.rs
+++ /dev/null
@@ -1,511 +0,0 @@
-//! Active voice sessions.
-//!
-//! [`Call`] manages an active voice session in a lobby. It is handed back by the
-//! `Client` when joining a lobby's voice channel, and stays useful for as long
-//! as the session lasts: muting, deafening, per-participant volume, push to talk
-//! and voice auto detection all live here.
-//!
-//! A call is **not ready to be used until [`Call::status`] reaches
-//! [`CallStatus::Connected`]**, so most integrations install
-//! [`Call::on_status_changed`] first and drive the rest from there.
-//!
-//! [`CallInfo`] is a lighter, read-only summary of a call in a lobby, and
-//! [`VoiceState`] reports whether an individual participant has muted or
-//! deafened themselves.
-//!
-//! # Events
-//!
-//! The `on_*` methods install persistent event handlers. Each replaces any
-//! previously installed handler for that event, and the closure lives until it
-//! is replaced or the [`Call`] is dropped. Like everything else in the SDK,
-//! handlers only fire from [`run_callbacks`](crate::run_callbacks).
-
-use std::ffi::c_void;
-use std::mem::MaybeUninit;
-
-use discord_social_sdk_sys as sys;
-
-use crate::audio::VadThresholdSettings;
-use crate::callback;
-use crate::enums::{AudioModeType, CallError, CallStatus};
-use crate::handle::handle;
-use crate::span;
-use crate::string;
-
-handle! {
- /// The state of a single participant in a Discord voice call.
- ///
- /// The main use case is to communicate whether a user has muted or deafened
- /// themselves.
- ///
- /// Handle objects hold a reference both to the underlying data and to the
- /// SDK instance, so changes to the underlying data are generally visible on
- /// existing handles without re-creating them. If the SDK instance is
- /// destroyed while a handle is still alive, every method returns its default
- /// value.
- VoiceState(sys::Discord_VoiceStateHandle) {
- drop: sys::Discord_VoiceStateHandle_Drop,
- clone: sys::Discord_VoiceStateHandle_Clone,
- }
-}
-
-impl VoiceState {
- /// Whether the user has deafened themselves.
- ///
- /// A deafened user cannot be heard by anyone else in the call, and does not
- /// hear anyone else in the call either.
- pub fn self_deaf(&self) -> bool {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_VoiceStateHandle_SelfDeaf(self.raw_ptr()) }
- }
-
- /// Whether the user has muted themselves so that no one else in the call can
- /// hear them.
- pub fn self_mute(&self) -> bool {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_VoiceStateHandle_SelfMute(self.raw_ptr()) }
- }
-}
-
-impl std::fmt::Debug for VoiceState {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("VoiceState")
- .field("self_deaf", &self.self_deaf())
- .field("self_mute", &self.self_mute())
- .finish()
- }
-}
-
-handle! {
- /// A summary of the state of a single Discord call in a lobby.
- ///
- /// This is the read-only counterpart to [`Call`]: it reports who is in the
- /// call and what their voice states are, but cannot change anything.
- CallInfo(sys::Discord_CallInfoHandle) {
- drop: sys::Discord_CallInfoHandle_Drop,
- clone: sys::Discord_CallInfoHandle_Clone,
- }
-}
-
-impl CallInfo {
- /// The lobby ID of the call.
- pub fn channel_id(&self) -> u64 {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_CallInfoHandle_ChannelId(self.raw_ptr()) }
- }
-
- /// The lobby ID of the call.
- pub fn guild_id(&self) -> u64 {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_CallInfoHandle_GuildId(self.raw_ptr()) }
- }
-
- /// The user IDs of the participants in the call.
- pub fn participants(&self) -> Vec<u64> {
- // SAFETY: the getter fills the span and transfers its backing array to us.
- unsafe {
- span::out(
- |out| sys::Discord_CallInfoHandle_GetParticipants(self.raw_ptr(), out),
- |raw| raw,
- )
- }
- }
-
- /// The voice state for a single user, so you can know whether they have
- /// muted or deafened themselves.
- ///
- /// Returns [`None`] if the user is not a participant in this call.
- pub fn voice_state(&self, user_id: u64) -> Option<VoiceState> {
- let mut raw = MaybeUninit::<sys::Discord_VoiceStateHandle>::uninit();
- // SAFETY: the out-parameter is only initialised — and only then owned by
- // us — when the getter returns true.
- unsafe {
- if sys::Discord_CallInfoHandle_GetVoiceStateHandle(
- self.raw_ptr(),
- user_id,
- raw.as_mut_ptr(),
- ) {
- Some(VoiceState::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-}
-
-impl std::fmt::Debug for CallInfo {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("CallInfo")
- .field("channel_id", &self.channel_id())
- .field("guild_id", &self.guild_id())
- .field("participants", &self.participants())
- .finish()
- }
-}
-
-handle! {
- /// An active voice session in a lobby.
- ///
- /// A call is not ready to be used until [`status`](Call::status) changes to
- /// [`CallStatus::Connected`]; install [`on_status_changed`](Call::on_status_changed)
- /// to observe that transition.
- Call(sys::Discord_Call) {
- drop: sys::Discord_Call_Drop,
- }
-}
-
-impl Clone for Call {
- fn clone(&self) -> Self {
- let mut raw = MaybeUninit::<sys::Discord_Call>::uninit();
- // SAFETY: argument order is (destination, source). Unlike every other
- // handle in the SDK, `Discord_Call_Clone` declares its source parameter
- // non-const, so `raw_ptr` is used instead of a shared borrow; the SDK
- // only reads through it.
- unsafe {
- sys::Discord_Call_Clone(raw.as_mut_ptr(), self.raw_ptr());
- Self {
- raw: raw.assume_init(),
- }
- }
- }
-}
-
-impl Call {
- /// Render a [`CallStatus`] as the string the SDK uses for it.
- pub fn status_to_string(status: CallStatus) -> String {
- // SAFETY: the conversion fills the out-parameter and transfers the buffer to us.
- unsafe { string::out(|out| sys::Discord_Call_StatusToString(status.into_raw(), out)) }
- }
-
- /// Render a [`CallError`] as the string the SDK uses for it.
- pub fn error_to_string(error: CallError) -> String {
- // SAFETY: the conversion fills the out-parameter and transfers the buffer to us.
- unsafe { string::out(|out| sys::Discord_Call_ErrorToString(error.into_raw(), out)) }
- }
-
- /// Whether the call is configured to use voice auto detection or push to
- /// talk for the current user.
- pub fn audio_mode(&self) -> AudioModeType {
- // SAFETY: a read-only getter on a live handle.
- AudioModeType::from_raw(unsafe { sys::Discord_Call_GetAudioMode(self.raw_ptr()) })
- }
-
- /// Set whether to use voice auto detection or push to talk for the current
- /// user on this call.
- ///
- /// If using push to talk you should call
- /// [`set_ptt_active`](Call::set_ptt_active) whenever the user presses their
- /// configured push to talk key.
- pub fn set_audio_mode(&mut self, audio_mode: AudioModeType) {
- // SAFETY: a plain setter on a live handle.
- unsafe { sys::Discord_Call_SetAudioMode(self.as_raw_mut(), audio_mode.into_raw()) }
- }
-
- /// The ID of the lobby with which this call is associated.
- pub fn channel_id(&self) -> u64 {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_Call_GetChannelId(self.raw_ptr()) }
- }
-
- /// The ID of the lobby with which this call is associated.
- pub fn guild_id(&self) -> u64 {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_Call_GetGuildId(self.raw_ptr()) }
- }
-
- /// Whether the current user has locally muted `user_id` for themselves.
- pub fn local_mute(&self, user_id: u64) -> bool {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_Call_GetLocalMute(self.raw_ptr(), user_id) }
- }
-
- /// Locally mute `user_id`, so that the current user cannot hear them anymore.
- ///
- /// Does not affect whether the given user is muted for any other connected
- /// client.
- pub fn set_local_mute(&mut self, user_id: u64, mute: bool) {
- // SAFETY: a plain setter on a live handle.
- unsafe { sys::Discord_Call_SetLocalMute(self.as_raw_mut(), user_id, mute) }
- }
-
- /// The user IDs of all the participants in the call.
- pub fn participants(&self) -> Vec<u64> {
- // SAFETY: the getter fills the span and transfers its backing array to us.
- unsafe {
- span::out(
- |out| sys::Discord_Call_GetParticipants(self.raw_ptr(), out),
- |raw| raw,
- )
- }
- }
-
- /// The locally set playout volume of `user_id`.
- ///
- /// The range of volume is `[0, 200]`, where `100` indicates the default
- /// audio volume of the playback device.
- pub fn participant_volume(&self, user_id: u64) -> f32 {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_Call_GetParticipantVolume(self.raw_ptr(), user_id) }
- }
-
- /// Locally change the playout volume of `user_id`.
- ///
- /// Does not affect the volume of this user for any other connected client.
- /// The range of volume is `[0, 200]`, where `100` indicates the default
- /// audio volume of the playback device.
- pub fn set_participant_volume(&mut self, user_id: u64, volume: f32) {
- // SAFETY: a plain setter on a live handle.
- unsafe { sys::Discord_Call_SetParticipantVolume(self.as_raw_mut(), user_id, volume) }
- }
-
- /// Whether push to talk is currently active, meaning the user is currently
- /// pressing their configured push to talk key.
- pub fn ptt_active(&self) -> bool {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_Call_GetPTTActive(self.raw_ptr()) }
- }
-
- /// Report that the user pushed or released their push to talk key.
- ///
- /// When push to talk is enabled this should be called on every press and
- /// release. The key must be configured in the game — the SDK does not handle
- /// keybinds itself.
- pub fn set_ptt_active(&mut self, active: bool) {
- // SAFETY: a plain setter on a live handle.
- unsafe { sys::Discord_Call_SetPTTActive(self.as_raw_mut(), active) }
- }
-
- /// The time, in milliseconds, that push to talk stays active after the user
- /// releases the key and `set_ptt_active(false)` is called.
- pub fn ptt_release_delay(&self) -> u32 {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_Call_GetPTTReleaseDelay(self.raw_ptr()) }
- }
-
- /// Extend the time that push to talk stays active after the user releases
- /// the key and `set_ptt_active(false)` is called.
- ///
- /// Defaults to no release delay; Discord itself uses 20ms, which is the
- /// recommended value.
- pub fn set_ptt_release_delay(&mut self, release_delay_ms: u32) {
- // SAFETY: a plain setter on a live handle.
- unsafe { sys::Discord_Call_SetPTTReleaseDelay(self.as_raw_mut(), release_delay_ms) }
- }
-
- /// Whether the current user is deafened.
- pub fn self_deaf(&self) -> bool {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_Call_GetSelfDeaf(self.raw_ptr()) }
- }
-
- /// Mute all audio from the currently active call for the current user.
- ///
- /// They will not be able to hear any other participant, and no other
- /// participant will be able to hear them either.
- pub fn set_self_deaf(&mut self, deaf: bool) {
- // SAFETY: a plain setter on a live handle.
- unsafe { sys::Discord_Call_SetSelfDeaf(self.as_raw_mut(), deaf) }
- }
-
- /// Whether the current user's microphone is muted.
- pub fn self_mute(&self) -> bool {
- // SAFETY: a read-only getter on a live handle.
- unsafe { sys::Discord_Call_GetSelfMute(self.raw_ptr()) }
- }
-
- /// Mute the current user's microphone so that no other participant in their
- /// active calls can hear them.
- pub fn set_self_mute(&mut self, mute: bool) {
- // SAFETY: a plain setter on a live handle.
- unsafe { sys::Discord_Call_SetSelfMute(self.as_raw_mut(), mute) }
- }
-
- /// The current call status.
- ///
- /// A call is not ready to be used until this reaches
- /// [`CallStatus::Connected`].
- pub fn status(&self) -> CallStatus {
- // SAFETY: a read-only getter on a live handle.
- CallStatus::from_raw(unsafe { sys::Discord_Call_GetStatus(self.raw_ptr()) })
- }
-
- /// The current configuration for voice auto detection thresholds.
- ///
- /// See [`VadThresholdSettings`] for the meaning of the individual fields.
- pub fn vad_threshold(&self) -> VadThresholdSettings {
- let mut raw = MaybeUninit::<sys::Discord_VADThresholdSettings>::uninit();
- // SAFETY: the getter fully initialises the out-parameter and transfers
- // ownership of the settings handle to us.
- unsafe {
- sys::Discord_Call_GetVADThreshold(self.raw_ptr(), raw.as_mut_ptr());
- VadThresholdSettings::from_raw(raw.assume_init())
- }
- }
-
- /// Customise the voice auto detection threshold for picking up activity from
- /// the user's microphone.
- ///
- /// When `automatic` is `true`, Discord automatically detects the appropriate
- /// threshold to use and `threshold` is ignored. When it is `false`, the
- /// given `threshold` is used; it has a range of `-100` to `0` and defaults
- /// to `-60`.
- pub fn set_vad_threshold(&mut self, automatic: bool, threshold: f32) {
- // SAFETY: a plain setter on a live handle.
- unsafe { sys::Discord_Call_SetVADThreshold(self.as_raw_mut(), automatic, threshold) }
- }
-
- /// The voice state for `user_id`, one of this call's participants.
- ///
- /// The [`VoiceState`] allows other users to know whether the target user has
- /// muted or deafened themselves. Returns [`None`] if the user is not a
- /// participant in this call.
- pub fn voice_state(&self, user_id: u64) -> Option<VoiceState> {
- let mut raw = MaybeUninit::<sys::Discord_VoiceStateHandle>::uninit();
- // SAFETY: the out-parameter is only initialised — and only then owned by
- // us — when the getter returns true.
- unsafe {
- if sys::Discord_Call_GetVoiceStateHandle(self.raw_ptr(), user_id, raw.as_mut_ptr()) {
- Some(VoiceState::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// Install a handler invoked whenever a field on a [`VoiceState`] for a user
- /// would have changed.
- ///
- /// For example when a user mutes themselves, all other connected clients
- /// invoke this callback, because the "self mute" field is now true. It is
- /// generally *not* invoked when users join or leave channels — use
- /// [`on_participant_changed`](Call::on_participant_changed) for that.
- ///
- /// The closure receives the ID of the user whose voice state changed.
- /// Replaces any previously installed handler.
- pub fn on_voice_state_changed<F>(&mut self, callback: F)
- where
- F: FnMut(u64) + 'static,
- {
- unsafe extern "C" fn tramp<F: FnMut(u64) + 'static>(user_id: u64, userdata: *mut c_void) {
- // SAFETY: `userdata` is the boxed `F` installed below, still owned by the SDK.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f(user_id)) }
- }
- // SAFETY: the SDK stores the boxed closure and releases it through `free_fn::<F>()`.
- unsafe {
- sys::Discord_Call_SetOnVoiceStateChangedCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Install a handler invoked whenever someone joins or leaves the voice call.
- ///
- /// The closure receives the user's ID and `true` if they were added to the
- /// call, `false` if they left. Replaces any previously installed handler.
- pub fn on_participant_changed<F>(&mut self, callback: F)
- where
- F: FnMut(u64, bool) + 'static,
- {
- unsafe extern "C" fn tramp<F: FnMut(u64, bool) + 'static>(
- user_id: u64,
- added: bool,
- userdata: *mut c_void,
- ) {
- // SAFETY: `userdata` is the boxed `F` installed below, still owned by the SDK.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f(user_id, added)) }
- }
- // SAFETY: the SDK stores the boxed closure and releases it through `free_fn::<F>()`.
- unsafe {
- sys::Discord_Call_SetParticipantChangedCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Install a handler invoked whenever a user starts or stops speaking.
- ///
- /// The closure receives the user's ID and whether they are currently playing
- /// sound. It can be invoked in other cases as well, such as when the
- /// priority speaker changes or when the user plays a soundboard sound.
- /// Replaces any previously installed handler.
- pub fn on_speaking_status_changed<F>(&mut self, callback: F)
- where
- F: FnMut(u64, bool) + 'static,
- {
- unsafe extern "C" fn tramp<F: FnMut(u64, bool) + 'static>(
- user_id: u64,
- is_playing_sound: bool,
- userdata: *mut c_void,
- ) {
- // SAFETY: `userdata` is the boxed `F` installed below, still owned by the SDK.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f(user_id, is_playing_sound)) }
- }
- // SAFETY: the SDK stores the boxed closure and releases it through `free_fn::<F>()`.
- unsafe {
- sys::Discord_Call_SetSpeakingStatusChangedCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Install a handler invoked when the call status changes, such as when it
- /// fully connects or starts reconnecting.
- ///
- /// The closure receives the new [`CallStatus`], any [`CallError`] that
- /// caused it, and an error detail code whose meaning depends on the error.
- /// Replaces any previously installed handler.
- pub fn on_status_changed<F>(&mut self, callback: F)
- where
- F: FnMut(CallStatus, CallError, i32) + 'static,
- {
- unsafe extern "C" fn tramp<F: FnMut(CallStatus, CallError, i32) + 'static>(
- status: sys::Discord_Call_Status,
- error: sys::Discord_Call_Error,
- error_detail: i32,
- userdata: *mut c_void,
- ) {
- // SAFETY: `userdata` is the boxed `F` installed below, still owned by the SDK.
- unsafe {
- callback::dispatch_mut::<F>(userdata, |f| {
- f(
- CallStatus::from_raw(status),
- CallError::from_raw(error),
- error_detail,
- )
- })
- }
- }
- // SAFETY: the SDK stores the boxed closure and releases it through `free_fn::<F>()`.
- unsafe {
- sys::Discord_Call_SetStatusChangedCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-}
-
-impl std::fmt::Debug for Call {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("Call")
- .field("channel_id", &self.channel_id())
- .field("guild_id", &self.guild_id())
- .field("status", &self.status())
- .field("audio_mode", &self.audio_mode())
- .field("self_mute", &self.self_mute())
- .field("self_deaf", &self.self_deaf())
- .field("participants", &self.participants())
- .finish()
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/callback.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/callback.rs
deleted file mode 100644
index 4abd17a..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/callback.rs
+++ /dev/null
@@ -1,112 +0,0 @@
-//! Bridging Rust closures across the C callback boundary.
-//!
-//! Every callback-taking SDK function has the same shape:
-//!
-//! ```c
-//! void Discord_Thing_DoAsync(Thing* self, Callback cb, Discord_FreeFn cbFree, void* cbData);
-//! ```
-//!
-//! That triple is exactly enough to carry a boxed Rust closure plus the drop
-//! glue to release it, so no global registry or handle table is needed.
-//!
-//! Two lifetimes exist:
-//!
-//! - **One-shot** — completion callbacks for async operations. The closure is an
-//! [`FnOnce`] stored as `Box<Option<F>>` and taken on first invocation.
-//! - **Persistent** — event handlers installed with `Set*Callback`. The closure
-//! is [`FnMut`] and lives until replaced or until the owning handle drops.
-//!
-//! In both cases the SDK calls the `Discord_FreeFn` when it is done with the
-//! userdata, which is where the box is reclaimed.
-//!
-//! # Arity
-//!
-//! Callback signatures vary too much for a single generic wrapper, so each call
-//! site writes a small `extern "C"` trampoline and delegates the unsafe box
-//! handling to [`dispatch_once`] / [`dispatch_mut`] here.
-
-use discord_social_sdk_sys as sys;
-use std::ffi::c_void;
-use std::panic::AssertUnwindSafe;
-
-/// Box a closure for a one-shot completion callback.
-///
-/// Returns the pointer to hand to the SDK as `userData`. Pair it with
-/// [`free_fn`] parameterised over the same `Option<F>`.
-pub(crate) fn once_userdata<F>(f: F) -> *mut c_void {
- Box::into_raw(Box::new(Some(f))).cast()
-}
-
-/// Box a closure for a persistent event callback.
-pub(crate) fn persistent_userdata<F>(f: F) -> *mut c_void {
- Box::into_raw(Box::new(f)).cast()
-}
-
-/// The `Discord_FreeFn` that reclaims a userdata box of type `T`.
-///
-/// For one-shot callbacks `T` is `Option<F>`; for persistent ones it is `F`.
-pub(crate) fn free_fn<T>() -> sys::Discord_FreeFn {
- unsafe extern "C" fn free_boxed<T>(ptr: *mut c_void) {
- if ptr.is_null() {
- return;
- }
- // Reconstitute and drop. Dropping user closures can panic, and unwinding
- // out of an `extern "C"` fn would abort the host process.
- let boxed = unsafe { Box::from_raw(ptr.cast::<T>()) };
- guard("callback userdata drop", move || drop(boxed));
- }
- Some(free_boxed::<T>)
-}
-
-/// Invoke a one-shot closure, consuming it.
-///
-/// Later invocations are ignored rather than treated as a fault: the SDK is not
-/// expected to fire a completion twice, but silently no-oping is far better than
-/// calling a moved-out closure.
-///
-/// # Safety
-///
-/// `userdata` must be the pointer produced by [`once_userdata::<F>`], still live.
-pub(crate) unsafe fn dispatch_once<F>(userdata: *mut c_void, call: impl FnOnce(F)) {
- if userdata.is_null() {
- return;
- }
- let slot = unsafe { &mut *userdata.cast::<Option<F>>() };
- let Some(f) = slot.take() else { return };
- guard("callback", move || call(f));
-}
-
-/// Invoke a persistent closure by mutable reference.
-///
-/// # Safety
-///
-/// `userdata` must be the pointer produced by [`persistent_userdata::<F>`],
-/// still live. The SDK delivers callbacks from the thread that calls
-/// `run_callbacks`, so no two invocations overlap.
-pub(crate) unsafe fn dispatch_mut<F>(userdata: *mut c_void, call: impl FnOnce(&mut F)) {
- if userdata.is_null() {
- return;
- }
- let f = unsafe { &mut *userdata.cast::<F>() };
- guard("callback", move || call(f));
-}
-
-/// Stop a panic from unwinding across the FFI boundary.
-///
-/// `extern "C"` functions abort on unwind, which would take down the whole host
-/// application because one event handler panicked. Containing it here keeps the
-/// SDK — and the game embedding it — running.
-fn guard<R>(what: &str, f: impl FnOnce() -> R) -> Option<R> {
- match std::panic::catch_unwind(AssertUnwindSafe(f)) {
- Ok(v) => Some(v),
- Err(payload) => {
- let msg = payload
- .downcast_ref::<&str>()
- .map(|s| (*s).to_string())
- .or_else(|| payload.downcast_ref::<String>().cloned())
- .unwrap_or_else(|| "<non-string panic payload>".to_string());
- eprintln!("discord_social_sdk: panic in {what}, ignored to protect FFI boundary: {msg}");
- None
- }
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/channel.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/channel.rs
deleted file mode 100644
index 876f63c..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/channel.rs
+++ /dev/null
@@ -1,440 +0,0 @@
-//! Channels, guilds, and the link between a lobby and a Discord channel.
-//!
-//! Every message on Discord is sent in a channel. [`Channel`] is the handle for
-//! one, obtained from `Client::channel`.
-//!
-//! The remaining types in this module exist for *channel linking*: a [`Lobby`]
-//! can be attached to a text channel in a Discord guild so that messages sent in
-//! one appear in the other. Building that flow means listing the user's guilds
-//! ([`GuildMinimal`]) and the channels inside them ([`GuildChannel`]), then
-//! inspecting the link from either side — [`LinkedLobby`] describes the lobby a
-//! channel points at, [`LinkedChannel`] the channel a lobby points at.
-//!
-//! [`Lobby`]: crate::lobby::Lobby
-
-use std::mem::MaybeUninit;
-
-use discord_social_sdk_sys as sys;
-
-use crate::enums::ChannelType;
-use crate::handle::handle;
-use crate::{span, string};
-
-handle! {
- /// A Discord channel.
- ///
- /// `Message::channel_id` carries the ID of the channel a message was sent
- /// in, and `Client::channel` turns that ID into one of these.
- ///
- /// # Staleness
- ///
- /// A handle references both the underlying data and the SDK instance.
- /// Updates to the data are visible through existing handles without
- /// re-creating them. If the SDK instance is destroyed while a handle is
- /// still alive, every accessor returns a default value instead — an empty
- /// string for string accessors, for example.
- Channel(sys::Discord_ChannelHandle) {
- drop: sys::Discord_ChannelHandle_Drop,
- clone: sys::Discord_ChannelHandle_Clone,
- }
-}
-
-impl Channel {
- /// The ID of the channel.
- pub fn id(&self) -> u64 {
- // SAFETY: read-only call on a live handle.
- unsafe { sys::Discord_ChannelHandle_Id(self.raw_ptr()) }
- }
-
- /// The name of the channel.
- ///
- /// Generally only channels in guilds have names, though Discord may generate
- /// a display name for some others.
- pub fn name(&self) -> String {
- // SAFETY: the getter initialises the out-parameter and transfers
- // ownership of the buffer to us.
- unsafe { string::out(|out| sys::Discord_ChannelHandle_Name(self.raw_ptr(), out)) }
- }
-
- /// For DMs and group DMs, the user IDs of the channel's members.
- ///
- /// Empty for every other channel type.
- pub fn recipients(&self) -> Vec<u64> {
- // SAFETY: the getter initialises the span and transfers ownership of the
- // backing array; the elements are plain integers needing no wrapping.
- unsafe {
- span::out(
- |out| sys::Discord_ChannelHandle_Recipients(self.raw_ptr(), out),
- |id| id,
- )
- }
- }
-
- /// The kind of channel this is.
- pub fn channel_type(&self) -> ChannelType {
- // SAFETY: read-only call on a live handle.
- ChannelType::from_raw(unsafe { sys::Discord_ChannelHandle_Type(self.raw_ptr()) })
- }
-}
-
-impl std::fmt::Debug for Channel {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("Channel")
- .field("id", &self.id())
- .field("name", &self.name())
- .field("channel_type", &self.channel_type())
- .finish()
- }
-}
-
-handle! {
- /// A guild (a Discord server) the current user belongs to, containing
- /// channels that may be linkable to a lobby.
- ///
- /// The SDK hands these back from `Client::user_guilds`; there is no C
- /// constructor, so instances always originate from the SDK.
- GuildMinimal(sys::Discord_GuildMinimal) {
- drop: sys::Discord_GuildMinimal_Drop,
- clone: sys::Discord_GuildMinimal_Clone,
- }
-}
-
-impl GuildMinimal {
- /// The ID of the guild.
- pub fn id(&self) -> u64 {
- // SAFETY: read-only call on a live handle.
- unsafe { sys::Discord_GuildMinimal_Id(self.raw_ptr()) }
- }
-
- /// Set the ID of the guild.
- pub fn set_id(&mut self, value: u64) {
- // SAFETY: mutating call on a uniquely borrowed live handle.
- unsafe { sys::Discord_GuildMinimal_SetId(self.as_raw_mut(), value) }
- }
-
- /// The name of the guild.
- pub fn name(&self) -> String {
- // SAFETY: the getter initialises the out-parameter and transfers
- // ownership of the buffer to us.
- unsafe { string::out(|out| sys::Discord_GuildMinimal_Name(self.raw_ptr(), out)) }
- }
-
- /// Set the name of the guild.
- ///
- /// The SDK copies the string during the call, so `value` need not outlive it.
- pub fn set_name(&mut self, value: &str) {
- // SAFETY: `string::borrow` is valid for the duration of the call, and
- // the setter copies its input.
- unsafe { sys::Discord_GuildMinimal_SetName(self.as_raw_mut(), string::borrow(value)) }
- }
-}
-
-impl std::fmt::Debug for GuildMinimal {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("GuildMinimal")
- .field("id", &self.id())
- .field("name", &self.name())
- .finish()
- }
-}
-
-handle! {
- /// A channel in a guild the current user belongs to, which may be linkable
- /// to a lobby.
- ///
- /// Returned by `Client::guild_channels`; there is no C constructor, so
- /// instances always originate from the SDK.
- GuildChannel(sys::Discord_GuildChannel) {
- drop: sys::Discord_GuildChannel_Drop,
- clone: sys::Discord_GuildChannel_Clone,
- }
-}
-
-impl GuildChannel {
- /// The ID of the channel.
- pub fn id(&self) -> u64 {
- // SAFETY: read-only call on a live handle.
- unsafe { sys::Discord_GuildChannel_Id(self.raw_ptr()) }
- }
-
- /// Set the ID of the channel.
- pub fn set_id(&mut self, value: u64) {
- // SAFETY: mutating call on a uniquely borrowed live handle.
- unsafe { sys::Discord_GuildChannel_SetId(self.as_raw_mut(), value) }
- }
-
- /// The name of the channel.
- pub fn name(&self) -> String {
- // SAFETY: the getter initialises the out-parameter and transfers
- // ownership of the buffer to us.
- unsafe { string::out(|out| sys::Discord_GuildChannel_Name(self.raw_ptr(), out)) }
- }
-
- /// Set the name of the channel.
- ///
- /// The SDK copies the string during the call, so `value` need not outlive it.
- pub fn set_name(&mut self, value: &str) {
- // SAFETY: `string::borrow` is valid for the duration of the call, and
- // the setter copies its input.
- unsafe { sys::Discord_GuildChannel_SetName(self.as_raw_mut(), string::borrow(value)) }
- }
-
- /// The kind of channel this is.
- pub fn channel_type(&self) -> ChannelType {
- // SAFETY: read-only call on a live handle.
- ChannelType::from_raw(unsafe { sys::Discord_GuildChannel_Type(self.raw_ptr()) })
- }
-
- /// Set the kind of channel this is.
- pub fn set_channel_type(&mut self, value: ChannelType) {
- // SAFETY: mutating call on a uniquely borrowed live handle.
- unsafe { sys::Discord_GuildChannel_SetType(self.as_raw_mut(), value.into_raw()) }
- }
-
- /// The position of the channel in the guild's channel list.
- pub fn position(&self) -> i32 {
- // SAFETY: read-only call on a live handle.
- unsafe { sys::Discord_GuildChannel_Position(self.raw_ptr()) }
- }
-
- /// Set the position of the channel in the guild's channel list.
- pub fn set_position(&mut self, value: i32) {
- // SAFETY: mutating call on a uniquely borrowed live handle.
- unsafe { sys::Discord_GuildChannel_SetPosition(self.as_raw_mut(), value) }
- }
-
- /// The ID of the parent category channel, if any.
- pub fn parent_id(&self) -> Option<u64> {
- let mut raw = MaybeUninit::<u64>::uninit();
- // SAFETY: the out-parameter is only initialised when the call returns true.
- unsafe {
- if sys::Discord_GuildChannel_ParentId(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(raw.assume_init())
- } else {
- None
- }
- }
- }
-
- /// Set the ID of the parent category channel.
- ///
- /// `None` clears the parent.
- pub fn set_parent_id(&mut self, mut value: Option<u64>) {
- let ptr = match value.as_mut() {
- Some(v) => v as *mut u64,
- None => std::ptr::null_mut(),
- };
- // SAFETY: `ptr` is either null (meaning "clear") or points to a live
- // local that outlives the call.
- unsafe { sys::Discord_GuildChannel_SetParentId(self.as_raw_mut(), ptr) }
- }
-
- /// Whether the current user is able to link this channel to a lobby.
- ///
- /// This requires all of:
- ///
- /// - the channel is a guild text channel,
- /// - the channel is not marked NSFW,
- /// - the channel is not already linked to a different lobby,
- /// - the user holds the Manage Channels, View Channel and Send Messages
- /// permissions in the channel.
- pub fn is_linkable(&self) -> bool {
- // SAFETY: read-only call on a live handle.
- unsafe { sys::Discord_GuildChannel_IsLinkable(self.raw_ptr()) }
- }
-
- /// Set whether the current user is able to link this channel to a lobby.
- pub fn set_is_linkable(&mut self, value: bool) {
- // SAFETY: mutating call on a uniquely borrowed live handle.
- unsafe { sys::Discord_GuildChannel_SetIsLinkable(self.as_raw_mut(), value) }
- }
-
- /// Whether the channel is "fully public": every member of the guild can view
- /// it and send messages in it.
- ///
- /// Discord permits lobbies to be linked to private channels too, which
- /// enables things like a private admin chat. But there is no permission
- /// synchronisation between the game and Discord, so it is the game's
- /// responsibility to restrict access to the lobby: *every* member of the
- /// lobby can read and write the linked channel whether or not they would
- /// have permission to do so on Discord.
- ///
- /// Rather than take that on, a game can use this flag to offer only fully
- /// public channels for linking, or to show a clear warning before linking a
- /// private one.
- pub fn is_viewable_and_writeable_by_all_members(&self) -> bool {
- // SAFETY: read-only call on a live handle.
- unsafe { sys::Discord_GuildChannel_IsViewableAndWriteableByAllMembers(self.raw_ptr()) }
- }
-
- /// Set whether the channel is viewable and writeable by all guild members.
- pub fn set_is_viewable_and_writeable_by_all_members(&mut self, value: bool) {
- // SAFETY: mutating call on a uniquely borrowed live handle.
- unsafe {
- sys::Discord_GuildChannel_SetIsViewableAndWriteableByAllMembers(
- self.as_raw_mut(),
- value,
- )
- }
- }
-
- /// Information about the lobby currently linked to this channel, if any.
- ///
- /// Discord enforces that a channel can be linked to at most one lobby.
- pub fn linked_lobby(&self) -> Option<LinkedLobby> {
- let mut raw = MaybeUninit::<sys::Discord_LinkedLobby>::uninit();
- // SAFETY: the out-parameter is only initialised when the call returns
- // true, and ownership of the value then transfers to us.
- unsafe {
- if sys::Discord_GuildChannel_LinkedLobby(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(LinkedLobby::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// Set the lobby linked to this channel.
- ///
- /// `None` clears the link. The argument is borrowed rather than consumed:
- /// the SDK copies it during the call, matching the official C++ wrapper,
- /// which keeps ownership of its own value across the same call.
- pub fn set_linked_lobby(&mut self, value: Option<&LinkedLobby>) {
- let ptr = match value {
- Some(v) => v.raw_ptr(),
- None => std::ptr::null_mut(),
- };
- // SAFETY: `ptr` is either null (meaning "clear") or points to a live
- // handle that outlives the call, which only reads through it.
- unsafe { sys::Discord_GuildChannel_SetLinkedLobby(self.as_raw_mut(), ptr) }
- }
-}
-
-impl std::fmt::Debug for GuildChannel {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("GuildChannel")
- .field("id", &self.id())
- .field("name", &self.name())
- .field("channel_type", &self.channel_type())
- .field("position", &self.position())
- .field("parent_id", &self.parent_id())
- .field("is_linkable", &self.is_linkable())
- .field(
- "is_viewable_and_writeable_by_all_members",
- &self.is_viewable_and_writeable_by_all_members(),
- )
- .field("linked_lobby", &self.linked_lobby())
- .finish()
- }
-}
-
-handle! {
- /// Information about the lobby a guild channel is linked to.
- ///
- /// Unlike the other types here this one has a constructor, so a link can be
- /// described locally and handed to
- /// [`GuildChannel::set_linked_lobby`].
- LinkedLobby(sys::Discord_LinkedLobby) {
- init: sys::Discord_LinkedLobby_Init,
- drop: sys::Discord_LinkedLobby_Drop,
- clone: sys::Discord_LinkedLobby_Clone,
- }
-}
-
-impl LinkedLobby {
- /// The ID of the application that owns the lobby.
- pub fn application_id(&self) -> u64 {
- // SAFETY: read-only call on a live handle.
- unsafe { sys::Discord_LinkedLobby_ApplicationId(self.raw_ptr()) }
- }
-
- /// Set the ID of the application that owns the lobby.
- pub fn set_application_id(&mut self, value: u64) {
- // SAFETY: mutating call on a uniquely borrowed live handle.
- unsafe { sys::Discord_LinkedLobby_SetApplicationId(self.as_raw_mut(), value) }
- }
-
- /// The ID of the lobby.
- pub fn lobby_id(&self) -> u64 {
- // SAFETY: read-only call on a live handle.
- unsafe { sys::Discord_LinkedLobby_LobbyId(self.raw_ptr()) }
- }
-
- /// Set the ID of the lobby.
- pub fn set_lobby_id(&mut self, value: u64) {
- // SAFETY: mutating call on a uniquely borrowed live handle.
- unsafe { sys::Discord_LinkedLobby_SetLobbyId(self.as_raw_mut(), value) }
- }
-}
-
-impl std::fmt::Debug for LinkedLobby {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("LinkedLobby")
- .field("application_id", &self.application_id())
- .field("lobby_id", &self.lobby_id())
- .finish()
- }
-}
-
-handle! {
- /// Information about the Discord channel a lobby is linked to.
- ///
- /// Returned by `Lobby::linked_channel`; there is no C constructor, so
- /// instances always originate from the SDK.
- LinkedChannel(sys::Discord_LinkedChannel) {
- drop: sys::Discord_LinkedChannel_Drop,
- clone: sys::Discord_LinkedChannel_Clone,
- }
-}
-
-impl LinkedChannel {
- /// The ID of the linked channel.
- pub fn id(&self) -> u64 {
- // SAFETY: read-only call on a live handle.
- unsafe { sys::Discord_LinkedChannel_Id(self.raw_ptr()) }
- }
-
- /// Set the ID of the linked channel.
- pub fn set_id(&mut self, value: u64) {
- // SAFETY: mutating call on a uniquely borrowed live handle.
- unsafe { sys::Discord_LinkedChannel_SetId(self.as_raw_mut(), value) }
- }
-
- /// The name of the linked channel.
- pub fn name(&self) -> String {
- // SAFETY: the getter initialises the out-parameter and transfers
- // ownership of the buffer to us.
- unsafe { string::out(|out| sys::Discord_LinkedChannel_Name(self.raw_ptr(), out)) }
- }
-
- /// Set the name of the linked channel.
- ///
- /// The SDK copies the string during the call, so `value` need not outlive it.
- pub fn set_name(&mut self, value: &str) {
- // SAFETY: `string::borrow` is valid for the duration of the call, and
- // the setter copies its input.
- unsafe { sys::Discord_LinkedChannel_SetName(self.as_raw_mut(), string::borrow(value)) }
- }
-
- /// The ID of the guild that owns the linked channel.
- pub fn guild_id(&self) -> u64 {
- // SAFETY: read-only call on a live handle.
- unsafe { sys::Discord_LinkedChannel_GuildId(self.raw_ptr()) }
- }
-
- /// Set the ID of the guild that owns the linked channel.
- pub fn set_guild_id(&mut self, value: u64) {
- // SAFETY: mutating call on a uniquely borrowed live handle.
- unsafe { sys::Discord_LinkedChannel_SetGuildId(self.as_raw_mut(), value) }
- }
-}
-
-impl std::fmt::Debug for LinkedChannel {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("LinkedChannel")
- .field("id", &self.id())
- .field("name", &self.name())
- .field("guild_id", &self.guild_id())
- .finish()
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/auth.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/auth.rs
deleted file mode 100644
index e02414d..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/auth.rs
+++ /dev/null
@@ -1,661 +0,0 @@
-//! Authorization, token exchange, and provisional accounts.
-//!
-//! # The standard flow
-//!
-//! 1. Create a PKCE verifier with [`Client::create_authorization_code_verifier`].
-//! 2. Put its challenge on an [`AuthorizationArgs`] and call [`Client::authorize`],
-//! which opens Discord's consent screen and yields an authorization code.
-//! 3. Exchange that code for a token with [`Client::token`], passing the
-//! verifier's secret.
-//! 4. Hand the access token to [`Client::update_token`], then
-//! [`connect`](Client::connect).
-//!
-//! # Secrets
-//!
-//! Access tokens, refresh tokens, and the PKCE verifier are credentials. [`Token`]
-//! redacts them in its [`Debug`] output, but anything read out of it via the
-//! accessors is plaintext — do not log those values.
-
-use super::Client;
-use crate::auth::{AuthorizationArgs, AuthorizationCodeVerifier, DeviceAuthorizationArgs};
-use crate::enums::{AuthorizationTokenType, ExternalAuthType};
-use crate::error::{Result, to_result};
-use crate::{callback, string};
-use discord_social_sdk_sys as sys;
-use std::ffi::c_void;
-use std::mem::MaybeUninit;
-use std::time::Duration;
-
-/// The credentials returned by a token exchange.
-///
-/// Every string field is sensitive. [`Debug`] redacts them.
-#[derive(Clone, PartialEq, Eq)]
-pub struct Token {
- access_token: String,
- refresh_token: String,
- token_type: AuthorizationTokenType,
- expires_in: i32,
- scopes: String,
-}
-
-impl Token {
- /// The access token to authenticate with. **Secret.**
- pub fn access_token(&self) -> &str {
- &self.access_token
- }
-
- /// The refresh token used to obtain a new access token. **Secret.**
- ///
- /// Empty for exchanges that do not issue one.
- pub fn refresh_token(&self) -> &str {
- &self.refresh_token
- }
-
- /// The kind of token issued.
- pub fn token_type(&self) -> AuthorizationTokenType {
- self.token_type
- }
-
- /// How long the access token remains valid.
- pub fn expires_in(&self) -> Duration {
- Duration::from_secs(self.expires_in.max(0) as u64)
- }
-
- /// The space-separated OAuth2 scopes the token grants.
- pub fn scopes(&self) -> &str {
- &self.scopes
- }
-}
-
-impl std::fmt::Debug for Token {
- /// Redacts both tokens; they are credentials and must not reach logs.
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("Token")
- .field("access_token", &"<redacted>")
- .field("refresh_token", &"<redacted>")
- .field("token_type", &self.token_type)
- .field("expires_in", &self.expires_in())
- .field("scopes", &self.scopes)
- .finish()
- }
-}
-
-/// The authorization code and redirect URI produced by [`Client::authorize`].
-///
-/// The code is single-use and short-lived, and is exchanged for a [`Token`].
-#[derive(Clone, PartialEq, Eq)]
-pub struct AuthorizationCode {
- code: String,
- redirect_uri: String,
-}
-
-impl AuthorizationCode {
- /// The authorization code. **Secret** — exchange it, do not log it.
- pub fn code(&self) -> &str {
- &self.code
- }
-
- /// The redirect URI the code was issued against.
- ///
- /// Must be passed unchanged to [`Client::token`].
- pub fn redirect_uri(&self) -> &str {
- &self.redirect_uri
- }
-}
-
-impl std::fmt::Debug for AuthorizationCode {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("AuthorizationCode")
- .field("code", &"<redacted>")
- .field("redirect_uri", &self.redirect_uri)
- .finish()
- }
-}
-
-/// The identity returned by [`Client::fetch_current_user`].
-#[derive(Debug, Clone, PartialEq, Eq)]
-pub struct CurrentUserInfo {
- /// The user's Discord snowflake id.
- pub id: u64,
- /// The user's name.
- pub name: String,
-}
-
-/// Trampoline shared by every `Discord_Client_TokenExchangeCallback` site.
-unsafe extern "C" fn token_tramp<F>(
- result: *mut sys::Discord_ClientResult,
- access_token: sys::Discord_String,
- refresh_token: sys::Discord_String,
- token_type: sys::Discord_AuthorizationTokenType,
- expires_in: i32,
- scopes: sys::Discord_String,
- userdata: *mut c_void,
-) where
- F: FnOnce(Result<Token>) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F`. The strings are transferred to us —
- // the C++ wrapper frees them after the delegate runs — so they are taken.
- //
- // The token is built BEFORE the result is inspected, and deliberately not
- // inside `Result::map`: the SDK hands over these strings whether or not the
- // request succeeded, so claiming them only on success would leak all three
- // on every failed exchange. Once taken they are ordinary `String`s, and
- // dropping the unused `Token` on the error path frees them.
- unsafe {
- callback::dispatch_once::<F>(userdata, |f| {
- let token = Token {
- access_token: string::take(access_token),
- refresh_token: string::take(refresh_token),
- token_type: AuthorizationTokenType::from_raw(token_type),
- expires_in,
- scopes: string::take(scopes),
- };
- f(to_result(result).map(|()| token))
- })
- }
-}
-
-/// Trampoline shared by every callback that reports only success or failure.
-unsafe extern "C" fn result_tramp<F>(result: *mut sys::Discord_ClientResult, userdata: *mut c_void)
-where
- F: FnOnce(Result<()>) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F` installed alongside this trampoline.
- unsafe { callback::dispatch_once::<F>(userdata, |f| f(to_result(result))) }
-}
-
-impl Client {
- /// Whether the client currently holds a valid token.
- pub fn is_authenticated(&self) -> bool {
- // SAFETY: a plain by-value read of an initialised handle.
- unsafe { sys::Discord_Client_IsAuthenticated(self.raw_ptr()) }
- }
-
- /// Generate a fresh PKCE verifier and its matching challenge.
- ///
- /// The verifier is a secret; keep it until the code exchange and do not log it.
- pub fn create_authorization_code_verifier(&self) -> AuthorizationCodeVerifier {
- let mut raw = MaybeUninit::<sys::Discord_AuthorizationCodeVerifier>::uninit();
- // SAFETY: the call fully initialises the handle and transfers ownership.
- unsafe {
- sys::Discord_Client_CreateAuthorizationCodeVerifier(self.raw_ptr(), raw.as_mut_ptr());
- AuthorizationCodeVerifier::from_raw(raw.assume_init())
- }
- }
-
- /// Begin the OAuth2 authorization flow.
- ///
- /// Opens Discord's consent screen. On success the callback receives an
- /// [`AuthorizationCode`] to exchange via [`token`](Self::token).
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn authorize<F>(&mut self, args: &mut AuthorizationArgs, callback: F)
- where
- F: FnOnce(Result<AuthorizationCode>) + 'static,
- {
- unsafe extern "C" fn tramp<F>(
- result: *mut sys::Discord_ClientResult,
- code: sys::Discord_String,
- redirect_uri: sys::Discord_String,
- userdata: *mut c_void,
- ) where
- F: FnOnce(Result<AuthorizationCode>) + 'static,
- {
- // SAFETY: the strings are transferred to us and must be freed, so they are taken.
- unsafe {
- callback::dispatch_once::<F>(userdata, |f| {
- // Claimed before the result is inspected: the SDK transfers
- // both strings regardless of outcome, so taking them only on
- // success would leak them on every failed authorization.
- let code = AuthorizationCode {
- code: string::take(code),
- redirect_uri: string::take(redirect_uri),
- };
- f(to_result(result).map(|()| code))
- })
- }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_Authorize(
- self.as_raw_mut(),
- args.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Cancel an in-flight [`authorize`](Self::authorize).
- pub fn abort_authorize(&mut self) {
- // SAFETY: aborting only requires an initialised handle.
- unsafe { sys::Discord_Client_AbortAuthorize(self.as_raw_mut()) }
- }
-
- /// Exchange an authorization code for a [`Token`].
- ///
- /// `code_verifier` is the secret from the [`AuthorizationCodeVerifier`] whose
- /// challenge was used in [`authorize`](Self::authorize).
- pub fn token<F>(
- &mut self,
- application_id: u64,
- code: &str,
- code_verifier: &str,
- redirect_uri: &str,
- callback: F,
- ) where
- F: FnOnce(Result<Token>) + 'static,
- {
- // SAFETY: all strings are copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_GetToken(
- self.as_raw_mut(),
- application_id,
- string::borrow(code),
- string::borrow(code_verifier),
- string::borrow(redirect_uri),
- Some(token_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Exchange a refresh token for a new [`Token`].
- pub fn refresh_token<F>(&mut self, application_id: u64, refresh_token: &str, callback: F)
- where
- F: FnOnce(Result<Token>) + 'static,
- {
- // SAFETY: the token string is copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_RefreshToken(
- self.as_raw_mut(),
- application_id,
- string::borrow(refresh_token),
- Some(token_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Install a token on the client, making it usable for authenticated calls.
- ///
- /// Call before [`connect`](Self::connect).
- pub fn update_token<F>(&mut self, token_type: AuthorizationTokenType, token: &str, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the token string is copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_UpdateToken(
- self.as_raw_mut(),
- token_type.into_raw(),
- string::borrow(token),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Revoke a token, invalidating it server-side.
- pub fn revoke_token<F>(&mut self, application_id: u64, token: &str, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the token string is copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_RevokeToken(
- self.as_raw_mut(),
- application_id,
- string::borrow(token),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Look up the user a token belongs to, without connecting.
- pub fn fetch_current_user<F>(
- &mut self,
- token_type: AuthorizationTokenType,
- token: &str,
- callback: F,
- ) where
- F: FnOnce(Result<CurrentUserInfo>) + 'static,
- {
- unsafe extern "C" fn tramp<F>(
- result: *mut sys::Discord_ClientResult,
- id: u64,
- name: sys::Discord_String,
- userdata: *mut c_void,
- ) where
- F: FnOnce(Result<CurrentUserInfo>) + 'static,
- {
- // SAFETY: `name` is transferred to us and must be freed, so it is taken.
- unsafe {
- callback::dispatch_once::<F>(userdata, |f| {
- // Claimed unconditionally; the SDK transfers `name` even when
- // the lookup failed.
- let info = CurrentUserInfo {
- id,
- name: string::take(name),
- };
- f(to_result(result).map(|()| info))
- })
- }
- }
- // SAFETY: the token string is copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_FetchCurrentUser(
- self.as_raw_mut(),
- token_type.into_raw(),
- string::borrow(token),
- Some(tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Exchange a parent application's token for a child application's token.
- ///
- /// Used when several applications share one Discord identity.
- pub fn exchange_child_token<F>(
- &mut self,
- parent_application_token: &str,
- child_application_id: u64,
- callback: F,
- ) where
- F: FnOnce(Result<Token>) + 'static,
- {
- unsafe extern "C" fn tramp<F>(
- result: *mut sys::Discord_ClientResult,
- access_token: sys::Discord_String,
- token_type: sys::Discord_AuthorizationTokenType,
- expires_in: i32,
- scopes: sys::Discord_String,
- userdata: *mut c_void,
- ) where
- F: FnOnce(Result<Token>) + 'static,
- {
- // SAFETY: the strings are transferred to us and must be freed, so they are taken. This
- // exchange issues no refresh token, so that field is left empty.
- unsafe {
- callback::dispatch_once::<F>(userdata, |f| {
- // Claimed unconditionally; both strings are transferred even
- // when the exchange failed.
- let token = Token {
- access_token: string::take(access_token),
- refresh_token: String::new(),
- token_type: AuthorizationTokenType::from_raw(token_type),
- expires_in,
- scopes: string::take(scopes),
- };
- f(to_result(result).map(|()| token))
- })
- }
- }
- // SAFETY: the token string is copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_ExchangeChildToken(
- self.as_raw_mut(),
- string::borrow(parent_application_token),
- child_application_id,
- Some(tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Be notified when the current token is about to expire.
- ///
- /// Refresh it from the handler to keep the session alive.
- pub fn on_token_expiration<F>(&mut self, callback: F)
- where
- F: FnMut() + 'static,
- {
- unsafe extern "C" fn tramp<F: FnMut() + 'static>(userdata: *mut c_void) {
- // SAFETY: `userdata` is the boxed `F` installed below.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f()) }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetTokenExpirationCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- // ---- Device authorization (consoles and other input-constrained devices) ----
-
- /// Obtain a token through the device authorization flow.
- ///
- /// For devices where a browser consent screen is impractical. The user is
- /// shown a code to enter on another device.
- pub fn token_from_device<F>(&mut self, args: &mut DeviceAuthorizationArgs, callback: F)
- where
- F: FnOnce(Result<Token>) + 'static,
- {
- // SAFETY: `args` is read during the call and not retained.
- unsafe {
- sys::Discord_Client_GetTokenFromDevice(
- self.as_raw_mut(),
- args.as_raw_mut(),
- Some(token_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Cancel an in-flight [`token_from_device`](Self::token_from_device).
- pub fn abort_token_from_device(&mut self) {
- // SAFETY: aborting only requires an initialised handle.
- unsafe { sys::Discord_Client_AbortGetTokenFromDevice(self.as_raw_mut()) }
- }
-
- /// Show Discord's device authorization screen for `user_code`.
- pub fn open_authorize_device_screen(&mut self, client_id: u64, user_code: &str) {
- // SAFETY: the code string is copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_OpenAuthorizeDeviceScreen(
- self.as_raw_mut(),
- client_id,
- string::borrow(user_code),
- )
- }
- }
-
- /// Close the device authorization screen.
- pub fn close_authorize_device_screen(&mut self) {
- // SAFETY: only requires an initialised handle.
- unsafe { sys::Discord_Client_CloseAuthorizeDeviceScreen(self.as_raw_mut()) }
- }
-
- /// Be notified when the device authorization screen is dismissed.
- pub fn on_authorize_device_screen_closed<F>(&mut self, callback: F)
- where
- F: FnMut() + 'static,
- {
- unsafe extern "C" fn tramp<F: FnMut() + 'static>(userdata: *mut c_void) {
- // SAFETY: `userdata` is the boxed `F` installed below.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f()) }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetAuthorizeDeviceScreenClosedCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Observe incoming authorization requests from the Discord client.
- ///
- /// Paired with [`remove_authorize_request_callback`](Self::remove_authorize_request_callback).
- pub fn register_authorize_request_callback<F>(&mut self, callback: F)
- where
- F: FnMut() + 'static,
- {
- unsafe extern "C" fn tramp<F: FnMut() + 'static>(userdata: *mut c_void) {
- // SAFETY: `userdata` is the boxed `F` installed below.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f()) }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_RegisterAuthorizeRequestCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Stop observing authorization requests.
- pub fn remove_authorize_request_callback(&mut self) {
- // SAFETY: only requires an initialised handle.
- unsafe { sys::Discord_Client_RemoveAuthorizeRequestCallback(self.as_raw_mut()) }
- }
-
- // ---- Provisional accounts ----
- //
- // A provisional account lets a player use the SDK before linking a real
- // Discord account; it can later be merged into one.
-
- /// Obtain a token for a provisional account backed by an external identity.
- pub fn provisional_token<F>(
- &mut self,
- application_id: u64,
- external_auth_type: ExternalAuthType,
- external_auth_token: &str,
- callback: F,
- ) where
- F: FnOnce(Result<Token>) + 'static,
- {
- // SAFETY: the token string is copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_GetProvisionalToken(
- self.as_raw_mut(),
- application_id,
- external_auth_type.into_raw(),
- string::borrow(external_auth_token),
- Some(token_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Exchange an authorization code while merging a provisional account.
- #[allow(clippy::too_many_arguments)] // Mirrors the C function exactly.
- pub fn token_from_provisional_merge<F>(
- &mut self,
- application_id: u64,
- code: &str,
- code_verifier: &str,
- redirect_uri: &str,
- external_auth_type: ExternalAuthType,
- external_auth_token: &str,
- callback: F,
- ) where
- F: FnOnce(Result<Token>) + 'static,
- {
- // SAFETY: all strings are copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_GetTokenFromProvisionalMerge(
- self.as_raw_mut(),
- application_id,
- string::borrow(code),
- string::borrow(code_verifier),
- string::borrow(redirect_uri),
- external_auth_type.into_raw(),
- string::borrow(external_auth_token),
- Some(token_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Device-authorization variant of [`token_from_provisional_merge`](Self::token_from_provisional_merge).
- pub fn token_from_device_provisional_merge<F>(
- &mut self,
- args: &mut DeviceAuthorizationArgs,
- external_auth_type: ExternalAuthType,
- external_auth_token: &str,
- callback: F,
- ) where
- F: FnOnce(Result<Token>) + 'static,
- {
- // SAFETY: `args` is read during the call; the token string is copied.
- unsafe {
- sys::Discord_Client_GetTokenFromDeviceProvisionalMerge(
- self.as_raw_mut(),
- args.as_raw_mut(),
- external_auth_type.into_raw(),
- string::borrow(external_auth_token),
- Some(token_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Split an external identity back out into its own provisional account.
- pub fn unmerge_into_provisional_account<F>(
- &mut self,
- application_id: u64,
- external_auth_type: ExternalAuthType,
- external_auth_token: &str,
- callback: F,
- ) where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the token string is copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_UnmergeIntoProvisionalAccount(
- self.as_raw_mut(),
- application_id,
- external_auth_type.into_raw(),
- string::borrow(external_auth_token),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Rename a provisional account.
- pub fn update_provisional_account_display_name<F>(&mut self, name: &str, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the name string is copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_UpdateProvisionalAccountDisplayName(
- self.as_raw_mut(),
- string::borrow(name),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Tell the SDK a provisional account merge finished, and whether it worked.
- pub fn provisional_user_merge_completed(&mut self, success: bool) {
- // SAFETY: a plain by-value write to an initialised handle.
- unsafe { sys::Discord_Client_ProvisionalUserMergeCompleted(self.as_raw_mut(), success) }
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/lobby.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/lobby.rs
deleted file mode 100644
index 0933197..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/lobby.rs
+++ /dev/null
@@ -1,606 +0,0 @@
-//! Lobbies, guilds, and linking a lobby to a Discord channel.
-//!
-//! A lobby is a developer-controlled group of users that can chat and talk
-//! together. This module holds the [`Client`] half of the lobby API: creating
-//! and joining lobbies, looking up [`Lobby`] handles, observing lobby events,
-//! and wiring a lobby up to a real Discord channel.
-//!
-//! # Lobby secrets
-//!
-//! [`create_or_join_lobby`](Client::create_or_join_lobby) does not take a lobby
-//! ID — it takes a *secret*, a hard-to-guess string the game generates. Every
-//! user who joins with the same secret lands in the same lobby, and the first
-//! one to use it creates that lobby. That is the whole membership mechanism: no
-//! server-side component is required, and possession of the secret *is* the
-//! invitation.
-//!
-//! Because of that, a secret should be exchanged only through a channel that
-//! already restricts who can see it. Discord's activity-invite and rich-presence
-//! systems both carry a secret string visible only to accepted party members,
-//! and are the recommended transport.
-//!
-//! Secrets expire after roughly 30 days. Past that point the old lobby can no
-//! longer be joined and the same secret will create a fresh one instead, so this
-//! flow is not suitable for long-lived lobbies — use the [server APIs] for those.
-//!
-//! [server APIs]: https://docs.discord.com/developers/resources/lobby
-//!
-//! # Lifetime
-//!
-//! Client-created lobbies auto-delete once idle (no connected users) for a few
-//! minutes — 5 by default, configurable up to 7 days through the server API.
-//! Only lobbies that have a secret can be left with
-//! [`leave_lobby`](Client::leave_lobby); lobbies created through the server API
-//! must be manipulated through the server API.
-//!
-//! # Channel linking
-//!
-//! A lobby can be linked to a Discord text channel so messages sent in one show
-//! up in the other. The flow is: [`user_guilds`](Client::user_guilds) to list
-//! the user's servers, [`guild_channels`](Client::guild_channels) to list the
-//! channels in the chosen one, then
-//! [`link_channel_to_lobby`](Client::link_channel_to_lobby).
-//!
-//! Only members holding the `CanLinkLobby` flag — settable solely through the
-//! server API — may link a lobby, which lets a game restrict linking to clan or
-//! guild leaders. Unlinking needs only that same flag, not any Discord
-//! permission on the channel.
-//!
-//! Discord permissions are **not** synchronised into the game: every member of a
-//! lobby can read and write the linked channel regardless of whether they could
-//! see it on Discord. See
-//! [`GuildChannel::is_viewable_and_writeable_by_all_members`] before offering
-//! private channels for linking.
-//!
-//! [`GuildChannel::is_viewable_and_writeable_by_all_members`]:
-//! crate::channel::GuildChannel::is_viewable_and_writeable_by_all_members
-
-use super::Client;
-use crate::channel::{Channel, GuildChannel, GuildMinimal};
-use crate::error::{Result, to_result};
-use crate::lobby::Lobby;
-use crate::{callback, span, string};
-use discord_social_sdk_sys as sys;
-use std::ffi::c_void;
-use std::mem::MaybeUninit;
-
-/// Borrow a slice of key/value pairs as two parallel `Discord_String` arrays.
-///
-/// `Discord_Properties` is `{ size, keys, values }` — two arrays indexed in
-/// lockstep, not a map. The returned vectors own nothing but the `Discord_String`
-/// descriptors; the bytes they point at still belong to `pairs`.
-fn properties_arrays(
- pairs: &[(&str, &str)],
-) -> (Vec<sys::Discord_String>, Vec<sys::Discord_String>) {
- let keys = pairs.iter().map(|(k, _)| string::borrow(k)).collect();
- let values = pairs.iter().map(|(_, v)| string::borrow(v)).collect();
- (keys, values)
-}
-
-/// Assemble a `Discord_Properties` from arrays produced by [`properties_arrays`].
-///
-/// # Safety
-///
-/// The result borrows both vectors and every string they describe. It must not
-/// outlive them, and may only be passed to SDK functions that copy their input
-/// before returning — which is what `Discord_Client_CreateOrJoinLobbyWithMetadata`
-/// does. Never pass the result to `Discord_FreeProperties`: that function frees
-/// SDK-allocated buffers, and none of this memory is SDK-allocated.
-fn properties(
- keys: &mut [sys::Discord_String],
- values: &mut [sys::Discord_String],
-) -> sys::Discord_Properties {
- sys::Discord_Properties {
- size: keys.len().min(values.len()),
- keys: keys.as_mut_ptr(),
- values: values.as_mut_ptr(),
- }
-}
-
-/// Trampoline for `Discord_Client_CreateOrJoinLobbyCallback`.
-unsafe extern "C" fn create_or_join_tramp<F>(
- result: *mut sys::Discord_ClientResult,
- lobby_id: u64,
- userdata: *mut c_void,
-) where
- F: FnOnce(Result<u64>) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F` installed alongside this trampoline.
- unsafe { callback::dispatch_once::<F>(userdata, |f| f(to_result(result).map(|()| lobby_id))) }
-}
-
-/// Trampoline for `Discord_Client_LinkOrUnlinkChannelCallback` and
-/// `Discord_Client_LeaveLobbyCallback`, which report only success or failure.
-unsafe extern "C" fn result_tramp<F>(result: *mut sys::Discord_ClientResult, userdata: *mut c_void)
-where
- F: FnOnce(Result<()>) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F` installed alongside this trampoline.
- unsafe { callback::dispatch_once::<F>(userdata, |f| f(to_result(result))) }
-}
-
-/// Trampoline for the lobby events that carry only a lobby ID.
-unsafe extern "C" fn lobby_event_tramp<F>(lobby_id: u64, userdata: *mut c_void)
-where
- F: FnMut(u64) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F` installed alongside this trampoline.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f(lobby_id)) }
-}
-
-/// Trampoline for the lobby events that carry a lobby ID and a member ID.
-unsafe extern "C" fn lobby_member_event_tramp<F>(
- lobby_id: u64,
- member_id: u64,
- userdata: *mut c_void,
-) where
- F: FnMut(u64, u64) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F` installed alongside this trampoline.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f(lobby_id, member_id)) }
-}
-
-impl Client {
- // ---- Creating, joining, and leaving ----
-
- /// Join the lobby identified by `secret`, creating it if it does not exist.
- ///
- /// Everyone who joins with the same secret ends up in the same lobby, and
- /// the first to use it creates that lobby; on success the callback receives
- /// the lobby's ID.
- ///
- /// The secret should be hard to guess, since possession of it *is* the
- /// invitation. Discord recommends distributing it through the activity
- /// invite and rich presence systems, which carry a secret string only
- /// accepted party members can see.
- ///
- /// Secrets expire after roughly 30 days, after which the old lobby can no
- /// longer be joined and the same secret creates a new one — so this is not
- /// the right tool for long-lived lobbies. The lobby also auto-deletes once
- /// idle, by default after 5 minutes with no connected user.
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn create_or_join_lobby<F>(&mut self, secret: &str, callback: F)
- where
- F: FnOnce(Result<u64>) + 'static,
- {
- // SAFETY: the secret is copied by the SDK during the call, and the SDK
- // owns the boxed closure until it invokes `free_fn`.
- unsafe {
- sys::Discord_Client_CreateOrJoinLobby(
- self.as_raw_mut(),
- string::borrow(secret),
- Some(create_or_join_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// [`create_or_join_lobby`](Self::create_or_join_lobby) with metadata attached.
- ///
- /// `lobby_metadata` is stored on the lobby and `member_metadata` on the
- /// joining member; both are flat string key/value pairs readable by every
- /// member through [`Lobby::metadata`](crate::lobby::Lobby::metadata) and
- /// [`LobbyMember::metadata`](crate::lobby::LobbyMember::metadata). A typical
- /// use is publishing each player's in-game ID so the whole lobby can map
- /// Discord IDs onto game IDs.
- ///
- /// Later calls **overwrite** the lobby's and the member's metadata rather
- /// than merging into it.
- pub fn create_or_join_lobby_with_metadata<F>(
- &mut self,
- secret: &str,
- lobby_metadata: &[(&str, &str)],
- member_metadata: &[(&str, &str)],
- callback: F,
- ) where
- F: FnOnce(Result<u64>) + 'static,
- {
- let (mut lobby_keys, mut lobby_values) = properties_arrays(lobby_metadata);
- let (mut member_keys, mut member_values) = properties_arrays(member_metadata);
- let lobby_props = properties(&mut lobby_keys, &mut lobby_values);
- let member_props = properties(&mut member_keys, &mut member_values);
- // SAFETY: both `Discord_Properties` values borrow the four vectors above
- // and the caller's strings. All of them are still in scope when the call
- // returns, and the SDK copies the properties during the call — the C++
- // wrapper's `ConvertedProperties` frees its own copies as soon as the
- // same call returns, which is what proves the copy happens. They are
- // deliberately not passed to `Discord_FreeProperties`, which is only for
- // SDK-allocated buffers.
- unsafe {
- sys::Discord_Client_CreateOrJoinLobbyWithMetadata(
- self.as_raw_mut(),
- string::borrow(secret),
- lobby_props,
- member_props,
- Some(create_or_join_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Remove the current user from a lobby.
- ///
- /// Only lobbies that have a secret — that is, lobbies created through
- /// [`create_or_join_lobby`](Self::create_or_join_lobby) — can be left.
- /// Lobbies created through the server API are not client-manipulable and
- /// must be changed through the server API too.
- pub fn leave_lobby<F>(&mut self, lobby_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_LeaveLobby(
- self.as_raw_mut(),
- lobby_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- // ---- Reading lobby state ----
-
- /// The lobby with the given ID, if the SDK has it loaded.
- pub fn lobby(&self, lobby_id: u64) -> Option<Lobby> {
- let mut raw = MaybeUninit::<sys::Discord_LobbyHandle>::uninit();
- // SAFETY: the out-parameter is only initialised when the call returns
- // true, and ownership of the handle then transfers to us.
- unsafe {
- if sys::Discord_Client_GetLobbyHandle(self.raw_ptr(), lobby_id, raw.as_mut_ptr()) {
- Some(Lobby::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// The IDs of every lobby the user belongs to that the SDK has loaded.
- ///
- /// Lobbies are loaded optimistically at startup, but may not all be present
- /// the instant the client reaches `Status::Ready`.
- pub fn lobby_ids(&self) -> Vec<u64> {
- // SAFETY: the getter initialises the span and transfers ownership of the
- // backing array; the elements are plain integers needing no wrapping.
- unsafe {
- span::out(
- |out| sys::Discord_Client_GetLobbyIds(self.raw_ptr(), out),
- |id| id,
- )
- }
- }
-
- /// The channel with the given ID, if the SDK has it loaded.
- ///
- /// Every Discord message is sent in a channel, so the common use is looking
- /// up the channel a message came from. Lobbies work here too: the possible
- /// results are a DM, an ephemeral DM, and a lobby.
- pub fn channel(&self, channel_id: u64) -> Option<Channel> {
- let mut raw = MaybeUninit::<sys::Discord_ChannelHandle>::uninit();
- // SAFETY: the out-parameter is only initialised when the call returns
- // true, and ownership of the handle then transfers to us.
- unsafe {
- if sys::Discord_Client_GetChannelHandle(self.raw_ptr(), channel_id, raw.as_mut_ptr()) {
- Some(Channel::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- // ---- Channel linking ----
-
- /// Every guild (Discord server) the current user is a member of.
- ///
- /// The first step of the channel-linking flow: use it to let the user pick
- /// which server to link to, then call
- /// [`guild_channels`](Self::guild_channels) for that guild.
- pub fn user_guilds<F>(&mut self, callback: F)
- where
- F: FnOnce(Result<Vec<GuildMinimal>>) + 'static,
- {
- unsafe extern "C" fn tramp<F>(
- result: *mut sys::Discord_ClientResult,
- guilds: sys::Discord_GuildMinimalSpan,
- userdata: *mut c_void,
- ) where
- F: FnOnce(Result<Vec<GuildMinimal>>) + 'static,
- {
-// SAFETY: the span is transferred to us — the C++ wrapper adopts every
- // element as owned and then frees the array — so the elements are
- // moved out and the array released.
- unsafe {
- callback::dispatch_once::<F>(userdata, |f| {
- // Claimed before the result is inspected: the SDK transfers this
- // payload regardless of outcome, so taking it only on success
- // would leak it on every failed request.
- let guilds = span::take(guilds, |raw| GuildMinimal::from_raw(raw));
- f(to_result(result).map(|()| guilds))
- })
- }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_GetUserGuilds(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Every channel in `guild_id` that the current user can access.
- ///
- /// Sorted by the channel's `position`, matching the order shown in the
- /// Discord client. Check
- /// [`GuildChannel::is_linkable`](crate::channel::GuildChannel::is_linkable)
- /// before offering a channel for linking.
- pub fn guild_channels<F>(&mut self, guild_id: u64, callback: F)
- where
- F: FnOnce(Result<Vec<GuildChannel>>) + 'static,
- {
- unsafe extern "C" fn tramp<F>(
- result: *mut sys::Discord_ClientResult,
- guild_channels: sys::Discord_GuildChannelSpan,
- userdata: *mut c_void,
- ) where
- F: FnOnce(Result<Vec<GuildChannel>>) + 'static,
- {
-// SAFETY: the span is transferred to us — the C++ wrapper adopts every
- // element as owned and then frees the array — so the elements are
- // moved out and the array released.
- unsafe {
- callback::dispatch_once::<F>(userdata, |f| {
- // Claimed before the result is inspected: the SDK transfers this
- // payload regardless of outcome, so taking it only on success
- // would leak it on every failed request.
- let channels = span::take(guild_channels, |raw| GuildChannel::from_raw(raw));
- f(to_result(result).map(|()| channels))
- })
- }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_GetGuildChannels(
- self.as_raw_mut(),
- guild_id,
- Some(tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Link a Discord channel to a lobby, mirroring messages between the two.
- ///
- /// Requires the current user to hold the `CanLinkLobby` member flag in the
- /// lobby *and* Manage Channels, View Channel and Send Messages in the
- /// channel. A linked lobby is never auto-deleted for idleness.
- pub fn link_channel_to_lobby<F>(&mut self, lobby_id: u64, channel_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_LinkChannelToLobby(
- self.as_raw_mut(),
- lobby_id,
- channel_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Remove any existing channel link from a lobby.
- ///
- /// Any lobby member with the `CanLinkLobby` flag can sever the link; no
- /// Discord permission on the channel itself is needed.
- pub fn unlink_channel_from_lobby<F>(&mut self, lobby_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_UnlinkChannelFromLobby(
- self.as_raw_mut(),
- lobby_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Invite the current user to the guild owning the lobby's linked channel.
- ///
- /// On success the callback receives the invite URL. On desktop the user is
- /// also forwarded to the Discord client to accept or decline it; on consoles
- /// no navigation happens, so the game must present the URL itself.
- ///
- /// `on_provisional_merge_required` fires if the operation cannot proceed
- /// until the user's provisional account is merged into a real Discord
- /// account. It is registered as a persistent handler and stays installed
- /// until the SDK releases it, so it is [`FnMut`] rather than [`FnOnce`].
- pub fn join_linked_lobby_guild<M, F>(
- &mut self,
- lobby_id: u64,
- on_provisional_merge_required: M,
- callback: F,
- ) where
- M: FnMut() + 'static,
- F: FnOnce(Result<String>) + 'static,
- {
- unsafe extern "C" fn merge_tramp<M: FnMut() + 'static>(userdata: *mut c_void) {
- // SAFETY: `userdata` is the boxed `M` installed below.
- unsafe { callback::dispatch_mut::<M>(userdata, |m| m()) }
- }
- unsafe extern "C" fn tramp<F>(
- result: *mut sys::Discord_ClientResult,
- invite_url: sys::Discord_String,
- userdata: *mut c_void,
- ) where
- F: FnOnce(Result<String>) + 'static,
- {
- // SAFETY: `invite_url` is transferred to us and must be freed, so it is taken.
- unsafe {
- callback::dispatch_once::<F>(userdata, |f| {
- // Claimed before the result is inspected: the SDK transfers this
- // payload regardless of outcome, so taking it only on success
- // would leak it on every failed request.
- let invite_url = string::take(invite_url);
- f(to_result(result).map(|()| invite_url))
- })
- }
- }
- // SAFETY: the SDK owns both boxed closures and frees each through its
- // own `free_fn`; the two userdata pointers are never mixed up because
- // each trampoline is monomorphised over its own closure type.
- unsafe {
- sys::Discord_Client_JoinLinkedLobbyGuild(
- self.as_raw_mut(),
- lobby_id,
- Some(merge_tramp::<M>),
- callback::free_fn::<M>(),
- callback::persistent_userdata(on_provisional_merge_required),
- Some(tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- // ---- Lobby events ----
-
- /// Be notified when a lobby becomes available to this client.
- ///
- /// The handler receives the lobby ID. "Available" covers several cases: a
- /// new lobby was created with the current user in it, the current user was
- /// added to an existing lobby, or a lobby recovered after a backend outage.
- ///
- /// It can therefore fire more than once per session for the same lobby —
- /// though never twice in a row, since
- /// [`on_lobby_deleted`](Self::on_lobby_deleted) fires in between.
- pub fn on_lobby_created<F>(&mut self, callback: F)
- where
- F: FnMut(u64) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetLobbyCreatedCallback(
- self.as_raw_mut(),
- Some(lobby_event_tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Be notified when a lobby is no longer available to this client.
- ///
- /// The handler receives the lobby ID. This covers the lobby being deleted,
- /// the current user being removed from it, and backend outages — so the
- /// lobby may well still exist for other users.
- pub fn on_lobby_deleted<F>(&mut self, callback: F)
- where
- F: FnMut(u64) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetLobbyDeletedCallback(
- self.as_raw_mut(),
- Some(lobby_event_tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Be notified when a lobby is edited — for example when its metadata changes.
- ///
- /// The handler receives the lobby ID.
- pub fn on_lobby_updated<F>(&mut self, callback: F)
- where
- F: FnMut(u64) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetLobbyUpdatedCallback(
- self.as_raw_mut(),
- Some(lobby_event_tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Be notified when a user is added to a lobby.
- ///
- /// The handler receives `(lobby_id, member_id)`. It does *not* fire for the
- /// current user — [`on_lobby_created`](Self::on_lobby_created) does that
- /// instead. Membership is separate from connectedness, so a newly added
- /// member is not necessarily online: they have merely gained permission to
- /// connect.
- pub fn on_lobby_member_added<F>(&mut self, callback: F)
- where
- F: FnMut(u64, u64) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetLobbyMemberAddedCallback(
- self.as_raw_mut(),
- Some(lobby_member_event_tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Be notified when a member is removed from a lobby and can no longer
- /// connect to it.
- ///
- /// The handler receives `(lobby_id, member_id)`. It does *not* fire for the
- /// current user — [`on_lobby_deleted`](Self::on_lobby_deleted) does that
- /// instead — nor when a member merely quits the game, which surfaces as
- /// [`on_lobby_member_updated`](Self::on_lobby_member_updated) with
- /// [`LobbyMember::connected`](crate::lobby::LobbyMember::connected) now false.
- pub fn on_lobby_member_removed<F>(&mut self, callback: F)
- where
- F: FnMut(u64, u64) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetLobbyMemberRemovedCallback(
- self.as_raw_mut(),
- Some(lobby_member_event_tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Be notified when a member of a lobby changes.
- ///
- /// The handler receives `(lobby_id, member_id)`. Fires when the member
- /// connects or disconnects, and when their metadata changes.
- pub fn on_lobby_member_updated<F>(&mut self, callback: F)
- where
- F: FnMut(u64, u64) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetLobbyMemberUpdatedCallback(
- self.as_raw_mut(),
- Some(lobby_member_event_tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/messaging.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/messaging.rs
deleted file mode 100644
index 1e572b0..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/messaging.rs
+++ /dev/null
@@ -1,551 +0,0 @@
-//! Sending, editing, and observing chat messages.
-//!
-//! The SDK carries two kinds of chat, both of which arrive as [`Message`]
-//! handles:
-//!
-//! - **User messages** — one-on-one direct messages between the current user and
-//! one recipient, sent with [`Client::send_user_message`]. A DM can only be
-//! sent when the two users are both online in the game and have not blocked
-//! each other, or are friends, or share a Discord server and have DM'd there
-//! before.
-//! - **Lobby messages** — messages sent to every member of a lobby with
-//! [`Client::send_lobby_message`]. If the lobby is linked to a Discord
-//! channel, the message is relayed to that channel too.
-//!
-//! Message content is capped at 2,000 characters and may contain Discord's
-//! [message formatting] markup.
-//!
-//! # History
-//!
-//! [`Client::message`] reads the SDK's in-memory cache — the 25 most recent
-//! messages per channel. To load more, [`Client::fetch_lobby_messages`] and
-//! [`Client::fetch_user_messages`] go out to Discord's API and return up to 200
-//! messages from the last 72 hours, newest first.
-//!
-//! # Notifications
-//!
-//! When the Discord desktop app is running on the same machine, the user hears
-//! its notification for a message they can already see in game. Call
-//! [`Client::set_showing_chat`] whenever in-game chat is shown or hidden so
-//! Discord can suppress the duplicate.
-//!
-//! [message formatting]: https://discord.com/developers/docs/reference#message-formatting
-
-use super::Client;
-use crate::error::{Result, to_result};
-use crate::message::{Message, UserMessageSummary};
-use crate::{callback, span, string};
-use discord_social_sdk_sys as sys;
-use std::ffi::c_void;
-use std::mem::MaybeUninit;
-
-/// Build a `Discord_Properties` borrowing Rust memory and run `f` with it.
-///
-/// `Discord_Properties` is two parallel arrays of `Discord_String`. The SDK
-/// copies both the arrays and the strings they point at while the call runs —
-/// the official C++ wrapper allocates a temporary copy and frees it the instant
-/// the call returns — so borrowing the caller's `&str`s is sound as long as the
-/// backing [`Vec`]s outlive the call. Keeping them in scope here is what
-/// guarantees that.
-///
-/// The result must never be passed to `Discord_FreeProperties`: nothing in it
-/// was allocated by the SDK.
-fn with_properties<T, F>(metadata: &[(&str, &str)], f: F) -> T
-where
- F: FnOnce(sys::Discord_Properties) -> T,
-{
- let mut keys: Vec<sys::Discord_String> =
- metadata.iter().map(|(k, _)| string::borrow(k)).collect();
- let mut values: Vec<sys::Discord_String> =
- metadata.iter().map(|(_, v)| string::borrow(v)).collect();
- let properties = sys::Discord_Properties {
- size: keys.len(),
- keys: keys.as_mut_ptr(),
- values: values.as_mut_ptr(),
- };
- // `keys` and `values` are still owned by this frame, so the pointers stay
- // valid for the whole of `f`.
- f(properties)
-}
-
-/// Trampoline for `Discord_Client_SendUserMessageCallback`.
-///
-/// Shared by every send site; on success it reports the new message's id.
-unsafe extern "C" fn send_tramp<F>(
- result: *mut sys::Discord_ClientResult,
- message_id: u64,
- userdata: *mut c_void,
-) where
- F: FnOnce(Result<u64>) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F` installed alongside this trampoline.
- unsafe { callback::dispatch_once::<F>(userdata, |f| f(to_result(result).map(|()| message_id))) }
-}
-
-/// Trampoline for callbacks that report only success or failure.
-unsafe extern "C" fn result_tramp<F>(result: *mut sys::Discord_ClientResult, userdata: *mut c_void)
-where
- F: FnOnce(Result<()>) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F` installed alongside this trampoline.
- unsafe { callback::dispatch_once::<F>(userdata, |f| f(to_result(result))) }
-}
-
-/// Trampoline for the two message-fetching callbacks.
-///
-/// The `Discord_MessageHandleSpan` is **owned**: the SDK transfers the array and
-/// every handle in it, exactly as the official C++ wrapper does when it adopts
-/// each element as `DiscordObjectState::Owned` and then frees the array. Each
-/// element is therefore moved out rather than cloned, and the array released.
-/// Treating the span as borrowed would leak every message in it.
-unsafe extern "C" fn messages_tramp<F>(
- result: *mut sys::Discord_ClientResult,
- messages: sys::Discord_MessageHandleSpan,
- userdata: *mut c_void,
-) where
- F: FnOnce(Result<Vec<Message>>) + 'static,
-{
- // SAFETY: the span is transferred to us — the C++ wrapper adopts every element
- // as owned and then frees the array — so elements are moved out, not cloned.
- unsafe {
- callback::dispatch_once::<F>(userdata, |f| {
- // Claimed before the result is inspected: the SDK transfers the span
- // and every handle in it regardless of outcome, so taking it only on
- // success would leak the array and all its messages on every failure.
- let messages = span::take(messages, |raw| Message::from_raw(raw));
- f(to_result(result).map(|()| messages))
- })
- }
-}
-
-impl Client {
- // ---- Sending ----
-
- /// Send a direct message to `recipient_id`.
- ///
- /// The content is capped at 2,000 characters and may contain Discord's
- /// message formatting markup. On success the callback receives the new
- /// message's id.
- ///
- /// A DM can only be delivered when one of the following holds:
- ///
- /// - both users are online in the game and have not blocked each other,
- /// - the users are friends, or
- /// - the users share a Discord server and have DM'd each other on Discord.
- ///
- /// Only send on behalf of a user in response to a user action.
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn send_user_message<F>(&mut self, recipient_id: u64, content: &str, callback: F)
- where
- F: FnOnce(Result<u64>) + 'static,
- {
- // SAFETY: the content string is copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_SendUserMessage(
- self.as_raw_mut(),
- recipient_id,
- string::borrow(content),
- Some(send_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Send a direct message with developer-defined metadata attached.
- ///
- /// `metadata` is plain string key/value pairs travelling alongside the
- /// message — carrying the in-game name of the character who spoke, for
- /// example. It is readable again via [`Message::metadata`].
- ///
- /// Otherwise identical to [`send_user_message`](Self::send_user_message).
- pub fn send_user_message_with_metadata<F>(
- &mut self,
- recipient_id: u64,
- content: &str,
- metadata: &[(&str, &str)],
- callback: F,
- ) where
- F: FnOnce(Result<u64>) + 'static,
- {
- let ptr = self.as_raw_mut();
- with_properties(metadata, |properties| {
- // SAFETY: the content string and the properties both borrow Rust
- // memory that outlives this call, and the SDK copies both before
- // returning.
- unsafe {
- sys::Discord_Client_SendUserMessageWithMetadata(
- ptr,
- recipient_id,
- string::borrow(content),
- properties,
- Some(send_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- })
- }
-
- /// Send a message to every member of a lobby.
- ///
- /// The content is capped at 2,000 characters and may contain Discord's
- /// message formatting markup. If the lobby is linked to a Discord channel
- /// the message is also posted there. On success the callback receives the
- /// new message's id.
- pub fn send_lobby_message<F>(&mut self, lobby_id: u64, content: &str, callback: F)
- where
- F: FnOnce(Result<u64>) + 'static,
- {
- // SAFETY: the content string is copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_SendLobbyMessage(
- self.as_raw_mut(),
- lobby_id,
- string::borrow(content),
- Some(send_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Send a lobby message with developer-defined metadata attached.
- ///
- /// `metadata` is plain string key/value pairs, readable again via
- /// [`Message::metadata`].
- pub fn send_lobby_message_with_metadata<F>(
- &mut self,
- lobby_id: u64,
- content: &str,
- metadata: &[(&str, &str)],
- callback: F,
- ) where
- F: FnOnce(Result<u64>) + 'static,
- {
- let ptr = self.as_raw_mut();
- with_properties(metadata, |properties| {
- // SAFETY: the content string and the properties both borrow Rust
- // memory that outlives this call, and the SDK copies both before
- // returning.
- unsafe {
- sys::Discord_Client_SendLobbyMessageWithMetadata(
- ptr,
- lobby_id,
- string::borrow(content),
- properties,
- Some(send_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- })
- }
-
- // ---- Editing and deleting ----
-
- /// Edit a direct message the current user sent to `recipient_id`.
- ///
- /// The same restrictions apply as when sending — see
- /// [`send_user_message`](Self::send_user_message).
- pub fn edit_user_message<F>(
- &mut self,
- recipient_id: u64,
- message_id: u64,
- content: &str,
- callback: F,
- ) where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the content string is copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_EditUserMessage(
- self.as_raw_mut(),
- recipient_id,
- message_id,
- string::borrow(content),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Delete a direct message the current user sent to `recipient_id`.
- pub fn delete_user_message<F>(&mut self, recipient_id: u64, message_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_DeleteUserMessage(
- self.as_raw_mut(),
- recipient_id,
- message_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- // ---- Reading ----
-
- /// Look up a cached message by id.
- ///
- /// The SDK keeps the 25 most recent messages per channel in memory. Anything
- /// older, or sent before the SDK started, yields `None`.
- pub fn message(&self, message_id: u64) -> Option<Message> {
- let mut raw = MaybeUninit::<sys::Discord_MessageHandle>::uninit();
- // SAFETY: read-only call; the handle is initialised and transferred to
- // us only when the call returns `true`.
- unsafe {
- if sys::Discord_Client_GetMessageHandle(self.raw_ptr(), message_id, raw.as_mut_ptr()) {
- Some(Message::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// Fetch recent messages from a lobby.
- ///
- /// Returns at most 200 messages, none older than 72 hours, in reverse
- /// chronological order (newest first). The current user must be a member of
- /// the lobby.
- ///
- /// Unlike [`message`](Self::message) this always makes an HTTP request to
- /// Discord's API rather than reading the local cache.
- ///
- /// `limit` caps the number of messages returned.
- pub fn fetch_lobby_messages<F>(&mut self, lobby_id: u64, limit: i32, callback: F)
- where
- F: FnOnce(Result<Vec<Message>>) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_GetLobbyMessagesWithLimit(
- self.as_raw_mut(),
- lobby_id,
- limit,
- Some(messages_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Fetch recent messages from the DM conversation with `recipient_id`.
- ///
- /// Returns at most 200 messages, none older than 72 hours, in reverse
- /// chronological order (newest first). The local cache is consulted first
- /// and Discord's API is only queried when it does not hold enough messages.
- ///
- /// A `limit` greater than zero caps the number of messages returned; zero or
- /// negative means the default of 200 messages and 72 hours. Intended for
- /// loading history when the user opens a conversation.
- ///
- /// If either user has never played the game there is no channel between
- /// them, and the call fails with an HTTP 404
- /// ([`ErrorKind::Http`](crate::ErrorKind::Http)).
- pub fn fetch_user_messages<F>(&mut self, recipient_id: u64, limit: i32, callback: F)
- where
- F: FnOnce(Result<Vec<Message>>) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_GetUserMessagesWithLimit(
- self.as_raw_mut(),
- recipient_id,
- limit,
- Some(messages_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Fetch a summary of every DM conversation the current user has.
- ///
- /// Each [`UserMessageSummary`] names the other user and the id of the most
- /// recent message in that conversation; the messages themselves are loaded
- /// with [`fetch_user_messages`](Self::fetch_user_messages).
- pub fn fetch_user_message_summaries<F>(&mut self, callback: F)
- where
- F: FnOnce(Result<Vec<UserMessageSummary>>) + 'static,
- {
- unsafe extern "C" fn tramp<F>(
- result: *mut sys::Discord_ClientResult,
- summaries: sys::Discord_UserMessageSummarySpan,
- userdata: *mut c_void,
- ) where
- F: FnOnce(Result<Vec<UserMessageSummary>>) + 'static,
- {
- // SAFETY: the span is owned — the C++ wrapper adopts each element and
- // frees the array — so summaries are moved out rather than cloned.
- unsafe {
- callback::dispatch_once::<F>(userdata, |f| {
- // Claimed before the result is inspected: the SDK transfers this
- // payload regardless of outcome, so taking it only on success
- // would leak it on every failed request.
- let summaries = span::take(summaries, |raw| UserMessageSummary::from_raw(raw));
- f(to_result(result).map(|()| summaries))
- })
- }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_GetUserMessageSummaries(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- // ---- Handing off to the Discord client ----
-
- /// Whether a message can be viewed in the Discord client.
- ///
- /// Not all chat is replicated to Discord: lobby chat and some DMs are
- /// ephemeral and never persisted, so they cannot be opened. Check this
- /// before offering the user a "view in Discord" affordance.
- pub fn can_open_message_in_discord(&self, message_id: u64) -> bool {
- // SAFETY: read-only call on an initialised handle.
- unsafe { sys::Discord_Client_CanOpenMessageInDiscord(self.raw_ptr(), message_id) }
- }
-
- /// Open a message in the Discord client.
- ///
- /// Useful when a message carries content the game cannot render — wire this
- /// to the click handler of whatever prompt offers to show it in Discord.
- ///
- /// `on_merge_required` fires when the user is on a provisional account that
- /// must be merged into a real Discord account before the message can be
- /// opened; drive the merge flow from there. It is separate from `callback`,
- /// which reports whether the open itself succeeded.
- pub fn open_message_in_discord<M, F>(
- &mut self,
- message_id: u64,
- on_merge_required: M,
- callback: F,
- ) where
- M: FnMut() + 'static,
- F: FnOnce(Result<()>) + 'static,
- {
- unsafe extern "C" fn merge_tramp<M: FnMut() + 'static>(userdata: *mut c_void) {
- // SAFETY: `userdata` is the boxed `M` installed below.
- unsafe { callback::dispatch_mut::<M>(userdata, |f| f()) }
- }
- // SAFETY: the SDK owns both boxed closures and frees each through the
- // `free_fn` paired with it.
- unsafe {
- sys::Discord_Client_OpenMessageInDiscord(
- self.as_raw_mut(),
- message_id,
- Some(merge_tramp::<M>),
- callback::free_fn::<M>(),
- callback::persistent_userdata(on_merge_required),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- // ---- Events ----
-
- /// Be notified when a message is received, in a lobby or a DM.
- ///
- /// The closure receives the message id; [`message`](Self::message) turns
- /// that into a [`Message`], and [`Message::channel`] identifies where it was
- /// sent.
- ///
- /// Pair this with [`set_showing_chat`](Self::set_showing_chat) so a user
- /// running the Discord desktop app is not notified twice for a message they
- /// can already see in game.
- pub fn on_message_created<F>(&mut self, callback: F)
- where
- F: FnMut(u64) + 'static,
- {
- unsafe extern "C" fn tramp<F: FnMut(u64) + 'static>(message_id: u64, userdata: *mut c_void) {
- // SAFETY: `userdata` is the boxed `F` installed below.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f(message_id)) }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetMessageCreatedCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Be notified when a message is deleted.
- ///
- /// The closure receives the message id and the id of the channel it was in.
- /// Messages sent from a connected user's Discord client — and some sent from
- /// in game — can be deleted there, so handling this keeps the in-game view
- /// in step with Discord.
- pub fn on_message_deleted<F>(&mut self, callback: F)
- where
- F: FnMut(u64, u64) + 'static,
- {
- unsafe extern "C" fn tramp<F: FnMut(u64, u64) + 'static>(
- message_id: u64,
- channel_id: u64,
- userdata: *mut c_void,
- ) {
- // SAFETY: `userdata` is the boxed `F` installed below.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f(message_id, channel_id)) }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetMessageDeletedCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Be notified when a message is edited.
- ///
- /// The closure receives the message id; re-read the message with
- /// [`message`](Self::message) to see the new content. As with deletion,
- /// edits can originate from the user's Discord client.
- pub fn on_message_updated<F>(&mut self, callback: F)
- where
- F: FnMut(u64) + 'static,
- {
- unsafe extern "C" fn tramp<F: FnMut(u64) + 'static>(message_id: u64, userdata: *mut c_void) {
- // SAFETY: `userdata` is the boxed `F` installed below.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f(message_id)) }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetMessageUpdatedCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Tell Discord whether the game is currently showing chat.
- ///
- /// While this is `true`, the Discord desktop app suppresses its own
- /// notifications for messages the user can already see in game. Set it back
- /// to `false` as soon as chat is hidden — or the game loses focus — so the
- /// user starts hearing Discord's notifications again.
- pub fn set_showing_chat(&mut self, showing_chat: bool) {
- // SAFETY: a plain by-value write to an initialised handle.
- unsafe { sys::Discord_Client_SetShowingChat(self.as_raw_mut(), showing_chat) }
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/mod.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/mod.rs
deleted file mode 100644
index 3a40d3f..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/mod.rs
+++ /dev/null
@@ -1,530 +0,0 @@
-//! The [`Client`] — the entry point to the SDK.
-//!
-//! A `Client` owns the connection to Discord and is the receiver for nearly
-//! every operation the SDK offers. Its surface is large, so it is split across
-//! several files that each add an `impl Client` block:
-//!
-//! - this module — construction, connection lifecycle, status, logging, version
-//! - `auth` — OAuth2, tokens, provisional accounts
-//! - `voice` — calls, audio devices, capture and playback settings
-//! - `lobby` — creating, joining and observing lobbies
-//! - `messaging` — sending and reading messages
-//! - `relationships` — friends, blocking, friend requests
-//! - `presence` — rich presence and activity invites
-//!
-//! # Lifecycle
-//!
-//! A client must be given an application id, connected, and then driven by
-//! [`run_callbacks`](crate::run_callbacks). It is not usable until its status
-//! reaches [`ClientStatus::Ready`].
-//!
-//! ```no_run
-//! use discord_social_sdk::{Client, enums::ClientStatus, run_callbacks};
-//!
-//! let mut client = Client::new();
-//! client.set_application_id(1234567890);
-//! client.on_status_changed(|status, error, detail| {
-//! if let Some(error) = error {
-//! eprintln!("connection error: {error:?} ({detail})");
-//! }
-//! if status == ClientStatus::Ready {
-//! println!("ready");
-//! }
-//! });
-//! client.connect();
-//!
-//! loop {
-//! run_callbacks();
-//! std::thread::sleep(std::time::Duration::from_millis(16));
-//! }
-//! ```
-
-mod auth;
-mod lobby;
-mod messaging;
-mod presence;
-mod relationships;
-mod voice;
-
-pub use auth::{AuthorizationCode, CurrentUserInfo, Token};
-pub use voice::AudioFrame;
-
-use crate::enums::{AudioSystem, ClientError, ClientStatus, ClientThread, LoggingSeverity};
-use crate::handle::handle;
-use crate::user::User;
-use crate::{callback, string};
-use discord_social_sdk_sys as sys;
-use std::mem::MaybeUninit;
-
-handle! {
- /// Configuration for a [`Client`], for the cases [`Client::new`] does not cover.
- ///
- /// Only needed when pointing the SDK at non-production endpoints or tuning
- /// its threading and audio behaviour. Most applications should use
- /// [`Client::new`].
- ClientCreateOptions(sys::Discord_ClientCreateOptions) {
- init: sys::Discord_ClientCreateOptions_Init,
- drop: sys::Discord_ClientCreateOptions_Drop,
- clone: sys::Discord_ClientCreateOptions_Clone,
- }
-}
-
-impl ClientCreateOptions {
- /// The base URL for Discord's web endpoints.
- pub fn web_base(&self) -> String {
- // SAFETY: the getter fills the out-parameter and transfers ownership of it.
- unsafe { string::out(|out| sys::Discord_ClientCreateOptions_WebBase(self.raw_ptr(), out)) }
- }
-
- /// Override the base URL for Discord's web endpoints.
- pub fn set_web_base(&mut self, value: &str) {
- // SAFETY: the SDK copies the string during the call.
- unsafe {
- sys::Discord_ClientCreateOptions_SetWebBase(self.as_raw_mut(), string::borrow(value))
- }
- }
-
- /// The base URL for Discord's API endpoints.
- pub fn api_base(&self) -> String {
- // SAFETY: the getter fills the out-parameter and transfers ownership of it.
- unsafe { string::out(|out| sys::Discord_ClientCreateOptions_ApiBase(self.raw_ptr(), out)) }
- }
-
- /// Override the base URL for Discord's API endpoints.
- pub fn set_api_base(&mut self, value: &str) {
- // SAFETY: the SDK copies the string during the call.
- unsafe {
- sys::Discord_ClientCreateOptions_SetApiBase(self.as_raw_mut(), string::borrow(value))
- }
- }
-
- /// Which audio backend the SDK should use.
- ///
- /// Experimental; the default is appropriate for nearly all applications.
- pub fn experimental_audio_system(&self) -> AudioSystem {
- // SAFETY: a plain by-value read of an initialised handle.
- AudioSystem::from_raw(unsafe {
- sys::Discord_ClientCreateOptions_ExperimentalAudioSystem(self.raw_ptr())
- })
- }
-
- /// Select the audio backend. Experimental.
- pub fn set_experimental_audio_system(&mut self, value: AudioSystem) {
- // SAFETY: a plain by-value write to an initialised handle.
- unsafe {
- sys::Discord_ClientCreateOptions_SetExperimentalAudioSystem(
- self.as_raw_mut(),
- value.into_raw(),
- )
- }
- }
-
- /// Whether Android communication mode is suppressed for Bluetooth devices.
- ///
- /// Experimental, and only meaningful on Android.
- pub fn experimental_android_prevent_comms_for_bluetooth(&self) -> bool {
- // SAFETY: a plain by-value read of an initialised handle.
- unsafe {
- sys::Discord_ClientCreateOptions_ExperimentalAndroidPreventCommsForBluetooth(
- self.raw_ptr(),
- )
- }
- }
-
- /// Suppress Android communication mode for Bluetooth devices. Experimental.
- pub fn set_experimental_android_prevent_comms_for_bluetooth(&mut self, value: bool) {
- // SAFETY: a plain by-value write to an initialised handle.
- unsafe {
- sys::Discord_ClientCreateOptions_SetExperimentalAndroidPreventCommsForBluetooth(
- self.as_raw_mut(),
- value,
- )
- }
- }
-
- /// The CPU affinity mask applied to the SDK's threads, if one is set.
- pub fn cpu_affinity_mask(&self) -> Option<u64> {
- let mut out = MaybeUninit::<u64>::uninit();
- // SAFETY: the out-parameter is only initialised when the call returns true.
- unsafe {
- sys::Discord_ClientCreateOptions_CpuAffinityMask(self.raw_ptr(), out.as_mut_ptr())
- .then(|| out.assume_init())
- }
- }
-
- /// Pin the SDK's threads to a set of CPUs, or `None` to leave them unpinned.
- pub fn set_cpu_affinity_mask(&mut self, value: Option<u64>) {
- // SAFETY: a null pointer is the SDK's documented "unset" signal.
- unsafe {
- match value {
- Some(mut mask) => sys::Discord_ClientCreateOptions_SetCpuAffinityMask(
- self.as_raw_mut(),
- &mut mask,
- ),
- None => sys::Discord_ClientCreateOptions_SetCpuAffinityMask(
- self.as_raw_mut(),
- std::ptr::null_mut(),
- ),
- }
- }
- }
-}
-
-impl std::fmt::Debug for ClientCreateOptions {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("ClientCreateOptions")
- .field("api_base", &self.api_base())
- .field("web_base", &self.web_base())
- .field(
- "experimental_audio_system",
- &self.experimental_audio_system(),
- )
- .field("cpu_affinity_mask", &self.cpu_affinity_mask())
- .finish()
- }
-}
-
-handle! {
- /// The connection to Discord and the entry point to every SDK operation.
- ///
- /// See the [module documentation](self) for the lifecycle and for where each
- /// group of methods is defined.
- ///
- /// A `Client` is deliberately not [`Send`]: the SDK expects to be driven from
- /// a single thread, and every callback is delivered on whichever thread calls
- /// [`run_callbacks`](crate::run_callbacks).
- Client(sys::Discord_Client) {
- init: sys::Discord_Client_Init,
- drop: sys::Discord_Client_Drop,
- }
-}
-
-impl Client {
- /// Create a client against explicit API and web base URLs.
- ///
- /// Only needed for non-production endpoints; prefer [`Client::new`].
- pub fn with_bases(api_base: &str, web_base: &str) -> Self {
- let mut raw = MaybeUninit::<sys::Discord_Client>::uninit();
- // SAFETY: `InitWithBases` fully initialises the handle and copies both strings.
- unsafe {
- sys::Discord_Client_InitWithBases(
- raw.as_mut_ptr(),
- string::borrow(api_base),
- string::borrow(web_base),
- );
- Self {
- raw: raw.assume_init(),
- }
- }
- }
-
- /// Create a client from an explicit [`ClientCreateOptions`].
- pub fn with_options(options: &mut ClientCreateOptions) -> Self {
- let mut raw = MaybeUninit::<sys::Discord_Client>::uninit();
- // SAFETY: `InitWithOptions` fully initialises the handle; the options are
- // read during the call and not retained.
- unsafe {
- sys::Discord_Client_InitWithOptions(raw.as_mut_ptr(), options.as_raw_mut());
- Self {
- raw: raw.assume_init(),
- }
- }
- }
-
- /// The application id this client authenticates as.
- pub fn application_id(&self) -> u64 {
- // SAFETY: a plain by-value read of an initialised handle.
- unsafe { sys::Discord_Client_GetApplicationId(self.raw_ptr()) }
- }
-
- /// Set the application id. Must be called before [`connect`](Self::connect).
- pub fn set_application_id(&mut self, application_id: u64) {
- // SAFETY: a plain by-value write to an initialised handle.
- unsafe { sys::Discord_Client_SetApplicationId(self.as_raw_mut(), application_id) }
- }
-
- /// Begin connecting to Discord.
- ///
- /// Returns immediately. Progress is reported through
- /// [`on_status_changed`](Self::on_status_changed); the client is only usable
- /// once its status is [`ClientStatus::Ready`].
- pub fn connect(&mut self) {
- // SAFETY: connecting only requires an initialised handle.
- unsafe { sys::Discord_Client_Connect(self.as_raw_mut()) }
- }
-
- /// Begin disconnecting from Discord.
- ///
- /// Returns immediately; completion is reported as a status change to
- /// [`ClientStatus::Disconnected`].
- pub fn disconnect(&mut self) {
- // SAFETY: disconnecting only requires an initialised handle.
- unsafe { sys::Discord_Client_Disconnect(self.as_raw_mut()) }
- }
-
- /// The client's current connection status.
- pub fn status(&self) -> ClientStatus {
- // SAFETY: a plain by-value read of an initialised handle.
- ClientStatus::from_raw(unsafe { sys::Discord_Client_GetStatus(self.raw_ptr()) })
- }
-
- /// The currently authenticated user, or `None` if there is not one.
- ///
- /// Returns `None` before authentication completes rather than a placeholder,
- /// so an unauthenticated client is distinguishable from a real user.
- pub fn current_user(&self) -> Option<User> {
- let mut raw = MaybeUninit::<sys::Discord_UserHandle>::uninit();
- // SAFETY: the out-parameter is only initialised when the call returns true,
- // and ownership of the handle transfers to us in that case.
- unsafe {
- sys::Discord_Client_GetCurrentUserV2(self.raw_ptr(), raw.as_mut_ptr())
- .then(|| User::from_raw(raw.assume_init()))
- }
- }
-
- /// The currently authenticated user, or a placeholder when there is not one.
- ///
- /// The placeholder is a real [`User`] whose fields are all defaults — an id of
- /// `0` and empty strings — which is indistinguishable from a genuine user
- /// without checking. Prefer [`current_user`](Self::current_user).
- #[deprecated(
- note = "returns a dummy user when unauthenticated; use `current_user`, which returns Option"
- )]
- pub fn current_user_or_placeholder(&self) -> User {
- let mut raw = MaybeUninit::<sys::Discord_UserHandle>::uninit();
- // SAFETY: this getter always initialises the handle and transfers ownership.
- unsafe {
- sys::Discord_Client_GetCurrentUser(self.raw_ptr(), raw.as_mut_ptr());
- User::from_raw(raw.assume_init())
- }
- }
-
- /// Observe connection status changes.
- ///
- /// `error` is `None` while the transition is not a failure. `error_detail`
- /// carries a gateway close code when the SDK has one; see Discord's
- /// [gateway close event codes].
- ///
- /// Replaces any previously registered handler.
- ///
- /// [gateway close event codes]: https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
- pub fn on_status_changed<F>(&mut self, callback: F)
- where
- F: FnMut(ClientStatus, Option<ClientError>, i32) + 'static,
- {
- unsafe extern "C" fn tramp<F>(
- status: sys::Discord_Client_Status,
- error: sys::Discord_Client_Error,
- detail: i32,
- userdata: *mut std::ffi::c_void,
- ) where
- F: FnMut(ClientStatus, Option<ClientError>, i32) + 'static,
- {
- // SAFETY: `userdata` is the boxed `F` installed below and still owned by the SDK.
- unsafe {
- callback::dispatch_mut::<F>(userdata, |f| {
- let error = match ClientError::from_raw(error) {
- ClientError::None => None,
- other => Some(other),
- };
- f(ClientStatus::from_raw(status), error, detail)
- })
- }
- }
- // SAFETY: the SDK stores the boxed closure and releases it via `free_fn::<F>()`.
- unsafe {
- sys::Discord_Client_SetStatusChangedCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Receive the SDK's log messages at or above `min_severity`.
- ///
- /// Unlike most handlers this one *adds* to the set of log sinks rather than
- /// replacing the previous one.
- ///
- /// # When the closure is released is not guaranteed
- ///
- /// Log sinks are the one callback whose teardown the SDK does not promise,
- /// and the two SDK builds measurably disagree:
- ///
- /// - the **release** library frees the closure once the [`Client`] is dropped
- /// and the queue is pumped, like any other callback;
- /// - the **debug** library never frees it — not on drop, not on
- /// [`reset_callbacks`](crate::reset_callbacks) — so it and everything it
- /// captures live until the process exits.
- ///
- /// Write handlers that are correct either way: keep captures small, and do
- /// not capture credentials or anything whose lifetime you need to control.
- pub fn add_log_callback<F>(&mut self, min_severity: LoggingSeverity, callback: F)
- where
- F: FnMut(&str, LoggingSeverity) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`; the
- // message string is transferred to us and is freed by `take`.
- unsafe {
- sys::Discord_Client_AddLogCallback(
- self.as_raw_mut(),
- Some(log_tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- min_severity.into_raw(),
- )
- }
- }
-
- /// Receive the voice engine's log messages at or above `min_severity`.
- ///
- /// Adds to the set of voice log sinks rather than replacing it. As with
- /// [`add_log_callback`](Self::add_log_callback), the SDK never releases the
- /// closure — see that method for the consequences.
- pub fn add_voice_log_callback<F>(&mut self, min_severity: LoggingSeverity, callback: F)
- where
- F: FnMut(&str, LoggingSeverity) + 'static,
- {
- // SAFETY: as `add_log_callback`.
- unsafe {
- sys::Discord_Client_AddVoiceLogCallback(
- self.as_raw_mut(),
- Some(log_tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- min_severity.into_raw(),
- )
- }
- }
-
- /// Write SDK logs at or above `min_severity` to files in `path`.
- ///
- /// Returns `false` if the directory could not be used.
- pub fn set_log_dir(&mut self, path: &str, min_severity: LoggingSeverity) -> bool {
- // SAFETY: the SDK copies the path during the call.
- unsafe {
- sys::Discord_Client_SetLogDir(
- self.as_raw_mut(),
- string::borrow(path),
- min_severity.into_raw(),
- )
- }
- }
-
- /// Write voice engine logs at or above `min_severity` to files in `path`.
- pub fn set_voice_log_dir(&mut self, path: &str, min_severity: LoggingSeverity) {
- // SAFETY: the SDK copies the path during the call.
- unsafe {
- sys::Discord_Client_SetVoiceLogDir(
- self.as_raw_mut(),
- string::borrow(path),
- min_severity.into_raw(),
- )
- }
- }
-
- /// Cap how long an HTTP request may take before it is abandoned.
- pub fn set_http_request_timeout(&mut self, timeout: std::time::Duration) {
- let millis = timeout.as_millis().min(i32::MAX as u128) as i32;
- // SAFETY: a plain by-value write to an initialised handle.
- unsafe { sys::Discord_Client_SetHttpRequestTimeout(self.as_raw_mut(), millis) }
- }
-
- /// Set the OS thread priority for one of the SDK's internal threads.
- pub fn set_thread_priority(&mut self, thread: ClientThread, priority: i32) {
- // SAFETY: a plain by-value write to an initialised handle.
- unsafe {
- sys::Discord_Client_SetThreadPriority(self.as_raw_mut(), thread.into_raw(), priority)
- }
- }
-
- // ---- Associated helpers (no receiver in the C API) ----
-
- /// The SDK's major version.
- pub fn version_major() -> i32 {
- // SAFETY: takes no arguments and only reads static version data.
- unsafe { sys::Discord_Client_GetVersionMajor() }
- }
-
- /// The SDK's minor version.
- pub fn version_minor() -> i32 {
- // SAFETY: as `version_major`.
- unsafe { sys::Discord_Client_GetVersionMinor() }
- }
-
- /// The SDK's patch version.
- pub fn version_patch() -> i32 {
- // SAFETY: as `version_major`.
- unsafe { sys::Discord_Client_GetVersionPatch() }
- }
-
- /// The build hash of the SDK binary in use.
- pub fn version_hash() -> String {
- // SAFETY: fills the out-parameter and transfers ownership of it.
- unsafe { string::out(|out| sys::Discord_Client_GetVersionHash(out)) }
- }
-
- /// The OAuth2 scopes needed for rich presence only.
- pub fn default_presence_scopes() -> String {
- // SAFETY: fills the out-parameter and transfers ownership of it.
- unsafe { string::out(|out| sys::Discord_Client_GetDefaultPresenceScopes(out)) }
- }
-
- /// The OAuth2 scopes needed for the full communication feature set.
- pub fn default_communication_scopes() -> String {
- // SAFETY: fills the out-parameter and transfers ownership of it.
- unsafe { string::out(|out| sys::Discord_Client_GetDefaultCommunicationScopes(out)) }
- }
-
- /// The identifier representing "whatever the system default device is".
- pub fn default_audio_device_id() -> String {
- // SAFETY: fills the out-parameter and transfers ownership of it.
- unsafe { string::out(|out| sys::Discord_Client_GetDefaultAudioDeviceId(out)) }
- }
-
- /// The SDK's own description of a [`ClientStatus`].
- pub fn status_to_string(status: ClientStatus) -> String {
- // SAFETY: fills the out-parameter and transfers ownership of it.
- unsafe { string::out(|out| sys::Discord_Client_StatusToString(status.into_raw(), out)) }
- }
-
- /// The SDK's own description of a [`ClientError`].
- pub fn error_to_string(error: ClientError) -> String {
- // SAFETY: fills the out-parameter and transfers ownership of it.
- unsafe { string::out(|out| sys::Discord_Client_ErrorToString(error.into_raw(), out)) }
- }
-
- /// The SDK's own description of a [`ClientThread`].
- pub fn thread_to_string(thread: ClientThread) -> String {
- // SAFETY: fills the out-parameter and transfers ownership of it.
- unsafe { string::out(|out| sys::Discord_Client_ThreadToString(thread.into_raw(), out)) }
- }
-}
-
-/// Shared trampoline for the two log-callback registrations, which have
-/// identical signatures.
-unsafe extern "C" fn log_tramp<F>(
- message: sys::Discord_String,
- severity: sys::Discord_LoggingSeverity,
- userdata: *mut std::ffi::c_void,
-) where
- F: FnMut(&str, LoggingSeverity) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F`; `message` is transferred to us and freed by `take`.
- unsafe {
- callback::dispatch_mut::<F>(userdata, |f| {
- let text = string::take(message);
- f(&text, LoggingSeverity::from_raw(severity))
- })
- }
-}
-
-impl std::fmt::Debug for Client {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("Client")
- .field("application_id", &self.application_id())
- .field("status", &self.status())
- .finish_non_exhaustive()
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/presence.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/presence.rs
deleted file mode 100644
index b8eb73a..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/presence.rs
+++ /dev/null
@@ -1,503 +0,0 @@
-//! Rich presence, activity invites, join requests, and game launch registration.
-//!
-//! # Rich presence
-//!
-//! Rich presence is what other users see on Discord while this user plays: the
-//! game's name, what they are doing, and how big their party is. Publish it with
-//! [`Client::update_rich_presence`] and remove it with
-//! [`Client::clear_rich_presence`]. The [`Activity`] type carries the fields; see
-//! its documentation for how each one is rendered.
-//!
-//! Rich presence also powers invites, so an activity that is meant to be joinable
-//! must set a party with an id and a size that has room left, and a join secret.
-//!
-//! # Invites and join requests
-//!
-//! Both directions are message-backed and both surface through the *same* pair of
-//! event callbacks, [`on_activity_invite_created`](Client::on_activity_invite_created)
-//! and [`on_activity_invite_updated`](Client::on_activity_invite_updated). The
-//! [`invite_type`](crate::activity::ActivityInvite::invite_type) of the delivered
-//! invite distinguishes them.
-//!
-//! Inviting someone in:
-//!
-//! 1. User A publishes rich presence carrying a join secret.
-//! 2. User A calls [`send_activity_invite`](Client::send_activity_invite).
-//! 3. User B receives it through `on_activity_invite_created`.
-//! 4. User B calls [`accept_activity_invite`](Client::accept_activity_invite) and
-//! gets the join secret back, which the game uses to place them in the party.
-//!
-//! Asking to be let in:
-//!
-//! 1. User B calls [`send_activity_join_request`](Client::send_activity_join_request).
-//! 2. User A receives an invite of type
-//! [`ActivityActionType::JoinRequest`](crate::enums::ActivityActionType) through
-//! `on_activity_invite_created`.
-//! 3. If User A agrees, they call
-//! [`send_activity_join_request_reply`](Client::send_activity_join_request_reply),
-//! which sends User B a regular invite.
-//! 4. User B accepts it as above.
-//!
-//! When the user also runs the Discord desktop client, they may instead accept an
-//! invite there. That arrives through
-//! [`on_activity_join`](Client::on_activity_join) or
-//! [`on_activity_join_with_application`](Client::on_activity_join_with_application)
-//! rather than through the invite callbacks.
-//!
-//! # Launching the game from Discord
-//!
-//! Accepting an invite in the Discord client only works if Discord knows how to
-//! start the game. [`register_launch_command`](Client::register_launch_command) and
-//! [`register_launch_steam_application`](Client::register_launch_steam_application)
-//! tell it how. **These write registrations outside this process** — into the OS
-//! registry or equivalent application association store — so their effect outlives
-//! the running program. Call one of them at startup.
-
-use super::Client;
-use crate::activity::{Activity, ActivityInvite};
-use crate::error::{Result, to_result};
-use crate::{callback, string};
-use discord_social_sdk_sys as sys;
-use std::ffi::c_void;
-
-/// Trampoline shared by the callbacks that report only success or failure.
-///
-/// Covers `Discord_Client_SendActivityInviteCallback`,
-/// `Discord_Client_UpdateRichPresenceCallback`, and
-/// `Discord_Client_OpenConnectedGamesSettingsInDiscordCallback`, which are all the
-/// same shape.
-unsafe extern "C" fn result_tramp<F>(result: *mut sys::Discord_ClientResult, userdata: *mut c_void)
-where
- F: FnOnce(Result<()>) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F` installed alongside this trampoline.
- unsafe { callback::dispatch_once::<F>(userdata, |f| f(to_result(result))) }
-}
-
-/// Trampoline shared by both `Discord_Client_ActivityInviteCallback` sites.
-///
-/// The invite is **transferred** to the callback, not lent: the official C++
-/// wrapper adopts it as `DiscordObjectState::Owned` and lets its destructor run
-/// when the handler returns. It is therefore taken with `from_raw` and dropped
-/// here; borrowing it instead would leak one invite per event.
-///
-/// The handler still receives it by reference so the common case — reading a few
-/// fields — needs no clone. Handlers that must keep the invite can clone it.
-unsafe extern "C" fn invite_tramp<F>(invite: *mut sys::Discord_ActivityInvite, userdata: *mut c_void)
-where
- F: FnMut(&ActivityInvite) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F` installed below. `invite` is an owned
- // handle transferred to us; reading it out by value and wrapping it in
- // `ActivityInvite` makes the local responsible for dropping it.
- unsafe {
- callback::dispatch_mut::<F>(userdata, |f| {
- let owned = ActivityInvite::from_raw(std::ptr::read(invite));
- f(&owned)
- })
- }
-}
-
-impl Client {
- // ---- Rich presence ----
-
- /// Publish rich presence for the current user.
- ///
- /// Other users on Discord then see that this user is playing, along with
- /// whatever hints the [`Activity`] carries — a character name, a map, a score.
- /// Rich presence is also what makes activity invites possible.
- ///
- /// The activity is a *partial* object: `name` and `application_id` cannot be
- /// set here and are overwritten by the SDK.
- ///
- /// On desktop this may be called before [`connect`](Client::connect), but
- /// connecting clears it; while disconnected it sets the presence directly in
- /// the user's Discord client, when one is available.
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn update_rich_presence<F>(&mut self, activity: &mut Activity, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: `activity` is read during the call and not retained; the SDK owns
- // the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_UpdateRichPresence(
- self.as_raw_mut(),
- activity.as_raw_mut(),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Clear the rich presence for the current user.
- pub fn clear_rich_presence(&mut self) {
- // SAFETY: only requires an initialised handle.
- unsafe { sys::Discord_Client_ClearRichPresence(self.as_raw_mut()) }
- }
-
- // ---- Sending invites and join requests ----
-
- /// Send an activity invite to `user_id`.
- ///
- /// The invite travels as a Discord message, so it only goes through when at
- /// least one of the following holds:
- ///
- /// - both users are online, in the game, and have not blocked each other;
- /// - both users are friends;
- /// - both users share a Discord server and have previously DM'd each other.
- ///
- /// `content` is optional message text to accompany the invite; an empty string
- /// is fine.
- pub fn send_activity_invite<F>(&mut self, user_id: u64, content: &str, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the content string is copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_SendActivityInvite(
- self.as_raw_mut(),
- user_id,
- string::borrow(content),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Ask `user_id` to be let into their activity.
- ///
- /// Callable whenever that user has a rich presence activity for this game with
- /// room for another member. They receive an activity invite which they can
- /// accept or reject.
- pub fn send_activity_join_request<F>(&mut self, user_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SendActivityJoinRequest(
- self.as_raw_mut(),
- user_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Approve a join request, letting the requesting user in.
- ///
- /// `invite` is the join-request invite delivered by
- /// [`on_activity_invite_created`](Self::on_activity_invite_created). This sends
- /// the original user an activity invite, which they must then accept.
- pub fn send_activity_join_request_reply<F>(&mut self, invite: &ActivityInvite, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the C signature takes a non-const `Discord_ActivityInvite*` but
- // only reads it, matching the const-cast the official C++ wrapper performs
- // at this same call site. The invite is not retained past the call.
- unsafe {
- sys::Discord_Client_SendActivityJoinRequestReply(
- self.as_raw_mut(),
- invite.raw_ptr(),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Accept an activity invite this user received.
- ///
- /// The callback receives the join secret from the inviting user's rich presence
- /// activity, which the game uses to place this user into its own party system —
- /// for example by passing it as the secret when creating or joining a lobby.
- ///
- /// `invite` may be borrowed straight from
- /// [`on_activity_invite_created`](Self::on_activity_invite_created).
- pub fn accept_activity_invite<F>(&mut self, invite: &ActivityInvite, callback: F)
- where
- F: FnOnce(Result<String>) + 'static,
- {
- unsafe extern "C" fn tramp<F>(
- result: *mut sys::Discord_ClientResult,
- join_secret: sys::Discord_String,
- userdata: *mut c_void,
- ) where
- F: FnOnce(Result<String>) + 'static,
- {
- // SAFETY: `join_secret` is transferred to us and must be freed,
- // so it is viewed rather than taken.
- unsafe {
- callback::dispatch_once::<F>(userdata, |f| {
- // Claimed before the result is inspected: the SDK transfers this
- // payload regardless of outcome, so taking it only on success
- // would leak it on every failed request.
- let join_secret = string::take(join_secret);
- f(to_result(result).map(|()| join_secret))
- })
- }
- }
- // SAFETY: the C signature takes a non-const `Discord_ActivityInvite*` but
- // only reads it, matching the const-cast the official C++ wrapper performs
- // at this same call site. The invite is not retained past the call.
- unsafe {
- sys::Discord_Client_AcceptActivityInvite(
- self.as_raw_mut(),
- invite.raw_ptr(),
- Some(tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- // ---- Invite and join events ----
-
- /// Be notified when this user receives an activity invite.
- ///
- /// Invites are sent as Discord messages, and the SDK parses them out: the
- /// message-created callback does *not* fire for them. The delivered invite
- /// carries everything needed to identify it later for
- /// [`accept_activity_invite`](Self::accept_activity_invite).
- ///
- /// Join requests arrive here too, distinguished by
- /// [`ActivityActionType::JoinRequest`](crate::enums::ActivityActionType).
- ///
- /// The invite is passed by reference so reading a few fields needs no clone.
-/// It is owned by this crate for the duration of the handler and dropped
-/// afterwards, so clone it if you need it to outlive the call.
- pub fn on_activity_invite_created<F>(&mut self, callback: F)
- where
- F: FnMut(&ActivityInvite) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetActivityInviteCreatedCallback(
- self.as_raw_mut(),
- Some(invite_tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Be notified when an activity invite this user already holds changes.
- ///
- /// The only thing that currently changes is validity: an invite stops being
- /// joinable when the sender goes offline or leaves the party, and can become
- /// joinable again if they rejoin. See
- /// [`ActivityInvite::is_valid`](crate::activity::ActivityInvite::is_valid).
- ///
- /// The invite is passed by reference and dropped after the handler returns;
-/// clone it if you need to keep it. Same terms as
-/// [`on_activity_invite_created`](Self::on_activity_invite_created).
- pub fn on_activity_invite_updated<F>(&mut self, callback: F)
- where
- F: FnMut(&ActivityInvite) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetActivityInviteUpdatedCallback(
- self.as_raw_mut(),
- Some(invite_tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Be notified when this user accepts an activity invite inside the Discord client.
- ///
- /// Fires when the user is also running Discord on their computer and accepts
- /// there rather than in-game. The handler receives the join secret from the
- /// activity's rich presence, which the game uses to join them to its own party
- /// system.
- pub fn on_activity_join<F>(&mut self, callback: F)
- where
- F: FnMut(&str) + 'static,
- {
- unsafe extern "C" fn tramp<F>(join_secret: sys::Discord_String, userdata: *mut c_void)
- where
- F: FnMut(&str) + 'static,
- {
- // SAFETY: `userdata` is the boxed `F` installed below; `join_secret` is
- // transferred to us and must be freed, so it is taken.
- unsafe {
- callback::dispatch_mut::<F>(userdata, |f| {
- let secret = string::take(join_secret);
- f(&secret)
- })
- }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetActivityJoinCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// As [`on_activity_join`](Self::on_activity_join), but also reporting which
- /// application the join was for.
- ///
- /// The handler receives `(application_id, join_secret)`.
- pub fn on_activity_join_with_application<F>(&mut self, callback: F)
- where
- F: FnMut(u64, &str) + 'static,
- {
- unsafe extern "C" fn tramp<F>(
- application_id: u64,
- join_secret: sys::Discord_String,
- userdata: *mut c_void,
- ) where
- F: FnMut(u64, &str) + 'static,
- {
- // SAFETY: `userdata` is the boxed `F` installed below; `join_secret` is
- // transferred to us and must be freed, so it is taken.
- unsafe {
- callback::dispatch_mut::<F>(userdata, |f| {
- let secret = string::take(join_secret);
- f(application_id, &secret)
- })
- }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetActivityJoinWithApplicationCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- // ---- Launch registration and app integration ----
-
- /// Tell Discord how to launch this game, so invites accepted in the Discord
- /// client can start it.
- ///
- /// Returns whether the command was registered.
- ///
- /// **This registration lives outside the process.** It is written to the
- /// operating system's application registry, so it persists after the game
- /// exits and affects how Discord launches the game in future sessions. Call it
- /// when the SDK starts up.
- ///
- /// On Windows and Linux `command` is a path to an executable and may include
- /// launch parameters, for example `"C:\path\to my\game.exe" --full-screen`.
- /// Passing an empty string registers the currently running executable. To
- /// launch through a custom protocol such as `my-awesome-game://`, pass that as
- /// an argument of the executable that handles it.
- ///
- /// On macOS the game must be bundled — `command` must be a `.app`, or a custom
- /// protocol, but *not* a path to a bare executable. An empty string registers
- /// the currently running bundle, if any.
- pub fn register_launch_command(&mut self, application_id: u64, command: &str) -> bool {
- // SAFETY: the command string is copied by the SDK during the call.
- unsafe {
- sys::Discord_Client_RegisterLaunchCommand(
- self.as_raw_mut(),
- application_id,
- string::borrow(command),
- )
- }
- }
-
- /// Tell Discord this game is a Steam application, so invites accepted in the
- /// Discord client can launch it through Steam.
- ///
- /// Returns whether the registration succeeded. Like
- /// [`register_launch_command`](Self::register_launch_command) this writes an
- /// association outside the process and should be called at SDK startup.
- pub fn register_launch_steam_application(
- &mut self,
- application_id: u64,
- steam_app_id: u32,
- ) -> bool {
- // SAFETY: only requires an initialised handle and by-value arguments.
- unsafe {
- sys::Discord_Client_RegisterLaunchSteamApplication(
- self.as_raw_mut(),
- application_id,
- steam_app_id,
- )
- }
- }
-
- /// Point the Discord overlay at a different process's window.
- ///
- /// The SDK uses Discord's overlay to keep account linking in-game. If the
- /// game's main window belongs to a different process than the one running the
- /// integration, set that process's pid here. Defaults to the current pid.
- pub fn set_game_window_pid(&mut self, pid: i32) {
- // SAFETY: a plain by-value write to an initialised handle.
- unsafe { sys::Discord_Client_SetGameWindowPid(self.as_raw_mut(), pid) }
- }
-
- /// Open the Connected Games settings page in the Discord client.
- ///
- /// That is where users manage their settings for games using the Discord Social
- /// SDK. Does nothing if the client is not connected or the user is on a
- /// provisional account, and is always a no-op on console platforms.
- pub fn open_connected_games_settings_in_discord<F>(&mut self, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_OpenConnectedGamesSettingsInDiscord(
- self.as_raw_mut(),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Check whether the Discord mobile app is installed on this device.
- ///
- /// Always reports `false` on desktop platforms. Requires no connection and may
- /// be called at any time — useful for deciding whether to offer app-based
- /// authorization or fall back to a browser flow.
- ///
- /// Platform requirements:
- ///
- /// - iOS: the app's `Info.plist` must list `"discord"` in
- /// `LSApplicationQueriesSchemes`.
- /// - Android: the manifest must list `"com.discord"` in its `queries` element
- /// (required on Android 11 and later).
- ///
- /// Despite being a local check this is delivered asynchronously, through
- /// [`run_callbacks`](crate::run_callbacks).
- pub fn is_discord_app_installed<F>(&mut self, callback: F)
- where
- F: FnOnce(bool) + 'static,
- {
- unsafe extern "C" fn tramp<F>(installed: bool, userdata: *mut c_void)
- where
- F: FnOnce(bool) + 'static,
- {
- // SAFETY: `userdata` is the boxed `F` installed alongside this trampoline.
- unsafe { callback::dispatch_once::<F>(userdata, |f| f(installed)) }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_IsDiscordAppInstalled(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/relationships.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/relationships.rs
deleted file mode 100644
index 82ad1a4..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/relationships.rs
+++ /dev/null
@@ -1,690 +0,0 @@
-//! Friends, blocking, and the users behind them.
-//!
-//! # Discord friends versus game friends
-//!
-//! The SDK maintains two independent relationship graphs, and almost every
-//! operation here exists in both flavours:
-//!
-//! - **Discord friends** are real friendships on the user's Discord account.
-//! They persist across every game and are visible in the Discord client
-//! itself. Both users see each other's presence regardless of what they are
-//! playing.
-//! - **Game friends** are scoped to your application. They do not carry over to
-//! other games, and the two users only see each other's online state while
-//! playing a game in which they are friends.
-//!
-//! Sending the wrong kind is a visible mistake to the player, so pick
-//! deliberately: [`send_discord_friend_request`](Client::send_discord_friend_request)
-//! asks for a friendship on Discord proper, while
-//! [`send_game_friend_request`](Client::send_game_friend_request) creates one
-//! that only exists inside your game.
-//!
-//! A single [`Relationship`] carries both types at once — see the
-//! [relationship module](crate::relationship) for how they interact when a game
-//! friend is later upgraded to a Discord friend.
-//!
-//! # Lifecycle
-//!
-//! 1. One side sends a request. Their side of the relationship becomes
-//! [`PendingOutgoing`](crate::enums::RelationshipType::PendingOutgoing) and
-//! the other side's becomes
-//! [`PendingIncoming`](crate::enums::RelationshipType::PendingIncoming).
-//! 2. The recipient calls one of the `accept_*` or `reject_*` methods; the
-//! sender may instead `cancel_*` while it is still pending. Accepting moves
-//! both sides to [`Friend`](crate::enums::RelationshipType::Friend).
-//! 3. Friendships end through
-//! [`remove_game_friend`](Client::remove_game_friend) (game only) or
-//! [`remove_discord_and_game_friend`](Client::remove_discord_and_game_friend)
-//! (both graphs at once).
-//!
-//! Sending a request to someone who already has a pending *incoming* request
-//! from you simply completes the friendship, so a "send" button doubles as an
-//! "accept" button.
-//!
-//! Blocking sits outside both graphs: [`block_user`](Client::block_user) removes
-//! any existing relationship and applies everywhere, on Discord and in every
-//! game. [`unblock_user`](Client::unblock_user) does not restore what was
-//! removed.
-//!
-//! # Consent
-//!
-//! None of these mutations should ever happen without a deliberate user action.
-//! Never send, accept, or remove friendships on the player's behalf.
-//!
-//! # Staying up to date
-//!
-//! [`on_relationship_groups_updated`](Client::on_relationship_groups_updated) is
-//! the callback to drive a friends list from: rebuild it with
-//! [`relationships_by_group`](Client::relationships_by_group) whenever it fires.
-
-use super::Client;
-use crate::enums::{RelationshipGroupType, StatusType};
-use crate::error::{Result, to_result};
-use crate::relationship::Relationship;
-use crate::user::User;
-use crate::{callback, span, string};
-use discord_social_sdk_sys as sys;
-use std::ffi::c_void;
-use std::mem::MaybeUninit;
-
-/// Trampoline shared by every relationship mutation, all of which report only
-/// success or failure.
-///
-/// Covers `Discord_Client_UpdateRelationshipCallback`,
-/// `Discord_Client_SendFriendRequestCallback` and
-/// `Discord_Client_UpdateStatusCallback`, which are identical in shape.
-unsafe extern "C" fn result_tramp<F>(result: *mut sys::Discord_ClientResult, userdata: *mut c_void)
-where
- F: FnOnce(Result<()>) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F` installed alongside this trampoline.
- unsafe { callback::dispatch_once::<F>(userdata, |f| f(to_result(result))) }
-}
-
-/// Trampoline shared by every persistent event that reports only a user id.
-unsafe extern "C" fn user_id_tramp<F>(user_id: u64, userdata: *mut c_void)
-where
- F: FnMut(u64) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F` installed alongside this trampoline.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f(user_id)) }
-}
-
-/// Trampoline shared by the relationship created and deleted events.
-unsafe extern "C" fn relationship_event_tramp<F>(
- user_id: u64,
- is_discord_relationship: bool,
- userdata: *mut c_void,
-) where
- F: FnMut(u64, bool) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F` installed alongside this trampoline.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f(user_id, is_discord_relationship)) }
-}
-
-impl Client {
- // ---- Sending friend requests ----
-
- /// Send a **Discord** friend request to a user identified by username.
- ///
- /// `username` is the target's globally unique Discord username, *not* their
- /// display name.
- ///
- /// On success the current user's Discord relationship becomes
- /// [`PendingOutgoing`](crate::enums::RelationshipType::PendingOutgoing) and
- /// the target's becomes
- /// [`PendingIncoming`](crate::enums::RelationshipType::PendingIncoming). If
- /// the target had already sent the current user a Discord friend request,
- /// the two become Discord friends instead.
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn send_discord_friend_request<F>(&mut self, username: &str, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the username is copied by the SDK during the call; the boxed
- // closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_SendDiscordFriendRequest(
- self.as_raw_mut(),
- string::borrow(username),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Send a **Discord** friend request to a user identified by id.
- ///
- /// Behaves exactly like
- /// [`send_discord_friend_request`](Self::send_discord_friend_request), but
- /// takes the target's Discord user id rather than their username.
- pub fn send_discord_friend_request_by_id<F>(&mut self, user_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the boxed closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_SendDiscordFriendRequestById(
- self.as_raw_mut(),
- user_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Send — or accept — a **game** friend request, by username.
- ///
- /// The friendship this creates exists only inside your application; it does
- /// not appear on Discord and does not carry over to other games. Use
- /// [`send_discord_friend_request`](Self::send_discord_friend_request) for a
- /// real Discord friendship.
- ///
- /// `username` is the target's globally unique Discord username, not their
- /// display name. If the target had already sent the current user a game
- /// friend request, this accepts it and the two become game friends.
- pub fn send_game_friend_request<F>(&mut self, username: &str, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the username is copied by the SDK during the call; the boxed
- // closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_SendGameFriendRequest(
- self.as_raw_mut(),
- string::borrow(username),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Send — or accept — a **game** friend request, by user id.
- ///
- /// Behaves exactly like
- /// [`send_game_friend_request`](Self::send_game_friend_request), but takes
- /// the target's Discord user id rather than their username.
- pub fn send_game_friend_request_by_id<F>(&mut self, user_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the boxed closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_SendGameFriendRequestById(
- self.as_raw_mut(),
- user_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- // ---- Answering friend requests ----
-
- /// Accept an incoming **Discord** friend request.
- ///
- /// Fails unless the target's Discord relationship with the current user is
- /// [`PendingIncoming`](crate::enums::RelationshipType::PendingIncoming).
- pub fn accept_discord_friend_request<F>(&mut self, user_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the boxed closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_AcceptDiscordFriendRequest(
- self.as_raw_mut(),
- user_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Accept an incoming **game** friend request.
- ///
- /// Fails unless the game relationship with the target user is
- /// [`PendingIncoming`](crate::enums::RelationshipType::PendingIncoming).
- pub fn accept_game_friend_request<F>(&mut self, user_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the boxed closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_AcceptGameFriendRequest(
- self.as_raw_mut(),
- user_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Decline an incoming **Discord** friend request.
- ///
- /// Fails unless the Discord relationship with the target user is
- /// [`PendingIncoming`](crate::enums::RelationshipType::PendingIncoming).
- pub fn reject_discord_friend_request<F>(&mut self, user_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the boxed closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_RejectDiscordFriendRequest(
- self.as_raw_mut(),
- user_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Decline an incoming **game** friend request.
- ///
- /// Fails unless the game relationship with the target user is
- /// [`PendingIncoming`](crate::enums::RelationshipType::PendingIncoming).
- pub fn reject_game_friend_request<F>(&mut self, user_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the boxed closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_RejectGameFriendRequest(
- self.as_raw_mut(),
- user_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Withdraw an outgoing **Discord** friend request.
- ///
- /// Fails unless the Discord relationship with the target user is
- /// [`PendingOutgoing`](crate::enums::RelationshipType::PendingOutgoing).
- pub fn cancel_discord_friend_request<F>(&mut self, user_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the boxed closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_CancelDiscordFriendRequest(
- self.as_raw_mut(),
- user_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Withdraw an outgoing **game** friend request.
- ///
- /// Fails unless the game relationship with the target user is
- /// [`PendingOutgoing`](crate::enums::RelationshipType::PendingOutgoing).
- pub fn cancel_game_friend_request<F>(&mut self, user_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the boxed closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_CancelGameFriendRequest(
- self.as_raw_mut(),
- user_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- // ---- Ending relationships ----
-
- /// Remove **both** the Discord friendship and the game friendship with a user.
- ///
- /// This affects the user's real Discord friends list, not just your game.
- /// Use [`remove_game_friend`](Self::remove_game_friend) to end only the
- /// in-game friendship.
- ///
- /// Fails if the target is neither a Discord nor a game friend.
- pub fn remove_discord_and_game_friend<F>(&mut self, user_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the boxed closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_RemoveDiscordAndGameFriend(
- self.as_raw_mut(),
- user_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Remove only the **game** friendship with a user.
- ///
- /// Any Discord friendship between the two is left untouched.
- ///
- /// Fails if the target is not currently a game friend.
- pub fn remove_game_friend<F>(&mut self, user_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the boxed closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_RemoveGameFriend(
- self.as_raw_mut(),
- user_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Block a user.
- ///
- /// A blocked user can no longer send the current user friend requests,
- /// activity invites, or messages. Blocking also removes any existing
- /// relationship between the two, and applies everywhere — blocking someone
- /// in one game blocks them on Discord and in every other game as well.
- pub fn block_user<F>(&mut self, user_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the boxed closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_BlockUser(
- self.as_raw_mut(),
- user_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Unblock a user.
- ///
- /// Does not restore whatever relationship blocking removed; the two are
- /// simply strangers again.
- ///
- /// Fails if the target user is not currently blocked.
- pub fn unblock_user<F>(&mut self, user_id: u64, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the boxed closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_UnblockUser(
- self.as_raw_mut(),
- user_id,
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- // ---- Reading the relationship list ----
-
- /// Every relationship the current user has.
- ///
- /// Includes all Discord relationships plus all game relationships for the
- /// current game.
- ///
- /// This is a direct, synchronous read of the SDK's local state — it does not
- /// hit the network and does not wait for
- /// [`run_callbacks`](crate::run_callbacks).
- pub fn relationships(&self) -> Vec<Relationship> {
- // SAFETY: read-only span getter. The out-parameter transfers ownership of
- // both the array and every handle in it, so each element is adopted by a
- // `Relationship` and `span::out` frees the backing array. (Spans handed
- // *to* a callback are borrowed instead; this one is not.)
- unsafe {
- span::out(
- |out| sys::Discord_Client_GetRelationships(self.raw_ptr(), out),
- |raw| Relationship::from_raw(raw),
- )
- }
- }
-
- /// The relationships in one display group.
- ///
- /// Relationships are partitioned by online status and game activity:
- ///
- /// - [`OnlinePlayingGame`](RelationshipGroupType::OnlinePlayingGame) — online
- /// and currently playing this game.
- /// - [`OnlineElsewhere`](RelationshipGroupType::OnlineElsewhere) — online but
- /// not playing this game; users who have played it before sort to the top.
- /// - [`Offline`](RelationshipGroupType::Offline) — offline.
- ///
- /// Pair with
- /// [`on_relationship_groups_updated`](Self::on_relationship_groups_updated)
- /// to keep a friends list fresh.
- pub fn relationships_by_group(&self, group_type: RelationshipGroupType) -> Vec<Relationship> {
- // SAFETY: read-only span getter. Ownership of the array and of every
- // handle in it transfers to us, exactly as in `relationships`.
- unsafe {
- span::out(
- |out| {
- sys::Discord_Client_GetRelationshipsByGroup(
- self.raw_ptr(),
- group_type.into_raw(),
- out,
- )
- },
- |raw| Relationship::from_raw(raw),
- )
- }
- }
-
- /// The relationship between the current user and `user_id`.
- ///
- /// Always returns a handle. When there is no relationship — including after
- /// one was deleted — its type fields are
- /// [`RelationshipType::None`](crate::enums::RelationshipType::None).
- pub fn relationship(&self, user_id: u64) -> Relationship {
- let mut raw = MaybeUninit::<sys::Discord_RelationshipHandle>::uninit();
- // SAFETY: read-only getter that always initialises the out-parameter and
- // transfers ownership of the resulting handle to us.
- unsafe {
- sys::Discord_Client_GetRelationshipHandle(self.raw_ptr(), user_id, raw.as_mut_ptr());
- Relationship::from_raw(raw.assume_init())
- }
- }
-
- /// Fuzzy-search the current user's friends by username and display name.
- ///
- /// Matching uses Levenshtein distance, so near misses still hit. This
- /// searches existing friends only; it is not a directory lookup for
- /// arbitrary Discord users.
- pub fn search_friends_by_username(&self, search: &str) -> Vec<User> {
- // SAFETY: the search string is copied during the call. The returned span
- // is owned by us: every handle is adopted by a `User` and `span::out`
- // frees the backing array.
- unsafe {
- span::out(
- |out| {
- sys::Discord_Client_SearchFriendsByUsername(
- self.raw_ptr(),
- string::borrow(search),
- out,
- )
- },
- |raw| User::from_raw(raw),
- )
- }
- }
-
- // ---- Users ----
-
- /// The user with the given id, if the SDK already knows about them.
- ///
- /// Returns `None` rather than fetching from Discord's API. Users are
- /// generally available for every relationship and for the author of any
- /// message received.
- pub fn user(&self, user_id: u64) -> Option<User> {
- let mut raw = MaybeUninit::<sys::Discord_UserHandle>::uninit();
- // SAFETY: read-only getter. It only writes the out-parameter when it
- // returns true, so `assume_init` is confined to that branch; the handle
- // it writes is owned by us and dropped by `User`.
- unsafe {
- if sys::Discord_Client_GetUser(self.raw_ptr(), user_id, raw.as_mut_ptr()) {
- Some(User::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// The user currently logged in to the Discord desktop application.
- ///
- /// Only available when the Discord app is running on the player's computer
- /// *and* the SDK has established a connection to it; the callback receives
- /// `Ok(None)` when it has not.
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn discord_client_connected_user<F>(&mut self, application_id: u64, callback: F)
- where
- F: FnOnce(Result<Option<User>>) + 'static,
- {
- unsafe extern "C" fn tramp<F>(
- result: *mut sys::Discord_ClientResult,
- user: *mut sys::Discord_UserHandle,
- userdata: *mut c_void,
- ) where
- F: FnOnce(Result<Option<User>>) + 'static,
- {
- // SAFETY: `user` is null when no Discord app user is available.
- // Otherwise it points at a handle whose ownership transfers to this
- // callback — the official C++ wrapper adopts it the same way — so it
- // is read out by value and released by the `User` wrapper. The
- // pointer itself belongs to the SDK and is not freed here.
- unsafe {
- callback::dispatch_once::<F>(userdata, |f| {
- // Claimed before the result is inspected: the SDK transfers this
- // payload regardless of outcome, so taking it only on success
- // would leak it on every failed request.
- let user = if user.is_null() {
- None
- } else {
- Some(User::from_raw(*user))
- };
- let outcome = to_result(result).map(|()| user);
- f(outcome)
- })
- }
- }
- // SAFETY: the boxed closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_GetDiscordClientConnectedUser(
- self.as_raw_mut(),
- application_id,
- Some(tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Set whether the current user appears online, idle, invisible, or in "do
- /// not disturb" on Discord.
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn set_online_status<F>(&mut self, status: StatusType, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the boxed closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_SetOnlineStatus(
- self.as_raw_mut(),
- status.into_raw(),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- // ---- Events ----
-
- /// Be notified when a relationship is established or changes type.
- ///
- /// Fires when the user sends or accepts a friend request, or blocks someone.
- ///
- /// The closure receives the other user's id and whether the change was to
- /// the **Discord** relationship (`true`) or the **game** relationship
- /// (`false`). Read the new state with [`relationship`](Self::relationship).
- pub fn on_relationship_created<F>(&mut self, callback: F)
- where
- F: FnMut(u64, bool) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetRelationshipCreatedCallback(
- self.as_raw_mut(),
- Some(relationship_event_tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Be notified when a relationship is removed.
- ///
- /// Fires when a friend request is rejected or a friend is removed. Once it
- /// has fired, [`relationship`](Self::relationship) reports
- /// [`RelationshipType::None`](crate::enums::RelationshipType::None) for that
- /// user.
- ///
- /// The closure receives the other user's id and whether the removal was of
- /// the **Discord** relationship (`true`) or the **game** relationship
- /// (`false`).
- pub fn on_relationship_deleted<F>(&mut self, callback: F)
- where
- F: FnMut(u64, bool) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetRelationshipDeletedCallback(
- self.as_raw_mut(),
- Some(relationship_event_tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Be notified whenever any user in the friends list changes.
- ///
- /// This is the callback to drive a friends list from: rebuild it with
- /// [`relationships_by_group`](Self::relationships_by_group) each time it
- /// fires. The closure receives the id of the user that changed.
- pub fn on_relationship_groups_updated<F>(&mut self, callback: F)
- where
- F: FnMut(u64) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetRelationshipGroupsUpdatedCallback(
- self.as_raw_mut(),
- Some(user_id_tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Be notified whenever *any* user this session knows about changes.
- ///
- /// Not limited to the current user: it fires when a friend changes their
- /// name or avatar, comes online, goes offline, or starts playing this game.
- /// The closure receives the id of the user that changed; fetch the new state
- /// with [`user`](Self::user).
- pub fn on_user_updated<F>(&mut self, callback: F)
- where
- F: FnMut(u64) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetUserUpdatedCallback(
- self.as_raw_mut(),
- Some(user_id_tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/voice.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/voice.rs
deleted file mode 100644
index 843d217..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/client/voice.rs
+++ /dev/null
@@ -1,788 +0,0 @@
-//! Voice calls, audio devices, and the voice engine's processing settings.
-//!
-//! # The call model
-//!
-//! Voice in the Social SDK is per-channel. [`Client::start_call`] joins the voice
-//! session for a channel — for a lobby, that is simply the lobby id — and hands
-//! back a [`Call`] for as long as the session lasts. A call is not usable until
-//! its [`status`](Call::status) reaches
-//! [`CallStatus::Connected`](crate::enums::CallStatus::Connected), so install
-//! [`Call::on_status_changed`] before doing anything else with it.
-//!
-//! There can be several calls at once, one per channel.
-//! [`Client::calls`] enumerates them, [`Client::call`] looks one up, and
-//! [`Client::end_call`] / [`Client::end_calls`] tear them down. **Ending a call
-//! invalidates every [`Call`] handle referring to it**; drop them.
-//!
-//! # Per-call versus global
-//!
-//! Mute and deafen exist at both levels. [`Call::set_self_mute`] affects one
-//! call; [`Client::set_self_mute_all`] affects every call and *overrides* the
-//! per-call setting. Muting stops other participants from hearing you; deafening
-//! additionally stops you from hearing them.
-//!
-//! # Devices
-//!
-//! Discord starts on the system default input and output devices. Enumerate the
-//! alternatives with [`Client::input_devices`] / [`Client::output_devices`] and
-//! switch with [`Client::set_input_device`] / [`Client::set_output_device`],
-//! passing an [`AudioDevice::id`]. [`Client::on_device_change`] fires when the
-//! set of available devices changes.
-//!
-//! # Voice processing
-//!
-//! Echo cancellation, noise suppression, Krisp noise cancellation, and automatic
-//! gain control are all on sensible defaults. The setters here exist mainly for
-//! applications that surface a voice-settings UI of their own; they are not part
-//! of a normal integration.
-//!
-//! # Raw audio
-//!
-//! [`Client::start_call_with_audio_callbacks`] additionally exposes the PCM
-//! stream — incoming audio per user, and locally captured audio before it is
-//! transmitted. See that method for the buffer contract.
-
-use super::Client;
-use crate::audio::AudioDevice;
-use crate::call::Call;
-use crate::error::{Result, to_result};
-use crate::{callback, span, string};
-use discord_social_sdk_sys as sys;
-use std::ffi::c_void;
-use std::mem::MaybeUninit;
-
-/// The shape of one buffer of PCM audio delivered to an audio callback.
-///
-/// Samples are interleaved 16-bit signed PCM, so the buffer handed to the
-/// callback holds `samples_per_channel * channels` values in total.
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
-pub struct AudioFrame {
- /// Number of samples per channel in this buffer.
- pub samples_per_channel: u64,
- /// Sample rate in Hz.
- pub sample_rate: i32,
- /// Number of interleaved channels.
- pub channels: u64,
-}
-
-impl AudioFrame {
- /// Total number of `i16` samples across all channels.
- fn sample_count(&self) -> usize {
- (self.samples_per_channel as usize).saturating_mul(self.channels as usize)
- }
-}
-
-/// Adopt an `AudioDeviceSpan` delivered by value to a callback.
-///
-/// Despite the callback signature suggesting a borrow, the SDK transfers
-/// ownership of both the array and its elements — the official C++ wrapper
-/// adopts every element and then calls `Discord_Free` on the array. This does
-/// the same.
-///
-/// # Safety
-///
-/// `raw` must be a span the SDK just handed to a callback, adopted exactly once.
-unsafe fn take_device_span(raw: sys::Discord_AudioDeviceSpan) -> Vec<AudioDevice> {
- // SAFETY: writing the by-value span into the out-parameter satisfies
- // `span::out`'s contract that `f` fully initialises it; ownership of the
- // array and every element transfers to us, as the C++ wrapper assumes.
- unsafe {
- span::out(
- |out: *mut sys::Discord_AudioDeviceSpan| out.write(raw),
- |elem| AudioDevice::from_raw(elem),
- )
- }
-}
-
-/// Trampoline shared by the device-selection callbacks, which report only
-/// success or failure.
-unsafe extern "C" fn result_tramp<F>(result: *mut sys::Discord_ClientResult, userdata: *mut c_void)
-where
- F: FnOnce(Result<()>) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F` installed alongside this trampoline.
- unsafe { callback::dispatch_once::<F>(userdata, |f| f(to_result(result))) }
-}
-
-/// Trampoline shared by the two "fetch the current device" callbacks.
-unsafe extern "C" fn current_device_tramp<F>(device: *const sys::Discord_AudioDevice, userdata: *mut c_void)
-where
- F: FnOnce(Option<AudioDevice>) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F`. The SDK transfers ownership of the
- // device handle to us — the C++ wrapper likewise adopts `*device` — so it is
- // read out by value rather than borrowed. A null pointer is reported as
- // `None` instead of being dereferenced.
- unsafe {
- callback::dispatch_once::<F>(userdata, |f| {
- let owned = if device.is_null() {
- None
- } else {
- Some(AudioDevice::from_raw(std::ptr::read(device)))
- };
- f(owned)
- })
- }
-}
-
-/// Trampoline shared by the two "list devices" callbacks.
-unsafe extern "C" fn device_list_tramp<F>(devices: sys::Discord_AudioDeviceSpan, userdata: *mut c_void)
-where
- F: FnOnce(Vec<AudioDevice>) + 'static,
-{
- // SAFETY: `userdata` is the boxed `F`; the span is adopted exactly once here.
- unsafe { callback::dispatch_once::<F>(userdata, |f| f(take_device_span(devices))) }
-}
-
-impl Client {
- // ---- Starting and ending calls ----
-
- /// Start or join the call in `channel_id`.
- ///
- /// For a lobby, pass the lobby id. Returns [`None`] if the user is already in
- /// that voice channel.
- ///
- /// The returned [`Call`] is not usable until its status reaches
- /// [`CallStatus::Connected`](crate::enums::CallStatus::Connected); bind
- /// [`Call::on_status_changed`] first.
- ///
- /// # Platform notes
- ///
- /// On iOS the application is responsible for enabling the appropriate
- /// background audio mode in its `Info.plist`. On macOS, set
- /// `NSMicrophoneUsageDescription` in `Info.plist`.
- pub fn start_call(&mut self, channel_id: u64) -> Option<Call> {
- let mut raw = MaybeUninit::<sys::Discord_Call>::uninit();
- // SAFETY: the out-parameter is only initialised — and only then owned by
- // us — when the call reports success.
- unsafe {
- if sys::Discord_Client_StartCall(self.as_raw_mut(), channel_id, raw.as_mut_ptr()) {
- Some(Call::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// Start or join the call in `lobby_id`, tapping the raw PCM audio stream.
- ///
- /// Like [`start_call`](Self::start_call), but additionally installs two
- /// persistent audio callbacks. Returns [`None`] if the user is already in
- /// that voice channel.
- ///
- /// `received` is invoked for each buffer of incoming audio, per speaking
- /// user. `captured` is invoked for each buffer of locally captured audio
- /// *before* it is processed and transmitted, which is useful for voice
- /// moderation.
- ///
- /// # The audio buffers
- ///
- /// Both callbacks receive `&mut [i16]` — interleaved 16-bit signed PCM,
- /// `AudioFrame::samples_per_channel * AudioFrame::channels` samples long. The
- /// samples may be modified **in place** to achieve simple DSP effects.
- ///
- /// The slice borrows memory owned by the SDK's voice engine and is valid
- /// **only for the duration of the callback**. It must not be stored; copy out
- /// of it if the data is needed later.
- ///
- /// # Muting handled audio
- ///
- /// Setting `should_mute` to `true` inside `received` causes that buffer to be
- /// muted after the callback returns. Use it when the application plays the
- /// incoming audio through its own audio engine and does not want Discord to
- /// play it as well.
- ///
- /// # Threading
- ///
- /// Unlike every other callback in this crate, these are driven by the voice
- /// engine rather than by [`run_callbacks`](crate::run_callbacks). They are on
- /// the real-time audio path: keep them short, and do not block, allocate
- /// heavily, or call back into the SDK from them.
- ///
- /// # Platform notes
- ///
- /// Same `Info.plist` requirements as [`start_call`](Self::start_call).
- pub fn start_call_with_audio_callbacks<R, C>(
- &mut self,
- lobby_id: u64,
- received: R,
- captured: C,
- ) -> Option<Call>
- where
- R: FnMut(u64, &mut [i16], AudioFrame, &mut bool) + 'static,
- C: FnMut(&mut [i16], AudioFrame) + 'static,
- {
- unsafe extern "C" fn received_tramp<R>(
- user_id: u64,
- data: *mut i16,
- samples_per_channel: u64,
- sample_rate: i32,
- channels: u64,
- out_should_mute: *mut bool,
- userdata: *mut c_void,
- ) where
- R: FnMut(u64, &mut [i16], AudioFrame, &mut bool) + 'static,
- {
- let frame = AudioFrame {
- samples_per_channel,
- sample_rate,
- channels,
- };
- // SAFETY: `userdata` is the boxed `R`. `data` points to `frame.len()`
- // interleaved samples the voice engine owns for the duration of this
- // call, and the SDK expects in-place edits, so a `&mut` slice is the
- // faithful model. A null or empty buffer degrades to an empty slice
- // rather than an invalid one. `out_should_mute` is written back only
- // when the SDK provided somewhere to write it.
- unsafe {
- callback::dispatch_mut::<R>(userdata, |f| {
- let len = frame.sample_count();
- let samples: &mut [i16] = if data.is_null() || len == 0 {
- &mut []
- } else {
- std::slice::from_raw_parts_mut(data, len)
- };
- let mut should_mute = if out_should_mute.is_null() {
- false
- } else {
- *out_should_mute
- };
- f(user_id, samples, frame, &mut should_mute);
- if !out_should_mute.is_null() {
- *out_should_mute = should_mute;
- }
- })
- }
- }
-
- unsafe extern "C" fn captured_tramp<C>(
- data: *mut i16,
- samples_per_channel: u64,
- sample_rate: i32,
- channels: u64,
- userdata: *mut c_void,
- ) where
- C: FnMut(&mut [i16], AudioFrame) + 'static,
- {
- let frame = AudioFrame {
- samples_per_channel,
- sample_rate,
- channels,
- };
- // SAFETY: as for `received_tramp` — the buffer is valid for
- // `frame.len()` samples for the duration of this call and is intended
- // to be edited in place.
- unsafe {
- callback::dispatch_mut::<C>(userdata, |f| {
- let len = frame.sample_count();
- let samples: &mut [i16] = if data.is_null() || len == 0 {
- &mut []
- } else {
- std::slice::from_raw_parts_mut(data, len)
- };
- f(samples, frame);
- })
- }
- }
-
- let mut raw = MaybeUninit::<sys::Discord_Call>::uninit();
- // SAFETY: the SDK owns both boxed closures and frees each via its own
- // `free_fn`. The out-parameter is only initialised — and only then owned
- // by us — when the call reports success.
- unsafe {
- let started = sys::Discord_Client_StartCallWithAudioCallbacks(
- self.as_raw_mut(),
- lobby_id,
- Some(received_tramp::<R>),
- callback::free_fn::<R>(),
- callback::persistent_userdata(received),
- Some(captured_tramp::<C>),
- callback::free_fn::<C>(),
- callback::persistent_userdata(captured),
- raw.as_mut_ptr(),
- );
- if started {
- Some(Call::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// End the call in `channel_id`, if there is one.
- ///
- /// Every [`Call`] handle for that channel is invalid once this completes and
- /// should be dropped.
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn end_call<F>(&mut self, channel_id: u64, callback: F)
- where
- F: FnOnce() + 'static,
- {
- unsafe extern "C" fn tramp<F: FnOnce() + 'static>(userdata: *mut c_void) {
- // SAFETY: `userdata` is the boxed `F` installed below.
- unsafe { callback::dispatch_once::<F>(userdata, |f| f()) }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_EndCall(
- self.as_raw_mut(),
- channel_id,
- Some(tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// End every active call.
- ///
- /// Every [`Call`] handle is invalid once this completes and should be dropped.
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn end_calls<F>(&mut self, callback: F)
- where
- F: FnOnce() + 'static,
- {
- unsafe extern "C" fn tramp<F: FnOnce() + 'static>(userdata: *mut c_void) {
- // SAFETY: `userdata` is the boxed `F` installed below.
- unsafe { callback::dispatch_once::<F>(userdata, |f| f()) }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_EndCalls(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// The currently active call in `channel_id`, if any.
- pub fn call(&self, channel_id: u64) -> Option<Call> {
- let mut raw = MaybeUninit::<sys::Discord_Call>::uninit();
- // SAFETY: the out-parameter is only initialised — and only then owned by
- // us — when the getter returns `true`.
- unsafe {
- if sys::Discord_Client_GetCall(self.raw_ptr(), channel_id, raw.as_mut_ptr()) {
- Some(Call::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// Every currently active call.
- pub fn calls(&self) -> Vec<Call> {
- // SAFETY: the getter fills the span and transfers both the array and its
- // elements to us.
- unsafe {
- span::out(
- |out| sys::Discord_Client_GetCalls(self.raw_ptr(), out),
- |raw| Call::from_raw(raw),
- )
- }
- }
-
- /// Be notified when a user in a lobby joins or leaves a voice call.
- ///
- /// The closure receives `(lobby_id, member_id, added)`, where `added` is
- /// `true` for a join.
- ///
- /// This exists so an application can show who is in voice in a lobby even
- /// when the current user has not joined and so has no [`Call`] to bind to.
- pub fn on_voice_participant_changed<F>(&mut self, callback: F)
- where
- F: FnMut(u64, u64, bool) + 'static,
- {
- unsafe extern "C" fn tramp<F: FnMut(u64, u64, bool) + 'static>(
- lobby_id: u64,
- member_id: u64,
- added: bool,
- userdata: *mut c_void,
- ) {
- // SAFETY: `userdata` is the boxed `F` installed below.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f(lobby_id, member_id, added)) }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetVoiceParticipantChangedCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- // ---- Audio devices ----
-
- /// Asynchronously fetch the audio input device currently in use.
- ///
- /// [`None`] means the SDK reported no device.
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn current_input_device<F>(&mut self, callback: F)
- where
- F: FnOnce(Option<AudioDevice>) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_GetCurrentInputDevice(
- self.as_raw_mut(),
- Some(current_device_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Asynchronously fetch the audio output device currently in use.
- ///
- /// [`None`] means the SDK reported no device.
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn current_output_device<F>(&mut self, callback: F)
- where
- F: FnOnce(Option<AudioDevice>) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_GetCurrentOutputDevice(
- self.as_raw_mut(),
- Some(current_device_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Asynchronously fetch the audio input devices available to the user.
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn input_devices<F>(&mut self, callback: F)
- where
- F: FnOnce(Vec<AudioDevice>) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_GetInputDevices(
- self.as_raw_mut(),
- Some(device_list_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Asynchronously fetch the audio output devices available to the user.
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn output_devices<F>(&mut self, callback: F)
- where
- F: FnOnce(Vec<AudioDevice>) + 'static,
- {
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_GetOutputDevices(
- self.as_raw_mut(),
- Some(device_list_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Asynchronously switch the audio input device.
- ///
- /// `device_id` comes from [`AudioDevice::id`] on a device returned by
- /// [`input_devices`](Self::input_devices).
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn set_input_device<F>(&mut self, device_id: &str, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the device id is copied by the SDK during the call; the boxed
- // closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_SetInputDevice(
- self.as_raw_mut(),
- string::borrow(device_id),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Asynchronously switch the audio output device.
- ///
- /// `device_id` comes from [`AudioDevice::id`] on a device returned by
- /// [`output_devices`](Self::output_devices).
- ///
- /// Completes through [`run_callbacks`](crate::run_callbacks).
- pub fn set_output_device<F>(&mut self, device_id: &str, callback: F)
- where
- F: FnOnce(Result<()>) + 'static,
- {
- // SAFETY: the device id is copied by the SDK during the call; the boxed
- // closure is owned by the SDK and freed via `free_fn`.
- unsafe {
- sys::Discord_Client_SetOutputDevice(
- self.as_raw_mut(),
- string::borrow(device_id),
- Some(result_tramp::<F>),
- callback::free_fn::<Option<F>>(),
- callback::once_userdata(callback),
- )
- }
- }
-
- /// Be notified when Discord detects a change in the available audio devices.
- ///
- /// The closure receives the full input and output device lists as owned
- /// values, so it may keep them past the callback.
- pub fn on_device_change<F>(&mut self, callback: F)
- where
- F: FnMut(Vec<AudioDevice>, Vec<AudioDevice>) + 'static,
- {
- unsafe extern "C" fn tramp<F>(
- input_devices: sys::Discord_AudioDeviceSpan,
- output_devices: sys::Discord_AudioDeviceSpan,
- userdata: *mut c_void,
- ) where
- F: FnMut(Vec<AudioDevice>, Vec<AudioDevice>) + 'static,
- {
- // SAFETY: `userdata` is the boxed `F`. Both spans are handed over to
- // the callback and adopted exactly once here.
- //
- // The spans are adopted *inside* the dispatch closure so the work sits
- // under `callback::guard`'s `catch_unwind`. Adopting them beforehand
- // would let a panic — an allocation failure while building either
- // `Vec`, say — unwind out of this `extern "C"` function and abort the
- // host process.
- unsafe {
- callback::dispatch_mut::<F>(userdata, move |f| {
- let inputs = take_device_span(input_devices);
- let outputs = take_device_span(output_devices);
- f(inputs, outputs)
- })
- }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetDeviceChangeCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-
- /// Show the system audio route picker.
- ///
- /// iOS only; returns whether the picker was shown.
- pub fn show_audio_route_picker(&mut self) -> bool {
- // SAFETY: only requires an initialised handle.
- unsafe { sys::Discord_Client_ShowAudioRoutePicker(self.as_raw_mut()) }
- }
-
- // ---- Volume ----
-
- /// The current user's microphone volume.
- ///
- /// A percentage in the range `[0, 100]` representing perceptual loudness.
- pub fn input_volume(&self) -> f32 {
- // SAFETY: a read-only getter on an initialised handle.
- unsafe { sys::Discord_Client_GetInputVolume(self.raw_ptr()) }
- }
-
- /// Set the current user's microphone volume.
- ///
- /// A percentage in the range `[0, 100]` representing perceptual loudness.
- pub fn set_input_volume(&mut self, input_volume: f32) {
- // SAFETY: a plain setter on an initialised handle.
- unsafe { sys::Discord_Client_SetInputVolume(self.as_raw_mut(), input_volume) }
- }
-
- /// The current user's speaker volume.
- ///
- /// A percentage in the range `[0, 200]` representing perceptual loudness.
- pub fn output_volume(&self) -> f32 {
- // SAFETY: a read-only getter on an initialised handle.
- unsafe { sys::Discord_Client_GetOutputVolume(self.raw_ptr()) }
- }
-
- /// Set the current user's speaker volume.
- ///
- /// A percentage in the range `[0, 200]` representing perceptual loudness.
- pub fn set_output_volume(&mut self, output_volume: f32) {
- // SAFETY: a plain setter on an initialised handle.
- unsafe { sys::Discord_Client_SetOutputVolume(self.as_raw_mut(), output_volume) }
- }
-
- // ---- Mute and deafen, across every call ----
-
- /// Whether the current user is deafened in all calls.
- pub fn self_deaf_all(&self) -> bool {
- // SAFETY: a read-only getter on an initialised handle.
- unsafe { sys::Discord_Client_GetSelfDeafAll(self.raw_ptr()) }
- }
-
- /// Deafen or undeafen the current user in every call.
- ///
- /// A deafened user hears no other participant, and no other participant
- /// hears them.
- ///
- /// This overrides the per-call
- /// [`Call::set_self_deaf`](crate::call::Call::set_self_deaf) setting.
- pub fn set_self_deaf_all(&mut self, deaf: bool) {
- // SAFETY: a plain setter on an initialised handle.
- unsafe { sys::Discord_Client_SetSelfDeafAll(self.as_raw_mut(), deaf) }
- }
-
- /// Whether the current user's microphone is muted in all calls.
- pub fn self_mute_all(&self) -> bool {
- // SAFETY: a read-only getter on an initialised handle.
- unsafe { sys::Discord_Client_GetSelfMuteAll(self.raw_ptr()) }
- }
-
- /// Mute or unmute the current user's microphone in every call.
- ///
- /// No other participant in any active call can hear a muted user.
- ///
- /// This overrides the per-call
- /// [`Call::set_self_mute`](crate::call::Call::set_self_mute) setting.
- pub fn set_self_mute_all(&mut self, mute: bool) {
- // SAFETY: a plain setter on an initialised handle.
- unsafe { sys::Discord_Client_SetSelfMuteAll(self.as_raw_mut(), mute) }
- }
-
- // ---- Voice processing ----
- //
- // These all default to sensible values. They exist for applications that
- // expose a voice-settings UI of their own, mirroring Discord's.
-
- /// Enable or disable the basic echo cancellation provided by WebRTC.
- ///
- /// Defaults to on. Generally not needed unless building a voice settings UI.
- pub fn set_echo_cancellation(&mut self, on: bool) {
- // SAFETY: a plain setter on an initialised handle.
- unsafe { sys::Discord_Client_SetEchoCancellation(self.as_raw_mut(), on) }
- }
-
- /// Enable or disable basic background noise suppression.
- ///
- /// Defaults to on. Generally not needed unless building a voice settings UI.
- pub fn set_noise_suppression(&mut self, on: bool) {
- // SAFETY: a plain setter on an initialised handle.
- unsafe { sys::Discord_Client_SetNoiseSuppression(self.as_raw_mut(), on) }
- }
-
- /// Enable or disable Krisp noise cancellation.
- ///
- /// Defaults to off. Enabling it automatically disables
- /// [`set_noise_suppression`](Self::set_noise_suppression).
- pub fn set_noise_cancellation(&mut self, on: bool) {
- // SAFETY: a plain setter on an initialised handle.
- unsafe { sys::Discord_Client_SetNoiseCancellation(self.as_raw_mut(), on) }
- }
-
- /// Enable or disable automatic microphone gain adjustment.
- ///
- /// When on, the microphone volume is adjusted automatically to stay clear and
- /// consistent. Defaults to on. Generally not needed unless building a voice
- /// settings UI.
- pub fn set_automatic_gain_control(&mut self, on: bool) {
- // SAFETY: a plain setter on an initialised handle.
- unsafe { sys::Discord_Client_SetAutomaticGainControl(self.as_raw_mut(), on) }
- }
-
- /// Enable or disable hardware encoding and decoding for audio, where available.
- ///
- /// Defaults to on for both. This must be called immediately after
- /// constructing the [`Client`]; if called too late the SDK logs an error and
- /// the setting does not take effect.
- pub fn set_opus_hardware_coding(&mut self, encode: bool, decode: bool) {
- // SAFETY: a plain setter on an initialised handle.
- unsafe { sys::Discord_Client_SetOpusHardwareCoding(self.as_raw_mut(), encode, decode) }
- }
-
- /// Enable or disable AEC diagnostic recording.
- ///
- /// Used to diagnose acoustic echo cancellation problems: the input and output
- /// waveform data is written to the log directory.
- pub fn set_aec_dump(&mut self, on: bool) {
- // SAFETY: a plain setter on an initialised handle.
- unsafe { sys::Discord_Client_SetAecDump(self.as_raw_mut(), on) }
- }
-
- /// On mobile, choose whether the game engine or the SDK owns the audio session.
- ///
- /// This covers `AudioManager` state on Android and `AVAudioSession`
- /// activation on iOS. It must be called **before connecting to any call** if
- /// the application manages audio itself; otherwise the voice engine ends
- /// audio management when the last call ends.
- ///
- /// The Unity plugin calls this automatically when the native Unity audio
- /// engine is enabled in the project settings.
- pub fn set_engine_managed_audio_session(&mut self, is_engine_managed: bool) {
- // SAFETY: a plain setter on an initialised handle.
- unsafe { sys::Discord_Client_SetEngineManagedAudioSession(self.as_raw_mut(), is_engine_managed) }
- }
-
- /// On mobile devices, enable speakerphone mode.
- ///
- /// Returns whether the mode was applied.
- #[deprecated(note = "Discord deprecated Client::SetSpeakerMode; it has no replacement.")]
- pub fn set_speaker_mode(&mut self, speaker_mode: bool) -> bool {
- // SAFETY: a plain setter on an initialised handle.
- unsafe { sys::Discord_Client_SetSpeakerMode(self.as_raw_mut(), speaker_mode) }
- }
-
- // ---- No-audio-input detection ----
-
- /// Set the threshold below which the microphone counts as receiving no audio.
- ///
- /// Specified in dBFS (decibels relative to full scale), range
- /// `[-100.0, 100.0]`. Defaults to `-100.0`, which disables the feature.
- ///
- /// Useful for catching a misconfigured microphone: with push to talk, the
- /// user may press their talk key while no audio is actually arriving. Pair
- /// this with [`on_no_audio_input`](Self::on_no_audio_input) to notice and
- /// tell them.
- pub fn set_no_audio_input_threshold(&mut self, dbfs_threshold: f32) {
- // SAFETY: a plain setter on an initialised handle.
- unsafe { sys::Discord_Client_SetNoAudioInputThreshold(self.as_raw_mut(), dbfs_threshold) }
- }
-
- /// Be notified when microphone input starts or stops being detected.
- ///
- /// Only fires once a threshold has been set with
- /// [`set_no_audio_input_threshold`](Self::set_no_audio_input_threshold). The
- /// closure receives `true` when input is being detected.
- pub fn on_no_audio_input<F>(&mut self, callback: F)
- where
- F: FnMut(bool) + 'static,
- {
- unsafe extern "C" fn tramp<F: FnMut(bool) + 'static>(
- input_detected: bool,
- userdata: *mut c_void,
- ) {
- // SAFETY: `userdata` is the boxed `F` installed below.
- unsafe { callback::dispatch_mut::<F>(userdata, |f| f(input_detected)) }
- }
- // SAFETY: the SDK owns the boxed closure and frees it via `free_fn`.
- unsafe {
- sys::Discord_Client_SetNoAudioInputCallback(
- self.as_raw_mut(),
- Some(tramp::<F>),
- callback::free_fn::<F>(),
- callback::persistent_userdata(callback),
- )
- }
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/enums.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/enums.rs
deleted file mode 100644
index 1dffa27..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/enums.rs
+++ /dev/null
@@ -1,595 +0,0 @@
-//! Rust enums mirroring the SDK's C enums.
-//!
-//! bindgen renders C enums as newtype constants, which are neither exhaustive
-//! nor matchable. These wrappers restore real `match` support.
-//!
-//! Every C enum carries a `_forceint = 0x7FFFFFFF` member that exists only to
-//! pin the underlying integer width — it is never a real value, so it is not
-//! reproduced here. Unrecognised values map to an `Unknown` variant instead of
-//! panicking, since the SDK may add values in a newer runtime than this crate
-//! was built against.
-
-use discord_social_sdk_sys as sys;
-
-/// Define a Rust enum mirroring a C enum, with conversions in both directions.
-///
-/// Generates the enum, `from_raw`/`into_raw`, and `From` impls. Values the
-/// binding does not know become `Unknown(raw)`, keeping forward compatibility
-/// with newer SDK runtimes.
-macro_rules! c_enum {
- (
- $(#[$meta:meta])*
- $name:ident : $raw:path {
- $(
- $(#[$vmeta:meta])*
- $variant:ident = $konst:path
- ),* $(,)?
- }
- ) => {
- $(#[$meta])*
- #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
- #[non_exhaustive]
- pub enum $name {
- $(
- $(#[$vmeta])*
- $variant,
- )*
- /// A value this binding does not recognise.
- Unknown(i32),
- }
-
- impl $name {
- /// Convert from the raw C value.
- pub fn from_raw(raw: $raw) -> Self {
- match raw {
- $($konst => Self::$variant,)*
- other => Self::Unknown(other.0 as i32),
- }
- }
-
- /// Convert back to the raw C value.
- pub fn into_raw(self) -> $raw {
- match self {
- $(Self::$variant => $konst,)*
- Self::Unknown(v) => $raw(v as _),
- }
- }
- }
-
- impl From<$raw> for $name {
- fn from(raw: $raw) -> Self {
- Self::from_raw(raw)
- }
- }
-
- impl From<$name> for $raw {
- fn from(value: $name) -> Self {
- value.into_raw()
- }
- }
- };
-}
-
-
-c_enum! {
- /// How a user is being invited to an activity.
- ActivityActionType: sys::Discord_ActivityActionTypes {
- /// An invitation to join the sender's party.
- Invalid = sys::Discord_ActivityActionTypes::Discord_ActivityActionTypes_Invalid,
- /// An invitation to join the sender's party.
- Join = sys::Discord_ActivityActionTypes::Discord_ActivityActionTypes_Join,
- /// A request to join the recipient's party.
- JoinRequest = sys::Discord_ActivityActionTypes::Discord_ActivityActionTypes_JoinRequest,
- }
-}
-
-c_enum! {
- /// Whether a party is joinable by anyone or only by invitation.
- ActivityPartyPrivacy: sys::Discord_ActivityPartyPrivacy {
- /// Only invited users may join.
- Private = sys::Discord_ActivityPartyPrivacy::Discord_ActivityPartyPrivacy_Private,
- /// Anyone may join.
- Public = sys::Discord_ActivityPartyPrivacy::Discord_ActivityPartyPrivacy_Public,
- }
-}
-
-c_enum! {
- /// The kind of activity a user is engaged in.
- ///
- /// Discord rich presence supports several activity types; for the SDK the
- /// only really relevant one is [`Playing`](ActivityType::Playing). The rest
- /// are provided for completeness.
- ///
- /// See the [rich presence overview] for more information.
- ///
- /// [rich presence overview]: https://discord.com/developers/docs/rich-presence/overview
- ActivityType: sys::Discord_ActivityTypes {
- /// The user is playing a game.
- Playing = sys::Discord_ActivityTypes::Discord_ActivityTypes_Playing,
- /// The user is streaming.
- Streaming = sys::Discord_ActivityTypes::Discord_ActivityTypes_Streaming,
- /// The user is listening to something.
- Listening = sys::Discord_ActivityTypes::Discord_ActivityTypes_Listening,
- /// The user is watching something.
- Watching = sys::Discord_ActivityTypes::Discord_ActivityTypes_Watching,
- /// The activity is the user's custom status.
- CustomStatus = sys::Discord_ActivityTypes::Discord_ActivityTypes_CustomStatus,
- /// The user is competing.
- Competing = sys::Discord_ActivityTypes::Discord_ActivityTypes_Competing,
- /// The activity is a hang status.
- HangStatus = sys::Discord_ActivityTypes::Discord_ActivityTypes_HangStatus,
- }
-}
-
-c_enum! {
- /// Which rich presence field is shown in the user's status.
- ///
- /// See the [rich presence overview] for more information.
- ///
- /// [rich presence overview]: https://discord.com/developers/docs/rich-presence/overview
- StatusDisplayType: sys::Discord_StatusDisplayTypes {
- /// Display the activity's name.
- Name = sys::Discord_StatusDisplayTypes::Discord_StatusDisplayTypes_Name,
- /// Display the activity's state.
- State = sys::Discord_StatusDisplayTypes::Discord_StatusDisplayTypes_State,
- /// Display the activity's details.
- Details = sys::Discord_StatusDisplayTypes::Discord_StatusDisplayTypes_Details,
- }
-}
-
-c_enum! {
- /// A platform an activity invite can be accepted on.
- ///
- /// These are **bit flags**: the underlying values are powers of two and the
- /// SDK combines them into a single integer. A raw value carrying more than
- /// one platform will not match any variant here and becomes `Unknown`. Use
- /// [`ActivityGamePlatforms`] to work with combinations.
- ActivityGamePlatform: sys::Discord_ActivityGamePlatforms {
- /// Desktop.
- Desktop = sys::Discord_ActivityGamePlatforms::Discord_ActivityGamePlatforms_Desktop,
- /// Xbox.
- Xbox = sys::Discord_ActivityGamePlatforms::Discord_ActivityGamePlatforms_Xbox,
- /// Samsung.
- Samsung = sys::Discord_ActivityGamePlatforms::Discord_ActivityGamePlatforms_Samsung,
- /// iOS.
- Ios = sys::Discord_ActivityGamePlatforms::Discord_ActivityGamePlatforms_IOS,
- /// Android.
- Android = sys::Discord_ActivityGamePlatforms::Discord_ActivityGamePlatforms_Android,
- /// Embedded (an activity running inside Discord itself).
- Embedded = sys::Discord_ActivityGamePlatforms::Discord_ActivityGamePlatforms_Embedded,
- /// PlayStation 4.
- Ps4 = sys::Discord_ActivityGamePlatforms::Discord_ActivityGamePlatforms_PS4,
- /// PlayStation 5.
- Ps5 = sys::Discord_ActivityGamePlatforms::Discord_ActivityGamePlatforms_PS5,
- }
-}
-
-/// A set of [`ActivityGamePlatform`] flags.
-///
-/// The SDK passes activity invite platforms as a bitwise-or of the individual
-/// [`ActivityGamePlatform`] values. This is a thin, allocation-free wrapper over
-/// that integer.
-///
-/// ```
-/// use discord_social_sdk::enums::{ActivityGamePlatform, ActivityGamePlatforms};
-///
-/// let mut set = ActivityGamePlatforms::empty();
-/// set.insert(ActivityGamePlatform::Desktop);
-/// set.insert(ActivityGamePlatform::Ps5);
-/// assert!(set.contains(ActivityGamePlatform::Desktop));
-/// assert!(!set.contains(ActivityGamePlatform::Xbox));
-/// ```
-#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
-pub struct ActivityGamePlatforms(u32);
-
-impl ActivityGamePlatforms {
- /// An empty set.
- pub const fn empty() -> Self {
- Self(0)
- }
-
- /// Wrap a raw bitmask as received from the SDK.
- ///
- /// Bits this binding does not recognise are preserved, so a value round
- /// trips unchanged through [`bits`](Self::bits).
- pub const fn from_bits(bits: u32) -> Self {
- Self(bits)
- }
-
- /// The raw bitmask, suitable for passing back to the SDK.
- pub const fn bits(self) -> u32 {
- self.0
- }
-
- /// Whether `platform` is present in the set.
- pub fn contains(self, platform: ActivityGamePlatform) -> bool {
- // Cast to u32 (self.0's type): the sys bitmask is u32 on macOS/Linux
- // but c_int (i32) on Windows.
- let bit = platform.into_raw().0 as u32;
- bit != 0 && self.0 & bit == bit
- }
-
- /// Add `platform` to the set.
- pub fn insert(&mut self, platform: ActivityGamePlatform) {
- self.0 |= platform.into_raw().0 as u32;
- }
-}
-
-c_enum! {
- /// The crypto method used to generate an OAuth2 code challenge.
- ///
- /// The SDK only ever uses SHA-256.
- CodeChallengeMethod: sys::Discord_AuthenticationCodeChallengeMethod {
- /// SHA-256.
- S256 = sys::Discord_AuthenticationCodeChallengeMethod::Discord_AuthenticationCodeChallengeMethod_S256,
- }
-}
-
-c_enum! {
- /// How the application is installed.
- IntegrationType: sys::Discord_IntegrationType {
- /// Installed to a guild.
- GuildInstall = sys::Discord_IntegrationType::Discord_IntegrationType_GuildInstall,
- /// Installed to a user account.
- UserInstall = sys::Discord_IntegrationType::Discord_IntegrationType_UserInstall,
- }
-}
-
-c_enum! {
- /// The kind of a Discord channel.
- ///
- /// See the [channel resource documentation] for more information.
- ///
- /// [channel resource documentation]: https://discord.com/developers/docs/resources/channel
- ChannelType: sys::Discord_ChannelType {
- /// A text channel in a guild.
- GuildText = sys::Discord_ChannelType::Discord_ChannelType_GuildText,
- /// A direct message between two users.
- Dm = sys::Discord_ChannelType::Discord_ChannelType_Dm,
- /// A voice channel in a guild.
- GuildVoice = sys::Discord_ChannelType::Discord_ChannelType_GuildVoice,
- /// A group direct message.
- GroupDm = sys::Discord_ChannelType::Discord_ChannelType_GroupDm,
- /// A category grouping other guild channels.
- GuildCategory = sys::Discord_ChannelType::Discord_ChannelType_GuildCategory,
- /// A guild announcement channel.
- GuildNews = sys::Discord_ChannelType::Discord_ChannelType_GuildNews,
- /// A guild store channel.
- GuildStore = sys::Discord_ChannelType::Discord_ChannelType_GuildStore,
- /// A thread under an announcement channel.
- GuildNewsThread = sys::Discord_ChannelType::Discord_ChannelType_GuildNewsThread,
- /// A public thread.
- GuildPublicThread = sys::Discord_ChannelType::Discord_ChannelType_GuildPublicThread,
- /// A private thread.
- GuildPrivateThread = sys::Discord_ChannelType::Discord_ChannelType_GuildPrivateThread,
- /// A guild stage voice channel.
- GuildStageVoice = sys::Discord_ChannelType::Discord_ChannelType_GuildStageVoice,
- /// A guild directory channel.
- GuildDirectory = sys::Discord_ChannelType::Discord_ChannelType_GuildDirectory,
- /// A guild forum channel.
- GuildForum = sys::Discord_ChannelType::Discord_ChannelType_GuildForum,
- /// A guild media channel.
- GuildMedia = sys::Discord_ChannelType::Discord_ChannelType_GuildMedia,
- /// An SDK lobby channel.
- Lobby = sys::Discord_ChannelType::Discord_ChannelType_Lobby,
- /// An ephemeral direct message.
- EphemeralDm = sys::Discord_ChannelType::Discord_ChannelType_EphemeralDm,
- }
-}
-
-c_enum! {
- /// The kind of additional content attached to a message.
- AdditionalContentType: sys::Discord_AdditionalContentType {
- /// Something other than the listed types.
- Other = sys::Discord_AdditionalContentType::Discord_AdditionalContentType_Other,
- /// A file attachment.
- Attachment = sys::Discord_AdditionalContentType::Discord_AdditionalContentType_Attachment,
- /// A poll.
- Poll = sys::Discord_AdditionalContentType::Discord_AdditionalContentType_Poll,
- /// A voice message.
- VoiceMessage = sys::Discord_AdditionalContentType::Discord_AdditionalContentType_VoiceMessage,
- /// A thread.
- Thread = sys::Discord_AdditionalContentType::Discord_AdditionalContentType_Thread,
- /// An embed.
- Embed = sys::Discord_AdditionalContentType::Discord_AdditionalContentType_Embed,
- /// A sticker.
- Sticker = sys::Discord_AdditionalContentType::Discord_AdditionalContentType_Sticker,
- }
-}
-
-c_enum! {
- /// The Discord Voice audio system to use.
- AudioSystem: sys::Discord_AudioSystem {
- /// The standard audio system.
- Standard = sys::Discord_AudioSystem::Discord_AudioSystem_Standard,
- /// The game audio system.
- Game = sys::Discord_AudioSystem::Discord_AudioSystem_Game,
- }
-}
-
-c_enum! {
- /// A network error affecting a call.
- CallError: sys::Discord_Call_Error {
- /// No error.
- None = sys::Discord_Call_Error::Discord_Call_Error_None,
- /// The signaling connection could not be established.
- SignalingConnectionFailed = sys::Discord_Call_Error::Discord_Call_Error_SignalingConnectionFailed,
- /// The signaling connection closed unexpectedly.
- SignalingUnexpectedClose = sys::Discord_Call_Error::Discord_Call_Error_SignalingUnexpectedClose,
- /// The voice connection could not be established.
- VoiceConnectionFailed = sys::Discord_Call_Error::Discord_Call_Error_VoiceConnectionFailed,
- /// Joining the call timed out.
- JoinTimeout = sys::Discord_Call_Error::Discord_Call_Error_JoinTimeout,
- /// The user is not permitted to join the call.
- Forbidden = sys::Discord_Call_Error::Discord_Call_Error_Forbidden,
- }
-}
-
-c_enum! {
- /// Whether a voice call uses push to talk or automatic voice detection.
- ///
- /// The variant names keep the C enum's `MODE_` prefix, which is part of the
- /// member name rather than the enum prefix.
- AudioModeType: sys::Discord_AudioModeType {
- /// The audio mode has not been initialised yet.
- ModeUninit = sys::Discord_AudioModeType::Discord_AudioModeType_MODE_UNINIT,
- /// Voice activity detection: audio is transmitted when the user speaks.
- ModeVad = sys::Discord_AudioModeType::Discord_AudioModeType_MODE_VAD,
- /// Push to talk: audio is transmitted only while the key is held.
- ModePtt = sys::Discord_AudioModeType::Discord_AudioModeType_MODE_PTT,
- }
-}
-
-c_enum! {
- /// The state of a call's network connection.
- CallStatus: sys::Discord_Call_Status {
- /// Not connected.
- Disconnected = sys::Discord_Call_Status::Discord_Call_Status_Disconnected,
- /// Joining the call.
- Joining = sys::Discord_Call_Status::Discord_Call_Status_Joining,
- /// Establishing the connection.
- Connecting = sys::Discord_Call_Status::Discord_Call_Status_Connecting,
- /// The signaling connection is established.
- SignalingConnected = sys::Discord_Call_Status::Discord_Call_Status_SignalingConnected,
- /// Fully connected; voice is flowing.
- Connected = sys::Discord_Call_Status::Discord_Call_Status_Connected,
- /// The connection dropped and is being re-established.
- Reconnecting = sys::Discord_Call_Status::Discord_Call_Status_Reconnecting,
- /// Leaving the call.
- Disconnecting = sys::Discord_Call_Status::Discord_Call_Status_Disconnecting,
- }
-}
-
-c_enum! {
- /// The relationship between two users.
- RelationshipType: sys::Discord_RelationshipType {
- /// No relationship with the other user.
- None = sys::Discord_RelationshipType::Discord_RelationshipType_None,
- /// The users are friends.
- Friend = sys::Discord_RelationshipType::Discord_RelationshipType_Friend,
- /// The current user has blocked the target user; actions such as sending
- /// messages between these users will not work.
- Blocked = sys::Discord_RelationshipType::Discord_RelationshipType_Blocked,
- /// A friend request from the target user is awaiting acceptance.
- PendingIncoming = sys::Discord_RelationshipType::Discord_RelationshipType_PendingIncoming,
- /// A friend request to the target user is awaiting acceptance.
- PendingOutgoing = sys::Discord_RelationshipType::Discord_RelationshipType_PendingOutgoing,
- /// Documented for visibility; should be unused in the SDK.
- Implicit = sys::Discord_RelationshipType::Discord_RelationshipType_Implicit,
- /// Documented for visibility; should be unused in the SDK.
- Suggestion = sys::Discord_RelationshipType::Discord_RelationshipType_Suggestion,
- }
-}
-
-c_enum! {
- /// The identity provider backing an external account link.
- ///
- /// The C enum's own `Unknown` member is spelled `UnknownProvider` here so it
- /// does not collide with the catch-all `Unknown(raw)` variant the macro adds
- /// for unrecognised values.
- ExternalIdentityProviderType: sys::Discord_ExternalIdentityProviderType {
- /// A generic OpenID Connect provider.
- Oidc = sys::Discord_ExternalIdentityProviderType::Discord_ExternalIdentityProviderType_OIDC,
- /// Epic Online Services.
- EpicOnlineServices = sys::Discord_ExternalIdentityProviderType::Discord_ExternalIdentityProviderType_EpicOnlineServices,
- /// Steam.
- Steam = sys::Discord_ExternalIdentityProviderType::Discord_ExternalIdentityProviderType_Steam,
- /// Unity.
- Unity = sys::Discord_ExternalIdentityProviderType::Discord_ExternalIdentityProviderType_Unity,
- /// A Discord bot.
- DiscordBot = sys::Discord_ExternalIdentityProviderType::Discord_ExternalIdentityProviderType_DiscordBot,
- /// No provider.
- None = sys::Discord_ExternalIdentityProviderType::Discord_ExternalIdentityProviderType_None,
- /// The provider reported by the SDK as unknown.
- UnknownProvider = sys::Discord_ExternalIdentityProviderType::Discord_ExternalIdentityProviderType_Unknown,
- }
-}
-
-c_enum! {
- /// The image format to request when building a user's avatar URL.
- AvatarType: sys::Discord_UserHandle_AvatarType {
- /// GIF.
- Gif = sys::Discord_UserHandle_AvatarType::Discord_UserHandle_AvatarType_Gif,
- /// WebP.
- Webp = sys::Discord_UserHandle_AvatarType::Discord_UserHandle_AvatarType_Webp,
- /// PNG.
- Png = sys::Discord_UserHandle_AvatarType::Discord_UserHandle_AvatarType_Png,
- /// JPEG.
- Jpeg = sys::Discord_UserHandle_AvatarType::Discord_UserHandle_AvatarType_Jpeg,
- }
-}
-
-c_enum! {
- /// A user's online status.
- ///
- /// Beyond plain online and offline, Discord lets users customise their
- /// status — for example "do not disturb" to silence notifications.
- ///
- /// The C enum's own `Unknown` member is spelled `UnknownStatus` here so it
- /// does not collide with the catch-all `Unknown(raw)` variant the macro adds
- /// for unrecognised values.
- StatusType: sys::Discord_StatusType {
- /// Online and recently active.
- Online = sys::Discord_StatusType::Discord_StatusType_Online,
- /// Offline and not connected to Discord.
- Offline = sys::Discord_StatusType::Discord_StatusType_Offline,
- /// Blocked.
- Blocked = sys::Discord_StatusType::Discord_StatusType_Blocked,
- /// Online but inactive for a while, possibly away from the computer.
- Idle = sys::Discord_StatusType::Discord_StatusType_Idle,
- /// Online but suppressing notifications.
- Dnd = sys::Discord_StatusType::Discord_StatusType_Dnd,
- /// Online but appearing offline to other users.
- Invisible = sys::Discord_StatusType::Discord_StatusType_Invisible,
- /// Online and actively streaming content.
- Streaming = sys::Discord_StatusType::Discord_StatusType_Streaming,
- /// The status reported by the SDK as unknown.
- UnknownStatus = sys::Discord_StatusType::Discord_StatusType_Unknown,
- }
-}
-
-c_enum! {
- /// An informational disclosure Discord may make to a user.
- ///
- /// The game can identify these and customise how they are rendered.
- DisclosureType: sys::Discord_DisclosureTypes {
- /// Shown the first time a user sends a message in game, so the user knows
- /// that message will also be viewable on Discord.
- MessageDataVisibleOnDiscord = sys::Discord_DisclosureTypes::Discord_DisclosureTypes_MessageDataVisibleOnDiscord,
- }
-}
-
-c_enum! {
- /// An error on the socket connection the SDK maintains with Discord.
- ///
- /// Generic network failures report [`ConnectionFailed`](ClientError::ConnectionFailed)
- /// or [`ConnectionCanceled`](ClientError::ConnectionCanceled). Other errors —
- /// an invalid or expired auth token, for instance — report
- /// [`UnexpectedClose`](ClientError::UnexpectedClose), with the specifics in
- /// the accompanying error details.
- ClientError: sys::Discord_Client_Error {
- /// No error.
- None = sys::Discord_Client_Error::Discord_Client_Error_None,
- /// The connection could not be established.
- ConnectionFailed = sys::Discord_Client_Error::Discord_Client_Error_ConnectionFailed,
- /// The connection closed unexpectedly.
- UnexpectedClose = sys::Discord_Client_Error::Discord_Client_Error_UnexpectedClose,
- /// The connection attempt was canceled.
- ConnectionCanceled = sys::Discord_Client_Error::Discord_Client_Error_ConnectionCanceled,
- }
-}
-
-c_enum! {
- /// The status of the SDK's internal websocket connection to Discord.
- ///
- /// Launching the client has roughly two phases:
- ///
- /// 1. The socket connects to Discord and exchanges an auth token —
- /// [`Connecting`](ClientStatus::Connecting) and
- /// [`Connected`](ClientStatus::Connected).
- /// 2. The socket receives an initial payload describing the current user,
- /// their lobbies, their friends and so on — [`Ready`](ClientStatus::Ready).
- ///
- /// Many client functions do not work until the status reaches `Ready`, so
- /// that is the one to wait for.
- ///
- /// The socket may also drop, for example on a temporary network blip; it
- /// reconnects automatically, reporting
- /// [`Reconnecting`](ClientStatus::Reconnecting) meanwhile.
- ClientStatus: sys::Discord_Client_Status {
- /// Not connected.
- Disconnected = sys::Discord_Client_Status::Discord_Client_Status_Disconnected,
- /// Establishing the socket connection.
- Connecting = sys::Discord_Client_Status::Discord_Client_Status_Connecting,
- /// The socket is connected and the auth token has been exchanged.
- Connected = sys::Discord_Client_Status::Discord_Client_Status_Connected,
- /// The initial payload has arrived; the client is fully usable.
- Ready = sys::Discord_Client_Status::Discord_Client_Status_Ready,
- /// The connection dropped and is being re-established.
- Reconnecting = sys::Discord_Client_Status::Discord_Client_Status_Reconnecting,
- /// Tearing the connection down.
- Disconnecting = sys::Discord_Client_Status::Discord_Client_Status_Disconnecting,
- /// Waiting on an HTTP request before continuing.
- HttpWait = sys::Discord_Client_Status::Discord_Client_Status_HttpWait,
- }
-}
-
-c_enum! {
- /// An SDK thread whose priority can be controlled.
- ClientThread: sys::Discord_Client_Thread {
- /// The main client thread.
- Client = sys::Discord_Client_Thread::Discord_Client_Thread_Client,
- /// The voice thread.
- Voice = sys::Discord_Client_Thread::Discord_Client_Thread_Voice,
- /// The network thread.
- Network = sys::Discord_Client_Thread::Discord_Client_Thread_Network,
- }
-}
-
-c_enum! {
- /// The kind of auth token supplied to the SDK.
- ///
- /// Either the normal token produced by the Discord desktop app or an OAuth2
- /// bearer token. Only the latter can be used by the SDK.
- AuthorizationTokenType: sys::Discord_AuthorizationTokenType {
- /// A Discord desktop app user token.
- User = sys::Discord_AuthorizationTokenType::Discord_AuthorizationTokenType_User,
- /// An OAuth2 bearer token.
- Bearer = sys::Discord_AuthorizationTokenType::Discord_AuthorizationTokenType_Bearer,
- }
-}
-
-c_enum! {
- /// An identity provider usable to authenticate a provisional account for a
- /// public client.
- ExternalAuthType: sys::Discord_AuthenticationExternalAuthType {
- /// A generic OpenID Connect token.
- Oidc = sys::Discord_AuthenticationExternalAuthType::Discord_AuthenticationExternalAuthType_OIDC,
- /// An Epic Online Services access token.
- EpicOnlineServicesAccessToken =
- sys::Discord_AuthenticationExternalAuthType::Discord_AuthenticationExternalAuthType_EpicOnlineServicesAccessToken,
- /// An Epic Online Services ID token.
- EpicOnlineServicesIdToken =
- sys::Discord_AuthenticationExternalAuthType::Discord_AuthenticationExternalAuthType_EpicOnlineServicesIdToken,
- /// A Steam session ticket.
- SteamSessionTicket = sys::Discord_AuthenticationExternalAuthType::Discord_AuthenticationExternalAuthType_SteamSessionTicket,
- /// A Unity Services ID token.
- UnityServicesIdToken = sys::Discord_AuthenticationExternalAuthType::Discord_AuthenticationExternalAuthType_UnityServicesIdToken,
- /// An access token issued by a Discord bot.
- DiscordBotIssuedAccessToken =
- sys::Discord_AuthenticationExternalAuthType::Discord_AuthenticationExternalAuthType_DiscordBotIssuedAccessToken,
- /// An Apple ID token.
- AppleIdToken = sys::Discord_AuthenticationExternalAuthType::Discord_AuthenticationExternalAuthType_AppleIdToken,
- /// A PlayStation Network ID token.
- PlayStationNetworkIdToken =
- sys::Discord_AuthenticationExternalAuthType::Discord_AuthenticationExternalAuthType_PlayStationNetworkIdToken,
- }
-}
-
-c_enum! {
- /// A log level supported by the SDK.
- LoggingSeverity: sys::Discord_LoggingSeverity {
- /// Verbose diagnostic output.
- Verbose = sys::Discord_LoggingSeverity::Discord_LoggingSeverity_Verbose,
- /// Informational messages.
- Info = sys::Discord_LoggingSeverity::Discord_LoggingSeverity_Info,
- /// Warnings.
- Warning = sys::Discord_LoggingSeverity::Discord_LoggingSeverity_Warning,
- /// Errors.
- Error = sys::Discord_LoggingSeverity::Discord_LoggingSeverity_Error,
- /// Logging disabled.
- None = sys::Discord_LoggingSeverity::Discord_LoggingSeverity_None,
- }
-}
-
-c_enum! {
- /// A logical grouping of relationships by online status and game activity.
- RelationshipGroupType: sys::Discord_RelationshipGroupType {
- /// Users who are online and currently playing the game.
- OnlinePlayingGame = sys::Discord_RelationshipGroupType::Discord_RelationshipGroupType_OnlinePlayingGame,
- /// Users who are online but not playing the game.
- OnlineElsewhere = sys::Discord_RelationshipGroupType::Discord_RelationshipGroupType_OnlineElsewhere,
- /// Users who are offline.
- Offline = sys::Discord_RelationshipGroupType::Discord_RelationshipGroupType_Offline,
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/error.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/error.rs
deleted file mode 100644
index 184a9a8..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/error.rs
+++ /dev/null
@@ -1,169 +0,0 @@
-//! Error types, and the conversion from `Discord_ClientResult` into [`Result`].
-//!
-//! Nearly every async SDK operation reports back through a `ClientResult`. The
-//! wrapper converts that into a normal Rust [`Result`] at the callback boundary,
-//! so callers match on `Ok`/`Err` instead of inspecting a success flag.
-
-use crate::string;
-use discord_social_sdk_sys as sys;
-use std::fmt;
-
-/// The category of a failure reported by the SDK.
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
-#[non_exhaustive]
-pub enum ErrorKind {
- /// The transport failed before a response was received.
- Network,
- /// The server responded with a non-success HTTP status.
- Http,
- /// A call was made before the client reached `Status::Ready`.
- ClientNotReady,
- /// The requested feature is disabled for this application.
- Disabled,
- /// The client was destroyed while the request was in flight.
- ClientDestroyed,
- /// Arguments failed validation before being sent.
- Validation,
- /// The request was cancelled.
- Aborted,
- /// Authorization was rejected or the token was rejected.
- AuthorizationFailed,
- /// The Discord client returned an RPC-level error.
- Rpc,
- /// An error type this binding does not yet name.
- Other(u32),
-}
-
-impl ErrorKind {
- fn from_raw(raw: sys::Discord_ErrorType) -> Self {
- use sys::Discord_ErrorType as T;
- match raw {
- T::Discord_ErrorType_NetworkError => Self::Network,
- T::Discord_ErrorType_HTTPError => Self::Http,
- T::Discord_ErrorType_ClientNotReady => Self::ClientNotReady,
- T::Discord_ErrorType_Disabled => Self::Disabled,
- T::Discord_ErrorType_ClientDestroyed => Self::ClientDestroyed,
- T::Discord_ErrorType_ValidationError => Self::Validation,
- T::Discord_ErrorType_Aborted => Self::Aborted,
- T::Discord_ErrorType_AuthorizationFailed => Self::AuthorizationFailed,
- T::Discord_ErrorType_RPCError => Self::Rpc,
- // sys error code is u32 on macOS/Linux, i32 on Windows — normalise.
- other => Self::Other(other.0 as u32),
- }
- }
-}
-
-/// A failed SDK operation.
-///
-/// Carries everything the SDK reported so callers can distinguish a retryable
-/// rate limit from a permanent validation failure.
-// No `Eq`: `retry_after` is a float, and the SDK reports it as one.
-#[derive(Debug, Clone, PartialEq)]
-pub struct Error {
- kind: ErrorKind,
- message: String,
- code: i32,
- http_status: u32,
- response_body: String,
- retryable: bool,
- /// Seconds to wait before retrying, in milliseconds of precision as reported.
- retry_after: Option<f32>,
-}
-
-impl Error {
- /// The category of this failure.
- pub fn kind(&self) -> ErrorKind {
- self.kind
- }
-
- /// The SDK's human-readable description.
- pub fn message(&self) -> &str {
- &self.message
- }
-
- /// The SDK's numeric error code, or `0` when unset.
- pub fn code(&self) -> i32 {
- self.code
- }
-
- /// The HTTP status, or `0` when the failure was not an HTTP error.
- pub fn http_status(&self) -> u32 {
- self.http_status
- }
-
- /// The raw response body, when the failure came from an HTTP request.
- pub fn response_body(&self) -> &str {
- &self.response_body
- }
-
- /// Whether retrying this exact request may succeed.
- pub fn is_retryable(&self) -> bool {
- self.retryable
- }
-
- /// How long to wait before retrying, when the SDK specified a delay.
- pub fn retry_after(&self) -> Option<std::time::Duration> {
- self.retry_after
- .filter(|s| *s > 0.0)
- .map(std::time::Duration::from_secs_f32)
- }
-}
-
-impl fmt::Display for Error {
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- write!(f, "{:?}", self.kind)?;
- if !self.message.is_empty() {
- write!(f, ": {}", self.message)?;
- }
- if self.http_status != 0 {
- write!(f, " (HTTP {})", self.http_status)?;
- }
- if self.code != 0 {
- write!(f, " (code {})", self.code)?;
- }
- Ok(())
- }
-}
-
-impl std::error::Error for Error {}
-
-/// The result type used throughout this crate.
-pub type Result<T, E = Error> = std::result::Result<T, E>;
-
-/// Convert a `Discord_ClientResult` delivered to a callback into a [`Result`],
-/// taking ownership of it.
-///
-/// The SDK hands the callback an **owned** result and expects the callee to
-/// release it — the official C++ wrapper adopts it as `DiscordObjectState::Owned`
-/// and drops it when the callback returns. Not dropping it leaks on every
-/// completed request, so this function always drops before returning.
-///
-/// # Safety
-///
-/// `raw` must be a `ClientResult` the SDK just transferred to us, and must not
-/// be used again afterwards. Calling this twice on the same pointer double-frees.
-pub(crate) unsafe fn to_result(raw: *mut sys::Discord_ClientResult) -> Result<()> {
- if raw.is_null() {
- // A null result has no failure to report and nothing to release; treat it
- // as success rather than inventing an error the SDK never signalled.
- return Ok(());
- }
- unsafe {
- let outcome = if sys::Discord_ClientResult_Successful(raw) {
- Ok(())
- } else {
- Err(Error {
- kind: ErrorKind::from_raw(sys::Discord_ClientResult_Type(raw)),
- message: string::out(|out| sys::Discord_ClientResult_Error(raw, out)),
- code: sys::Discord_ClientResult_ErrorCode(raw),
- http_status: sys::Discord_ClientResult_Status(raw).0 as u32,
- response_body: string::out(|out| sys::Discord_ClientResult_ResponseBody(raw, out)),
- retryable: sys::Discord_ClientResult_Retryable(raw),
- retry_after: Some(sys::Discord_ClientResult_RetryAfter(raw)),
- })
- };
- // Release the result now that everything has been copied out of it.
- sys::Discord_ClientResult_Drop(raw);
- outcome
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/handle.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/handle.rs
deleted file mode 100644
index 4bf90d3..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/handle.rs
+++ /dev/null
@@ -1,130 +0,0 @@
-//! RAII machinery shared by every SDK handle type.
-//!
-//! Every handle in `cdiscord.h` is `struct { void* opaque; }` paired with
-//! `_Init`, `_Drop` and usually `_Clone`. That regularity means one macro can
-//! generate the ownership half of all ~40 wrapper types, leaving each module to
-//! write only its accessors.
-//!
-//! # Everything is owned
-//!
-//! It would be reasonable to expect callbacks to *lend* handles, and for the
-//! wrapper to need a borrowed view type. They do not. Checking the official C++
-//! wrapper shows it adopts every handle, string, span and `ClientResult` a
-//! callback receives as `DiscordObjectState::Owned` and lets the destructor run.
-//! So every handle that reaches Rust is owned and must be dropped exactly once,
-//! and no borrowed-handle type is needed.
-
-/// Generate the ownership half of a handle wrapper.
-///
-/// Produces the newtype, `Drop`, `from_raw`/`as_raw`/`as_raw_mut`/`raw_ptr`,
-/// and — when a `clone:` function is supplied — `Clone`. Accessors are written
-/// by hand in each type's own module.
-///
-/// The `init:` arm is omitted for handles the SDK only ever hands back (such as
-/// `MessageHandle`), which have no meaningful default state.
-macro_rules! handle {
- (
- $(#[$meta:meta])*
- $name:ident($raw:path) {
- $(init: $init:path,)?
- drop: $drop:path,
- $(clone: $clone:path,)?
- }
- ) => {
- $(#[$meta])*
- pub struct $name {
- pub(crate) raw: $raw,
- }
-
- impl $name {
- /// Take ownership of a raw handle.
- ///
- /// # Safety
- ///
- /// `raw` must be an initialised handle that nothing else will drop.
- #[allow(dead_code)]
- pub(crate) unsafe fn from_raw(raw: $raw) -> Self {
- Self { raw }
- }
-
- /// Borrow the underlying raw handle.
- #[allow(dead_code)]
- pub(crate) fn as_raw(&self) -> *const $raw {
- &self.raw
- }
-
- /// Mutably borrow the underlying raw handle.
- #[allow(dead_code)]
- pub(crate) fn as_raw_mut(&mut self) -> *mut $raw {
- &mut self.raw
- }
-
- /// A mutable raw pointer obtained from a shared reference.
- ///
- /// Almost every SDK *getter* takes `self` as non-const even though it
- /// only reads, which would otherwise force `&mut self` on the whole
- /// read API. The official C++ wrapper faces the same problem and
- /// solves it by declaring its instance field `mutable`, handing out a
- /// `Discord_X*` from a `const` method.
- ///
- /// Note that C++ constness is not a reliable guide to which SDK calls
- /// mutate: `GetInputVolume` and `IsAuthenticated` are non-const while
- /// the structurally identical `GetSelfDeafAll` and `GetChannelHandle`
- /// are const. What makes this sound is narrower and does not depend on
- /// the SDK's annotations: the memory borrowed through `&self` is only
- /// the one-word `{ void* opaque }` struct, and no call reached through
- /// this pointer reassigns that field. The functions that would —
- /// `_Init`, `_Drop`, `_Clone`-into-self — are never called this way.
- ///
- /// Use this only for functions that genuinely read. Anything that
- /// mutates must go through [`as_raw_mut`](Self::as_raw_mut) and a
- /// real `&mut self`.
- #[allow(dead_code)]
- pub(crate) fn raw_ptr(&self) -> *mut $raw {
- &self.raw as *const $raw as *mut $raw
- }
-
- $(
- /// Create a new, empty handle.
- pub fn new() -> Self {
- let mut raw = ::std::mem::MaybeUninit::<$raw>::uninit();
- unsafe {
- $init(raw.as_mut_ptr());
- Self { raw: raw.assume_init() }
- }
- }
- )?
- }
-
- $(
- impl Default for $name {
- fn default() -> Self {
- // Referenced so the macro arm binds; `new` is what it generates.
- let _ = $init;
- Self::new()
- }
- }
- )?
-
- impl Drop for $name {
- fn drop(&mut self) {
- unsafe { $drop(&mut self.raw) }
- }
- }
-
- $(
- impl Clone for $name {
- fn clone(&self) -> Self {
- let mut raw = ::std::mem::MaybeUninit::<$raw>::uninit();
- unsafe {
- // Argument order is (destination, source).
- $clone(raw.as_mut_ptr(), &self.raw);
- Self { raw: raw.assume_init() }
- }
- }
- }
- )?
- };
-}
-
-pub(crate) use handle;
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/lib.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/lib.rs
deleted file mode 100644
index d5dd2eb..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/lib.rs
+++ /dev/null
@@ -1,119 +0,0 @@
-//! Safe Rust bindings to the [Discord Social SDK].
-//!
-//! This crate wraps the SDK's C API with ownership-correct Rust types: handles
-//! become RAII structs, `Discord_String` becomes [`String`], optional getters
-//! become [`Option`], and `ClientResult` becomes [`Result`].
-//!
-//! [Discord Social SDK]: https://discord.com/developers/docs/discord-social-sdk/overview
-//!
-//! # Driving the SDK
-//!
-//! The SDK is single-threaded and callback-driven. Nothing is delivered until
-//! [`run_callbacks`] is called, which must happen regularly from the same thread
-//! that created the [`Client`] — typically once per frame:
-//!
-//! ```no_run
-//! use discord_social_sdk::{Client, run_callbacks};
-//!
-//! let mut client = Client::new();
-//! client.set_application_id(1234567890);
-//! client.on_status_changed(|status, _err, _detail| {
-//! println!("status: {status:?}");
-//! });
-//! client.connect();
-//!
-//! loop {
-//! run_callbacks();
-//! std::thread::sleep(std::time::Duration::from_millis(16));
-//! }
-//! ```
-//!
-//! # Threading
-//!
-//! Handle types are deliberately neither [`Send`] nor [`Sync`]. The SDK expects
-//! to be driven from one thread, and callbacks are delivered on whichever thread
-//! calls [`run_callbacks`].
-//!
-//! # Coverage
-//!
-//! 502 of the C API's 513 exported functions are wrapped here. The 11 that are
-//! not are omitted on purpose:
-//!
-//! - `Discord_Alloc` — the SDK's allocator. Nothing in a Rust program should be
-//! allocating SDK memory; the wrapper only ever *frees* what the SDK returns.
-//! - `Discord_ClientResult_Set*`, `_Clone`, `_ToString` — a `ClientResult` is an
-//! inbound error report, converted to [`Error`] the moment it arrives.
-//! Constructing or mutating one has no meaning for a caller.
-//!
-//! Everything else is reachable through this crate. If you need one of the above,
-//! it is still available raw in [`sys`].
-
-#![warn(missing_docs)]
-
-pub use discord_social_sdk_sys as sys;
-
-mod callback;
-mod handle;
-mod span;
-mod string;
-
-pub mod activity;
-pub mod audio;
-pub mod auth;
-pub mod call;
-pub mod channel;
-pub mod client;
-pub mod enums;
-pub mod error;
-pub mod lobby;
-pub mod message;
-pub mod relationship;
-pub mod user;
-
-pub use activity::{
- Activity, ActivityAssets, ActivityButton, ActivityInvite, ActivityParty, ActivitySecrets,
- ActivityTimestamps,
-};
-pub use audio::{AudioDevice, VadThresholdSettings};
-pub use auth::{
- AuthorizationArgs, AuthorizationCodeChallenge, AuthorizationCodeVerifier,
- DeviceAuthorizationArgs,
-};
-pub use call::{Call, CallInfo, VoiceState};
-pub use channel::{Channel, GuildChannel, GuildMinimal, LinkedChannel, LinkedLobby};
-pub use client::{AuthorizationCode, Client, ClientCreateOptions, CurrentUserInfo, Token};
-pub use error::{Error, ErrorKind, Result};
-pub use lobby::{Lobby, LobbyMember};
-pub use message::{AdditionalContent, Message, UserMessageSummary};
-pub use relationship::Relationship;
-pub use user::{User, UserApplicationProfile};
-
-/// Deliver all callbacks queued since the last call.
-///
-/// The SDK does not run its own event loop. Nothing — connection status changes,
-/// completed requests, incoming messages — is observed until this runs, so it
-/// belongs in the host application's main loop.
-///
-/// Call it from the same thread throughout; that thread is where every callback
-/// registered through this crate will run.
-pub fn run_callbacks() {
- unsafe { sys::Discord_RunCallbacks() }
-}
-
-/// Allow SDK objects to be used from multiple threads.
-///
-/// Opts the SDK into its thread-safe mode. This crate's types are still `!Send`
-/// and `!Sync`, so this only matters when reaching into [`sys`] directly.
-///
-/// Call before creating any [`Client`].
-pub fn set_free_threaded() {
- unsafe { sys::Discord_SetFreeThreaded() }
-}
-
-/// Drop every callback the SDK is currently holding.
-///
-/// Releases userdata for all registered callbacks. Useful at shutdown to ensure
-/// closures are freed before the objects they capture.
-pub fn reset_callbacks() {
- unsafe { sys::Discord_ResetCallbacks() }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/lobby.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/lobby.rs
deleted file mode 100644
index df80727..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/lobby.rs
+++ /dev/null
@@ -1,287 +0,0 @@
-//! Lobbies and lobby membership.
-//!
-//! A lobby is an arbitrary, developer-controlled group of users that can
-//! communicate with each other. Lobbies are created and managed either through
-//! Discord's [server APIs] or, without any server-side component, through
-//! `Client::create_or_join_lobby`.
-//!
-//! [server APIs]: https://docs.discord.com/developers/resources/lobby
-//!
-//! # Metadata
-//!
-//! Both [`Lobby`] and [`LobbyMember`] carry developer-supplied metadata: a flat
-//! set of string key/value pairs. The SDK returns it as a `Discord_Properties`
-//! parallel array whose buffers we must release with `Discord_FreeProperties`;
-//! this module copies every key and value into an owned [`HashMap`] and frees
-//! the SDK's memory before returning.
-
-use std::collections::HashMap;
-use std::mem::MaybeUninit;
-
-use discord_social_sdk_sys as sys;
-
-use crate::call::CallInfo;
-use crate::channel::LinkedChannel;
-use crate::handle::handle;
-use crate::user::User;
-use crate::{span, string};
-
-/// Copy a `Discord_Properties` value into an owned map and release the SDK's
-/// buffers.
-///
-/// The SDK allocates the key and value arrays *and* every string inside them.
-/// `Discord_FreeProperties` releases all of it in one go, so the strings are
-/// read with a borrowing copy rather than by taking ownership, which would
-/// double free.
-///
-/// # Safety
-///
-/// `raw` must be a fully initialised `Discord_Properties` whose ownership the
-/// SDK just transferred to us. Calling this twice on the same value double frees.
-unsafe fn take_properties(raw: sys::Discord_Properties) -> HashMap<String, String> {
- let mut out = HashMap::with_capacity(raw.size);
- if !raw.keys.is_null() && !raw.values.is_null() {
- for i in 0..raw.size {
- // SAFETY: the SDK guarantees both arrays hold `raw.size` initialised
- // strings, each valid until `Discord_FreeProperties` runs below.
- let (key, value) = unsafe {
- (
- string::view(*raw.keys.add(i)),
- string::view(*raw.values.add(i)),
- )
- };
- out.insert(key, value);
- }
- }
- // SAFETY: `raw` came from the SDK and has not been freed yet.
- unsafe { sys::Discord_FreeProperties(raw) };
- out
-}
-
-/// Call an SDK getter of the shape `void Get(self, Discord_Properties* out)`.
-///
-/// # Safety
-///
-/// `f` must fully initialise the out-parameter and transfer ownership of it.
-unsafe fn properties_out<F>(f: F) -> HashMap<String, String>
-where
- F: FnOnce(*mut sys::Discord_Properties),
-{
- let mut raw = MaybeUninit::<sys::Discord_Properties>::uninit();
- f(raw.as_mut_ptr());
- // SAFETY: `f` initialised the out-parameter per this function's contract.
- unsafe { take_properties(raw.assume_init()) }
-}
-
-handle! {
- /// A single member of a [`Lobby`].
- ///
- /// Members are not removed automatically when they close the game or
- /// temporarily disconnect, so a member may exist while
- /// [`connected`](LobbyMember::connected) is `false`.
- LobbyMember(sys::Discord_LobbyMemberHandle) {
- drop: sys::Discord_LobbyMemberHandle_Drop,
- clone: sys::Discord_LobbyMemberHandle_Clone,
- }
-}
-
-impl LobbyMember {
- /// Whether this user is allowed to link a channel to the lobby.
- ///
- /// Under the hood this checks the `CanLinkLobby` member flag, which can only
- /// be set through the server API's `add_lobby_member`. It exists so a game
- /// can restrict channel linking to, say, the clan or guild leader.
- pub fn can_link_lobby(&self) -> bool {
- // SAFETY: read-only call on a live handle.
- unsafe { sys::Discord_LobbyMemberHandle_CanLinkLobby(self.raw_ptr()) }
- }
-
- /// Whether the user is currently connected to the lobby.
- pub fn connected(&self) -> bool {
- // SAFETY: read-only call on a live handle.
- unsafe { sys::Discord_LobbyMemberHandle_Connected(self.raw_ptr()) }
- }
-
- /// The user ID of the lobby member.
- pub fn id(&self) -> u64 {
- // SAFETY: read-only call on a live handle.
- unsafe { sys::Discord_LobbyMemberHandle_Id(self.raw_ptr()) }
- }
-
- /// Developer-supplied metadata for this member.
- ///
- /// A common use is to store the game's internal user ID alongside the
- /// Discord one, so every member of a lobby knows the mapping for each user.
- pub fn metadata(&self) -> HashMap<String, String> {
- // SAFETY: the getter fully initialises the out-parameter and transfers
- // ownership of the properties to us.
- unsafe { properties_out(|out| sys::Discord_LobbyMemberHandle_Metadata(self.raw_ptr(), out)) }
- }
-
- /// The full user record for this member, if the SDK has one.
- pub fn user(&self) -> Option<User> {
- let mut raw = MaybeUninit::<sys::Discord_UserHandle>::uninit();
- // SAFETY: the out-parameter is only initialised when the call returns
- // true, and ownership of the handle then transfers to us.
- unsafe {
- if sys::Discord_LobbyMemberHandle_User(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(User::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-}
-
-impl std::fmt::Debug for LobbyMember {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("LobbyMember")
- .field("id", &self.id())
- .field("connected", &self.connected())
- .field("can_link_lobby", &self.can_link_lobby())
- .finish()
- }
-}
-
-handle! {
- /// A lobby: a developer-controlled group of users that can chat and talk
- /// together.
- ///
- /// # Lifetime
- ///
- /// Lobbies are ephemeral. One that has been idle — no user actively
- /// connected — for its auto-delete timeout (5 minutes by default, up to 7
- /// days when configured through the server API) is removed. A lobby linked
- /// to a Discord channel is never auto-deleted.
- ///
- /// # Limits
- ///
- /// A lobby may hold at most 1,000 members, and each user may be in at most
- /// 200 lobbies per game. Voice calls should stay far below that ceiling —
- /// Discord recommends around 25 participants or fewer.
- ///
- /// # Channel linking
- ///
- /// A lobby can be linked to a Discord channel so that messages sent in one
- /// place appear in the other; see [`linked_channel`](Lobby::linked_channel)
- /// and [`LobbyMember::can_link_lobby`]. Because Discord permissions are not
- /// synchronised into the game, *every* lobby member can read and write the
- /// linked channel regardless of their Discord permissions — see
- /// [`GuildChannel::is_viewable_and_writeable_by_all_members`].
- ///
- /// [`GuildChannel::is_viewable_and_writeable_by_all_members`]:
- /// crate::channel::GuildChannel::is_viewable_and_writeable_by_all_members
- ///
- /// # Staleness
- ///
- /// A handle references both the underlying data and the SDK instance.
- /// Updates to the data are visible through existing handles without
- /// re-creating them. If the SDK instance is destroyed while a handle is
- /// still alive, every accessor returns a default value instead.
- Lobby(sys::Discord_LobbyHandle) {
- drop: sys::Discord_LobbyHandle_Drop,
- clone: sys::Discord_LobbyHandle_Clone,
- }
-}
-
-impl Lobby {
- /// Information about the active voice call in this lobby, if there is one.
- ///
- /// Available even when the current user has not joined the call, so the
- /// game can show which members are already in voice.
- pub fn call_info(&self) -> Option<CallInfo> {
- let mut raw = MaybeUninit::<sys::Discord_CallInfoHandle>::uninit();
- // SAFETY: the out-parameter is only initialised when the call returns
- // true, and ownership of the handle then transfers to us.
- unsafe {
- if sys::Discord_LobbyHandle_GetCallInfoHandle(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(CallInfo::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// The member with the given user ID, if they belong to this lobby.
- pub fn member(&self, member_id: u64) -> Option<LobbyMember> {
- let mut raw = MaybeUninit::<sys::Discord_LobbyMemberHandle>::uninit();
- // SAFETY: the out-parameter is only initialised when the call returns
- // true, and ownership of the handle then transfers to us.
- unsafe {
- if sys::Discord_LobbyHandle_GetLobbyMemberHandle(
- self.raw_ptr(),
- member_id,
- raw.as_mut_ptr(),
- ) {
- Some(LobbyMember::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// The ID of the lobby.
- pub fn id(&self) -> u64 {
- // SAFETY: read-only call on a live handle.
- unsafe { sys::Discord_LobbyHandle_Id(self.raw_ptr()) }
- }
-
- /// The Discord channel this lobby is linked to, if any.
- pub fn linked_channel(&self) -> Option<LinkedChannel> {
- let mut raw = MaybeUninit::<sys::Discord_LinkedChannel>::uninit();
- // SAFETY: the out-parameter is only initialised when the call returns
- // true, and ownership of the value then transfers to us.
- unsafe {
- if sys::Discord_LobbyHandle_LinkedChannel(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(LinkedChannel::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// The user IDs of every member of this lobby.
- ///
- /// Cheaper than [`members`](Lobby::members) when only the IDs are needed.
- pub fn member_ids(&self) -> Vec<u64> {
- // SAFETY: the getter initialises the span and transfers ownership of the
- // backing array; the elements are plain integers needing no wrapping.
- unsafe {
- span::out(
- |out| sys::Discord_LobbyHandle_LobbyMemberIds(self.raw_ptr(), out),
- |id| id,
- )
- }
- }
-
- /// A handle for every member of this lobby.
- pub fn members(&self) -> Vec<LobbyMember> {
- // SAFETY: the getter initialises the span and transfers ownership of
- // both the array and every handle in it.
- unsafe {
- span::out(
- |out| sys::Discord_LobbyHandle_LobbyMembers(self.raw_ptr(), out),
- |raw| LobbyMember::from_raw(raw),
- )
- }
- }
-
- /// Developer-supplied metadata for this lobby.
- ///
- /// Simple string key/value pairs, a way to associate internal game state
- /// with the lobby so that every member has easy access to it.
- pub fn metadata(&self) -> HashMap<String, String> {
- // SAFETY: the getter fully initialises the out-parameter and transfers
- // ownership of the properties to us.
- unsafe { properties_out(|out| sys::Discord_LobbyHandle_Metadata(self.raw_ptr(), out)) }
- }
-}
-
-impl std::fmt::Debug for Lobby {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("Lobby")
- .field("id", &self.id())
- .field("member_ids", &self.member_ids())
- .finish()
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/message.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/message.rs
deleted file mode 100644
index 7ffbf9d..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/message.rs
+++ /dev/null
@@ -1,446 +0,0 @@
-//! Chat messages, their non-text attachments, and DM conversation summaries.
-//!
-//! The SDK supports two kinds of chat: one-on-one conversations between two
-//! users, and chat inside a lobby. Both arrive as [`Message`] handles, and
-//! [`Message::channel`] tells you which context a given message came from.
-//!
-//! # Syncing with Discord
-//!
-//! Messages sent through the SDK sometimes also appear in the Discord client:
-//! for one-on-one chat when at least one participant is a full Discord user, and
-//! for lobby chat when the lobby is linked to a Discord channel. The sender must
-//! also not be banned on the Discord side.
-//!
-//! # Legal disclosures
-//!
-//! The first time a user sends an in-game message that will also show up in
-//! Discord, the SDK injects a synthetic message explaining that to the user.
-//! Those are identified by [`Message::disclosure_type`] returning `Some`.
-//! Discord encourages games to restyle, reword or translate these rather than
-//! rendering them verbatim — or to skip rendering them entirely.
-//!
-//! # History
-//!
-//! The SDK keeps the 25 most recent messages per channel in memory and has no
-//! access to anything sent before it connected. An existing [`Message`] keeps
-//! working after the SDK has discarded the message for being too old; you just
-//! cannot obtain a new handle for it.
-//!
-//! # Unrenderable content
-//!
-//! Messages can carry images, videos, embeds, polls and so on that a game is not
-//! expected to render. [`Message::additional_content`] describes that content so
-//! the game can show a small notice pointing the user to Discord.
-//!
-//! See the [message resource documentation] for more on Discord's message model.
-//!
-//! [message resource documentation]: https://discord.com/developers/docs/resources/message
-
-use crate::channel::Channel;
-use crate::enums::{AdditionalContentType, DisclosureType};
-use crate::handle::handle;
-use crate::lobby::Lobby;
-use crate::string;
-use crate::user::User;
-use discord_social_sdk_sys as sys;
-use std::collections::HashMap;
-use std::mem::MaybeUninit;
-
-/// Call a getter of the shape `void G(self, Discord_Properties* out)` and adopt
-/// the result as a map.
-///
-/// The SDK allocates the key and value arrays as one block, and the individual
-/// strings belong to that same allocation — so they are copied out rather than
-/// freed individually, and the block is released with `Discord_FreeProperties`.
-///
-/// # Safety
-///
-/// `f` must fully initialise the out-parameter and transfer ownership of it.
-unsafe fn properties_out<F>(f: F) -> HashMap<String, String>
-where
- F: FnOnce(*mut sys::Discord_Properties),
-{
- let mut raw = MaybeUninit::<sys::Discord_Properties>::uninit();
- f(raw.as_mut_ptr());
- // SAFETY: `f` is contracted to have initialised the out-parameter.
- let props = unsafe { raw.assume_init() };
-
- let mut map = HashMap::new();
- if !props.keys.is_null() && !props.values.is_null() {
- for i in 0..props.size {
- // SAFETY: both arrays hold `props.size` initialised `Discord_String`s,
- // and `view` copies out of them without taking ownership.
- let (key, value) = unsafe {
- (
- string::view(*props.keys.add(i)),
- string::view(*props.values.add(i)),
- )
- };
- map.insert(key, value);
- }
- }
- // SAFETY: `props` was just handed to us by the SDK and is released exactly once.
- unsafe { sys::Discord_FreeProperties(props) };
- map
-}
-
-handle! {
- /// Non-text content attached to a message.
- ///
- /// Describes content that likely cannot be rendered in game — images,
- /// videos, embeds, polls and similar — so the game can show a notice that
- /// there is more to see on Discord.
- AdditionalContent(sys::Discord_AdditionalContent) {
- init: sys::Discord_AdditionalContent_Init,
- drop: sys::Discord_AdditionalContent_Drop,
- clone: sys::Discord_AdditionalContent_Clone,
- }
-}
-
-impl AdditionalContent {
- /// Render an [`AdditionalContentType`] as a human-readable string.
- pub fn type_to_string(content_type: AdditionalContentType) -> String {
- // SAFETY: the getter fully initialises the out-parameter and transfers
- // ownership of the buffer to us.
- unsafe {
- string::out(|out| {
- sys::Discord_AdditionalContent_TypeToString(content_type.into_raw(), out)
- })
- }
- }
-
- /// The kind of additional content in the message.
- ///
- /// Named `content_type` because `type` is a Rust keyword.
- pub fn content_type(&self) -> AdditionalContentType {
- // SAFETY: read-only call on an initialised handle.
- let raw = unsafe { sys::Discord_AdditionalContent_Type(self.raw_ptr()) };
- AdditionalContentType::from_raw(raw)
- }
-
- /// Set the kind of additional content.
- pub fn set_content_type(&mut self, value: AdditionalContentType) {
- // SAFETY: setter on an initialised handle we own.
- unsafe { sys::Discord_AdditionalContent_SetType(self.as_raw_mut(), value.into_raw()) }
- }
-
- /// The name of the poll or thread, when the additional content is one of those.
- pub fn title(&self) -> Option<String> {
- // SAFETY: read-only call; the out-parameter is only initialised — and
- // then owned by us — when the call returns `true`.
- unsafe { string::out_opt(|out| sys::Discord_AdditionalContent_Title(self.raw_ptr(), out)) }
- }
-
- /// Set the title, or clear it with `None`.
- pub fn set_title(&mut self, value: Option<&str>) {
- let ptr = self.as_raw_mut();
- string::with_opt(value, |s| {
- // SAFETY: the SDK copies the string during the call, so borrowing is sound.
- unsafe { sys::Discord_AdditionalContent_SetTitle(ptr, s) }
- })
- }
-
- /// How many pieces of additional content the message carries.
- ///
- /// Useful for rendering a notice such as "2 additional images".
- pub fn count(&self) -> u8 {
- // SAFETY: read-only call on an initialised handle.
- unsafe { sys::Discord_AdditionalContent_Count(self.raw_ptr()) }
- }
-
- /// Set the number of pieces of additional content.
- pub fn set_count(&mut self, value: u8) {
- // SAFETY: setter on an initialised handle we own.
- unsafe { sys::Discord_AdditionalContent_SetCount(self.as_raw_mut(), value) }
- }
-}
-
-impl PartialEq for AdditionalContent {
- /// Compares each field of the additional content for equality.
- fn eq(&self, other: &Self) -> bool {
- // SAFETY: both handles are initialised; `Equals` only reads them.
- unsafe { sys::Discord_AdditionalContent_Equals(self.raw_ptr(), other.as_raw()) }
- }
-}
-
-impl std::fmt::Debug for AdditionalContent {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("AdditionalContent")
- .field("content_type", &self.content_type())
- .field("title", &self.title())
- .field("count", &self.count())
- .finish()
- }
-}
-
-handle! {
- /// A single message received by the SDK.
- ///
- /// Handles hold a reference to both the underlying data and the SDK
- /// instance, so changes to the message are visible through an existing
- /// handle without re-creating it. If the SDK instance is destroyed while a
- /// handle is still alive, every accessor returns a default value (an empty
- /// string, zero, `None`) rather than failing.
- ///
- /// Note: while the SDK lets you send messages on a user's behalf, you must
- /// only do so in response to a user action — never automatically.
- ///
- /// Messages are only ever handed back by the SDK, so there is no constructor.
- Message(sys::Discord_MessageHandle) {
- drop: sys::Discord_MessageHandle_Drop,
- clone: sys::Discord_MessageHandle_Clone,
- }
-}
-
-impl Message {
- /// The ID of this message.
- pub fn id(&self) -> u64 {
- // SAFETY: read-only call on an initialised handle.
- unsafe { sys::Discord_MessageHandle_Id(self.raw_ptr()) }
- }
-
- /// Information about non-text content in this message, if it has any.
- ///
- /// Images, videos, embeds, polls and so on.
- pub fn additional_content(&self) -> Option<AdditionalContent> {
- let mut raw = MaybeUninit::<sys::Discord_AdditionalContent>::uninit();
- // SAFETY: read-only call; the out-parameter is initialised and
- // ownership transferred only when the call returns `true`.
- unsafe {
- if sys::Discord_MessageHandle_AdditionalContent(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(AdditionalContent::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// The application ID associated with this message, if any.
- ///
- /// Identifies whether the message came from another child application in
- /// your catalogue. Parent/child applications are in limited access, so
- /// [`sent_from_game`](Self::sent_from_game) is the field to rely on in the
- /// common case.
- pub fn application_id(&self) -> Option<u64> {
- let mut raw = MaybeUninit::<u64>::uninit();
- // SAFETY: read-only call; the out-parameter is only initialised when
- // the call returns `true`.
- unsafe {
- if sys::Discord_MessageHandle_ApplicationId(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(raw.assume_init())
- } else {
- None
- }
- }
- }
-
- /// The author of this message.
- pub fn author(&self) -> Option<User> {
- let mut raw = MaybeUninit::<sys::Discord_UserHandle>::uninit();
- // SAFETY: read-only call; the handle is initialised and transferred to
- // us only when the call returns `true`.
- unsafe {
- if sys::Discord_MessageHandle_Author(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(User::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// The user ID of whoever sent this message.
- pub fn author_id(&self) -> u64 {
- // SAFETY: read-only call on an initialised handle.
- unsafe { sys::Discord_MessageHandle_AuthorId(self.raw_ptr()) }
- }
-
- /// The channel this message was sent in.
- ///
- /// Combined with the channel's type this identifies the chat context; the
- /// SDK only receives messages in DM, ephemeral DM and lobby channels.
- pub fn channel(&self) -> Option<Channel> {
- let mut raw = MaybeUninit::<sys::Discord_ChannelHandle>::uninit();
- // SAFETY: read-only call; the handle is initialised and transferred to
- // us only when the call returns `true`.
- unsafe {
- if sys::Discord_MessageHandle_Channel(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(Channel::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// The ID of the channel this message was sent in.
- pub fn channel_id(&self) -> u64 {
- // SAFETY: read-only call on an initialised handle.
- unsafe { sys::Discord_MessageHandle_ChannelId(self.raw_ptr()) }
- }
-
- /// The content of this message.
- ///
- /// May be empty: a message sent from Discord can consist only of image
- /// attachments. Some markup — emoji and mentions — is replaced with a more
- /// human-readable form such as `@username` or `:emoji_name:`. Use
- /// [`raw_content`](Self::raw_content) for the unmodified text.
- pub fn content(&self) -> String {
- // SAFETY: the getter fully initialises the out-parameter and transfers
- // ownership of the buffer to us.
- unsafe { string::out(|out| sys::Discord_MessageHandle_Content(self.raw_ptr(), out)) }
- }
-
- /// The content of this message without markup replacement.
- ///
- /// May be empty for the same reason as [`content`](Self::content).
- pub fn raw_content(&self) -> String {
- // SAFETY: the getter fully initialises the out-parameter and transfers
- // ownership of the buffer to us.
- unsafe { string::out(|out| sys::Discord_MessageHandle_RawContent(self.raw_ptr(), out)) }
- }
-
- /// The disclosure this message is explaining, if it is an auto-generated
- /// disclosure message.
- ///
- /// `Some` marks the synthetic messages the SDK injects to explain
- /// integration behaviour to users, which games are encouraged to restyle.
- pub fn disclosure_type(&self) -> Option<DisclosureType> {
- let mut raw = MaybeUninit::<sys::Discord_DisclosureTypes>::uninit();
- // SAFETY: read-only call; the out-parameter is only initialised when
- // the call returns `true`.
- unsafe {
- if sys::Discord_MessageHandle_DisclosureType(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(DisclosureType::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// When the message was most recently edited, in milliseconds since the
- /// Unix epoch.
- ///
- /// Zero if the message has never been edited.
- pub fn edited_timestamp(&self) -> u64 {
- // SAFETY: read-only call on an initialised handle.
- unsafe { sys::Discord_MessageHandle_EditedTimestamp(self.raw_ptr()) }
- }
-
- /// When the message was sent, in milliseconds since the Unix epoch.
- pub fn sent_timestamp(&self) -> u64 {
- // SAFETY: read-only call on an initialised handle.
- unsafe { sys::Discord_MessageHandle_SentTimestamp(self.raw_ptr()) }
- }
-
- /// The lobby this message was sent in, if it was sent in one.
- pub fn lobby(&self) -> Option<Lobby> {
- let mut raw = MaybeUninit::<sys::Discord_LobbyHandle>::uninit();
- // SAFETY: read-only call; the handle is initialised and transferred to
- // us only when the call returns `true`.
- unsafe {
- if sys::Discord_MessageHandle_Lobby(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(Lobby::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// Developer-supplied metadata attached to this message.
- ///
- /// Simple string key/value pairs. One use is carrying a character name so
- /// the game can customise how the message renders.
- pub fn metadata(&self) -> HashMap<String, String> {
- // SAFETY: the getter fully initialises the out-parameter and transfers
- // ownership of it to us.
- unsafe { properties_out(|out| sys::Discord_MessageHandle_Metadata(self.raw_ptr(), out)) }
- }
-
- /// Moderation metadata the developer set on this message.
- ///
- /// Simple string key/value pairs. Uses include a flag recording the
- /// message's moderation status, or a rewritten version of the message that
- /// is more appropriate for the game's audience.
- pub fn moderation_metadata(&self) -> HashMap<String, String> {
- // SAFETY: the getter fully initialises the out-parameter and transfers
- // ownership of it to us.
- unsafe {
- properties_out(|out| sys::Discord_MessageHandle_ModerationMetadata(self.raw_ptr(), out))
- }
- }
-
- /// The other participant, if this message was sent in a DM.
- pub fn recipient(&self) -> Option<User> {
- let mut raw = MaybeUninit::<sys::Discord_UserHandle>::uninit();
- // SAFETY: read-only call; the handle is initialised and transferred to
- // us only when the call returns `true`.
- unsafe {
- if sys::Discord_MessageHandle_Recipient(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(User::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// The ID of the other user, when this message was sent in a DM or
- /// ephemeral DM.
- pub fn recipient_id(&self) -> u64 {
- // SAFETY: read-only call on an initialised handle.
- unsafe { sys::Discord_MessageHandle_RecipientId(self.raw_ptr()) }
- }
-
- /// Whether this message was sent in game rather than from Discord itself.
- ///
- /// With parent/child applications this is true for messages sent from any
- /// child application.
- pub fn sent_from_game(&self) -> bool {
- // SAFETY: read-only call on an initialised handle.
- unsafe { sys::Discord_MessageHandle_SentFromGame(self.raw_ptr()) }
- }
-}
-
-impl std::fmt::Debug for Message {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("Message")
- .field("id", &self.id())
- .field("author_id", &self.author_id())
- .field("channel_id", &self.channel_id())
- .field("content", &self.content())
- .field("sent_timestamp", &self.sent_timestamp())
- .finish()
- }
-}
-
-handle! {
- /// A summary of a DM conversation with a user.
- ///
- /// Identifies the conversation and its most recent message; the messages
- /// themselves are fetched separately.
- UserMessageSummary(sys::Discord_UserMessageSummary) {
- drop: sys::Discord_UserMessageSummary_Drop,
- clone: sys::Discord_UserMessageSummary_Clone,
- }
-}
-
-impl UserMessageSummary {
- /// The ID of the last message sent in the DM conversation.
- pub fn last_message_id(&self) -> u64 {
- // SAFETY: read-only call on an initialised handle.
- unsafe { sys::Discord_UserMessageSummary_LastMessageId(self.raw_ptr()) }
- }
-
- /// The ID of the other user in the DM conversation.
- pub fn user_id(&self) -> u64 {
- // SAFETY: read-only call on an initialised handle.
- unsafe { sys::Discord_UserMessageSummary_UserId(self.raw_ptr()) }
- }
-}
-
-impl std::fmt::Debug for UserMessageSummary {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("UserMessageSummary")
- .field("user_id", &self.user_id())
- .field("last_message_id", &self.last_message_id())
- .finish()
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/relationship.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/relationship.rs
deleted file mode 100644
index ff5dea1..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/relationship.rs
+++ /dev/null
@@ -1,120 +0,0 @@
-//! The relationship between the current user and another user.
-//!
-//! Relationships cover friends, blocked users and pending friend invites.
-//!
-//! # Discord relationships versus game relationships
-//!
-//! The SDK supports two kinds of relationship, and a [`Relationship`] carries a
-//! type field for each:
-//!
-//! - **Discord** relationships persist across games and on the Discord client
-//! itself. Both users can see whether the other is online regardless of
-//! whether they are playing the same game.
-//! - **Game** relationships are per-game and do not carry over to other games.
-//! The two users can only see each other's online state while playing a game
-//! in which they are friends.
-//!
-//! A game friend can later "upgrade" to a full Discord friend, at which point
-//! both relationships exist simultaneously — which is why there are two type
-//! fields. During such an upgrade
-//! [`discord_relationship_type`](Relationship::discord_relationship_type) is
-//! [`PendingIncoming`](crate::enums::RelationshipType::PendingIncoming) or
-//! [`PendingOutgoing`](crate::enums::RelationshipType::PendingOutgoing)
-//! depending on which side sent the invite, while
-//! [`game_relationship_type`](Relationship::game_relationship_type) stays
-//! [`Friend`](crate::enums::RelationshipType::Friend).
-//!
-//! Blocking is always recorded on the Discord relationship and persists across
-//! games; it is not possible to block a user in only one game.
-//!
-//! # Consent
-//!
-//! The SDK lets a game manage relationships, but no such action should ever be
-//! taken without the user's explicit consent. Never send or accept friend
-//! requests automatically — only in response to a deliberate user action such as
-//! clicking a "Send Friend Request" button.
-
-use crate::enums::RelationshipType;
-use crate::handle::handle;
-use crate::user::User;
-use discord_social_sdk_sys as sys;
-use std::mem::MaybeUninit;
-
-handle! {
- /// The relationship between the current user and a target user.
- ///
- /// Obtained from the client's relationship list or from
- /// [`User::relationship`] — never constructed directly, which is why there
- /// is no constructor here.
- ///
- /// See the [module documentation](self) for how the Discord and game
- /// relationship types interact.
- Relationship(sys::Discord_RelationshipHandle) {
- drop: sys::Discord_RelationshipHandle_Drop,
- clone: sys::Discord_RelationshipHandle_Clone,
- }
-}
-
-impl Relationship {
- /// The Discord-wide relationship type.
- ///
- /// This is the relationship that persists across games and on the Discord
- /// client, and it is where blocking is always recorded.
- pub fn discord_relationship_type(&self) -> RelationshipType {
- // SAFETY: read-only getter on a live handle.
- RelationshipType::from_raw(unsafe {
- sys::Discord_RelationshipHandle_DiscordRelationshipType(self.raw_ptr())
- })
- }
-
- /// The per-game relationship type.
- ///
- /// This relationship applies only to this game and does not carry over to
- /// others.
- pub fn game_relationship_type(&self) -> RelationshipType {
- // SAFETY: read-only getter on a live handle.
- RelationshipType::from_raw(unsafe {
- sys::Discord_RelationshipHandle_GameRelationshipType(self.raw_ptr())
- })
- }
-
- /// The id of the target user in this relationship.
- pub fn id(&self) -> u64 {
- // SAFETY: read-only getter on a live handle.
- unsafe { sys::Discord_RelationshipHandle_Id(self.raw_ptr()) }
- }
-
- /// Whether this relationship is a spam request.
- pub fn is_spam_request(&self) -> bool {
- // SAFETY: read-only getter on a live handle.
- unsafe { sys::Discord_RelationshipHandle_IsSpamRequest(self.raw_ptr()) }
- }
-
- /// A handle to the target user in this relationship, if one is available.
- ///
- /// This is the user whose id [`id`](Self::id) returns.
- pub fn user(&self) -> Option<User> {
- let mut raw = MaybeUninit::<sys::Discord_UserHandle>::uninit();
- // SAFETY: read-only getter. It only writes the out-parameter when it
- // returns true, so `assume_init` is confined to that branch; the handle
- // it writes is owned by us and dropped by `User`.
- unsafe {
- if sys::Discord_RelationshipHandle_User(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(User::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-}
-
-impl std::fmt::Debug for Relationship {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("Relationship")
- .field("id", &self.id())
- .field("discord_relationship_type", &self.discord_relationship_type())
- .field("game_relationship_type", &self.game_relationship_type())
- .field("is_spam_request", &self.is_spam_request())
- .finish()
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/span.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/span.rs
deleted file mode 100644
index ea6c45c..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/span.rs
+++ /dev/null
@@ -1,121 +0,0 @@
-//! Converting `Discord_*Span` out-parameters into owned Rust [`Vec`]s.
-//!
-//! A span is a `{ ptr, size }` pair. When the SDK returns one, ownership of
-//! *both* the array and every element in it transfers to the caller: each
-//! element must be adopted individually, then the backing array released with
-//! `Discord_Free`. Elements are moved out rather than cloned, so no extra
-//! allocation happens per item.
-
-use discord_social_sdk_sys as sys;
-use std::mem::MaybeUninit;
-
-/// Call a span-returning getter and adopt every element.
-///
-/// `wrap` takes each raw element by value and must produce a wrapper that owns
-/// it — typically `|raw| unsafe { Type::from_raw(raw) }`.
-///
-/// # Safety
-///
-/// `f` must fully initialise the out-parameter and transfer ownership of the
-/// array and its elements.
-pub(crate) unsafe fn out<S, E, T, F, W>(f: F, wrap: W) -> Vec<T>
-where
- S: SpanLayout<Elem = E>,
- F: FnOnce(*mut S),
- W: Fn(E) -> T,
-{
- let mut raw = MaybeUninit::<S>::uninit();
- f(raw.as_mut_ptr());
- let span = unsafe { raw.assume_init() };
-
- let (ptr, size) = span.parts();
- if ptr.is_null() || size == 0 {
- if !ptr.is_null() {
- unsafe { sys::Discord_Free(ptr.cast()) };
- }
- return Vec::new();
- }
-
- let mut out = Vec::with_capacity(size);
- for i in 0..size {
- // Move the element out; the SDK will not touch it again.
- let elem = unsafe { std::ptr::read(ptr.add(i)) };
- out.push(wrap(elem));
- }
- // Free the array itself, not the elements — those are ours now.
- unsafe { sys::Discord_Free(ptr.cast()) };
- out
-}
-
-/// Structural access to a `Discord_*Span`.
-///
-/// Implemented via [`impl_span`] for each concrete span type, since bindgen
-/// generates them as unrelated structs with identical shape.
-pub(crate) trait SpanLayout {
- type Elem;
- fn parts(&self) -> (*mut Self::Elem, usize);
-}
-
-macro_rules! impl_span {
- ($($span:ty => $elem:ty),* $(,)?) => {
- $(
- impl $crate::span::SpanLayout for $span {
- type Elem = $elem;
- fn parts(&self) -> (*mut $elem, usize) {
- (self.ptr, self.size)
- }
- }
- )*
- };
-}
-
-impl_span! {
- sys::Discord_ActivityButtonSpan => sys::Discord_ActivityButton,
- sys::Discord_UInt64Span => u64,
- sys::Discord_UserApplicationProfileHandleSpan => sys::Discord_UserApplicationProfileHandle,
- sys::Discord_LobbyMemberHandleSpan => sys::Discord_LobbyMemberHandle,
- sys::Discord_AudioDeviceSpan => sys::Discord_AudioDevice,
- sys::Discord_CallSpan => sys::Discord_Call,
- sys::Discord_UserMessageSummarySpan => sys::Discord_UserMessageSummary,
- sys::Discord_MessageHandleSpan => sys::Discord_MessageHandle,
- sys::Discord_RelationshipHandleSpan => sys::Discord_RelationshipHandle,
- sys::Discord_GuildMinimalSpan => sys::Discord_GuildMinimal,
- sys::Discord_GuildChannelSpan => sys::Discord_GuildChannel,
- sys::Discord_UserHandleSpan => sys::Discord_UserHandle,
-}
-
-/// Adopt a span delivered by value as a callback argument.
-///
-/// Callback spans are **owned**, exactly like the out-param case: the official
-/// C++ wrapper adopts every element as `DiscordObjectState::Owned` and then
-/// frees the backing array. Treating one as borrowed leaks every element plus
-/// the array, so this moves the elements out and frees the array, same as
-/// [`out`] — it differs only in how the span arrives.
-///
-/// # Safety
-///
-/// `span` must be a span the SDK just transferred to us, and must not be used
-/// again afterwards.
-pub(crate) unsafe fn take<S, E, T, W>(span: S, wrap: W) -> Vec<T>
-where
- S: SpanLayout<Elem = E>,
- W: Fn(E) -> T,
-{
- let (ptr, size) = span.parts();
- if ptr.is_null() || size == 0 {
- if !ptr.is_null() {
- unsafe { sys::Discord_Free(ptr.cast()) };
- }
- return Vec::new();
- }
-
- let mut out = Vec::with_capacity(size);
- for i in 0..size {
- // Move the element out; the SDK will not touch it again.
- let elem = unsafe { std::ptr::read(ptr.add(i)) };
- out.push(wrap(elem));
- }
- // Free the array itself, not the elements — those are ours now.
- unsafe { sys::Discord_Free(ptr.cast()) };
- out
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/string.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/string.rs
deleted file mode 100644
index 75a261c..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/string.rs
+++ /dev/null
@@ -1,118 +0,0 @@
-//! Conversions across the `Discord_String` boundary.
-//!
-//! The SDK uses two different ownership rules depending on direction:
-//!
-//! - **Into the SDK** (setters, arguments): the SDK copies immediately, so a
-//! `Discord_String` borrowing Rust memory is sound as long as it only has to
-//! survive the call. That is [`borrow`].
-//! - **Out of the SDK** (getters, callback payloads): the returned buffer is
-//! freshly allocated and the caller owns it. It must be released with
-//! `Discord_Free`. That is [`take`].
-//!
-//! `Discord_String` is *not* NUL-terminated, so it is always a `ptr`/`size`
-//! pair and never a `CStr`.
-
-use discord_social_sdk_sys as sys;
-use std::mem::MaybeUninit;
-
-/// Borrow a Rust string as a `Discord_String` for the duration of a call.
-///
-/// # Safety contract for callers
-///
-/// The result borrows `s`. It must not outlive `s`, and must only be passed to
-/// SDK functions that copy their input (which every setter does).
-pub(crate) fn borrow(s: &str) -> sys::Discord_String {
- sys::Discord_String {
- // Cast away const: the SDK treats this as read-only despite the mutable type.
- ptr: s.as_ptr() as *mut u8,
- size: s.len(),
- }
-}
-
-/// Take ownership of a string returned by the SDK, freeing the SDK's buffer.
-///
-/// Invalid UTF-8 is replaced rather than rejected: the SDK sources these from
-/// user-authored content, and a lossy name is far better than a panic deep
-/// inside a callback.
-///
-/// # Safety
-///
-/// `s` must be a string the SDK just handed back and whose ownership was
-/// transferred to us. Calling this twice on the same value double-frees.
-pub(crate) unsafe fn take(s: sys::Discord_String) -> String {
- if s.ptr.is_null() || s.size == 0 {
- // A null pointer is never freeable; a zero-length buffer has nothing to read.
- if !s.ptr.is_null() {
- unsafe { sys::Discord_Free(s.ptr.cast()) };
- }
- return String::new();
- }
- let bytes = unsafe { std::slice::from_raw_parts(s.ptr, s.size) };
- let out = String::from_utf8_lossy(bytes).into_owned();
- unsafe { sys::Discord_Free(s.ptr.cast()) };
- out
-}
-
-/// Read a borrowed `Discord_String` without taking ownership.
-///
-/// Used for strings delivered as callback arguments, which the SDK frees itself
-/// once the callback returns.
-///
-/// # Safety
-///
-/// `s` must point to a buffer valid for `s.size` bytes for the duration of the call.
-pub(crate) unsafe fn view(s: sys::Discord_String) -> String {
- if s.ptr.is_null() || s.size == 0 {
- return String::new();
- }
- let bytes = unsafe { std::slice::from_raw_parts(s.ptr, s.size) };
- String::from_utf8_lossy(bytes).into_owned()
-}
-
-/// Call an SDK getter of the shape `void Get(self, Discord_String* out)`.
-///
-/// # Safety
-///
-/// `f` must fully initialise the out-parameter and transfer ownership of it.
-pub(crate) unsafe fn out<F>(f: F) -> String
-where
- F: FnOnce(*mut sys::Discord_String),
-{
- let mut raw = MaybeUninit::<sys::Discord_String>::uninit();
- f(raw.as_mut_ptr());
- unsafe { take(raw.assume_init()) }
-}
-
-/// Call an optional SDK getter of the shape `bool Get(self, Discord_String* out)`,
-/// where `false` means the field is absent and the out-parameter is untouched.
-///
-/// # Safety
-///
-/// Same contract as [`out`], but `f` only initialises the out-parameter when it
-/// returns `true`.
-pub(crate) unsafe fn out_opt<F>(f: F) -> Option<String>
-where
- F: FnOnce(*mut sys::Discord_String) -> bool,
-{
- let mut raw = MaybeUninit::<sys::Discord_String>::uninit();
- if f(raw.as_mut_ptr()) {
- Some(unsafe { take(raw.assume_init()) })
- } else {
- None
- }
-}
-
-/// Run `f` with an optional borrowed string, matching the SDK's
-/// "null pointer means clear this field" convention on setters.
-pub(crate) fn with_opt<T, F>(value: Option<&str>, f: F) -> T
-where
- F: FnOnce(*mut sys::Discord_String) -> T,
-{
- match value {
- Some(v) => {
- let mut raw = borrow(v);
- f(&mut raw)
- }
- None => f(std::ptr::null_mut()),
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/src/user.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/src/user.rs
deleted file mode 100644
index 2c582e8..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/src/user.rs
+++ /dev/null
@@ -1,290 +0,0 @@
-//! Users known to the SDK, and their per-application external profiles.
-//!
-//! A [`User`] is a single Discord account the SDK knows about: basic account
-//! information such as id, name and avatar, plus "status" information covering
-//! both whether they are online and whether they are playing this game.
-//!
-//! A [`UserApplicationProfile`] is the same person as seen through an external
-//! identity provider such as Steam or Epic Online Services.
-//!
-//! # Handle lifetime
-//!
-//! Handles hold a reference to both the underlying data and the SDK instance.
-//! Changes to the underlying data are generally visible through an existing
-//! handle without re-creating it. If the SDK instance is destroyed while a
-//! handle is still alive, every accessor returns a default value instead —
-//! an empty [`String`], a zero id, and so on — rather than failing.
-
-use crate::activity::Activity;
-use crate::enums::{AvatarType, ExternalIdentityProviderType, StatusType};
-use crate::handle::handle;
-use crate::relationship::Relationship;
-use crate::{span, string};
-use discord_social_sdk_sys as sys;
-use std::mem::MaybeUninit;
-
-handle! {
- /// A single Discord user the SDK knows about.
- ///
- /// Obtained from the client, from a [`Relationship`], or from lobby and
- /// message payloads — never constructed directly, which is why there is no
- /// constructor here.
- ///
- /// See the [handle lifetime](self#handle-lifetime) notes for what happens to
- /// a handle that outlives the SDK instance.
- User(sys::Discord_UserHandle) {
- drop: sys::Discord_UserHandle_Drop,
- clone: sys::Discord_UserHandle_Clone,
- }
-}
-
-impl User {
- /// The hash of the user's Discord profile avatar, if one is set.
- ///
- /// This is the raw hash; use [`avatar_url`](Self::avatar_url) to get
- /// something directly loadable.
- pub fn avatar(&self) -> Option<String> {
- // SAFETY: read-only getter on a live handle; `out_opt` only adopts the
- // out-parameter when the SDK reports the field is present.
- unsafe { string::out_opt(|out| sys::Discord_UserHandle_Avatar(self.raw_ptr(), out)) }
- }
-
- /// A CDN url for the user's Discord profile avatar.
- ///
- /// `animated_type` is used when the user's avatar is animated and
- /// `static_type` when it is not. If the user has no avatar set, a url to one
- /// of Discord's default avatars is returned instead, so this never yields an
- /// empty result for a valid handle.
- pub fn avatar_url(&self, animated_type: AvatarType, static_type: AvatarType) -> String {
- // SAFETY: read-only getter; the returned string is freshly allocated and
- // ownership transfers to us, which `string::out` takes care of.
- unsafe {
- string::out(|out| {
- sys::Discord_UserHandle_AvatarUrl(
- self.raw_ptr(),
- animated_type.into_raw(),
- static_type.into_raw(),
- out,
- )
- })
- }
- }
-
- /// The name to show for this user: their preferred name if one is set,
- /// otherwise their unique username.
- pub fn display_name(&self) -> String {
- // SAFETY: read-only getter transferring ownership of the out-parameter.
- unsafe { string::out(|out| sys::Discord_UserHandle_DisplayName(self.raw_ptr(), out)) }
- }
-
- /// The user's rich presence activity associated with the current game, if
- /// one is set.
- ///
- /// A user may have several rich presence activities at once on Discord, but
- /// the SDK only exposes the one belonging to your application. Use it to
- /// learn about the party the user is in, if any, and what they are doing in
- /// the game.
- ///
- /// See the [rich presence overview] for more information.
- ///
- /// [rich presence overview]: https://discord.com/developers/docs/rich-presence/overview
- pub fn game_activity(&self) -> Option<Activity> {
- let mut raw = MaybeUninit::<sys::Discord_Activity>::uninit();
- // SAFETY: read-only getter. It only writes the out-parameter when it
- // returns true, so `assume_init` is confined to that branch, and the
- // activity it writes is owned by us from then on.
- unsafe {
- if sys::Discord_UserHandle_GameActivity(self.raw_ptr(), raw.as_mut_ptr()) {
- Some(Activity::from_raw(raw.assume_init()))
- } else {
- None
- }
- }
- }
-
- /// The user's preferred display name, if one is set.
- ///
- /// Discord's public API calls this the "global name" rather than the display
- /// name. Users can set it to almost any string. See the [user resource
- /// documentation] for more information.
- ///
- /// [user resource documentation]: https://discord.com/developers/docs/resources/user
- pub fn global_name(&self) -> Option<String> {
- // SAFETY: read-only getter; ownership of the out-parameter transfers to
- // us only when it reports the field is present.
- unsafe { string::out_opt(|out| sys::Discord_UserHandle_GlobalName(self.raw_ptr(), out)) }
- }
-
- /// The id of this user.
- ///
- /// A return value of `0` means the handle is no longer valid — for example
- /// because the SDK instance it referenced has been destroyed.
- pub fn id(&self) -> u64 {
- // SAFETY: read-only getter on a live handle.
- unsafe { sys::Discord_UserHandle_Id(self.raw_ptr()) }
- }
-
- /// Whether this user is a provisional account.
- ///
- /// Provisional accounts are created for players who have not linked a real
- /// Discord account; their [`username`](Self::username) is auto-generated.
- pub fn is_provisional(&self) -> bool {
- // SAFETY: read-only getter on a live handle.
- unsafe { sys::Discord_UserHandle_IsProvisional(self.raw_ptr()) }
- }
-
- /// The relationship between the currently authenticated user and this user.
- ///
- /// Always returns a handle; when there is no relationship its
- /// [`discord_relationship_type`](Relationship::discord_relationship_type) is
- /// [`RelationshipType::None`](crate::enums::RelationshipType::None).
- pub fn relationship(&self) -> Relationship {
- let mut raw = MaybeUninit::<sys::Discord_RelationshipHandle>::uninit();
- // SAFETY: read-only getter that always initialises the out-parameter and
- // transfers ownership of the resulting handle to us.
- unsafe {
- sys::Discord_UserHandle_Relationship(self.raw_ptr(), raw.as_mut_ptr());
- Relationship::from_raw(raw.assume_init())
- }
- }
-
- /// The user's online, offline or idle status.
- pub fn status(&self) -> StatusType {
- // SAFETY: read-only getter on a live handle.
- StatusType::from_raw(unsafe { sys::Discord_UserHandle_Status(self.raw_ptr()) })
- }
-
- /// The external identity provider profiles for this user.
- ///
- /// A user can currently have at most one profile per application, so this
- /// contains either zero or one element.
- pub fn user_application_profiles(&self) -> Vec<UserApplicationProfile> {
- // SAFETY: read-only span getter. Both the array and every element are
- // transferred to us; `span::out` adopts each element and frees the array.
- unsafe {
- span::out(
- |out| sys::Discord_UserHandle_UserApplicationProfiles(self.raw_ptr(), out),
- |raw| UserApplicationProfile::from_raw(raw),
- )
- }
- }
-
- /// The globally unique username of this user.
- ///
- /// For provisional accounts this is an auto-generated string. See the [user
- /// resource documentation] for more information.
- ///
- /// [user resource documentation]: https://discord.com/developers/docs/resources/user
- pub fn username(&self) -> String {
- // SAFETY: read-only getter transferring ownership of the out-parameter.
- unsafe { string::out(|out| sys::Discord_UserHandle_Username(self.raw_ptr(), out)) }
- }
-
- /// The SDK's own name for an [`AvatarType`], such as `"png"`.
- ///
- /// Free-standing in the C API rather than an accessor, so it takes no user.
- pub fn avatar_type_to_string(avatar_type: AvatarType) -> String {
- // SAFETY: pure conversion; the returned string is ours to free.
- unsafe {
- string::out(|out| {
- sys::Discord_UserHandle_AvatarTypeToString(avatar_type.into_raw(), out)
- })
- }
- }
-}
-
-impl std::fmt::Debug for User {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("User")
- .field("id", &self.id())
- .field("username", &self.username())
- .field("status", &self.status())
- .field("is_provisional", &self.is_provisional())
- .finish()
- }
-}
-
-handle! {
- /// A user's profile as reported by an external identity provider.
- ///
- /// External identity providers include Steam and Epic Online Services; which
- /// one this profile came from is given by
- /// [`provider_type`](UserApplicationProfile::provider_type).
- ///
- /// Obtained from [`User::user_application_profiles`].
- UserApplicationProfile(sys::Discord_UserApplicationProfileHandle) {
- drop: sys::Discord_UserApplicationProfileHandle_Drop,
- clone: sys::Discord_UserApplicationProfileHandle_Clone,
- }
-}
-
-impl UserApplicationProfile {
- /// The user's in-game avatar hash.
- pub fn avatar_hash(&self) -> String {
- // SAFETY: read-only getter transferring ownership of the out-parameter.
- unsafe {
- string::out(|out| {
- sys::Discord_UserApplicationProfileHandle_AvatarHash(self.raw_ptr(), out)
- })
- }
- }
-
- /// Any metadata set by the developer.
- pub fn metadata(&self) -> String {
- // SAFETY: read-only getter transferring ownership of the out-parameter.
- unsafe {
- string::out(|out| {
- sys::Discord_UserApplicationProfileHandle_Metadata(self.raw_ptr(), out)
- })
- }
- }
-
- /// The user's external identity provider id, if it exists.
- pub fn provider_id(&self) -> Option<String> {
- // SAFETY: read-only getter; ownership of the out-parameter transfers to
- // us only when it reports the field is present.
- unsafe {
- string::out_opt(|out| {
- sys::Discord_UserApplicationProfileHandle_ProviderId(self.raw_ptr(), out)
- })
- }
- }
-
- /// The user id issued by the external identity provider.
- pub fn provider_issued_user_id(&self) -> String {
- // SAFETY: read-only getter transferring ownership of the out-parameter.
- unsafe {
- string::out(|out| {
- sys::Discord_UserApplicationProfileHandle_ProviderIssuedUserId(self.raw_ptr(), out)
- })
- }
- }
-
- /// Which external identity provider this profile came from.
- pub fn provider_type(&self) -> ExternalIdentityProviderType {
- // SAFETY: read-only getter on a live handle.
- ExternalIdentityProviderType::from_raw(unsafe {
- sys::Discord_UserApplicationProfileHandle_ProviderType(self.raw_ptr())
- })
- }
-
- /// The user's in-game username.
- pub fn username(&self) -> String {
- // SAFETY: read-only getter transferring ownership of the out-parameter.
- unsafe {
- string::out(|out| {
- sys::Discord_UserApplicationProfileHandle_Username(self.raw_ptr(), out)
- })
- }
- }
-}
-
-impl std::fmt::Debug for UserApplicationProfile {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.debug_struct("UserApplicationProfile")
- .field("username", &self.username())
- .field("provider_type", &self.provider_type())
- .field("provider_issued_user_id", &self.provider_issued_user_id())
- .finish()
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk/tests/smoke.rs b/vendor/discord_social_sdk/crates/discord_social_sdk/tests/smoke.rs
deleted file mode 100644
index e076be6..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk/tests/smoke.rs
+++ /dev/null
@@ -1,268 +0,0 @@
-//! End-to-end checks against the real Discord SDK binary.
-//!
-//! These exercise everything that does not need a live connection: handle
-//! construction and destruction, the string boundary in both directions,
-//! optional getters, span ownership, `Clone`, and callback registration and
-//! teardown. Anything requiring an authenticated session is out of scope here.
-//!
-//! Run under a leak checker if one is available — most of what these assert is
-//! that ownership is handled correctly, which otherwise fails silently.
-
-use discord_social_sdk::enums::{ActivityType, ClientStatus, LoggingSeverity};
-use discord_social_sdk::{Activity, ActivityButton, ActivityParty, Client, run_callbacks};
-use std::cell::RefCell;
-use std::rc::Rc;
-use std::sync::{Mutex, MutexGuard};
-
-/// Serialises tests that touch the SDK's process-global callback queue.
-///
-/// `run_callbacks` and `reset_callbacks` act on state shared by every `Client` in
-/// the process, and the SDK is designed to be driven from a single thread. Rust
-/// runs tests on parallel threads, so without this one test's pump drains — and
-/// frees — another's callbacks, which fails intermittently.
-static SDK: Mutex<()> = Mutex::new(());
-
-fn exclusive() -> MutexGuard<'static, ()> {
- // A poisoned lock only means some earlier test panicked; the SDK state is no
- // less usable, so recover rather than cascading failures into every test.
- SDK.lock().unwrap_or_else(|e| e.into_inner())
-}
-
-#[test]
-fn client_reports_its_version() {
- // Reading static version data proves the library is linked and callable.
- assert!(Client::version_major() >= 1, "unexpected major version");
- assert!(!Client::version_hash().is_empty(), "expected a build hash");
-}
-
-#[test]
-fn default_scopes_are_non_empty() {
- // Exercises the owned-string path: the SDK allocates, we read and free.
- let presence = Client::default_presence_scopes();
- let communication = Client::default_communication_scopes();
-
- // Both are OAuth2 scope strings, and both need an identity scope.
- assert!(presence.contains("openid"), "unexpected presence scopes: {presence}");
- assert!(
- communication.contains("openid"),
- "unexpected communication scopes: {communication}"
- );
-
- // Presence is the narrower, presence-only grant; communication is the broader
- // social grant. Note the broader one is the *shorter* string, so length is not
- // a proxy for how much access a scope set confers.
- assert!(presence.contains("sdk.social_layer_presence"));
- assert!(communication.contains("sdk.social_layer"));
- assert!(!communication.contains("sdk.social_layer_presence"));
-}
-
-#[test]
-fn client_lifecycle_without_connecting() {
- let _guard = exclusive();
- let mut client = Client::new();
-
- client.set_application_id(1234567890);
- assert_eq!(client.application_id(), 1234567890);
-
- // A client that has never connected must not claim to be ready.
- assert_ne!(client.status(), ClientStatus::Ready);
- assert!(!client.is_authenticated());
-
- // Debug must not panic even in this partially-initialised state.
- assert!(format!("{client:?}").contains("Client"));
-}
-
-#[test]
-fn strings_round_trip_through_the_sdk() {
- let mut activity = Activity::new();
-
- activity.set_name("Test Game");
- assert_eq!(activity.name(), "Test Game");
-
- // Non-ASCII proves the boundary is length-delimited, not NUL-terminated.
- activity.set_name("🎮 テスト");
- assert_eq!(activity.name(), "🎮 テスト");
-
- // An embedded NUL must survive, since Discord_String carries an explicit size.
- activity.set_name("a\0b");
- assert_eq!(activity.name(), "a\0b");
-}
-
-#[test]
-fn optional_fields_distinguish_absent_from_empty() {
- let mut activity = Activity::new();
-
- // Never set: the SDK reports absent, not empty.
- assert_eq!(activity.state(), None);
-
- activity.set_state(Some("in a match"));
- assert_eq!(activity.state(), Some("in a match".to_string()));
-
- // An empty string is a value, distinct from clearing the field.
- activity.set_state(Some(""));
- assert_eq!(activity.state(), Some(String::new()));
-
- activity.set_state(None);
- assert_eq!(activity.state(), None);
-}
-
-#[test]
-fn enums_round_trip() {
- let mut activity = Activity::new();
-
- activity.set_activity_type(ActivityType::Playing);
- assert_eq!(activity.activity_type(), ActivityType::Playing);
-
- activity.set_activity_type(ActivityType::Competing);
- assert_eq!(activity.activity_type(), ActivityType::Competing);
-}
-
-#[test]
-fn spans_transfer_ownership_of_every_element() {
- let mut activity = Activity::new();
-
- activity.add_button(&ActivityButton::with_label_and_url("Play", "https://example.com/1"));
- activity.add_button(&ActivityButton::with_label_and_url("Watch", "https://example.com/2"));
-
- let buttons = activity.buttons();
- assert_eq!(buttons.len(), 2);
- assert_eq!(buttons[0].label(), "Play");
- assert_eq!(buttons[1].url(), "https://example.com/2");
-
- // Dropping the owned Vec must not disturb the activity that produced it.
- drop(buttons);
- assert_eq!(activity.buttons().len(), 2);
-}
-
-#[test]
-fn clone_produces_an_independent_handle() {
- let mut original = Activity::new();
- original.set_name("original");
-
- let mut copy = original.clone();
- copy.set_name("copy");
-
- // Mutating the clone must not reach through to the source.
- assert_eq!(original.name(), "original");
- assert_eq!(copy.name(), "copy");
-
- // Dropping one must leave the other usable, proving the handles are distinct.
- drop(copy);
- assert_eq!(original.name(), "original");
-}
-
-#[test]
-fn nested_handles_are_owned_by_the_caller() {
- let mut activity = Activity::new();
-
- let mut party = ActivityParty::new();
- party.set_id("party-1");
- party.set_current_size(2);
- party.set_max_size(4);
-
- // The setter copies, so the local party stays ours to drop.
- activity.set_party(Some(&party));
- drop(party);
-
- let fetched = activity.party().expect("party was just set");
- assert_eq!(fetched.id(), "party-1");
- assert_eq!(fetched.current_size(), 2);
- assert_eq!(fetched.max_size(), 4);
-}
-
-#[test]
-fn callbacks_are_registered_and_their_closures_released() {
- let _guard = exclusive();
- // The Rc's strong count tells us whether the SDK actually dropped the boxed
- // closure: if the userdata leaks, the count never returns to 1.
- let witness = Rc::new(RefCell::new(Vec::<String>::new()));
- let mut client = Client::new();
-
- {
- let witness = Rc::clone(&witness);
- client.on_status_changed(move |status, _error, _detail| {
- witness.borrow_mut().push(format!("{status:?}"));
- });
- }
- assert_eq!(Rc::strong_count(&witness), 2, "closure should hold the Rc");
-
- // Replacing the handler hands the old userdata back to the SDK, but the SDK
- // defers running the free function until the next callback pump rather than
- // freeing inline — so the count does not drop until `run_callbacks`.
- client.on_status_changed(|_, _, _| {});
- assert_eq!(
- Rc::strong_count(&witness),
- 2,
- "the SDK should not have released the closure before the queue is pumped"
- );
-
- run_callbacks();
- assert_eq!(
- Rc::strong_count(&witness),
- 1,
- "pumping callbacks must release the replaced closure"
- );
-
- drop(client);
- assert_eq!(Rc::strong_count(&witness), 1);
-}
-
-/// Pins down what is actually guaranteed about log sink lifetime.
-///
-/// Teardown here is deliberately *not* asserted: the debug SDK never frees a log
-/// sink while the release SDK frees it on client drop, so asserting either one
-/// fails under the other profile. What must hold in both is that the closure
-/// stays alive for as long as the SDK might still invoke it — releasing it early
-/// would be a use-after-free — and that it is never released more than once.
-#[test]
-fn log_callbacks_stay_alive_while_registered() {
- let _guard = exclusive();
- let witness = Rc::new(RefCell::new(0u32));
- let mut client = Client::new();
-
- {
- let witness = Rc::clone(&witness);
- client.add_log_callback(LoggingSeverity::Info, move |_message, _severity| {
- *witness.borrow_mut() += 1;
- });
- }
- assert_eq!(
- Rc::strong_count(&witness),
- 2,
- "the SDK must hold the boxed closure while it is registered"
- );
-
- // Pumping while the sink is still installed must not release it.
- run_callbacks();
- assert_eq!(
- Rc::strong_count(&witness),
- 2,
- "a live log sink must survive a callback pump"
- );
-
- drop(client);
- run_callbacks();
- discord_social_sdk::reset_callbacks();
- run_callbacks();
-
- // Either 1 (release SDK freed it) or 2 (debug SDK retained it) is acceptable;
- // anything else would mean a double free or a corrupted refcount.
- let remaining = Rc::strong_count(&witness);
- assert!(
- remaining == 1 || remaining == 2,
- "unexpected refcount {remaining} after teardown"
- );
-}
-
-#[test]
-fn many_handles_can_be_created_and_dropped() {
- // A crude check that nothing accumulates per handle; a leak here shows up as
- // memory growth rather than a failed assertion, so pair it with a leak checker.
- for i in 0..1000 {
- let mut activity = Activity::new();
- activity.set_name(&format!("activity {i}"));
- activity.set_details(Some("details"));
- let _ = activity.name();
- let _ = activity.clone();
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk_sys/Cargo.toml b/vendor/discord_social_sdk/crates/discord_social_sdk_sys/Cargo.toml
deleted file mode 100644
index 378f51a..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk_sys/Cargo.toml
+++ /dev/null
@@ -1,27 +0,0 @@
-[package]
-name = "discord_social_sdk_sys"
-version.workspace = true
-edition.workspace = true
-license.workspace = true
-repository.workspace = true
-homepage.workspace = true
-documentation.workspace = true
-description = "Raw FFI bindings to the Discord Social SDK"
-readme = "README.md"
-keywords = ["discord", "sdk", "ffi", "bindings", "gamedev"]
-categories = ["external-ffi-bindings", "game-development"]
-links = "discord_partner_sdk"
-
-[build-dependencies]
-bindgen = "0.72.1"
-
-[features]
-default = []
-# Link the Krisp noise-cancellation variant of the SDK.
-krisp = []
-
-# No `[package.metadata.docs.rs]`: docs.rs cannot build this crate. It has no
-# network access and no copy of the Discord Social SDK, and the SDK's header is
-# not redistributable inside a published crate, so bindgen has no input there.
-# Documentation is built locally and published to GitHub Pages instead — see
-# scripts/publish-docs.sh.
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk_sys/README.md b/vendor/discord_social_sdk/crates/discord_social_sdk_sys/README.md
deleted file mode 100644
index 156924f..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk_sys/README.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# discord_social_sdk_sys
-
-Raw FFI bindings to the [Discord Social SDK](https://discord.com/developers/docs/discord-social-sdk/overview),
-generated with `bindgen` from `cdiscord.h`. Covers all 513 exported functions.
-
-**You probably want [`discord_social_sdk`](https://crates.io/crates/discord_social_sdk)
-instead** — the safe wrapper over this crate. Reach for this one only for surface
-the wrapper does not cover.
-
-Everything here is `unsafe`, and the C API's conventions are easy to get wrong:
-
-- **Handles** are `struct { void* opaque; }` with `_Init`/`_Drop`/`_Clone`, and
- must be dropped exactly once.
-- **Strings** are `Discord_String` (`ptr` + `size`, *not* NUL-terminated). Ones
- the SDK returns are yours to release with `Discord_Free`.
-- **Optionals** are `bool Get(self, T* out)` — `false` means absent and leaves
- `out` untouched.
-- **Everything delivered to a callback is owned**, including the `ClientResult`.
- Failing to release it leaks on every event.
-
-## Supplying the SDK
-
-This crate binds a prebuilt SDK that Discord distributes separately. It is not
-vendored here and cannot be fetched automatically. Download it from the
-[Discord Developer Portal](https://discord.com/developers/applications), then
-either place it at `<workspace>/discord_social_sdk` or point
-`DISCORD_SOCIAL_SDK_DIR` at it:
-
-```bash
-export DISCORD_SOCIAL_SDK_DIR=/absolute/path/to/discord_social_sdk
-```
-
-The directory search only works inside your own workspace. When this crate is
-built from the registry — which includes the verification step of
-`cargo publish` — it sits elsewhere, so the environment variable is required and
-must be absolute.
-
-The build script links the right library per target (Windows `.lib`/`.dll`, Linux
-`.so`, macOS `.dylib` or the `.xcframework` slice) and copies the shared library
-next to the built binary so `cargo run` and `cargo test` work unaided. The
-`krisp` feature links Discord's Krisp noise-cancellation build and stages its
-`.kef` model files.
-
-Requires `libclang` for `bindgen`.
-
-## Documentation
-
-Hosted on [GitHub Pages](https://safeshows.github.io/discord_social_sdk/), not
-docs.rs — docs.rs has no network access and no copy of the SDK, so it has nothing
-to build against.
-
-## License
-
-The bindings are MIT licensed. The Discord Social SDK binaries they link against
-are covered by Discord's own terms.
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk_sys/build.rs b/vendor/discord_social_sdk/crates/discord_social_sdk_sys/build.rs
deleted file mode 100644
index c40fe22..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk_sys/build.rs
+++ /dev/null
@@ -1,327 +0,0 @@
-use std::env;
-use std::path::{Path, PathBuf};
-
-/// Locate the SDK, or report that it is absent.
-///
-/// `DISCORD_SOCIAL_SDK_DIR` wins; otherwise walk up from the crate root looking
-/// for a directory holding `include/cdiscord.h`.
-///
-/// Absence is not automatically fatal. Generating bindings needs only the header,
-/// and a documentation build never links — see [`main`] for how those are split.
-fn find_sdk() -> Option<PathBuf> {
- if let Ok(dir) = env::var("DISCORD_SOCIAL_SDK_DIR") {
- let dir = PathBuf::from(dir);
- assert!(
- dir.join("include/cdiscord.h").exists(),
- "DISCORD_SOCIAL_SDK_DIR={} does not contain include/cdiscord.h",
- dir.display()
- );
- return Some(dir);
- }
-
- let manifest = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
- let mut cur: &Path = &manifest;
- loop {
- let candidate = cur.join("discord_social_sdk");
- if candidate.join("include/cdiscord.h").exists() {
- return Some(candidate);
- }
- cur = cur.parent()?;
- }
-}
-
-/// A copy of `cdiscord.h` checked into this crate, if one has been vendored.
-///
-/// This exists for environments that can build documentation but cannot supply
-/// the SDK — docs.rs above all, which has neither the SDK nor network access.
-/// Bindings need only the header; the libraries matter solely to linking.
-///
-/// Vendoring is opt-in and never automatic: the header is Discord's, and whether
-/// it may be redistributed inside a published crate is a licensing decision for
-/// whoever publishes. See the crate README.
-fn vendored_header() -> Option<PathBuf> {
- let path = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap())
- .join("vendor")
- .join("cdiscord.h");
- path.exists().then_some(path)
-}
-
-/// Whether this build only has to produce documentation.
-///
-/// docs.rs sets `DOCS_RS`. Nothing is linked or run in that build, so the SDK
-/// libraries are not needed — only the header, to generate the bindings that
-/// `cargo doc` type-checks against.
-fn docs_only() -> bool {
- env::var_os("DOCS_RS").is_some()
-}
-
-fn missing_sdk_panic(what: &str) -> ! {
- panic!(
- "{}",
- concat!(
- "could not find the Discord Social SDK ({what}).\n",
- "\n",
- "The SDK is a prebuilt package distributed by Discord and is not vendored ",
- "into this crate, so it must be supplied out of band. Download it from ",
- "https://discord.com/developers/applications, then either:\n",
- "\n",
- " - place it at <workspace>/discord_social_sdk, or\n",
- " - set DISCORD_SOCIAL_SDK_DIR to its absolute path.\n",
- "\n",
- "The directory search only finds the SDK inside your own workspace. When ",
- "this crate is built from the registry, or from the extracted copy that ",
- "`cargo publish` verifies, it lies outside your workspace and the search ",
- "cannot reach it, so DISCORD_SOCIAL_SDK_DIR (absolute, not relative) is ",
- "required there."
- )
- .replace("{what}", what)
- )
-}
-
-/// The SDK ships `debug` and `release` trees. Match the Cargo profile, but fall
-/// back to release when a debug tree is absent.
-fn sdk_profile(sdk: &Path) -> &'static str {
- let debug = env::var("DEBUG").map(|d| d != "false").unwrap_or(false);
- let opt_level = env::var("OPT_LEVEL").unwrap_or_else(|_| "0".into());
- if debug && opt_level == "0" && sdk.join("lib/debug").exists() {
- "debug"
- } else {
- "release"
- }
-}
-
-fn main() {
- println!("cargo:rerun-if-changed=wrapper.h");
- println!("cargo:rerun-if-changed=vendor/cdiscord.h");
- println!("cargo:rerun-if-env-changed=DISCORD_SOCIAL_SDK_DIR");
- println!("cargo:rerun-if-env-changed=DOCS_RS");
-
- let sdk = find_sdk();
-
- // Bindings need a header from somewhere; prefer the real SDK, fall back to a
- // vendored copy. Linking needs the full SDK and is skipped when only
- // documenting, which is what lets docs.rs succeed with the header alone.
- let include_dir = match (&sdk, vendored_header()) {
- (Some(sdk), _) => sdk.join("include"),
- (None, Some(header)) => header
- .parent()
- .expect("vendored header always has a parent")
- .to_path_buf(),
- (None, None) => missing_sdk_panic(if docs_only() {
- "documenting without the SDK requires a vendored header at vendor/cdiscord.h"
- } else {
- "no SDK directory and no vendored header"
- }),
- };
-
- println!(
- "cargo:rerun-if-changed={}",
- include_dir.join("cdiscord.h").display()
- );
-
- match sdk {
- Some(sdk) => {
- let profile = sdk_profile(&sdk);
- // Downstream crates and integration tests use these to stage the runtime library.
- println!("cargo:root={}", sdk.display());
- println!("cargo:profile={}", profile);
-
- if docs_only() {
- // Deliberately skip linking even though the SDK is present: a docs
- // build produces no binary to link, and emitting link flags would
- // only risk failing on a platform whose libraries are absent.
- println!("cargo:warning=DOCS_RS set; skipping link configuration");
- } else {
- let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
- emit_link_flags(&sdk, profile, &target_os);
- }
- }
- None => {
- // Header-only build. Fine for `cargo doc`; anything that links will fail
- // at link time with an unresolved-symbol error, so say so plainly now.
- assert!(
- docs_only(),
- concat!(
- "found a vendored header at vendor/cdiscord.h but no SDK.\n",
- "\n",
- "That is enough to generate bindings and build documentation, but ",
- "not enough to link. Set DISCORD_SOCIAL_SDK_DIR to an absolute SDK ",
- "path to build anything runnable."
- )
- );
- println!("cargo:warning=building documentation against the vendored header; not linking");
- }
- }
-
- generate_bindings(&include_dir);
-}
-
-fn emit_link_flags(sdk: &Path, profile: &str, target_os: &str) {
- let lib_dir = sdk.join("lib").join(profile);
- let bin_dir = sdk.join("bin").join(profile);
- let krisp = env::var("CARGO_FEATURE_KRISP").is_ok();
-
- match target_os {
- // Windows: link the import library; the DLL lives in bin/<profile> and must sit
- // next to the final executable at runtime.
- "windows" => {
- println!("cargo:rustc-link-search=native={}", lib_dir.display());
- println!("cargo:rustc-link-lib=dylib=discord_partner_sdk");
- stage_runtime_files(&bin_dir, &["discord_partner_sdk.dll"]);
- if krisp {
- stage_runtime_files(&bin_dir, &["discord_krisp.dll"]);
- stage_kef_models(&bin_dir);
- }
- }
-
- // Linux: shared object lives in lib/<profile>. $ORIGIN lets the built binary
- // find it after the .so is staged alongside it.
- "linux" | "android" => {
- println!("cargo:rustc-link-search=native={}", lib_dir.display());
- println!("cargo:rustc-link-lib=dylib=discord_partner_sdk");
- println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN");
- stage_runtime_files(&lib_dir, &["libdiscord_partner_sdk.so"]);
- if krisp {
- stage_kef_models(&lib_dir);
- }
- }
-
- // macOS/iOS: the SDK ships both a flat dylib and an .xcframework. Prefer the
- // flat dylib when present since it needs no slice selection.
- "macos" | "ios" => {
- let flat = lib_dir.join("libdiscord_partner_sdk.dylib");
- if flat.exists() {
- println!("cargo:rustc-link-search=native={}", lib_dir.display());
- stage_runtime_files(&lib_dir, &["libdiscord_partner_sdk.dylib"]);
- if krisp {
- stage_runtime_files(&lib_dir, &["libdiscord_krisp.dylib"]);
- stage_kef_models(&lib_dir);
- }
- } else {
- let fw = lib_dir.join("discord_partner_sdk.xcframework");
- let slice = xcframework_slice(&fw, target_os);
- println!("cargo:rustc-link-search=framework={}", slice.display());
- }
- println!("cargo:rustc-link-lib=dylib=discord_partner_sdk");
- println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path");
- println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path");
- }
-
- other => panic!(
- "the Discord Social SDK does not ship binaries for target_os = {other:?}. \
- Supported: windows, linux, macos, ios, android."
- ),
- }
-}
-
-/// Pick the architecture slice inside an `.xcframework` matching the build target.
-fn xcframework_slice(fw: &Path, target_os: &str) -> PathBuf {
- let arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
- let wanted_arch = match arch.as_str() {
- "aarch64" => "arm64",
- "x86_64" => "x86_64",
- other => other,
- };
- let entries = std::fs::read_dir(fw)
- .unwrap_or_else(|e| panic!("cannot read xcframework at {}: {e}", fw.display()));
-
- for entry in entries.flatten() {
- let name = entry.file_name().to_string_lossy().to_ascii_lowercase();
- let platform_ok = match target_os {
- "ios" => name.starts_with("ios-"),
- _ => name.starts_with("macos-"),
- };
- if platform_ok && name.contains(wanted_arch) {
- return entry.path();
- }
- }
- panic!(
- "no slice in {} matches target_os={target_os} arch={wanted_arch}",
- fw.display()
- );
-}
-
-/// Copy runtime artifacts next to the built binary so `cargo run`/`cargo test`
-/// work without the user manually placing shared libraries.
-fn stage_runtime_files(src_dir: &Path, files: &[&str]) {
- for out in output_dirs() {
- for file in files {
- let src = src_dir.join(file);
- if !src.exists() {
- println!("cargo:warning=missing SDK runtime file {}", src.display());
- continue;
- }
- let dst = out.join(file);
- // Copying over a loaded DLL fails; treat an existing identical file as fine.
- if let Err(e) = std::fs::copy(&src, &dst)
- && !dst.exists()
- {
- println!("cargo:warning=failed to stage {}: {e}", src.display());
- }
- }
- }
-}
-
-/// Krisp loads its `.kef` model files from the working directory at runtime.
-fn stage_kef_models(src_dir: &Path) {
- let Ok(entries) = std::fs::read_dir(src_dir) else {
- return;
- };
- let models: Vec<String> = entries
- .flatten()
- .filter(|e| e.path().extension().is_some_and(|x| x == "kef"))
- .map(|e| e.file_name().to_string_lossy().into_owned())
- .collect();
- let refs: Vec<&str> = models.iter().map(String::as_str).collect();
- stage_runtime_files(src_dir, &refs);
-}
-
-/// `OUT_DIR` is `target/<profile>/build/<pkg>-<hash>/out`; the binaries land in
-/// `target/<profile>` and `target/<profile>/deps`.
-fn output_dirs() -> Vec<PathBuf> {
- let out = PathBuf::from(env::var("OUT_DIR").unwrap());
- let Some(profile_dir) = out.ancestors().nth(3) else {
- return Vec::new();
- };
- let mut dirs = vec![profile_dir.to_path_buf()];
- let deps = profile_dir.join("deps");
- if deps.exists() {
- dirs.push(deps);
- }
- dirs
-}
-
-fn generate_bindings(include: &Path) {
- let out = PathBuf::from(env::var("OUT_DIR").unwrap()).join("bindings.rs");
-
- let bindings = bindgen::Builder::default()
- .header("wrapper.h")
- .clang_arg(format!("-I{}", include.display()))
- // Only bind the SDK's own surface, not libc types pulled in by the header.
- .allowlist_item("Discord_.*")
- .allowlist_item("DISCORD_.*")
- // `Discord_Foo_forceint = 0x7FFFFFFF` padding members exist only to fix the
- // C enum width; newtypes keep them harmless instead of becoming Rust variants
- // that make matches non-exhaustive.
- .default_enum_style(bindgen::EnumVariation::NewType {
- is_bitfield: false,
- is_global: false,
- })
- .derive_default(true)
- .derive_debug(true)
- .derive_copy(true)
- .derive_eq(true)
- .derive_hash(true)
- // Holds raw function pointers; comparing/hashing those is meaningless and
- // trips `unpredictable_function_pointer_comparisons`.
- .no_hash("Discord_Allocator")
- .no_partialeq("Discord_Allocator")
- .prepend_enum_name(false)
- .generate_comments(false)
- .layout_tests(true)
- .parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
- .generate()
- .expect("failed to generate bindings for cdiscord.h");
-
- bindings.write_to_file(&out).expect("failed to write bindings.rs");
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk_sys/src/lib.rs b/vendor/discord_social_sdk/crates/discord_social_sdk_sys/src/lib.rs
deleted file mode 100644
index 410b403..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk_sys/src/lib.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-//! Raw FFI bindings to the Discord Social SDK's C API (`cdiscord.h`).
-//!
-//! Everything here is generated by `bindgen` and is entirely unsafe. Prefer the
-//! safe wrapper in the `discord_social_sdk` crate; reach for this crate only for
-//! surface the wrapper does not yet cover.
-//!
-//! # Conventions in the underlying C API
-//!
-//! - **Handles** are `struct { void* opaque; }`. Each has `_Init`, `_Drop` and
-//! usually `_Clone`. A handle must be initialised before use and dropped
-//! exactly once.
-//! - **Strings** are [`Discord_String`] (`ptr` + `size`, *not* NUL-terminated).
-//! Strings returned from the SDK are owned by the caller and must be released
-//! with [`Discord_Free`] on their `ptr`.
-//! - **Optionals** are expressed as `bool Getter(self, T* out)` — a `false`
-//! return means "absent" and `out` is untouched. Setters take `T*` where null
-//! means "clear".
-//! - **Callbacks** always come as a `(callback, userDataFree, userData)` triple,
-//! which is exactly enough to carry a boxed Rust closure and free it.
-
-#![allow(non_upper_case_globals)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-#![allow(rustdoc::broken_intra_doc_links)]
-
-include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk_sys/tests/link.rs b/vendor/discord_social_sdk/crates/discord_social_sdk_sys/tests/link.rs
deleted file mode 100644
index d1fb009..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk_sys/tests/link.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-//! Proves the SDK actually links and its entry points are callable at runtime.
-
-use discord_social_sdk_sys::*;
-use std::mem::MaybeUninit;
-
-#[test]
-fn client_roundtrips_through_the_real_library() {
- unsafe {
- let mut client = MaybeUninit::<Discord_Client>::uninit();
- Discord_Client_Init(client.as_mut_ptr());
- let mut client = client.assume_init();
-
- Discord_Client_SetApplicationId(&mut client, 1234567890);
- assert_eq!(Discord_Client_GetApplicationId(&mut client), 1234567890);
-
- // Pumping the callback queue with nothing pending must be a no-op, not a crash.
- Discord_RunCallbacks();
-
- Discord_Client_Drop(&mut client);
- }
-}
-
-#[test]
-fn sdk_returns_owned_strings_we_can_read_and_free() {
- unsafe {
- let mut out = MaybeUninit::<Discord_String>::uninit();
- Discord_Client_GetDefaultPresenceScopes(out.as_mut_ptr());
- let s = out.assume_init();
-
- assert!(!s.ptr.is_null() && s.size > 0, "expected non-empty scopes");
- let text = std::str::from_utf8(std::slice::from_raw_parts(s.ptr, s.size))
- .expect("scopes should be valid UTF-8");
- assert!(text.contains("sdk"), "unexpected scopes: {text}");
-
- Discord_Free(s.ptr.cast());
- }
-}
diff --git a/vendor/discord_social_sdk/crates/discord_social_sdk_sys/wrapper.h b/vendor/discord_social_sdk/crates/discord_social_sdk_sys/wrapper.h
deleted file mode 100644
index e2c24dc..0000000
--- a/vendor/discord_social_sdk/crates/discord_social_sdk_sys/wrapper.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "cdiscord.h"
diff --git a/vendor/discord_social_sdk/scripts/publish-docs.sh b/vendor/discord_social_sdk/scripts/publish-docs.sh
deleted file mode 100644
index 6074e29..0000000
--- a/vendor/discord_social_sdk/scripts/publish-docs.sh
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/usr/bin/env bash
-#
-# Build the API documentation locally and publish it to the `gh-pages` branch.
-#
-# docs.rs cannot build this crate: it has no network access and no copy of the
-# Discord Social SDK, and the SDK's header is not redistributable inside the
-# published crate. So documentation is built here, where the SDK is present, and
-# pushed to GitHub Pages instead.
-#
-# ./scripts/publish-docs.sh build and stage, then print the push command
-# ./scripts/publish-docs.sh --push build, stage and push
-#
-# Pushing rewrites the whole `gh-pages` branch, so it is opt-in rather than the
-# default.
-
-set -euo pipefail
-
-BRANCH="${DOCS_BRANCH:-gh-pages}"
-REMOTE="${DOCS_REMOTE:-origin}"
-ROOT_CRATE="discord_social_sdk"
-PUSH=0
-
-for arg in "$@"; do
- case "$arg" in
- --push) PUSH=1 ;;
- -h|--help) sed -n '2,20p' "$0" | sed 's/^# \?//'; exit 0 ;;
- *) echo "unknown argument: $arg" >&2; exit 2 ;;
- esac
-done
-
-cd "$(git rev-parse --show-toplevel)"
-
-# The SDK has to be reachable, otherwise the build script cannot generate
-# bindings and there is nothing to document.
-if [ -z "${DISCORD_SOCIAL_SDK_DIR:-}" ] && [ ! -f discord_social_sdk/include/cdiscord.h ]; then
- echo "error: the Discord Social SDK was not found." >&2
- echo "Place it at ./discord_social_sdk or set DISCORD_SOCIAL_SDK_DIR." >&2
- exit 1
-fi
-
-echo "==> Building documentation"
-cargo doc --no-deps -p discord_social_sdk -p discord_social_sdk_sys
-
-# `cargo doc` writes no landing page at the root, so visiting the Pages URL would
-# otherwise 404. Redirect to the main crate.
-cat > target/doc/index.html <<HTML
-<!doctype html>
-<meta charset="utf-8">
-<title>$ROOT_CRATE</title>
-<meta http-equiv="refresh" content="0; url=$ROOT_CRATE/index.html">
-<a href="$ROOT_CRATE/index.html">Continue to the $ROOT_CRATE documentation</a>
-HTML
-
-# Tell GitHub Pages not to run the output through Jekyll, which would otherwise
-# strip the underscore-prefixed files rustdoc emits.
-touch target/doc/.nojekyll
-
-# Generated output is served verbatim, so keep git from rewriting line endings.
-# Without this, a machine with core.autocrlf=true reports every file as modified
-# on each rebuild and floods the run with warnings.
-printf '* -text\n' > target/doc/.gitattributes
-
-WORKTREE="$(mktemp -d -t ghpages-XXXXXX)"
-cleanup() {
- git worktree remove --force "$WORKTREE" >/dev/null 2>&1 || true
- rm -rf "$WORKTREE"
-}
-trap cleanup EXIT
-
-echo "==> Staging into $BRANCH"
-if git show-ref --verify --quiet "refs/heads/$BRANCH"; then
- git worktree add "$WORKTREE" "$BRANCH" >/dev/null
-elif git ls-remote --exit-code --heads "$REMOTE" "$BRANCH" >/dev/null 2>&1; then
- git fetch "$REMOTE" "$BRANCH":"$BRANCH" >/dev/null
- git worktree add "$WORKTREE" "$BRANCH" >/dev/null
-else
- # First run: start the branch with no history, since documentation is
- # regenerated wholesale and its past versions are not interesting.
- echo " (creating $BRANCH)"
- git worktree add --detach "$WORKTREE" >/dev/null
- git -C "$WORKTREE" checkout --orphan "$BRANCH" >/dev/null
- git -C "$WORKTREE" rm -rf . >/dev/null 2>&1 || true
-fi
-
-# Replace the contents wholesale so files deleted since the last build disappear.
-find "$WORKTREE" -mindepth 1 -maxdepth 1 ! -name .git -exec rm -rf {} +
-cp -r target/doc/. "$WORKTREE"/
-# Cargo's build lock is an artifact of the local build, not documentation.
-rm -f "$WORKTREE/.lock"
-
-git -C "$WORKTREE" add --all
-if git -C "$WORKTREE" diff --cached --quiet; then
- echo "==> No documentation changes"
- exit 0
-fi
-
-git -C "$WORKTREE" commit -q -m "docs: rebuild from $(git rev-parse --short HEAD)"
-echo "==> Committed to $BRANCH"
-
-if [ "$PUSH" -eq 1 ]; then
- git -C "$WORKTREE" push "$REMOTE" "$BRANCH"
- echo "==> Pushed to $REMOTE/$BRANCH"
-else
- echo
- echo "Staged but not pushed. To publish:"
- echo " git push $REMOTE $BRANCH"
- echo "Or re-run with --push."
-fi
diff --git a/apps/web/package.json b/web/client/package.json
similarity index 75%
rename from apps/web/package.json
rename to web/client/package.json
index dd5561b..86d594b 100644
--- a/apps/web/package.json
+++ b/web/client/package.json
@@ -1,5 +1,5 @@
{
- "name": "@musicapp/web",
+ "name": "@musicapp/client",
"version": "0.1.0",
"private": true,
"type": "module",
@@ -11,9 +11,6 @@
"dependencies": {
"@musicapp/shared": "workspace:*",
"@musicapp/player": "workspace:*",
- "@tauri-apps/api": "^2",
- "@tauri-apps/plugin-deep-link": "^2",
- "@tauri-apps/plugin-opener": "^2",
"music-metadata": "^11.15.0"
},
"devDependencies": {
diff --git a/apps/web/src/app.ts b/web/client/src/app.ts
similarity index 99%
rename from apps/web/src/app.ts
rename to web/client/src/app.ts
index f3c7e8e..c30c308 100644
--- a/apps/web/src/app.ts
+++ b/web/client/src/app.ts
@@ -69,7 +69,7 @@ function allowedView(v: View): View {
// --- URL routing ------------------------------------------------------------
// Every view maps to a real, hotlinkable path (the server's catch-all route
// serves index.html for any of these, so a deep link works on first load too
-// — see apps/server/src/server.ts). Kept as simple bidirectional mappers
+// — see web/server/src/server.ts). Kept as simple bidirectional mappers
// rather than a router library: the view set is small and fixed.
function viewToPath(view: View): string {
diff --git a/web/client/src/desktop.ts b/web/client/src/desktop.ts
new file mode 100644
index 0000000..13d8d4b
--- /dev/null
+++ b/web/client/src/desktop.ts
@@ -0,0 +1,175 @@
+// Everything that's different about running inside the Electron desktop shell
+// vs a plain browser tab, in one place. The web app itself never checks for
+// the shell anywhere else — it calls these functions and they no-op in the
+// browser.
+//
+// The shell (apps/desktop) exposes a single `window.dmndDesktop` bridge (see
+// its preload.ts). The window loads the live site as its own origin, so the
+// web app is same-origin with the API — no base-URL juggling like the old
+// Tauri local-bundle build needed.
+
+import {
+ configureAuthToken,
+ startNativeLogin,
+ completeNativeLogin,
+ establishSessionCookie,
+ absoluteApiUrl,
+ type Song,
+} from "@musicapp/shared";
+
+type NowPlayingPayload = {
+ title: string;
+ artist: string;
+ album: string | null;
+ durationS: number | null;
+ coverUrl: string | null;
+ positionS: number;
+ playing: boolean;
+};
+
+type DmndDesktop = {
+ setNowPlaying: (np: NowPlayingPayload) => Promise<void>;
+ clearPresence: () => Promise<void>;
+ openExternal: (url: string) => Promise<void>;
+ serverUrl: () => Promise<string>;
+ onDeepLink: (cb: (url: string) => void) => void;
+};
+
+declare global {
+ interface Window {
+ dmndDesktop?: DmndDesktop;
+ }
+}
+
+const TOKEN_KEY = "music:desktop:token";
+const VERIFIER_KEY = "music:desktop:pkceVerifier";
+const REDIRECT_URI = "doughmination://auth/callback";
+
+const bridge = typeof window !== "undefined" ? window.dmndDesktop : undefined;
+export const isDesktop = Boolean(bridge);
+
+// Call once, before the first api.* call. Web is same-origin and this is a
+// no-op there. The desktop window is also same-origin with the API, so all
+// this does is restore a previously-issued bearer token.
+export function initDesktopBridge(): void {
+ if (!isDesktop) return;
+ try {
+ const token = localStorage.getItem(TOKEN_KEY);
+ if (token) configureAuthToken(token);
+ } catch {
+ /* ignore */
+ }
+}
+
+// True once a token is stored — lets the UI skip a re-auth on boot.
+export function hasDesktopToken(): boolean {
+ try {
+ return isDesktop && Boolean(localStorage.getItem(TOKEN_KEY));
+ } catch {
+ return false;
+ }
+}
+
+// Kick off sign-in: mint PKCE, stash the verifier, and open the login page in
+// the user's *default browser* (not this window — that's the whole point).
+export async function startDesktopLogin(): Promise<void> {
+ if (!bridge) return;
+ const { url, verifier } = await startNativeLogin({ redirect: REDIRECT_URI });
+ try {
+ sessionStorage.setItem(VERIFIER_KEY, verifier);
+ } catch {
+ /* ignore */
+ }
+ await bridge.openExternal(url);
+}
+
+// Register the deep-link handler once at startup. When the browser bounces
+// back to doughmination://auth/callback?code=…, trade the code for a token,
+// persist it, and fire `onLoggedIn` so the app re-renders as signed in.
+export async function initDesktopAuth(onLoggedIn: () => void): Promise<void> {
+ if (!bridge) return;
+
+ // Restored a token this launch? Make sure the window also holds the
+ // same-origin session cookie so media (<audio>/<img>) authenticates.
+ if (hasDesktopToken()) {
+ try {
+ await establishSessionCookie();
+ } catch {
+ /* ignore — API calls still work via the bearer token */
+ }
+ }
+
+ bridge.onDeepLink(async (raw) => {
+ let code: string | null = null;
+ try {
+ code = new URL(raw).searchParams.get("code");
+ } catch {
+ /* not a URL we care about */
+ }
+ if (!code) return;
+
+ let verifier = "";
+ try {
+ verifier = sessionStorage.getItem(VERIFIER_KEY) ?? "";
+ } catch {
+ /* ignore */
+ }
+ if (!verifier) return; // no login in flight on this device
+
+ try {
+ const token = await completeNativeLogin(code, verifier);
+ try {
+ localStorage.setItem(TOKEN_KEY, token);
+ sessionStorage.removeItem(VERIFIER_KEY);
+ } catch {
+ /* ignore */
+ }
+ try {
+ await establishSessionCookie();
+ } catch {
+ /* ignore */
+ }
+ onLoggedIn();
+ } catch (err) {
+ console.error("native login exchange failed", err);
+ }
+ });
+}
+
+// Clear the stored token on logout.
+export function clearDesktopToken(): void {
+ try {
+ localStorage.removeItem(TOKEN_KEY);
+ } catch {
+ /* ignore */
+ }
+}
+
+// Forwards the currently playing track to the shell's main process, which
+// owns the Discord Rich Presence connection (see apps/desktop/src/discord.ts).
+// Fire-and-forget: presence is cosmetic and must never block playback.
+export async function syncDiscordPresence(
+ song: Song | null,
+ playback?: { playing: boolean; positionS: number },
+): Promise<void> {
+ if (!bridge) return;
+ try {
+ if (!song) {
+ await bridge.clearPresence();
+ return;
+ }
+ // Absolute URL so Discord (which fetches it server-side) can load the art.
+ const coverUrl = song.coverUrl ? absoluteApiUrl(song.coverUrl) : null;
+ await bridge.setNowPlaying({
+ title: song.title,
+ artist: song.artist,
+ album: song.album,
+ durationS: song.durationS,
+ coverUrl,
+ positionS: playback?.positionS ?? 0,
+ playing: playback?.playing ?? true,
+ });
+ } catch {
+ /* best-effort — never blocks playback */
+ }
+}
diff --git a/apps/web/src/index.html b/web/client/src/index.html
similarity index 100%
rename from apps/web/src/index.html
rename to web/client/src/index.html
diff --git a/apps/web/src/metadata.ts b/web/client/src/metadata.ts
similarity index 100%
rename from apps/web/src/metadata.ts
rename to web/client/src/metadata.ts
diff --git a/apps/web/src/native.ts b/web/client/src/native.ts
similarity index 92%
rename from apps/web/src/native.ts
rename to web/client/src/native.ts
index 14d6cd7..5f1ac91 100644
--- a/apps/web/src/native.ts
+++ b/web/client/src/native.ts
@@ -2,7 +2,7 @@
//
// When the web app runs inside apps/android, audio is played by a native
// Media3 engine and the Player already routes playback through it (see
-// packages/player/src/native-audio.ts). The one thing the audio backend can't
+// web/player/src/native-audio.ts). The one thing the audio backend can't
// do on its own is resolve "next"/"prev" pressed on the *notification / lock
// screen*, because those must run the web queue. That's wired here.
diff --git a/apps/web/src/styles.css b/web/client/src/styles.css
similarity index 100%
rename from apps/web/src/styles.css
rename to web/client/src/styles.css
diff --git a/apps/web/tsconfig.json b/web/client/tsconfig.json
similarity index 100%
rename from apps/web/tsconfig.json
rename to web/client/tsconfig.json
diff --git a/packages/player/package.json b/web/player/package.json
similarity index 100%
rename from packages/player/package.json
rename to web/player/package.json
diff --git a/packages/player/src/events.ts b/web/player/src/events.ts
similarity index 100%
rename from packages/player/src/events.ts
rename to web/player/src/events.ts
diff --git a/packages/player/src/index.ts b/web/player/src/index.ts
similarity index 100%
rename from packages/player/src/index.ts
rename to web/player/src/index.ts
diff --git a/packages/player/src/native-audio.ts b/web/player/src/native-audio.ts
similarity index 99%
rename from packages/player/src/native-audio.ts
rename to web/player/src/native-audio.ts
index 461b2c7..e9f52ad 100644
--- a/packages/player/src/native-audio.ts
+++ b/web/player/src/native-audio.ts
@@ -259,7 +259,7 @@ export class NativeAudio implements MediaEl {
// Expose the native → web callbacks. Merges rather than overwrites so the
// app-level transport handler (window.__dmndNative.onTransport, set in
-// apps/web/src/native.ts) survives, and vice-versa.
+// web/client/src/native.ts) survives, and vice-versa.
function installNativeCallbacks(a: NativeAudio): void {
const w = window as unknown as { __dmndNative?: Record<string, unknown> };
w.__dmndNative = {
diff --git a/packages/player/src/player.ts b/web/player/src/player.ts
similarity index 100%
rename from packages/player/src/player.ts
rename to web/player/src/player.ts
diff --git a/packages/player/src/storage.ts b/web/player/src/storage.ts
similarity index 100%
rename from packages/player/src/storage.ts
rename to web/player/src/storage.ts
diff --git a/packages/player/tsconfig.json b/web/player/tsconfig.json
similarity index 100%
rename from packages/player/tsconfig.json
rename to web/player/tsconfig.json
diff --git a/apps/server/package.json b/web/server/package.json
similarity index 100%
rename from apps/server/package.json
rename to web/server/package.json
diff --git a/apps/server/public/favicon.png b/web/server/public/favicon.png
similarity index 100%
rename from apps/server/public/favicon.png
rename to web/server/public/favicon.png
diff --git a/apps/server/src/auth/middleware.ts b/web/server/src/auth/middleware.ts
similarity index 100%
rename from apps/server/src/auth/middleware.ts
rename to web/server/src/auth/middleware.ts
diff --git a/apps/server/src/auth/oidc.ts b/web/server/src/auth/oidc.ts
similarity index 100%
rename from apps/server/src/auth/oidc.ts
rename to web/server/src/auth/oidc.ts
diff --git a/apps/server/src/auth/session.ts b/web/server/src/auth/session.ts
similarity index 100%
rename from apps/server/src/auth/session.ts
rename to web/server/src/auth/session.ts
diff --git a/apps/server/src/config.ts b/web/server/src/config.ts
similarity index 96%
rename from apps/server/src/config.ts
rename to web/server/src/config.ts
index 38870ad..06e7a28 100644
--- a/apps/server/src/config.ts
+++ b/web/server/src/config.ts
@@ -52,13 +52,11 @@ export const config = {
// Origins the native apps' webviews present when calling the API
// cross-origin. They authenticate with a bearer token (no cookies), so
// CORS is allowed for these without credentials. Web is same-origin and
- // unaffected. Covers Tauri (desktop) and common mobile webview schemes.
+ // unaffected — as is the Electron desktop app, which loads the site as its
+ // own origin. This list is for the Android WebView / other mobile shells.
nativeOrigins: optional(
"MUSIC_NATIVE_ORIGINS",
[
- "tauri://localhost",
- "http://tauri.localhost",
- "https://tauri.localhost",
"capacitor://localhost",
"ionic://localhost",
"http://localhost",
diff --git a/apps/server/src/db/backfill-opus.ts b/web/server/src/db/backfill-opus.ts
similarity index 98%
rename from apps/server/src/db/backfill-opus.ts
rename to web/server/src/db/backfill-opus.ts
index 33f0a64..6d45757 100644
--- a/apps/server/src/db/backfill-opus.ts
+++ b/web/server/src/db/backfill-opus.ts
@@ -5,7 +5,7 @@
//
// Run it once after deploying (ffmpeg must be on PATH):
// bun run --filter @musicapp/server backfill:opus
-// or from apps/server:
+// or from web/server:
// bun run src/db/backfill-opus.ts
import { sql, type Song } from "./index.ts";
diff --git a/apps/server/src/db/index.ts b/web/server/src/db/index.ts
similarity index 100%
rename from apps/server/src/db/index.ts
rename to web/server/src/db/index.ts
diff --git a/apps/server/src/db/migrate.ts b/web/server/src/db/migrate.ts
similarity index 100%
rename from apps/server/src/db/migrate.ts
rename to web/server/src/db/migrate.ts
diff --git a/apps/server/src/db/schema.sql b/web/server/src/db/schema.sql
similarity index 100%
rename from apps/server/src/db/schema.sql
rename to web/server/src/db/schema.sql
diff --git a/apps/server/src/lib/downloads.json b/web/server/src/lib/downloads.json
similarity index 100%
rename from apps/server/src/lib/downloads.json
rename to web/server/src/lib/downloads.json
diff --git a/apps/server/src/lib/downloads.ts b/web/server/src/lib/downloads.ts
similarity index 100%
rename from apps/server/src/lib/downloads.ts
rename to web/server/src/lib/downloads.ts
diff --git a/apps/server/src/lib/duplicates.ts b/web/server/src/lib/duplicates.ts
similarity index 100%
rename from apps/server/src/lib/duplicates.ts
rename to web/server/src/lib/duplicates.ts
diff --git a/apps/server/src/lib/lastfm.ts b/web/server/src/lib/lastfm.ts
similarity index 100%
rename from apps/server/src/lib/lastfm.ts
rename to web/server/src/lib/lastfm.ts
diff --git a/apps/server/src/lib/lyrics.ts b/web/server/src/lib/lyrics.ts
similarity index 100%
rename from apps/server/src/lib/lyrics.ts
rename to web/server/src/lib/lyrics.ts
diff --git a/apps/server/src/lib/media.ts b/web/server/src/lib/media.ts
similarity index 100%
rename from apps/server/src/lib/media.ts
rename to web/server/src/lib/media.ts
diff --git a/apps/server/src/lib/pocketid-guard.ts b/web/server/src/lib/pocketid-guard.ts
similarity index 100%
rename from apps/server/src/lib/pocketid-guard.ts
rename to web/server/src/lib/pocketid-guard.ts
diff --git a/apps/server/src/lib/ratelimit.ts b/web/server/src/lib/ratelimit.ts
similarity index 100%
rename from apps/server/src/lib/ratelimit.ts
rename to web/server/src/lib/ratelimit.ts
diff --git a/apps/server/src/lib/text.ts b/web/server/src/lib/text.ts
similarity index 100%
rename from apps/server/src/lib/text.ts
rename to web/server/src/lib/text.ts
diff --git a/apps/server/src/redis.ts b/web/server/src/redis.ts
similarity index 100%
rename from apps/server/src/redis.ts
rename to web/server/src/redis.ts
diff --git a/apps/server/src/routes/artists.ts b/web/server/src/routes/artists.ts
similarity index 100%
rename from apps/server/src/routes/artists.ts
rename to web/server/src/routes/artists.ts
diff --git a/apps/server/src/routes/auth.ts b/web/server/src/routes/auth.ts
similarity index 100%
rename from apps/server/src/routes/auth.ts
rename to web/server/src/routes/auth.ts
diff --git a/apps/server/src/routes/duplicates.ts b/web/server/src/routes/duplicates.ts
similarity index 100%
rename from apps/server/src/routes/duplicates.ts
rename to web/server/src/routes/duplicates.ts
diff --git a/apps/server/src/routes/lastfm.ts b/web/server/src/routes/lastfm.ts
similarity index 100%
rename from apps/server/src/routes/lastfm.ts
rename to web/server/src/routes/lastfm.ts
diff --git a/apps/server/src/routes/playlists.ts b/web/server/src/routes/playlists.ts
similarity index 100%
rename from apps/server/src/routes/playlists.ts
rename to web/server/src/routes/playlists.ts
diff --git a/apps/server/src/routes/songs.ts b/web/server/src/routes/songs.ts
similarity index 100%
rename from apps/server/src/routes/songs.ts
rename to web/server/src/routes/songs.ts
diff --git a/apps/server/src/server.ts b/web/server/src/server.ts
similarity index 98%
rename from apps/server/src/server.ts
rename to web/server/src/server.ts
index 958d277..a459a83 100644
--- a/apps/server/src/server.ts
+++ b/web/server/src/server.ts
@@ -79,16 +79,16 @@ app.route("/api/lastfm", lastfmRoutes);
// Resolved against this file's location (not process.cwd()) so `bun run
// src/server.ts` behaves the same whether it's launched from the repo
-// root, from apps/server, or from inside a Docker image — important now
-// that apps/web is a sibling workspace package rather than a subfolder.
+// root, from web/server, or from inside a Docker image — the web client
+// (web/client) is a sibling workspace package, not a subfolder.
// We use Bun.file() directly rather than hono/bun's serveStatic: that
// middleware's root/path resolution is documented as relative to
// process.cwd(), and path.join() silently mangles an absolute path passed
// as `path` (it strips the leading "/" instead of erroring), so it's not
// a safe fit for cwd-independent paths. Bun.file() takes an absolute path
// unambiguously and infers the content-type from the extension.
-const webDist = join(import.meta.dir, "../../web/dist");
-const webSrc = join(import.meta.dir, "../../web/src");
+const webDist = join(import.meta.dir, "../../client/dist");
+const webSrc = join(import.meta.dir, "../../client/src");
const serverPublic = join(import.meta.dir, "../public");
async function serveFile(path: string, cacheControl?: string): Promise<Response> {
diff --git a/apps/server/tsconfig.json b/web/server/tsconfig.json
similarity index 100%
rename from apps/server/tsconfig.json
rename to web/server/tsconfig.json
diff --git a/packages/shared/package.json b/web/shared/package.json
similarity index 100%
rename from packages/shared/package.json
rename to web/shared/package.json
diff --git a/packages/shared/src/api-client.ts b/web/shared/src/api-client.ts
similarity index 100%
rename from packages/shared/src/api-client.ts
rename to web/shared/src/api-client.ts
diff --git a/packages/shared/src/index.ts b/web/shared/src/index.ts
similarity index 100%
rename from packages/shared/src/index.ts
rename to web/shared/src/index.ts
diff --git a/packages/shared/src/types.ts b/web/shared/src/types.ts
similarity index 100%
rename from packages/shared/src/types.ts
rename to web/shared/src/types.ts
diff --git a/packages/shared/tsconfig.json b/web/shared/tsconfig.json
similarity index 100%
rename from packages/shared/tsconfig.json
rename to web/shared/tsconfig.json