From 4a9e471c770851ea693f76fff6e4f8b86916fc97 Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Fri, 13 Nov 2026 21:51:21 -0500 Subject: [PATCH 1/7] feat(desktop): package oTunes with custom EAC-3 Electron --- .gitea/workflows/desktop-build.yml | 84 + .gitignore | 7 + README.md | 5 + apps/desktop/README.md | 100 ++ apps/desktop/main.cjs | 303 ++++ apps/desktop/package.json | 21 + apps/desktop/runtime.gn | 5 + apps/desktop/scripts/build-runtime.mjs | 66 + apps/desktop/scripts/build-web.mjs | 68 + apps/desktop/scripts/build.test.mjs | 95 ++ apps/desktop/scripts/ci-build.mjs | 42 + apps/desktop/scripts/config.mjs | 42 + apps/desktop/scripts/package.mjs | 93 ++ apps/desktop/scripts/prune-native-images.mjs | 19 + apps/desktop/scripts/start.mjs | 12 + apps/desktop/server-config.cjs | 26 + apps/web/app/desktop/page.tsx | 11 + apps/web/app/layout.tsx | 26 +- apps/web/components/desktop-server-form.tsx | 107 ++ apps/web/lib/dolby-atmos-support.ts | 7 +- apps/web/next.config.ts | 2 + apps/web/proxy.ts | 17 +- apps/web/tsconfig.json | 4 +- package.json | 5 +- pnpm-lock.yaml | 1440 ++++++++++++++++++ 25 files changed, 2594 insertions(+), 13 deletions(-) create mode 100644 .gitea/workflows/desktop-build.yml create mode 100644 apps/desktop/README.md create mode 100644 apps/desktop/main.cjs create mode 100644 apps/desktop/package.json create mode 100644 apps/desktop/runtime.gn create mode 100644 apps/desktop/scripts/build-runtime.mjs create mode 100644 apps/desktop/scripts/build-web.mjs create mode 100644 apps/desktop/scripts/build.test.mjs create mode 100644 apps/desktop/scripts/ci-build.mjs create mode 100644 apps/desktop/scripts/config.mjs create mode 100644 apps/desktop/scripts/package.mjs create mode 100644 apps/desktop/scripts/prune-native-images.mjs create mode 100644 apps/desktop/scripts/start.mjs create mode 100644 apps/desktop/server-config.cjs create mode 100644 apps/web/app/desktop/page.tsx create mode 100644 apps/web/components/desktop-server-form.tsx diff --git a/.gitea/workflows/desktop-build.yml b/.gitea/workflows/desktop-build.yml new file mode 100644 index 0000000..a8c4826 --- /dev/null +++ b/.gitea/workflows/desktop-build.yml @@ -0,0 +1,84 @@ +name: Desktop builds + +on: + workflow_dispatch: + push: + tags: + - "v*" + +jobs: + build: + # Native host runners, not the Docker-image runner. See the desktop README. + name: Desktop ${{ matrix.target }} + runs-on: ${{ matrix.runner }} + timeout-minutes: 720 + strategy: + fail-fast: false + matrix: + include: + - target: windows-x64 + runner: desktop-windows-x64 + arch: x64 + source: ${{ vars.DESKTOP_ELECTRON_SOURCE_WINDOWS_X64 }} + - target: windows-arm64 + runner: desktop-windows-arm64 + arch: arm64 + source: ${{ vars.DESKTOP_ELECTRON_SOURCE_WINDOWS_ARM64 }} + - target: linux-x64 + runner: desktop-linux-x64 + arch: x64 + source: ${{ vars.DESKTOP_ELECTRON_SOURCE_LINUX_X64 }} + - target: linux-arm64 + runner: desktop-linux-arm64 + arch: arm64 + source: ${{ vars.DESKTOP_ELECTRON_SOURCE_LINUX_ARM64 }} + - target: macos-universal + runner: desktop-macos + arch: universal + source: ${{ vars.DESKTOP_ELECTRON_SOURCE_MACOS }} + env: + OTUNES_DESKTOP_ARCH: ${{ matrix.arch }} + OTUNES_ELECTRON_SOURCE: ${{ matrix.source }} + OTUNES_DESKTOP_REF: ${{ gitea.ref }} + DEPOT_TOOLS_WIN_TOOLCHAIN: "0" + defaults: + run: + shell: bash + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.1.0 + run_install: false + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "24" + + - name: Install desktop and web dependencies + run: pnpm --filter @otunes/desktop --filter @otunes/web... install --frozen-lockfile + + - name: Check desktop scripts + run: pnpm --filter @otunes/desktop typecheck + + - name: Test runtime validation and shared UI packaging + run: pnpm --filter @otunes/desktop test + + - name: Build custom Electron and desktop installers + run: pnpm --filter @otunes/desktop build:ci + + # Gitea's artifact service uses the v3 protocol, not GitHub's v4 service. + - name: Upload installers + uses: actions/upload-artifact@v3 + with: + name: otunes-desktop-${{ matrix.target }} + path: | + apps/desktop/dist/*.exe + apps/desktop/dist/*.flatpak + apps/desktop/dist/*.dmg + apps/desktop/dist/*.blockmap + if-no-files-found: error diff --git a/.gitignore b/.gitignore index a2c0ae6..888545e 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,10 @@ docker-compose.yml **/credentials/ **/*.ipa **/*.apk + +# Electron desktop build artifacts +apps/desktop/.package/ +apps/desktop/dist/ +apps/desktop/runtime/ +apps/web/.next-desktop/ +apps/desktop/web/ diff --git a/README.md b/README.md index ab4d1e2..a7f2670 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ This project uses [pnpm workspaces](https://pnpm.io/workspaces): | Package | Path | Description | | --- | --- | --- | | `@otunes/web` | `apps/web` | Next.js web app | +| `@otunes/desktop` | `apps/desktop` | Electron client with a custom EAC-3 runtime | | `@otunes/mobile` | `apps/mobile` | Expo React Native mobile app | | `@otunes/convex` | `packages/convex` | Shared Convex backend and client types | @@ -94,3 +95,7 @@ If Convex has to live somewhere else, set `PUBLIC_CONVEX_URL` on the container t ## Downloads Check the releases tab for the latest downloads for apps: [Releases](https://git.abunchofknowitalls.com/joshuafhiggins/otunes/releases) + +## Desktop builds + +See [the desktop build guide](apps/desktop/README.md) to compile Electron with EAC-3 support and package the web player for macOS, Windows or Linux. The UI is bundled locally, and users choose their oTunes server before signing in. Platform decoding and spatial Atmos output require separate validation. diff --git a/apps/desktop/README.md b/apps/desktop/README.md new file mode 100644 index 0000000..bcc33d3 --- /dev/null +++ b/apps/desktop/README.md @@ -0,0 +1,100 @@ +# oTunes desktop + +The desktop app bundles the web UI and runs its standalone Next.js server on loopback using Electron's Node utility process. It never loads the UI hosted on your music server. On first launch, enter the oTunes server domain, then sign in. The address is saved in the app's user data directory, not compiled into the package. + +For `music.example.com`, Convex connects to `https://convex.music.example.com`. Local hosts follow the mobile convention and use port 3210. The selected oTunes server provides streaming audio and cover art through the desktop's local gateway. Authentication routes stay local and connect to the selected Convex backend. The desktop app does not bundle Convex, FFmpeg or a music library. + +The server-entry view uses the web app's controls, colors and logos, with the system theme by default. Use **Server > Change server** to select another server. Switching servers clears the local login session and cached data. + +## Build the custom runtime + +Stock Electron does not meet this build's requirements. `runtime.gn` enables Chromium's `enable_platform_ac3_eac3_audio` with proprietary codecs and Chrome FFmpeg branding. This is a compile-time setting, not an Electron command-line switch. Electron and its embedded Chromium must be rebuilt together. + +Install the platform prerequisites and `depot_tools` described in [Electron's source build instructions](https://www.electronjs.org/docs/latest/development/build-instructions-gn). Use a dedicated build machine with enough disk space for Chromium and its dependencies. From a separate, empty source checkout directory: + +```sh +gclient config --name "src/electron" --unmanaged https://github.com/electron/electron +gclient sync --with_branch_heads --with_tags +cd src/electron +git checkout v45.3.0 +gclient sync -f --with_branch_heads --with_tags +``` + +Back in the oTunes repository: + +```sh +pnpm install +export OTUNES_ELECTRON_SOURCE=/absolute/path/to/checkout/src +pnpm build:desktop:runtime +``` + +This generates `src/out/otunes-/args.gn`, runs GN and Ninja, and extracts `dist.zip` into `apps/desktop/runtime/45.3.0--`. It writes a runtime marker recording the version, platform, architecture and codec build setting. Packaging requires that marker and never downloads stock Electron as a fallback. The marker records build provenance, not a successful decoding test. Keep it with the extracted runtime. + +Build natively for Windows and Linux. On macOS, `OTUNES_ELECTRON_ARCH=x64` or `arm64` selects the target CPU, allowing both slices to be compiled on one Mac. The scripts pin Electron 45.3.0. Update `electronVersion` in `scripts/config.mjs` and the checkout tag together when upgrading. The runtime output directory must not already exist. Move or remove a previous output before rebuilding. + +## Run and package + +```sh +export OTUNES_ELECTRON_DIST=/absolute/path/to/otunes/apps/desktop/runtime/45.3.0-darwin-arm64 +pnpm dev:desktop +# Or create an installer: +pnpm build:desktop +``` + +Both commands first build and bundle the local web UI. `pnpm --filter @otunes/desktop build:web` builds that bundle alone without needing an Electron runtime. Desktop builds use `apps/web/.next-desktop` and copy the standalone output, static assets and public assets into `apps/desktop/web`. Relative pnpm symlinks are preserved so the bundled Next.js dependencies remain resolvable. The web app's normal `.next` output is separate. On Windows, enable Developer Mode or symlink permissions before building. The build rejects absolute junctions or links outside the standalone directory because they cannot be relocated into an installer. + +The desktop gateway binds only to `127.0.0.1:47836`. A single instance owns that port. The bundled Next.js process uses a separate OS-assigned loopback port and restarts when the server selection changes. No external Node.js installation is required by the installed app. `dev:desktop` uses the packaged production UI; it does not start or connect to a web preview channel. + +`build:desktop` creates a native package in `apps/desktop/dist`: DMG on macOS, NSIS on Windows, Flatpak on Linux. The same installer can connect to different servers. Signing and macOS notarization use electron-builder's standard environment configuration and require your own credentials. The build does not publish artifacts. + +## Gitea builds + +`.gitea/workflows/desktop-build.yml` runs manually through `workflow_dispatch` and on `v*` tags, matching the Docker workflow. It builds the custom Electron runtime before each installer and uploads installers to the Actions run with `actions/upload-artifact@v3`. It does not create releases or publish to Flathub. Tags set the installer version, so use semantic version tags such as `v1.2.3`. Manual runs use the desktop package version. + +Register these **native host** Gitea runner labels with `:host` execution, not Docker execution: + +| Runner label | Native Node architecture | Repository Actions variable for the Electron `src` path | Output | +| --- | --- | --- | --- | +| `desktop-windows-x64` | x64 | `DESKTOP_ELECTRON_SOURCE_WINDOWS_X64` | x64 NSIS installer | +| `desktop-windows-arm64` | arm64 | `DESKTOP_ELECTRON_SOURCE_WINDOWS_ARM64` | ARM64 NSIS installer | +| `desktop-linux-x64` | x64 | `DESKTOP_ELECTRON_SOURCE_LINUX_X64` | x86-64 Flatpak | +| `desktop-linux-arm64` | arm64 | `DESKTOP_ELECTRON_SOURCE_LINUX_ARM64` | AArch64 Flatpak | +| `desktop-macos` | x64 or arm64 | `DESKTOP_ELECTRON_SOURCE_MACOS` | Universal DMG | + +Here x86 means x86-64, not 32-bit IA-32. The workflow installs Node.js 24 and pnpm 10.1.0. The runner and its bootstrap Node.js must themselves be native to the requested architecture. Each runner also needs Git, Bash, Electron's platform build prerequisites, `depot_tools` on PATH, and a synced Electron v45.3.0 checkout prepared as described above. The source path is an absolute path outside the disposable Actions checkout. Separate build machines or checkouts avoid concurrent source-tree builds. GN/Ninja outputs remain in that source tree for incremental rebuilds. The workflow does not update that shared checkout or run `gclient sync` automatically. + +Windows runners need Visual Studio's Electron/Chromium build components and SDK, plus Developer Mode or symlink permissions. The ARM64 runner needs the ARM64 compiler tools. Mac runners need Xcode, its command-line tools, and both macOS SDK architectures. Linux runners need a native Chromium build environment, Flatpak >= 1.12.4, flatpak-builder >= 1.2.2, and a working user session with unprivileged sandbox support. Add Flathub for the runner user before the first build: + +```sh +flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo +``` + +Flatpaks pin `org.freedesktop.Platform`, its SDK and `org.electronjs.Electron2.BaseApp` to `25.08`. Network, audio, graphics and display access are enabled. Home-directory access is not needed. Builds can install the matching runtime/SDK/BaseApp from Flathub for their architecture. + +The Universal job compiles separate x64 and ARM64 Electron distributions, validates each marker, and gives electron-builder the corresponding runtime for each slice before merging the app. The bundled UI is shared between slices. Since desktop images bypass Next's optimizer, the bundle excludes unused Sharp native libraries. Any other native library makes the build fail so a host-specific dependency cannot silently enter the Universal app. + +To reproduce the CI build on a prepared runner: + +```sh +export OTUNES_ELECTRON_SOURCE=/absolute/path/to/electron/src +export OTUNES_DESKTOP_ARCH=universal # macOS; use x64 or arm64 on other hosts +pnpm --filter @otunes/desktop build:ci +``` + +Signing/notarization credentials are not configured by this workflow. Configure electron-builder's signing environment on trusted runners if signed installers are required. Without credentials the resulting installers are unsigned, and macOS may require approval to open them. + +## EAC-3 and Atmos limits + +The build flag enables EAC-3 media handling. A platform decoder is still required. Chromium's [decoder support checks](https://chromium.googlesource.com/chromium/src/+/main/media/base/supported_types.cc) consult platform codec support on macOS and Windows. Linux does not gain a software EAC-3 decoder just by enabling this flag. Linux packaging is available, but EAC-3 playback is not promised there. + +EAC-3 decoding and spatial Dolby Atmos rendering are separate capabilities. Decoding may produce channel-based PCM without preserving Atmos object metadata. The flag does not add Dolby licensing, guarantee HDMI passthrough, or guarantee spatial output on any OS or audio device. Review codec distribution requirements before distributing a custom runtime. + +Validate on each target OS and output device before releasing: + +1. Open the desktop client against a test server with a known EAC-3 track. +2. Confirm the existing playback settings allow the Atmos preference, enable it, and play the track. The app uses browser codec detection, with no desktop override that forces support to true. +3. Confirm the stream contains EAC-3 and playback advances with audible output. MIME support alone is not a decode test. +4. Verify spatial output separately using the OS or receiver's output diagnostics. A track badge does not prove Atmos rendering. +5. Check normal AAC/lossless playback and seeking too. + +The source build is intentionally separate from app packaging because rebuilding Chromium is expensive. No custom runtime binary is checked into this repository. diff --git a/apps/desktop/main.cjs b/apps/desktop/main.cjs new file mode 100644 index 0000000..25702b6 --- /dev/null +++ b/apps/desktop/main.cjs @@ -0,0 +1,303 @@ +const { + app, + BrowserWindow, + Menu, + nativeTheme, + session, + utilityProcess, +} = require("electron") +const { createServer, request: httpRequest } = require("node:http") +const { request: httpsRequest } = require("node:https") +const { readFile, mkdir, writeFile, rename } = require("node:fs/promises") +const path = require("node:path") +const { parseServer } = require("./server-config.cjs") + +const origin = "http://127.0.0.1:47836" +let window, + gateway, + nextProcess, + config, + changingServer = false +let nextPort +const configPath = () => path.join(app.getPath("userData"), "server.json") +const webRoot = path.join( + app.isPackaged ? process.resourcesPath : __dirname, + "web", + "apps", + "web" +) + +async function startWeb() { + if (nextProcess) { + const previous = nextProcess + nextProcess = undefined + await new Promise((resolve) => { + previous.once("exit", resolve) + previous.kill() + }) + } + // Let the OS allocate a private port for the bundled Next.js server. + const reservation = createServer() + await new Promise((resolve, reject) => { + reservation.once("error", reject) + reservation.listen(0, "127.0.0.1", resolve) + }) + nextPort = reservation.address().port + await new Promise((resolve) => reservation.close(resolve)) + nextProcess = utilityProcess.fork(path.join(webRoot, "server.js"), [], { + cwd: webRoot, + env: { + ...process.env, + NODE_ENV: "production", + HOSTNAME: "127.0.0.1", + PORT: String(nextPort), + OTUNES_DESKTOP: "1", + OTUNES_DESKTOP_HOSTNAME: config?.hostname ?? "", + PUBLIC_CONVEX_URL: config?.convexUrl ?? "", + CONVEX_INTERNAL_URL: config?.convexUrl ?? "http://127.0.0.1:3210", + NEXT_PUBLIC_CONVEX_URL: config?.convexUrl ?? "", + }, + stdio: "pipe", + }) + nextProcess.stdout.on("data", (data) => console.log(data.toString())) + nextProcess.stderr.on("data", (data) => console.error(data.toString())) + let exited = false + const child = nextProcess + child.once("exit", () => { + exited = true + if (nextProcess === child) nextProcess = undefined + }) + for (let attempt = 0; attempt < 150; attempt++) { + if (exited) throw new Error("The packaged web server exited during startup") + try { + const response = await fetch(`http://127.0.0.1:${nextPort}/desktop`, { + signal: AbortSignal.timeout(1000), + }) + if (!response.ok) throw new Error("Server entry page did not load") + await response.body?.cancel() + return + } catch { + await new Promise((resolve) => setTimeout(resolve, 200)) + } + } + throw new Error("The packaged web server did not start") +} + +async function saveServer(request, response) { + if ( + request.headers.origin !== origin || + request.headers["content-type"] !== "application/json" + ) { + response.writeHead(403).end() + return + } + if (changingServer) { + response.writeHead(409).end() + return + } + changingServer = true + try { + let body = "" + for await (const chunk of request) { + body += chunk + if (body.length > 2048) throw new Error("Server address is too long.") + } + const selected = parseServer(JSON.parse(body).hostname) + // Validate against Convex before replacing the current server and session. + const check = await fetch(`${selected.convexUrl}/version`, { + signal: AbortSignal.timeout(10000), + }) + if (!check.ok) + throw new Error( + "Could not reach the Convex server. Check the address and try again." + ) + const previous = config + config = selected + try { + await startWeb() + } catch (error) { + config = previous + await startWeb() + throw error + } + await mkdir(app.getPath("userData"), { recursive: true }) + await writeFile(`${configPath()}.tmp`, JSON.stringify(selected), { + mode: 0o600, + }) + await rename(`${configPath()}.tmp`, configPath()) + if (previous?.hostname !== selected.hostname) { + await session.defaultSession.clearStorageData() + await session.defaultSession.clearCache() + } + response + .writeHead(200, { + "Content-Type": "application/json", + "Cache-Control": "no-store", + }) + .end("{}") + } catch (error) { + response.writeHead(400, { "Content-Type": "application/json" }).end( + JSON.stringify({ + error: + error instanceof TypeError + ? "Could not reach the server. Check the address and try again." + : error.message, + }) + ) + } finally { + changingServer = false + } +} + +function handleRequest(request, response) { + if (request.headers.host !== new URL(origin).host) { + response.writeHead(403).end() + return + } + const url = new URL(request.url, origin) + if (url.pathname === "/__desktop/server" && request.method === "POST") { + void saveServer(request, response) + return + } + if (changingServer) { + response.writeHead(503).end("Switching server") + return + } + // Only data routes go to the remote server. All UI and auth routes stay local. + const remote = + config && /^\/api\/(song|album|artist|playlist)\//.test(url.pathname) + const target = new URL( + `${url.pathname}${url.search}`, + remote ? config.serverUrl : `http://127.0.0.1:${nextPort}` + ) + const headers = { + ...request.headers, + host: remote ? target.host : request.headers.host, + } + if (remote) { + delete headers.origin + // Convex Auth uses __Host- cookie names on public HTTPS servers. + // Forward only the access token, never the local refresh token. + const token = request.headers.cookie + ?.split(";") + .map((part) => part.trim()) + .find((part) => part.startsWith("__convexAuthJWT=")) + ?.slice("__convexAuthJWT=".length) + delete headers.cookie + if (token) { + const prefix = /(localhost|127\.0\.0\.1):\d+/.test(target.host) + ? "" + : "__Host-" + headers.cookie = `${prefix}__convexAuthJWT=${token}` + } + } + delete headers.connection + const upstream = (target.protocol === "https:" ? httpsRequest : httpRequest)( + target, + { + method: request.method, + headers, + }, + (incoming) => { + // Never redirect the window to remote HTML or accept remote session cookies. + const resultHeaders = { ...incoming.headers } + if (remote) delete resultHeaders["set-cookie"] + response.writeHead(incoming.statusCode ?? 502, resultHeaders) + incoming.on("error", () => response.destroy()) + incoming.pipe(response) + } + ) + upstream.on("error", () => { + if (!response.headersSent) response.writeHead(502) + response.end("Server unavailable") + }) + request.on("aborted", () => upstream.destroy()) + response.on("close", () => upstream.destroy()) + request.pipe(upstream) +} + +function openWindow() { + window = new BrowserWindow({ + title: "oTunes", + width: 1280, + height: 850, + backgroundColor: nativeTheme.shouldUseDarkColors ? "#000000" : "#ffffff", + webPreferences: { + nodeIntegration: false, + contextIsolation: true, + sandbox: true, + webSecurity: true, + }, + }) + window.webContents.setWindowOpenHandler(() => ({ action: "deny" })) + const restrictNavigation = (event, target) => { + if (new URL(target).origin !== origin) event.preventDefault() + } + window.webContents.on("will-navigate", restrictNavigation) + window.webContents.on("will-redirect", restrictNavigation) + session.defaultSession.setPermissionRequestHandler( + (_contents, _permission, callback) => callback(false) + ) + session.defaultSession.setPermissionCheckHandler(() => false) + window.loadURL(`${origin}${config ? "/" : "/desktop"}`).catch(console.error) + window.on("closed", () => { + window = undefined + }) +} + +if (!app.requestSingleInstanceLock()) app.quit() +else { + app.on("second-instance", () => { + window?.show() + window?.focus() + }) + app + .whenReady() + .then(async () => { + try { + config = parseServer( + JSON.parse(await readFile(configPath(), "utf8")).hostname + ) + } catch { + config = undefined + } + await startWeb() + gateway = createServer(handleRequest) + await new Promise((resolve, reject) => { + gateway.once("error", reject) + gateway.listen(47836, "127.0.0.1", resolve) + }) + Menu.setApplicationMenu( + Menu.buildFromTemplate([ + ...(process.platform === "darwin" ? [{ role: "appMenu" }] : []), + { + label: "Server", + submenu: [ + { + label: "Change server…", + click: () => window?.loadURL(`${origin}/desktop`), + }, + ], + }, + { role: "editMenu" }, + { role: "viewMenu" }, + { role: "windowMenu" }, + ]) + ) + openWindow() + app.on("activate", () => { + if (BrowserWindow.getAllWindows().length === 0) openWindow() + }) + }) + .catch((error) => { + console.error(error) + app.quit() + }) +} +app.on("before-quit", () => { + nextProcess?.kill() + gateway?.close() +}) +app.on("window-all-closed", () => { + if (process.platform !== "darwin") app.quit() +}) diff --git a/apps/desktop/package.json b/apps/desktop/package.json new file mode 100644 index 0000000..b36ec59 --- /dev/null +++ b/apps/desktop/package.json @@ -0,0 +1,21 @@ +{ + "name": "@otunes/desktop", + "version": "0.0.1", + "private": true, + "description": "oTunes desktop client with a custom EAC-3 Electron runtime", + "author": "oTunes contributors", + "main": "main.cjs", + "scripts": { + "start": "pnpm build:web && node scripts/start.mjs", + "build": "pnpm build:web && node scripts/package.mjs", + "build:runtime": "node scripts/build-runtime.mjs", + "typecheck": "node --check main.cjs && node --check scripts/config.mjs && node --check scripts/start.mjs && node --check scripts/package.mjs && node --check scripts/build-runtime.mjs && node --check server-config.cjs && node --check scripts/build-web.mjs && node --check scripts/ci-build.mjs && node --check scripts/prune-native-images.mjs", + "build:web": "node scripts/build-web.mjs", + "build:ci": "node scripts/ci-build.mjs", + "test": "node --test scripts/build.test.mjs" + }, + "devDependencies": { + "electron-builder": "26.18.0", + "extract-zip": "2.0.1" + } +} diff --git a/apps/desktop/runtime.gn b/apps/desktop/runtime.gn new file mode 100644 index 0000000..4a8d321 --- /dev/null +++ b/apps/desktop/runtime.gn @@ -0,0 +1,5 @@ +import("//electron/build/args/release.gn") + +proprietary_codecs = true +ffmpeg_branding = "Chrome" +enable_platform_ac3_eac3_audio = true diff --git a/apps/desktop/scripts/build-runtime.mjs b/apps/desktop/scripts/build-runtime.mjs new file mode 100644 index 0000000..4da5e6e --- /dev/null +++ b/apps/desktop/scripts/build-runtime.mjs @@ -0,0 +1,66 @@ +import { execFileSync } from "node:child_process" +import { mkdir, readFile, writeFile, access } from "node:fs/promises" +import path from "node:path" +import extract from "extract-zip" +import { desktopRoot, electronVersion } from "./config.mjs" + +if (!process.env.OTUNES_ELECTRON_SOURCE) { + throw new Error( + "Set OTUNES_ELECTRON_SOURCE to a synced Electron src directory. See apps/desktop/README.md." + ) +} +const source = path.resolve(process.env.OTUNES_ELECTRON_SOURCE) +const tag = execFileSync( + "git", + ["describe", "--tags", "--exact-match", "HEAD"], + { + cwd: path.join(source, "electron"), + encoding: "utf8", + } +).trim() +if (tag !== `v${electronVersion}`) + throw new Error(`Check out and sync Electron v${electronVersion} first`) +await access(path.join(source, "media", "media_options.gni")) +const arch = process.env.OTUNES_ELECTRON_ARCH ?? process.arch +if (!["x64", "arm64"].includes(arch)) + throw new Error("Electron target must be x64 or arm64") +const outputName = `out/otunes-${arch}` +const output = path.join(source, outputName) +await mkdir(output, { recursive: true }) +await writeFile( + path.join(output, "args.gn"), + `${await readFile(path.join(desktopRoot, "runtime.gn"), "utf8")}\ntarget_cpu = "${arch}"\n` +) +for (const [command, args] of [ + ["gn", ["gen", outputName, "--fail-on-unused-args"]], + ["ninja", ["-C", outputName, "electron:electron_dist_zip"]], +]) { + execFileSync(command, args, { + cwd: source, + stdio: "inherit", + shell: process.platform === "win32", + }) +} +// Use a fresh directory so stale files cannot enter a packaged runtime. +const distribution = path.join( + desktopRoot, + "runtime", + `${electronVersion}-${process.platform}-${arch}` +) +await mkdir(path.dirname(distribution), { recursive: true }) +await mkdir(distribution) +await extract(path.join(output, "dist.zip"), { dir: distribution }) +await writeFile( + path.join(distribution, "otunes-runtime.json"), + JSON.stringify( + { + version: electronVersion, + platform: process.platform, + arch, + enable_platform_ac3_eac3_audio: true, + }, + null, + 2 + ) +) +console.log(`Custom runtime ready. Set OTUNES_ELECTRON_DIST=${distribution}`) diff --git a/apps/desktop/scripts/build-web.mjs b/apps/desktop/scripts/build-web.mjs new file mode 100644 index 0000000..4ab0f68 --- /dev/null +++ b/apps/desktop/scripts/build-web.mjs @@ -0,0 +1,68 @@ +import { execFileSync } from "node:child_process" +import { createRequire } from "node:module" +import { cp, mkdir, rm, readdir, readlink, realpath } from "node:fs/promises" +import path from "node:path" +import { pruneNativeImages } from "./prune-native-images.mjs" +import { desktopRoot } from "./config.mjs" + +const web = path.resolve(desktopRoot, "../web") +const webRequire = createRequire(path.join(web, "package.json")) +execFileSync( + process.execPath, + [webRequire.resolve("next/dist/bin/next"), "build"], + { + cwd: web, + stdio: "inherit", + env: { + ...process.env, + OTUNES_DESKTOP_BUILD: "1", + NEXT_PUBLIC_CONVEX_URL: "", + }, + } +) + +// Junction fallbacks on Windows can point back into the developer's checkout. +// Reject them rather than shipping an installer that only works on that machine. +const standalone = path.join(web, ".next-desktop/standalone") +async function checkLinks(directory) { + for (const entry of await readdir(directory, { withFileTypes: true })) { + const file = path.join(directory, entry.name) + if (entry.isSymbolicLink()) { + const target = await readlink(file) + const resolved = await realpath(file) + const relative = path.relative(standalone, resolved) + if ( + path.isAbsolute(target) || + relative === ".." || + relative.startsWith(`..${path.sep}`) || + path.isAbsolute(relative) + ) { + throw new Error( + "The standalone bundle contains a non-relocatable link. Enable symlink permissions or Windows Developer Mode and rebuild." + ) + } + } else if (entry.isDirectory()) { + await checkLinks(file) + } + } +} +await checkLinks(standalone) +const destination = path.join(desktopRoot, "web") +await rm(destination, { recursive: true, force: true }) +await cp(standalone, destination, { + recursive: true, + verbatimSymlinks: true, + filter: (file) => !path.basename(file).startsWith(".env"), +}) +const app = path.join(destination, "apps/web") +await mkdir(path.join(app, ".next-desktop"), { recursive: true }) +await cp( + path.join(web, ".next-desktop/static"), + path.join(app, ".next-desktop/static"), + { recursive: true } +) +await cp(path.join(web, "public"), path.join(app, "public"), { + recursive: true, +}) + +await pruneNativeImages(destination) diff --git a/apps/desktop/scripts/build.test.mjs b/apps/desktop/scripts/build.test.mjs new file mode 100644 index 0000000..afa3b8e --- /dev/null +++ b/apps/desktop/scripts/build.test.mjs @@ -0,0 +1,95 @@ +import { test } from "node:test" +import assert from "node:assert/strict" +import { + mkdtemp, + mkdir, + writeFile, + readFile, + rm, + access, +} from "node:fs/promises" +import os from "node:os" +import path from "node:path" +import { customRuntime, electronVersion } from "./config.mjs" +import { pruneNativeImages } from "./prune-native-images.mjs" + +async function fixture(run) { + const directory = await mkdtemp(path.join(os.tmpdir(), "otunes-build-")) + try { + await run(directory) + } finally { + await rm(directory, { recursive: true, force: true }) + } +} + +test("runtime validation uses the target architecture and requires the EAC-3 build marker", async () => { + await fixture(async (directory) => { + const arch = process.arch === "x64" ? "arm64" : "x64" + const executable = + process.platform === "darwin" + ? "Electron.app/Contents/MacOS/Electron" + : process.platform === "win32" + ? "electron.exe" + : "electron" + await mkdir(path.dirname(path.join(directory, executable)), { + recursive: true, + }) + await writeFile(path.join(directory, executable), "fixture") + const manifest = { + version: electronVersion, + platform: process.platform, + arch, + enable_platform_ac3_eac3_audio: true, + } + const marker = path.join(directory, "otunes-runtime.json") + await writeFile(marker, JSON.stringify(manifest)) + assert.equal((await customRuntime(arch, directory)).directory, directory) + await assert.rejects( + customRuntime(process.arch, directory), + /with EAC-3 enabled/ + ) + await writeFile( + marker, + JSON.stringify({ ...manifest, enable_platform_ac3_eac3_audio: false }) + ) + await assert.rejects(customRuntime(arch, directory), /with EAC-3 enabled/) + }) +}) + +test("the shared UI drops unused Sharp binaries but keeps JavaScript and package metadata", async () => { + await fixture(async (directory) => { + const lib = path.join( + directory, + "node_modules", + "@img", + "sharp-darwin-arm64", + "lib" + ) + await mkdir(lib, { recursive: true }) + for (const file of [ + "sharp.node", + "libvips.dylib", + "index.js", + "debug.node.js", + "package.json", + ]) + await writeFile(path.join(lib, file), file) + await pruneNativeImages(directory) + for (const file of ["sharp.node", "libvips.dylib"]) + await assert.rejects(access(path.join(lib, file))) + assert.equal(await readFile(path.join(lib, "index.js"), "utf8"), "index.js") + await access(path.join(lib, "debug.node.js")) + await access(path.join(lib, "package.json")) + }) +}) + +test("new native dependencies fail the shared UI build instead of shipping a host-only binary", async () => { + await fixture(async (directory) => { + await writeFile(path.join(directory, "new-dependency.node"), "fixture") + await assert.rejects( + pruneNativeImages(directory), + /Unexpected native dependency/ + ) + await access(path.join(directory, "new-dependency.node")) + }) +}) diff --git a/apps/desktop/scripts/ci-build.mjs b/apps/desktop/scripts/ci-build.mjs new file mode 100644 index 0000000..97fcc9b --- /dev/null +++ b/apps/desktop/scripts/ci-build.mjs @@ -0,0 +1,42 @@ +import { execFileSync } from "node:child_process" +import path from "node:path" +import { desktopRoot, electronVersion } from "./config.mjs" + +const target = process.env.OTUNES_DESKTOP_ARCH +if ( + !(["x64", "arm64"].includes(target) && target === process.arch) && + !(process.platform === "darwin" && target === "universal") +) { + throw new Error( + "Use a native x64/arm64 Node.js runner, or a Mac for universal builds" + ) +} +if (!process.env.OTUNES_ELECTRON_SOURCE) + throw new Error( + "Configure the runner's Electron source path. See apps/desktop/README.md." + ) +function run(script, env = {}) { + execFileSync(process.execPath, [path.join(desktopRoot, "scripts", script)], { + stdio: "inherit", + env: { ...process.env, ...env }, + }) +} +const architectures = target === "universal" ? ["x64", "arm64"] : [target] +for (const arch of architectures) + run("build-runtime.mjs", { OTUNES_ELECTRON_ARCH: arch }) +run("build-web.mjs") +const distribution = (arch) => + path.join( + desktopRoot, + "runtime", + `${electronVersion}-${process.platform}-${arch}` + ) +run( + "package.mjs", + target === "universal" + ? { + OTUNES_ELECTRON_DIST_X64: distribution("x64"), + OTUNES_ELECTRON_DIST_ARM64: distribution("arm64"), + } + : { OTUNES_ELECTRON_DIST: distribution(target) } +) diff --git a/apps/desktop/scripts/config.mjs b/apps/desktop/scripts/config.mjs new file mode 100644 index 0000000..18caddd --- /dev/null +++ b/apps/desktop/scripts/config.mjs @@ -0,0 +1,42 @@ +import { readFile, access } from "node:fs/promises" +import path from "node:path" +import { fileURLToPath } from "node:url" + +export const desktopRoot = fileURLToPath(new URL("../", import.meta.url)) +export const electronVersion = "45.3.0" + +// The build recipe writes this marker only after the custom runtime compiles. +export async function customRuntime( + arch = process.arch, + location = process.env.OTUNES_ELECTRON_DIST +) { + if (!location) { + throw new Error( + "Set OTUNES_ELECTRON_DIST to the extracted custom Electron distribution. Stock Electron is not supported." + ) + } + const directory = path.resolve(location) + const manifest = JSON.parse( + await readFile(path.join(directory, "otunes-runtime.json"), "utf8") + ) + if ( + manifest.version !== electronVersion || + manifest.platform !== process.platform || + manifest.arch !== arch || + manifest.enable_platform_ac3_eac3_audio !== true + ) { + throw new Error( + `Custom runtime must be Electron ${electronVersion} with EAC-3 enabled for ${process.platform}/${arch}` + ) + } + const executable = path.join( + directory, + process.platform === "darwin" + ? "Electron.app/Contents/MacOS/Electron" + : process.platform === "win32" + ? "electron.exe" + : "electron" + ) + await access(executable) + return { directory, executable } +} diff --git a/apps/desktop/scripts/package.mjs b/apps/desktop/scripts/package.mjs new file mode 100644 index 0000000..54b7842 --- /dev/null +++ b/apps/desktop/scripts/package.mjs @@ -0,0 +1,93 @@ +import { build, Platform, Arch } from "electron-builder" +import { mkdir, copyFile, writeFile, rm, readFile } from "node:fs/promises" +import path from "node:path" +import { customRuntime, desktopRoot, electronVersion } from "./config.mjs" + +const arch = process.env.OTUNES_DESKTOP_ARCH ?? process.arch +if ( + !["x64", "arm64", "universal"].includes(arch) || + (arch === "universal" && process.platform !== "darwin") +) { + throw new Error("Supported targets are x64, arm64 and macOS universal") +} +const runtimes = + arch === "universal" + ? { + x64: await customRuntime("x64", process.env.OTUNES_ELECTRON_DIST_X64), + arm64: await customRuntime( + "arm64", + process.env.OTUNES_ELECTRON_DIST_ARM64 + ), + } + : { [arch]: await customRuntime(arch) } +const platform = + process.platform === "darwin" + ? Platform.MAC + : process.platform === "win32" + ? Platform.WINDOWS + : Platform.LINUX +const staging = path.join(desktopRoot, ".package") +await rm(staging, { recursive: true, force: true }) +await mkdir(staging, { recursive: true }) +await copyFile( + path.join(desktopRoot, "main.cjs"), + path.join(staging, "main.cjs") +) +const pkg = JSON.parse( + await readFile(path.join(desktopRoot, "package.json"), "utf8") +) +const ref = process.env.OTUNES_DESKTOP_REF ?? "" +if (ref.startsWith("refs/tags/")) + pkg.version = ref.slice("refs/tags/".length).replace(/^v/, "") +delete pkg.devDependencies +delete pkg.scripts +await writeFile( + path.join(staging, "package.json"), + JSON.stringify(pkg, null, 2) +) +await copyFile( + path.join(desktopRoot, "server-config.cjs"), + path.join(staging, "server-config.cjs") +) + +await build({ + targets: platform.createTarget(undefined, Arch[arch]), + config: { + appId: "com.otunes.desktop", + productName: "oTunes", + electronVersion, + // Return a missing path for unexpected architectures so builder fails closed. + // Throwing inside this hook lets electron-builder fall back to stock Electron. + electronDist: ({ arch: runtimeArch }) => + runtimes[runtimeArch]?.directory ?? + path.join(desktopRoot, "runtime", `unsupported-${runtimeArch}`), + artifactName: "oTunes-${version}-${os}-${arch}.${ext}", + directories: { app: staging, output: path.join(desktopRoot, "dist") }, + files: ["main.cjs", "server-config.cjs", "package.json"], + extraResources: [ + { from: path.join(desktopRoot, "web"), to: "web", filter: ["**/*"] }, + ], + npmRebuild: false, + mac: { category: "public.app-category.music", target: ["dmg"] }, + win: { target: ["nsis"] }, + linux: { + category: "AudioVideo", + target: ["flatpak"], + icon: path.resolve(desktopRoot, "../web/public/logo.png"), + }, + flatpak: { + runtimeVersion: "25.08", + baseVersion: "25.08", + finishArgs: [ + "--socket=wayland", + "--socket=fallback-x11", + "--share=ipc", + "--device=dri", + "--socket=pulseaudio", + "--share=network", + ], + }, + publish: null, + }, + publish: "never", +}) diff --git a/apps/desktop/scripts/prune-native-images.mjs b/apps/desktop/scripts/prune-native-images.mjs new file mode 100644 index 0000000..3e444f6 --- /dev/null +++ b/apps/desktop/scripts/prune-native-images.mjs @@ -0,0 +1,19 @@ +import { readdir, rm } from "node:fs/promises" +import path from "node:path" + +// Desktop images bypass Next's optimizer. Its traced Sharp binaries are unused +// and would otherwise make the shared web bundle specific to the build host. +export async function pruneNativeImages(directory) { + for (const entry of await readdir(directory, { withFileTypes: true })) { + const file = path.join(directory, entry.name) + if (entry.isDirectory()) await pruneNativeImages(file) + else if (entry.isFile() && /\.(node|dylib|dll)$|\.so(?:\.\d+)*$/.test(entry.name)) { + if (!file.includes(`${path.sep}@img${path.sep}sharp-`)) { + throw new Error( + `Unexpected native dependency in the desktop web bundle: ${file}` + ) + } + await rm(file) + } + } +} diff --git a/apps/desktop/scripts/start.mjs b/apps/desktop/scripts/start.mjs new file mode 100644 index 0000000..c925557 --- /dev/null +++ b/apps/desktop/scripts/start.mjs @@ -0,0 +1,12 @@ +import { spawn } from "node:child_process" +import { customRuntime, desktopRoot } from "./config.mjs" + +const runtime = await customRuntime() +const child = spawn(runtime.executable, [desktopRoot], { + stdio: "inherit", + env: process.env, +}) +child.on("error", (error) => { + throw error +}) +child.on("exit", (code) => process.exit(code ?? 1)) diff --git a/apps/desktop/server-config.cjs b/apps/desktop/server-config.cjs new file mode 100644 index 0000000..34694d5 --- /dev/null +++ b/apps/desktop/server-config.cjs @@ -0,0 +1,26 @@ +// Match mobile's public-domain and local-network Convex conventions. +function parseServer(input) { + if (typeof input !== "string" || !input.trim()) + throw new Error("Enter your server address.") + const raw = input + .trim() + .replace(/^https?:\/\//i, "") + .replace(/\/+$/, "") + if (/[\s/@?#\\]/.test(raw)) + throw new Error("Enter a hostname, without a path or credentials.") + const parsed = new URL(`https://${raw}`) + const local = + parsed.hostname === "localhost" || + parsed.hostname.endsWith(".local") || + /^\d{1,3}(\.\d{1,3}){3}$/.test(parsed.hostname) + const protocol = local ? "http:" : "https:" + const hostname = parsed.host + return { + hostname, + serverUrl: `${protocol}//${hostname}`, + convexUrl: local + ? `${protocol}//${parsed.hostname}:3210` + : `${protocol}//convex.${hostname}`, + } +} +module.exports = { parseServer } diff --git a/apps/web/app/desktop/page.tsx b/apps/web/app/desktop/page.tsx new file mode 100644 index 0000000..446d2e8 --- /dev/null +++ b/apps/web/app/desktop/page.tsx @@ -0,0 +1,11 @@ +import { notFound } from "next/navigation" +import { connection } from "next/server" +import { DesktopServerForm } from "@/components/desktop-server-form" + +export default async function DesktopServerPage() { + await connection() + if (process.env.OTUNES_DESKTOP !== "1") notFound() + return ( + + ) +} diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index 27199c8..c136902 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -70,6 +70,15 @@ export default function RootLayout({ }: Readonly<{ children: React.ReactNode }>) { + const desktop = process.env.OTUNES_DESKTOP === "1" + const needsServer = desktop && !process.env.PUBLIC_CONVEX_URL + const content = ( + + {children} + + + ) + return ( - - - - {children} - - - - + {needsServer ? ( + content + ) : ( + + + {content} + + + )} ) diff --git a/apps/web/components/desktop-server-form.tsx b/apps/web/components/desktop-server-form.tsx new file mode 100644 index 0000000..bfc0142 --- /dev/null +++ b/apps/web/components/desktop-server-form.tsx @@ -0,0 +1,107 @@ +"use client" + +import { useState, type FormEvent } from "react" +import Image from "next/image" +import { Button } from "@/components/ui/button" +import { Input } from "@/components/ui/input" +import { + Field, + FieldError, + FieldGroup, + FieldLabel, +} from "@/components/ui/field" + +export function DesktopServerForm({ hostname }: { hostname: string }) { + const [address, setAddress] = useState(hostname) + const [error, setError] = useState(null) + const [submitting, setSubmitting] = useState(false) + + async function connect(event: FormEvent) { + event.preventDefault() + setError(null) + setSubmitting(true) + try { + const response = await fetch("/__desktop/server", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ hostname: address }), + }) + if (!response.ok) { + const result: { error?: string } = await response.json() + throw new Error(result.error ?? "Could not connect to the server.") + } + window.location.replace("/signin") + } catch (error) { + setError( + error instanceof Error ? error.message : "Could not save the server." + ) + setSubmitting(false) + } + } + + return ( +
+ +
+
+

+ Connect to a server +

+ + + Server address + setAddress(event.target.value)} + placeholder="music.example.com" + autoCapitalize="none" + autoCorrect="off" + spellCheck={false} + autoComplete="url" + required + disabled={submitting} + aria-invalid={!!error} + aria-describedby={error ? "server-error" : undefined} + /> + {error && ( + + {error} + + )} + + + +
+
+
+ ) +} diff --git a/apps/web/lib/dolby-atmos-support.ts b/apps/web/lib/dolby-atmos-support.ts index bc633e4..6dc4b7f 100644 --- a/apps/web/lib/dolby-atmos-support.ts +++ b/apps/web/lib/dolby-atmos-support.ts @@ -1,4 +1,4 @@ -const EC3_MIME = 'audio/x-m4a; codecs="ec-3"' +const EC3_MIMES = ['audio/mp4; codecs="ec-3"', 'audio/x-m4a; codecs="ec-3"'] const AC4_MIME = 'audio/x-m4a; codecs="ac-4"' function canPlayMime(audio: HTMLAudioElement, mime: string): boolean { @@ -6,5 +6,8 @@ function canPlayMime(audio: HTMLAudioElement, mime: string): boolean { } export function supportsDolbyAtmosPlayback(audio: HTMLAudioElement): boolean { - return canPlayMime(audio, EC3_MIME) || canPlayMime(audio, AC4_MIME) + return ( + EC3_MIMES.some((mime) => canPlayMime(audio, mime)) || + canPlayMime(audio, AC4_MIME) + ) } diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts index 384ef1a..a83c4ef 100644 --- a/apps/web/next.config.ts +++ b/apps/web/next.config.ts @@ -3,6 +3,7 @@ import type { NextConfig } from "next" const nextConfig: NextConfig = { output: "standalone", + distDir: process.env.OTUNES_DESKTOP_BUILD === "1" ? ".next-desktop" : ".next", outputFileTracingRoot: path.join(__dirname, "../../"), experimental: { // Failed navigations wait for the connection instead of reloading the @@ -15,6 +16,7 @@ const nextConfig: NextConfig = { }, }, images: { + unoptimized: process.env.OTUNES_DESKTOP_BUILD === "1", minimumCacheTTL: 60, dangerouslyAllowSVG: true, contentDispositionType: "attachment", diff --git a/apps/web/proxy.ts b/apps/web/proxy.ts index 8bf14d7..dfed5a5 100644 --- a/apps/web/proxy.ts +++ b/apps/web/proxy.ts @@ -3,6 +3,11 @@ import { createRouteMatcher, nextjsMiddlewareRedirect, } from "@convex-dev/auth/nextjs/server" +import { + NextResponse, + type NextRequest, + type NextFetchEvent, +} from "next/server" import { getConvexServerUrl } from "@/lib/convex-server" const isAuthPage = createRouteMatcher(["/signin", "/signup"]) @@ -18,7 +23,7 @@ const isPublic = createRouteMatcher([ "/playlist/:id", ]) -export default convexAuthNextjsMiddleware( +const authMiddleware = convexAuthNextjsMiddleware( async (request, { convexAuth }) => { if (isPublic(request)) { return @@ -37,6 +42,16 @@ export default convexAuthNextjsMiddleware( { convexUrl: getConvexServerUrl() } ) +export default function proxy(request: NextRequest, event: NextFetchEvent) { + if (process.env.OTUNES_DESKTOP === "1") { + if (request.nextUrl.pathname === "/desktop") return NextResponse.next() + if (!process.env.PUBLIC_CONVEX_URL) { + return NextResponse.redirect(new URL("/desktop", request.url)) + } + } + return authMiddleware(request, event) +} + export const config = { matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api|trpc)(.*)"], } diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index bca0e21..1774d4d 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -29,7 +29,9 @@ "**/*.tsx", "**/*.mts", ".next/types/**/*.ts", - ".next/dev/types/**/*.ts" + ".next/dev/types/**/*.ts", + ".next-desktop/types/**/*.ts", + ".next-desktop/dev/types/**/*.ts" ], "exclude": ["node_modules"] } diff --git a/package.json b/package.json index 2dc4e20..d259b85 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,10 @@ "start": "pnpm --filter @otunes/web start", "lint": "pnpm -r lint", "format": "prettier --write \"**/*.{ts,tsx}\"", - "typecheck": "pnpm -r typecheck" + "typecheck": "pnpm -r typecheck", + "dev:desktop": "pnpm --filter @otunes/desktop start", + "build:desktop": "pnpm --filter @otunes/desktop build", + "build:desktop:runtime": "pnpm --filter @otunes/desktop build:runtime" }, "devDependencies": { "prettier": "^3.8.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cbf6cd5..1801046 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -253,6 +253,15 @@ importers: specifier: ^0.8.0 version: 0.8.0(prettier@3.9.5) + apps/desktop: + devDependencies: + electron-builder: + specifier: 26.18.0 + version: 26.18.0(electron-builder-squirrel-windows@26.18.0)(supports-color@8.1.1) + extract-zip: + specifier: 2.0.1 + version: 2.0.1(supports-color@8.1.1) + apps/mobile: dependencies: '@convex-dev/auth': @@ -1014,6 +1023,42 @@ packages: '@dotenvx/primitives@0.8.0': resolution: {integrity: sha512-VYJy0uhFm9zTJ1TxBaW/pA8bjbOM/OttaNMwZ1RHG4JKyRG7DhSdiqD1ipQoAyoD22olUtxbP78W9xY3Wd11bg==} + '@electron/asar@3.4.1': + resolution: {integrity: sha512-i4/rNPRS84t0vSRa2HorerGRXWyF4vThfHesw0dmcWHp+cspK743UanA0suA5Q5y8kzY2y6YKrvbIUn69BCAiA==} + engines: {node: '>=10.12.0'} + hasBin: true + + '@electron/fuses@1.8.0': + resolution: {integrity: sha512-zx0EIq78WlY/lBb1uXlziZmDZI4ubcCXIMJ4uGjXzZW0nS19TjSPeXPAjzzTmKQlJUZm0SbmZhPKP7tuQ1SsEw==} + hasBin: true + + '@electron/get@3.1.0': + resolution: {integrity: sha512-F+nKc0xW+kVbBRhFzaMgPy3KwmuNTYX1fx6+FxxoSnNgwYX6LD7AKBTWkU0MQ6IBoe7dz069CNkR673sPAgkCQ==} + engines: {node: '>=14'} + + '@electron/notarize@2.5.0': + resolution: {integrity: sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A==} + engines: {node: '>= 10.0.0'} + + '@electron/osx-sign@1.3.3': + resolution: {integrity: sha512-KZ8mhXvWv2rIEgMbWZ4y33bDHyUKMXnx4M0sTyPNK/vcB81ImdeY9Ggdqy0SWbMDgmbqyQ+phgejh6V3R2QuSg==} + engines: {node: '>=12.0.0'} + hasBin: true + + '@electron/rebuild@4.2.1': + resolution: {integrity: sha512-IS4pG3BysRrCLJ8xTAfvg+IQDbiUoAzdJy2SfjcYKnLDy5DpCdjnPdhS5Zf5UMfrkB24xu0KC+TqcOxg+eG+6w==} + engines: {node: '>=22.12.0'} + hasBin: true + + '@electron/universal@2.0.3': + resolution: {integrity: sha512-Wn9sPYIVFRFl5HmwMJkARCCf7rqK/EurkfQ/rJZ14mHP3iYTjZSIOSVonEAnhWeAXwtw7zOekGRlc6yTtZ0t+g==} + engines: {node: '>=16.4'} + + '@electron/windows-sign@1.2.2': + resolution: {integrity: sha512-dfZeox66AvdPtb2lD8OsIIQh12Tp0GNCRUDfBHIKGpbmopZto2/A8nSpYYLoedPIHpqkeblZ/k8OV0Gy7PYuyQ==} + engines: {node: '>=14.14'} + hasBin: true + '@emnapi/core@1.10.0': resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} @@ -1650,6 +1695,10 @@ packages: cpu: [x64] os: [win32] + '@isaacs/fs-minipass@4.0.1': + resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==} + engines: {node: '>=18.0.0'} + '@isaacs/nonrecursive-glob-match@1.1.0': resolution: {integrity: sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==} @@ -1728,6 +1777,14 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@malept/cross-spawn-promise@2.0.0': + resolution: {integrity: sha512-1DpKU0Z5ThltBwjNySMC14g0CkbyhCaz9FkhxqNsZI6uAPJXFS8cMXlBKo26FJ8ZuW6S9GCMcR9IO5k2X5/9Fg==} + engines: {node: '>= 12.13.0'} + + '@malept/flatpak-bundler@0.4.0': + resolution: {integrity: sha512-9QOtNffcOF/c1seMCDnjckb3R9WHcG34tky+FHpNKKCW0wc/scYLwMtO+ptyGUfMW0/b/n4qRiALlaFHc9Oj7Q==} + engines: {node: '>= 10.0.0'} + '@modelcontextprotocol/sdk@1.32.2': resolution: {integrity: sha512-SWsVtH/0vULSQStoZ6xxH2K09Li8fXYTMC64ZeogCdpZ3XSi1eCPOByV1OpuJxuI3OcmHhosDWYyii07tpPsLw==} engines: {node: '>=18'} @@ -1802,6 +1859,10 @@ packages: cpu: [x64] os: [win32] + '@noble/hashes@1.8.0': + resolution: {integrity: sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==} + engines: {node: ^14.21.3 || >=16} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1891,6 +1952,21 @@ packages: '@panva/hkdf@1.2.1': resolution: {integrity: sha512-6oclG6Y3PiDFcoyk8srjLfVKyMfVCKJ27JwNPViuXziFpmdz+MZnZN/aKY0JGXgYuO/VghU0jcOAZgWXZ1Dmrw==} + '@peculiar/asn1-schema@2.11.1': + resolution: {integrity: sha512-jaU9OaCcbZUdyXx9hMETZB9xoNmxTGjOGFqd3cOwKFkpKnyKd9WxF3uqj4PvX4cyOMP9bSdHg5YyML2qtx/d/g==} + engines: {node: '>=14'} + + '@peculiar/json-schema@1.1.12': + resolution: {integrity: sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==} + engines: {node: '>=8.0.0'} + + '@peculiar/utils@2.0.3': + resolution: {integrity: sha512-+oL3HPFRIZ1St2K50lWCXiioIgSoxzz7R1J3uF6neO2yl1sgmpgY6XXJH4BdpoDkMWznQTeYF6oWNDZLCdQ4eQ==} + + '@peculiar/webcrypto@1.7.2': + resolution: {integrity: sha512-ktTSACRJ5WdpfjHjFT2EWJQQPacGv1cPCDfEbdmpAHOxdFiYqPe4lfnXGA3D8Dg9/0kHPYSvyRlgujIOVlTdvQ==} + engines: {node: '>=14.18.0'} + '@radix-ui/number@1.1.2': resolution: {integrity: sha512-ceTwaxc4I5IOi97DgCotl3pqiyRGvffcc0oOsE2dQYaJOFIDsDt4VWG6xEbg1QePv9QWausCEIppud/tJ1wNig==} @@ -2691,6 +2767,10 @@ packages: '@sinclair/typebox@0.27.10': resolution: {integrity: sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==} + '@sindresorhus/is@4.6.0': + resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} + engines: {node: '>=10'} + '@sindresorhus/merge-streams@4.0.0': resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} engines: {node: '>=18'} @@ -2704,6 +2784,10 @@ packages: '@swc/helpers@0.5.23': resolution: {integrity: sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==} + '@szmarczak/http-timer@4.0.6': + resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} + engines: {node: '>=10'} + '@tailwindcss/node@4.3.2': resolution: {integrity: sha512-yWP/sqEcBLaD8JuA6zNwxoYKr75qxTioYwlRwekj5Jr/I5GXnoJfjetH/psLUIv74cYTH2lBUEzBkinthoYcBg==} @@ -2818,6 +2902,9 @@ packages: '@tybys/wasm-util@0.10.3': resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} + '@types/cacheable-request@6.0.3': + resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} + '@types/d3-array@3.2.2': resolution: {integrity: sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==} @@ -2845,9 +2932,18 @@ packages: '@types/d3-timer@3.0.2': resolution: {integrity: sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==} + '@types/debug@4.1.13': + resolution: {integrity: sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==} + '@types/estree@1.0.9': resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + '@types/fs-extra@9.0.13': + resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} + + '@types/http-cache-semantics@4.2.0': + resolution: {integrity: sha512-L3LgimLHXtGkWikKnsPg0/VFx9OGZaC+eN1u4r+OB1XRqH3meBIAVC2zr1WdMH+RHmnRkqliQAOHNJ/E0j/e0Q==} + '@types/istanbul-lib-coverage@2.0.6': resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} @@ -2863,6 +2959,12 @@ packages: '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + '@types/keyv@3.1.4': + resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} + + '@types/ms@2.1.0': + resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} + '@types/node@16.9.1': resolution: {integrity: sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g==} @@ -2883,6 +2985,9 @@ packages: '@types/react@19.3.0': resolution: {integrity: sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==} + '@types/responselike@1.0.3': + resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} + '@types/use-sync-external-store@0.0.6': resolution: {integrity: sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==} @@ -2895,6 +3000,9 @@ packages: '@types/yargs@17.0.35': resolution: {integrity: sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==} + '@types/yauzl@2.10.3': + resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} + '@typescript-eslint/eslint-plugin@8.63.0': resolution: {integrity: sha512-rvwSgqT+DHpWdzfSzPatRLm02a0GlESt++9iy3hLCDY4BgkaLcl8LBi9Yh7XGFBpwcBE/K3024QuXWTpbz4FfQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -3155,6 +3263,10 @@ packages: resolution: {integrity: sha512-5AXjrcMClTryPe9LgZrygpB1lj7s0S9E0+W+AHaVKAVyHanafK86iPSvG5xHVSp/jC+VH1UXu0TAEmY279xH7A==} engines: {node: '>=14.6'} + abbrev@4.0.0: + resolution: {integrity: sha512-a1wflyaL0tHtJSmLSOVybYhy22vRih4eduhhrkcjgrWGnRfrZtovJ2FRjxuTtkkj47O/baf0R86QU5OuYpz8fA==} + engines: {node: ^20.17.0 || >=22.9.0} + accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} @@ -3242,6 +3354,13 @@ packages: any-base@1.1.0: resolution: {integrity: sha512-uMgjozySS8adZZYePpaWs8cxB9/kdzmpX6SgJZ+wbz1K5eYk5QMYDVJaZKhxyIHUdnnJkfR7SVgStgH7LkGUyg==} + app-builder-lib@26.18.0: + resolution: {integrity: sha512-lx+KkuCSZHcbECf4R3IAcC9VOFk0+cMUwljO63s5y8yqS1Lw0sRGmjPaWsPwP3zv3ohZYbMhUvjXeiQXXZhJXA==} + engines: {node: '>=14.0.0'} + peerDependencies: + dmg-builder: 26.18.0 + electron-builder-squirrel-windows: 26.18.0 + arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} @@ -3291,6 +3410,10 @@ packages: asap@2.0.6: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} + asn1js@3.1.0: + resolution: {integrity: sha512-HWYi1THkOqguCiO+vwj09ZkQFD2kKEsejYHAYCtX0D80WVdoDnvRc9IukXX/jeb0T9NRWJnRtqwdbHltnFjwXA==} + engines: {node: '>=12.0.0'} + ast-types-flow@0.0.8: resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} @@ -3298,10 +3421,24 @@ packages: resolution: {integrity: sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==} engines: {node: '>=4'} + async-exit-hook@2.0.1: + resolution: {integrity: sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw==} + engines: {node: '>=0.12.0'} + async-function@1.0.0: resolution: {integrity: sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==} engines: {node: '>= 0.4'} + async@3.2.6: + resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + + at-least-node@1.0.0: + resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} + engines: {node: '>= 4.0.0'} + atomically@1.7.0: resolution: {integrity: sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w==} engines: {node: '>=10.12.0'} @@ -3310,6 +3447,9 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} + aws4@1.13.2: + resolution: {integrity: sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==} + axe-core@4.12.1: resolution: {integrity: sha512-s7iGf5GaVMxEG0ENN9x+xTr7GFZCb1ZP/1uATUpCEK2X78nDB3RwbtFCo9pGAf9ru+VwoQ464DkaLEeRM08wJA==} engines: {node: '>=4'} @@ -3394,6 +3534,9 @@ packages: resolution: {integrity: sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==} engines: {node: '>=0.6'} + bluebird@3.7.2: + resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} + bmp-js@0.1.0: resolution: {integrity: sha512-vHdS19CnY3hwiNdkaqk93DvjVLfbEcI8mys4UjuWrlX1haDmroo8o4xCzh4wD6DGV6HxRCyauwhHRqMTfERtjw==} @@ -3404,6 +3547,10 @@ packages: boolbase@1.0.0: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + boolean@3.2.0: + resolution: {integrity: sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. + bplist-creator@0.1.0: resolution: {integrity: sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg==} @@ -3418,6 +3565,9 @@ packages: brace-expansion@1.1.22: resolution: {integrity: sha512-CKLDTuSsN0+r1ThM0WkzzBI7dnPI6xEGfa/JnVYIK9JNBA1N1NyPwXVHor//NKD/y3sDxp764sZdLhFK7pH8XQ==} + brace-expansion@2.1.8: + resolution: {integrity: sha512-BnlDzDYQoplTsZSvPi86CNzmbcb07X8ufR8fk1zivaiEJlXJkiq1MQyDCVmlWcsWbj6aWXqHnrwwevbrm/Saig==} + brace-expansion@5.0.13: resolution: {integrity: sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==} engines: {node: 20 || >=22} @@ -3434,12 +3584,23 @@ packages: bser@2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} + buffer-crc32@0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + builder-util-runtime@9.7.0: + resolution: {integrity: sha512-g/kR520giAFYkSXTzcmF3kqQq7wi8F6N6SzeDgZrqTBN+VHdmgWOyTdD1yD7AATDId/yXLvuP34CxW46/BwCdw==} + engines: {node: '>=12.0.0'} + + builder-util@26.16.0: + resolution: {integrity: sha512-RLyJhB7Si3YkzKR9ubQslWuXW3Vhs3CGe1i+SeixBZ0qTd1mk3XBmssvY22TlB6CS5blyko8Gu1JzpYk8UkYAg==} + engines: {node: '>=14.0.0'} + bundle-name@4.1.0: resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} engines: {node: '>=18'} @@ -3448,6 +3609,18 @@ packages: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} + bytestreamjs@2.0.1: + resolution: {integrity: sha512-U1Z/ob71V/bXfVABvNr/Kumf5VyeQRBEm6Txb0PQ6S7V5GpBM3w4Cbqz/xPDicR5tN0uvDifng8C+5qECeGwyQ==} + engines: {node: '>=6.0.0'} + + cacheable-lookup@5.0.4: + resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} + engines: {node: '>=10.6.0'} + + cacheable-request@7.0.4: + resolution: {integrity: sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==} + engines: {node: '>=8'} + call-bind-apply-helpers@1.0.2: resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} engines: {node: '>= 0.4'} @@ -3486,10 +3659,25 @@ packages: resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + chownr@3.0.0: + resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==} + engines: {node: '>=18'} + + chromium-pickle-js@0.2.0: + resolution: {integrity: sha512-1R5Fho+jBq0DDydt+/vHWj5KJNJCKdARKOCwZUen84I5BreWoLqRLANH1U87eJy1tiASPtMnGqJJq0ZsLoRPOw==} + ci-info@3.9.0: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} + ci-info@4.3.1: + resolution: {integrity: sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==} + engines: {node: '>=8'} + + ci-info@4.5.0: + resolution: {integrity: sha512-d1uM8k5UZEyPza1n/MG3ko8nKupKN0KJpFsipgPcgaCCvV+IqIfJ+NzTjetlLM+UcXZx3+cLrNr76+eAO7G1Mw==} + engines: {node: '>=8'} + class-variance-authority@0.7.1: resolution: {integrity: sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg==} @@ -3512,6 +3700,9 @@ packages: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} + clone-response@1.0.3: + resolution: {integrity: sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==} + clone@1.0.4: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} @@ -3549,6 +3740,10 @@ packages: resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} engines: {node: '>=12.5.0'} + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + commander@11.1.0: resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} engines: {node: '>=16'} @@ -3564,10 +3759,22 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + commander@5.1.0: + resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==} + engines: {node: '>= 6'} + commander@7.2.0: resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} engines: {node: '>= 10'} + commander@9.5.0: + resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} + engines: {node: ^12.20.0 || >=14} + + compare-version@0.1.2: + resolution: {integrity: sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A==} + engines: {node: '>=0.10.0'} + compressible@2.0.18: resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==} engines: {node: '>= 0.6'} @@ -3640,6 +3847,9 @@ packages: core-js-compat@3.49.0: resolution: {integrity: sha512-VQXt1jr9cBz03b331DFDCCP90b3fanciLkgiOoy8SBHy06gNf+vQ1A3WFLqG7I8TipYIKeYK9wxd0tUrvHcOZA==} + core-util-is@1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + cors@2.8.6: resolution: {integrity: sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==} engines: {node: '>= 0.10'} @@ -3653,6 +3863,9 @@ packages: typescript: optional: true + cross-dirname@0.1.0: + resolution: {integrity: sha512-+R08/oI0nl3vfPcqftZRpytksBXDzOUveBq/NBVx0sUp1axwzPQrKinNx5yd5sxPu8j1wIy8AfnVQ+5eFdha6Q==} + cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} @@ -3765,6 +3978,10 @@ packages: decimal.js-light@2.5.1: resolution: {integrity: sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==} + decompress-response@6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} + dedent@1.7.2: resolution: {integrity: sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==} peerDependencies: @@ -3791,6 +4008,10 @@ packages: defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + defer-to-connect@2.0.1: + resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} + engines: {node: '>=10'} + define-data-property@1.1.4: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} @@ -3807,6 +4028,10 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} @@ -3822,10 +4047,19 @@ packages: detect-node-es@1.1.0: resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} + detect-node@2.1.0: + resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} + diff@8.0.4: resolution: {integrity: sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw==} engines: {node: '>=0.3.1'} + dir-compare@4.2.0: + resolution: {integrity: sha512-2xMCmOoMrdQIPHdsTawECdNPwlVFB9zGcz3kuhmBO6U3oU+UQjsue0i8ayLKpgBcm+hcXPMVSGUN9d+pvJ6+VQ==} + + dmg-builder@26.18.0: + resolution: {integrity: sha512-ozCGC54wi2C1RkS2v69y9lQxvoQ1Coh+iT8CmWiyY8y1ZuOKVvuNson2Hd+HEOs9+EZNNsOBbzKgQZ4SNqWd0w==} + dnssd-advertise@1.1.6: resolution: {integrity: sha512-Ndrrf6BMPalkQPd/zubL+4YghH2J9NspapQ09uDXwYbvOPkP0oaqf5CkcwJ0b50kS2O3ul6yVu+jz+RY62Cejg==} @@ -3850,6 +4084,14 @@ packages: resolution: {integrity: sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==} engines: {node: '>=10'} + dotenv-expand@11.0.7: + resolution: {integrity: sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==} + engines: {node: '>=12'} + + dotenv@16.6.1: + resolution: {integrity: sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==} + engines: {node: '>=12'} + dotenv@17.4.2: resolution: {integrity: sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==} engines: {node: '>=12'} @@ -3858,12 +4100,35 @@ packages: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} + duplexer2@0.1.4: + resolution: {integrity: sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==} + ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + ejs@3.1.10: + resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} + engines: {node: '>=0.10.0'} + hasBin: true + + electron-builder-squirrel-windows@26.18.0: + resolution: {integrity: sha512-a2elgTipboXNIsxqS1HOmHMGp4Pd3LJgIZOdIFTOskBSawvxKyZWYWQ1d7KKA4CtINSchYCYEKzhxRqiKZev9Q==} + + electron-builder@26.18.0: + resolution: {integrity: sha512-ASgIuQnOq4RuD8jMhS9hI0LS3EMRT1I/M5R6utqifB/BHN80IcCjBdt+DED+NmNPvmBgEtrlExXZitNdA7kXOg==} + engines: {node: '>=14.0.0'} + hasBin: true + + electron-publish@26.18.0: + resolution: {integrity: sha512-MagnqaZSALSWjcdKu5HEVhYUZD/2BDL3q7XzrqWwub6gf/UfD3ItMgmthVDv9w5y9E0gH1C3JWqKaXwf6f4ROg==} + electron-to-chromium@1.5.490: resolution: {integrity: sha512-I0dPyEsiaYAlbGJlr0SdRRGSWk9BpOz8AIo/4f93A6bAGuN3YafmT71rpss72SA05isaAkcAOYcW0F0H48om4Q==} + electron-winstaller@5.4.0: + resolution: {integrity: sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==} + engines: {node: '>=8.0.0'} + embla-carousel-react@8.6.0: resolution: {integrity: sha512-0/PjqU7geVmo6F734pmPqpyHqiM99olvyecY7zdweCw+6tKEXnrE90pBiBbMMU8s5tICemzpQ3hi5EpxzGW+JA==} peerDependencies: @@ -3894,6 +4159,9 @@ packages: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} engines: {node: '>= 0.8'} + end-of-stream@1.4.5: + resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==} + enhanced-resolve@5.21.6: resolution: {integrity: sha512-aNnGCvbJ/RIyWo1IuhNdVjnNF+EjH9wpzpNHt+ci/m9He9LJvUN8wrCcXjp9cWsGNAuvSpVFTx/vraAFQ8qGjQ==} engines: {node: '>=10.13.0'} @@ -3910,6 +4178,9 @@ packages: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} + err-code@2.0.3: + resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} + error-ex@1.3.4: resolution: {integrity: sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==} @@ -3955,6 +4226,9 @@ packages: es-toolkit@1.49.0: resolution: {integrity: sha512-G5iZ6Pc/FNRY/soKZHC+TxGDD83rHUDXxzaWhGCX44vAv/tMs56WMusnm/KMNK+luUPsgA9U28cGr4RDlSzL2g==} + es6-error@4.1.1: + resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==} + esbuild@0.27.0: resolution: {integrity: sha512-jd0f4NHbD6cALCyGElNpGAOtWxSq46l9X/sWB0Nzd5er4Kz2YTm+Vl0qKFT9KUJvD8+fiO8AvoHhFvEatfVixA==} engines: {node: '>=18'} @@ -4421,6 +4695,11 @@ packages: resolution: {integrity: sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==} engines: {node: '>= 18'} + extract-zip@2.0.1: + resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} + engines: {node: '>= 10.17.0'} + hasBin: true + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -4452,6 +4731,9 @@ packages: fb-watchman@2.0.2: resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + fd-slicer@1.1.0: + resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} @@ -4476,6 +4758,9 @@ packages: resolution: {integrity: sha512-Ievi/yy8DS3ygGvT47PjSfdFoX+2isQueoYP1cntFW1JLYAuS4GD7NUPGg4zv2iZfV52uDyk5w5Z0TdpRS6Q1g==} engines: {node: '>=20'} + filelist@1.0.6: + resolution: {integrity: sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA==} + fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -4526,6 +4811,10 @@ packages: resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} engines: {node: '>= 0.4'} + form-data@4.0.6: + resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} + engines: {node: '>= 6'} + forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -4538,10 +4827,33 @@ packages: resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} engines: {node: '>= 0.8'} + fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} + + fs-extra@11.3.1: + resolution: {integrity: sha512-eXvGGwZ5CL17ZSwHWd3bbgk7UUpF6IFHtP57NYYakPvHOs8GDgDe5KJI36jIJzDkJ6eJjuzRA8eBQb6SkKue0g==} + engines: {node: '>=14.14'} + fs-extra@11.3.6: resolution: {integrity: sha512-w8ZNZr2mKIc7qeNaQ9AVPT1+iFaI+Avd4xudVOvdDJ8VytREi1Ft5Ih7hd9jjehod8vAM5GMsfQ/TpPf4EyoEA==} engines: {node: '>=14.14'} + fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + + fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + + fs-extra@9.1.0: + resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} + engines: {node: '>=10'} + + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} @@ -4587,6 +4899,10 @@ packages: resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} + get-stream@5.2.0: + resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} + engines: {node: '>=8'} + get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -4621,6 +4937,14 @@ packages: resolution: {integrity: sha512-OwXjVP2svY5EyLY75Vek96C8qK43gqrt4xsZ+qSILdnaEiJPXkd62mcfUSNx/TQErQRdu5uM5kF67sfONragKw==} engines: {node: 18 || 20 || >=22} + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + + global-agent@3.0.0: + resolution: {integrity: sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==} + engines: {node: '>=10.0'} + globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} @@ -4637,6 +4961,10 @@ packages: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} + got@11.8.6: + resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==} + engines: {node: '>=10.19.0'} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -4693,14 +5021,29 @@ packages: resolution: {integrity: sha512-KmXvQAXwcAHV+muzbIwoJ23niEB5nMoDVr9WcRkU8mvjUECm/1+7v4Jgp7P7a+H6MLFrh+vXrGonGrGS+RQfkA==} engines: {node: '>=16.9.0'} + hosted-git-info@4.1.0: + resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} + engines: {node: '>=10'} + hosted-git-info@7.0.2: resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==} engines: {node: ^16.14.0 || >=18.0.0} + http-cache-semantics@4.3.0: + resolution: {integrity: sha512-M5t5LlJpS1UHMjvwRQVdFHvPISGeLAxNcrWuJkeGh0KxsqCHZ1O3NXZU/8x7cD0BDcGW8kapxMKTvwlqrNkHkA==} + http-errors@2.0.1: resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} engines: {node: '>= 0.8'} + http-proxy-agent@7.0.2: + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} + + http2-wrapper@1.0.3: + resolution: {integrity: sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==} + engines: {node: '>=10.19.0'} + https-proxy-agent@7.0.6: resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} engines: {node: '>= 14'} @@ -4742,6 +5085,10 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -4961,9 +5308,20 @@ packages: resolution: {integrity: sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==} engines: {node: '>=16'} + isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + isbinaryfile@4.0.10: + resolution: {integrity: sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==} + engines: {node: '>= 8.0.0'} + + isbinaryfile@5.0.7: + resolution: {integrity: sha512-gnWD14Jh3FzS3CPhF0AxNOJ8CxqeblPTADzI38r0wt8ZyQl5edpy75myt08EG2oKvpyiqSqsx+Wkz9vtkbTqYQ==} + engines: {node: '>= 18.0.0'} + isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -4971,6 +5329,10 @@ packages: resolution: {integrity: sha512-6B3tLtFqtQS4ekarvLVMZ+X+VlvQekbe4taUkf/rhVO3d/h0M2rfARm/pXLcPEsjjMsFgrFgSrhQIxcSVrBz8w==} engines: {node: '>=18'} + isexe@4.0.0: + resolution: {integrity: sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw==} + engines: {node: '>=20'} + isomorphic-fetch@3.0.0: resolution: {integrity: sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==} @@ -4978,6 +5340,11 @@ packages: resolution: {integrity: sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==} engines: {node: '>= 0.4'} + jake@10.9.4: + resolution: {integrity: sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==} + engines: {node: '>=10'} + hasBin: true + jest-get-type@29.6.3: resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -5046,6 +5413,9 @@ packages: json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json-stringify-safe@5.0.1: + resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} + json5@1.0.2: resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} hasBin: true @@ -5055,6 +5425,9 @@ packages: engines: {node: '>=6'} hasBin: true + jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + jsonfile@6.2.1: resolution: {integrity: sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==} @@ -5088,6 +5461,9 @@ packages: resolution: {integrity: sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==} engines: {node: '>=0.10'} + lazy-val@1.0.5: + resolution: {integrity: sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==} + leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} @@ -5190,6 +5566,9 @@ packages: lodash.throttle@4.1.1: resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==} + lodash@4.18.1: + resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} + log-symbols@2.2.0: resolution: {integrity: sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==} engines: {node: '>=4'} @@ -5202,6 +5581,10 @@ packages: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true + lowercase-keys@2.0.0: + resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} + engines: {node: '>=8'} + lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} @@ -5212,6 +5595,10 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + lucia@3.2.2: resolution: {integrity: sha512-P1FlFBGCMPMXu+EGdVD9W4Mjm0DqsusmKgO7Xc33mI5X1bklmsQb0hfzPhXomQr9waWIBDsiOjvr1e6BTaUqpA==} deprecated: This package has been deprecated. Please see https://lucia-auth.com/lucia-v3/migrate. @@ -5227,6 +5614,10 @@ packages: makeerror@1.0.12: resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} + matcher@3.0.0: + resolution: {integrity: sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==} + engines: {node: '>=10'} + math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} @@ -5343,6 +5734,11 @@ packages: engines: {node: '>=4'} hasBin: true + mime@2.6.0: + resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} + engines: {node: '>=4.0.0'} + hasBin: true + mimic-fn@1.2.0: resolution: {integrity: sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==} engines: {node: '>=4'} @@ -5359,6 +5755,14 @@ packages: resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} engines: {node: '>=18'} + mimic-response@1.0.1: + resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} + engines: {node: '>=4'} + + mimic-response@3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + minimatch@11.0.9: resolution: {integrity: sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q==} engines: {node: 20 || >=22} @@ -5366,6 +5770,10 @@ packages: minimatch@3.1.5: resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + minimatch@5.1.9: + resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==} + engines: {node: '>=10'} + minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -5373,6 +5781,14 @@ packages: resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} engines: {node: '>=16 || 14 >=14.17'} + minizlib@3.1.0: + resolution: {integrity: sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==} + engines: {node: '>= 18'} + + mkdirp@0.5.6: + resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true + ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} @@ -5438,6 +5854,13 @@ packages: sass: optional: true + node-abi@4.40.0: + resolution: {integrity: sha512-GuvqvtrOk+AC27RidBxBsMzVNkwNl7PjHgc4NXbmdvSVLgIUjpaqcG1FjNRYnt2Yn9Ytq+Ln37XsBaglUcte/w==} + engines: {node: '>=22.12.0'} + + node-api-version@0.2.1: + resolution: {integrity: sha512-2xP/IGGMmmSQpI1+O/k72jF/ykvZ89JeuKX3TLJAYPDVLUalrshrLHkeVcCCZqG/eEa635cr8IBYzgnDvM2O8Q==} + node-exports-info@1.6.2: resolution: {integrity: sha512-kXs9Go0cah0qHVV2v389IXQLdLCeE1xfFtjOAF+iobu0OIoG1pje8At2vMHyaPMiPMnG/LWP50twML21eMcAag==} engines: {node: '>= 0.4'} @@ -5455,6 +5878,11 @@ packages: resolution: {integrity: sha512-P6wzfh6t70avmV8FrVEAd/36sOPJQ+hkaJVX1Laap9J/77m7M0eyozDvc8SwnDf4P7MP94gwbAAo0rg3YVXT+g==} engines: {node: '>= 6.13.0'} + node-gyp@12.4.0: + resolution: {integrity: sha512-OMcPNvqTCFUnNaBlmdgq+lfNqY7gTiSmNRDjY3uAXRyudeKZEZxu3CLtjMQrx4zZxCX2b/mpNqTtwuCJgXhHkw==} + engines: {node: ^20.17.0 || >=22.9.0} + hasBin: true + node-int64@0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} @@ -5465,6 +5893,15 @@ packages: node-vibrant@4.0.4: resolution: {integrity: sha512-hA/pUXBE9TJ41G9FlTkzeqD5JdxgvvPGYZb/HNpdkaxxXUEnP36imSolZ644JuPun+lTd+FpWWtBpTYdp2noQA==} + nopt@9.0.0: + resolution: {integrity: sha512-Zhq3a+yFKrYwSBluL4H9XP3m3y5uvQkB/09CwDruCiRmR/UJYnn9W4R48ry0uGC70aeTPKLynBtscP9efFFcPw==} + engines: {node: ^20.17.0 || >=22.9.0} + hasBin: true + + normalize-url@6.1.0: + resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} + engines: {node: '>=10'} + noxcturnal@0.1.8: resolution: {integrity: sha512-oeyzgpWW2rnWFEdmXpRRBMLqwEfAhoypOBwaU5/BS3iizvmg8Hld+kxONLxifyHi2NJ1v6de2skIifN5mNzIVw==} engines: {node: '>=18'} @@ -5584,6 +6021,10 @@ packages: resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} engines: {node: '>= 0.4'} + p-cancelable@2.1.1: + resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} + engines: {node: '>=8'} + p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -5638,6 +6079,10 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -5659,6 +6104,13 @@ packages: path-to-regexp@8.4.2: resolution: {integrity: sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==} + pe-library@0.4.1: + resolution: {integrity: sha512-eRWB5LBz7PpDu4PUlwT0PhnQfTQJlDDdPa35urV4Osrm0t0AqQFGn+UIkU3klZvwJ8KPO3VbBFsXquA6p6kqZw==} + engines: {node: '>=12', npm: '>=6'} + + pend@1.2.0: + resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -5682,6 +6134,14 @@ packages: resolution: {integrity: sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==} engines: {node: '>=8'} + pkijs@3.4.3: + resolution: {integrity: sha512-V9kOzaItwDgqlryhXysQsAXUEKi5O7kqWUaP3dXI7MLvkPqWWMb4wVb1QAtmEDCKI+XIAINsZoNKMFF7sZb1eg==} + engines: {node: '>=16.0.0'} + + plist@3.1.0: + resolution: {integrity: sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==} + engines: {node: '>=10.4.0'} + plist@3.1.1: resolution: {integrity: sha512-ZIfcLJC+7E7FBFnDxm9MPmt7D+DidyQ26lewieO75AdhA2ayMtsJSES0iWzqJQbcVRSrTufQoy0DR94xHue0oA==} engines: {node: '>=10.4.0'} @@ -5706,6 +6166,11 @@ packages: resolution: {integrity: sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg==} engines: {node: ^10 || ^12 || >=14} + postject@1.0.0-alpha.6: + resolution: {integrity: sha512-b9Eb8h2eVqNE8edvKdwqkrY6O7kAwmI8kcnBv1NScolYJbo59XUF0noFq+lxbC1yN20bmC0WBEbDC5H/7ASb0A==} + engines: {node: '>=14.0.0'} + hasBin: true + powershell-utils@0.1.0: resolution: {integrity: sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==} engines: {node: '>=20'} @@ -5794,10 +6259,21 @@ packages: resolution: {integrity: sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + proc-log@6.1.0: + resolution: {integrity: sha512-iG+GYldRf2BQ0UDUAd6JQ/RwzaQy6mXmsk/IzlYyal4A4SNFw54MeH4/tLkF4I5WoWG9SQwuqWzS99jaFQHBuQ==} + engines: {node: ^20.17.0 || >=22.9.0} + + process-nextick-args@2.0.1: + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + progress@2.0.3: resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} engines: {node: '>=0.4.0'} + promise-retry@2.0.1: + resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} + engines: {node: '>=10'} + promise@8.3.0: resolution: {integrity: sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==} @@ -5808,14 +6284,27 @@ packages: prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + proper-lockfile@4.1.2: + resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==} + proxy-addr@2.0.8: resolution: {integrity: sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==} engines: {node: '>= 0.10'} + pump@3.0.4: + resolution: {integrity: sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + pvtsutils@1.3.6: + resolution: {integrity: sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==} + + pvutils@1.2.0: + resolution: {integrity: sha512-BbubeCEyTuQjVMakvJQ/Sxbc93F2pwmbsxONT/ZRrwU7Ua38d8unYTwXpTVLAKJ4BDuH9IGztCjQcd/N/39Dvg==} + engines: {node: '>=16.0.0'} + qs@6.17.1: resolution: {integrity: sha512-jd3COkaKVgGUW+ZHyEHCG9bH7RoaaiWuMgzsIBjUMVjLAaWGWpoUAVwljVvBHxRu/2qEHnadLGZrkutYUBPQJA==} engines: {node: '>=0.6'} @@ -5823,6 +6312,10 @@ packages: queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + quick-lru@5.1.1: + resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} + engines: {node: '>=10'} + radix-ui@1.6.2: resolution: {integrity: sha512-OwYUjzMwiInCUxgAWpPsavXC3Kh4iyi/49uU1/qZTG3RQDlvegyk1GOMiGvSkjua1RDb3JD3fo3eroL9FV4GQw==} peerDependencies: @@ -6020,6 +6513,13 @@ packages: resolution: {integrity: sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==} engines: {node: '>=0.10.0'} + read-binary-file-arch@1.0.6: + resolution: {integrity: sha512-BNg9EN3DD3GsDXX7Aa8O4p92sryjkmzYYgmgTAc6CA4uGLEDzFfxOxugu21akOxpcXHiEgsYkC6nPsQvLLLmEg==} + hasBin: true + + readable-stream@2.3.8: + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + recast@0.23.12: resolution: {integrity: sha512-dEWRjcINDu/F4l2dYx57ugBtD7HV9KXESyxhzw/MqWLeglJrsjJKqACPyUPg+6AF8mIgm+Zi0dZ3ACoIg+QtpA==} engines: {node: '>= 4'} @@ -6077,9 +6577,16 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} + resedit@1.7.2: + resolution: {integrity: sha512-vHjcY2MlAITJhC0eRD/Vv8Vlgmu9Sd3LX9zZvtGzU5ZImdTN3+d6e/4mnTyV8vEbyf1sgNIrWxhWlrys52OkEA==} + engines: {node: '>=12', npm: '>=6'} + reselect@5.2.0: resolution: {integrity: sha512-AgZ3UOZm3YndfrJ4OYjgrT7bmCm/1iqkjvEfH/oYjzh6PD2qw4QuT3jjnXIrpdt4MTpMXclMT3lXbmRY+XRakw==} + resolve-alpn@1.2.1: + resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} + resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -6104,6 +6611,9 @@ packages: engines: {node: '>= 0.4'} hasBin: true + responselike@2.0.1: + resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} + restore-cursor@2.0.0: resolution: {integrity: sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==} engines: {node: '>=4'} @@ -6112,10 +6622,23 @@ packages: resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} engines: {node: '>=18'} + retry@0.12.0: + resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} + engines: {node: '>= 4'} + reusify@1.1.0: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + rimraf@2.6.3: + resolution: {integrity: sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + + roarr@2.15.4: + resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==} + engines: {node: '>=8.0'} + router@2.2.0: resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} engines: {node: '>= 18'} @@ -6131,6 +6654,9 @@ packages: resolution: {integrity: sha512-wtZlHyOje6OZTGqAoaDKxFkgRtkF9CnHAVnCHKfuj200wAgL+bSJhdsCD2l0Qx/2ekEXjPWcyKkfGb5CPboslg==} engines: {node: '>=0.4'} + safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -6150,6 +6676,9 @@ packages: engines: {node: '>=18.18'} hasBin: true + sanitize-filename@1.6.5: + resolution: {integrity: sha512-+dVApt46/oAFWRP0KBSnYNLRw1peY7o/b12tmpllPNFpjfwkPuZut1+DiKaD9zYx5r2SHwc+XMLSBaDiyUJw3g==} + sax@1.6.0: resolution: {integrity: sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==} engines: {node: '>=11.0.0'} @@ -6157,10 +6686,22 @@ packages: scheduler@0.28.0: resolution: {integrity: sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==} + semver-compare@1.0.0: + resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==} + + semver@5.7.3: + resolution: {integrity: sha512-kM18BPOqTi0+TB68703/GJRpAML5Me+IDQsR1J26YB3EFKKNEyHIVZuWDX7+WKQB3tHwDwgk24BfhdpWUbytvQ==} + hasBin: true + semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true + semver@7.7.4: + resolution: {integrity: sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==} + engines: {node: '>=10'} + hasBin: true + semver@7.8.5: resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} engines: {node: '>=10'} @@ -6178,6 +6719,10 @@ packages: resolution: {integrity: sha512-ghgmKt5o4Tly5yEG/UJp8qTd0AN7Xalw4XBtDEKP655B699qMEtra1WlXeE6WIvdEG481JvRxULKsInq/iNysw==} engines: {node: '>=0.10.0'} + serialize-error@7.0.1: + resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} + engines: {node: '>=10'} + serve-static@1.16.3: resolution: {integrity: sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==} engines: {node: '>= 0.8.0'} @@ -6263,6 +6808,10 @@ packages: simple-swizzle@0.2.4: resolution: {integrity: sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw==} + simple-update-notifier@2.0.0: + resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} + engines: {node: '>=10'} + sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -6303,6 +6852,9 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + sprintf-js@1.1.3: + resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} + stable-hash@0.0.5: resolution: {integrity: sha512-+L3ccpzibovGXFK+Ap/f8LOS0ahMrHTf3xu7mMLSpEGU0EO9ucaysSylKo9eRDFNhWve/y275iPmIZ4z39a9iA==} @@ -6316,6 +6868,10 @@ packages: standard-navigation@0.0.5: resolution: {integrity: sha512-YAmzwAiiQVocZxO/VGPFiQHcu5pKiz09QIGC0MK6aRMoa3E0QkoTQgcqJr7ZZ3OMiNhu4DkaGElFI5htjOIDbw==} + stat-mode@1.0.0: + resolution: {integrity: sha512-jH9EhtKIjuXZ2cWxmXS8ZP80XyC3iasQxMDV8jzhNJpfDb7VbQLVW4Wvsxz9QZvzV+G4YoSfBUVKDOyxLzi/sg==} + engines: {node: '>= 6'} + statuses@1.5.0: resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} engines: {node: '>= 0.6'} @@ -6367,6 +6923,9 @@ packages: resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} engines: {node: '>= 0.4'} + string_decoder@1.1.1: + resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + stringify-object@5.0.0: resolution: {integrity: sha512-zaJYxz2FtcMb4f+g60KsRNFOpVMUyuJgA51Zi5Z1DOTC3S59+OQiVOzE9GZt0x72uBGWKsQIuBKeF9iusmKFsg==} engines: {node: '>=14.16'} @@ -6419,6 +6978,10 @@ packages: babel-plugin-macros: optional: true + sumchecker@3.0.1: + resolution: {integrity: sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==} + engines: {node: '>= 8.0'} + supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -6455,6 +7018,17 @@ packages: resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} engines: {node: '>=6'} + tar@7.5.23: + resolution: {integrity: sha512-lkukzdoGngZHJZXxW4S/E4Fp9ghTDlyZXrQGRNoJ/LXvDKcXUTq2sg5yQe74po7Voea6n/IN09+wE/QvJMiifA==} + engines: {node: '>=18'} + + temp-file@3.4.0: + resolution: {integrity: sha512-C5tjlC/HCtVUOi3KWVokd4vHVViOmGjtLwIh4MuzPo/nMYTV/p1urt3RnMz2IWXDdKEGJH3k5+KPxtqRsUYGtg==} + + temp@0.9.4: + resolution: {integrity: sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==} + engines: {node: '>=6.0.0'} + terminal-link@2.1.1: resolution: {integrity: sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==} engines: {node: '>=8'} @@ -6470,6 +7044,9 @@ packages: timm@1.7.1: resolution: {integrity: sha512-IjZc9KIotudix8bMaBW6QvMuq64BrJWFs1+4V0lXwWGQZwH+LnX87doAYhem4caOEusRP9/g6jVDQmZ8XOk1nw==} + tiny-async-pool@1.3.0: + resolution: {integrity: sha512-01EAw5EDrcVrdgyCLgoSPvqznC0sVxDSVeiOz09FUpjh71G79VCqneOr+xvt7T1r76CF6ZZfPjHorN2+d+3mqA==} + tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} @@ -6480,6 +7057,13 @@ packages: resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} + tmp-promise@3.0.3: + resolution: {integrity: sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==} + + tmp@0.2.7: + resolution: {integrity: sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw==} + engines: {node: '>=14.14'} + tmpl@1.0.5: resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} @@ -6501,6 +7085,9 @@ packages: tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + truncate-utf8-bytes@1.0.2: + resolution: {integrity: sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==} + ts-api-utils@2.5.0: resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} engines: {node: '>=18.12'} @@ -6527,6 +7114,10 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} + type-fest@0.13.1: + resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} + engines: {node: '>=10'} + type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} @@ -6586,6 +7177,10 @@ packages: undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + undici@6.29.1: + resolution: {integrity: sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==} + engines: {node: '>=18.17'} + undici@7.30.2: resolution: {integrity: sha512-mLyPQnHwUxaM/rideoK/+KL8DaAJLRl4aBCfmX444aCSLnIaomqPLtNRe2jdCYcsk5wZzXrDIQC8ZeYNRAYyIA==} engines: {node: '>=20.18.1'} @@ -6610,6 +7205,10 @@ packages: resolution: {integrity: sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==} engines: {node: '>=18'} + universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + universalify@2.0.1: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} @@ -6621,6 +7220,9 @@ packages: unrs-resolver@1.12.2: resolution: {integrity: sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==} + unzipper@0.12.5: + resolution: {integrity: sha512-tXYOi9R57Uj/2Z25SOs5RRSzq886MBQj2gY8dPL+xl/kv6s6SvByoKfAtvfVeEuhntWDgjd2o9p2lb4TVPAz0A==} + update-browserslist-db@1.4.0: resolution: {integrity: sha512-WPJuOnjI9FWDct4fB+ej4Mz8opLaw5CDcZ2t44tFZ0vIQVYWzBhWR3mkixuUj/A7+vY4V9+ApOZ2YYLwdgq46w==} hasBin: true @@ -6660,6 +7262,9 @@ packages: peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + utf8-byte-length@1.0.5: + resolution: {integrity: sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==} + utif2@4.1.0: resolution: {integrity: sha512-+oknB9FHrJ7oW7A2WZYajOcv4FcDR4CfoGB0dPNfxbi4GO05RRnFmt5oa23+9w32EanrYcSJWspUiJkLMs+37w==} @@ -6703,6 +7308,9 @@ packages: wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + webcrypto-core@1.9.2: + resolution: {integrity: sha512-gsXecm82UQNlTBURJGuqOWy1Ww08S3kZUcr3aOJS02Pk0xLtkfeUAVC0u0xhgdonFme80edSJUIJyuvL/7250Q==} + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -6741,6 +7349,16 @@ packages: engines: {node: ^16.13.0 || >=18.0.0} hasBin: true + which@5.0.0: + resolution: {integrity: sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==} + engines: {node: ^18.17.0 || >=20.5.0} + hasBin: true + + which@6.0.1: + resolution: {integrity: sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg==} + engines: {node: ^20.17.0 || >=22.9.0} + hasBin: true + win-guid@0.2.1: resolution: {integrity: sha512-gEIQU4mkgl2OPeoNrWflcJFJ3Ae2BPd4eCsHHA/XikslkIVms/nHhvnvzIZV7VLmBvtFlDOzLt9rrZT+n6D67A==} @@ -6806,6 +7424,13 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + + yallist@5.0.0: + resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==} + engines: {node: '>=18'} + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -6814,6 +7439,9 @@ packages: resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} engines: {node: '>=12'} + yauzl@2.10.0: + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -7434,6 +8062,85 @@ snapshots: '@dotenvx/primitives@0.8.0': {} + '@electron/asar@3.4.1': + dependencies: + commander: 5.1.0 + glob: 7.2.3 + minimatch: 3.1.5 + + '@electron/fuses@1.8.0': + dependencies: + chalk: 4.1.2 + fs-extra: 9.1.0 + minimist: 1.2.8 + + '@electron/get@3.1.0(supports-color@8.1.1)': + dependencies: + debug: 4.4.3(supports-color@8.1.1) + env-paths: 2.2.1 + fs-extra: 8.1.0 + got: 11.8.6 + progress: 2.0.3 + semver: 6.3.1 + sumchecker: 3.0.1(supports-color@8.1.1) + optionalDependencies: + global-agent: 3.0.0 + transitivePeerDependencies: + - supports-color + + '@electron/notarize@2.5.0(supports-color@8.1.1)': + dependencies: + debug: 4.4.3(supports-color@8.1.1) + fs-extra: 9.1.0 + promise-retry: 2.0.1 + transitivePeerDependencies: + - supports-color + + '@electron/osx-sign@1.3.3(supports-color@8.1.1)': + dependencies: + compare-version: 0.1.2 + debug: 4.4.3(supports-color@8.1.1) + fs-extra: 10.1.0 + isbinaryfile: 4.0.10 + minimist: 1.2.8 + plist: 3.1.0 + transitivePeerDependencies: + - supports-color + + '@electron/rebuild@4.2.1(supports-color@8.1.1)': + dependencies: + '@malept/cross-spawn-promise': 2.0.0 + debug: 4.4.3(supports-color@8.1.1) + node-abi: 4.40.0 + node-api-version: 0.2.1 + node-gyp: 12.4.0 + read-binary-file-arch: 1.0.6(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + + '@electron/universal@2.0.3(supports-color@8.1.1)': + dependencies: + '@electron/asar': 3.4.1 + '@malept/cross-spawn-promise': 2.0.0 + debug: 4.4.3(supports-color@8.1.1) + dir-compare: 4.2.0 + fs-extra: 11.3.6 + minimatch: 11.0.9 + plist: 3.1.0 + transitivePeerDependencies: + - supports-color + + '@electron/windows-sign@1.2.2(supports-color@8.1.1)': + dependencies: + cross-dirname: 0.1.0 + debug: 4.4.3(supports-color@8.1.1) + fs-extra: 11.3.6 + minimist: 1.2.8 + postject: 1.0.0-alpha.6 + transitivePeerDependencies: + - supports-color + optional: true + '@emnapi/core@1.10.0': dependencies: '@emnapi/wasi-threads': 1.2.1 @@ -8134,6 +8841,10 @@ snapshots: '@img/sharp-win32-x64@0.35.5': optional: true + '@isaacs/fs-minipass@4.0.1': + dependencies: + minipass: 7.1.3 + '@isaacs/nonrecursive-glob-match@1.1.0': {} '@isaacs/ttlcache@1.4.1': {} @@ -8245,6 +8956,19 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 + '@malept/cross-spawn-promise@2.0.0': + dependencies: + cross-spawn: 7.0.6 + + '@malept/flatpak-bundler@0.4.0(supports-color@8.1.1)': + dependencies: + debug: 4.4.3(supports-color@8.1.1) + fs-extra: 9.1.0 + lodash: 4.18.1 + tmp-promise: 3.0.3 + transitivePeerDependencies: + - supports-color + '@modelcontextprotocol/sdk@1.32.2(supports-color@8.1.1)(zod@4.6.7)': dependencies: '@hono/node-server': 1.19.19(hono@4.13.19) @@ -8307,6 +9031,8 @@ snapshots: '@next/swc-win32-x64-msvc@16.4.6': optional: true + '@noble/hashes@1.8.0': {} + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -8362,6 +9088,28 @@ snapshots: '@panva/hkdf@1.2.1': {} + '@peculiar/asn1-schema@2.11.1': + dependencies: + '@peculiar/utils': 2.0.3 + asn1js: 3.1.0 + tslib: 2.8.1 + + '@peculiar/json-schema@1.1.12': + dependencies: + tslib: 2.8.1 + + '@peculiar/utils@2.0.3': + dependencies: + tslib: 2.8.1 + + '@peculiar/webcrypto@1.7.2': + dependencies: + '@peculiar/asn1-schema': 2.11.1 + '@peculiar/json-schema': 1.1.12 + '@peculiar/utils': 2.0.3 + tslib: 2.8.1 + webcrypto-core: 1.9.2 + '@radix-ui/number@1.1.2': {} '@radix-ui/primitive@1.1.5': {} @@ -9405,6 +10153,8 @@ snapshots: '@sinclair/typebox@0.27.10': {} + '@sindresorhus/is@4.6.0': {} + '@sindresorhus/merge-streams@4.0.0': {} '@standard-schema/spec@1.1.0': {} @@ -9415,6 +10165,10 @@ snapshots: dependencies: tslib: 2.8.1 + '@szmarczak/http-timer@4.0.6': + dependencies: + defer-to-connect: 2.0.1 + '@tailwindcss/node@4.3.2': dependencies: '@jridgewell/remapping': 2.3.5 @@ -9512,6 +10266,13 @@ snapshots: tslib: 2.8.1 optional: true + '@types/cacheable-request@6.0.3': + dependencies: + '@types/http-cache-semantics': 4.2.0 + '@types/keyv': 3.1.4 + '@types/node': 20.19.43 + '@types/responselike': 1.0.3 + '@types/d3-array@3.2.2': {} '@types/d3-color@3.1.3': {} @@ -9536,8 +10297,18 @@ snapshots: '@types/d3-timer@3.0.2': {} + '@types/debug@4.1.13': + dependencies: + '@types/ms': 2.1.0 + '@types/estree@1.0.9': {} + '@types/fs-extra@9.0.13': + dependencies: + '@types/node': 20.19.43 + + '@types/http-cache-semantics@4.2.0': {} + '@types/istanbul-lib-coverage@2.0.6': {} '@types/istanbul-lib-report@3.0.3': @@ -9552,6 +10323,12 @@ snapshots: '@types/json5@0.0.29': {} + '@types/keyv@3.1.4': + dependencies: + '@types/node': 20.19.43 + + '@types/ms@2.1.0': {} + '@types/node@16.9.1': {} '@types/node@18.19.130': @@ -9574,6 +10351,10 @@ snapshots: dependencies: csstype: 3.2.3 + '@types/responselike@1.0.3': + dependencies: + '@types/node': 20.19.43 + '@types/use-sync-external-store@0.0.6': {} '@types/validate-npm-package-name@4.0.2': {} @@ -9584,6 +10365,11 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 + '@types/yauzl@2.10.3': + dependencies: + '@types/node': 20.19.43 + optional: true + '@typescript-eslint/eslint-plugin@8.63.0(@typescript-eslint/parser@8.63.0(eslint@9.39.4(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3))(eslint@9.39.4(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 @@ -9858,6 +10644,8 @@ snapshots: '@xmldom/xmldom@0.9.12': {} + abbrev@4.0.0: {} + accepts@1.3.8: dependencies: mime-types: 2.1.35 @@ -9926,6 +10714,54 @@ snapshots: any-base@1.1.0: {} + app-builder-lib@26.18.0(dmg-builder@26.18.0)(electron-builder-squirrel-windows@26.18.0)(supports-color@8.1.1): + dependencies: + '@electron/asar': 3.4.1 + '@electron/fuses': 1.8.0 + '@electron/get': 3.1.0(supports-color@8.1.1) + '@electron/notarize': 2.5.0(supports-color@8.1.1) + '@electron/osx-sign': 1.3.3(supports-color@8.1.1) + '@electron/rebuild': 4.2.1(supports-color@8.1.1) + '@electron/universal': 2.0.3(supports-color@8.1.1) + '@malept/flatpak-bundler': 0.4.0(supports-color@8.1.1) + '@noble/hashes': 1.8.0 + '@peculiar/webcrypto': 1.7.2 + '@types/fs-extra': 9.0.13 + ajv: 8.20.0 + asn1js: 3.1.0 + async-exit-hook: 2.0.1 + builder-util: 26.16.0(supports-color@8.1.1) + builder-util-runtime: 9.7.0(supports-color@8.1.1) + chromium-pickle-js: 0.2.0 + ci-info: 4.3.1 + debug: 4.4.3(supports-color@8.1.1) + dmg-builder: 26.18.0(electron-builder-squirrel-windows@26.18.0)(supports-color@8.1.1) + dotenv: 16.6.1 + dotenv-expand: 11.0.7 + ejs: 3.1.10 + electron-builder-squirrel-windows: 26.18.0(dmg-builder@26.18.0)(supports-color@8.1.1) + electron-publish: 26.18.0(supports-color@8.1.1) + fs-extra: 10.1.0 + hosted-git-info: 4.1.0 + isbinaryfile: 5.0.7 + jiti: 2.7.0 + js-yaml: 4.3.2 + json5: 2.2.3 + lazy-val: 1.0.5 + minimatch: 11.0.9 + pkijs: 3.4.3 + plist: 3.1.0 + proper-lockfile: 4.1.2 + resedit: 1.7.2 + semver: 7.7.4 + tar: 7.5.23 + temp-file: 3.4.0 + tiny-async-pool: 1.3.0 + unzipper: 0.12.5 + which: 5.0.0 + transitivePeerDependencies: + - supports-color + arg@5.0.2: {} argparse@2.0.1: {} @@ -10005,20 +10841,36 @@ snapshots: asap@2.0.6: {} + asn1js@3.1.0: + dependencies: + pvtsutils: 1.3.6 + pvutils: 1.2.0 + tslib: 2.8.1 + ast-types-flow@0.0.8: {} ast-types@0.16.1: dependencies: tslib: 2.8.1 + async-exit-hook@2.0.1: {} + async-function@1.0.0: {} + async@3.2.6: {} + + asynckit@0.4.0: {} + + at-least-node@1.0.0: {} + atomically@1.7.0: {} available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.1.0 + aws4@1.13.2: {} + axe-core@4.12.1: {} axobject-query@4.1.0: {} @@ -10177,6 +11029,8 @@ snapshots: big-integer@1.6.52: {} + bluebird@3.7.2: {} + bmp-js@0.1.0: {} body-parser@2.4.0(supports-color@8.1.1): @@ -10195,6 +11049,9 @@ snapshots: boolbase@1.0.0: {} + boolean@3.2.0: + optional: true + bplist-creator@0.1.0: dependencies: stream-buffers: 2.2.0 @@ -10212,6 +11069,10 @@ snapshots: balanced-match: 1.0.2 concat-map: 0.0.1 + brace-expansion@2.1.8: + dependencies: + balanced-match: 1.0.2 + brace-expansion@5.0.13: dependencies: balanced-match: 4.0.4 @@ -10232,6 +11093,8 @@ snapshots: dependencies: node-int64: 0.4.0 + buffer-crc32@0.2.13: {} + buffer-from@1.1.2: {} buffer@5.7.1: @@ -10239,12 +11102,52 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 + builder-util-runtime@9.7.0(supports-color@8.1.1): + dependencies: + debug: 4.4.3(supports-color@8.1.1) + sax: 1.6.0 + transitivePeerDependencies: + - supports-color + + builder-util@26.16.0(supports-color@8.1.1): + dependencies: + '@types/debug': 4.1.13 + builder-util-runtime: 9.7.0(supports-color@8.1.1) + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.3(supports-color@8.1.1) + fs-extra: 10.1.0 + http-proxy-agent: 7.0.2(supports-color@8.1.1) + https-proxy-agent: 7.0.6(supports-color@8.1.1) + js-yaml: 4.3.2 + sanitize-filename: 1.6.5 + source-map-support: 0.5.21 + stat-mode: 1.0.0 + temp-file: 3.4.0 + tiny-async-pool: 1.3.0 + transitivePeerDependencies: + - supports-color + bundle-name@4.1.0: dependencies: run-applescript: 7.1.0 bytes@3.1.2: {} + bytestreamjs@2.0.1: {} + + cacheable-lookup@5.0.4: {} + + cacheable-request@7.0.4: + dependencies: + clone-response: 1.0.3 + get-stream: 5.2.0 + http-cache-semantics: 4.3.0 + keyv: 4.5.4 + lowercase-keys: 2.0.0 + normalize-url: 6.1.0 + responselike: 2.0.1 + call-bind-apply-helpers@1.0.2: dependencies: es-errors: 1.3.0 @@ -10283,8 +11186,16 @@ snapshots: chalk@5.6.2: {} + chownr@3.0.0: {} + + chromium-pickle-js@0.2.0: {} + ci-info@3.9.0: {} + ci-info@4.3.1: {} + + ci-info@4.5.0: {} + class-variance-authority@0.7.1: dependencies: clsx: 2.1.1 @@ -10307,6 +11218,10 @@ snapshots: strip-ansi: 6.0.1 wrap-ansi: 7.0.0 + clone-response@1.0.3: + dependencies: + mimic-response: 1.0.1 + clone@1.0.4: {} clsx@2.1.1: {} @@ -10347,6 +11262,10 @@ snapshots: color-convert: 2.0.1 color-string: 1.9.1 + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + commander@11.1.0: {} commander@12.1.0: {} @@ -10355,8 +11274,15 @@ snapshots: commander@2.20.3: {} + commander@5.1.0: {} + commander@7.2.0: {} + commander@9.5.0: + optional: true + + compare-version@0.1.2: {} + compressible@2.0.18: dependencies: mime-db: 1.54.0 @@ -10440,6 +11366,8 @@ snapshots: dependencies: browserslist: 4.29.6 + core-util-is@1.0.3: {} + cors@2.8.6: dependencies: object-assign: 4.1.1 @@ -10454,6 +11382,9 @@ snapshots: optionalDependencies: typescript: 5.9.3 + cross-dirname@0.1.0: + optional: true + cross-spawn@7.0.6: dependencies: path-key: 3.1.1 @@ -10561,6 +11492,10 @@ snapshots: decimal.js-light@2.5.1: {} + decompress-response@6.0.0: + dependencies: + mimic-response: 3.1.0 + dedent@1.7.2: {} deep-is@0.1.4: {} @@ -10578,6 +11513,8 @@ snapshots: dependencies: clone: 1.0.4 + defer-to-connect@2.0.1: {} + define-data-property@1.1.4: dependencies: es-define-property: 1.0.1 @@ -10594,6 +11531,8 @@ snapshots: has-property-descriptors: 1.0.2 object-keys: 1.1.1 + delayed-stream@1.0.0: {} + depd@2.0.0: {} destroy@1.2.0: {} @@ -10602,8 +11541,26 @@ snapshots: detect-node-es@1.1.0: {} + detect-node@2.1.0: + optional: true + diff@8.0.4: {} + dir-compare@4.2.0: + dependencies: + minimatch: 3.1.5 + p-limit: 3.1.0 + + dmg-builder@26.18.0(electron-builder-squirrel-windows@26.18.0)(supports-color@8.1.1): + dependencies: + app-builder-lib: 26.18.0(dmg-builder@26.18.0)(electron-builder-squirrel-windows@26.18.0)(supports-color@8.1.1) + builder-util: 26.16.0(supports-color@8.1.1) + fs-extra: 10.1.0 + js-yaml: 4.3.2 + transitivePeerDependencies: + - electron-builder-squirrel-windows + - supports-color + dnssd-advertise@1.1.6: {} doctrine@2.1.0: @@ -10632,6 +11589,12 @@ snapshots: dependencies: is-obj: 2.0.0 + dotenv-expand@11.0.7: + dependencies: + dotenv: 16.6.1 + + dotenv@16.6.1: {} + dotenv@17.4.2: {} dunder-proto@1.0.1: @@ -10640,10 +11603,69 @@ snapshots: es-errors: 1.3.0 gopd: 1.2.0 + duplexer2@0.1.4: + dependencies: + readable-stream: 2.3.8 + ee-first@1.1.1: {} + ejs@3.1.10: + dependencies: + jake: 10.9.4 + + electron-builder-squirrel-windows@26.18.0(dmg-builder@26.18.0)(supports-color@8.1.1): + dependencies: + app-builder-lib: 26.18.0(dmg-builder@26.18.0)(electron-builder-squirrel-windows@26.18.0)(supports-color@8.1.1) + builder-util: 26.16.0(supports-color@8.1.1) + electron-winstaller: 5.4.0(supports-color@8.1.1) + transitivePeerDependencies: + - dmg-builder + - supports-color + + electron-builder@26.18.0(electron-builder-squirrel-windows@26.18.0)(supports-color@8.1.1): + dependencies: + app-builder-lib: 26.18.0(dmg-builder@26.18.0)(electron-builder-squirrel-windows@26.18.0)(supports-color@8.1.1) + builder-util: 26.16.0(supports-color@8.1.1) + builder-util-runtime: 9.7.0(supports-color@8.1.1) + chalk: 4.1.2 + ci-info: 4.5.0 + dmg-builder: 26.18.0(electron-builder-squirrel-windows@26.18.0)(supports-color@8.1.1) + fs-extra: 10.1.0 + lazy-val: 1.0.5 + simple-update-notifier: 2.0.0 + yargs: 17.7.3 + transitivePeerDependencies: + - electron-builder-squirrel-windows + - supports-color + + electron-publish@26.18.0(supports-color@8.1.1): + dependencies: + '@types/fs-extra': 9.0.13 + aws4: 1.13.2 + builder-util: 26.16.0(supports-color@8.1.1) + builder-util-runtime: 9.7.0(supports-color@8.1.1) + chalk: 4.1.2 + form-data: 4.0.6 + fs-extra: 10.1.0 + lazy-val: 1.0.5 + mime: 2.6.0 + transitivePeerDependencies: + - supports-color + electron-to-chromium@1.5.490: {} + electron-winstaller@5.4.0(supports-color@8.1.1): + dependencies: + '@electron/asar': 3.4.1 + debug: 4.4.3(supports-color@8.1.1) + fs-extra: 7.0.1 + lodash: 4.18.1 + temp: 0.9.4 + optionalDependencies: + '@electron/windows-sign': 1.2.2(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + embla-carousel-react@8.6.0(react@19.3.1): dependencies: embla-carousel: 8.6.0 @@ -10666,6 +11688,10 @@ snapshots: encodeurl@2.0.0: {} + end-of-stream@1.4.5: + dependencies: + once: 1.4.0 + enhanced-resolve@5.21.6: dependencies: graceful-fs: 4.2.11 @@ -10680,6 +11706,8 @@ snapshots: env-paths@2.2.1: {} + err-code@2.0.3: {} + error-ex@1.3.4: dependencies: is-arrayish: 0.2.1 @@ -10801,6 +11829,9 @@ snapshots: es-toolkit@1.49.0: {} + es6-error@4.1.1: + optional: true + esbuild@0.27.0: optionalDependencies: '@esbuild/aix-ppc64': 0.27.0 @@ -11446,6 +12477,16 @@ snapshots: transitivePeerDependencies: - supports-color + extract-zip@2.0.1(supports-color@8.1.1): + dependencies: + debug: 4.4.3(supports-color@8.1.1) + get-stream: 5.2.0 + yauzl: 2.10.0 + optionalDependencies: + '@types/yauzl': 2.10.3 + transitivePeerDependencies: + - supports-color + fast-deep-equal@3.1.3: {} fast-glob@3.3.1: @@ -11480,6 +12521,10 @@ snapshots: dependencies: bser: 2.1.1 + fd-slicer@1.1.0: + dependencies: + pend: 1.2.0 + fdir@6.5.0(picomatch@4.0.5): optionalDependencies: picomatch: 4.0.5 @@ -11503,6 +12548,10 @@ snapshots: transitivePeerDependencies: - supports-color + filelist@1.0.6: + dependencies: + minimatch: 5.1.9 + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -11564,18 +12613,59 @@ snapshots: dependencies: is-callable: 1.2.7 + form-data@4.0.6: + 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 + forwarded@0.2.0: {} fresh@0.5.2: {} fresh@2.0.0: {} + fs-extra@10.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.2.1 + universalify: 2.0.1 + + fs-extra@11.3.1: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.2.1 + universalify: 2.0.1 + fs-extra@11.3.6: dependencies: graceful-fs: 4.2.11 jsonfile: 6.2.1 universalify: 2.0.1 + fs-extra@7.0.1: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + + fs-extra@8.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + + fs-extra@9.1.0: + dependencies: + at-least-node: 1.0.0 + graceful-fs: 4.2.11 + jsonfile: 6.2.1 + universalify: 2.0.1 + + fs.realpath@1.0.0: {} + function-bind@1.1.2: {} function.prototype.name@1.2.0: @@ -11624,6 +12714,10 @@ snapshots: dunder-proto: 1.0.1 es-object-atoms: 1.1.2 + get-stream@5.2.0: + dependencies: + pump: 3.0.4 + get-stream@6.0.1: {} get-stream@9.0.1: @@ -11662,6 +12756,25 @@ snapshots: minipass: 7.1.3 path-scurry: 3.0.0 + glob@7.2.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.5 + once: 1.4.0 + path-is-absolute: 1.0.1 + + global-agent@3.0.0: + dependencies: + boolean: 3.2.0 + es6-error: 4.1.1 + matcher: 3.0.0 + roarr: 2.15.4 + semver: 7.7.4 + serialize-error: 7.0.1 + optional: true + globals@14.0.0: {} globals@16.4.0: {} @@ -11673,6 +12786,20 @@ snapshots: gopd@1.2.0: {} + got@11.8.6: + dependencies: + '@sindresorhus/is': 4.6.0 + '@szmarczak/http-timer': 4.0.6 + '@types/cacheable-request': 6.0.3 + '@types/responselike': 1.0.3 + cacheable-lookup: 5.0.4 + cacheable-request: 7.0.4 + decompress-response: 6.0.0 + http2-wrapper: 1.0.3 + lowercase-keys: 2.0.0 + p-cancelable: 2.1.1 + responselike: 2.0.1 + graceful-fs@4.2.11: {} has-bigints@1.1.0: {} @@ -11717,10 +12844,16 @@ snapshots: hono@4.13.19: {} + hosted-git-info@4.1.0: + dependencies: + lru-cache: 6.0.0 + hosted-git-info@7.0.2: dependencies: lru-cache: 10.4.3 + http-cache-semantics@4.3.0: {} + http-errors@2.0.1: dependencies: depd: 2.0.0 @@ -11729,6 +12862,18 @@ snapshots: statuses: 2.0.2 toidentifier: 1.0.1 + http-proxy-agent@7.0.2(supports-color@8.1.1): + dependencies: + agent-base: 7.1.4 + debug: 4.4.3(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + + http2-wrapper@1.0.3: + dependencies: + quick-lru: 5.1.1 + resolve-alpn: 1.2.1 + https-proxy-agent@7.0.6(supports-color@8.1.1): dependencies: agent-base: 7.1.4 @@ -11763,6 +12908,11 @@ snapshots: imurmurhash@0.1.4: {} + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + inherits@2.0.4: {} input-otp@1.4.2(react-dom@19.3.1(react@19.3.1))(react@19.3.1): @@ -11950,12 +13100,20 @@ snapshots: dependencies: is-inside-container: 1.0.0 + isarray@1.0.0: {} + isarray@2.0.5: {} + isbinaryfile@4.0.10: {} + + isbinaryfile@5.0.7: {} + isexe@2.0.0: {} isexe@3.1.5: {} + isexe@4.0.0: {} + isomorphic-fetch@3.0.0: dependencies: node-fetch: 2.7.0 @@ -11972,6 +13130,12 @@ snapshots: has-symbols: 1.1.0 set-function-name: 2.0.2 + jake@10.9.4: + dependencies: + async: 3.2.6 + filelist: 1.0.6 + picocolors: 1.1.1 + jest-get-type@29.6.3: {} jest-util@29.7.0: @@ -12033,12 +13197,19 @@ snapshots: json-stable-stringify-without-jsonify@1.0.1: {} + json-stringify-safe@5.0.1: + optional: true + json5@1.0.2: dependencies: minimist: 1.2.8 json5@2.2.3: {} + jsonfile@4.0.0: + optionalDependencies: + graceful-fs: 4.2.11 + jsonfile@6.2.1: dependencies: universalify: 2.0.1 @@ -12070,6 +13241,8 @@ snapshots: dependencies: language-subtag-registry: 0.3.23 + lazy-val@1.0.5: {} + leven@3.1.0: {} levn@0.4.1: @@ -12143,6 +13316,8 @@ snapshots: lodash.throttle@4.1.1: {} + lodash@4.18.1: {} + log-symbols@2.2.0: dependencies: chalk: 2.4.2 @@ -12156,6 +13331,8 @@ snapshots: dependencies: js-tokens: 4.0.0 + lowercase-keys@2.0.0: {} + lru-cache@10.4.3: {} lru-cache@11.5.2: {} @@ -12164,6 +13341,10 @@ snapshots: dependencies: yallist: 3.1.1 + lru-cache@6.0.0: + dependencies: + yallist: 4.0.0 + lucia@3.2.2: dependencies: '@oslojs/crypto': 1.0.1 @@ -12181,6 +13362,11 @@ snapshots: dependencies: tmpl: 1.0.5 + matcher@3.0.0: + dependencies: + escape-string-regexp: 4.0.0 + optional: true + math-intrinsics@1.1.0: {} mdn-data@2.0.14: {} @@ -12388,6 +13574,8 @@ snapshots: mime@1.6.0: {} + mime@2.6.0: {} + mimic-fn@1.2.0: {} mimic-fn@2.1.0: {} @@ -12396,6 +13584,10 @@ snapshots: mimic-function@5.0.1: {} + mimic-response@1.0.1: {} + + mimic-response@3.1.0: {} + minimatch@11.0.9: dependencies: '@isaacs/nonrecursive-glob-match': 1.1.0 @@ -12405,10 +13597,22 @@ snapshots: dependencies: brace-expansion: 1.1.22 + minimatch@5.1.9: + dependencies: + brace-expansion: 2.1.8 + minimist@1.2.8: {} minipass@7.1.3: {} + minizlib@3.1.0: + dependencies: + minipass: 7.1.3 + + mkdirp@0.5.6: + dependencies: + minimist: 1.2.8 + ms@2.0.0: {} ms@2.1.3: {} @@ -12473,6 +13677,14 @@ snapshots: - '@types/node' - babel-plugin-macros + node-abi@4.40.0: + dependencies: + semver: 7.7.4 + + node-api-version@0.2.1: + dependencies: + semver: 7.7.4 + node-exports-info@1.6.2: dependencies: array.prototype.flatmap: 1.3.3 @@ -12486,6 +13698,19 @@ snapshots: node-forge@1.4.3: {} + node-gyp@12.4.0: + dependencies: + env-paths: 2.2.1 + exponential-backoff: 3.1.3 + graceful-fs: 4.2.11 + nopt: 9.0.0 + proc-log: 6.1.0 + semver: 7.7.4 + tar: 7.5.23 + tinyglobby: 0.2.17 + undici: 6.29.1 + which: 6.0.1 + node-int64@0.4.0: {} node-releases@2.0.65: {} @@ -12502,6 +13727,12 @@ snapshots: - encoding - supports-color + nopt@9.0.0: + dependencies: + abbrev: 4.0.0 + + normalize-url@6.1.0: {} + noxcturnal@0.1.8: dependencies: '@babel/code-frame': 7.29.7 @@ -12667,6 +13898,8 @@ snapshots: object-keys: 1.1.1 safe-push-apply: 1.0.0 + p-cancelable@2.1.1: {} + p-limit@2.3.0: dependencies: p-try: 2.2.0 @@ -12712,6 +13945,8 @@ snapshots: path-exists@4.0.0: {} + path-is-absolute@1.0.1: {} + path-key@3.1.1: {} path-key@4.0.0: {} @@ -12727,6 +13962,10 @@ snapshots: path-to-regexp@8.4.2: {} + pe-library@0.4.1: {} + + pend@1.2.0: {} + picocolors@1.1.1: {} picomatch@2.3.2: {} @@ -12743,6 +13982,21 @@ snapshots: dependencies: find-up: 3.0.0 + pkijs@3.4.3: + dependencies: + '@noble/hashes': 1.8.0 + asn1js: 3.1.0 + bytestreamjs: 2.0.1 + pvtsutils: 1.3.6 + pvutils: 1.2.0 + tslib: 2.8.1 + + plist@3.1.0: + dependencies: + '@xmldom/xmldom': 0.8.15 + base64-js: 1.5.1 + xmlbuilder: 15.1.1 + plist@3.1.1: dependencies: '@xmldom/xmldom': 0.9.12 @@ -12765,6 +14019,11 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.2 + postject@1.0.0-alpha.6: + dependencies: + commander: 9.5.0 + optional: true + powershell-utils@0.1.0: {} preact-render-to-string@6.5.11(preact@10.24.3): @@ -12793,8 +14052,17 @@ snapshots: proc-log@4.2.0: {} + proc-log@6.1.0: {} + + process-nextick-args@2.0.1: {} + progress@2.0.3: {} + promise-retry@2.0.1: + dependencies: + err-code: 2.0.3 + retry: 0.12.0 + promise@8.3.0: dependencies: asap: 2.0.6 @@ -12810,13 +14078,30 @@ snapshots: object-assign: 4.1.1 react-is: 16.13.1 + proper-lockfile@4.1.2: + dependencies: + graceful-fs: 4.2.11 + retry: 0.12.0 + signal-exit: 3.0.7 + proxy-addr@2.0.8: dependencies: forwarded: 0.2.0 ipaddr.js: 1.9.1 + pump@3.0.4: + dependencies: + end-of-stream: 1.4.5 + once: 1.4.0 + punycode@2.3.1: {} + pvtsutils@1.3.6: + dependencies: + tslib: 2.8.1 + + pvutils@1.2.0: {} + qs@6.17.1: dependencies: es-define-property: 1.0.1 @@ -12824,6 +14109,8 @@ snapshots: queue-microtask@1.2.3: {} + quick-lru@5.1.1: {} + radix-ui@1.6.2(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(react-dom@19.3.1(react@19.3.1))(react@19.3.1): dependencies: '@radix-ui/primitive': 1.1.5 @@ -13108,6 +14395,22 @@ snapshots: react@19.3.1: {} + read-binary-file-arch@1.0.6(supports-color@8.1.1): + dependencies: + debug: 4.4.3(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + + readable-stream@2.3.8: + dependencies: + core-util-is: 1.0.3 + inherits: 2.0.4 + isarray: 1.0.0 + process-nextick-args: 2.0.1 + safe-buffer: 5.1.2 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 + recast@0.23.12: dependencies: ast-types: 0.16.1 @@ -13189,8 +14492,14 @@ snapshots: require-from-string@2.0.2: {} + resedit@1.7.2: + dependencies: + pe-library: 0.4.1 + reselect@5.2.0: {} + resolve-alpn@1.2.1: {} + resolve-from@4.0.0: {} resolve-from@5.0.0: {} @@ -13215,6 +14524,10 @@ snapshots: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 + responselike@2.0.1: + dependencies: + lowercase-keys: 2.0.0 + restore-cursor@2.0.0: dependencies: onetime: 2.0.1 @@ -13225,8 +14538,24 @@ snapshots: onetime: 7.0.0 signal-exit: 4.1.0 + retry@0.12.0: {} + reusify@1.1.0: {} + rimraf@2.6.3: + dependencies: + glob: 7.2.3 + + roarr@2.15.4: + dependencies: + boolean: 3.2.0 + detect-node: 2.1.0 + globalthis: 1.0.4 + json-stringify-safe: 5.0.1 + semver-compare: 1.0.0 + sprintf-js: 1.1.3 + optional: true + router@2.2.0(supports-color@8.1.1): dependencies: debug: 4.4.3(supports-color@8.1.1) @@ -13251,6 +14580,8 @@ snapshots: has-symbols: 1.1.0 isarray: 2.0.5 + safe-buffer@5.1.2: {} + safe-buffer@5.2.1: {} safe-push-apply@1.0.0: @@ -13268,12 +14599,23 @@ snapshots: sandbox-cli-detector@0.2.0: {} + sanitize-filename@1.6.5: + dependencies: + truncate-utf8-bytes: 1.0.2 + sax@1.6.0: {} scheduler@0.28.0: {} + semver-compare@1.0.0: + optional: true + + semver@5.7.3: {} + semver@6.3.1: {} + semver@7.7.4: {} + semver@7.8.5: {} send@0.19.2(supports-color@8.1.1): @@ -13312,6 +14654,11 @@ snapshots: serialize-error@2.1.0: {} + serialize-error@7.0.1: + dependencies: + type-fest: 0.13.1 + optional: true + serve-static@1.16.3(supports-color@8.1.1): dependencies: encodeurl: 2.0.0 @@ -13481,6 +14828,10 @@ snapshots: dependencies: is-arrayish: 0.3.4 + simple-update-notifier@2.0.0: + dependencies: + semver: 7.8.5 + sisteransi@1.0.5: {} slugify@1.6.9: {} @@ -13512,6 +14863,9 @@ snapshots: source-map@0.6.1: {} + sprintf-js@1.1.3: + optional: true + stable-hash@0.0.5: {} stackframe@1.3.4: {} @@ -13522,6 +14876,8 @@ snapshots: standard-navigation@0.0.5: {} + stat-mode@1.0.0: {} + statuses@1.5.0: {} statuses@2.0.2: {} @@ -13598,6 +14954,10 @@ snapshots: define-properties: 1.2.1 es-object-atoms: 1.1.2 + string_decoder@1.1.1: + dependencies: + safe-buffer: 5.1.2 + stringify-object@5.0.0: dependencies: get-own-enumerable-keys: 1.0.0 @@ -13637,6 +14997,12 @@ snapshots: optionalDependencies: '@babel/core': 7.29.7(supports-color@8.1.1) + sumchecker@3.0.1(supports-color@8.1.1): + dependencies: + debug: 4.4.3(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + supports-color@5.5.0: dependencies: has-flag: 3.0.0 @@ -13664,6 +15030,24 @@ snapshots: tapable@2.3.3: {} + tar@7.5.23: + dependencies: + '@isaacs/fs-minipass': 4.0.1 + chownr: 3.0.0 + minipass: 7.1.3 + minizlib: 3.1.0 + yallist: 5.0.0 + + temp-file@3.4.0: + dependencies: + async-exit-hook: 2.0.1 + fs-extra: 10.1.0 + + temp@0.9.4: + dependencies: + mkdirp: 0.5.6 + rimraf: 2.6.3 + terminal-link@2.1.1: dependencies: ansi-escapes: 4.3.2 @@ -13680,6 +15064,10 @@ snapshots: timm@1.7.1: {} + tiny-async-pool@1.3.0: + dependencies: + semver: 5.7.3 + tiny-invariant@1.3.3: {} tinycolor2@1.6.0: {} @@ -13689,6 +15077,12 @@ snapshots: fdir: 6.5.0(picomatch@4.0.5) picomatch: 4.0.5 + tmp-promise@3.0.3: + dependencies: + tmp: 0.2.7 + + tmp@0.2.7: {} + tmpl@1.0.5: {} to-regex-range@5.0.1: @@ -13707,6 +15101,10 @@ snapshots: tr46@0.0.3: {} + truncate-utf8-bytes@1.0.2: + dependencies: + utf8-byte-length: 1.0.5 + ts-api-utils@2.5.0(typescript@5.9.3): dependencies: typescript: 5.9.3 @@ -13737,6 +15135,9 @@ snapshots: dependencies: prelude-ls: 1.2.1 + type-fest@0.13.1: + optional: true + type-fest@0.21.3: {} type-fest@0.7.1: {} @@ -13808,6 +15209,8 @@ snapshots: undici-types@6.21.0: {} + undici@6.29.1: {} + undici@7.30.2: {} unicode-canonical-property-names-ecmascript@2.0.1: {} @@ -13823,6 +15226,8 @@ snapshots: unicorn-magic@0.3.0: {} + universalify@0.1.2: {} + universalify@2.0.1: {} unpipe@1.0.0: {} @@ -13854,6 +15259,14 @@ snapshots: '@unrs/resolver-binding-win32-ia32-msvc': 1.12.2 '@unrs/resolver-binding-win32-x64-msvc': 1.12.2 + unzipper@0.12.5: + dependencies: + bluebird: 3.7.2 + duplexer2: 0.1.4 + fs-extra: 11.3.1 + graceful-fs: 4.2.11 + node-int64: 0.4.0 + update-browserslist-db@1.4.0(browserslist@4.29.6): dependencies: browserslist: 4.29.6 @@ -13887,6 +15300,8 @@ snapshots: dependencies: react: 19.3.1 + utf8-byte-length@1.0.5: {} + utif2@4.1.0: dependencies: pako: 1.0.11 @@ -13939,6 +15354,14 @@ snapshots: dependencies: defaults: 1.0.4 + webcrypto-core@1.9.2: + dependencies: + '@peculiar/asn1-schema': 2.11.1 + '@peculiar/json-schema': 1.1.12 + '@peculiar/utils': 2.0.3 + asn1js: 3.1.0 + tslib: 2.8.1 + webidl-conversions@3.0.1: {} whatwg-fetch@3.6.20: {} @@ -13999,6 +15422,14 @@ snapshots: dependencies: isexe: 3.1.5 + which@5.0.0: + dependencies: + isexe: 3.1.5 + + which@6.0.1: + dependencies: + isexe: 4.0.0 + win-guid@0.2.1: {} word-wrap@1.2.5: {} @@ -14037,6 +15468,10 @@ snapshots: yallist@3.1.1: {} + yallist@4.0.0: {} + + yallist@5.0.0: {} + yargs-parser@21.1.1: {} yargs@17.7.3: @@ -14049,6 +15484,11 @@ snapshots: y18n: 5.0.8 yargs-parser: 21.1.1 + yauzl@2.10.0: + dependencies: + buffer-crc32: 0.2.13 + fd-slicer: 1.1.0 + yocto-queue@0.1.0: {} yocto-spinner@1.2.1: -- 2.54.1 From 4578d466a33c6c6d0a103b3210627fb729d5267b Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Wed, 18 Nov 2026 15:03:21 -0500 Subject: [PATCH 2/7] fix(desktop): proxy avatars and cross-compile per OS Avatar requests now go to the selected server, since the bundled UI strips sharp. Windows and Linux runners build both architectures, so three machines cover all five targets. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/desktop-build.yml | 19 ++++++++++--------- apps/desktop/README.md | 23 +++++++++++++---------- apps/desktop/main.cjs | 2 +- apps/desktop/scripts/ci-build.mjs | 7 +++---- 4 files changed, 27 insertions(+), 24 deletions(-) diff --git a/.gitea/workflows/desktop-build.yml b/.gitea/workflows/desktop-build.yml index a8c4826..eb22d28 100644 --- a/.gitea/workflows/desktop-build.yml +++ b/.gitea/workflows/desktop-build.yml @@ -8,7 +8,8 @@ on: jobs: build: - # Native host runners, not the Docker-image runner. See the desktop README. + # Host runners, not the Docker-image runner. Each runner cross-compiles + # both architectures for its OS. See the desktop README. name: Desktop ${{ matrix.target }} runs-on: ${{ matrix.runner }} timeout-minutes: 720 @@ -17,21 +18,21 @@ jobs: matrix: include: - target: windows-x64 - runner: desktop-windows-x64 + runner: desktop-windows arch: x64 - source: ${{ vars.DESKTOP_ELECTRON_SOURCE_WINDOWS_X64 }} + source: ${{ vars.DESKTOP_ELECTRON_SOURCE_WINDOWS }} - target: windows-arm64 - runner: desktop-windows-arm64 + runner: desktop-windows arch: arm64 - source: ${{ vars.DESKTOP_ELECTRON_SOURCE_WINDOWS_ARM64 }} + source: ${{ vars.DESKTOP_ELECTRON_SOURCE_WINDOWS }} - target: linux-x64 - runner: desktop-linux-x64 + runner: desktop-linux arch: x64 - source: ${{ vars.DESKTOP_ELECTRON_SOURCE_LINUX_X64 }} + source: ${{ vars.DESKTOP_ELECTRON_SOURCE_LINUX }} - target: linux-arm64 - runner: desktop-linux-arm64 + runner: desktop-linux arch: arm64 - source: ${{ vars.DESKTOP_ELECTRON_SOURCE_LINUX_ARM64 }} + source: ${{ vars.DESKTOP_ELECTRON_SOURCE_LINUX }} - target: macos-universal runner: desktop-macos arch: universal diff --git a/apps/desktop/README.md b/apps/desktop/README.md index bcc33d3..86cfff1 100644 --- a/apps/desktop/README.md +++ b/apps/desktop/README.md @@ -30,7 +30,7 @@ pnpm build:desktop:runtime This generates `src/out/otunes-/args.gn`, runs GN and Ninja, and extracts `dist.zip` into `apps/desktop/runtime/45.3.0--`. It writes a runtime marker recording the version, platform, architecture and codec build setting. Packaging requires that marker and never downloads stock Electron as a fallback. The marker records build provenance, not a successful decoding test. Keep it with the extracted runtime. -Build natively for Windows and Linux. On macOS, `OTUNES_ELECTRON_ARCH=x64` or `arm64` selects the target CPU, allowing both slices to be compiled on one Mac. The scripts pin Electron 45.3.0. Update `electronVersion` in `scripts/config.mjs` and the checkout tag together when upgrading. The runtime output directory must not already exist. Move or remove a previous output before rebuilding. +`OTUNES_ELECTRON_ARCH=x64` or `arm64` selects the target CPU, so one machine per OS can build both architectures. See the cross-compiling notes under Gitea builds. The scripts pin Electron 45.3.0. Update `electronVersion` in `scripts/config.mjs` and the checkout tag together when upgrading. The runtime output directory must not already exist. Move or remove a previous output before rebuilding. ## Run and package @@ -51,19 +51,22 @@ The desktop gateway binds only to `127.0.0.1:47836`. A single instance owns that `.gitea/workflows/desktop-build.yml` runs manually through `workflow_dispatch` and on `v*` tags, matching the Docker workflow. It builds the custom Electron runtime before each installer and uploads installers to the Actions run with `actions/upload-artifact@v3`. It does not create releases or publish to Flathub. Tags set the installer version, so use semantic version tags such as `v1.2.3`. Manual runs use the desktop package version. -Register these **native host** Gitea runner labels with `:host` execution, not Docker execution: +Register these **host** Gitea runner labels with `:host` execution, not Docker execution. Each Windows and Linux runner cross-compiles both x64 and ARM64, so three machines cover all five targets: -| Runner label | Native Node architecture | Repository Actions variable for the Electron `src` path | Output | +| Runner label | Host CPU | Repository Actions variable for the Electron `src` path | Output | | --- | --- | --- | --- | -| `desktop-windows-x64` | x64 | `DESKTOP_ELECTRON_SOURCE_WINDOWS_X64` | x64 NSIS installer | -| `desktop-windows-arm64` | arm64 | `DESKTOP_ELECTRON_SOURCE_WINDOWS_ARM64` | ARM64 NSIS installer | -| `desktop-linux-x64` | x64 | `DESKTOP_ELECTRON_SOURCE_LINUX_X64` | x86-64 Flatpak | -| `desktop-linux-arm64` | arm64 | `DESKTOP_ELECTRON_SOURCE_LINUX_ARM64` | AArch64 Flatpak | +| `desktop-windows` | x64 | `DESKTOP_ELECTRON_SOURCE_WINDOWS` | x64 and ARM64 NSIS installers | +| `desktop-linux` | x64 | `DESKTOP_ELECTRON_SOURCE_LINUX` | x86-64 and AArch64 Flatpaks | | `desktop-macos` | x64 or arm64 | `DESKTOP_ELECTRON_SOURCE_MACOS` | Universal DMG | -Here x86 means x86-64, not 32-bit IA-32. The workflow installs Node.js 24 and pnpm 10.1.0. The runner and its bootstrap Node.js must themselves be native to the requested architecture. Each runner also needs Git, Bash, Electron's platform build prerequisites, `depot_tools` on PATH, and a synced Electron v45.3.0 checkout prepared as described above. The source path is an absolute path outside the disposable Actions checkout. Separate build machines or checkouts avoid concurrent source-tree builds. GN/Ninja outputs remain in that source tree for incremental rebuilds. The workflow does not update that shared checkout or run `gclient sync` automatically. +Here x86 means x86-64, not 32-bit IA-32. The workflow installs Node.js 24 and pnpm 10.1.0. Each runner needs Git, Bash, Electron's platform build prerequisites, `depot_tools` on PATH, and a synced Electron v45.3.0 checkout prepared as described above. The source path is an absolute path outside the disposable Actions checkout. Both architectures share one checkout with separate `out/otunes-` directories, so set runner capacity to 1. GN/Ninja outputs remain in that source tree for incremental rebuilds. The workflow does not update that shared checkout or run `gclient sync` automatically. -Windows runners need Visual Studio's Electron/Chromium build components and SDK, plus Developer Mode or symlink permissions. The ARM64 runner needs the ARM64 compiler tools. Mac runners need Xcode, its command-line tools, and both macOS SDK architectures. Linux runners need a native Chromium build environment, Flatpak >= 1.12.4, flatpak-builder >= 1.2.2, and a working user session with unprivileged sandbox support. Add Flathub for the runner user before the first build: +Cross-compiling needs extra setup when syncing the checkout: + +- Windows: set `ELECTRON_BUILDING_WOA=1` before `gclient sync` so the ARM64 toolchain is fetched. Electron lists x64 to ARM64 as experimental. +- Linux: install the ARM64 sysroot with `build/linux/sysroot_scripts/install-sysroot.py --arch=arm64` from `src`. Building the AArch64 Flatpak on an x64 host also needs `qemu-user-static` with binfmt support. + +Windows runners need Visual Studio's Electron/Chromium build components and SDK, plus Developer Mode or symlink permissions. Install the ARM64 build tools too. Mac runners need Xcode, its command-line tools, and both macOS SDK architectures. Linux runners need a native Chromium build environment, Flatpak >= 1.12.4, flatpak-builder >= 1.2.2, and a working user session with unprivileged sandbox support. Add Flathub for the runner user before the first build: ```sh flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo @@ -77,7 +80,7 @@ To reproduce the CI build on a prepared runner: ```sh export OTUNES_ELECTRON_SOURCE=/absolute/path/to/electron/src -export OTUNES_DESKTOP_ARCH=universal # macOS; use x64 or arm64 on other hosts +export OTUNES_DESKTOP_ARCH=universal # macOS; x64 or arm64 elsewhere pnpm --filter @otunes/desktop build:ci ``` diff --git a/apps/desktop/main.cjs b/apps/desktop/main.cjs index 25702b6..9e57fb3 100644 --- a/apps/desktop/main.cjs +++ b/apps/desktop/main.cjs @@ -165,7 +165,7 @@ function handleRequest(request, response) { } // Only data routes go to the remote server. All UI and auth routes stay local. const remote = - config && /^\/api\/(song|album|artist|playlist)\//.test(url.pathname) + config && /^\/api\/(song|album|artist|playlist|user)\//.test(url.pathname) const target = new URL( `${url.pathname}${url.search}`, remote ? config.serverUrl : `http://127.0.0.1:${nextPort}` diff --git a/apps/desktop/scripts/ci-build.mjs b/apps/desktop/scripts/ci-build.mjs index 97fcc9b..94eb775 100644 --- a/apps/desktop/scripts/ci-build.mjs +++ b/apps/desktop/scripts/ci-build.mjs @@ -3,13 +3,12 @@ import path from "node:path" import { desktopRoot, electronVersion } from "./config.mjs" const target = process.env.OTUNES_DESKTOP_ARCH +// x64 and arm64 cross-compile from either host CPU. Universal needs a Mac. if ( - !(["x64", "arm64"].includes(target) && target === process.arch) && + !["x64", "arm64"].includes(target) && !(process.platform === "darwin" && target === "universal") ) { - throw new Error( - "Use a native x64/arm64 Node.js runner, or a Mac for universal builds" - ) + throw new Error("Targets are x64 or arm64, or universal on macOS") } if (!process.env.OTUNES_ELECTRON_SOURCE) throw new Error( -- 2.54.1 From 2a77c923326043263ea90e2237cacdb0248529dc Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Wed, 18 Nov 2026 17:00:43 -0500 Subject: [PATCH 3/7] feat(desktop): ship stock Electron for Windows and Linux Drop the custom EAC-3 Chromium build and macOS packaging. Windows NSIS installers and Flatpaks for x64 and ARM64 now build in one Linux container image. Packaged installers previously lost the bundled Next.js dependencies: electron-builder drops the pnpm store and NSIS cannot carry symlinks. The bundle now replaces pnpm links with nested real copies. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/desktop-build.yml | 58 ++++----- .gitignore | 1 - README.md | 4 +- apps/desktop/README.md | 101 +++------------ apps/desktop/package.json | 14 +-- apps/desktop/runtime.gn | 5 - apps/desktop/scripts/build-runtime.mjs | 66 ---------- apps/desktop/scripts/build-web.mjs | 5 +- apps/desktop/scripts/build.test.mjs | 89 ++++++++------ apps/desktop/scripts/ci-build.mjs | 41 ------- apps/desktop/scripts/config.mjs | 42 ------- apps/desktop/scripts/materialize-links.mjs | 64 ++++++++++ apps/desktop/scripts/package.mjs | 122 ++++++++----------- apps/desktop/scripts/prune-native-images.mjs | 7 +- apps/desktop/scripts/start.mjs | 12 -- package.json | 3 +- pnpm-lock.yaml | 108 ++++++++-------- pnpm-workspace.yaml | 1 + 18 files changed, 285 insertions(+), 458 deletions(-) delete mode 100644 apps/desktop/runtime.gn delete mode 100644 apps/desktop/scripts/build-runtime.mjs delete mode 100644 apps/desktop/scripts/ci-build.mjs delete mode 100644 apps/desktop/scripts/config.mjs create mode 100644 apps/desktop/scripts/materialize-links.mjs delete mode 100644 apps/desktop/scripts/start.mjs diff --git a/.gitea/workflows/desktop-build.yml b/.gitea/workflows/desktop-build.yml index eb22d28..d5c5116 100644 --- a/.gitea/workflows/desktop-build.yml +++ b/.gitea/workflows/desktop-build.yml @@ -8,43 +8,26 @@ on: jobs: build: - # Host runners, not the Docker-image runner. Each runner cross-compiles - # both architectures for its OS. See the desktop README. + # Both targets build in electronuserland/builder:wine. Wine lets + # electron-builder stamp the Windows executable; the Flatpak job adds + # flatpak-builder and needs a privileged container for its sandbox. + # See apps/desktop/README.md for the runner setup. name: Desktop ${{ matrix.target }} - runs-on: ${{ matrix.runner }} - timeout-minutes: 720 + runs-on: ubuntu-latest + timeout-minutes: 90 strategy: fail-fast: false matrix: include: - - target: windows-x64 - runner: desktop-windows - arch: x64 - source: ${{ vars.DESKTOP_ELECTRON_SOURCE_WINDOWS }} - - target: windows-arm64 - runner: desktop-windows - arch: arm64 - source: ${{ vars.DESKTOP_ELECTRON_SOURCE_WINDOWS }} - - target: linux-x64 - runner: desktop-linux - arch: x64 - source: ${{ vars.DESKTOP_ELECTRON_SOURCE_LINUX }} - - target: linux-arm64 - runner: desktop-linux - arch: arm64 - source: ${{ vars.DESKTOP_ELECTRON_SOURCE_LINUX }} - - target: macos-universal - runner: desktop-macos - arch: universal - source: ${{ vars.DESKTOP_ELECTRON_SOURCE_MACOS }} + - target: windows + options: "" + - target: linux + options: --privileged + container: + image: electronuserland/builder:wine + options: ${{ matrix.options }} env: - OTUNES_DESKTOP_ARCH: ${{ matrix.arch }} - OTUNES_ELECTRON_SOURCE: ${{ matrix.source }} OTUNES_DESKTOP_REF: ${{ gitea.ref }} - DEPOT_TOOLS_WIN_TOOLCHAIN: "0" - defaults: - run: - shell: bash steps: - name: Checkout repository uses: actions/checkout@v4 @@ -60,17 +43,24 @@ jobs: with: node-version: "24" + - name: Install Flatpak tools + if: matrix.target == 'linux' + run: | + apt-get update + apt-get install -y flatpak flatpak-builder + flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo + - name: Install desktop and web dependencies run: pnpm --filter @otunes/desktop --filter @otunes/web... install --frozen-lockfile - name: Check desktop scripts run: pnpm --filter @otunes/desktop typecheck - - name: Test runtime validation and shared UI packaging + - name: Test UI bundling run: pnpm --filter @otunes/desktop test - - name: Build custom Electron and desktop installers - run: pnpm --filter @otunes/desktop build:ci + - name: Build x64 and ARM64 installers + run: pnpm --filter @otunes/desktop build:${{ matrix.target }} # Gitea's artifact service uses the v3 protocol, not GitHub's v4 service. - name: Upload installers @@ -80,6 +70,4 @@ jobs: path: | apps/desktop/dist/*.exe apps/desktop/dist/*.flatpak - apps/desktop/dist/*.dmg - apps/desktop/dist/*.blockmap if-no-files-found: error diff --git a/.gitignore b/.gitignore index 888545e..daf0f2d 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,5 @@ docker-compose.yml # Electron desktop build artifacts apps/desktop/.package/ apps/desktop/dist/ -apps/desktop/runtime/ apps/web/.next-desktop/ apps/desktop/web/ diff --git a/README.md b/README.md index a7f2670..3d4f0ad 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This project uses [pnpm workspaces](https://pnpm.io/workspaces): | Package | Path | Description | | --- | --- | --- | | `@otunes/web` | `apps/web` | Next.js web app | -| `@otunes/desktop` | `apps/desktop` | Electron client with a custom EAC-3 runtime | +| `@otunes/desktop` | `apps/desktop` | Electron client for Windows and Linux | | `@otunes/mobile` | `apps/mobile` | Expo React Native mobile app | | `@otunes/convex` | `packages/convex` | Shared Convex backend and client types | @@ -98,4 +98,4 @@ Check the releases tab for the latest downloads for apps: [Releases](https://git ## Desktop builds -See [the desktop build guide](apps/desktop/README.md) to compile Electron with EAC-3 support and package the web player for macOS, Windows or Linux. The UI is bundled locally, and users choose their oTunes server before signing in. Platform decoding and spatial Atmos output require separate validation. +See [the desktop build guide](apps/desktop/README.md) to package the web player for Windows or Linux. The UI is bundled locally, and users choose their oTunes server before signing in. diff --git a/apps/desktop/README.md b/apps/desktop/README.md index 86cfff1..2b64a12 100644 --- a/apps/desktop/README.md +++ b/apps/desktop/README.md @@ -1,103 +1,42 @@ # oTunes desktop -The desktop app bundles the web UI and runs its standalone Next.js server on loopback using Electron's Node utility process. It never loads the UI hosted on your music server. On first launch, enter the oTunes server domain, then sign in. The address is saved in the app's user data directory, not compiled into the package. +The Windows and Linux desktop app. It runs stock Electron, bundles the web UI and runs its standalone Next.js server on loopback using Electron's Node utility process. It never loads the UI hosted on your music server. On first launch, enter the oTunes server domain, then sign in. The address is saved in the app's user data directory, not compiled into the package. -For `music.example.com`, Convex connects to `https://convex.music.example.com`. Local hosts follow the mobile convention and use port 3210. The selected oTunes server provides streaming audio and cover art through the desktop's local gateway. Authentication routes stay local and connect to the selected Convex backend. The desktop app does not bundle Convex, FFmpeg or a music library. +For `music.example.com`, Convex connects to `https://convex.music.example.com`. Local hosts follow the mobile convention and use port 3210. The selected oTunes server provides streaming audio, cover art and avatars through the desktop's local gateway. Authentication routes stay local and connect to the selected Convex backend. The desktop app does not bundle Convex, FFmpeg or a music library. The server-entry view uses the web app's controls, colors and logos, with the system theme by default. Use **Server > Change server** to select another server. Switching servers clears the local login session and cached data. -## Build the custom runtime - -Stock Electron does not meet this build's requirements. `runtime.gn` enables Chromium's `enable_platform_ac3_eac3_audio` with proprietary codecs and Chrome FFmpeg branding. This is a compile-time setting, not an Electron command-line switch. Electron and its embedded Chromium must be rebuilt together. - -Install the platform prerequisites and `depot_tools` described in [Electron's source build instructions](https://www.electronjs.org/docs/latest/development/build-instructions-gn). Use a dedicated build machine with enough disk space for Chromium and its dependencies. From a separate, empty source checkout directory: - -```sh -gclient config --name "src/electron" --unmanaged https://github.com/electron/electron -gclient sync --with_branch_heads --with_tags -cd src/electron -git checkout v45.3.0 -gclient sync -f --with_branch_heads --with_tags -``` - -Back in the oTunes repository: - -```sh -pnpm install -export OTUNES_ELECTRON_SOURCE=/absolute/path/to/checkout/src -pnpm build:desktop:runtime -``` - -This generates `src/out/otunes-/args.gn`, runs GN and Ninja, and extracts `dist.zip` into `apps/desktop/runtime/45.3.0--`. It writes a runtime marker recording the version, platform, architecture and codec build setting. Packaging requires that marker and never downloads stock Electron as a fallback. The marker records build provenance, not a successful decoding test. Keep it with the extracted runtime. - -`OTUNES_ELECTRON_ARCH=x64` or `arm64` selects the target CPU, so one machine per OS can build both architectures. See the cross-compiling notes under Gitea builds. The scripts pin Electron 45.3.0. Update `electronVersion` in `scripts/config.mjs` and the checkout tag together when upgrading. The runtime output directory must not already exist. Move or remove a previous output before rebuilding. +Stock Chromium cannot decode EAC-3, so the player's codec check reports no Dolby Atmos support and the server streams the regular track instead. ## Run and package ```sh -export OTUNES_ELECTRON_DIST=/absolute/path/to/otunes/apps/desktop/runtime/45.3.0-darwin-arm64 +pnpm install pnpm dev:desktop -# Or create an installer: +# Or create installers for this OS, x64 and ARM64: pnpm build:desktop +# Or a specific target from a Linux host: +pnpm --filter @otunes/desktop build:windows +pnpm --filter @otunes/desktop build:linux ``` -Both commands first build and bundle the local web UI. `pnpm --filter @otunes/desktop build:web` builds that bundle alone without needing an Electron runtime. Desktop builds use `apps/web/.next-desktop` and copy the standalone output, static assets and public assets into `apps/desktop/web`. Relative pnpm symlinks are preserved so the bundled Next.js dependencies remain resolvable. The web app's normal `.next` output is separate. On Windows, enable Developer Mode or symlink permissions before building. The build rejects absolute junctions or links outside the standalone directory because they cannot be relocated into an installer. +All of these first build and bundle the local web UI. `pnpm --filter @otunes/desktop build:web` builds that bundle alone. Desktop builds use `apps/web/.next-desktop` and copy the standalone output, static assets and public assets into `apps/desktop/web`. Installers cannot carry symlinks, so pnpm's links are replaced with real copies, with each package's dependencies nested under it. The web app's normal `.next` output is separate. On Windows, enable Developer Mode or symlink permissions before building. The build rejects absolute junctions or links outside the standalone directory because they cannot be relocated into an installer. -The desktop gateway binds only to `127.0.0.1:47836`. A single instance owns that port. The bundled Next.js process uses a separate OS-assigned loopback port and restarts when the server selection changes. No external Node.js installation is required by the installed app. `dev:desktop` uses the packaged production UI; it does not start or connect to a web preview channel. +Desktop images bypass Next's optimizer, so the bundle drops Sharp's native libraries. Any other native library fails the build, because it would match the build host rather than the target. -`build:desktop` creates a native package in `apps/desktop/dist`: DMG on macOS, NSIS on Windows, Flatpak on Linux. The same installer can connect to different servers. Signing and macOS notarization use electron-builder's standard environment configuration and require your own credentials. The build does not publish artifacts. +The desktop gateway binds only to `127.0.0.1:47836`. A single instance owns that port. The bundled Next.js process uses a separate OS-assigned loopback port and restarts when the server selection changes. No external Node.js installation is required by the installed app. + +Packaging writes to `apps/desktop/dist`: an NSIS installer per architecture for Windows, a Flatpak per architecture for Linux. To pick one architecture, pass it after the target: `node scripts/package.mjs linux x64`. Building Windows installers on Linux needs Wine. Flatpaks need flatpak-builder with Flathub added, and ARM64 Flatpaks on an x64 host need `qemu-user-static` registered with binfmt. Installers are unsigned unless you configure electron-builder's signing environment. + +Flatpaks pin `org.freedesktop.Platform`, its SDK and `org.electronjs.Electron2.BaseApp` to `25.08`. Network, audio, graphics and display access are enabled. Home-directory access is not needed. ## Gitea builds -`.gitea/workflows/desktop-build.yml` runs manually through `workflow_dispatch` and on `v*` tags, matching the Docker workflow. It builds the custom Electron runtime before each installer and uploads installers to the Actions run with `actions/upload-artifact@v3`. It does not create releases or publish to Flathub. Tags set the installer version, so use semantic version tags such as `v1.2.3`. Manual runs use the desktop package version. +`.gitea/workflows/desktop-build.yml` runs manually and on `v*` tags, matching the Docker workflow. Both jobs run on the `ubuntu-latest` Docker runner and upload installers with `actions/upload-artifact@v3`. Tags set the installer version, so use semantic version tags such as `v1.2.3`. Manual runs use the desktop package version. Nothing is published. -Register these **host** Gitea runner labels with `:host` execution, not Docker execution. Each Windows and Linux runner cross-compiles both x64 and ARM64, so three machines cover all five targets: +Both jobs use the `electronuserland/builder:wine` container: `windows` builds x64 and ARM64 NSIS installers, and `linux` installs flatpak-builder from apt and builds x64 and ARM64 Flatpaks. -| Runner label | Host CPU | Repository Actions variable for the Electron `src` path | Output | -| --- | --- | --- | --- | -| `desktop-windows` | x64 | `DESKTOP_ELECTRON_SOURCE_WINDOWS` | x64 and ARM64 NSIS installers | -| `desktop-linux` | x64 | `DESKTOP_ELECTRON_SOURCE_LINUX` | x86-64 and AArch64 Flatpaks | -| `desktop-macos` | x64 or arm64 | `DESKTOP_ELECTRON_SOURCE_MACOS` | Universal DMG | +The Linux job needs two things from the runner host: -Here x86 means x86-64, not 32-bit IA-32. The workflow installs Node.js 24 and pnpm 10.1.0. Each runner needs Git, Bash, Electron's platform build prerequisites, `depot_tools` on PATH, and a synced Electron v45.3.0 checkout prepared as described above. The source path is an absolute path outside the disposable Actions checkout. Both architectures share one checkout with separate `out/otunes-` directories, so set runner capacity to 1. GN/Ninja outputs remain in that source tree for incremental rebuilds. The workflow does not update that shared checkout or run `gclient sync` automatically. - -Cross-compiling needs extra setup when syncing the checkout: - -- Windows: set `ELECTRON_BUILDING_WOA=1` before `gclient sync` so the ARM64 toolchain is fetched. Electron lists x64 to ARM64 as experimental. -- Linux: install the ARM64 sysroot with `build/linux/sysroot_scripts/install-sysroot.py --arch=arm64` from `src`. Building the AArch64 Flatpak on an x64 host also needs `qemu-user-static` with binfmt support. - -Windows runners need Visual Studio's Electron/Chromium build components and SDK, plus Developer Mode or symlink permissions. Install the ARM64 build tools too. Mac runners need Xcode, its command-line tools, and both macOS SDK architectures. Linux runners need a native Chromium build environment, Flatpak >= 1.12.4, flatpak-builder >= 1.2.2, and a working user session with unprivileged sandbox support. Add Flathub for the runner user before the first build: - -```sh -flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo -``` - -Flatpaks pin `org.freedesktop.Platform`, its SDK and `org.electronjs.Electron2.BaseApp` to `25.08`. Network, audio, graphics and display access are enabled. Home-directory access is not needed. Builds can install the matching runtime/SDK/BaseApp from Flathub for their architecture. - -The Universal job compiles separate x64 and ARM64 Electron distributions, validates each marker, and gives electron-builder the corresponding runtime for each slice before merging the app. The bundled UI is shared between slices. Since desktop images bypass Next's optimizer, the bundle excludes unused Sharp native libraries. Any other native library makes the build fail so a host-specific dependency cannot silently enter the Universal app. - -To reproduce the CI build on a prepared runner: - -```sh -export OTUNES_ELECTRON_SOURCE=/absolute/path/to/electron/src -export OTUNES_DESKTOP_ARCH=universal # macOS; x64 or arm64 elsewhere -pnpm --filter @otunes/desktop build:ci -``` - -Signing/notarization credentials are not configured by this workflow. Configure electron-builder's signing environment on trusted runners if signed installers are required. Without credentials the resulting installers are unsigned, and macOS may require approval to open them. - -## EAC-3 and Atmos limits - -The build flag enables EAC-3 media handling. A platform decoder is still required. Chromium's [decoder support checks](https://chromium.googlesource.com/chromium/src/+/main/media/base/supported_types.cc) consult platform codec support on macOS and Windows. Linux does not gain a software EAC-3 decoder just by enabling this flag. Linux packaging is available, but EAC-3 playback is not promised there. - -EAC-3 decoding and spatial Dolby Atmos rendering are separate capabilities. Decoding may produce channel-based PCM without preserving Atmos object metadata. The flag does not add Dolby licensing, guarantee HDMI passthrough, or guarantee spatial output on any OS or audio device. Review codec distribution requirements before distributing a custom runtime. - -Validate on each target OS and output device before releasing: - -1. Open the desktop client against a test server with a known EAC-3 track. -2. Confirm the existing playback settings allow the Atmos preference, enable it, and play the track. The app uses browser codec detection, with no desktop override that forces support to true. -3. Confirm the stream contains EAC-3 and playback advances with audible output. MIME support alone is not a decode test. -4. Verify spatial output separately using the OS or receiver's output diagnostics. A track badge does not prove Atmos rendering. -5. Check normal AAC/lossless playback and seeking too. - -The source build is intentionally separate from app packaging because rebuilding Chromium is expensive. No custom runtime binary is checked into this repository. +- Privileged job containers, since flatpak-builder sandboxes its build. Set `container.privileged: true` in the runner's config. +- An ARM64 binfmt handler. Register it once with `apt install qemu-user-static` on Debian/Ubuntu, which persists across reboots. diff --git a/apps/desktop/package.json b/apps/desktop/package.json index b36ec59..34fddb5 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -2,20 +2,20 @@ "name": "@otunes/desktop", "version": "0.0.1", "private": true, - "description": "oTunes desktop client with a custom EAC-3 Electron runtime", + "description": "oTunes desktop client for Windows and Linux", "author": "oTunes contributors", "main": "main.cjs", "scripts": { - "start": "pnpm build:web && node scripts/start.mjs", + "start": "pnpm build:web && electron .", "build": "pnpm build:web && node scripts/package.mjs", - "build:runtime": "node scripts/build-runtime.mjs", - "typecheck": "node --check main.cjs && node --check scripts/config.mjs && node --check scripts/start.mjs && node --check scripts/package.mjs && node --check scripts/build-runtime.mjs && node --check server-config.cjs && node --check scripts/build-web.mjs && node --check scripts/ci-build.mjs && node --check scripts/prune-native-images.mjs", + "build:windows": "pnpm build:web && node scripts/package.mjs windows", + "build:linux": "pnpm build:web && node scripts/package.mjs linux", "build:web": "node scripts/build-web.mjs", - "build:ci": "node scripts/ci-build.mjs", + "typecheck": "node --check main.cjs && node --check server-config.cjs && node --check scripts/build-web.mjs && node --check scripts/package.mjs && node --check scripts/prune-native-images.mjs && node --check scripts/materialize-links.mjs", "test": "node --test scripts/build.test.mjs" }, "devDependencies": { - "electron-builder": "26.18.0", - "extract-zip": "2.0.1" + "electron": "45.3.4", + "electron-builder": "26.18.0" } } diff --git a/apps/desktop/runtime.gn b/apps/desktop/runtime.gn deleted file mode 100644 index 4a8d321..0000000 --- a/apps/desktop/runtime.gn +++ /dev/null @@ -1,5 +0,0 @@ -import("//electron/build/args/release.gn") - -proprietary_codecs = true -ffmpeg_branding = "Chrome" -enable_platform_ac3_eac3_audio = true diff --git a/apps/desktop/scripts/build-runtime.mjs b/apps/desktop/scripts/build-runtime.mjs deleted file mode 100644 index 4da5e6e..0000000 --- a/apps/desktop/scripts/build-runtime.mjs +++ /dev/null @@ -1,66 +0,0 @@ -import { execFileSync } from "node:child_process" -import { mkdir, readFile, writeFile, access } from "node:fs/promises" -import path from "node:path" -import extract from "extract-zip" -import { desktopRoot, electronVersion } from "./config.mjs" - -if (!process.env.OTUNES_ELECTRON_SOURCE) { - throw new Error( - "Set OTUNES_ELECTRON_SOURCE to a synced Electron src directory. See apps/desktop/README.md." - ) -} -const source = path.resolve(process.env.OTUNES_ELECTRON_SOURCE) -const tag = execFileSync( - "git", - ["describe", "--tags", "--exact-match", "HEAD"], - { - cwd: path.join(source, "electron"), - encoding: "utf8", - } -).trim() -if (tag !== `v${electronVersion}`) - throw new Error(`Check out and sync Electron v${electronVersion} first`) -await access(path.join(source, "media", "media_options.gni")) -const arch = process.env.OTUNES_ELECTRON_ARCH ?? process.arch -if (!["x64", "arm64"].includes(arch)) - throw new Error("Electron target must be x64 or arm64") -const outputName = `out/otunes-${arch}` -const output = path.join(source, outputName) -await mkdir(output, { recursive: true }) -await writeFile( - path.join(output, "args.gn"), - `${await readFile(path.join(desktopRoot, "runtime.gn"), "utf8")}\ntarget_cpu = "${arch}"\n` -) -for (const [command, args] of [ - ["gn", ["gen", outputName, "--fail-on-unused-args"]], - ["ninja", ["-C", outputName, "electron:electron_dist_zip"]], -]) { - execFileSync(command, args, { - cwd: source, - stdio: "inherit", - shell: process.platform === "win32", - }) -} -// Use a fresh directory so stale files cannot enter a packaged runtime. -const distribution = path.join( - desktopRoot, - "runtime", - `${electronVersion}-${process.platform}-${arch}` -) -await mkdir(path.dirname(distribution), { recursive: true }) -await mkdir(distribution) -await extract(path.join(output, "dist.zip"), { dir: distribution }) -await writeFile( - path.join(distribution, "otunes-runtime.json"), - JSON.stringify( - { - version: electronVersion, - platform: process.platform, - arch, - enable_platform_ac3_eac3_audio: true, - }, - null, - 2 - ) -) -console.log(`Custom runtime ready. Set OTUNES_ELECTRON_DIST=${distribution}`) diff --git a/apps/desktop/scripts/build-web.mjs b/apps/desktop/scripts/build-web.mjs index 4ab0f68..722f171 100644 --- a/apps/desktop/scripts/build-web.mjs +++ b/apps/desktop/scripts/build-web.mjs @@ -2,9 +2,11 @@ import { execFileSync } from "node:child_process" import { createRequire } from "node:module" import { cp, mkdir, rm, readdir, readlink, realpath } from "node:fs/promises" import path from "node:path" +import { materializeLinks } from "./materialize-links.mjs" import { pruneNativeImages } from "./prune-native-images.mjs" -import { desktopRoot } from "./config.mjs" +import { fileURLToPath } from "node:url" +const desktopRoot = fileURLToPath(new URL("../", import.meta.url)) const web = path.resolve(desktopRoot, "../web") const webRequire = createRequire(path.join(web, "package.json")) execFileSync( @@ -65,4 +67,5 @@ await cp(path.join(web, "public"), path.join(app, "public"), { recursive: true, }) +await materializeLinks(destination) await pruneNativeImages(destination) diff --git a/apps/desktop/scripts/build.test.mjs b/apps/desktop/scripts/build.test.mjs index afa3b8e..39fef30 100644 --- a/apps/desktop/scripts/build.test.mjs +++ b/apps/desktop/scripts/build.test.mjs @@ -7,11 +7,13 @@ import { readFile, rm, access, + symlink, + lstat, } from "node:fs/promises" import os from "node:os" import path from "node:path" -import { customRuntime, electronVersion } from "./config.mjs" import { pruneNativeImages } from "./prune-native-images.mjs" +import { materializeLinks } from "./materialize-links.mjs" async function fixture(run) { const directory = await mkdtemp(path.join(os.tmpdir(), "otunes-build-")) @@ -22,60 +24,26 @@ async function fixture(run) { } } -test("runtime validation uses the target architecture and requires the EAC-3 build marker", async () => { - await fixture(async (directory) => { - const arch = process.arch === "x64" ? "arm64" : "x64" - const executable = - process.platform === "darwin" - ? "Electron.app/Contents/MacOS/Electron" - : process.platform === "win32" - ? "electron.exe" - : "electron" - await mkdir(path.dirname(path.join(directory, executable)), { - recursive: true, - }) - await writeFile(path.join(directory, executable), "fixture") - const manifest = { - version: electronVersion, - platform: process.platform, - arch, - enable_platform_ac3_eac3_audio: true, - } - const marker = path.join(directory, "otunes-runtime.json") - await writeFile(marker, JSON.stringify(manifest)) - assert.equal((await customRuntime(arch, directory)).directory, directory) - await assert.rejects( - customRuntime(process.arch, directory), - /with EAC-3 enabled/ - ) - await writeFile( - marker, - JSON.stringify({ ...manifest, enable_platform_ac3_eac3_audio: false }) - ) - await assert.rejects(customRuntime(arch, directory), /with EAC-3 enabled/) - }) -}) - -test("the shared UI drops unused Sharp binaries but keeps JavaScript and package metadata", async () => { +test("the UI bundle drops unused Sharp binaries but keeps JavaScript and package metadata", async () => { await fixture(async (directory) => { const lib = path.join( directory, "node_modules", "@img", - "sharp-darwin-arm64", + "sharp-linux-x64", "lib" ) await mkdir(lib, { recursive: true }) for (const file of [ "sharp.node", - "libvips.dylib", + "libvips-cpp.so.8.17.3", "index.js", "debug.node.js", "package.json", ]) await writeFile(path.join(lib, file), file) await pruneNativeImages(directory) - for (const file of ["sharp.node", "libvips.dylib"]) + for (const file of ["sharp.node", "libvips-cpp.so.8.17.3"]) await assert.rejects(access(path.join(lib, file))) assert.equal(await readFile(path.join(lib, "index.js"), "utf8"), "index.js") await access(path.join(lib, "debug.node.js")) @@ -83,7 +51,7 @@ test("the shared UI drops unused Sharp binaries but keeps JavaScript and package }) }) -test("new native dependencies fail the shared UI build instead of shipping a host-only binary", async () => { +test("new native dependencies fail the UI build instead of shipping a build-host binary", async () => { await fixture(async (directory) => { await writeFile(path.join(directory, "new-dependency.node"), "fixture") await assert.rejects( @@ -93,3 +61,44 @@ test("new native dependencies fail the shared UI build instead of shipping a hos await access(path.join(directory, "new-dependency.node")) }) }) + +test("pnpm links become real copies that keep each package's dependency versions", async () => { + await fixture(async (directory) => { + const store = path.join(directory, "node_modules", ".pnpm") + async function storePackage(id, name, version, dependencies = {}) { + const root = path.join(store, id, "node_modules") + await mkdir(path.join(root, name), { recursive: true }) + await writeFile(path.join(root, name, "package.json"), version) + for (const [dependency, target] of Object.entries(dependencies)) + await symlink( + path.relative( + root, + path.join(store, target, "node_modules", dependency) + ), + path.join(root, dependency) + ) + } + await storePackage("react@1", "react", "1") + await storePackage("react@2", "react", "2") + await storePackage("next@1", "next", "next", { react: "react@1" }) + await storePackage("convex@1", "convex", "convex", { react: "react@2" }) + const app = path.join(directory, "apps", "web", "node_modules") + await mkdir(app, { recursive: true }) + await symlink( + "../../../node_modules/.pnpm/next@1/node_modules/next", + path.join(app, "next") + ) + await symlink( + "../../../node_modules/.pnpm/convex@1/node_modules/convex", + path.join(app, "convex") + ) + + await materializeLinks(directory) + + const read = (file) => readFile(path.join(app, file), "utf8") + assert.equal(await read("next/node_modules/react/package.json"), "1") + assert.equal(await read("convex/node_modules/react/package.json"), "2") + assert.equal((await lstat(path.join(app, "next"))).isSymbolicLink(), false) + await assert.rejects(access(store)) + }) +}) diff --git a/apps/desktop/scripts/ci-build.mjs b/apps/desktop/scripts/ci-build.mjs deleted file mode 100644 index 94eb775..0000000 --- a/apps/desktop/scripts/ci-build.mjs +++ /dev/null @@ -1,41 +0,0 @@ -import { execFileSync } from "node:child_process" -import path from "node:path" -import { desktopRoot, electronVersion } from "./config.mjs" - -const target = process.env.OTUNES_DESKTOP_ARCH -// x64 and arm64 cross-compile from either host CPU. Universal needs a Mac. -if ( - !["x64", "arm64"].includes(target) && - !(process.platform === "darwin" && target === "universal") -) { - throw new Error("Targets are x64 or arm64, or universal on macOS") -} -if (!process.env.OTUNES_ELECTRON_SOURCE) - throw new Error( - "Configure the runner's Electron source path. See apps/desktop/README.md." - ) -function run(script, env = {}) { - execFileSync(process.execPath, [path.join(desktopRoot, "scripts", script)], { - stdio: "inherit", - env: { ...process.env, ...env }, - }) -} -const architectures = target === "universal" ? ["x64", "arm64"] : [target] -for (const arch of architectures) - run("build-runtime.mjs", { OTUNES_ELECTRON_ARCH: arch }) -run("build-web.mjs") -const distribution = (arch) => - path.join( - desktopRoot, - "runtime", - `${electronVersion}-${process.platform}-${arch}` - ) -run( - "package.mjs", - target === "universal" - ? { - OTUNES_ELECTRON_DIST_X64: distribution("x64"), - OTUNES_ELECTRON_DIST_ARM64: distribution("arm64"), - } - : { OTUNES_ELECTRON_DIST: distribution(target) } -) diff --git a/apps/desktop/scripts/config.mjs b/apps/desktop/scripts/config.mjs deleted file mode 100644 index 18caddd..0000000 --- a/apps/desktop/scripts/config.mjs +++ /dev/null @@ -1,42 +0,0 @@ -import { readFile, access } from "node:fs/promises" -import path from "node:path" -import { fileURLToPath } from "node:url" - -export const desktopRoot = fileURLToPath(new URL("../", import.meta.url)) -export const electronVersion = "45.3.0" - -// The build recipe writes this marker only after the custom runtime compiles. -export async function customRuntime( - arch = process.arch, - location = process.env.OTUNES_ELECTRON_DIST -) { - if (!location) { - throw new Error( - "Set OTUNES_ELECTRON_DIST to the extracted custom Electron distribution. Stock Electron is not supported." - ) - } - const directory = path.resolve(location) - const manifest = JSON.parse( - await readFile(path.join(directory, "otunes-runtime.json"), "utf8") - ) - if ( - manifest.version !== electronVersion || - manifest.platform !== process.platform || - manifest.arch !== arch || - manifest.enable_platform_ac3_eac3_audio !== true - ) { - throw new Error( - `Custom runtime must be Electron ${electronVersion} with EAC-3 enabled for ${process.platform}/${arch}` - ) - } - const executable = path.join( - directory, - process.platform === "darwin" - ? "Electron.app/Contents/MacOS/Electron" - : process.platform === "win32" - ? "electron.exe" - : "electron" - ) - await access(executable) - return { directory, executable } -} diff --git a/apps/desktop/scripts/materialize-links.mjs b/apps/desktop/scripts/materialize-links.mjs new file mode 100644 index 0000000..b891f9b --- /dev/null +++ b/apps/desktop/scripts/materialize-links.mjs @@ -0,0 +1,64 @@ +import { cp, readdir, realpath, rm } from "node:fs/promises" +import path from "node:path" + +// Installers cannot carry pnpm's symlinks: NSIS extracts them as broken files +// and electron-builder drops the `.pnpm` store. Replace every link outside the +// store with a real copy, nesting each package's dependencies under it (npm v2 +// layout) so Node resolves the same versions pnpm chose. Then drop the store. +export async function materializeLinks(directory) { + const store = path.join(directory, "node_modules", ".pnpm") + for (const link of await findLinks(directory, store)) { + const real = await realpath(link) + await rm(link) + await copyPackage(real, link, new Set()) + } + await rm(store, { recursive: true, force: true }) +} + +async function findLinks(directory, store) { + const links = [] + for (const entry of await readdir(directory, { withFileTypes: true })) { + const file = path.join(directory, entry.name) + if (file === store) continue + if (entry.isSymbolicLink()) links.push(file) + else if (entry.isDirectory()) links.push(...(await findLinks(file, store))) + } + return links +} + +// `real` is //node_modules/; its siblings are its dependencies. +async function copyPackage(real, destination, ancestors) { + const match = /^(.*[\\/]\.pnpm[\\/][^\\/]+[\\/]node_modules)[\\/](.+)$/.exec( + real + ) + if (!match) throw new Error(`Link outside the pnpm store: ${real}`) + const [, root, name] = match + await cp(real, destination, { recursive: true }) + const chain = new Set(ancestors).add(real) + for (const dependency of await packageNames(root)) { + if (dependency === name.split(path.sep).join("/")) continue + const source = await realpath(path.join(root, dependency)) + // A package that depends on an ancestor resolves it by walking up. + if (chain.has(source)) continue + await copyPackage( + source, + path.join(destination, "node_modules", dependency), + chain + ) + } +} + +// Package names in a node_modules directory, including @scope/name. +async function packageNames(directory) { + const names = [] + for (const entry of await readdir(directory)) { + if (entry.startsWith(".")) continue + if (!entry.startsWith("@")) { + names.push(entry) + continue + } + for (const scoped of await readdir(path.join(directory, entry))) + names.push(`${entry}/${scoped}`) + } + return names +} diff --git a/apps/desktop/scripts/package.mjs b/apps/desktop/scripts/package.mjs index 54b7842..8680e52 100644 --- a/apps/desktop/scripts/package.mjs +++ b/apps/desktop/scripts/package.mjs @@ -1,38 +1,27 @@ import { build, Platform, Arch } from "electron-builder" import { mkdir, copyFile, writeFile, rm, readFile } from "node:fs/promises" +import { createRequire } from "node:module" import path from "node:path" -import { customRuntime, desktopRoot, electronVersion } from "./config.mjs" +import { fileURLToPath } from "node:url" + +// Packages stock Electron with the bundled UI from build-web.mjs. +// Usage: node scripts/package.mjs [windows|linux] [x64|arm64] +// Defaults to the host OS and both architectures. Linux hosts can build both +// targets: Windows needs Wine, ARM64 Flatpaks need qemu-user binfmt. +const desktopRoot = fileURLToPath(new URL("../", import.meta.url)) +const hostTarget = { win32: "windows", linux: "linux" }[process.platform] +const [target = hostTarget, onlyArch] = process.argv.slice(2) +const platform = { windows: Platform.WINDOWS, linux: Platform.LINUX }[target] +if (!platform) throw new Error("Targets are windows or linux") +const architectures = onlyArch ? [onlyArch] : ["x64", "arm64"] +if (!architectures.every((arch) => arch === "x64" || arch === "arm64")) + throw new Error("Architectures are x64 or arm64") -const arch = process.env.OTUNES_DESKTOP_ARCH ?? process.arch -if ( - !["x64", "arm64", "universal"].includes(arch) || - (arch === "universal" && process.platform !== "darwin") -) { - throw new Error("Supported targets are x64, arm64 and macOS universal") -} -const runtimes = - arch === "universal" - ? { - x64: await customRuntime("x64", process.env.OTUNES_ELECTRON_DIST_X64), - arm64: await customRuntime( - "arm64", - process.env.OTUNES_ELECTRON_DIST_ARM64 - ), - } - : { [arch]: await customRuntime(arch) } -const platform = - process.platform === "darwin" - ? Platform.MAC - : process.platform === "win32" - ? Platform.WINDOWS - : Platform.LINUX const staging = path.join(desktopRoot, ".package") await rm(staging, { recursive: true, force: true }) await mkdir(staging, { recursive: true }) -await copyFile( - path.join(desktopRoot, "main.cjs"), - path.join(staging, "main.cjs") -) +for (const file of ["main.cjs", "server-config.cjs"]) + await copyFile(path.join(desktopRoot, file), path.join(staging, file)) const pkg = JSON.parse( await readFile(path.join(desktopRoot, "package.json"), "utf8") ) @@ -45,49 +34,42 @@ await writeFile( path.join(staging, "package.json"), JSON.stringify(pkg, null, 2) ) -await copyFile( - path.join(desktopRoot, "server-config.cjs"), - path.join(staging, "server-config.cjs") -) -await build({ - targets: platform.createTarget(undefined, Arch[arch]), - config: { - appId: "com.otunes.desktop", - productName: "oTunes", - electronVersion, - // Return a missing path for unexpected architectures so builder fails closed. - // Throwing inside this hook lets electron-builder fall back to stock Electron. - electronDist: ({ arch: runtimeArch }) => - runtimes[runtimeArch]?.directory ?? - path.join(desktopRoot, "runtime", `unsupported-${runtimeArch}`), - artifactName: "oTunes-${version}-${os}-${arch}.${ext}", - directories: { app: staging, output: path.join(desktopRoot, "dist") }, - files: ["main.cjs", "server-config.cjs", "package.json"], - extraResources: [ - { from: path.join(desktopRoot, "web"), to: "web", filter: ["**/*"] }, - ], - npmRebuild: false, - mac: { category: "public.app-category.music", target: ["dmg"] }, - win: { target: ["nsis"] }, - linux: { - category: "AudioVideo", - target: ["flatpak"], +const { version: electronVersion } = createRequire(import.meta.url)( + "electron/package.json" +) +// One build per architecture: a multi-arch NSIS build merges both into one installer. +for (const arch of architectures) { + await build({ + targets: platform.createTarget(undefined, Arch[arch]), + config: { + appId: "com.otunes.desktop", + productName: "oTunes", + electronVersion, + artifactName: "oTunes-${version}-${os}-${arch}.${ext}", icon: path.resolve(desktopRoot, "../web/public/logo.png"), - }, - flatpak: { - runtimeVersion: "25.08", - baseVersion: "25.08", - finishArgs: [ - "--socket=wayland", - "--socket=fallback-x11", - "--share=ipc", - "--device=dri", - "--socket=pulseaudio", - "--share=network", + directories: { app: staging, output: path.join(desktopRoot, "dist") }, + files: ["main.cjs", "server-config.cjs", "package.json"], + extraResources: [ + { from: path.join(desktopRoot, "web"), to: "web", filter: ["**/*"] }, ], + npmRebuild: false, + win: { target: ["nsis"] }, + linux: { category: "AudioVideo", target: ["flatpak"] }, + flatpak: { + runtimeVersion: "25.08", + baseVersion: "25.08", + finishArgs: [ + "--socket=wayland", + "--socket=fallback-x11", + "--share=ipc", + "--device=dri", + "--socket=pulseaudio", + "--share=network", + ], + }, + publish: null, }, - publish: null, - }, - publish: "never", -}) + publish: "never", + }) +} diff --git a/apps/desktop/scripts/prune-native-images.mjs b/apps/desktop/scripts/prune-native-images.mjs index 3e444f6..f88dfb2 100644 --- a/apps/desktop/scripts/prune-native-images.mjs +++ b/apps/desktop/scripts/prune-native-images.mjs @@ -2,12 +2,15 @@ import { readdir, rm } from "node:fs/promises" import path from "node:path" // Desktop images bypass Next's optimizer. Its traced Sharp binaries are unused -// and would otherwise make the shared web bundle specific to the build host. +// and match the build host, not the target (Windows installers build on Linux). export async function pruneNativeImages(directory) { for (const entry of await readdir(directory, { withFileTypes: true })) { const file = path.join(directory, entry.name) if (entry.isDirectory()) await pruneNativeImages(file) - else if (entry.isFile() && /\.(node|dylib|dll)$|\.so(?:\.\d+)*$/.test(entry.name)) { + else if ( + entry.isFile() && + /\.(node|dylib|dll)$|\.so(?:\.\d+)*$/.test(entry.name) + ) { if (!file.includes(`${path.sep}@img${path.sep}sharp-`)) { throw new Error( `Unexpected native dependency in the desktop web bundle: ${file}` diff --git a/apps/desktop/scripts/start.mjs b/apps/desktop/scripts/start.mjs deleted file mode 100644 index c925557..0000000 --- a/apps/desktop/scripts/start.mjs +++ /dev/null @@ -1,12 +0,0 @@ -import { spawn } from "node:child_process" -import { customRuntime, desktopRoot } from "./config.mjs" - -const runtime = await customRuntime() -const child = spawn(runtime.executable, [desktopRoot], { - stdio: "inherit", - env: process.env, -}) -child.on("error", (error) => { - throw error -}) -child.on("exit", (code) => process.exit(code ?? 1)) diff --git a/package.json b/package.json index d259b85..fd46db4 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,7 @@ "format": "prettier --write \"**/*.{ts,tsx}\"", "typecheck": "pnpm -r typecheck", "dev:desktop": "pnpm --filter @otunes/desktop start", - "build:desktop": "pnpm --filter @otunes/desktop build", - "build:desktop:runtime": "pnpm --filter @otunes/desktop build:runtime" + "build:desktop": "pnpm --filter @otunes/desktop build" }, "devDependencies": { "prettier": "^3.8.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1801046..65a05fd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -255,12 +255,12 @@ importers: apps/desktop: devDependencies: + electron: + specifier: 45.3.4 + version: 45.3.4(supports-color@8.1.1) electron-builder: specifier: 26.18.0 version: 26.18.0(electron-builder-squirrel-windows@26.18.0)(supports-color@8.1.1) - extract-zip: - specifier: 2.0.1 - version: 2.0.1(supports-color@8.1.1) apps/mobile: dependencies: @@ -1023,6 +1023,10 @@ packages: '@dotenvx/primitives@0.8.0': resolution: {integrity: sha512-VYJy0uhFm9zTJ1TxBaW/pA8bjbOM/OttaNMwZ1RHG4JKyRG7DhSdiqD1ipQoAyoD22olUtxbP78W9xY3Wd11bg==} + '@electron-internal/extract-zip@1.0.8': + resolution: {integrity: sha512-8iajeLFbzNwM0m3AsQZSZgYREWglAImyGvvFSWU34FgMW8sHlzdwj9QKvv9dgN7jMP591EFUF/sLOC3Jl9YIjQ==} + engines: {node: '>=22.12.0'} + '@electron/asar@3.4.1': resolution: {integrity: sha512-i4/rNPRS84t0vSRa2HorerGRXWyF4vThfHesw0dmcWHp+cspK743UanA0suA5Q5y8kzY2y6YKrvbIUn69BCAiA==} engines: {node: '>=10.12.0'} @@ -1036,6 +1040,10 @@ packages: resolution: {integrity: sha512-F+nKc0xW+kVbBRhFzaMgPy3KwmuNTYX1fx6+FxxoSnNgwYX6LD7AKBTWkU0MQ6IBoe7dz069CNkR673sPAgkCQ==} engines: {node: '>=14'} + '@electron/get@5.1.0': + resolution: {integrity: sha512-3kSBtG8ObcTVfXanm5vVJ6UnBLEVmVsRk1M+vGqCuMBV+XLCbJYuWQful+yIy0GQDsSlK0kHEriEHn7SPk4EnA==} + engines: {node: '>=22.12.0'} + '@electron/notarize@2.5.0': resolution: {integrity: sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A==} engines: {node: '>= 10.0.0'} @@ -2974,6 +2982,9 @@ packages: '@types/node@20.19.43': resolution: {integrity: sha512-6oYBAi5ikg4Pl+kGsoYtawUMBT2zZMCvPNF7pVLnHZfd1zf38DRiWn/gT01RYCdUqkv7Fhr+C9ot4/tb+2sVvA==} + '@types/node@24.19.2': + resolution: {integrity: sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==} + '@types/react-dom@19.3.0': resolution: {integrity: sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==} peerDependencies: @@ -3000,9 +3011,6 @@ packages: '@types/yargs@17.0.35': resolution: {integrity: sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==} - '@types/yauzl@2.10.3': - resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.63.0': resolution: {integrity: sha512-rvwSgqT+DHpWdzfSzPatRLm02a0GlESt++9iy3hLCDY4BgkaLcl8LBi9Yh7XGFBpwcBE/K3024QuXWTpbz4FfQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -3584,9 +3592,6 @@ packages: bser@2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} - buffer-crc32@0.2.13: - resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} - buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} @@ -4129,6 +4134,11 @@ packages: resolution: {integrity: sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==} engines: {node: '>=8.0.0'} + electron@45.3.4: + resolution: {integrity: sha512-cqU5u6arfGd9KJvCODjj32ckxkDQbweTL3v8J51tAsKGmDWYKcAqszvie0NDKBIGl6Ze19QTL74yIAUHrqNDig==} + engines: {node: '>= 22.12.0'} + hasBin: true + embla-carousel-react@8.6.0: resolution: {integrity: sha512-0/PjqU7geVmo6F734pmPqpyHqiM99olvyecY7zdweCw+6tKEXnrE90pBiBbMMU8s5tICemzpQ3hi5EpxzGW+JA==} peerDependencies: @@ -4178,6 +4188,10 @@ packages: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} + env-paths@3.0.0: + resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + err-code@2.0.3: resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} @@ -4695,11 +4709,6 @@ packages: resolution: {integrity: sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==} engines: {node: '>= 18'} - extract-zip@2.0.1: - resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} - engines: {node: '>= 10.17.0'} - hasBin: true - fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -4731,9 +4740,6 @@ packages: fb-watchman@2.0.2: resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} - fd-slicer@1.1.0: - resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} - fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} @@ -6108,9 +6114,6 @@ packages: resolution: {integrity: sha512-eRWB5LBz7PpDu4PUlwT0PhnQfTQJlDDdPa35urV4Osrm0t0AqQFGn+UIkU3klZvwJ8KPO3VbBFsXquA6p6kqZw==} engines: {node: '>=12', npm: '>=6'} - pend@1.2.0: - resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} - picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -7177,6 +7180,9 @@ packages: undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + undici-types@7.24.6: + resolution: {integrity: sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==} + undici@6.29.1: resolution: {integrity: sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==} engines: {node: '>=18.17'} @@ -7439,9 +7445,6 @@ packages: resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} engines: {node: '>=12'} - yauzl@2.10.0: - resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} - yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -8062,6 +8065,8 @@ snapshots: '@dotenvx/primitives@0.8.0': {} + '@electron-internal/extract-zip@1.0.8': {} + '@electron/asar@3.4.1': dependencies: commander: 5.1.0 @@ -8088,6 +8093,19 @@ snapshots: transitivePeerDependencies: - supports-color + '@electron/get@5.1.0(supports-color@8.1.1)': + dependencies: + debug: 4.4.3(supports-color@8.1.1) + env-paths: 3.0.0 + graceful-fs: 4.2.11 + progress: 2.0.3 + semver: 7.8.5 + sumchecker: 3.0.1(supports-color@8.1.1) + optionalDependencies: + undici: 7.30.2 + transitivePeerDependencies: + - supports-color + '@electron/notarize@2.5.0(supports-color@8.1.1)': dependencies: debug: 4.4.3(supports-color@8.1.1) @@ -10339,6 +10357,10 @@ snapshots: dependencies: undici-types: 6.21.0 + '@types/node@24.19.2': + dependencies: + undici-types: 7.24.6 + '@types/react-dom@19.3.0(@types/react@19.3.0)': dependencies: '@types/react': 19.3.0 @@ -10365,11 +10387,6 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@types/yauzl@2.10.3': - dependencies: - '@types/node': 20.19.43 - optional: true - '@typescript-eslint/eslint-plugin@8.63.0(@typescript-eslint/parser@8.63.0(eslint@9.39.4(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3))(eslint@9.39.4(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 @@ -11093,8 +11110,6 @@ snapshots: dependencies: node-int64: 0.4.0 - buffer-crc32@0.2.13: {} - buffer-from@1.1.2: {} buffer@5.7.1: @@ -11666,6 +11681,14 @@ snapshots: transitivePeerDependencies: - supports-color + electron@45.3.4(supports-color@8.1.1): + dependencies: + '@electron-internal/extract-zip': 1.0.8 + '@electron/get': 5.1.0(supports-color@8.1.1) + '@types/node': 24.19.2 + transitivePeerDependencies: + - supports-color + embla-carousel-react@8.6.0(react@19.3.1): dependencies: embla-carousel: 8.6.0 @@ -11706,6 +11729,8 @@ snapshots: env-paths@2.2.1: {} + env-paths@3.0.0: {} + err-code@2.0.3: {} error-ex@1.3.4: @@ -12477,16 +12502,6 @@ snapshots: transitivePeerDependencies: - supports-color - extract-zip@2.0.1(supports-color@8.1.1): - dependencies: - debug: 4.4.3(supports-color@8.1.1) - get-stream: 5.2.0 - yauzl: 2.10.0 - optionalDependencies: - '@types/yauzl': 2.10.3 - transitivePeerDependencies: - - supports-color - fast-deep-equal@3.1.3: {} fast-glob@3.3.1: @@ -12521,10 +12536,6 @@ snapshots: dependencies: bser: 2.1.1 - fd-slicer@1.1.0: - dependencies: - pend: 1.2.0 - fdir@6.5.0(picomatch@4.0.5): optionalDependencies: picomatch: 4.0.5 @@ -13964,8 +13975,6 @@ snapshots: pe-library@0.4.1: {} - pend@1.2.0: {} - picocolors@1.1.1: {} picomatch@2.3.2: {} @@ -15209,6 +15218,8 @@ snapshots: undici-types@6.21.0: {} + undici-types@7.24.6: {} + undici@6.29.1: {} undici@7.30.2: {} @@ -15484,11 +15495,6 @@ snapshots: y18n: 5.0.8 yargs-parser: 21.1.1 - yauzl@2.10.0: - dependencies: - buffer-crc32: 0.2.13 - fd-slicer: 1.1.0 - yocto-queue@0.1.0: {} yocto-spinner@1.2.1: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index ae08a1f..677de86 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -10,6 +10,7 @@ patchedDependencies: '@react-native-community/slider@5.2.1': patches/@react-native-community__slider@5.2.1.patch 'expo-router@58.0.25': patches/expo-router@58.0.25.patch allowBuilds: + electron: true esbuild: true unrs-resolver: true overrides: -- 2.54.1 From 3c1191a2437f7c3adc7f3c03e8b11a4987d19b35 Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Thu, 19 Nov 2026 12:53:33 -0500 Subject: [PATCH 4/7] feat(web): build the UI as a Next.js static export In-app links move to /album?id=, /artist?id= and /playlist?id= so every page can prerender. Server-only files use a .server.ts(x) suffix that `pnpm build:export` leaves out: route handlers, the proxy, the desktop server picker, and the /album/ share pages with link-preview metadata. Exports use client-only Convex Auth and redirect in the browser. Sign-up now checks the setting in the browser. The sign-in link always shows, and a disabled server replaces the sign-up form with a notice. Co-Authored-By: Claude Opus 5.5 --- .../{page.tsx => page.server.tsx} | 0 .../album/[id]/{page.tsx => page.server.tsx} | 2 + .../app/(app)/album/{[id] => }/loading.tsx | 0 apps/web/app/(app)/album/page.tsx | 19 +++ .../artist/[id]/{page.tsx => page.server.tsx} | 2 + .../app/(app)/artist/{[id] => }/loading.tsx | 0 apps/web/app/(app)/artist/page.tsx | 13 ++ apps/web/app/(app)/layout.tsx | 4 + .../app/(app)/library/artists/[id]/page.tsx | 40 ------ .../[id]/{page.tsx => page.server.tsx} | 2 + .../app/(app)/playlist/{[id] => }/loading.tsx | 0 apps/web/app/(app)/playlist/page.tsx | 13 ++ apps/web/app/(auth)/layout.tsx | 2 + apps/web/app/(auth)/signin/page.tsx | 17 +-- apps/web/app/(auth)/signup/page.tsx | 36 +++-- .../[id]/cover/{route.ts => route.server.ts} | 0 .../[id]/cover/{route.ts => route.server.ts} | 0 .../[id]/cover/{route.ts => route.server.ts} | 0 .../play/hls/{route.ts => route.server.ts} | 0 .../[segment]/{route.ts => route.server.ts} | 0 .../[id]/play/{route.ts => route.server.ts} | 0 .../[id]/avatar/{route.ts => route.server.ts} | 0 .../app/desktop/{page.tsx => page.server.tsx} | 0 apps/web/app/layout.tsx | 7 +- apps/web/app/manifest.ts | 2 + .../components/add-to-playlist-provider.tsx | 4 +- apps/web/components/album-card.tsx | 8 +- apps/web/components/album-view.tsx | 4 +- apps/web/components/app-sidebar.tsx | 76 +++++++++-- apps/web/components/artist-card.tsx | 6 +- apps/web/components/artists-page.tsx | 19 ++- apps/web/components/artists-view.tsx | 4 +- apps/web/components/auth-form.tsx | 124 ++++++++---------- apps/web/components/auth-redirect.tsx | 27 ++++ .../web/components/convex-client-provider.tsx | 15 ++- apps/web/components/media-context-menu.tsx | 6 +- apps/web/components/open-app-button.tsx | 9 +- apps/web/components/playback-song-meta.tsx | 7 +- apps/web/components/player-bar.tsx | 8 +- apps/web/components/playlist-card.tsx | 6 +- apps/web/components/search-song-item.tsx | 8 +- .../web/components/search-top-result-card.tsx | 8 +- apps/web/components/track-row.tsx | 6 +- apps/web/lib/routes.ts | 17 +++ apps/web/next.config.ts | 16 ++- apps/web/package.json | 1 + apps/web/{proxy.ts => proxy.server.ts} | 4 +- 47 files changed, 343 insertions(+), 199 deletions(-) rename apps/web/app/(app)/[...not-found]/{page.tsx => page.server.tsx} (100%) rename apps/web/app/(app)/album/[id]/{page.tsx => page.server.tsx} (92%) rename apps/web/app/(app)/album/{[id] => }/loading.tsx (100%) create mode 100644 apps/web/app/(app)/album/page.tsx rename apps/web/app/(app)/artist/[id]/{page.tsx => page.server.tsx} (89%) rename apps/web/app/(app)/artist/{[id] => }/loading.tsx (100%) create mode 100644 apps/web/app/(app)/artist/page.tsx delete mode 100644 apps/web/app/(app)/library/artists/[id]/page.tsx rename apps/web/app/(app)/playlist/[id]/{page.tsx => page.server.tsx} (90%) rename apps/web/app/(app)/playlist/{[id] => }/loading.tsx (100%) create mode 100644 apps/web/app/(app)/playlist/page.tsx rename apps/web/app/api/album/[id]/cover/{route.ts => route.server.ts} (100%) rename apps/web/app/api/artist/[id]/cover/{route.ts => route.server.ts} (100%) rename apps/web/app/api/playlist/[id]/cover/{route.ts => route.server.ts} (100%) rename apps/web/app/api/song/[id]/play/hls/{route.ts => route.server.ts} (100%) rename apps/web/app/api/song/[id]/play/hls/segment/[segment]/{route.ts => route.server.ts} (100%) rename apps/web/app/api/song/[id]/play/{route.ts => route.server.ts} (100%) rename apps/web/app/api/user/[id]/avatar/{route.ts => route.server.ts} (100%) rename apps/web/app/desktop/{page.tsx => page.server.tsx} (100%) create mode 100644 apps/web/components/auth-redirect.tsx create mode 100644 apps/web/lib/routes.ts rename apps/web/{proxy.ts => proxy.server.ts} (97%) diff --git a/apps/web/app/(app)/[...not-found]/page.tsx b/apps/web/app/(app)/[...not-found]/page.server.tsx similarity index 100% rename from apps/web/app/(app)/[...not-found]/page.tsx rename to apps/web/app/(app)/[...not-found]/page.server.tsx diff --git a/apps/web/app/(app)/album/[id]/page.tsx b/apps/web/app/(app)/album/[id]/page.server.tsx similarity index 92% rename from apps/web/app/(app)/album/[id]/page.tsx rename to apps/web/app/(app)/album/[id]/page.server.tsx index 95fef40..918c48d 100644 --- a/apps/web/app/(app)/album/[id]/page.tsx +++ b/apps/web/app/(app)/album/[id]/page.server.tsx @@ -1,3 +1,5 @@ +// Share links (/album/) land here on the server build, which adds +// link-preview metadata. The app itself links to /album?id=. import { AlbumPage } from "@/components/album-page" import { api } from "@otunes/convex/_generated/api" import { fetchQuery } from "convex/nextjs" diff --git a/apps/web/app/(app)/album/[id]/loading.tsx b/apps/web/app/(app)/album/loading.tsx similarity index 100% rename from apps/web/app/(app)/album/[id]/loading.tsx rename to apps/web/app/(app)/album/loading.tsx diff --git a/apps/web/app/(app)/album/page.tsx b/apps/web/app/(app)/album/page.tsx new file mode 100644 index 0000000..0be8203 --- /dev/null +++ b/apps/web/app/(app)/album/page.tsx @@ -0,0 +1,19 @@ +"use client" + +import { useSearchParams } from "next/navigation" + +import { AlbumPage } from "@/components/album-page" +import { PageMessage } from "@/components/page-message" +import type { Id } from "@otunes/convex/_generated/dataModel" + +export default function Page() { + const searchParams = useSearchParams() + const id = searchParams.get("id") + if (!id) return Album not found. + return ( + } + highlightedSongId={searchParams.get("s") ?? undefined} + /> + ) +} diff --git a/apps/web/app/(app)/artist/[id]/page.tsx b/apps/web/app/(app)/artist/[id]/page.server.tsx similarity index 89% rename from apps/web/app/(app)/artist/[id]/page.tsx rename to apps/web/app/(app)/artist/[id]/page.server.tsx index ecd256a..a7747cf 100644 --- a/apps/web/app/(app)/artist/[id]/page.tsx +++ b/apps/web/app/(app)/artist/[id]/page.server.tsx @@ -1,3 +1,5 @@ +// Share links (/artist/) land here on the server build, which adds +// link-preview metadata. The app itself links to /artist?id=. import { fetchQuery } from "convex/nextjs" import { convexServerOptions } from "@/lib/convex-server" import { ArtistPage } from "@/components/artist-page" diff --git a/apps/web/app/(app)/artist/[id]/loading.tsx b/apps/web/app/(app)/artist/loading.tsx similarity index 100% rename from apps/web/app/(app)/artist/[id]/loading.tsx rename to apps/web/app/(app)/artist/loading.tsx diff --git a/apps/web/app/(app)/artist/page.tsx b/apps/web/app/(app)/artist/page.tsx new file mode 100644 index 0000000..c1bc33d --- /dev/null +++ b/apps/web/app/(app)/artist/page.tsx @@ -0,0 +1,13 @@ +"use client" + +import { useSearchParams } from "next/navigation" + +import { ArtistPage } from "@/components/artist-page" +import { PageMessage } from "@/components/page-message" +import type { Id } from "@otunes/convex/_generated/dataModel" + +export default function Page() { + const id = useSearchParams().get("id") + if (!id) return Artist not found. + return } /> +} diff --git a/apps/web/app/(app)/layout.tsx b/apps/web/app/(app)/layout.tsx index 02a758a..932b5da 100644 --- a/apps/web/app/(app)/layout.tsx +++ b/apps/web/app/(app)/layout.tsx @@ -1,3 +1,4 @@ +import { AuthRedirect } from "@/components/auth-redirect" import { AddToPlaylistProvider } from "@/components/add-to-playlist-provider" import { DownloadsProvider } from "@/components/downloads-provider" import { FavoritesProvider } from "@/components/favorites-provider" @@ -21,6 +22,9 @@ export default function AppLayout({ + {process.env.OTUNES_STATIC_EXPORT === "1" && ( + + )}
diff --git a/apps/web/app/(app)/library/artists/[id]/page.tsx b/apps/web/app/(app)/library/artists/[id]/page.tsx deleted file mode 100644 index 862ad7b..0000000 --- a/apps/web/app/(app)/library/artists/[id]/page.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { fetchQuery } from "convex/nextjs" -import { convexServerOptions } from "@/lib/convex-server" -import { api } from "@otunes/convex/_generated/api" -import type { Id } from "@otunes/convex/_generated/dataModel" -import { Metadata } from "next" - -interface PageProps { - params: Promise<{ id: string }> -} - -export async function generateMetadata({ - params, -}: PageProps): Promise { - const { id } = await params - const detail = await fetchQuery( - api.library.browseArtistDetail, - { id: id as Id<"artists"> }, - convexServerOptions() - ).catch(() => null) - const selectedArtist = detail?.artist - - return { - title: `${selectedArtist ? `${selectedArtist.name}` : "oTunes"}`, - openGraph: { - title: `${selectedArtist ? `${selectedArtist.name}` : "oTunes"}`, - description: "oTunes", - images: selectedArtist - ? { - url: `/api/artist/${selectedArtist.id}/cover`, - width: 512, - height: 512, - } - : [], - }, - } -} - -export default function Page() { - return null -} diff --git a/apps/web/app/(app)/playlist/[id]/page.tsx b/apps/web/app/(app)/playlist/[id]/page.server.tsx similarity index 90% rename from apps/web/app/(app)/playlist/[id]/page.tsx rename to apps/web/app/(app)/playlist/[id]/page.server.tsx index ab5d59d..c4a7c61 100644 --- a/apps/web/app/(app)/playlist/[id]/page.tsx +++ b/apps/web/app/(app)/playlist/[id]/page.server.tsx @@ -1,3 +1,5 @@ +// Share links (/playlist/) land here on the server build, which adds +// link-preview metadata. The app itself links to /playlist?id=. import { PlaylistPage } from "@/components/playlist-page" import { api } from "@otunes/convex/_generated/api" import { convexAuthNextjsToken } from "@convex-dev/auth/nextjs/server" diff --git a/apps/web/app/(app)/playlist/[id]/loading.tsx b/apps/web/app/(app)/playlist/loading.tsx similarity index 100% rename from apps/web/app/(app)/playlist/[id]/loading.tsx rename to apps/web/app/(app)/playlist/loading.tsx diff --git a/apps/web/app/(app)/playlist/page.tsx b/apps/web/app/(app)/playlist/page.tsx new file mode 100644 index 0000000..28bb809 --- /dev/null +++ b/apps/web/app/(app)/playlist/page.tsx @@ -0,0 +1,13 @@ +"use client" + +import { useSearchParams } from "next/navigation" + +import { PageMessage } from "@/components/page-message" +import { PlaylistPage } from "@/components/playlist-page" +import type { Id } from "@otunes/convex/_generated/dataModel" + +export default function Page() { + const id = useSearchParams().get("id") + if (!id) return Playlist not found. + return } /> +} diff --git a/apps/web/app/(auth)/layout.tsx b/apps/web/app/(auth)/layout.tsx index 9dd93a3..da80a68 100644 --- a/apps/web/app/(auth)/layout.tsx +++ b/apps/web/app/(auth)/layout.tsx @@ -1,3 +1,4 @@ +import { AuthRedirect } from "@/components/auth-redirect" export default function AuthLayout({ children, }: Readonly<{ @@ -5,6 +6,7 @@ export default function AuthLayout({ }>) { return (
+ {process.env.OTUNES_STATIC_EXPORT === "1" && } {children}
) diff --git a/apps/web/app/(auth)/signin/page.tsx b/apps/web/app/(auth)/signin/page.tsx index 211e168..18c311b 100644 --- a/apps/web/app/(auth)/signin/page.tsx +++ b/apps/web/app/(auth)/signin/page.tsx @@ -1,18 +1,5 @@ -import { fetchQuery } from "convex/nextjs" -import { connection } from "next/server" import { AuthForm } from "@/components/auth-form" -import { convexServerOptions } from "@/lib/convex-server" -import { api } from "@otunes/convex/_generated/api" -export default async function SignInPage() { - await connection() - const { disableAccountCreation } = await fetchQuery( - api.users.getAppSettings, - {}, - convexServerOptions() - ) - - return ( - - ) +export default function SignInPage() { + return } diff --git a/apps/web/app/(auth)/signup/page.tsx b/apps/web/app/(auth)/signup/page.tsx index 93a13ba..a72b053 100644 --- a/apps/web/app/(auth)/signup/page.tsx +++ b/apps/web/app/(auth)/signup/page.tsx @@ -1,18 +1,30 @@ -import { fetchQuery } from "convex/nextjs" -import { connection } from "next/server" +"use client" + +import { useQuery } from "convex/react" +import Link from "next/link" + import { AuthForm } from "@/components/auth-form" -import { convexServerOptions } from "@/lib/convex-server" +import { Button } from "@/components/ui/button" +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { api } from "@otunes/convex/_generated/api" -export default async function SignUpPage() { - await connection() - const { disableAccountCreation } = await fetchQuery( - api.users.getAppSettings, - {}, - convexServerOptions() - ) - +export default function SignUpPage() { + const settings = useQuery(api.users.getAppSettings) + // Render nothing until the setting loads so the form never flashes. + if (settings === undefined) return null + if (!settings.disableAccountCreation) return return ( - + + + + This server has disabled new signups :( + + + + + + ) } diff --git a/apps/web/app/api/album/[id]/cover/route.ts b/apps/web/app/api/album/[id]/cover/route.server.ts similarity index 100% rename from apps/web/app/api/album/[id]/cover/route.ts rename to apps/web/app/api/album/[id]/cover/route.server.ts diff --git a/apps/web/app/api/artist/[id]/cover/route.ts b/apps/web/app/api/artist/[id]/cover/route.server.ts similarity index 100% rename from apps/web/app/api/artist/[id]/cover/route.ts rename to apps/web/app/api/artist/[id]/cover/route.server.ts diff --git a/apps/web/app/api/playlist/[id]/cover/route.ts b/apps/web/app/api/playlist/[id]/cover/route.server.ts similarity index 100% rename from apps/web/app/api/playlist/[id]/cover/route.ts rename to apps/web/app/api/playlist/[id]/cover/route.server.ts diff --git a/apps/web/app/api/song/[id]/play/hls/route.ts b/apps/web/app/api/song/[id]/play/hls/route.server.ts similarity index 100% rename from apps/web/app/api/song/[id]/play/hls/route.ts rename to apps/web/app/api/song/[id]/play/hls/route.server.ts diff --git a/apps/web/app/api/song/[id]/play/hls/segment/[segment]/route.ts b/apps/web/app/api/song/[id]/play/hls/segment/[segment]/route.server.ts similarity index 100% rename from apps/web/app/api/song/[id]/play/hls/segment/[segment]/route.ts rename to apps/web/app/api/song/[id]/play/hls/segment/[segment]/route.server.ts diff --git a/apps/web/app/api/song/[id]/play/route.ts b/apps/web/app/api/song/[id]/play/route.server.ts similarity index 100% rename from apps/web/app/api/song/[id]/play/route.ts rename to apps/web/app/api/song/[id]/play/route.server.ts diff --git a/apps/web/app/api/user/[id]/avatar/route.ts b/apps/web/app/api/user/[id]/avatar/route.server.ts similarity index 100% rename from apps/web/app/api/user/[id]/avatar/route.ts rename to apps/web/app/api/user/[id]/avatar/route.server.ts diff --git a/apps/web/app/desktop/page.tsx b/apps/web/app/desktop/page.server.tsx similarity index 100% rename from apps/web/app/desktop/page.tsx rename to apps/web/app/desktop/page.server.tsx diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index c136902..00e94e8 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -37,8 +37,11 @@ async function hostedUrl() { } } +const staticExport = process.env.OTUNES_STATIC_EXPORT === "1" + export async function generateMetadata(): Promise { - const url = await hostedUrl() + // Static exports have no request to read the host from. + const url = staticExport ? undefined : await hostedUrl() return { title: "oTunes", @@ -93,6 +96,8 @@ export default function RootLayout({ {needsServer ? ( content + ) : staticExport ? ( + {content} ) : ( diff --git a/apps/web/app/manifest.ts b/apps/web/app/manifest.ts index 8388694..34d8c30 100644 --- a/apps/web/app/manifest.ts +++ b/apps/web/app/manifest.ts @@ -1,5 +1,7 @@ import type { MetadataRoute } from "next" +export const dynamic = "force-static" + export default function manifest(): MetadataRoute.Manifest { return { name: "oTunes", diff --git a/apps/web/components/add-to-playlist-provider.tsx b/apps/web/components/add-to-playlist-provider.tsx index 5cc1ad8..d81133c 100644 --- a/apps/web/components/add-to-playlist-provider.tsx +++ b/apps/web/components/add-to-playlist-provider.tsx @@ -1,5 +1,7 @@ "use client" +import { playlistPath } from "@/lib/routes" + import * as React from "react" import { useConvex, useMutation, useQuery } from "convex/react" import { useRouter } from "next/navigation" @@ -256,7 +258,7 @@ export function AddToPlaylistProvider({ setNewPlaylistName("") setPendingSongIds([]) if (count === 0) { - router.push(`/playlist/${playlistId}`) + router.push(playlistPath(playlistId)) } } catch (error) { toast.error( diff --git a/apps/web/components/album-card.tsx b/apps/web/components/album-card.tsx index 082516a..28b4987 100644 --- a/apps/web/components/album-card.tsx +++ b/apps/web/components/album-card.tsx @@ -1,5 +1,7 @@ "use client" +import { albumPath, artistPath } from "@/lib/routes" + import * as React from "react" import Image from "next/image" import Link from "next/link" @@ -123,7 +125,7 @@ export function AlbumCard({ album }: { album: BrowseAlbum }) { onMouseEnter={() => setHovered(true)} onMouseLeave={() => setHovered(false)} > - + {album.title}
- +

{album.title}

{album.artist.name}

diff --git a/apps/web/components/album-view.tsx b/apps/web/components/album-view.tsx index 34ec288..cfaa3e7 100644 --- a/apps/web/components/album-view.tsx +++ b/apps/web/components/album-view.tsx @@ -1,5 +1,7 @@ "use client" +import { artistPath } from "@/lib/routes" + import { PageHeader } from "@/components/library-skeletons" import * as React from "react" import Image from "next/image" @@ -287,7 +289,7 @@ export function AlbumView({ {album.title} {album.artist.name} diff --git a/apps/web/components/app-sidebar.tsx b/apps/web/components/app-sidebar.tsx index e8c9729..b8f948e 100644 --- a/apps/web/components/app-sidebar.tsx +++ b/apps/web/components/app-sidebar.tsx @@ -1,5 +1,7 @@ "use client" +import { playlistPath } from "@/lib/routes" + import { ArrowDownToLine, Disc3, @@ -14,7 +16,7 @@ import { Star, } from "lucide-react" -import { usePathname, useRouter } from "next/navigation" +import { usePathname, useRouter, useSearchParams } from "next/navigation" import dynamic from "next/dynamic" import { useAuthActions } from "@convex-dev/auth/react" @@ -43,6 +45,7 @@ import Image from "next/image" import Link from "next/link" import { useTheme } from "next-themes" import * as React from "react" +import { Suspense } from "react" import { api } from "@otunes/convex/_generated/api" import { playlistCoverUrl } from "@/lib/cover-urls" import { useCachedQuery } from "@/hooks/use-cached-query" @@ -109,7 +112,7 @@ export function AppSidebar() { ...(sidebarPlaylists?.subscribed ?? []), ].map((playlist) => ({ title: playlist.title, - path: `/playlist/${playlist.id}`, + path: playlistPath(playlist.id), icon: playlist.cover ? ( // eslint-disable-next-line @next/next/no-img-element -- versioned cover, already sized by the route Playlists - - {playlistNav.map((item) => ( - - - setOpenMobile(false)}> - {item.icon} - {item.title} - - - - ))} - + setOpenMobile(false)} + /> + } + > + setOpenMobile(false)} + /> + @@ -255,3 +260,46 @@ export function AppSidebar() { ) } + +type NavItem = { title: string; path: string; icon: React.ReactNode } + +// Playlist routes differ only by `?id=`. Reading the query needs a Suspense +// boundary in static exports, so the fallback matches on the path alone. +function CurrentPlaylistMenu(props: { + items: NavItem[] + onNavigate: () => void +}) { + const pathname = usePathname() + const query = useSearchParams().toString() + return ( + + ) +} + +function PlaylistMenu({ + items, + route, + onNavigate, +}: { + items: NavItem[] + route: string + onNavigate: () => void +}) { + return ( + + {items.map((item) => ( + + + + {item.icon} + {item.title} + + + + ))} + + ) +} diff --git a/apps/web/components/artist-card.tsx b/apps/web/components/artist-card.tsx index c66a788..d5d9c11 100644 --- a/apps/web/components/artist-card.tsx +++ b/apps/web/components/artist-card.tsx @@ -1,5 +1,7 @@ "use client" +import { artistPath } from "@/lib/routes" + import Image from "next/image" import Link from "next/link" @@ -11,7 +13,7 @@ export function ArtistCard({ artist }: { artist: BrowseArtist }) {
- +

{artist.name}

diff --git a/apps/web/components/artists-page.tsx b/apps/web/components/artists-page.tsx index 744ab95..ae89d11 100644 --- a/apps/web/components/artists-page.tsx +++ b/apps/web/components/artists-page.tsx @@ -1,6 +1,6 @@ "use client" -import { usePathname } from "next/navigation" +import { useSearchParams } from "next/navigation" import { useCallback } from "react" import { ArtistsView } from "@/components/artists-view" @@ -8,20 +8,17 @@ import { ArtistsSkeleton, PageHeader } from "@/components/library-skeletons" import { useCachedQuery } from "@/hooks/use-cached-query" import { api } from "@otunes/convex/_generated/api" -const ARTISTS_PATH = "/library/artists" - -function artistIdFromPathname(pathname: string) { - const [, id] = pathname.slice(ARTISTS_PATH.length).split("/") - return id ? decodeURIComponent(id) : undefined -} - export function ArtistsPage() { - const pathname = usePathname() + const artistId = useSearchParams().get("id") ?? undefined const artists = useCachedQuery(api.library.browseArtists) const albums = useCachedQuery(api.library.browseAlbums) const selectArtist = useCallback((artistId: string) => { - window.history.pushState(null, "", `${ARTISTS_PATH}/${artistId}`) + window.history.pushState( + null, + "", + `/library/artists?${new URLSearchParams({ id: artistId })}` + ) }, []) return ( @@ -34,7 +31,7 @@ export function ArtistsPage() { )} diff --git a/apps/web/components/artists-view.tsx b/apps/web/components/artists-view.tsx index f10b361..46e71df 100644 --- a/apps/web/components/artists-view.tsx +++ b/apps/web/components/artists-view.tsx @@ -1,5 +1,7 @@ "use client" +import { artistPath } from "@/lib/routes" + import * as React from "react" import Image from "next/image" import Link from "next/link" @@ -155,7 +157,7 @@ export function ArtistsView({
{selectedArtist.name} diff --git a/apps/web/components/auth-form.tsx b/apps/web/components/auth-form.tsx index 65d6a38..bcab4be 100644 --- a/apps/web/components/auth-form.tsx +++ b/apps/web/components/auth-form.tsx @@ -53,27 +53,16 @@ const copy: Record< }, } -export function AuthForm({ - flow, - accountCreationDisabled, -}: { - flow: AuthFlow - accountCreationDisabled: boolean -}) { +export function AuthForm({ flow }: { flow: AuthFlow }) { const { signIn } = useAuthActions() const router = useRouter() const [error, setError] = useState(null) const [submitting, setSubmitting] = useState(false) const text = copy[flow] - const signupsDisabled = flow === "signUp" && accountCreationDisabled - const hideSignUpLink = flow === "signIn" && accountCreationDisabled async function handleSubmit(event: React.FormEvent) { event.preventDefault() - if (signupsDisabled) { - return - } setError(null) setSubmitting(true) @@ -100,71 +89,62 @@ export function AuthForm({ {text.description} - {signupsDisabled ? ( -

- New account registration is currently disabled. Contact an - administrator if you need access. -

- ) : ( -
- - {flow === "signUp" && ( - - Name - - - )} + + + {flow === "signUp" && ( - Email + Name - - Password - - - {error && {error}} - - - - {!hideSignUpLink ? ( -

- {text.switchPrompt}{" "} - - {text.switchLabel} - -

- ) : null} -
- - )} + )} + + Email + + + + Password + + + {error && {error}} + + + +

+ {text.switchPrompt}{" "} + + {text.switchLabel} + +

+
+
) diff --git a/apps/web/components/auth-redirect.tsx b/apps/web/components/auth-redirect.tsx new file mode 100644 index 0000000..e10d668 --- /dev/null +++ b/apps/web/components/auth-redirect.tsx @@ -0,0 +1,27 @@ +"use client" + +import { useConvexAuth } from "convex/react" +import { usePathname, useRouter } from "next/navigation" +import { useEffect } from "react" + +// Media pages that signed-out visitors can open from share links. +const PUBLIC_PATHS = new Set(["/album", "/artist", "/playlist"]) + +/** + * Static exports have no proxy, so this keeps signed-out users on the auth + * pages and signed-in users off them. Server builds redirect in proxy.server.ts. + */ +export function AuthRedirect({ area }: { area: "app" | "auth" }) { + const { isAuthenticated, isLoading } = useConvexAuth() + const pathname = usePathname() + const router = useRouter() + + useEffect(() => { + if (isLoading) return + if (area === "auth" && isAuthenticated) router.replace("/") + if (area === "app" && !isAuthenticated && !PUBLIC_PATHS.has(pathname)) + router.replace("/signin") + }, [area, isAuthenticated, isLoading, pathname, router]) + + return null +} diff --git a/apps/web/components/convex-client-provider.tsx b/apps/web/components/convex-client-provider.tsx index 5f9416c..f03a625 100644 --- a/apps/web/components/convex-client-provider.tsx +++ b/apps/web/components/convex-client-provider.tsx @@ -1,6 +1,7 @@ "use client" import { ConvexAuthNextjsProvider } from "@convex-dev/auth/nextjs" +import { ConvexAuthProvider } from "@convex-dev/auth/react" import { buildConvexUrl } from "@otunes/convex/server-url" import { ConvexReactClient } from "convex/react" import { ReactNode } from "react" @@ -37,9 +38,17 @@ export function ConvexClientProvider({ convexUrl?: string children: ReactNode }) { - return ( - - {children}{" "} + const client = getConvexClient(convexUrl) + const content = {children} + // Static exports have no Next.js server to hold the session in cookies, so + // tokens live in localStorage, as in the mobile app. + return process.env.OTUNES_STATIC_EXPORT === "1" ? ( + + {content} + + ) : ( + + {content} ) } diff --git a/apps/web/components/media-context-menu.tsx b/apps/web/components/media-context-menu.tsx index aa1610b..5e8b77a 100644 --- a/apps/web/components/media-context-menu.tsx +++ b/apps/web/components/media-context-menu.tsx @@ -1,5 +1,7 @@ "use client" +import { albumPath, artistPath } from "@/lib/routes" + import * as React from "react" import Link from "next/link" import { @@ -165,7 +167,7 @@ export function MediaContextMenuItems({ {artist ? ( - + Go to Artist @@ -173,7 +175,7 @@ export function MediaContextMenuItems({ ) : null} {album ? ( - + Go to Album diff --git a/apps/web/components/open-app-button.tsx b/apps/web/components/open-app-button.tsx index 32fff6f..7c2d029 100644 --- a/apps/web/components/open-app-button.tsx +++ b/apps/web/components/open-app-button.tsx @@ -5,7 +5,14 @@ import { ArrowUpRight } from "lucide-react" export function OpenAppButton() { function openApp() { const link = new URL("otunes://open") - link.searchParams.set("url", window.location.href) + // The app understands share links (/album/), not in-app /album?id=. + const page = new URL(window.location.href) + const id = page.searchParams.get("id") + if (id && /^\/(album|artist|playlist)$/.test(page.pathname)) { + page.pathname += `/${encodeURIComponent(id)}` + page.searchParams.delete("id") + } + link.searchParams.set("url", page.href) window.location.assign(link.href) } diff --git a/apps/web/components/playback-song-meta.tsx b/apps/web/components/playback-song-meta.tsx index 4e10831..6de3566 100644 --- a/apps/web/components/playback-song-meta.tsx +++ b/apps/web/components/playback-song-meta.tsx @@ -1,3 +1,4 @@ +import { albumPath, artistPath } from "@/lib/routes" import Link from "next/link" import type { BrowseSong } from "@otunes/convex/types" @@ -24,7 +25,7 @@ export function PlaybackSongMeta({ )} > {song.album.title} diff --git a/apps/web/components/player-bar.tsx b/apps/web/components/player-bar.tsx index 764bca0..ed5ec8e 100644 --- a/apps/web/components/player-bar.tsx +++ b/apps/web/components/player-bar.tsx @@ -1,5 +1,7 @@ "use client" +import { albumPath, artistPath } from "@/lib/routes" + import * as React from "react" import Image from "next/image" import Link from "next/link" @@ -184,21 +186,21 @@ export function PlayerBar() {
{currentSong.title}

{currentSong.artist.name} · {currentSong.album.title} diff --git a/apps/web/components/playlist-card.tsx b/apps/web/components/playlist-card.tsx index 2b1e71c..d815064 100644 --- a/apps/web/components/playlist-card.tsx +++ b/apps/web/components/playlist-card.tsx @@ -1,5 +1,7 @@ "use client" +import { playlistPath } from "@/lib/routes" + import Image from "next/image" import Link from "next/link" @@ -79,7 +81,7 @@ export function PlaylistCard({ playlist }: { playlist: PlaylistSummary }) { return (

- + {playlist.title}
- +

{playlist.title}

diff --git a/apps/web/components/search-song-item.tsx b/apps/web/components/search-song-item.tsx index 94100c1..30cfc78 100644 --- a/apps/web/components/search-song-item.tsx +++ b/apps/web/components/search-song-item.tsx @@ -2,6 +2,8 @@ import { useDownloads } from "@/components/downloads-provider" import { useSongDownloadState } from "@/hooks/use-downloads" +import { albumPath, artistPath } from "@/lib/routes" + import Image from "next/image" import Link from "next/link" import { useAddToPlaylist } from "@/components/add-to-playlist-provider" @@ -81,7 +83,7 @@ export function SearchSongItem({ song }: { song: SearchSong }) {

- +

{song.title}

{song.artist.name}

diff --git a/apps/web/components/search-top-result-card.tsx b/apps/web/components/search-top-result-card.tsx index 0d9065c..a3bcc8b 100644 --- a/apps/web/components/search-top-result-card.tsx +++ b/apps/web/components/search-top-result-card.tsx @@ -1,5 +1,7 @@ "use client" +import { albumPath, artistPath } from "@/lib/routes" + import Image from "next/image" import Link from "next/link" @@ -12,11 +14,11 @@ export type TopResult = SearchTopResultItem function resultHref(result: TopResult) { switch (result.kind) { case "song": - return `/album/${result.item.album.id}` + return albumPath(result.item.album.id) case "album": - return `/album/${result.item.id}` + return albumPath(result.item.id) case "artist": - return `/artist/${result.item.id}` + return artistPath(result.item.id) } } diff --git a/apps/web/components/track-row.tsx b/apps/web/components/track-row.tsx index c732512..d8ae7a8 100644 --- a/apps/web/components/track-row.tsx +++ b/apps/web/components/track-row.tsx @@ -1,5 +1,7 @@ "use client" +import { albumPath, artistPath } from "@/lib/routes" + import * as React from "react" import Image from "next/image" import Link from "next/link" @@ -398,7 +400,7 @@ function TrackRowComponent({
event.stopPropagation()} > @@ -407,7 +409,7 @@ function TrackRowComponent({
event.stopPropagation()} > diff --git a/apps/web/lib/routes.ts b/apps/web/lib/routes.ts new file mode 100644 index 0000000..c040b66 --- /dev/null +++ b/apps/web/lib/routes.ts @@ -0,0 +1,17 @@ +// In-app routes pass ids as query parameters so the UI can be a static export. +// Share links keep the `/album/` form (see mediaShareUrl), which only the +// server build serves, with link-preview metadata. + +export function albumPath(albumId: string, songId?: string) { + const query = new URLSearchParams({ id: albumId }) + if (songId) query.set("s", songId) + return `/album?${query}` +} + +export function artistPath(artistId: string) { + return `/artist?${new URLSearchParams({ id: artistId })}` +} + +export function playlistPath(playlistId: string) { + return `/playlist?${new URLSearchParams({ id: playlistId })}` +} diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts index a83c4ef..9e0ef15 100644 --- a/apps/web/next.config.ts +++ b/apps/web/next.config.ts @@ -1,9 +1,19 @@ import path from "node:path" import type { NextConfig } from "next" +const desktop = process.env.OTUNES_DESKTOP_BUILD === "1" +// `pnpm build:export` writes the UI as static files to `out`. It leaves out +// server-only files (`*.server.ts[x]`): route handlers, the proxy, share-link +// metadata pages and the desktop server picker. +const staticExport = process.env.OTUNES_STATIC_EXPORT === "1" + const nextConfig: NextConfig = { - output: "standalone", - distDir: process.env.OTUNES_DESKTOP_BUILD === "1" ? ".next-desktop" : ".next", + output: staticExport ? "export" : "standalone", + distDir: staticExport ? "out" : desktop ? ".next-desktop" : ".next", + pageExtensions: staticExport + ? ["tsx", "ts"] + : ["server.tsx", "server.ts", "tsx", "ts"], + env: { OTUNES_STATIC_EXPORT: staticExport ? "1" : "" }, outputFileTracingRoot: path.join(__dirname, "../../"), experimental: { // Failed navigations wait for the connection instead of reloading the @@ -16,7 +26,7 @@ const nextConfig: NextConfig = { }, }, images: { - unoptimized: process.env.OTUNES_DESKTOP_BUILD === "1", + unoptimized: desktop || staticExport, minimumCacheTTL: 60, dangerouslyAllowSVG: true, contentDispositionType: "attachment", diff --git a/apps/web/package.json b/apps/web/package.json index f943371..fd2af4e 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -5,6 +5,7 @@ "scripts": { "dev": "next dev", "build": "next build", + "build:export": "OTUNES_STATIC_EXPORT=1 next build", "start": "next start", "lint": "eslint .", "typecheck": "tsc --noEmit" diff --git a/apps/web/proxy.ts b/apps/web/proxy.server.ts similarity index 97% rename from apps/web/proxy.ts rename to apps/web/proxy.server.ts index dfed5a5..68a09a4 100644 --- a/apps/web/proxy.ts +++ b/apps/web/proxy.server.ts @@ -17,9 +17,11 @@ const isPublic = createRouteMatcher([ "/api/playlist/:id/cover", // Mobile clients load avatars without the web auth cookie. "/api/user/:id/avatar", + "/album", "/album/:id", + "/artist", "/artist/:id", - "/library/artists/:id", + "/playlist", "/playlist/:id", ]) -- 2.54.1 From 3ea5385cfedbf3eeb9e68bfe72ff48787b1d4601 Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Thu, 19 Nov 2026 12:59:37 -0500 Subject: [PATCH 5/7] fix(web): point the 404 Home button at / Co-Authored-By: Claude Opus 5.5 --- apps/web/app/(app)/[...not-found]/page.server.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/app/(app)/[...not-found]/page.server.tsx b/apps/web/app/(app)/[...not-found]/page.server.tsx index e31dd2b..a0d3783 100644 --- a/apps/web/app/(app)/[...not-found]/page.server.tsx +++ b/apps/web/app/(app)/[...not-found]/page.server.tsx @@ -23,7 +23,7 @@ export default function Page() {