diff --git a/.claude/launch.json b/.claude/launch.json index 49410ac402..adc89e47dd 100644 --- a/.claude/launch.json +++ b/.claude/launch.json @@ -21,13 +21,6 @@ "cwd": "builder/web", "port": 5173 }, - { - "name": "web-builder-desktop", - "runtimeExecutable": "npm", - "runtimeArgs": ["run", "dev", "--", "--mode", "desktop", "--port", "5173"], - "cwd": "builder/web", - "port": 5173 - }, { "name": "data-page", "runtimeExecutable": "tools/obc", diff --git a/.github/workflows/bake.yml b/.github/workflows/bake.yml index c16686dd6e..d590278a3c 100644 --- a/.github/workflows/bake.yml +++ b/.github/workflows/bake.yml @@ -1,7 +1,7 @@ name: Bake -# Build catalog cells once, centrally, so the website and desktop app can select, -# download, and assemble the same verified inputs. +# Build catalog cells once, centrally, so the website can select, download, and +# assemble the same verified inputs. # # ── READ THIS BEFORE ADDING A COUNTRY TO THE MATRIX ──────────────────────────────── # diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 686d9c81c9..102929b9af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,12 +21,7 @@ name: CI # board crate; its job adds a flash-size guard against the 32 KB slot. # * obc-builder-bridge is a workspace library and the builder's shared WASM core. # The wasm-bridges job gates its production size and hands the same bytes to frontend jobs. -# * obc-desktop (#906) is the third excluded + standalone crate: a Tauri app, so it brings a -# platform webview with it (WebKitGTK on Linux) and would otherwise put those headers in -# every renderer test's way. The shell embeds the frontend, so both halves are built there. -# The planner artifact verifier also needs the locked Node reader dependencies. -# It is the only **three-OS matrix** in this file because it is the artifact a user installs. -# * `--locked` everywhere so a stale Cargo.lock (any of the four) fails CI. +# * `--locked` everywhere so a stale Cargo.lock (any of them) fails CI. on: workflow_call: @@ -208,9 +203,6 @@ jobs: echo "::group::obc-boot (workspace-excluded)" cargo fmt --check --manifest-path firmware/obc-boot/Cargo.toml || rc=1 echo "::endgroup::" - echo "::group::obc-desktop (workspace-excluded)" - cargo fmt --check --manifest-path builder/desktop/Cargo.toml || rc=1 - echo "::endgroup::" exit $rc # Blocking clippy on the host workspace: -D warnings from day one (the baseline is clean). @@ -673,10 +665,6 @@ jobs: run: cargo deny --manifest-path firmware/obc-boot/Cargo.toml --all-features --config tools/licenses/deny.toml check - name: cargo-deny (obc-sensor-sim) run: cargo deny --manifest-path firmware/obc-sensor-sim/Cargo.toml --all-features --config tools/licenses/deny.toml check - # The desktop shell is the one artifact a *user* installs, so its tree is the - # one where a bad licence or a live advisory matters most. - - name: cargo-deny (obc-desktop app) - run: cargo deny --manifest-path builder/desktop/Cargo.toml --all-features --config tools/licenses/deny.toml check # deny.toml skips the repository's own crates, so it cannot see obc-data reach one. - name: obc-data depends on no GPL crate run: python3 tools/check_obc_data_licence.py @@ -1000,9 +988,8 @@ jobs: # The web builder's Svelte frontend: type-check, unit tests, production builds. # - # One source tree, three hosts (#895): `npm run build` is the local FastAPI one, - # `build:web` the static hosted site and `build:desktop` the Tauri shell. All three - # are built here — a host that stops compiling is otherwise invisible until someone + # One source tree, two hosts: `npm run build` is the local FastAPI one and + # `build:web` the static hosted site. Both are built here — a host that stops compiling is otherwise invisible until someone # tries to ship it. The *contents* of the web bundle (no job polling, no style # editor) are asserted by vitest, which builds and inspects the emitted chunks. # @@ -1029,8 +1016,7 @@ jobs: with: name: obc-builder-bridge-pkg path: builder/web/src/lib/core/pkg - # The device the USB suites run against. The desktop-frontend job does not download it: that - # job only builds the shipped bundle, which must not contain this package at all. + # The device the USB suites run against. The shipped bundle must not contain this package. - uses: actions/download-artifact@v4 with: name: obc-flat-device-pkg @@ -1048,7 +1034,7 @@ jobs: run: | rm -f "$RUNNER_TEMP/web-builder-junit.xml" npm run test:components -- --reporter=default --reporter=junit --outputFile="$RUNNER_TEMP/web-builder-junit.xml" - - name: production builds (dev + web + desktop hosts) + - name: production builds (dev + web hosts) run: npm run build:all # naga is the WGSL front end of Firefox; Chrome's Tint compiles the same files in the TrailView smoke. - name: Cache the WGSL validator @@ -1133,145 +1119,6 @@ jobs: path: .artifacts/web-builder/ if-no-files-found: error - desktop-frontend: - needs: [selection, wasm-bridges] - if: contains(fromJSON(needs.selection.outputs.jobs), 'desktop-frontend') - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ inputs.source_sha || github.sha }} - persist-credentials: false - - uses: actions/download-artifact@v4 - with: - name: obc-builder-bridge-pkg - path: builder/web/src/lib/core/pkg - - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: npm - cache-dependency-path: builder/web/package-lock.json - - name: Build the desktop bundle - working-directory: builder/web - run: | - npm ci - npm run build:desktop - - uses: actions/upload-artifact@v4 - with: - name: obc-desktop-frontend - path: builder/web/dist/desktop - retention-days: 1 - - desktop: - needs: [selection, desktop-frontend] - if: contains(fromJSON(needs.selection.outputs.jobs), 'desktop') - runs-on: ${{ matrix.os }} - env: - # Baked into packaged apps; a runtime variable can still override it for a - # maintainer testing an unpublished tree. - OBC_CATALOG_URL: ${{ vars.OBC_CATALOG_URL }} - strategy: - # One platform's failure must not hide another's. - fail-fast: false - matrix: - include: - - os: ubuntu-24.04 - slug: linux-x86_64 - exe: obc-desktop - - os: macos-latest - slug: macos-arm64 - exe: obc-desktop - - os: windows-latest - slug: windows-x86_64-msvc - exe: obc-desktop.exe - defaults: - run: - # Git Bash on the Windows runner, so the shared steps below are one script - # rather than three. Nothing here needs a Windows-native shell. - shell: bash - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ inputs.source_sha || github.sha }} - persist-credentials: false - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - cache: false - - uses: Swatinem/rust-cache@v2 - with: - workspaces: builder/desktop - key: desktop-${{ matrix.slug }} - # wry's Linux backend. macOS and Windows need nothing extra — which is most of - # why Tauri was chosen over Electron (#906) — but Linux wants WebKitGTK. - - name: Install the Linux webview deps - if: runner.os == 'Linux' - uses: ./.github/actions/apt-install - with: - packages: libwebkit2gtk-4.1-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev libgtk-3-dev librsvg2-dev - # The bundle the shell embeds, built once on Linux by `desktop-frontend` and - # unpacked here. It is byte-identical on all three runners — a Vite build of the - # same sources — so building it per-platform was three runs of `npm ci` and - # three Node toolchains for one output. Landing it at the path tauri.conf.json's - # `frontendDist` names is the whole integration; nothing here runs npm, and the - # `beforeBuildCommand` in that file is never executed (there is no Tauri CLI in - # this repo — see the note above about `custom-protocol`). - - uses: actions/download-artifact@v4 - with: - name: obc-desktop-frontend - path: builder/web/dist/desktop - # Order matters. `cargo test` never produces the plain binary — even with - # --all-targets it builds bins as *test harnesses*, a different artifact — so the - # `build` below is a full codegen + link either way. Running it first means the - # normal lib it produces is already there for `test` to link against, instead of - # `test` building one set of artifacts and `build` starting a second. - - name: "obc-desktop: clippy" - working-directory: builder/desktop - run: cargo clippy --release --all-targets --locked -- -D warnings - - name: "obc-desktop: build (release)" - working-directory: builder/desktop - run: cargo build --release --locked - - uses: taiki-e/install-action@v2 - with: - tool: cargo-nextest@0.9.143 - - name: "obc-desktop: test" - id: desktop-tests - working-directory: builder/desktop - env: - NEXTEST_PROFILE: ci - run: | - rm -f target/nextest/ci/junit.xml - cargo nextest run --release --locked --config-file ../../.config/nextest.toml --no-tests fail - - name: Upload native desktop test results - if: ${{ !cancelled() && (steps.desktop-tests.outcome == 'success' || steps.desktop-tests.outcome == 'failure') }} - uses: actions/upload-artifact@v4 - with: - name: desktop-tests-${{ matrix.slug }}-${{ github.run_attempt }} - path: builder/desktop/target/nextest/ci/junit.xml - if-no-files-found: error - # Recorded so an accidental native dependency or bundling regression is visible. - - name: "obc-desktop: record the artifact size" - working-directory: builder/desktop - run: | - bytes=$(wc -c < "target/release/${{ matrix.exe }}") - echo "| ${{ matrix.slug }} | $bytes bytes |" >> "$GITHUB_STEP_SUMMARY" - - uses: actions/upload-artifact@v4 - with: - name: obc-desktop-${{ matrix.slug }} - path: builder/desktop/target/release/${{ matrix.exe }} - retention-days: 7 - # macOS ships two architectures and this crate is built on the Apple-silicon - # runner, so cross-build the Intel slice to keep a future universal bundle open. - # - # Push events only: a second target triple is build-only insurance, not a - # correctness gate on the app anyone runs. - - name: "obc-desktop: the macOS Intel slice (build-only)" - if: runner.os == 'macOS' && github.event_name == 'push' - working-directory: builder/desktop - run: | - rustup target add x86_64-apple-darwin - cargo build --release --locked --target x86_64-apple-darwin - file target/x86_64-apple-darwin/release/obc-desktop - planner-search: needs: selection if: contains(fromJSON(needs.selection.outputs.jobs), 'planner-search') @@ -1333,7 +1180,7 @@ jobs: # publishes no plan, which fails this gate rather than silently passing. ci: if: always() - needs: [selection, guards, cairn, fmt, clippy, test, ui-snapshots, builder-python, embedded, boot, device, deny, wasm, wasm-bridges, docs, ios-unit, ios-app, ios-release, web, web-browser, desktop-frontend, desktop, verification, planner-search] + needs: [selection, guards, cairn, fmt, clippy, test, ui-snapshots, builder-python, embedded, boot, device, deny, wasm, wasm-bridges, docs, ios-unit, ios-app, ios-release, web, web-browser, verification, planner-search] runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index 683eabdf7c..166cdd885d 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -156,8 +156,8 @@ jobs: # VITE_SITE_BASE makes the builder's links to the docs and the landing relative: # they are siblings inside this artifact, so naming them by absolute URL would be - # the one place a domain move still bit us. Left unset everywhere else (dev - # server, desktop app), where the site genuinely is somewhere else. + # the one place a domain move still bit us. Left unset everywhere else (the dev + # server), where the site genuinely is somewhere else. - name: Build the static map builder working-directory: builder/web env: diff --git a/.gitignore b/.gitignore index c506aaec5c..e6e80c7fb6 100644 --- a/.gitignore +++ b/.gitignore @@ -71,14 +71,13 @@ builder/web/test-support/flat-device/pkg/ # virtualenv + the optional local maps drop. The tooling itself (everything in # tools/ except obc.local) is committed. tools/obc.local -# Planner tile settings for a local desktop build (see builder/desktop/README.md). +# Local Vite settings of the web builder. builder/web/.env.local .venv/ /maps/ # Web builder frontend: dependencies + the Vite build output (CI builds it). # The dev host builds into builder/server/static/dist/ (what the FastAPI server -# mounts); the static-web and desktop hosts into builder/web/dist// — see -# #895. Both entries must keep matching vite.config.ts's outDirs: when they +# mounts); the static-web host into builder/web/dist/web/. Both entries must keep matching vite.config.ts's outDirs: when they # drifted apart, `npm run build` wrote to an unignored path and 640 KB of bundle # got committed by accident (and the server mounted nothing). builder/web/node_modules/ diff --git a/AGENTS.md b/AGENTS.md index 59de79c605..a6c4d9869d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -19,7 +19,7 @@ The goal for this codebase is to make this a robust and extendable open source m The layout table is in [README.md](README.md#repository-layout). The root Cargo workspace lists its crates in `Cargo.toml`. Keep device-reachable dependencies in `firmware/`. -The nRF54L board image, the bootloader, the Tauri desktop app and the sensor simulator are standalone Cargo roots; build +The nRF54L board image, the bootloader and the sensor simulator are standalone Cargo roots; build and test them from their own directories. The nearest README has the surface's setup; `companion-ios/README.md` is the iOS on-ramp. diff --git a/Cargo.lock b/Cargo.lock index 7ea6b74801..1f1ea6aa1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4184,7 +4184,6 @@ dependencies = [ "nusb", "obc-flat-device", "obc-link", - "serde", "tokio", ] diff --git a/Cargo.toml b/Cargo.toml index 3d020fce3e..115205023c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,13 +55,13 @@ members = [ "sim/phone/host", "sim/desktop", "sim/web-demo", - # Product bridges. obc-desktop carries its own [workspace]. + # Product bridges. "planner/service", "builder/wasm", ] # obc-fw-nrf54l is a standalone board crate (own target + .cargo/config.toml, own empty # [workspace]); it's built on its own, not as part of this host workspace (which builds its -# members for the host target). obc-boot, obc-desktop and obc-sensor-sim carry their own +# members for the host target). obc-boot and obc-sensor-sim carry their own # [workspace] tables, which excludes them automatically for the same reason. exclude = ["firmware/obc-fw-nrf54l"] resolver = "2" diff --git a/README.md b/README.md index 2213d4cbac..edc216081d 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ over BLE and USB. The custom PCB and enclosure are still under development. KiCa | `host/` | Host tools, map bakers, fixtures, and test support | | `planner/` | Router, build tools, service, search, and tile worker | | `sim/` | Desktop, web and phone simulators, host core, replay, feeder and benchmarks | -| `builder/` | Web and desktop builder, Rust/WASM core, USB transport, presets, and server | +| `builder/` | Web builder, Rust/WASM core, USB transport, presets, and server | | `companion-ios/` | SwiftUI companion app and shared iOS package | | `specs/` | Normative binary, wire, and vector contracts | | `fixtures/` | Scenario registry, source provenance, and fixture builders | @@ -159,7 +159,7 @@ over BLE and USB. The custom PCB and enclosure are still under development. KiCa | `tools/` | The `obc` command, repository tools, and verification console | `Cargo.toml` lists the root workspace crates. The nRF54L board image, -bootloader, Tauri desktop app, and sensor simulator are standalone Cargo roots. The +bootloader, and sensor simulator are standalone Cargo roots. The [architecture guide](https://openbikecomputer.com/docs/software/architecture/) explains the boundaries. ## Other open bike computers diff --git a/builder/__init__.py b/builder/__init__.py index 3f67f2b2d7..51a0a53899 100644 --- a/builder/__init__.py +++ b/builder/__init__.py @@ -1,8 +1,8 @@ """The map builder. -`app/` is the Svelte UI, shared by all three of its hosts — the static web -tier, the Tauri desktop app, and the FastAPI dev server in `server/` (see -`app/vite.config.ts`: one frontend, three hosts). None of them packs anything +`app/` is the Svelte UI, shared by its two hosts — the static web tier and +the FastAPI dev server in `server/` (see `app/vite.config.ts`: one frontend, +two hosts). None of them packs anything itself: they drive the native `obc-pack` packer (`host/obc-pack`) to build OpenStreetMap extracts into `.obcm` maps for the OBC firmware. diff --git a/builder/desktop/.gitignore b/builder/desktop/.gitignore deleted file mode 100644 index f4a858a832..0000000000 --- a/builder/desktop/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# `tauri-build` regenerates these from tauri.conf.json + capabilities/ on every -# build. They are IDE aids (the `$schema` in capabilities/default.json points at -# one), derived from committed inputs, and platform-specific — so committing them -# would mean a diff every time someone builds on a different OS. -/gen/ diff --git a/builder/desktop/Cargo.lock b/builder/desktop/Cargo.lock deleted file mode 100644 index 6ff8b998aa..0000000000 --- a/builder/desktop/Cargo.lock +++ /dev/null @@ -1,5240 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "adler2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" - -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195" -dependencies = [ - "alloc-no-stdlib", -] - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anyhow" -version = "1.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" - -[[package]] -name = "async-broadcast" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" -dependencies = [ - "event-listener", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-channel" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" -dependencies = [ - "concurrent-queue", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-executor" -version = "1.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f426a31126c735126297bc5ea7a521263c9faff4f63ca415267ee625651c4f37" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "pin-project-lite", - "slab", -] - -[[package]] -name = "async-io" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" -dependencies = [ - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-io", - "futures-lite", - "parking", - "polling", - "rustix", - "slab", - "windows-sys 0.61.2", -] - -[[package]] -name = "async-lock" -version = "3.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" -dependencies = [ - "event-listener", - "event-listener-strategy", - "pin-project-lite", -] - -[[package]] -name = "async-process" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" -dependencies = [ - "async-channel", - "async-io", - "async-lock", - "async-signal", - "async-task", - "blocking", - "cfg-if", - "event-listener", - "futures-lite", - "rustix", -] - -[[package]] -name = "async-recursion" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "async-signal" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" -dependencies = [ - "async-io", - "async-lock", - "atomic-waker", - "cfg-if", - "futures-core", - "futures-io", - "rustix", - "signal-hook-registry", - "slab", - "windows-sys 0.61.2", -] - -[[package]] -name = "async-task" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" - -[[package]] -name = "async-trait" -version = "0.1.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae36dc4177970ef04fde5178d3e2429882def40e57a451f919c098f72baa6cec" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.3", -] - -[[package]] -name = "atk" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b" -dependencies = [ - "atk-sys", - "glib", - "libc", -] - -[[package]] -name = "atk-sys" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "autocfg" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bit-set" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" -dependencies = [ - "serde_core", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block2" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" -dependencies = [ - "objc2", -] - -[[package]] -name = "blocking" -version = "1.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" -dependencies = [ - "async-channel", - "async-task", - "futures-io", - "futures-lite", - "piper", -] - -[[package]] -name = "brotli" -version = "8.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "5.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "bumpalo" -version = "3.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" - -[[package]] -name = "bytemuck" -version = "1.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" -dependencies = [ - "serde", -] - -[[package]] -name = "cairo-rs" -version = "0.18.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" -dependencies = [ - "bitflags 2.13.1", - "cairo-sys-rs", - "glib", - "libc", - "once_cell", - "thiserror 1.0.69", -] - -[[package]] -name = "cairo-sys-rs" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" -dependencies = [ - "glib-sys", - "libc", - "system-deps", -] - -[[package]] -name = "camino" -version = "1.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f2d30e4173c4026932d51d31d6b0613b1fd3014bf3f9f8943d4ba139c437ba0" -dependencies = [ - "serde_core", -] - -[[package]] -name = "cargo-platform" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" -dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", - "thiserror 2.0.19", -] - -[[package]] -name = "cargo_toml" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374b7c592d9c00c1f4972ea58390ac6b18cbb6ab79011f3bdc90a0b82ca06b77" -dependencies = [ - "serde", - "toml 0.9.12+spec-1.1.0", -] - -[[package]] -name = "cc" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5add81bb678e6cb321aff7fa0dc7689ad82b112dbc032cea19f91d6b8e3582b9" -dependencies = [ - "find-msvc-tools", - "shlex", -] - -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - -[[package]] -name = "cfb" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" -dependencies = [ - "byteorder", - "fnv", - "uuid", -] - -[[package]] -name = "cfg-expr" -version = "0.15.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" -dependencies = [ - "smallvec", - "target-lexicon", -] - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "chrono" -version = "0.4.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" -dependencies = [ - "iana-time-zone", - "num-traits", - "serde", - "windows-link 0.2.1", -] - -[[package]] -name = "combine" -version = "4.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" -dependencies = [ - "bytes", - "memchr", -] - -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "cookie" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" -dependencies = [ - "time", - "version_check", -] - -[[package]] -name = "core-foundation" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "core-graphics" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" -dependencies = [ - "bitflags 2.13.1", - "core-foundation", - "core-graphics-types", - "foreign-types", - "libc", -] - -[[package]] -name = "core-graphics-types" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" -dependencies = [ - "bitflags 2.13.1", - "core-foundation", - "libc", -] - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" - -[[package]] -name = "crypto-common" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "cssparser" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2" -dependencies = [ - "cssparser-macros", - "dtoa-short", - "itoa", - "phf", - "smallvec", -] - -[[package]] -name = "cssparser-macros" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" -dependencies = [ - "quote", - "syn 2.0.119", -] - -[[package]] -name = "ctor" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "352d39c2f7bef1d6ad73db6f5160efcaed66d94ef8c6c573a8410c00bf909a98" -dependencies = [ - "ctor-proc-macro", - "dtor", -] - -[[package]] -name = "ctor-proc-macro" -version = "0.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1" - -[[package]] -name = "darling" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" -dependencies = [ - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.119", -] - -[[package]] -name = "darling_macro" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "dbus" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab69f03cc8c4340c9c8e315114e1658e6775a9b16a04357973aa21cec22b32e" -dependencies = [ - "libc", - "libdbus-sys", - "windows-sys 0.61.2", -] - -[[package]] -name = "deranged" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" -dependencies = [ - "serde_core", -] - -[[package]] -name = "derive_more" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" -dependencies = [ - "derive_more-impl", -] - -[[package]] -name = "derive_more-impl" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" -dependencies = [ - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.119", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "dirs" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.59.0", -] - -[[package]] -name = "dispatch2" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" -dependencies = [ - "bitflags 2.13.1", - "block2", - "libc", - "objc2", -] - -[[package]] -name = "displaydoc" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "dlopen2" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e2c5bd4158e66d1e215c49b837e11d62f3267b30c92f1d171c4d3105e3dc4d4" -dependencies = [ - "dlopen2_derive", - "libc", - "once_cell", - "winapi", -] - -[[package]] -name = "dlopen2_derive" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "dom_query" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521e380c0c8afb8d9a1e83a1822ee03556fc3e3e7dbc1fd30be14e37f9cb3f89" -dependencies = [ - "bit-set", - "cssparser", - "foldhash", - "html5ever", - "precomputed-hash", - "selectors", - "tendril", -] - -[[package]] -name = "dpi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" -dependencies = [ - "serde", -] - -[[package]] -name = "dtoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" - -[[package]] -name = "dtoa-short" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" -dependencies = [ - "dtoa", -] - -[[package]] -name = "dtor" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1057d6c64987086ff8ed0fd3fbf377a6b7d205cc7715868cd401705f715cbe4" -dependencies = [ - "dtor-proc-macro", -] - -[[package]] -name = "dtor-proc-macro" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5" - -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - -[[package]] -name = "dyn-clone" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" - -[[package]] -name = "embed-resource" -version = "3.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbfdaacccebec3b28e4866b8973543c7647797db5ada1bdab552e48fe665fbbd" -dependencies = [ - "cc", - "memchr", - "rustc_version", - "toml 1.1.3+spec-1.1.0", - "vswhom", - "winreg", -] - -[[package]] -name = "embed_plist" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" - -[[package]] -name = "endi" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" - -[[package]] -name = "enumflags2" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" -dependencies = [ - "enumflags2_derive", - "serde", -] - -[[package]] -name = "enumflags2_derive" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "erased-serde" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec" -dependencies = [ - "serde", - "serde_core", - "typeid", -] - -[[package]] -name = "errno" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "event-listener" -version = "5.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" -dependencies = [ - "event-listener", - "pin-project-lite", -] - -[[package]] -name = "fastrand" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" - -[[package]] -name = "fdeflate" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" -dependencies = [ - "simd-adler32", -] - -[[package]] -name = "field-offset" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" -dependencies = [ - "memoffset", - "rustc_version", -] - -[[package]] -name = "find-msvc-tools" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" - -[[package]] -name = "flate2" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foldhash" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" - -[[package]] -name = "foreign-types" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" -dependencies = [ - "foreign-types-macros", - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-macros" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.3", -] - -[[package]] -name = "foreign-types-shared" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" - -[[package]] -name = "form_urlencoded" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" - -[[package]] -name = "futures-executor" -version = "0.3.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a" - -[[package]] -name = "futures-lite" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "parking", - "pin-project-lite", -] - -[[package]] -name = "futures-macro" -version = "0.3.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "futures-sink" -version = "0.3.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307" - -[[package]] -name = "futures-task" -version = "0.3.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" - -[[package]] -name = "futures-util" -version = "0.3.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" -dependencies = [ - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "slab", -] - -[[package]] -name = "gdk" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691" -dependencies = [ - "cairo-rs", - "gdk-pixbuf", - "gdk-sys", - "gio", - "glib", - "libc", - "pango", -] - -[[package]] -name = "gdk-pixbuf" -version = "0.18.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" -dependencies = [ - "gdk-pixbuf-sys", - "gio", - "glib", - "libc", - "once_cell", -] - -[[package]] -name = "gdk-pixbuf-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" -dependencies = [ - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "gdk-sys" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" -dependencies = [ - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "pkg-config", - "system-deps", -] - -[[package]] -name = "gdkwayland-sys" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69" -dependencies = [ - "gdk-sys", - "glib-sys", - "gobject-sys", - "libc", - "pkg-config", - "system-deps", -] - -[[package]] -name = "gdkx11" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe" -dependencies = [ - "gdk", - "gdkx11-sys", - "gio", - "glib", - "libc", - "x11", -] - -[[package]] -name = "gdkx11-sys" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d" -dependencies = [ - "gdk-sys", - "glib-sys", - "libc", - "system-deps", - "x11", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "getrandom" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" -dependencies = [ - "cfg-if", - "libc", - "r-efi 5.3.0", - "wasip2", -] - -[[package]] -name = "getrandom" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" -dependencies = [ - "cfg-if", - "libc", - "r-efi 6.0.0", -] - -[[package]] -name = "gio" -version = "0.18.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "gio-sys", - "glib", - "libc", - "once_cell", - "pin-project-lite", - "smallvec", - "thiserror 1.0.69", -] - -[[package]] -name = "gio-sys" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", - "winapi", -] - -[[package]] -name = "glib" -version = "0.18.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" -dependencies = [ - "bitflags 2.13.1", - "futures-channel", - "futures-core", - "futures-executor", - "futures-task", - "futures-util", - "gio-sys", - "glib-macros", - "glib-sys", - "gobject-sys", - "libc", - "memchr", - "once_cell", - "smallvec", - "thiserror 1.0.69", -] - -[[package]] -name = "glib-macros" -version = "0.18.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" -dependencies = [ - "heck 0.4.1", - "proc-macro-crate 2.0.2", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "glib-sys" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" -dependencies = [ - "libc", - "system-deps", -] - -[[package]] -name = "glob" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" - -[[package]] -name = "gobject-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" -dependencies = [ - "glib-sys", - "libc", - "system-deps", -] - -[[package]] -name = "gtk" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a" -dependencies = [ - "atk", - "cairo-rs", - "field-offset", - "futures-channel", - "gdk", - "gdk-pixbuf", - "gio", - "glib", - "gtk-sys", - "gtk3-macros", - "libc", - "pango", - "pkg-config", -] - -[[package]] -name = "gtk-sys" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" -dependencies = [ - "atk-sys", - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gdk-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "system-deps", -] - -[[package]] -name = "gtk3-macros" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "html5ever" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1054432bae2f14e0061e33d23402fbaa67a921d319d56adc6bcf887ddad1cbc2" -dependencies = [ - "log", - "markup5ever", -] - -[[package]] -name = "http" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" -dependencies = [ - "bytes", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2" -dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" - -[[package]] -name = "hyper" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" -dependencies = [ - "atomic-waker", - "bytes", - "futures-channel", - "futures-core", - "http", - "http-body", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-util" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" -dependencies = [ - "base64 0.22.1", - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "hyper", - "ipnet", - "libc", - "percent-encoding", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.65" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core 0.62.2", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ico" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e795dff5605e0f04bff85ca41b51a96b83e80b281e96231bcaaf1ac35103371" -dependencies = [ - "byteorder", - "png 0.17.16", -] - -[[package]] -name = "icu_collections" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" -dependencies = [ - "displaydoc", - "potential_utf", - "utf8_iter", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" -dependencies = [ - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" - -[[package]] -name = "icu_properties" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" -dependencies = [ - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" - -[[package]] -name = "icu_provider" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" -dependencies = [ - "displaydoc", - "icu_locale_core", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "indexmap" -version = "2.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" -dependencies = [ - "equivalent", - "hashbrown 0.17.1", - "serde", - "serde_core", -] - -[[package]] -name = "infer" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7" -dependencies = [ - "cfb", -] - -[[package]] -name = "io-kit-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06d3a048d09fbb6597dbf7c69f40d14df4a49487db1487191618c893fc3b1c26" -dependencies = [ - "core-foundation-sys", - "mach2", -] - -[[package]] -name = "ipnet" -version = "2.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" - -[[package]] -name = "is-docker" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" -dependencies = [ - "once_cell", -] - -[[package]] -name = "is-wsl" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" -dependencies = [ - "is-docker", - "once_cell", -] - -[[package]] -name = "itoa" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" - -[[package]] -name = "javascriptcore-rs" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" -dependencies = [ - "bitflags 1.3.2", - "glib", - "javascriptcore-rs-sys", -] - -[[package]] -name = "javascriptcore-rs-sys" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "jni" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" -dependencies = [ - "cesu8", - "cfg-if", - "combine", - "jni-sys 0.3.1", - "log", - "thiserror 1.0.69", - "walkdir", - "windows-sys 0.45.0", -] - -[[package]] -name = "jni-sys" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" -dependencies = [ - "jni-sys 0.4.1", -] - -[[package]] -name = "jni-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" -dependencies = [ - "jni-sys-macros", -] - -[[package]] -name = "jni-sys-macros" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" -dependencies = [ - "quote", - "syn 2.0.119", -] - -[[package]] -name = "js-sys" -version = "0.3.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" -dependencies = [ - "cfg-if", - "futures-util", - "wasm-bindgen", -] - -[[package]] -name = "json-patch" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08" -dependencies = [ - "jsonptr", - "serde", - "serde_json", - "thiserror 1.0.69", -] - -[[package]] -name = "jsonptr" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dea2b27dd239b2556ed7a25ba842fe47fd602e7fc7433c2a8d6106d4d9edd70" -dependencies = [ - "serde", - "serde_json", -] - -[[package]] -name = "keyboard-types" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" -dependencies = [ - "bitflags 2.13.1", - "serde", - "unicode-segmentation", -] - -[[package]] -name = "libappindicator" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" -dependencies = [ - "glib", - "gtk", - "gtk-sys", - "libappindicator-sys", - "log", -] - -[[package]] -name = "libappindicator-sys" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" -dependencies = [ - "gtk-sys", - "libloading", - "once_cell", -] - -[[package]] -name = "libc" -version = "0.2.189" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" - -[[package]] -name = "libdbus-sys" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "328c4789d42200f1eeec05bd86c9c13c7f091d2ba9a6ea35acdf51f31bc0f043" -dependencies = [ - "pkg-config", -] - -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] - -[[package]] -name = "libredox" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c943259e342f1e06ff2da7a83eabdfe7f92ce10262688dbf1895ff0b3e6e4652" -dependencies = [ - "libc", -] - -[[package]] -name = "linux-raw-sys" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" - -[[package]] -name = "litemap" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" - -[[package]] -name = "lock_api" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" - -[[package]] -name = "mach2" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a1b95cd5421ec55b445b5ae102f5ea0e768de1f82bd3001e11f426c269c3aea" -dependencies = [ - "libc", -] - -[[package]] -name = "markup5ever" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8983d30f2915feeaaab2d6babdd6bc7e9ed1a00b66b5e6d74df19aa9c0e91862" -dependencies = [ - "log", - "tendril", - "web_atoms", -] - -[[package]] -name = "memchr" -version = "2.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" - -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" -dependencies = [ - "adler2", - "simd-adler32", -] - -[[package]] -name = "mio" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.61.2", -] - -[[package]] -name = "muda" -version = "0.19.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd04e60bc0b07438a6771710ee1698f98f6ebbc7f89b61264af1563b8aeb878" -dependencies = [ - "crossbeam-channel", - "dpi", - "gtk", - "keyboard-types", - "objc2", - "objc2-app-kit", - "objc2-core-foundation", - "objc2-foundation", - "once_cell", - "png 0.18.1", - "serde", - "thiserror 2.0.19", - "windows-sys 0.60.2", -] - -[[package]] -name = "ndk" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" -dependencies = [ - "bitflags 2.13.1", - "jni-sys 0.3.1", - "log", - "ndk-sys", - "num_enum", - "raw-window-handle", - "thiserror 1.0.69", -] - -[[package]] -name = "ndk-sys" -version = "0.6.0+11769913" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" -dependencies = [ - "jni-sys 0.3.1", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - -[[package]] -name = "num-conv" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_enum" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" -dependencies = [ - "num_enum_derive", - "rustversion", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" -dependencies = [ - "proc-macro-crate 3.5.0", - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "nusb" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1553b6f47685e4c658b2100a6d7262abdc73cb97f423453546ca020155ae9" -dependencies = [ - "core-foundation", - "core-foundation-sys", - "futures-core", - "io-kit-sys", - "linux-raw-sys", - "log", - "once_cell", - "rustix", - "slab", - "tokio", - "windows-sys 0.60.2", -] - -[[package]] -name = "obc-crc" -version = "0.1.0" - -[[package]] -name = "obc-desktop" -version = "0.1.0" -dependencies = [ - "futures-core", - "nusb", - "obc-usb", - "serde", - "serde_json", - "tauri", - "tauri-build", - "tauri-plugin-dialog", - "tauri-plugin-opener", - "tokio", - "ureq", - "url", -] - -[[package]] -name = "obc-link" -version = "0.1.0" -dependencies = [ - "obc-crc", -] - -[[package]] -name = "obc-usb" -version = "0.1.0" -dependencies = [ - "getrandom 0.4.3", - "nusb", - "obc-link", - "serde", - "tokio", -] - -[[package]] -name = "objc2" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" -dependencies = [ - "objc2-encode", - "objc2-exception-helper", -] - -[[package]] -name = "objc2-app-kit" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" -dependencies = [ - "bitflags 2.13.1", - "block2", - "objc2", - "objc2-core-foundation", - "objc2-foundation", -] - -[[package]] -name = "objc2-cloud-kit" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" -dependencies = [ - "bitflags 2.13.1", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-data" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" -dependencies = [ - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-foundation" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" -dependencies = [ - "bitflags 2.13.1", - "dispatch2", - "objc2", -] - -[[package]] -name = "objc2-core-graphics" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" -dependencies = [ - "bitflags 2.13.1", - "dispatch2", - "objc2", - "objc2-core-foundation", - "objc2-io-surface", -] - -[[package]] -name = "objc2-core-image" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" -dependencies = [ - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-location" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009" -dependencies = [ - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-text" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" -dependencies = [ - "bitflags 2.13.1", - "objc2", - "objc2-core-foundation", - "objc2-core-graphics", -] - -[[package]] -name = "objc2-encode" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" - -[[package]] -name = "objc2-exception-helper" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" -dependencies = [ - "cc", -] - -[[package]] -name = "objc2-foundation" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" -dependencies = [ - "bitflags 2.13.1", - "block2", - "libc", - "objc2", - "objc2-core-foundation", -] - -[[package]] -name = "objc2-io-surface" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" -dependencies = [ - "bitflags 2.13.1", - "objc2", - "objc2-core-foundation", -] - -[[package]] -name = "objc2-quartz-core" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" -dependencies = [ - "bitflags 2.13.1", - "objc2", - "objc2-core-foundation", - "objc2-foundation", -] - -[[package]] -name = "objc2-ui-kit" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" -dependencies = [ - "bitflags 2.13.1", - "block2", - "objc2", - "objc2-cloud-kit", - "objc2-core-data", - "objc2-core-foundation", - "objc2-core-graphics", - "objc2-core-image", - "objc2-core-location", - "objc2-core-text", - "objc2-foundation", - "objc2-quartz-core", - "objc2-user-notifications", -] - -[[package]] -name = "objc2-user-notifications" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e" -dependencies = [ - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-web-kit" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" -dependencies = [ - "bitflags 2.13.1", - "block2", - "objc2", - "objc2-app-kit", - "objc2-core-foundation", - "objc2-foundation", -] - -[[package]] -name = "once_cell" -version = "1.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" - -[[package]] -name = "open" -version = "5.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0b3d059e795d52b8a72fef45658620edd4d9c359b338564aa14391ffa511ed5" -dependencies = [ - "dunce", - "is-wsl", - "libc", -] - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "ordered-stream" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" -dependencies = [ - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "pango" -version = "0.18.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" -dependencies = [ - "gio", - "glib", - "libc", - "once_cell", - "pango-sys", -] - -[[package]] -name = "pango-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "parking" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" - -[[package]] -name = "parking_lot" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-link 0.2.1", -] - -[[package]] -name = "percent-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" - -[[package]] -name = "phf" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" -dependencies = [ - "phf_macros", - "phf_shared", - "serde", -] - -[[package]] -name = "phf_codegen" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1" -dependencies = [ - "phf_generator", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" -dependencies = [ - "fastrand", - "phf_shared", -] - -[[package]] -name = "phf_macros" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" -dependencies = [ - "phf_generator", - "phf_shared", - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "phf_shared" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" - -[[package]] -name = "piper" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" -dependencies = [ - "atomic-waker", - "fastrand", - "futures-io", -] - -[[package]] -name = "pkg-config" -version = "0.3.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" - -[[package]] -name = "plist" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da1d65da6dd5d1e44199ac0f58712d241c0f439f80adea8924d832384087f85" -dependencies = [ - "base64 0.22.1", - "indexmap 2.14.0", - "quick-xml", - "serde", - "time", -] - -[[package]] -name = "png" -version = "0.17.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" -dependencies = [ - "bitflags 1.3.2", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide", -] - -[[package]] -name = "png" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" -dependencies = [ - "bitflags 2.13.1", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide", -] - -[[package]] -name = "polling" -version = "3.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" -dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi", - "pin-project-lite", - "rustix", - "windows-sys 0.61.2", -] - -[[package]] -name = "potential_utf" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" -dependencies = [ - "zerovec", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro-crate" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" -dependencies = [ - "toml_datetime 0.6.3", - "toml_edit 0.20.2", -] - -[[package]] -name = "proc-macro-crate" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" -dependencies = [ - "toml_edit 0.25.13+spec-1.1.0", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.107" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quick-xml" -version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" -dependencies = [ - "memchr", -] - -[[package]] -name = "quote" -version = "1.0.47" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - -[[package]] -name = "r-efi" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" - -[[package]] -name = "raw-window-handle" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" - -[[package]] -name = "redox_syscall" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" -dependencies = [ - "bitflags 2.13.1", -] - -[[package]] -name = "redox_users" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" -dependencies = [ - "getrandom 0.2.17", - "libredox", - "thiserror 2.0.19", -] - -[[package]] -name = "ref-cast" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d" -dependencies = [ - "ref-cast-impl", -] - -[[package]] -name = "ref-cast-impl" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.3", -] - -[[package]] -name = "regex" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" - -[[package]] -name = "reqwest" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" -dependencies = [ - "base64 0.22.1", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-util", - "js-sys", - "log", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "sync_wrapper", - "tokio", - "tokio-util", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", -] - -[[package]] -name = "rfd" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15ad77d9e70a92437d8f74c35d99b4e4691128df018833e99f90bcd36152672" -dependencies = [ - "block2", - "dispatch2", - "glib-sys", - "gobject-sys", - "gtk-sys", - "js-sys", - "log", - "objc2", - "objc2-app-kit", - "objc2-core-foundation", - "objc2-foundation", - "raw-window-handle", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows-sys 0.60.2", -] - -[[package]] -name = "ring" -version = "0.17.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.17", - "libc", - "untrusted", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustc-hash" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" - -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" -dependencies = [ - "bitflags 2.13.1", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.23.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" -dependencies = [ - "log", - "once_cell", - "ring", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pki-types" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" -dependencies = [ - "zeroize", -] - -[[package]] -name = "rustls-webpki" -version = "0.103.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schemars" -version = "0.8.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" -dependencies = [ - "dyn-clone", - "indexmap 1.9.3", - "schemars_derive", - "serde", - "serde_json", - "url", - "uuid", -] - -[[package]] -name = "schemars" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" -dependencies = [ - "dyn-clone", - "ref-cast", - "serde", - "serde_json", -] - -[[package]] -name = "schemars" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" -dependencies = [ - "dyn-clone", - "ref-cast", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 2.0.119", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "selectors" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d9c0c92a92d33f08817311cf3f2c29a3538a8240e94a6a3c622ce652d7e00c" -dependencies = [ - "bitflags 2.13.1", - "cssparser", - "derive_more", - "log", - "new_debug_unreachable", - "phf", - "phf_codegen", - "precomputed-hash", - "rustc-hash", - "servo_arc", - "smallvec", -] - -[[package]] -name = "semver" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" -dependencies = [ - "serde", - "serde_core", -] - -[[package]] -name = "serde" -version = "1.0.229" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" -dependencies = [ - "serde_core", - "serde_derive", -] - -[[package]] -name = "serde-untagged" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058" -dependencies = [ - "erased-serde", - "serde", - "serde_core", - "typeid", -] - -[[package]] -name = "serde_core" -version = "1.0.229" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.229" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.3", -] - -[[package]] -name = "serde_derive_internals" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "serde_json" -version = "1.0.151" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" -dependencies = [ - "itoa", - "memchr", - "serde", - "serde_core", - "zmij", -] - -[[package]] -name = "serde_repr" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.3", -] - -[[package]] -name = "serde_spanned" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_spanned" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" -dependencies = [ - "serde_core", -] - -[[package]] -name = "serde_with" -version = "3.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" -dependencies = [ - "base64 0.22.1", - "bs58", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.14.0", - "schemars 0.9.0", - "schemars 1.2.1", - "serde_core", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "3.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "serialize-to-javascript" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5" -dependencies = [ - "serde", - "serde_json", - "serialize-to-javascript-impl", -] - -[[package]] -name = "serialize-to-javascript-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "servo_arc" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930" -dependencies = [ - "stable_deref_trait", -] - -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "shlex" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" - -[[package]] -name = "signal-hook-registry" -version = "1.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" -dependencies = [ - "errno", - "libc", -] - -[[package]] -name = "simd-adler32" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" - -[[package]] -name = "siphasher" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" - -[[package]] -name = "slab" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" - -[[package]] -name = "smallvec" -version = "1.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" - -[[package]] -name = "socket2" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" -dependencies = [ - "libc", - "windows-sys 0.60.2", -] - -[[package]] -name = "softbuffer" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3" -dependencies = [ - "bytemuck", - "js-sys", - "ndk", - "objc2", - "objc2-core-foundation", - "objc2-core-graphics", - "objc2-foundation", - "objc2-quartz-core", - "raw-window-handle", - "redox_syscall", - "tracing", - "wasm-bindgen", - "web-sys", - "windows-sys 0.61.2", -] - -[[package]] -name = "soup3" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" -dependencies = [ - "futures-channel", - "gio", - "glib", - "libc", - "soup3-sys", -] - -[[package]] -name = "soup3-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" -dependencies = [ - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" - -[[package]] -name = "string_cache" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901" -dependencies = [ - "new_debug_unreachable", - "parking_lot", - "phf_shared", - "precomputed-hash", -] - -[[package]] -name = "string_cache_codegen" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69" -dependencies = [ - "phf_generator", - "phf_shared", - "proc-macro2", - "quote", -] - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "swift-rs" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7" -dependencies = [ - "base64 0.21.7", - "serde", - "serde_json", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.119" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" -dependencies = [ - "futures-core", -] - -[[package]] -name = "synstructure" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "system-deps" -version = "6.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" -dependencies = [ - "cfg-expr", - "heck 0.5.0", - "pkg-config", - "toml 0.8.2", - "version-compare", -] - -[[package]] -name = "tao" -version = "0.35.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1c93047acf68669466a34690ac58cca7010bd1b201e1ec86f1fd0a75d3dd4a9" -dependencies = [ - "bitflags 2.13.1", - "block2", - "core-foundation", - "core-graphics", - "crossbeam-channel", - "dbus", - "dispatch2", - "dlopen2", - "dpi", - "gdkwayland-sys", - "gdkx11-sys", - "gtk", - "jni", - "libc", - "log", - "ndk", - "ndk-sys", - "objc2", - "objc2-app-kit", - "objc2-foundation", - "objc2-ui-kit", - "once_cell", - "parking_lot", - "percent-encoding", - "raw-window-handle", - "tao-macros", - "unicode-segmentation", - "url", - "windows", - "windows-core 0.61.2", - "windows-version", - "x11-dl", -] - -[[package]] -name = "tao-macros" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "target-lexicon" -version = "0.12.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" - -[[package]] -name = "tauri" -version = "2.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "667b20e2726d572dea2de7370da16e188eb06008faf9a92fab7cdc46791190b5" -dependencies = [ - "anyhow", - "bytes", - "cookie", - "dirs", - "dunce", - "embed_plist", - "getrandom 0.3.4", - "glob", - "gtk", - "heck 0.5.0", - "http", - "jni", - "libc", - "log", - "mime", - "muda", - "objc2", - "objc2-app-kit", - "objc2-foundation", - "objc2-ui-kit", - "objc2-web-kit", - "percent-encoding", - "plist", - "raw-window-handle", - "reqwest", - "serde", - "serde_json", - "serde_repr", - "serialize-to-javascript", - "swift-rs", - "tauri-build", - "tauri-macros", - "tauri-runtime", - "tauri-runtime-wry", - "tauri-utils", - "thiserror 2.0.19", - "tokio", - "tray-icon", - "url", - "webkit2gtk", - "webview2-com", - "window-vibrancy", - "windows", -] - -[[package]] -name = "tauri-build" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc9ce40b16101cb6ea63d3e221567affd1c3a9205f95d7bc574941a10636b632" -dependencies = [ - "anyhow", - "cargo_toml", - "dirs", - "glob", - "heck 0.5.0", - "json-patch", - "schemars 0.8.22", - "semver", - "serde", - "serde_json", - "tauri-utils", - "tauri-winres", - "walkdir", -] - -[[package]] -name = "tauri-codegen" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08279169ff42f8fc45a1dbc9dcae888893ba95288142e5880c59b93a26d2cfc5" -dependencies = [ - "base64 0.22.1", - "brotli", - "ico", - "json-patch", - "plist", - "png 0.17.16", - "proc-macro2", - "quote", - "semver", - "serde", - "serde_json", - "sha2", - "syn 2.0.119", - "tauri-utils", - "thiserror 2.0.19", - "time", - "url", - "uuid", - "walkdir", -] - -[[package]] -name = "tauri-macros" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8b394794f399a421811d06966343e7933fcae92d59f5180b9388d1174497a45" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "syn 2.0.119", - "tauri-codegen", - "tauri-utils", -] - -[[package]] -name = "tauri-plugin" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74be5dd4bed9afbd145e5716b5fa2ec28cbc29c34ffa61c258c9273d896c8020" -dependencies = [ - "anyhow", - "glob", - "plist", - "schemars 0.8.22", - "serde", - "serde_json", - "tauri-utils", - "walkdir", -] - -[[package]] -name = "tauri-plugin-dialog" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2d3c1dbe38037e7f590cdf2492594d5ceebe031e7bc7e827509b22a999d2940" -dependencies = [ - "log", - "raw-window-handle", - "rfd", - "serde", - "serde_json", - "tauri", - "tauri-plugin", - "tauri-plugin-fs", - "thiserror 2.0.19", - "url", -] - -[[package]] -name = "tauri-plugin-fs" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ecc274121aca0c036a2b42d1cbe83d368d348f54e0bb8a735c2b1548e8f371" -dependencies = [ - "anyhow", - "dunce", - "glob", - "log", - "objc2-foundation", - "percent-encoding", - "schemars 0.8.22", - "serde", - "serde_json", - "serde_repr", - "tauri", - "tauri-plugin", - "tauri-utils", - "thiserror 2.0.19", - "toml 1.1.3+spec-1.1.0", - "url", -] - -[[package]] -name = "tauri-plugin-opener" -version = "2.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17e1bea14edce6b793a04e2417e3fd924b9bc4faae83cdee7d714156cceeed29" -dependencies = [ - "dunce", - "glob", - "objc2-app-kit", - "objc2-foundation", - "open", - "schemars 0.8.22", - "serde", - "serde_json", - "tauri", - "tauri-plugin", - "thiserror 2.0.19", - "url", - "windows", - "zbus", -] - -[[package]] -name = "tauri-runtime" -version = "2.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0b4bc95aed361b0019067d189a1174a603d460d0f6c72606512d59fc9c12ec8" -dependencies = [ - "cookie", - "dpi", - "gtk", - "http", - "jni", - "objc2", - "objc2-ui-kit", - "objc2-web-kit", - "raw-window-handle", - "serde", - "serde_json", - "tauri-utils", - "thiserror 2.0.19", - "url", - "webkit2gtk", - "webview2-com", - "windows", -] - -[[package]] -name = "tauri-runtime-wry" -version = "2.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e6fac707727b7a2f48e4ded90976324267371073edbb415ffb73bb0458d203f" -dependencies = [ - "gtk", - "http", - "jni", - "log", - "objc2", - "objc2-app-kit", - "once_cell", - "percent-encoding", - "raw-window-handle", - "softbuffer", - "tao", - "tauri-runtime", - "tauri-utils", - "url", - "webkit2gtk", - "webview2-com", - "windows", - "wry", -] - -[[package]] -name = "tauri-utils" -version = "2.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e176a18e67764923c4f1ce66f25ae4abe5f688384d5eb1a0fa6c77f3d90f887" -dependencies = [ - "anyhow", - "brotli", - "cargo_metadata", - "ctor", - "dom_query", - "dunce", - "glob", - "http", - "infer", - "json-patch", - "log", - "memchr", - "phf", - "plist", - "proc-macro2", - "quote", - "regex", - "schemars 0.8.22", - "semver", - "serde", - "serde-untagged", - "serde_json", - "serde_with", - "swift-rs", - "thiserror 2.0.19", - "toml 1.1.3+spec-1.1.0", - "url", - "urlpattern", - "uuid", - "walkdir", -] - -[[package]] -name = "tauri-winres" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc65d45c68858bfe420dd29e834b5d15dbecf8a07a8a16cf4d532c7b1f69d4b6" -dependencies = [ - "dunce", - "embed-resource", - "toml 1.1.3+spec-1.1.0", -] - -[[package]] -name = "tempfile" -version = "3.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" -dependencies = [ - "fastrand", - "getrandom 0.4.3", - "once_cell", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "tendril" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08" -dependencies = [ - "new_debug_unreachable", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" -dependencies = [ - "thiserror-impl 2.0.19", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.3", -] - -[[package]] -name = "time" -version = "0.3.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e1d5e639ff6bab73cb6885cc7e7b1de96c3f32c68ec55f3952614bec1092244" -dependencies = [ - "deranged", - "num-conv", - "powerfmt", - "serde_core", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" - -[[package]] -name = "time-macros" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tinystr" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" -dependencies = [ - "displaydoc", - "zerovec", -] - -[[package]] -name = "tinyvec" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.53.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce3335fa71841cda333a58d7615b03901380ecf09d59b3296d21f8bbac0dde4e" -dependencies = [ - "bytes", - "libc", - "mio", - "pin-project-lite", - "socket2", - "tokio-macros", - "windows-sys 0.61.2", -] - -[[package]] -name = "tokio-macros" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6328af13490e73a9b4694030fafd93f8c8c6a9dede33e821c3fc63eddf8042ba" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "tokio-util" -version = "0.7.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" -dependencies = [ - "serde", - "serde_spanned 0.6.9", - "toml_datetime 0.6.3", - "toml_edit 0.20.2", -] - -[[package]] -name = "toml" -version = "0.9.12+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" -dependencies = [ - "indexmap 2.14.0", - "serde_core", - "serde_spanned 1.1.1", - "toml_datetime 0.7.5+spec-1.1.0", - "toml_parser", - "toml_writer", - "winnow 0.7.15", -] - -[[package]] -name = "toml" -version = "1.1.3+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53c96ecdfa941c8fc4fcaed14f99ada8ebed502eef533015095a07e3301d4c3c" -dependencies = [ - "indexmap 2.14.0", - "serde_core", - "serde_spanned 1.1.1", - "toml_datetime 1.1.1+spec-1.1.0", - "toml_parser", - "toml_writer", - "winnow 1.0.4", -] - -[[package]] -name = "toml_datetime" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_datetime" -version = "0.7.5+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" -dependencies = [ - "serde_core", -] - -[[package]] -name = "toml_datetime" -version = "1.1.1+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" -dependencies = [ - "serde_core", -] - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.14.0", - "toml_datetime 0.6.3", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" -dependencies = [ - "indexmap 2.14.0", - "serde", - "serde_spanned 0.6.9", - "toml_datetime 0.6.3", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.25.13+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" -dependencies = [ - "indexmap 2.14.0", - "toml_datetime 1.1.1+spec-1.1.0", - "toml_parser", - "winnow 1.0.4", -] - -[[package]] -name = "toml_parser" -version = "1.1.2+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" -dependencies = [ - "winnow 1.0.4", -] - -[[package]] -name = "toml_writer" -version = "1.1.2+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" - -[[package]] -name = "tower" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-http" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" -dependencies = [ - "bitflags 2.13.1", - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite", - "tower", - "tower-layer", - "tower-service", - "url", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "tracing-core" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" -dependencies = [ - "once_cell", -] - -[[package]] -name = "tray-icon" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ba1e5f6b9ef9fd87e21b9c6f351554dbd717960089168fcfdef854686961dc" -dependencies = [ - "crossbeam-channel", - "dirs", - "libappindicator", - "muda", - "objc2", - "objc2-app-kit", - "objc2-core-foundation", - "objc2-core-graphics", - "objc2-foundation", - "once_cell", - "png 0.18.1", - "serde", - "thiserror 2.0.19", - "windows-sys 0.60.2", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "typeid" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" - -[[package]] -name = "typenum" -version = "1.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" - -[[package]] -name = "uds_windows" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" -dependencies = [ - "memoffset", - "tempfile", - "windows-sys 0.60.2", -] - -[[package]] -name = "unic-char-property" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" -dependencies = [ - "unic-char-range", -] - -[[package]] -name = "unic-char-range" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" - -[[package]] -name = "unic-common" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" - -[[package]] -name = "unic-ucd-ident" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" -dependencies = [ - "unic-char-property", - "unic-char-range", - "unic-ucd-version", -] - -[[package]] -name = "unic-ucd-version" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" -dependencies = [ - "unic-common", -] - -[[package]] -name = "unicode-ident" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" - -[[package]] -name = "unicode-segmentation" -version = "1.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "ureq" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea7109cdcd5864d4eeb1b58a1648dc9bf520360d7af16ec26d0a9354bafcfc0" -dependencies = [ - "base64 0.22.1", - "flate2", - "log", - "percent-encoding", - "rustls", - "rustls-pki-types", - "ureq-proto", - "utf8-zero", - "webpki-roots", -] - -[[package]] -name = "ureq-proto" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e994ba84b0bd1b1b0cf92878b7ef898a5c1760108fe7b6010327e274917a808c" -dependencies = [ - "base64 0.22.1", - "http", - "httparse", - "log", -] - -[[package]] -name = "url" -version = "2.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", - "serde_derive", -] - -[[package]] -name = "urlpattern" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d" -dependencies = [ - "regex", - "serde", - "unic-ucd-ident", - "url", -] - -[[package]] -name = "utf8-zero" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8c0a043c9540bae7c578c88f91dda8bd82e59ae27c21baca69c8b191aaf5a6e" - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[package]] -name = "uuid" -version = "1.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239" -dependencies = [ - "getrandom 0.4.3", - "js-sys", - "serde_core", - "wasm-bindgen", -] - -[[package]] -name = "version-compare" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "vswhom" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" -dependencies = [ - "libc", - "vswhom-sys", -] - -[[package]] -name = "vswhom-sys" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - -[[package]] -name = "wasip2" -version = "1.0.4+wasi-0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.126" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.126" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.126" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" -dependencies = [ - "bumpalo", - "proc-macro2", - "quote", - "syn 2.0.119", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.126" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "wasm-streams" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "web-sys" -version = "0.3.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "web_atoms" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "075474b12bcb3d2e3d4546580e9de478eeeead668a1761e2a8860c836b7ef297" -dependencies = [ - "phf", - "phf_codegen", - "string_cache", - "string_cache_codegen", -] - -[[package]] -name = "webkit2gtk" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1027150013530fb2eaf806408df88461ae4815a45c541c8975e61d6f2fc4793" -dependencies = [ - "bitflags 1.3.2", - "cairo-rs", - "gdk", - "gdk-sys", - "gio", - "gio-sys", - "glib", - "glib-sys", - "gobject-sys", - "gtk", - "gtk-sys", - "javascriptcore-rs", - "libc", - "once_cell", - "soup3", - "webkit2gtk-sys", -] - -[[package]] -name = "webkit2gtk-sys" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "916a5f65c2ef0dfe12fff695960a2ec3d4565359fdbb2e9943c974e06c734ea5" -dependencies = [ - "bitflags 1.3.2", - "cairo-sys-rs", - "gdk-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "gtk-sys", - "javascriptcore-rs-sys", - "libc", - "pkg-config", - "soup3-sys", - "system-deps", -] - -[[package]] -name = "webpki-roots" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c1c8e20c8a38fc7d65abfe74eb7280e4aa667e8eec8bc84996d2874810748d9" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "webview2-com" -version = "0.38.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7130243a7a5b33c54a444e54842e6a9e133de08b5ad7b5861cd8ed9a6a5bc96a" -dependencies = [ - "webview2-com-macros", - "webview2-com-sys", - "windows", - "windows-core 0.61.2", - "windows-implement", - "windows-interface", -] - -[[package]] -name = "webview2-com-macros" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "webview2-com-sys" -version = "0.38.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c" -dependencies = [ - "thiserror 2.0.19", - "windows", - "windows-core 0.61.2", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "window-vibrancy" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c" -dependencies = [ - "objc2", - "objc2-app-kit", - "objc2-core-foundation", - "objc2-foundation", - "raw-window-handle", - "windows-sys 0.59.0", - "windows-version", -] - -[[package]] -name = "windows" -version = "0.61.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" -dependencies = [ - "windows-collections", - "windows-core 0.61.2", - "windows-future", - "windows-link 0.1.3", - "windows-numerics", -] - -[[package]] -name = "windows-collections" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" -dependencies = [ - "windows-core 0.61.2", -] - -[[package]] -name = "windows-core" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link 0.1.3", - "windows-result 0.3.4", - "windows-strings 0.4.2", -] - -[[package]] -name = "windows-core" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link 0.2.1", - "windows-result 0.4.1", - "windows-strings 0.5.1", -] - -[[package]] -name = "windows-future" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" -dependencies = [ - "windows-core 0.61.2", - "windows-link 0.1.3", - "windows-threading", -] - -[[package]] -name = "windows-implement" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "windows-interface" -version = "0.59.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-numerics" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" -dependencies = [ - "windows-core 0.61.2", - "windows-link 0.1.3", -] - -[[package]] -name = "windows-result" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" -dependencies = [ - "windows-link 0.1.3", -] - -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link 0.2.1", -] - -[[package]] -name = "windows-strings" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" -dependencies = [ - "windows-link 0.1.3", -] - -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link 0.2.1", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.5", -] - -[[package]] -name = "windows-sys" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" -dependencies = [ - "windows-link 0.2.1", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link 0.2.1", - "windows_aarch64_gnullvm 0.53.1", - "windows_aarch64_msvc 0.53.1", - "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", - "windows_i686_msvc 0.53.1", - "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", - "windows_x86_64_msvc 0.53.1", -] - -[[package]] -name = "windows-threading" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" -dependencies = [ - "windows-link 0.1.3", -] - -[[package]] -name = "windows-version" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631" -dependencies = [ - "windows-link 0.2.1", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_i686_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" - -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "winnow" -version = "0.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" - -[[package]] -name = "winnow" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.55.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97" -dependencies = [ - "cfg-if", - "windows-sys 0.59.0", -] - -[[package]] -name = "wit-bindgen" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" - -[[package]] -name = "writeable" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" - -[[package]] -name = "wry" -version = "0.55.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186f9871daa55fd9c016578b810d149de58367113db7fb72b462d2323ce19514" -dependencies = [ - "base64 0.22.1", - "block2", - "cookie", - "crossbeam-channel", - "dirs", - "dom_query", - "dpi", - "dunce", - "gdkx11", - "gtk", - "http", - "javascriptcore-rs", - "jni", - "libc", - "ndk", - "objc2", - "objc2-app-kit", - "objc2-core-foundation", - "objc2-foundation", - "objc2-ui-kit", - "objc2-web-kit", - "once_cell", - "percent-encoding", - "raw-window-handle", - "sha2", - "soup3", - "tao-macros", - "thiserror 2.0.19", - "url", - "webkit2gtk", - "webkit2gtk-sys", - "webview2-com", - "windows", - "windows-core 0.61.2", - "windows-version", - "x11-dl", -] - -[[package]] -name = "x11" -version = "2.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" -dependencies = [ - "libc", - "pkg-config", -] - -[[package]] -name = "x11-dl" -version = "2.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" -dependencies = [ - "libc", - "once_cell", - "pkg-config", -] - -[[package]] -name = "yoke" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" -dependencies = [ - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", - "synstructure", -] - -[[package]] -name = "zbus" -version = "5.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe18fb60dc696039e738717b76eaea21e7a4489bbb1885020b43c94236d7e98a" -dependencies = [ - "async-broadcast", - "async-executor", - "async-io", - "async-lock", - "async-process", - "async-recursion", - "async-task", - "async-trait", - "blocking", - "enumflags2", - "event-listener", - "futures-core", - "futures-lite", - "hex", - "libc", - "ordered-stream", - "rustix", - "serde", - "serde_repr", - "tracing", - "uds_windows", - "uuid", - "windows-sys 0.61.2", - "winnow 1.0.4", - "zbus_macros", - "zbus_names", - "zvariant", -] - -[[package]] -name = "zbus_macros" -version = "5.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe96480bed92df2b442a1a30df364e12d08eed03aeb061f2b8dc6afb2be91119" -dependencies = [ - "proc-macro-crate 3.5.0", - "proc-macro2", - "quote", - "syn 2.0.119", - "zbus_names", - "zvariant", - "zvariant_utils", -] - -[[package]] -name = "zbus_names" -version = "4.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bf88b4a3ff53e883001e0e0115b297a9d53c31b9c1edd2bfdd853e3428624e" -dependencies = [ - "serde", - "winnow 1.0.4", - "zvariant", -] - -[[package]] -name = "zerofrom" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", - "synstructure", -] - -[[package]] -name = "zeroize" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" - -[[package]] -name = "zerotrie" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - -[[package]] -name = "zmij" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" - -[[package]] -name = "zvariant" -version = "5.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee2a0bcd2a907786a456fff45aaaaf54c9ba5f50b71ae9ec1a4edd200c94911" -dependencies = [ - "endi", - "enumflags2", - "serde", - "winnow 1.0.4", - "zvariant_derive", - "zvariant_utils", -] - -[[package]] -name = "zvariant_derive" -version = "5.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38a708216a18780796770bfe3f4739c7c83a3e8f789b755534bbbc06e4e23e12" -dependencies = [ - "proc-macro-crate 3.5.0", - "proc-macro2", - "quote", - "syn 2.0.119", - "zvariant_utils", -] - -[[package]] -name = "zvariant_utils" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90cb9383f9b45290407a1258b202d3f8f01db719eb60b4e4055c6375af4fc7c7" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "syn 2.0.119", - "winnow 1.0.4", -] diff --git a/builder/desktop/Cargo.toml b/builder/desktop/Cargo.toml deleted file mode 100644 index 9b9140dfa0..0000000000 --- a/builder/desktop/Cargo.toml +++ /dev/null @@ -1,75 +0,0 @@ -[package] -name = "obc-desktop" -version = "0.1.0" -edition = "2021" -publish = false # internal app crate — not published to crates.io -description = "OpenBikeComputer desktop app: the published-cell builder in a Tauri shell" - -# A standalone cargo root, like obc-fw-nrf54l and obc-boot — deliberately NOT a -# member of the root Cargo.toml. Tauri drags in wry and a platform webview -# (WebKitGTK on Linux, WebView2 on Windows), so joining the workspace would put a -# GUI toolkit and its system headers in the way of `cargo test` for the renderer. -# The cost is the usual one for an excluded crate: its own Cargo.lock, its own -# fmt/clippy/test invocations, and its own CI job — see the repo AGENTS.md and -# .github/workflows/ci.yml's `desktop` job. -[workspace] - -[features] -# Plain `cargo build` produces a shippable app rather than a dev-server shell. -default = ["custom-protocol"] - -# `tauri/custom-protocol` is what decides whether the app *is* an app: with it, -# `tauri::generate_context!` embeds the built frontend and the webview loads it -# over the `tauri://` protocol; without it, Tauri is in "dev" mode and points the -# window at `build.devUrl`. The Tauri templates leave it off and have their CLI -# add it for `tauri build` — which silently produces a blank window for anyone -# running plain `cargo run`, which is how this repo builds everything. -# -# So it is ON by default here, and the live-reload loop is the explicit opt-out: -# -# npm --prefix ../web run dev -- --mode desktop -# cargo run --no-default-features # follows Vite -custom-protocol = ["tauri/custom-protocol"] - -[build-dependencies] -# Generates the Tauri context (config + the embedded frontend bundle). -tauri-build = { version = "2", features = [] } - -[dependencies] -obc-usb = { path = "../usb" } -tauri = { version = "2", features = [] } -# Native USB (#909). Pure Rust: there is no C library to vendor, no CMake leg, -# and nothing for a user to install. It talks to each platform's own USB -# stack directly — usbfs on Linux, IOKit on macOS, WinUSB on Windows. -# -# `features = ["tokio"]` is load-bearing, not tuning. nusb wraps every blocking -# syscall in a `MaybeFuture`, and without a runtime feature the `.await` arm of -# that type is a `panic!` — it compiles on all three platforms and dies the first -# time anything is actually awaited. Tauri's runtime is tokio, so this is the -# arm to enable. See `usb::runtime_guard` for what stops it happening again. -nusb = { version = "0.2", features = ["tokio"] } -# `HotplugWatch` is a `futures_core::Stream`; this is the trait, and nothing else -# (futures-core has no dependencies of its own). -futures-core = "0.3" -# Tauri's async runtime is tokio, and these are the pieces the USB plane needs: -# `sync` for the per-endpoint mutexes and the cancel epochs, `macros` for the -# select! that makes a parked transfer cancellable, `fs` to read a map off the -# disk without blocking a runtime worker. -tokio = { version = "1", features = ["sync", "macros", "fs", "io-util"] } -# Used from Rust only (no JS permission needed): "show the file I just built" in -# the platform's own file manager. -tauri-plugin-opener = "2" -# The one place the *user* names a directory: relocating the ride library (E2 -# #912). Called from Rust, like the opener above, so `capabilities/default.json` -# stays at `core:default` and no JS gets a file-picker. That is also the crate's -# standing rule about paths, met rather than bent — the frontend still never -# names a place; here the OS's own chooser does, with the person driving it. -tauri-plugin-dialog = "2" -serde = { version = "1", features = ["derive"] } -serde_json = "1" -# Blocking HTTP for the small map catalog document. The caller runs on a worker -# thread, and rustls-by-default avoids an OpenSSL system dependency. -ureq = "3" -# Parses catalog/object URLs so the native fetch command can enforce same-origin -# access instead of handing the webview a general HTTP proxy. -url = "2" diff --git a/builder/desktop/README.md b/builder/desktop/README.md deleted file mode 100644 index 3e75854ea8..0000000000 --- a/builder/desktop/README.md +++ /dev/null @@ -1,150 +0,0 @@ -# obc-desktop - -The website's cell-catalog map builder in a Tauri v2 window. The Svelte coverage UI, digest -verification, corridor selection and wasm assembly engine are the same in both products. Rust -supplies native HTTPS, durable map-set output, USB and the ride library; it does not link -`obc-pack` and it does not process `.osm.pbf` files. - -## Setup - -| | | -|---|---| -| Rust | stable, via `rustup` | -| Node | 22+, for the embedded frontend | -| Linux only | WebKitGTK for `wry`: `libwebkit2gtk-4.1-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev libgtk-3-dev librsvg2-dev` | - -No GEOS, CMake, libusb or Python dependency. `nusb` talks to each platform's native USB stack. - -USB on macOS and Windows needs no extra setup. On Linux: - -```sh -sudo cp linux/99-openbikecomputer.rules /etc/udev/rules.d/ -sudo udevadm control --reload-rules -sudo udevadm trigger -# unplug and reconnect the device -``` - -## Build and run - -Build the two wasm bridges and the desktop frontend first, then run the standalone Rust crate: - -```sh -cd builder/web -npm ci -npm run build:wasm -npm run build:desktop - -cd ../desktop -cargo run --release -``` - -`custom-protocol` is a default feature, so plain `cargo run` embeds `builder/web/dist/desktop`. -For the Vite live-reload loop: - -```sh -# terminal 1, from builder/desktop -npm --prefix ../web run dev -- --mode desktop - -# terminal 2 -cargo run --no-default-features -``` - -Packaged builds compile their catalog root from `OBC_CATALOG_URL`, which defaults to -`https://maps.openbikecomputer.com/cell-catalog/catalog.json`. A runtime variable of the same name -overrides it to test an unpublished catalog: - -```sh -OBC_CATALOG_URL=https://maps.example.test/catalog.json cargo run --release -``` - -Rust fetches the catalog root, every satellite and every cell. Object URLs must use the configured -root's HTTPS origin; loopback HTTP is allowed for local testing. The webview never gets a general -network proxy. - -## Basemap - -The region picker, ride library and route previews draw the same basemap from -`tiles.openbikecomputer.com`. Each map reads the active release from -`https://maps.openbikecomputer.com/planner/catalog.json` when it opens. The basemap needs WebGL2 -and shows detail only within the published tile coverage. If it cannot load, the map shows a -notice and keeps the selection or route overlays. It sends no tile requests to a third-party map -server. - -The webview loads tiles, fonts and symbols itself. The Content Security Policy in -`tauri.conf.json` names the two hosts. The asset host must list the app origin in its CORS rules: -`tauri://localhost` on macOS and Linux, `http://tauri.localhost` on Windows. - -## Test - -This is a standalone cargo root, like `obc-fw-nrf54l` and `obc-boot`, so it needs its own checks: - -```sh -cargo fmt -- --check -cargo check --release --locked -cargo clippy --release --locked --all-targets -- -D warnings -cargo test --release --locked -- --nocapture -``` - -The shared Svelte checks run from `builder/web`: `npm run check`, `npm test`, `npm run build:all`. - -### Linux release-launch test - -The manual suite `manual.desktop-linux-launch` opens the real window under Xvfb, checks its -`tauri://localhost` origin, searches for Switzerland and adds it to the map, against a loopback -catalog. CI does not run it. On a Linux host with no OBC device attached, build the release app -first, then from the repository root: - -```sh -sudo apt-get install webkit2gtk-driver xvfb imagemagick dbus-daemon -cargo install tauri-driver --version 2.0.6 --locked -xvfb-run -a dbus-run-session -- uv run --locked --group desktop-e2e python builder/desktop/e2e/launch.py -``` - -**Use a WebKit driver with the same version as the installed WebKitGTK runtime.** -`dbus-run-session` gives the app and the desktop portal services a private session bus with the -Xvfb display. - -`OBC_DESKTOP_BINARY` names an existing release executable. Evidence goes to -`target/desktop-launch`, or `OBC_DESKTOP_EVIDENCE`: `result.json`, native catalog request logs, -application and driver logs, rendered HTML and a screenshot, plus `failure.png` when a webview -session is available. - -The suite covers Linux software launch and catalog integration only: no USB permission, no -enumeration with a physical device and no route upload. Windows launch is not automated, and -Tauri's native WebDriver route does not support macOS. - -## Reference - -| | | -|---|---| -| Assembled maps | `~/Documents/OpenBikeComputer//` | -| Pulled rides (GPX) | `~/Documents/OpenBikeComputer/rides/` — relocatable | -| Ride archive | `/ride-archive/` — internal, not relocatable | - -Each completed assembly is a uniquely named folder. Files are written to `.part`, flushed and -atomically renamed before the assembly is reported complete. The website gets the same -worker-produced bytes through browser downloads. The visible ride folder holds GPX files only; -device ride objects and the index live in the internal archive, and `src/rides.rs` documents the -durable import and relocation rules. Catalog cells are held only for the assembly run: there is no -`.pbf`, land-polygon, Geofabrik-index or persistent cell cache. - -| | | -|---|---| -| `src/main.rs` | Tauri commands and the deliberately small webview capability surface | -| `src/catalog.rs`, `src/http.rs` | Configured catalog root and same-origin native object reads | -| `src/map_output.rs` | Opaque output sessions and atomic map-set writes | -| `src/storage.rs`, `src/paths.rs` | Visible app-owned locations | -| `src/rides.rs` | Managed GPX library plus the durable ride archive | -| `src/usb/` | Native USB discovery and byte pipes beneath the shared TypeScript protocol | - -The window has `core:default` and no filesystem, shell or HTTP plugin; Rust commands hold those -policies. `dragDropEnabled: false` in `tauri.conf.json` turns off Tauri's OS-level interception so -the shared HTML5 GPX drop targets get files. - -The device protocol is the shared TypeScript implementation in `builder/web/src/lib/usb/`; Rust -supplies the native pipes only. Large app-owned files stream from the maps folder without entering -the webview. A newly assembled volume set streams to the device with the manifest last. The device -page also accepts a standalone `.obcm` from elsewhere. - -There are no installers, signing or auto-update. There is no native arbitrary-file picker; files -selected in the webview use the ordinary chunked transfer path. diff --git a/builder/desktop/build.rs b/builder/desktop/build.rs deleted file mode 100644 index 261851f6b6..0000000000 --- a/builder/desktop/build.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - tauri_build::build(); -} diff --git a/builder/desktop/capabilities/default.json b/builder/desktop/capabilities/default.json deleted file mode 100644 index 61c5f8d64b..0000000000 --- a/builder/desktop/capabilities/default.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "../gen/schemas/desktop-schema.json", - "identifier": "default", - "description": "The app's own commands need no permission; this grants the core set the webview itself uses (window, event, IPC channels). Nothing here opens a filesystem, shell or HTTP capability to JavaScript — every one of those is a Rust command with the policy written in Rust, which is the reason the backend exists.", - "windows": ["main"], - "permissions": ["core:default"] -} diff --git a/builder/desktop/e2e/launch.py b/builder/desktop/e2e/launch.py deleted file mode 100644 index 81190fe337..0000000000 --- a/builder/desktop/e2e/launch.py +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/env python3 -"""Launch the embedded Linux frontend and select a local catalog region.""" - -from contextlib import suppress -import json -import os -from pathlib import Path -import shlex -import signal -import socket -import subprocess -import sys -from tempfile import TemporaryDirectory -import traceback -from urllib.parse import urlsplit - -from selenium import webdriver -from selenium.webdriver.common.by import By -from selenium.webdriver.remote.client_config import ClientConfig -from selenium.webdriver.support import expected_conditions as EC -from selenium.webdriver.support.ui import WebDriverWait -from selenium.webdriver.webkitgtk.options import Options - -ROOT = Path(__file__).resolve().parents[3] -sys.path.insert(0, str(ROOT / "tools")) - -from fixture_catalog import CatalogServer, schema_examples # noqa: E402 — needs ROOT on the path - - -def main(): - if sys.platform != "linux": - raise SystemExit("The release-launch suite requires Linux and Xvfb.") - binary = Path(os.environ.get("OBC_DESKTOP_BINARY", ROOT / "builder/desktop/target/release/obc-desktop")).resolve() - evidence = Path(os.environ.get("OBC_DESKTOP_EVIDENCE", ROOT / "target/desktop-launch")).resolve() - evidence.mkdir(parents=True, exist_ok=True) - for name in ("result.json", "failure.png", "ready.png", "page.html", "driver.log", "application.log", "catalog.jsonl", "processes.txt"): - (evidence / name).unlink(missing_ok=True) - result = {"passed": False, "binary": str(binary)} - browser = process = server = None - objects = schema_examples() - - with TemporaryDirectory(prefix="obc-desktop-launch-") as scratch, (evidence / "driver.log").open("w") as driver_log: - try: - if not binary.is_file() or not os.access(binary, os.X_OK): - raise RuntimeError(f"Missing executable release app: {binary}") - server = CatalogServer(objects, log=evidence / "catalog.jsonl").start() - catalog_url = f"{server.origin}/catalog.json" - # WebKit launches this wrapper once. exec preserves its PID and captures Rust output. - wrapper = Path(scratch) / "application.sh" - pidfile = Path(scratch) / "application.pid" - wrapper.write_text("#!/bin/sh\n" + f"echo $$ > {shlex.quote(str(pidfile))}\n" + - f"exec > {shlex.quote(str(evidence / 'application.log'))} 2>&1\n" + - 'printf "automation=%s inspector=%s display=%s\\n" "$TAURI_WEBVIEW_AUTOMATION" "$WEBKIT_INSPECTOR_SERVER" "$DISPLAY"\n' + - f'exec {shlex.quote(str(binary))} "$@"\n') - wrapper.chmod(0o755) - environment = {**os.environ, "OBC_CATALOG_URL": catalog_url, "RUST_BACKTRACE": "1", - "XDG_DATA_HOME": scratch, "XDG_CONFIG_HOME": scratch, "XDG_CACHE_HOME": scratch} - process = subprocess.Popen(["tauri-driver"], env=environment, stdout=driver_log, - stderr=subprocess.STDOUT, start_new_session=True) - - def listening(_): - if process.poll() is not None: - raise RuntimeError("tauri-driver exited before readiness") - try: - with socket.create_connection(("127.0.0.1", 4444), timeout=1): - return True - except OSError: - return False - - WebDriverWait(None, 15).until(listening, "tauri-driver did not listen") - options = Options() - options.set_capability("browserName", "wry") - options.set_capability("tauri:options", {"application": str(wrapper)}) - browser = webdriver.Remote(command_executor="http://127.0.0.1:4444", options=options, - client_config=ClientConfig(remote_server_addr="http://127.0.0.1:4444", timeout=30)) - wait = WebDriverWait(browser, 30) - search = wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, '[aria-label="Search regions"]'))) - result["url"] = browser.current_url - origin = urlsplit(result["url"]) - if (origin.scheme, origin.netloc) != ("tauri", "localhost"): - raise AssertionError(f"Expected embedded custom-protocol frontend, got {result['url']}") - search.send_keys("Switzerland") - wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, '[aria-label="Add Switzerland (1.0 KB)"]'))).click() - wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, '[aria-label="Switzerland is already in the map"]'))) - wait.until(EC.text_to_be_present_in_element((By.CSS_SELECTOR, '.ledger .total'), "1.0 KB")) - if browser.find_elements(By.CSS_SELECTOR, '.catalog-error, .ledger .error, .parts .retry'): - raise AssertionError("Catalog or region resolution failed") - missing = set(objects) - set(server.requests) - if missing: - raise AssertionError(f"Native catalog requests missing: {sorted(missing)}") - result["region"] = "Switzerland" - result["price"] = browser.find_element(By.CSS_SELECTOR, '.ledger .total').text - result["capabilities"] = browser.capabilities - browser.save_screenshot(str(evidence / "ready.png")) - (evidence / "page.html").write_text(browser.page_source) - browser.quit() - browser = None - pid = int(pidfile.read_text()) - WebDriverWait(None, 10).until(lambda _: not Path(f"/proc/{pid}").exists(), "Application did not exit after session quit") - result["application_exited"] = True - if "panicked at" in (evidence / "application.log").read_text(): - raise AssertionError("The release app panicked") - result["passed"] = True - except Exception: - result["error"] = traceback.format_exc() - with suppress(Exception): - # A session can fail before WebDriver can capture the still-open app window. - subprocess.run(["import", "-window", "root", str(evidence / "failure.png")], - check=True, timeout=5) - (evidence / "processes.txt").write_text(subprocess.check_output( - ["ps", "-eo", "pid,ppid,stat,comm"], text=True, timeout=5)) - if browser: - with suppress(Exception): - browser.save_screenshot(str(evidence / "failure.png")) - (evidence / "page.html").write_text(browser.page_source) - raise - finally: - if browser: - with suppress(Exception): - browser.quit() - if process: - with suppress(ProcessLookupError): - os.killpg(process.pid, signal.SIGTERM) - try: - process.wait(timeout=5) - except subprocess.TimeoutExpired: - os.killpg(process.pid, signal.SIGKILL) - process.wait() - if server: - server.shutdown() - server.server_close() - result["requests"] = server.requests if server else [] - (evidence / "result.json").write_text(json.dumps(result, indent=2) + "\n") - print(json.dumps(result, indent=2)) - - -if __name__ == "__main__": - main() diff --git a/builder/desktop/icons/128x128.png b/builder/desktop/icons/128x128.png deleted file mode 100644 index 8152165d92..0000000000 Binary files a/builder/desktop/icons/128x128.png and /dev/null differ diff --git a/builder/desktop/icons/128x128@2x.png b/builder/desktop/icons/128x128@2x.png deleted file mode 100644 index 2b13445fbe..0000000000 Binary files a/builder/desktop/icons/128x128@2x.png and /dev/null differ diff --git a/builder/desktop/icons/32x32.png b/builder/desktop/icons/32x32.png deleted file mode 100644 index 2f1c11b745..0000000000 Binary files a/builder/desktop/icons/32x32.png and /dev/null differ diff --git a/builder/desktop/icons/icon.icns b/builder/desktop/icons/icon.icns deleted file mode 100644 index 9537f6d4b7..0000000000 Binary files a/builder/desktop/icons/icon.icns and /dev/null differ diff --git a/builder/desktop/icons/icon.ico b/builder/desktop/icons/icon.ico deleted file mode 100644 index c2dbaabbc2..0000000000 Binary files a/builder/desktop/icons/icon.ico and /dev/null differ diff --git a/builder/desktop/icons/icon.png b/builder/desktop/icons/icon.png deleted file mode 100644 index f3bd39b9dc..0000000000 Binary files a/builder/desktop/icons/icon.png and /dev/null differ diff --git a/builder/desktop/src/catalog.rs b/builder/desktop/src/catalog.rs deleted file mode 100644 index 1f79d9daa9..0000000000 --- a/builder/desktop/src/catalog.rs +++ /dev/null @@ -1,56 +0,0 @@ -//! The published map catalog, fetched for the desktop app. The desktop and hosted builders consume -//! the same document over HTTP and hand it to the same frontend catalog client. -//! -//! Two things a `fetch()` in the webview would not do: the window has no network capability at all, -//! so every request the app makes is Rust code in [`crate::http`], and the catalog admits nothing -//! partial, so the body is read whole and handed over as one string with the URL it came from. -//! -//! `OBC_CATALOG_URL` overrides the compiled default at run time, which is how a maintainer tests a -//! bake tree before publishing. - -use serde::Serialize; - -const DEFAULT_CATALOG_URL: &str = "https://maps.openbikecomputer.com/cell-catalog/catalog.json"; -const COMPILED_CATALOG_URL: Option<&str> = option_env!("OBC_CATALOG_URL"); - -/// The manifest body plus the URL it was read from. Relative references resolve against the -/// manifest's own location, and only this side knows it. -#[derive(Serialize)] -#[serde(rename_all = "camelCase")] -pub struct FetchedCatalog { - pub url: String, - pub body: String, -} - -pub fn url() -> String { - selected_url(std::env::var("OBC_CATALOG_URL").ok()) -} - -fn selected_url(runtime: Option) -> String { - runtime - .filter(|value| !value.trim().is_empty()) - .or_else(|| COMPILED_CATALOG_URL.filter(|value| !value.trim().is_empty()).map(str::to_owned)) - .unwrap_or_else(|| DEFAULT_CATALOG_URL.to_owned()) -} - -pub fn fetch() -> Result { - let url = url(); - let body = crate::http::get_text(&url).map_err(|e| format!("map catalog: {e}"))?; - Ok(FetchedCatalog { url, body }) -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn the_catalog_url_is_absolute_and_overridable() { - // It must be absolute: the frontend resolves catalog references against it. - assert_eq!(selected_url(None), "https://maps.openbikecomputer.com/cell-catalog/catalog.json"); - assert_eq!( - selected_url(Some("https://example.invalid/catalog.json".into())), - "https://example.invalid/catalog.json" - ); - assert_ne!(selected_url(Some(String::new())), "", "an empty override must fall back"); - } -} diff --git a/builder/desktop/src/http.rs b/builder/desktop/src/http.rs deleted file mode 100644 index 37f6b33e1a..0000000000 --- a/builder/desktop/src/http.rs +++ /dev/null @@ -1,74 +0,0 @@ -//! The desktop app's small native network surface. Map selection, verification and assembly are -//! shared with the web builder; Rust moves the catalog bytes, because the Tauri webview has no -//! blanket network permission. - -use std::io::Read; -use std::sync::OnceLock; -use std::time::Duration; - -/// A cell is megabytes and a connection to a CDN edge can wedge half-open, and without a deadline -/// that read never returns. Sized for the largest object over a poor link: the point is to fail a -/// long stall, not to police a slow connection. -/// -/// Retrying is not done here. Every catalog object is digest-pinned, and the frontend's -/// `fetchVerified` owns that policy for both this host and the website. -const CONNECT_TIMEOUT: Duration = Duration::from_secs(15); -const RESPONSE_TIMEOUT: Duration = Duration::from_secs(30); -const BODY_TIMEOUT: Duration = Duration::from_secs(300); - -fn agent() -> &'static ureq::Agent { - static AGENT: OnceLock = OnceLock::new(); - AGENT.get_or_init(|| { - ureq::Agent::config_builder() - .timeout_connect(Some(CONNECT_TIMEOUT)) - .timeout_recv_response(Some(RESPONSE_TIMEOUT)) - .timeout_recv_body(Some(BODY_TIMEOUT)) - .build() - .into() - }) -} - -/// Read a small text document whole. -pub fn get_text(url: &str) -> Result { - let mut response = agent().get(url).call().map_err(|e| format!("GET {url}: {e}"))?; - response.body_mut().read_to_string().map_err(|e| format!("read {url}: {e}")) -} - -/// Read one digest-pinned catalog object. It is not a general HTTP proxy: every URL must share the -/// configured catalog root's origin. -pub fn get_catalog_object(url: &str) -> Result, String> { - same_catalog_origin(url, &crate::catalog::url())?; - let mut response = agent().get(url).call().map_err(|e| format!("GET {url}: {e}"))?; - let mut bytes = Vec::new(); - response.body_mut().as_reader().read_to_end(&mut bytes).map_err(|e| format!("read {url}: {e}"))?; - Ok(bytes) -} - -fn same_catalog_origin(requested: &str, catalog: &str) -> Result<(), String> { - let requested = url::Url::parse(requested).map_err(|e| format!("catalog object URL: {e}"))?; - let catalog = url::Url::parse(catalog).map_err(|e| format!("configured catalog URL: {e}"))?; - let local_http = - requested.scheme() == "http" && matches!(requested.host_str(), Some("localhost" | "127.0.0.1" | "::1")); - if requested.scheme() != "https" && !local_http { - return Err("catalog objects must use https (or loopback http for local testing)".into()); - } - if requested.origin() != catalog.origin() { - return Err(format!("catalog objects must stay on {}", catalog.origin().ascii_serialization())); - } - Ok(()) -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn catalog_reads_are_https_and_same_origin() { - let root = "https://maps.example.test/prefix/catalog.json"; - assert!(same_catalog_origin("https://maps.example.test/prefix/cells/fine/index.json", root).is_ok()); - assert!(same_catalog_origin("https://other.example.test/cell.obcm", root).is_err()); - assert!(same_catalog_origin("http://maps.example.test/cell.obcm", root).is_err()); - assert!(same_catalog_origin("file:///tmp/cell.obcm", root).is_err()); - assert!(same_catalog_origin("http://127.0.0.1:8123/cell.obcm", "http://127.0.0.1:8123/catalog.json").is_ok()); - } -} diff --git a/builder/desktop/src/main.rs b/builder/desktop/src/main.rs deleted file mode 100644 index 06842624b3..0000000000 --- a/builder/desktop/src/main.rs +++ /dev/null @@ -1,224 +0,0 @@ -//! The OpenBikeComputer desktop app: the same published-cell map builder as the website, in a -//! Tauri shell with native storage and device access. -//! -//! It adds three things the webview cannot do itself: [`catalog`] fetches the published map -//! catalog, [`usb`] drives the device because the webview has no WebUSB, and [`rides`] keeps a -//! durable copy of a ride. -//! -//! The window is granted `core:default` and nothing else: no filesystem, no shell, no HTTP. Every -//! one of those policies is written in Rust, where it can be read, and catalog object reads are -//! restricted to the configured catalog origin. - -mod catalog; -mod http; -mod map_output; -mod paths; -mod rides; -mod usb; - -use std::sync::Arc; - -use tauri::Manager; - -/// The published cell catalog, body and base URL. -#[tauri::command] -async fn catalog() -> Result { - tauri::async_runtime::spawn_blocking(catalog::fetch).await.map_err(|e| e.to_string())? -} - -/// One catalog satellite or cell, restricted to the catalog root's origin. -#[tauri::command] -async fn catalog_get(url: String) -> Result { - let bytes = tauri::async_runtime::spawn_blocking(move || http::get_catalog_object(&url)) - .await - .map_err(|e| e.to_string())??; - Ok(tauri::ipc::Response::new(bytes)) -} - -#[tauri::command] -fn map_output_begin( - app: tauri::AppHandle, - outputs: tauri::State<'_, Arc>, - name: String, -) -> Result { - outputs.begin(&maps_dir(&app), &name) -} - -#[tauri::command] -async fn map_output_write( - outputs: tauri::State<'_, Arc>, - request: tauri::ipc::Request<'_>, -) -> Result { - let header = |name: &str| { - request - .headers() - .get(name) - .and_then(|value| value.to_str().ok()) - .ok_or_else(|| format!("a map output write is missing its `{name}` header")) - }; - let id: u64 = header("output-id")?.parse().map_err(|_| "a map output write has an invalid id".to_string())?; - let name = header("filename")?.to_owned(); - let tauri::ipc::InvokeBody::Raw(bytes) = request.body() else { - return Err("a map output write must carry raw bytes".into()); - }; - let bytes = bytes.clone(); - let outputs = outputs.inner().clone(); - tauri::async_runtime::spawn_blocking(move || outputs.write(id, &name, &bytes)).await.map_err(|e| e.to_string())? -} - -#[tauri::command] -async fn map_output_finish(outputs: tauri::State<'_, Arc>, id: u64) -> Result<(), String> { - let outputs = outputs.inner().clone(); - tauri::async_runtime::spawn_blocking(move || outputs.finish(id)).await.map_err(|e| e.to_string())? -} - -#[tauri::command] -async fn map_output_discard(outputs: tauri::State<'_, Arc>, id: u64) -> Result<(), String> { - let outputs = outputs.inner().clone(); - tauri::async_runtime::spawn_blocking(move || outputs.discard(id)).await.map_err(|e| e.to_string())? -} - -/// Where built maps go. Shown in the UI, so the user can act on it. -fn maps_dir(app: &tauri::AppHandle) -> std::path::PathBuf { - paths::maps_dir(app.path().document_dir().ok()) -} - -/// Show a produced file in the platform's file manager. -/// -/// Scoped to the folders this app owns: a webview can call this command, and revealing any path is -/// a wider door than the features need. The ride library is listed separately from the maps folder, -/// because a relocated library is not inside it. -#[tauri::command] -fn reveal_file(app: tauri::AppHandle, path: String) -> Result<(), String> { - let path = std::path::PathBuf::from(path); - let roots = [maps_dir(&app), ride_library(&app).0.root().to_path_buf()]; - if !roots.iter().any(|root| path.starts_with(root)) { - let names: Vec = roots.iter().map(|r| r.display().to_string()).collect(); - return Err(format!("only files under {} can be revealed", names.join(" or "))); - } - tauri_plugin_opener::reveal_item_in_dir(&path).map_err(|e| format!("reveal {}: {e}", path.display())) -} - -/// The library, and whether its visible GPX folder is the default one. -/// -/// Resolved per call rather than held in state: the folder can move while the app is running, and a -/// cached root would then be wrong exactly when a rider is looking at it. The archive lives in app -/// data and never moves. -fn ride_library(app: &tauri::AppHandle) -> (rides::Library, bool) { - let default = paths::rides_dir(app.path().document_dir().ok()); - let archive = paths::ride_archive_dir(app.path().app_data_dir().ok()); - let (root, is_default) = match app.path().app_config_dir().ok().and_then(|dir| rides::configured(&dir)) { - Some(chosen) if chosen != default => (chosen, false), - _ => (default, true), - }; - (rides::Library::new(root, archive), is_default) -} - -/// The library folder and everything in it. -#[tauri::command] -fn rides_index(app: tauri::AppHandle) -> rides::IndexView { - let (library, is_default) = ride_library(&app); - library.view(is_default) -} - -/// Land one pulled ride durably, and only then resolve. -/// -/// It lands the bytes with `fsync` before it resolves, so a ride the frontend believes it has is a -/// ride on this disk. A ride whose write failed rejects here and is absent from the durable index, -/// so a power cut costs at worst a re-download. -/// -/// It runs on the blocking pool, because `fsync` blocks. -#[tauri::command] -async fn rides_import(app: tauri::AppHandle, request: rides::ImportRequest) -> Result { - let (library, _) = ride_library(&app); - tauri::async_runtime::spawn_blocking(move || library.import(&request)).await.map_err(|e| e.to_string())? -} - -/// The stored ride object of one key, which a GPX re-export decodes. -#[tauri::command] -async fn rides_read(app: tauri::AppHandle, key: String) -> Result { - let (library, _) = ride_library(&app); - let bytes = - tauri::async_runtime::spawn_blocking(move || library.read_object(&key)).await.map_err(|e| e.to_string())??; - // The raw path, like `usb_read`: a ride object is hundreds of kilobytes and a JSON number - // array would be four times that in text. - Ok(tauri::ipc::Response::new(bytes)) -} - -/// Write one ride's GPX into the visible folder: the repair for a GPX somebody deleted, and the -/// fallback when the file to show is not there yet. -#[tauri::command] -async fn rides_write_gpx(app: tauri::AppHandle, key: String, gpx: String) -> Result { - let (library, _) = ride_library(&app); - tauri::async_runtime::spawn_blocking(move || library.write_gpx(&key, &gpx)).await.map_err(|e| e.to_string())? -} - -/// Let the rider pick a new home for the library, and move it there. -/// -/// The native chooser is opened from Rust, because the frontend names a file and never a place, and -/// the OS's own directory picker is the one way a person can name a place without the webview being -/// handed a filesystem. It answers `None` when the chooser was dismissed, which is an ordinary -/// outcome. -#[tauri::command] -async fn rides_choose_folder(app: tauri::AppHandle) -> Result, String> { - use tauri_plugin_dialog::DialogExt; - - let (library, _) = ride_library(&app); - let from = library.root().to_path_buf(); - let (tx, rx) = std::sync::mpsc::channel(); - app.dialog().file().set_title("Where should pulled rides be kept?").pick_folder(move |picked| { - let _ = tx.send(picked); - }); - // The chooser answers on the UI thread, so parking a blocking-pool thread on the reply keeps - // the event loop free to run it. - let picked = - tauri::async_runtime::spawn_blocking(move || rx.recv().ok().flatten()).await.map_err(|e| e.to_string())?; - let Some(picked) = picked else { return Ok(None) }; - let to = picked.into_path().map_err(|e| format!("that folder could not be used: {e}"))?; - - let config = app.path().app_config_dir().map_err(|e| format!("no config directory: {e}"))?; - let moved = to.clone(); - tauri::async_runtime::spawn_blocking(move || { - rides::relocate(&from, &moved)?; - rides::remember(&config, &moved) - }) - .await - .map_err(|e| e.to_string())??; - Ok(Some(to.display().to_string())) -} - -fn main() { - tauri::Builder::default() - .plugin(tauri_plugin_opener::init()) - // Registered for its Rust API only, which `rides_choose_folder` calls. No JS permission is - // granted, so the webview cannot open a picker of its own. - .plugin(tauri_plugin_dialog::init()) - .manage(Arc::new(usb::UsbState::default())) - .manage(Arc::new(map_output::Outputs::default())) - .invoke_handler(tauri::generate_handler![ - catalog, - catalog_get, - map_output_begin, - map_output_write, - map_output_finish, - map_output_discard, - reveal_file, - // The library is a folder plus an index, and the ack follows `rides_import`. - rides_index, - rides_import, - rides_read, - rides_write_gpx, - rides_choose_folder, - // Bytes only: the protocol lives once, in TypeScript, over these. - usb::usb_watch, - usb::usb_list, - usb::usb_open, - usb::usb_close, - usb::usb_read, - usb::usb_write, - usb::usb_cancel, - usb::usb_reset, - ]) - .run(tauri::generate_context!()) - .expect("run the OpenBikeComputer app"); -} diff --git a/builder/desktop/src/map_output.rs b/builder/desktop/src/map_output.rs deleted file mode 100644 index 7b9600042f..0000000000 --- a/builder/desktop/src/map_output.rs +++ /dev/null @@ -1,144 +0,0 @@ -//! Native landing place for verified assemblies. -//! -//! The wasm worker produces the same bytes in every host. The website hands each file to the -//! browser downloader; the desktop writes the files into one newly created folder under the maps -//! directory. An opaque id keeps the webview from turning this into a write-anywhere command. - -use std::collections::HashMap; -use std::io::Write; -use std::path::{Path, PathBuf}; -use std::sync::atomic::{AtomicU64, Ordering}; -use std::sync::Mutex; - -use serde::Serialize; - -#[derive(Serialize)] -#[serde(rename_all = "camelCase")] -pub struct Opened { - pub id: u64, - pub path: String, -} - -#[derive(Default)] -pub struct Outputs { - next: AtomicU64, - open: Mutex>, -} - -impl Outputs { - pub fn begin(&self, maps: &Path, name: &str) -> Result { - std::fs::create_dir_all(maps).map_err(|e| format!("{}: {e}", maps.display()))?; - let base = folder_name(name); - let path = (1..10_000) - .find_map(|n| { - let candidate = maps.join(if n == 1 { base.clone() } else { format!("{base}-{n}") }); - match std::fs::create_dir(&candidate) { - Ok(()) => Some(Ok(candidate)), - Err(e) if e.kind() == std::io::ErrorKind::AlreadyExists => None, - Err(e) => Some(Err(format!("{}: {e}", candidate.display()))), - } - }) - .ok_or_else(|| format!("{}: could not allocate an output folder", maps.display()))??; - let id = self.next.fetch_add(1, Ordering::Relaxed).wrapping_add(1); - self.open.lock().map_err(|_| "map output registry is poisoned".to_string())?.insert(id, path.clone()); - Ok(Opened { id, path: path.display().to_string() }) - } - - pub fn write(&self, id: u64, name: &str, bytes: &[u8]) -> Result { - let open = self.open.lock().map_err(|_| "map output registry is poisoned".to_string())?; - let root = open.get(&id).ok_or_else(|| "that map output session is not open".to_string())?; - write_file(root, name, bytes) - } - - pub fn finish(&self, id: u64) -> Result<(), String> { - self.take(id)?; - Ok(()) - } - - pub fn discard(&self, id: u64) -> Result<(), String> { - let mut open = self.open.lock().map_err(|_| "map output registry is poisoned".to_string())?; - let path = open.get(&id).ok_or_else(|| "that map output session is not open".to_string())?; - match std::fs::remove_dir_all(path) { - Ok(()) => {} - Err(e) if e.kind() == std::io::ErrorKind::NotFound => {} - Err(e) => return Err(format!("discard {}: {e}", path.display())), - } - open.remove(&id); - Ok(()) - } - - fn take(&self, id: u64) -> Result { - self.open - .lock() - .map_err(|_| "map output registry is poisoned".to_string())? - .remove(&id) - .ok_or_else(|| "that map output session is not open".into()) - } -} - -fn write_file(root: &Path, name: &str, bytes: &[u8]) -> Result { - validate_filename(name)?; - let final_path = root.join(name); - let part_path = root.join(format!(".{name}.part")); - let result = (|| { - let mut file = std::fs::OpenOptions::new() - .write(true) - .create_new(true) - .open(&part_path) - .map_err(|e| format!("{}: {e}", part_path.display()))?; - file.write_all(bytes).map_err(|e| format!("{}: {e}", part_path.display()))?; - file.sync_all().map_err(|e| format!("{}: {e}", part_path.display()))?; - std::fs::rename(&part_path, &final_path).map_err(|e| format!("{}: {e}", final_path.display())) - })(); - if result.is_err() { - let _ = std::fs::remove_file(&part_path); - } - result?; - Ok(final_path.display().to_string()) -} - -fn folder_name(name: &str) -> String { - let cleaned: String = - name.trim().chars().filter(|c| c.is_alphanumeric() || matches!(c, ' ' | '_' | '-')).take(80).collect(); - if cleaned.is_empty() { - "Map".into() - } else { - cleaned - } -} - -fn validate_filename(name: &str) -> Result<(), String> { - let safe = !name.is_empty() - && name != "." - && name != ".." - && name.chars().all(|c| c.is_ascii_alphanumeric() || matches!(c, '.' | '_' | '-')); - if safe { - Ok(()) - } else { - Err(format!("unsafe map output filename `{name}`")) - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn an_output_is_grouped_and_cannot_escape() { - let maps = std::env::temp_dir().join(format!("obc-map-output-{}", std::process::id())); - let _ = std::fs::remove_dir_all(&maps); - let outputs = Outputs::default(); - let opened = outputs.begin(&maps, "Baden-Württemberg / tour").unwrap(); - let path = outputs.write(opened.id, "MS1.OBS", b"set").unwrap(); - assert!(Path::new(&path).starts_with(&maps)); - assert_eq!(std::fs::read(path).unwrap(), b"set"); - assert!(outputs.write(opened.id, "../escape", b"no").is_err()); - outputs.finish(opened.id).unwrap(); - assert!(outputs.write(opened.id, "MS1.OBS", b"late").is_err()); - let discarded = outputs.begin(&maps, "Discarded").unwrap(); - outputs.write(discarded.id, "MS1.OBS", b"partial").unwrap(); - outputs.discard(discarded.id).unwrap(); - assert!(!Path::new(&discarded.path).exists()); - let _ = std::fs::remove_dir_all(&maps); - } -} diff --git a/builder/desktop/src/paths.rs b/builder/desktop/src/paths.rs deleted file mode 100644 index c3ada6052e..0000000000 --- a/builder/desktop/src/paths.rs +++ /dev/null @@ -1,72 +0,0 @@ -//! Where the app keeps things. -//! -//! Two locations are visible to the user. Assembled maps go somewhere the user can find them: the -//! desktop tier exists because it has a real filesystem, and a build that landed in an opaque -//! app-support directory would be a download manager with extra steps. Pulled rides live beside -//! them in a relocatable GPX folder, with their durable archive in app data. - -use std::path::PathBuf; - -/// The visible output folder for built maps. -pub fn maps_dir(documents: Option) -> PathBuf { - documents.unwrap_or_else(home).join("OpenBikeComputer") -} - -/// The default home of the managed ride library, beside the maps, so one folder answers where this -/// app puts things and `reveal_file`'s rule covers it without widening. -/// -/// It is only the default. A rider whose rides belong on an external drive relocates it, and the -/// choice is remembered in the app's config directory: a folder that named itself could not be -/// found once it moved. -pub fn rides_dir(documents: Option) -> PathBuf { - maps_dir(documents).join("rides") -} - -/// The internal ride archive: the index plus the ride objects the library keeps behind the visible -/// GPX folder. It is app data and not user files, and it does not follow the GPX folder when the -/// rider moves it, because a store that follows another folder around is two ways to lose it. -/// -/// `app_data` is Tauri's per-app data directory. The fallback exists so a platform that cannot name -/// one still gets a deterministic, private location rather than a panic. -pub fn ride_archive_dir(app_data: Option) -> PathBuf { - app_data.unwrap_or_else(|| home().join(".openbikecomputer")).join("ride-archive") -} - -fn home() -> PathBuf { - #[cfg(windows)] - let var = "USERPROFILE"; - #[cfg(not(windows))] - let var = "HOME"; - std::env::var_os(var).map(PathBuf::from).unwrap_or_else(std::env::temp_dir) -} - -/// The same rule for any suffix: strip every path separator, keep only characters that mean nothing -/// to a shell or a filesystem, and force the extension. It is the reason a name typed into the -/// window cannot name a place. `fallback` is the stem used when nothing survives the filter. -pub fn sanitize_basename(name: &str, ext: &str, fallback: &str) -> String { - let base = name.trim().rsplit(['/', '\\']).next().unwrap_or(""); - let mut cleaned: String = - base.chars().filter(|c| c.is_alphanumeric() || matches!(c, '.' | '_' | '-' | ' ')).collect(); - cleaned = cleaned.trim().to_string(); - if cleaned.is_empty() || cleaned == ext { - cleaned = fallback.to_string(); - } - if !cleaned.ends_with(ext) { - cleaned.push_str(ext); - } - cleaned -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn the_same_rule_forces_any_other_suffix() { - assert_eq!(sanitize_basename("bikepacking", ".json", "style"), "bikepacking.json"); - assert_eq!(sanitize_basename("../../.ssh/config", ".json", "style"), "config.json"); - assert_eq!(sanitize_basename("", ".json", "style"), "style.json"); - assert_eq!(sanitize_basename(".json", ".json", "style"), "style.json"); - assert_eq!(sanitize_basename("obcm-style-default.json", ".json", "style"), "obcm-style-default.json"); - } -} diff --git a/builder/desktop/src/rides.rs b/builder/desktop/src/rides.rs deleted file mode 100644 index a80656e5c6..0000000000 --- a/builder/desktop/src/rides.rs +++ /dev/null @@ -1,1144 +0,0 @@ -//! Durable desktop ride library. [`Library::import`] returns only after it has flushed -//! the ride object, GPX, and index in that order. -//! -//! ```text -//! / rider-owned, relocatable GPX files -//! 2026-07-20-schauinsland.gpx -//! -//! /ride-archive/ internal, fixed-location archive -//! index.json -//! 2026-07-20-schauinsland.obcride -//! ``` -//! -//! The lossless `.obcride` copy makes GPX re-export possible. Identity is -//! `(serial, store_id, id)` because object ids can be reused after a card change. - -use std::fs::File; -use std::io::{self, Write}; -use std::path::{Path, PathBuf}; -use std::sync::{Mutex, MutexGuard}; -use std::time::{SystemTime, UNIX_EPOCH}; - -use serde::{Deserialize, Serialize}; - -/// Serializes imports and relocation so temp names and index updates cannot interleave. -static LIBRARY_LOCK: Mutex<()> = Mutex::new(()); - -fn lock() -> MutexGuard<'static, ()> { - // A panic while holding the lock poisons it; the disk state is still governed by the - // rename-last discipline, so the next operation may simply proceed. - LIBRARY_LOCK.lock().unwrap_or_else(|poisoned| poisoned.into_inner()) -} - -/// The index's filename. It is readable JSON on purpose: it is the record a person can open and -/// read. -pub const INDEX_FILE: &str = "index.json"; -/// Bumped only when an older index can no longer be read. An unreadable index is not fatal: it -/// re-imports and never deletes. -const INDEX_VERSION: u32 = 2; -/// The stored ride object's extension, chosen so it cannot be mistaken for a GPX. -const RIDE_EXT: &str = "obcride"; -const GPX_EXT: &str = "gpx"; - -/// Largest ride object this command accepts. It is a ceiling and not an expectation: it is roughly -/// ten days of continuous recording, and it exists because a Tauri command is a door. -const MAX_RIDE_BYTES: usize = 16 * 1024 * 1024; -/// The GPX is the same track as text, five to six times the object, so its ceiling keeps the same -/// margin. -const MAX_GPX_BYTES: usize = 128 * 1024 * 1024; -/// Preview tracks are drawn a few hundred pixels wide, so more points than this would be index -/// weight nobody can see. The frontend downsamples to it and this is the enforcement. -const MAX_TRACK_POINTS: usize = 512; -/// Longest filename stem the library will mint, before its extension. -const MAX_STEM: usize = 64; - -/// The pointer file that remembers a relocated library. It lives in the app's config directory: a -/// folder that named itself could not be found once it moved. -const LOCATION_FILE: &str = "ride-library.json"; - -/// One ride in the library, as `index.json` stores it. -/// -/// It holds only facts that stay true: no absolute paths, because the GPX folder can move, and no -/// existence, because a person can delete a GPX in the file manager. Those are [`RideEntry`]'s, -/// recomputed on every read. -#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] -#[serde(rename_all = "camelCase")] -pub struct LibraryRide { - /// `serial:storeId:objectId`, minted here and never taken from the caller. - pub key: String, - pub serial: String, - #[serde(deserialize_with = "deserialize_store_id")] - pub store_id: String, - #[serde(serialize_with = "serialize_object_id", deserialize_with = "deserialize_object_id")] - pub object_id: u64, - pub name: String, - /// Ride start, unix seconds UTC. `0` on a device that never had a trusted clock. - pub start_time: u32, - pub distance_m: u32, - pub moving_time_s: u32, - pub climb_m: u32, - pub points: u32, - /// Length of the stored ride object, bytes. - pub bytes: u64, - /// The device's whole-object CRC-32, kept so the stored copy can be re-checked without the - /// device. - pub crc32: u32, - /// When this app first landed the ride, unix seconds. Never re-stamped, so a second pull is a - /// no-op, which matches the first-ack-wins rule on the device. - pub imported_at: u64, - /// Basename of the archived ride object, in the archive directory. - pub ride_file: String, - /// Basename of the GPX, in the visible folder. - pub gpx_file: String, - /// A downsampled `[lat, lon]` track for the list's preview, in degrees, drawn from the ride's - /// own points. - pub track: Vec<[f64; 2]>, -} - -/// One ride as the UI reads it: the stored record plus what only the filesystem can say. -/// -/// The two extra pairs are recomputed on every read and never written down. `present` means the -/// archive file exists: a ride whose object is gone is not a durable copy, so it is not acked and -/// it is pulled again. A missing GPX is only a re-export away, because the archive is its source. -#[derive(Serialize, Clone, Debug)] -#[serde(rename_all = "camelCase")] -pub struct RideEntry { - #[serde(flatten)] - pub ride: LibraryRide, - pub ride_path: String, - pub gpx_path: String, - pub present: bool, - pub gpx_present: bool, -} - -/// So an entry reads as the ride it describes. The wrapper adds facts about the filesystem; it is -/// not a different kind of thing. -impl std::ops::Deref for RideEntry { - type Target = LibraryRide; - - fn deref(&self) -> &LibraryRide { - &self.ride - } -} - -/// The index file's whole body. -#[derive(Serialize, Deserialize, Clone, Debug, Default)] -struct Index { - version: u32, - rides: Vec, -} - -/// What the UI is handed: where the visible folder is, and what is in the library. -#[derive(Serialize, Clone, Debug)] -#[serde(rename_all = "camelCase")] -pub struct IndexView { - pub folder: String, - /// True when the folder is the app's default rather than one the user picked. - pub is_default: bool, - pub rides: Vec, -} - -/// One ride, as the pull hands it over. The bytes and the GPX both cross the IPC boundary here. -/// -/// A ride is orders of magnitude smaller than the maps and firmware images that need the raw-body -/// path in [`crate::usb`], and the GPX beside it is text, so a structured command with a stated -/// ceiling is the cheaper thing to review. -#[derive(Deserialize, Clone, Debug)] -#[serde(rename_all = "camelCase")] -pub struct ImportRequest { - pub serial: String, - #[serde(deserialize_with = "deserialize_store_id")] - pub store_id: String, - #[serde(deserialize_with = "deserialize_object_id")] - pub object_id: u64, - pub name: String, - pub start_time: u32, - pub distance_m: u32, - pub moving_time_s: u32, - pub climb_m: u32, - /// Points in the recorded track, from the caller's decode of the object. This crate has no - /// ride-object decoder and must not grow one: the codecs live once, in `lib/usb/objects.ts`. - pub points: u32, - pub crc32: u32, - pub track: Vec<[f64; 2]>, - /// The ride object exactly as it came off the wire. - pub object: Vec, - /// The GPX 1.1 document, from the same `obc_route::track_to_gpx` the device runs. There is no - /// GPX writer in this crate and there must never be one. - pub gpx: String, -} - -/// [`Library::import`]'s answer. `imported` is false when the ride was already in the library, -/// which is the idempotent case and must not re-stamp anything. -#[derive(Serialize, Clone, Debug)] -#[serde(rename_all = "camelCase")] -pub struct Imported { - pub ride: RideEntry, - pub imported: bool, -} - -/// Where a durable write is interrupted. -/// -/// Production constructs a [`Library`] with [`CrashPoint::None`], and nothing outside this module -/// can ask for anything else. The other variants exist so the rule that the ack follows the fsync -/// is checked by running the real code with the power cut at a chosen instant. -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] -pub enum CrashPoint { - #[default] - None, - /// The bytes reached `write()` and the process died before `fsync`: the case that decides - /// whether this feature can lose a ride. - BeforeObjectFsync, - /// The ride's two files are durable and the process died before the index committed. - BeforeIndexCommit, -} - -/// The message a simulated crash returns, so a test can tell it from a real IO error. -const CRASH_MSG: &str = "simulated power loss"; - -pub struct Library { - /// The visible, relocatable GPX folder. - root: PathBuf, - /// The internal archive: `index.json` plus the ride objects. It is app data, so it does not - /// move when the rider moves the GPX folder. - archive: PathBuf, - crash: CrashPoint, -} - -impl Library { - pub fn new(root: PathBuf, archive: PathBuf) -> Self { - Library { root, archive, crash: CrashPoint::None } - } - - /// A library that dies at `crash`. Test-only by construction, not by convention. - #[cfg(test)] - fn crashing_at(root: PathBuf, archive: PathBuf, crash: CrashPoint) -> Self { - Library { root, archive, crash } - } - - pub fn root(&self) -> &Path { - &self.root - } - - /// The index as it is on disk right now, with existence recomputed per ride. - /// - /// A missing index is an empty library, and so is a corrupt one. That is the safe direction: - /// the worst it costs is re-downloading rides the device still holds, while salvaging a - /// half-parsed index risks writing over the files it half-understood. - fn load(&self) -> Index { - read_index(&self.archive.join(INDEX_FILE)) - .unwrap_or_else(|| Index { version: INDEX_VERSION, rides: Vec::new() }) - } - - /// A stored record, joined to the filesystem as it is right now. - fn entry(&self, ride: LibraryRide) -> RideEntry { - let ride_path = self.archive.join(&ride.ride_file); - let gpx_path = self.root.join(&ride.gpx_file); - // Existence alone is not durability. `present` feeds the ack, so a truncated or swapped - // archive file must read as absent: the ride is then pulled again, which costs a download - // instead of a ride. The index's own `bytes` is the cheap whole-file check; hashing every - // archive on every read would make listing a library cost its size. - let present = std::fs::metadata(&ride_path).is_ok_and(|m| m.is_file() && m.len() == ride.bytes); - RideEntry { - present, - gpx_present: gpx_path.is_file(), - ride_path: ride_path.display().to_string(), - gpx_path: gpx_path.display().to_string(), - ride, - } - } - - fn entries(&self) -> Vec { - self.load().rides.into_iter().map(|ride| self.entry(ride)).collect() - } - - pub fn view(&self, is_default: bool) -> IndexView { - let _guard = lock(); - IndexView { folder: self.root.display().to_string(), is_default, rides: self.entries() } - } - - /// Land one pulled ride durably. Idempotent on its `(serial, store_id, id)` key. - /// - /// It returns only after the ride object, the GPX and the index have each been fsynced. The - /// caller may ack after this resolves and at no earlier point. - pub fn import(&self, req: &ImportRequest) -> Result { - let _guard = lock(); - if req.serial.is_empty() { - return Err("this device reports no serial number, so a ride from it cannot be keyed".into()); - } - validate_store_id(&req.store_id)?; - if req.object_id == 0 { - return Err("objectId zero names no object".into()); - } - if req.object.is_empty() { - return Err("that ride object is empty".into()); - } - if req.object.len() > MAX_RIDE_BYTES { - return Err(format!("that ride object is {} bytes; the limit is {MAX_RIDE_BYTES}", req.object.len())); - } - if req.gpx.is_empty() { - return Err("that ride converted to an empty GPX".into()); - } - if req.gpx.len() > MAX_GPX_BYTES { - return Err(format!("that GPX is {} bytes; the limit is {MAX_GPX_BYTES}", req.gpx.len())); - } - if req.track.len() > MAX_TRACK_POINTS { - return Err(format!("a preview track carries at most {MAX_TRACK_POINTS} points")); - } - - std::fs::create_dir_all(&self.root).map_err(|e| format!("create {}: {e}", self.root.display()))?; - std::fs::create_dir_all(&self.archive).map_err(|e| format!("create {}: {e}", self.archive.display()))?; - let mut index = self.load(); - let key = ride_key(&req.serial, &req.store_id, req.object_id); - - // The idempotent path: everything is already here, so nothing is written or re-stamped. - if let Some(existing) = index.rides.iter().find(|r| r.key == key) { - let entry = self.entry(existing.clone()); - if entry.present && entry.gpx_present { - return Ok(Imported { ride: entry, imported: false }); - } - } - - let existing = index.rides.iter().position(|r| r.key == key); - let (ride_file, gpx_file, imported_at) = match existing { - // A repair: the record survived and a file did not. Keep the names and the original - // `imported_at`, because this is the same ride arriving again. - Some(at) => { - let r = &index.rides[at]; - (r.ride_file.clone(), r.gpx_file.clone(), r.imported_at) - } - None => { - let stem = unique_stem(&index, &self.root, &self.archive, &key, &stem_for(req))?; - (format!("{stem}.{RIDE_EXT}"), format!("{stem}.{GPX_EXT}"), now_secs()) - } - }; - - // Order is the contract: the lossless object, then the portable GPX, then the index that - // claims both. A crash at any point leaves an index that does not name this ride. - durable_write(&self.archive, &ride_file, &req.object, self.crash_at(CrashPoint::BeforeObjectFsync)) - .map_err(|e| format!("write {}: {e}", self.archive.join(&ride_file).display()))?; - durable_write(&self.root, &gpx_file, req.gpx.as_bytes(), CrashPoint::None) - .map_err(|e| format!("write {}: {e}", self.root.join(&gpx_file).display()))?; - - let ride = LibraryRide { - key: key.clone(), - serial: req.serial.clone(), - store_id: req.store_id.clone(), - object_id: req.object_id, - name: req.name.clone(), - start_time: req.start_time, - distance_m: req.distance_m, - moving_time_s: req.moving_time_s, - climb_m: req.climb_m, - points: req.points, - bytes: req.object.len() as u64, - crc32: req.crc32, - imported_at, - ride_file, - gpx_file, - track: req.track.clone(), - }; - - match existing { - Some(at) => index.rides[at] = ride.clone(), - None => index.rides.push(ride.clone()), - } - if self.crash == CrashPoint::BeforeIndexCommit { - return Err(format!("{CRASH_MSG} before the index committed")); - } - self.commit(&index)?; - Ok(Imported { ride: self.entry(ride), imported: existing.is_none() }) - } - - /// The stored ride object of one key, which is what a re-export reads. - pub fn read_object(&self, key: &str) -> Result, String> { - let _guard = lock(); - let ride = self.find(key)?; - std::fs::read(self.archive.join(&ride.ride_file)) - .map_err(|e| format!("read {}: {e}", self.archive.join(&ride.ride_file).display())) - } - - /// Write one ride's GPX durably into the visible folder: the repair for a GPX somebody deleted - /// or renamed. The archived object is the source, so it can always be run again. - pub fn write_gpx(&self, key: &str, gpx: &str) -> Result { - let _guard = lock(); - if gpx.is_empty() || gpx.len() > MAX_GPX_BYTES { - return Err(format!("a GPX of {} bytes is outside 1..={MAX_GPX_BYTES}", gpx.len())); - } - let ride = self.find(key)?; - std::fs::create_dir_all(&self.root).map_err(|e| format!("create {}: {e}", self.root.display()))?; - durable_write(&self.root, &ride.gpx_file, gpx.as_bytes(), CrashPoint::None) - .map_err(|e| format!("write {}: {e}", self.root.join(&ride.gpx_file).display()))?; - Ok(self.root.join(&ride.gpx_file).display().to_string()) - } - - fn find(&self, key: &str) -> Result { - self.load().rides.into_iter().find(|r| r.key == key).ok_or_else(|| format!("no ride {key} in this library")) - } - - /// Rewrite the index durably, through its own temp and rename, so a crash mid-write leaves the - /// previous index whole and loses only the last ride's record. - fn commit(&self, index: &Index) -> Result<(), String> { - let body = serde_json::to_vec_pretty(index).map_err(|e| format!("encode {INDEX_FILE}: {e}"))?; - durable_write(&self.archive, INDEX_FILE, &body, CrashPoint::None) - .map_err(|e| format!("write {}: {e}", self.archive.join(INDEX_FILE).display())) - } - - fn crash_at(&self, point: CrashPoint) -> CrashPoint { - if self.crash == point { - point - } else { - CrashPoint::None - } - } -} - -/// Read and parse an index file. `None` means missing or unreadable, and the caller decides what -/// that means. -fn read_index(path: &Path) -> Option { - let bytes = std::fs::read(path).ok()?; - match serde_json::from_slice::(&bytes) { - Ok(index) if index.version == INDEX_VERSION => Some(index), - Ok(_) => None, - Err(e) => { - eprintln!("ride library: {} is unreadable ({e}); treating it as empty", path.display()); - None - } - } -} - -/// Move one file into `dir/name` so that no point of interruption loses it: `rename` on the same -/// volume, otherwise copy, fsync, atomic rename into place, and only then unlink the source. The -/// copy path makes a cross-filesystem move as safe as a same-volume one. -fn move_file_durably(source: &Path, dir: &Path, name: &str) -> Result<(), String> { - if std::fs::rename(source, dir.join(name)).is_ok() { - return sync_dir(dir).map_err(|e| format!("sync {}: {e}", dir.display())); - } - let bytes = std::fs::read(source).map_err(|e| format!("read {}: {e}", source.display()))?; - durable_write(dir, name, &bytes, CrashPoint::None) - .map_err(|e| format!("write {}: {e}", dir.join(name).display()))?; - std::fs::remove_file(source).map_err(|e| format!("remove {}: {e}", source.display())) -} - -/// Shared with `lib/device/rides.ts`: full StoreId hex and decimal u64 ObjectId. -pub fn ride_key(serial: &str, store_id: &str, object_id: u64) -> String { - format!("{serial}:{store_id}:{object_id}") -} - -fn validate_store_id(value: &str) -> Result<(), String> { - if value.len() == 32 && value.bytes().all(|b| b.is_ascii_digit() || (b'a'..=b'f').contains(&b)) { - Ok(()) - } else { - Err("storeId must contain exactly 32 lowercase hexadecimal digits".into()) - } -} - -fn deserialize_store_id<'de, D: serde::Deserializer<'de>>(deserializer: D) -> Result { - let value = String::deserialize(deserializer)?; - validate_store_id(&value).map_err(serde::de::Error::custom)?; - Ok(value) -} - -fn serialize_object_id(value: &u64, serializer: S) -> Result { - serializer.collect_str(value) -} - -fn deserialize_object_id<'de, D: serde::Deserializer<'de>>(deserializer: D) -> Result { - let text = String::deserialize(deserializer)?; - let value = text.parse::().map_err(serde::de::Error::custom)?; - if value == 0 || text != value.to_string() { - return Err(serde::de::Error::custom("objectId must be a canonical nonzero decimal u64 string")); - } - Ok(value) -} - -/// Write `bytes` to `dir/name` so that a power cut cannot leave a half-file behind. -/// -/// Four steps, none of them optional. The write goes into a `.part` sibling, so the destination -/// keeps its previous contents for the whole write. `sync_all` puts the bytes and the inode on the -/// disk; on macOS Rust's std implements it as `F_FULLFSYNC`, which also flushes the drive's own -/// write cache, where plain `fsync` does not. The `rename` is atomic on every filesystem this app -/// runs on, so a reader sees the old file or the new one. The directory fsync makes that rename -/// durable; skipping it is the classic failure where the data survives and the name does not. -/// -/// A real IO failure cleans its `.part` up. A [`CrashPoint`] does not, because the point of -/// simulating a power cut is to leave the mess a power cut leaves. -fn durable_write(dir: &Path, name: &str, bytes: &[u8], crash: CrashPoint) -> io::Result<()> { - let tmp = dir.join(format!(".{name}.part")); - let result = write_and_sync(&tmp, bytes, crash); - if result.is_err() { - if crash == CrashPoint::None { - let _ = std::fs::remove_file(&tmp); - } - return result; - } - std::fs::rename(&tmp, dir.join(name))?; - sync_dir(dir) -} - -fn write_and_sync(tmp: &Path, bytes: &[u8], crash: CrashPoint) -> io::Result<()> { - let mut file = File::create(tmp)?; - file.write_all(bytes)?; - if crash != CrashPoint::None { - // The process dies here. The bytes are in the page cache, the rename never happened, and - // nothing above this line told anyone the ride was safe. - return Err(io::Error::new(io::ErrorKind::Interrupted, format!("{CRASH_MSG} before fsync"))); - } - file.sync_all() -} - -/// fsync the directory entry, so the rename itself survives a power cut. -/// -/// Unix opens the directory read-only and fsyncs the handle. Windows has no equivalent and does not -/// need one: `File::open` on a directory fails without `FILE_FLAG_BACKUP_SEMANTICS`, and NTFS -/// records a rename in its metadata log, which is committed before `MoveFileEx` returns, so the -/// file's own flush is the whole requirement there. -#[cfg(unix)] -fn sync_dir(dir: &Path) -> io::Result<()> { - File::open(dir)?.sync_all() -} - -#[cfg(not(unix))] -fn sync_dir(_dir: &Path) -> io::Result<()> { - Ok(()) -} - -/// `YYYY-MM-DD-some-ride-name`, or just the name when the device had no clock. -/// -/// The date leads because a folder sorts by name and rides are read in order. It is UTC, matching -/// the ride object's `start_time`: rendering it locally would file a late-evening ride under the -/// wrong day for anyone west of Greenwich. -fn stem_for(req: &ImportRequest) -> String { - let name = crate::paths::sanitize_basename(&req.name, "", "ride"); - let mut stem = match utc_date(req.start_time) { - Some(date) => format!("{date}-{name}"), - None => name, - }; - if stem.len() > MAX_STEM { - // On a char boundary: a stem is a filename, and half a UTF-8 sequence is not one. - let cut = (0..=MAX_STEM).rev().find(|&n| stem.is_char_boundary(n)).unwrap_or(0); - stem.truncate(cut); - } - stem.trim().trim_end_matches(['.', '-']).to_string() -} - -/// A stem unclaimed by the index or either folder, including files from an unreadable index. -fn unique_stem(index: &Index, root: &Path, archive: &Path, key: &str, base: &str) -> Result { - let taken = |candidate: &str| { - let ride_file = format!("{candidate}.{RIDE_EXT}"); - let gpx_file = format!("{candidate}.{GPX_EXT}"); - index.rides.iter().any(|r| r.ride_file == ride_file || r.gpx_file == gpx_file) - || archive.join(ride_file).exists() - || root.join(gpx_file).exists() - }; - let base = if base.is_empty() { "ride" } else { base }; - if !taken(base) { - return Ok(base.to_string()); - } - let with_id = format!("{base}-{}", key.rsplit(':').next().unwrap_or("0")); - if !taken(&with_id) { - return Ok(with_id); - } - (2..10_000) - .map(|n| format!("{with_id}-{n}")) - .find(|candidate| !taken(candidate)) - .ok_or_else(|| "no unused ride filename is available".into()) -} - -/// `YYYY-MM-DD` in UTC, or `None` for a device whose clock was never set. -/// -/// Civil-from-days arithmetic, because a date is fifteen lines and a date library is a dependency. -/// Valid for every timestamp a `u32` can hold. -fn utc_date(start_time: u32) -> Option { - if start_time == 0 { - return None; - } - let days = (start_time / 86_400) as i64; - let z = days + 719_468; - let era = z.div_euclid(146_097); - let doe = z.rem_euclid(146_097); - let yoe = (doe - doe / 1460 + doe / 36_524 - doe / 146_096) / 365; - let y = yoe + era * 400; - let doy = doe - (365 * yoe + yoe / 4 - yoe / 100); - let mp = (5 * doy + 2) / 153; - let d = doy - (153 * mp + 2) / 5 + 1; - let m = if mp < 10 { mp + 3 } else { mp - 9 }; - let y = if m <= 2 { y + 1 } else { y }; - Some(format!("{y:04}-{m:02}-{d:02}")) -} - -fn now_secs() -> u64 { - SystemTime::now().duration_since(UNIX_EPOCH).map(|d| d.as_secs()).unwrap_or(0) -} - -#[derive(Serialize, Deserialize)] -struct Location { - dir: String, -} - -/// The folder the user relocated the library to, if they did. -/// -/// A folder that no longer exists is not replaced by the default: the app would then start a second -/// library on an unplugged external drive and report nothing missing. The caller surfaces it. -pub fn configured(config_dir: &Path) -> Option { - let bytes = std::fs::read(config_dir.join(LOCATION_FILE)).ok()?; - let location: Location = serde_json::from_slice(&bytes).ok()?; - let dir = PathBuf::from(location.dir); - (!dir.as_os_str().is_empty()).then_some(dir) -} - -/// Remember a relocated library. Durable, because forgetting where the rides went is its own kind -/// of data loss. -pub fn remember(config_dir: &Path, dir: &Path) -> Result<(), String> { - std::fs::create_dir_all(config_dir).map_err(|e| format!("create {}: {e}", config_dir.display()))?; - let body = serde_json::to_vec_pretty(&Location { dir: dir.display().to_string() }) - .map_err(|e| format!("encode {LOCATION_FILE}: {e}"))?; - durable_write(config_dir, LOCATION_FILE, &body, CrashPoint::None) - .map_err(|e| format!("write {}: {e}", config_dir.join(LOCATION_FILE).display())) -} - -/// Move the visible library, the GPX files, to a new folder. -/// -/// The internal archive stays in app data. Existing destination files are never replaced. -/// Cross-filesystem moves copy and flush before unlinking the source, and the caller updates the -/// configured location only after success. -pub fn relocate(from: &Path, to: &Path) -> Result<(), String> { - let _guard = lock(); - if from == to { - return Ok(()); - } - if to.starts_with(from) || from.starts_with(to) { - return Err("pick a folder that is not inside the current one".into()); - } - std::fs::create_dir_all(to).map_err(|e| format!("create {}: {e}", to.display()))?; - if !from.exists() { - return Ok(()); - } - - let entries = std::fs::read_dir(from).map_err(|e| format!("read {}: {e}", from.display()))?; - let mut names: Vec = entries - .flatten() - .filter(|entry| entry.path().is_file()) - .filter_map(|entry| entry.file_name().to_str().map(str::to_owned)) - .filter(|name| !name.starts_with('.') && Path::new(name).extension().is_some_and(|e| e == GPX_EXT)) - .collect(); - names.sort(); - - // Two passes: the first discovers a collision before anything has moved, and the second - // re-checks per file, because `rename` clobbers and std has no portable no-clobber rename. The - // re-check narrows the race to the one rename; a file another program drops into that window - // can still be lost. The library lock rules out this process racing itself. - for name in &names { - if to.join(name).exists() { - return Err(format!("{} already contains a file named {name} — pick another folder", to.display())); - } - } - for name in &names { - if to.join(name).exists() { - return Err(format!("{} now contains a file named {name} — nothing further was moved", to.display())); - } - move_file_durably(&from.join(name), to, name)?; - } - sync_dir(to).map_err(|e| format!("sync {}: {e}", to.display()))?; - let _ = sync_dir(from); - // Best effort: an empty folder left behind is untidy and a failed move is not. A folder that - // still holds the rider's other files stays. - let _ = std::fs::remove_dir(from); - Ok(()) -} - -#[cfg(test)] -mod tests { - /// The ack set, as a test helper: which rides are durably on this disk. It is a filter over - /// `view()`'s entries, and the tests below are about that property. - fn durable_ids(lib: &Library, serial: &str, store_id: u128) -> Vec { - let mut ids: Vec = lib - .view(false) - .rides - .into_iter() - .filter(|e| e.present && e.ride.serial == serial && e.ride.store_id == format!("{store_id:032x}")) - .map(|e| e.ride.object_id) - .collect(); - ids.sort_unstable(); - ids.dedup(); - ids - } - - use super::*; - - fn temp(tag: &str) -> PathBuf { - let dir = std::env::temp_dir().join(format!( - "obc-rides-{tag}-{}-{:?}", - std::process::id(), - std::time::SystemTime::now().duration_since(UNIX_EPOCH).unwrap().subsec_nanos() - )); - std::fs::create_dir_all(&dir).expect("temp dir"); - dir - } - - /// A library over a visible folder and an internal archive: the production shape, in a - /// sandbox. - fn library(base: &Path) -> Library { - Library::new(base.join("rides"), base.join("archive")) - } - - fn request(serial: &str, store_id: u128, id: u64, name: &str) -> ImportRequest { - ImportRequest { - serial: serial.into(), - store_id: format!("{store_id:032x}"), - object_id: id, - name: name.into(), - start_time: 1_764_547_200, // 2025-12-01 - distance_m: 42_195, - moving_time_s: 7_200, - climb_m: 640, - points: 4_211, - crc32: 0xdead_beef, - track: vec![[48.0, 7.85], [48.01, 7.86]], - object: format!("ride-object-{name}-{id}").into_bytes(), - gpx: format!("{name}"), - } - } - - fn file_names(dir: &Path) -> Vec { - let mut names: Vec = std::fs::read_dir(dir) - .map(|entries| entries.flatten().filter_map(|e| e.file_name().to_str().map(str::to_owned)).collect()) - .unwrap_or_default(); - names.sort(); - names - } - - #[test] - fn a_second_import_of_the_same_ride_writes_nothing_and_re_stamps_nothing() { - let base = temp("idem"); - let lib = library(&base); - let req = request("OBC-24-000317", 0xa1b2c3d4, 7, "Dawn Patrol"); - - let first = lib.import(&req).expect("first import"); - assert!(first.imported, "the first pull lands the ride"); - let stamp = first.ride.imported_at; - let archive = base.join("archive"); - let ride_mtime = std::fs::metadata(archive.join(&first.ride.ride_file)).unwrap().modified().unwrap(); - - let second = lib.import(&req).expect("second import"); - assert!(!second.imported, "the second pull is a no-op, not a duplicate"); - assert_eq!(second.ride.imported_at, stamp, "imported_at is first-import-wins, like synced_at"); - assert_eq!(second.ride.key, first.ride.key); - assert_eq!( - std::fs::metadata(archive.join(&first.ride.ride_file)).unwrap().modified().unwrap(), - ride_mtime, - "the ride file was not rewritten" - ); - assert_eq!(lib.load().rides.len(), 1, "one record, not two"); - assert_eq!(durable_ids(&lib, "OBC-24-000317", 0xa1b2c3d4), vec![7]); - - let _ = std::fs::remove_dir_all(&base); - } - - /// The visible folder holds GPX and nothing else; the archive holds the object and the - /// index. - #[test] - fn an_import_leaves_only_gpx_in_the_visible_folder() { - let base = temp("split"); - let lib = library(&base); - let landed = lib.import(&request("S", 1, 1, "Split")).expect("import"); - - assert_eq!(file_names(&base.join("rides")), vec![landed.ride.gpx_file.clone()]); - let mut archived = vec![INDEX_FILE.to_string(), landed.ride.ride_file.clone()]; - archived.sort(); - assert_eq!(file_names(&base.join("archive")), archived); - assert!(landed.ride.ride_path.starts_with(base.join("archive").to_str().unwrap())); - assert!(landed.ride.gpx_path.starts_with(base.join("rides").to_str().unwrap())); - - let _ = std::fs::remove_dir_all(&base); - } - - /// The power goes out between `write()` and `fsync()`. The real `import` runs, and what is - /// checked is what a restart then sees, because that is what the ack list is computed from. The - /// ride must be absent from it, so the device is never told and the next pull fetches it - /// again. - #[test] - fn a_crash_between_write_and_fsync_leaves_the_ride_unacked() { - let base = temp("crash"); - let good = request("OBC-24-000317", 7, 1, "Landed"); - let lost = request("OBC-24-000317", 7, 2, "Interrupted"); - - library(&base).import(&good).expect("the first ride lands"); - - let err = Library::crashing_at(base.join("rides"), base.join("archive"), CrashPoint::BeforeObjectFsync) - .import(&lost) - .expect_err("a crash before fsync must not report success"); - assert!(err.contains(CRASH_MSG), "unexpected failure: {err}"); - - // Restart: a new Library over the same folders, reading the index a relaunched app would - // read. - let restarted = library(&base); - assert_eq!( - durable_ids(&restarted, "OBC-24-000317", 7), - vec![1], - "only the fsynced ride is ackable; the interrupted one is not" - ); - assert!( - !base.join("archive").join(format!("2025-12-01-Interrupted.{RIDE_EXT}")).exists(), - "nothing was committed under the destination name" - ); - assert_eq!(restarted.load().rides.len(), 1, "the index never learned about the lost ride"); - - // The next pull, with the power on, lands it and only then makes it ackable. - library(&base).import(&lost).expect("the retry lands"); - assert_eq!(durable_ids(&library(&base), "OBC-24-000317", 7), vec![1, 2]); - - let _ = std::fs::remove_dir_all(&base); - } - - /// The other half of the ordering: the files are durable and the index never committed. The - /// ride is still not ackable, and the retry repairs the record without minting a second one. - #[test] - fn a_crash_before_the_index_commits_also_leaves_the_ride_unacked() { - let base = temp("crash-index"); - let req = request("OBC-24-000317", 7, 3, "Half landed"); - - Library::crashing_at(base.join("rides"), base.join("archive"), CrashPoint::BeforeIndexCommit) - .import(&req) - .expect_err("crash"); - let restarted = library(&base); - assert!(durable_ids(&restarted, "OBC-24-000317", 7).is_empty(), "an uncommitted index acks nothing"); - assert!(base.join("archive").join(format!("2025-12-01-Half landed.{RIDE_EXT}")).exists(), "the bytes did land"); - - let retry = restarted.import(&req).expect("the retry commits"); - assert!(retry.imported); - assert_eq!(restarted.load().rides.len(), 1, "the retry did not mint a second record"); - - let _ = std::fs::remove_dir_all(&base); - } - - /// Card identities that share their first 32 bits must keep recycled object ids distinct. - #[test] - fn a_card_change_with_a_recycled_id_keeps_both_rides() { - let base = temp("store_id"); - let lib = library(&base); - let serial = "OBC-24-000317"; - - let old = - lib.import(&request(serial, 0xa1b2c3d4_00000000_00000000_00000000, 1, "Old era ride")).expect("old era"); - let new = - lib.import(&request(serial, 0xa1b2c3d4_00000000_00000000_00000001, 1, "New era ride")).expect("new era"); - - assert!(old.imported && new.imported, "the recycled id is a different ride, not a duplicate"); - assert_ne!(old.ride.key, new.ride.key); - assert_ne!(old.ride.ride_file, new.ride.ride_file, "and it gets its own file"); - assert_eq!(lib.load().rides.len(), 2); - - // Each era acks only its own ids. The old era's record is archival: it names a ride the - // device no longer has, and nothing in the new era may claim it. - assert_eq!(durable_ids(&lib, serial, 0xa1b2c3d4_00000000_00000000_00000000), vec![1]); - assert_eq!(durable_ids(&lib, serial, 0xa1b2c3d4_00000000_00000000_00000001), vec![1]); - // A different device with the same id is a third ride again. - assert!(durable_ids(&lib, "OBC-24-000999", 0xa1b2c3d4_00000000_00000000_00000001).is_empty()); - - let _ = std::fs::remove_dir_all(&base); - } - - /// What the device is told matches what is on the disk, including after something deletes an - /// archive file, which `present` must notice. - #[test] - fn durable_ids_follow_the_filesystem_not_the_index() { - let base = temp("present"); - let lib = library(&base); - let serial = "OBC-24-000317"; - for id in [4u64, 5, 6] { - lib.import(&request(serial, 9, id, &format!("Ride {id}"))).expect("import"); - } - assert_eq!(durable_ids(&lib, serial, 9), vec![4, 5, 6]); - - let gone = lib.load().rides.iter().find(|r| r.object_id == 5).expect("ride 5").ride_file.clone(); - std::fs::remove_file(base.join("archive").join(&gone)).expect("delete the archive file"); - - assert_eq!(durable_ids(&lib, serial, 9), vec![4, 6], "a deleted ride is not durable and is not acked"); - let listed = lib.entries(); - assert_eq!(listed.len(), 3, "the record survives so the UI can say the file is missing"); - assert!(!listed.iter().find(|r| r.object_id == 5).unwrap().present); - - let _ = std::fs::remove_dir_all(&base); - } - - #[test] - fn a_missing_gpx_is_repaired_without_re_downloading_the_ride() { - let base = temp("regpx"); - let lib = library(&base); - let landed = lib.import(&request("S", 1, 8, "Export me")).expect("import"); - std::fs::remove_file(base.join("rides").join(&landed.ride.gpx_file)).expect("delete the gpx"); - assert!(!lib.entries()[0].gpx_present); - - let object = lib.read_object(&landed.ride.key).expect("the archive is still there"); - assert_eq!(object, request("S", 1, 8, "Export me").object); - lib.write_gpx(&landed.ride.key, "rebuilt").expect("re-export"); - assert!(lib.entries()[0].gpx_present); - assert_eq!( - std::fs::read_to_string(base.join("rides").join(&landed.ride.gpx_file)).unwrap(), - "rebuilt" - ); - - let _ = std::fs::remove_dir_all(&base); - } - - #[test] - fn a_corrupt_index_reads_as_empty_rather_than_as_nonsense() { - let base = temp("corrupt"); - let lib = library(&base); - lib.import(&request("S", 1, 1, "A ride")).expect("import"); - std::fs::write(base.join("archive").join(INDEX_FILE), b"{ this is not json").expect("corrupt it"); - - assert!(lib.load().rides.is_empty(), "an unreadable index is an empty library"); - assert!(durable_ids(&lib, "S", 1).is_empty(), "and acks nothing — the safe direction"); - // The files are still there, so the next pull re-imports over them. - assert!(lib.import(&request("S", 1, 1, "A ride")).expect("re-import").imported); - - let _ = std::fs::remove_dir_all(&base); - } - - #[test] - fn two_rides_that_want_the_same_filename_get_different_ones() { - let base = temp("stems"); - let lib = library(&base); - let a = lib.import(&request("S", 1, 11, "Commute")).expect("a"); - let b = lib.import(&request("S", 1, 12, "Commute")).expect("b"); - assert_ne!(a.ride.ride_file, b.ride.ride_file); - assert_eq!(a.ride.ride_file, format!("2025-12-01-Commute.{RIDE_EXT}")); - assert_eq!(b.ride.ride_file, format!("2025-12-01-Commute-12.{RIDE_EXT}")); - let _ = std::fs::remove_dir_all(&base); - } - - #[test] - fn a_ride_name_can_never_name_a_place() { - let req = request("S", 1, 1, "../../.ssh/authorized_keys"); - let stem = stem_for(&req); - assert!(!stem.contains('/') && !stem.contains('\\') && !stem.contains(".."), "{stem}"); - assert_eq!(stem, "2025-12-01-authorized_keys"); - assert_eq!(stem_for(&request("S", 1, 1, "")), "2025-12-01-ride"); - } - - #[test] - fn dates_are_utc_and_absent_when_the_device_had_no_clock() { - assert_eq!(utc_date(0), None); - assert_eq!(utc_date(1).as_deref(), Some("1970-01-01")); - assert_eq!(utc_date(1_764_547_200).as_deref(), Some("2025-12-01")); - assert_eq!(utc_date(1_767_225_599).as_deref(), Some("2025-12-31")); - assert_eq!(utc_date(1_767_225_600).as_deref(), Some("2026-01-01")); - // A leap day, and the last instant a u32 can hold. - assert_eq!(utc_date(1_709_164_800).as_deref(), Some("2024-02-29")); - assert_eq!(utc_date(u32::MAX).as_deref(), Some("2106-02-07")); - } - - #[test] - fn the_key_uses_full_store_hex_and_decimal_u64() { - let store = "a1b2c3d4000000000000000000000000"; - for id in [65536, 9007199254740993, u64::MAX] { - assert_eq!(ride_key("OBC-24-000317", store, id), format!("OBC-24-000317:{store}:{id}")); - } - assert_eq!(ride_key("a:b", store, 2), "a:b:a1b2c3d4000000000000000000000000:2"); - } - - fn json_request() -> serde_json::Value { - serde_json::json!({ - "serial": "OBC-24-000317", - "storeId": "a1b2c3d4000000000000000000000000", - "objectId": "65536", - "name": "Same name", - "startTime": 1764547200_u32, - "distanceM": 42195, - "movingTimeS": 7200, - "climbM": 640, - "points": 1, - "crc32": 0, - "track": [], - "object": [1, 2, 3], - "gpx": "" - }) - } - - #[test] - fn json_identity_survives_import_reload_and_duplicate_detection() { - let base = temp("full-identity"); - for store in ["a1b2c3d4000000000000000000000000", "a1b2c3d4000000000000000000000001"] { - for id in ["65536", "9007199254740993", "18446744073709551615"] { - let mut json = json_request(); - json["storeId"] = store.into(); - json["objectId"] = id.into(); - let req: ImportRequest = serde_json::from_value(json).expect("JSON request"); - let landed = library(&base).import(&req).expect("import"); - assert!(landed.imported); - assert_eq!(landed.ride.key, format!("OBC-24-000317:{store}:{id}")); - let reply = serde_json::to_value(&landed).expect("JSON response"); - assert_eq!(reply["ride"]["storeId"], store); - assert_eq!(reply["ride"]["objectId"], id); - assert!(!library(&base).import(&req).expect("reload and repeat").imported); - } - } - let rides = library(&base).view(false).rides; - assert_eq!(rides.len(), 6); - assert!(rides.iter().all(|r| r.present && r.gpx_present)); - let _ = std::fs::remove_dir_all(base); - } - - #[test] - fn malformed_json_identity_is_refused_before_file_creation() { - let base = temp("invalid-identity"); - for field in ["storeId", "objectId"] { - let invalid = if field == "storeId" { - vec![ - serde_json::json!(7), - serde_json::json!(null), - "".into(), - "a1b2c3d4".into(), - "A1B2C3D4000000000000000000000000".into(), - "g1b2c3d4000000000000000000000000".into(), - ] - } else { - vec![ - serde_json::json!(65536), - serde_json::json!(null), - "".into(), - "0".into(), - "-1".into(), - "+1".into(), - "01".into(), - "1.0".into(), - "1e3".into(), - "18446744073709551616".into(), - ] - }; - for value in invalid { - let mut json = json_request(); - json[field] = value; - assert!(serde_json::from_value::(json).is_err(), "invalid {field}"); - } - } - let mut req = request("S", 1, 1, "Bad card"); - req.store_id = "invalid".into(); - assert!(library(&base).import(&req).is_err()); - assert!(file_names(&base).is_empty()); - let _ = std::fs::remove_dir_all(base); - } - - #[test] - fn an_old_index_never_overwrites_archived_objects_or_gpx() { - let base = temp("old-index"); - let req = request("S", 1, 1, "Same name"); - let old = library(&base).import(&req).unwrap(); - let object_path = PathBuf::from(&old.ride.ride_path); - let gpx_path = PathBuf::from(&old.ride.gpx_path); - let mut index: serde_json::Value = - serde_json::from_slice(&std::fs::read(base.join("archive").join(INDEX_FILE)).unwrap()).unwrap(); - index["version"] = 1.into(); - index["rides"][0].as_object_mut().unwrap().remove("storeId"); - index["rides"][0]["epoch"] = 1.into(); - index["rides"][0]["objectId"] = 1.into(); - std::fs::write(base.join("archive").join(INDEX_FILE), serde_json::to_vec(&index).unwrap()).unwrap(); - assert!(library(&base).view(false).rides.is_empty()); - let mut new_req = req.clone(); - new_req.object = b"different ride".to_vec(); - new_req.gpx = "different ride".into(); - let new = library(&base).import(&new_req).unwrap(); - assert!(new.imported); - assert_ne!(new.ride.ride_path, old.ride.ride_path); - assert_ne!(new.ride.gpx_path, old.ride.gpx_path); - assert_eq!(std::fs::read(object_path).unwrap(), req.object); - assert_eq!(std::fs::read_to_string(gpx_path).unwrap(), req.gpx); - let _ = std::fs::remove_dir_all(base); - } - - #[test] - fn oversized_and_empty_imports_are_refused_before_anything_is_written() { - let base = temp("limits"); - let lib = library(&base); - let mut req = request("S", 1, 1, "Huge"); - req.object = vec![0; MAX_RIDE_BYTES + 1]; - assert!(lib.import(&req).is_err()); - let mut req = request("S", 1, 1, "Empty"); - req.object.clear(); - assert!(lib.import(&req).is_err()); - let mut req = request("", 1, 1, "No serial"); - req.serial.clear(); - assert!(lib.import(&req).is_err(), "a device with no serial cannot key a ride"); - assert!(lib.load().rides.is_empty(), "nothing was written"); - let _ = std::fs::remove_dir_all(&base); - } - - /// `present` is not bare existence: a truncated archive file must read as not durable, drop out - /// of the ack list, and be repaired by the next pull. - #[test] - fn a_truncated_archive_is_not_durable_and_is_repaired() { - let base = temp("truncated"); - let lib = library(&base); - let landed = lib.import(&request("S", 1, 4, "Torn")).expect("import"); - assert_eq!(durable_ids(&lib, "S", 1), vec![4]); - - let path = base.join("archive").join(&landed.ride.ride_file); - let whole = std::fs::read(&path).expect("read"); - std::fs::write(&path, &whole[..whole.len() / 2]).expect("truncate"); - - assert!(durable_ids(&lib, "S", 1).is_empty(), "a torn file acks nothing"); - assert!(!lib.entries()[0].present, "…and the UI sees it as missing"); - - let repaired = lib.import(&request("S", 1, 4, "Torn")).expect("the next pull repairs it"); - assert!(!repaired.imported, "the same ride arriving again, not a new one"); - assert_eq!(durable_ids(&lib, "S", 1), vec![4]); - assert_eq!(std::fs::read(&path).expect("whole again"), whole); - - let _ = std::fs::remove_dir_all(&base); - } - - // Relocation. - - #[test] - fn relocating_moves_the_gpx_files_and_only_them() { - let base = temp("move"); - let from = base.join("old"); - let to = base.join("new"); - - let lib = Library::new(from.clone(), base.join("archive")); - let landed = lib.import(&request("S", 1, 1, "Travelling")).expect("import"); - - assert!(relocate(&from, &from.join("inside")).is_err(), "a move into itself is not a move"); - - relocate(&from, &to).expect("relocate"); - let moved = Library::new(to.clone(), base.join("archive")); - assert_eq!(durable_ids(&moved, "S", 1), vec![1], "the archive did not move, so nothing was lost"); - assert!(to.join(&landed.ride.gpx_file).is_file()); - assert!(moved.entries()[0].gpx_present); - assert!(!from.exists(), "the old folder is gone once it is empty"); - - // Moving into a folder the app has never used works, and a second relocate from an already - // moved source is a no-op rather than an error. - relocate(&from, &base.join("third")).expect("nothing to move"); - - let _ = std::fs::remove_dir_all(&base); - } - - #[test] - fn relocating_refuses_to_overwrite_a_same_named_file() { - let base = temp("move-collide"); - let from = base.join("old"); - let to = base.join("new"); - let lib = Library::new(from.clone(), base.join("archive")); - let landed = lib.import(&request("S", 1, 1, "Collides")).expect("import"); - std::fs::create_dir_all(&to).expect("to"); - std::fs::write(to.join(&landed.ride.gpx_file), b"someone else's file").expect("occupy"); - - assert!(relocate(&from, &to).is_err(), "an existing file is never overwritten"); - assert!(from.join(&landed.ride.gpx_file).is_file(), "and the source did not move"); - - let _ = std::fs::remove_dir_all(&base); - } - - #[test] - fn the_configured_location_survives_a_restart() { - let base = temp("location"); - let config = base.join("config"); - assert_eq!(configured(&config), None); - remember(&config, &base.join("rides")).expect("remember"); - assert_eq!(configured(&config), Some(base.join("rides"))); - let _ = std::fs::remove_dir_all(&base); - } -} diff --git a/builder/desktop/src/usb/mod.rs b/builder/desktop/src/usb/mod.rs deleted file mode 100644 index b587f7a166..0000000000 --- a/builder/desktop/src/usb/mod.rs +++ /dev/null @@ -1,252 +0,0 @@ -//! Native USB: `nusb` under the shared byte-pipe seam. -//! -//! Tauri's webview has no WebUSB, so the desktop app drives USB itself. This is the only universal -//! USB path, and it is what a Safari or Firefox user installs the app for. -//! -//! The protocol is not reimplemented here. The object model, the descriptor codecs, the -//! whole-object CRC and the client live once, in TypeScript, over a pluggable `BytePipe`, so a -//! second host drops a transport underneath them instead of growing a parallel implementation that -//! drifts from a byte-exact wire contract. This module moves bytes and nothing else: every `0x` in -//! the non-test code is USB's own vocabulary, a vendor id, a product id, an interface class or an -//! endpoint-address direction bit. -//! -//! The control plane carries the protocol's control records and the stream plane carries its stream -//! records, both over IPC. -//! -//! There is no path that streams a file straight from disk into the endpoint. A record stream is -//! framed, and a raw byte streamer cannot produce one without a second implementation of the wire -//! contract. If a measurement ever says the IPC boundary is the bottleneck, the honest shape is a -//! Rust-side record sender that shares the codec. -//! -//! Both IPC directions carry raw binary and not JSON: a command result is [`tauri::ipc::Response`] -//! and a write arrives as [`tauri::ipc::InvokeBody::Raw`] with its handle and plane in headers. A -//! `Vec` argument would be serialised as a JSON array of numbers, about four bytes of text per -//! byte of payload. -//! -//! The window has no filesystem capability. A file the rider picks arrives through the webview as a -//! `File` with no path at all, exactly as it does on the web. - -pub mod runtime_guard; -pub mod watch; - -use std::collections::HashMap; -use std::sync::atomic::{AtomicU32, Ordering}; -use std::sync::{Arc, Mutex}; - -use tauri::ipc::{Channel, InvokeBody, Request, Response}; -use tauri::State; - -use obc_usb::{Dir, OpenLink, OpenedLink, PipeFault, Plane}; -use watch::{DeviceSummary, UsbEvent}; - -pub use obc_usb::{PRODUCT_ID, VENDOR_ID}; - -/// Every device this app has open, plus the one hot-plug watch behind them. -#[derive(Default)] -pub struct UsbState { - links: Mutex>>, - next_handle: AtomicU32, - /// Where the watch task sends events. Replaceable, so a window that reloaded re-points the - /// existing watch at its new channel instead of starting a second one. - sink: Mutex>>, - watching: Mutex, -} - -impl UsbState { - fn link(&self, handle: u32) -> Result, PipeFault> { - self.links - .lock() - .expect("usb links") - .get(&handle) - .cloned() - .ok_or_else(|| PipeFault::closed("The device link is closed.")) - } - - /// Fail and forget every link on a device that has gone away. - fn disconnected(&self, device_id: &str) { - let mut links = self.links.lock().expect("usb links"); - links.retain(|_, link| { - if link.device_id == device_id { - link.cancel_all(); - false - } else { - true - } - }); - } - - fn drop_all(&self) { - for (_, link) in self.links.lock().expect("usb links").drain() { - link.cancel_all(); - } - } -} - -/// Start or re-point the hot-plug watch and report what is attached now. -/// -/// It answers the matching devices after the watch is live, which is the order that cannot miss a -/// device plugged in during the call. -/// -/// Any link left over from a previous page load is dropped first. A reloaded window has no handles -/// but the backend still holds the interface claim, and a stale claim is what makes the next -/// `usb_open` fail as busy. -#[tauri::command] -pub async fn usb_watch( - state: State<'_, Arc>, - on_event: Channel, -) -> Result, String> { - let state = Arc::clone(&state); - state.drop_all(); - *state.sink.lock().expect("usb sink") = Some(on_event); - - { - let mut watching = state.watching.lock().expect("usb watching"); - if !*watching { - *watching = true; - let for_events = Arc::clone(&state); - let for_disconnect = Arc::clone(&state); - // One long-lived watch serves a window that reloads, because the task resolves the - // sink per event rather than capturing the channel it was born with. - watch::spawn( - Arc::new(move |event: UsbEvent| { - if let Some(channel) = for_events.sink.lock().expect("usb sink").as_ref() { - let _ = channel.send(event); - } - }), - Arc::new(move |device_id: &str| for_disconnect.disconnected(device_id)), - ); - } - } - - watch::list().await -} - -/// The matching devices attached right now, without touching the watch. A native host has no -/// chooser, so asking for a device is looking again. -#[tauri::command] -pub async fn usb_list() -> Result, String> { - watch::list().await -} - -/// Open, configure and claim a device; hand back a handle and the two pipes' packet sizes. -#[tauri::command] -pub async fn usb_open(state: State<'_, Arc>, device_id: String) -> Result { - let devices = - nusb::list_devices().await.map_err(|e| PipeFault::device(format!("USB devices could not be listed: {e}")))?; - let info = devices - .filter(watch::matches) - .find(|info| watch::device_key(info.id()) == device_id) - .ok_or_else(|| PipeFault::closed("That device is no longer attached."))?; - - let (link, mut opened) = obc_usb::open(&info, device_id).await?; - let handle = state.next_handle.fetch_add(1, Ordering::Relaxed) + 1; - opened.handle = handle; - state.links.lock().expect("usb links").insert(handle, link); - Ok(opened) -} - -/// Release a link. Idempotent; everything parked on it settles first. -#[tauri::command] -pub fn usb_close(state: State<'_, Arc>, handle: u32) { - let link = state.links.lock().expect("usb links").remove(&handle); - // The cancel lets a pending read return instead of holding the interface claim until the - // device says something. The claim drops with the last `Arc`, which the cancelled transfers - // hold. - if let Some(link) = link { - link.cancel_all(); - } -} - -/// One transfer's worth of bytes off a plane's IN endpoint. -/// -/// A read is not a message on the bulk plane: it hands back whatever the transport delivered, and -/// the client accumulates to the length its descriptor announced. -#[tauri::command] -pub async fn usb_read(state: State<'_, Arc>, handle: u32, plane: Plane) -> Result { - let link = state.link(handle)?; - let bytes = link.plane(plane).read().await?; - // `Response` is the raw path: the frontend gets an ArrayBuffer, not a JSON array of numbers. - Ok(Response::new(bytes)) -} - -/// Write one transfer to a plane's OUT endpoint. -/// -/// It takes the raw invoke body rather than a `Vec` argument. `handle` and `plane` ride in -/// headers, because a raw body is the whole payload. -#[tauri::command] -pub async fn usb_write(state: State<'_, Arc>, request: Request<'_>) -> Result<(), PipeFault> { - let header = |name: &str| { - request - .headers() - .get(name) - .and_then(|v| v.to_str().ok()) - .ok_or_else(|| PipeFault::device(format!("a usb_write is missing its `{name}` header."))) - }; - let handle: u32 = - header("handle")?.parse().map_err(|_| PipeFault::device("a usb_write carried an unreadable handle."))?; - let plane = match header("plane")? { - "control" => Plane::Control, - "bulk" => Plane::Bulk, - other => return Err(PipeFault::device(format!("a usb_write named an unknown plane `{other}`."))), - }; - let InvokeBody::Raw(bytes) = request.body() else { - return Err(PipeFault::device("a usb_write must carry its bytes as a raw body.")); - }; - let link = state.link(handle)?; - link.plane(plane).write(bytes).await -} - -/// Cancel whatever is parked on one direction of a plane, so the caller's `AbortSignal` reaches the -/// transport rather than only releasing the JavaScript promise. -#[tauri::command] -pub fn usb_cancel(state: State<'_, Arc>, handle: u32, plane: Plane, dir: Option) { - if let Ok(link) = state.link(handle) { - link.plane(plane).cancel(dir); - } -} - -/// Return a plane to a known-empty state. -#[tauri::command] -pub async fn usb_reset(state: State<'_, Arc>, handle: u32, plane: Plane) -> Result<(), PipeFault> { - state.link(handle)?.plane(plane).reset().await -} - -#[cfg(test)] -mod tests { - /// The policy without a Tauri app handle: the same canonicalise-then-prefix rule, over a real - /// temp tree so the symlink case is real. - fn allowed(root: &std::path::Path, candidate: &std::path::Path) -> bool { - let (Ok(root), Ok(candidate)) = (std::fs::canonicalize(root), std::fs::canonicalize(candidate)) else { - return false; - }; - candidate.is_file() && candidate.starts_with(&root) - } - - #[test] - fn only_files_inside_an_app_owned_root_are_sendable() { - let base = std::env::temp_dir().join(format!("obc-usb-policy-{}", std::process::id())); - let root = base.join("maps"); - let outside = base.join("elsewhere"); - std::fs::create_dir_all(&root).expect("root"); - std::fs::create_dir_all(&outside).expect("outside"); - std::fs::write(root.join("ok.obcm"), b"x").expect("write"); - std::fs::write(outside.join("secret"), b"x").expect("write"); - - assert!(allowed(&root, &root.join("ok.obcm"))); - assert!(!allowed(&root, &outside.join("secret"))); - // The traversal a prefix check alone would admit, and canonicalising does not. - assert!(!allowed(&root, &root.join("../elsewhere/secret"))); - // A directory is not a file. - assert!(!allowed(&root, &root)); - - #[cfg(unix)] - { - // Why both sides are canonicalised: a symlink inside the root that points out of it - // resolves to its target, and the target fails the prefix check. - let link = root.join("escape"); - std::os::unix::fs::symlink(outside.join("secret"), &link).expect("symlink"); - assert!(!allowed(&root, &link)); - } - let _ = std::fs::remove_dir_all(&base); - } -} diff --git a/builder/desktop/src/usb/runtime_guard.rs b/builder/desktop/src/usb/runtime_guard.rs deleted file mode 100644 index 5b86155c3a..0000000000 --- a/builder/desktop/src/usb/runtime_guard.rs +++ /dev/null @@ -1,51 +0,0 @@ -//! A test that the cargo feature which makes `nusb` usable from an async context is still on. -//! -//! `nusb` returns [`MaybeFuture`](nusb::MaybeFuture) rather than a plain future, so the same call -//! serves a blocking caller and an async one. The async arm needs somewhere to put the blocking -//! syscall, and which executor that is comes from the `smol` or `tokio` cargo feature. With neither -//! enabled, `BlockingTask::spawn` panics. That is not a compile error: the crate builds, clippy is -//! happy, and every `.await` on a `nusb` future panics the first time a real device is touched. -//! -//! What enforces it: Windows builds `list_devices()` from a blocking arm, so awaiting it reaches -//! the panic with no device attached, and the Windows CI leg fails if the feature is dropped. Linux -//! and macOS build the same call from a ready arm, so only the second half of this module covers -//! them, and that half runs only where a device is plugged in. - -#[cfg(test)] -mod tests { - /// Await a `nusb` `MaybeFuture` and require it not to panic. - /// - /// `list_devices()` is the only entry point that needs no hardware, so it is the one a CI - /// machine can run. The assertion is about reaching the result and not about its contents: a - /// machine with no USB devices is a legitimate pass. - #[tokio::test] - async fn awaiting_nusb_does_not_panic() { - let devices = nusb::list_devices().await.expect("the USB bus should be enumerable"); - // Draining it proves this is a real iterator and not an unpolled future. - let count = devices.count(); - println!("nusb enumerated {count} device(s)"); - } - - /// The half that covers macOS and Linux, on any machine with the device plugged in. - /// - /// Opening is blocking on all three platforms, so this reaches the panicking arm everywhere. It - /// skips loudly when the device is absent, because a silent skip would read as coverage that - /// does not exist. - #[tokio::test] - async fn opening_the_device_does_not_panic() { - let Some(info) = nusb::list_devices() - .await - .expect("the USB bus should be enumerable") - .find(|d| d.vendor_id() == super::super::VENDOR_ID && d.product_id() == super::super::PRODUCT_ID) - else { - println!("no OpenBikeComputer attached — skipping (this half needs hardware)"); - return; - }; - // The failure this guards is a panic, not an `Err`. A device held open by the app is an - // ordinary `Err` and must not fail the test. - match info.open().await { - Ok(_) => println!("opened the device"), - Err(e) => println!("device present but not openable ({e}) — the await itself is what mattered"), - } - } -} diff --git a/builder/desktop/src/usb/watch.rs b/builder/desktop/src/usb/watch.rs deleted file mode 100644 index 902d4dcc7c..0000000000 --- a/builder/desktop/src/usb/watch.rs +++ /dev/null @@ -1,130 +0,0 @@ -//! Discovery and hot-plug: what makes plugging a cable in light the window up. -//! -//! Plugging in must light up the UI within about a second, and unplugging must not leave a stuck -//! spinner. The browser gets that from `navigator.usb`'s events; here it comes from the OS -//! notification streams nusb wraps, which are edge-driven rather than polled, so the latency budget -//! is spent on the device side. -//! -//! A native host has no chooser and no permission prompt, so it sees the device the moment it -//! appears. The session shape stays the same as the browser's anyway: `requestDevice()` here is -//! looking again, so the same button keeps working and no UI branches on the transport. - -use std::sync::Arc; - -use futures_core::Stream; -use nusb::hotplug::HotplugEvent; -use nusb::DeviceInfo; -use serde::Serialize; - -use super::{PRODUCT_ID, VENDOR_ID}; - -/// A device the app is willing to talk to, as the frontend sees it. -#[derive(Debug, Clone, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct DeviceSummary { - /// Opaque and stable for as long as the device stays plugged in: the key `usb_open` takes and - /// the key a `disconnected` event carries. Never parsed by the frontend. - pub id: String, - pub vendor_id: u16, - pub product_id: u16, - pub product: Option, - /// The nRF `FICR.DEVICEID`, which is what tells two boards apart. - pub serial_number: Option, -} - -/// What the watch task tells the frontend. -#[derive(Debug, Clone, Serialize)] -#[serde(rename_all = "camelCase", tag = "type")] -pub enum UsbEvent { - Connected { - device: DeviceSummary, - }, - Disconnected { - id: String, - }, - /// The OS notification stream ended or could not be started. Reported rather than swallowed: a - /// watch that died silently looks like nothing ever being plugged in. - WatchFailed { - message: String, - }, -} - -/// The frontend's handle on a device, stable for the life of the connection. -/// -/// `DeviceId` is opaque and platform-specific in shape, so it is stringified rather than -/// interpreted. The only property anything depends on is that one physical connection produces the -/// same string in a `connected` event, in `usb_list` and in the matching `disconnected`. -pub fn device_key(id: nusb::DeviceId) -> String { - format!("{id:?}") -} - -/// Is this one of ours? -/// -/// The pair is pid.codes' prototype and testing range, and the firmware declares the same one. -/// Allocating a real product id moves this constant, the firmware's `PRODUCT_ID` and the web -/// filters together. -pub fn matches(info: &DeviceInfo) -> bool { - info.vendor_id() == VENDOR_ID && info.product_id() == PRODUCT_ID -} - -pub fn summarize(info: &DeviceInfo) -> DeviceSummary { - DeviceSummary { - id: device_key(info.id()), - vendor_id: info.vendor_id(), - product_id: info.product_id(), - product: info.product_string().map(str::to_owned), - serial_number: info.serial_number().map(str::to_owned), - } -} - -/// Every matching device attached right now. -pub async fn list() -> Result, String> { - let devices = nusb::list_devices().await.map_err(|e| format!("USB devices could not be listed: {e}"))?; - Ok(devices.filter(matches).map(|info| summarize(&info)).collect()) -} - -/// What the watch task hands its events to. -/// -/// A closure rather than a [`Channel`], because the channel is replaceable: a window that reloads -/// opens a new one, and the watch outlives the page. -pub type Emit = Arc; - -/// Follow hot-plug forever. -/// -/// `on_disconnect` runs before the event reaches the frontend, and that ordering matters: it is -/// where the pipes of a link on the vanished device are failed, so an in-flight transfer's UI says -/// unplugged now instead of spinning until a timeout. -pub fn spawn(emit: Emit, on_disconnect: Arc) { - // Created before the caller lists devices: a device attached in the window between listing - // and watching would otherwise be missed. - let mut watch = match nusb::watch_devices() { - Ok(watch) => watch, - Err(e) => { - emit(UsbEvent::WatchFailed { message: format!("USB hot-plug is unavailable: {e}") }); - return; - } - }; - tauri::async_runtime::spawn(async move { - loop { - let event = std::future::poll_fn(|cx| std::pin::Pin::new(&mut watch).poll_next(cx)).await; - let Some(event) = event else { - emit(UsbEvent::WatchFailed { message: "The system stopped reporting USB device changes.".into() }); - return; - }; - match event { - HotplugEvent::Connected(info) if matches(&info) => { - emit(UsbEvent::Connected { device: summarize(&info) }); - } - HotplugEvent::Connected(_) => {} - HotplugEvent::Disconnected(id) => { - // Not filtered by vendor and product id: a disconnect carries only an id, and - // an id with no link is a no-op on both sides. Filtering here would mean - // keeping a device table only to discard events that are already ignored. - let key = device_key(id); - on_disconnect(&key); - emit(UsbEvent::Disconnected { id: key }); - } - } - } - }); -} diff --git a/builder/desktop/tauri.conf.json b/builder/desktop/tauri.conf.json deleted file mode 100644 index be82ac6bc2..0000000000 --- a/builder/desktop/tauri.conf.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "https://schema.tauri.app/config/2", - "productName": "OpenBikeComputer", - "version": "0.1.0", - "identifier": "de.timohueser.openbikecomputer", - "build": { - "frontendDist": "../web/dist/desktop", - "devUrl": "http://localhost:5173", - "beforeDevCommand": "npm --prefix ../web run dev -- --mode desktop", - "beforeBuildCommand": "npm --prefix ../web run build:desktop" - }, - "app": { - "windows": [ - { - "label": "main", - "title": "OpenBikeComputer", - "width": 1360, - "height": 900, - "minWidth": 900, - "minHeight": 620, - "dragDropEnabled": false - } - ], - "security": { - "csp": "default-src 'self'; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline'; script-src 'self' 'wasm-unsafe-eval'; connect-src 'self' ipc: http://ipc.localhost https://tiles.openbikecomputer.com https://maps.openbikecomputer.com" - } - }, - "bundle": { - "active": true, - "targets": "all", - "icon": [ - "icons/32x32.png", - "icons/128x128.png", - "icons/128x128@2x.png", - "icons/icon.ico", - "icons/icon.icns", - "icons/icon.png" - ] - } -} diff --git a/builder/server/schema_preview.py b/builder/server/schema_preview.py index 825e3a2ccf..b33ffbcf76 100644 --- a/builder/server/schema_preview.py +++ b/builder/server/schema_preview.py @@ -1,6 +1,6 @@ """Bounded native packing for the localhost maintainer schema lab. -The product web and desktop hosts never import or expose this module. The +The product web host never imports or exposes this module. The FastAPI maintainer host accepts only a JSON config; the source, binary, crop, command line, output path and resource bounds all remain server-owned. """ diff --git a/builder/usb/Cargo.toml b/builder/usb/Cargo.toml index 4a7192d255..4e4c9528b5 100644 --- a/builder/usb/Cargo.toml +++ b/builder/usb/Cargo.toml @@ -3,13 +3,12 @@ name = "obc-usb" version = "0.1.0" edition = "2021" publish = false -description = "Shared native USB byte transport and maintenance CLI for OpenBikeComputer" +description = "Native USB byte transport and card-format CLI for OpenBikeComputer" [dependencies] getrandom = { workspace = true } nusb = { version = "=0.2.5", features = ["tokio"] } obc-link = { workspace = true, features = ["client"] } -serde = { workspace = true, features = ["derive"] } tokio = { workspace = true, features = ["macros", "rt-multi-thread", "sync", "time"] } [dev-dependencies] diff --git a/builder/usb/README.md b/builder/usb/README.md new file mode 100644 index 0000000000..711818ec0e --- /dev/null +++ b/builder/usb/README.md @@ -0,0 +1,24 @@ +# obc-usb + +The native USB byte transport and the flat-store client over it, for a computer that talks to the +device over the cable. Its one program is `obc-format-card`, which `obc format-card` runs. + +## Linux USB permission + +macOS and Windows need no setup. On Linux, the USB device node belongs to root, so a program +cannot open the device until a udev rule gives the person at the machine access. Chrome and Edge +need the same rule for WebUSB. + +```sh +sudo cp builder/usb/linux/99-openbikecomputer.rules /etc/udev/rules.d/ +sudo udevadm control --reload-rules +sudo udevadm trigger +# unplug and reconnect the device +``` + +## Test + +```sh +obc test -p obc-usb +obc exec cargo clippy -p obc-usb --all-targets -- -D warnings +``` diff --git a/builder/desktop/linux/99-openbikecomputer.rules b/builder/usb/linux/99-openbikecomputer.rules similarity index 79% rename from builder/desktop/linux/99-openbikecomputer.rules rename to builder/usb/linux/99-openbikecomputer.rules index d46b583c73..e3142011cd 100644 --- a/builder/desktop/linux/99-openbikecomputer.rules +++ b/builder/usb/linux/99-openbikecomputer.rules @@ -1,16 +1,17 @@ -# OpenBikeComputer — let a logged-in desktop session open the device (#909). +# OpenBikeComputer — let the person at the machine open the device over USB, +# from Chrome or Edge (WebUSB) or from `obc format-card`. # # Linux is the only platform that needs anything. The device declares a -# vendor-specific interface (class 0xFF, #889), and: +# vendor-specific interface (class 0xFF), and: # # * macOS lets an application open one with no driver, no entitlement and no # kext — IOKit hands it over as long as nothing else has claimed it. # * Windows binds WinUSB automatically from the MS OS 2.0 BOS descriptors the # firmware ships, so there is no .inf, no Zadig and no driver install. # * Linux exposes it through usbfs at /dev/bus/usb/BBB/DDD, which is -# root-owned by default. Without a rule the app can enumerate the device and -# then fail to open it, which reads as "Permission denied" and looks like a -# bug in the app. +# root-owned by default. Without a rule a program can enumerate the device +# and then fail to open it, which reads as "Permission denied" and looks like +# a bug in the program. # # TAG+="uaccess" is the modern answer: systemd-logind grants the *currently # active local session* an ACL on the node, so the person sitting at the machine diff --git a/builder/usb/src/client/usb.rs b/builder/usb/src/client/usb.rs index 5115d87d2b..5d1bdd9a5f 100644 --- a/builder/usb/src/client/usb.rs +++ b/builder/usb/src/client/usb.rs @@ -158,7 +158,7 @@ pub(super) struct UsbTransport { impl UsbTransport { pub(super) async fn open(info: &nusb::DeviceInfo) -> Result { - let (link, _) = crate::open(info, format!("{:?}", info.id())).await?; + let link = crate::open(info).await?; let readers = Readers::start(&link); Ok(Self { link: Some(link), readers: Some(readers), serial: info.serial_number().map(str::to_owned) }) } @@ -249,7 +249,7 @@ impl Transport for UsbTransport { if devices.next().is_some() { return Err(PipeFault::device("More than one device has the saved serial number.")); } - if let Ok((link, _)) = crate::open(&info, format!("{:?}", info.id())).await { + if let Ok(link) = crate::open(&info).await { self.readers = Some(Readers::start(&link)); self.link = Some(link); return Ok(()); diff --git a/builder/usb/src/lib.rs b/builder/usb/src/lib.rs index 5a2d0bd901..5622715748 100644 --- a/builder/usb/src/lib.rs +++ b/builder/usb/src/lib.rs @@ -1,8 +1,8 @@ //! One claimed device: endpoint discovery, and the two byte pipes over it. //! //! Everything here moves **bytes**. Nothing in this file knows what a transfer descriptor is, what -//! a status envelope means, or which object an upload belongs to. The desktop app and maintenance -//! CLI share this transport; their protocol clients sit above it. +//! a status envelope means, or which object an upload belongs to. The protocol client in `client` +//! sits above it. pub mod client; @@ -10,7 +10,6 @@ use std::sync::Arc; use nusb::transfer::{Buffer, Bulk, Completion, In, Out, TransferError}; use nusb::{Device, DeviceInfo, Endpoint, Interface}; -use serde::{Deserialize, Serialize}; use tokio::sync::{watch, Mutex}; /// pid.codes' prototype/testing pair, shared with the board descriptors and WebUSB filter. @@ -35,8 +34,7 @@ const USB_BINDING_MAJOR: u8 = 5; const BULK_READ_TARGET: usize = 16 * 1024; /// Which of the two planes a call means. The names match `lib/usb/pipe.ts`'s `DeviceLink`. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize)] -#[serde(rename_all = "lowercase")] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Plane { Control, Bulk, @@ -44,8 +42,7 @@ pub enum Plane { /// Which half of an endpoint pair. Cancellation is per-direction: an abort on a download must not /// also tear down the write the caller is about to make. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize)] -#[serde(rename_all = "lowercase")] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Dir { In, Out, @@ -53,11 +50,8 @@ pub enum Dir { /// A transport failure, in the vocabulary `lib/usb/pipe.ts`'s `PipeError` already speaks. /// -/// The `code` is the contract — the TS side switches on it — and the `message` is for a human. -/// `unsupported` never appears here: it means "this browser has no WebUSB", which is exactly the -/// condition the desktop app exists to not have. -#[derive(Debug, Clone, Serialize)] -#[serde(rename_all = "camelCase")] +/// `unsupported` never appears here: it means "this browser has no WebUSB". +#[derive(Debug, Clone)] pub struct PipeFault { /// `closed` | `aborted` | `device-error`. pub code: &'static str, @@ -170,10 +164,7 @@ fn check_binding_major(interface_protocol: u8, device_release: u16) -> Result<() /// The mechanism is a `watch` channel rather than a `Notify` because the race matters: a cancel /// that arrives between the caller deciding to abort and the read parking itself must not be lost. /// A monotonic epoch the reader snapshots before it parks cannot miss one. -/// that arrives between "the caller decided to abort" and "the read parked itself" must not be -/// lost. A monotonic epoch the reader snapshots before it parks cannot miss one. pub struct Pipe { - pub max_packet: usize, read_len: usize, ep_in: Mutex>, ep_out: Mutex>, @@ -194,7 +185,6 @@ impl Pipe { // OS would fail the URB anyway. Round down, floor at one packet. let read_len = (target_read / max_packet).max(1) * max_packet; Ok(Self { - max_packet, read_len, ep_in: Mutex::new(ep_in), ep_out: Mutex::new(ep_out), @@ -329,10 +319,6 @@ async fn cancel_and_drain(ep: &mut Endpoin /// The `Interface` is held for its whole life because dropping it releases the claim — nothing /// reads it directly. pub struct OpenLink { - /// The stable key the frontend knows this device by; a hot-plug `Disconnected` carries the same - /// one, which is how a pulled cable reaches the pipes without waiting for a transfer to time - /// out. - pub device_id: String, pub control: Pipe, pub bulk: Pipe, _interface: Interface, @@ -345,29 +331,10 @@ impl OpenLink { Plane::Bulk => &self.bulk, } } - - /// Fail everything parked on both planes. Called on an unplug and on close. - pub fn cancel_all(&self) { - self.control.cancel(None); - self.bulk.cancel(None); - } -} - -/// What `usb_open` tells the frontend about the link it just got. -#[derive(Debug, Clone, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct OpenedLink { - pub handle: u32, - pub device_id: String, - pub interface_number: u8, - pub control_packet_size: usize, - pub bulk_packet_size: usize, - pub product: Option, - pub serial_number: Option, } /// Open, configure and claim a device, returning its two pipes. -pub async fn open(info: &DeviceInfo, device_id: String) -> Result<(Arc, OpenedLink), PipeFault> { +pub async fn open(info: &DeviceInfo) -> Result, PipeFault> { let device: Device = info .open() .await @@ -414,23 +381,14 @@ pub async fn open(info: &DeviceInfo, device_id: String) -> Result<(Arc let control = Pipe::new(&interface, layout.control.0, layout.control.1, layout.control.2)?; let bulk = Pipe::new(&interface, layout.bulk.0, layout.bulk.1, BULK_READ_TARGET)?; - let opened = OpenedLink { - handle: 0, // filled in by the registry - device_id: device_id.clone(), - interface_number: layout.interface, - control_packet_size: control.max_packet, - bulk_packet_size: bulk.max_packet, - product: info.product_string().map(str::to_owned), - serial_number: info.serial_number().map(str::to_owned), - }; - Ok((Arc::new(OpenLink { device_id, control, bulk, _interface: interface }), opened)) + Ok(Arc::new(OpenLink { control, bulk, _interface: interface })) } /// The two failures whose remedy is not "try again", spelled out where they happen. /// /// On Linux the usbfs node is root-owned unless a udev rule says otherwise, and the error the user /// would otherwise read is a bare `Permission denied` with nothing to suggest that a one-line file -/// fixes it (`builder/desktop/linux/`). macOS needs nothing for a vendor interface; Windows +/// fixes it (`builder/usb/linux/`). macOS needs nothing for a vendor interface; Windows /// binds WinUSB from the MS OS 2.0 descriptors the firmware already ships. /// /// `Busy` is the other one, and it is not platform-specific: an interface may be claimed once, so a @@ -439,7 +397,7 @@ pub async fn open(info: &DeviceInfo, device_id: String) -> Result<(Arc fn permission_hint(error: &nusb::Error) -> &'static str { match error.kind() { nusb::ErrorKind::PermissionDenied if cfg!(target_os = "linux") => { - " — install the udev rule from the app's `linux/` folder, then unplug and re-plug the device." + " — install the udev rule from `builder/usb/linux/`, then unplug and re-plug the device." } nusb::ErrorKind::PermissionDenied => " — this account is not allowed to open the device.", nusb::ErrorKind::Busy => " — something else has it open. Close the other app or browser tab and try again.", diff --git a/builder/wasm/src/convert.rs b/builder/wasm/src/convert.rs index b207a1737b..29dee96ce2 100644 --- a/builder/wasm/src/convert.rs +++ b/builder/wasm/src/convert.rs @@ -3,8 +3,7 @@ //! and the two guards below are tested natively. use obc_formats::io::{ByteSink, Error, SliceSource}; -use obc_formats::obcr::WAYPOINT_ELE_NONE; -use obc_route::{for_each_waypoint, BikeType, RouteIndex, RouteReader, MAX_POINTS_PER_CHUNK, MAX_ROUTE_CHUNKS}; +use obc_route::{BikeType, RouteIndex, RouteReader, MAX_POINTS_PER_CHUNK, MAX_ROUTE_CHUNKS}; /// Largest point count an `.obcr` can store, and so the ceiling [`gpx_to_obcr`] converts up to: /// every chunk full, with consecutive chunks sharing their seam vertex. @@ -188,47 +187,6 @@ pub fn obcr_to_track(obcr: &[u8]) -> Result, ConvertFailure> { Ok(out) } -/// One waypoint read back out of an `.obcr` route, with the wire encodings already unfolded: -/// microdegrees to degrees, and the elevation sentinel to `None`. -#[derive(Debug, Clone, PartialEq)] -pub struct RouteWaypoint { - /// The stored UTF-8 short name, at most 24 bytes, and possibly empty. - pub name: String, - /// The waypoint's own coordinate in degrees. It can sit off the polyline. - pub lat: f64, - pub lon: f64, - /// Elevation in meters, or `None` where the source carried none. - pub ele: Option, - /// The stored category byte, raw: `0` is generic and `1..=6` are the POI category ids. A - /// consumer renders any other value as generic. - pub category: u8, - /// Meters from the route start to the waypoint's position on the track: the stored field, not - /// a recomputation. - pub dist_along_m: u32, -} - -/// Decode an `.obcr` route's waypoint table, in ascending distance order: name, position, raw -/// category byte and along-track distance for each stored waypoint. -/// -/// `dist_along_m` is returned as stored. The format fixes it at conversion time against the raw -/// geometry the converter saw, which a reader of the decimated file could not reproduce. -pub fn obcr_to_waypoints(obcr: &[u8]) -> Result, ConvertFailure> { - let src = SliceSource(obcr); - let mut out: Vec = Vec::new(); - for_each_waypoint(&src, |w| { - out.push(RouteWaypoint { - name: w.name.as_str().into(), - lat: f64::from(w.lat) * 1e-6, - lon: f64::from(w.lon) * 1e-6, - ele: (w.ele != WAYPOINT_ELE_NONE).then(|| f64::from(w.ele)), - category: w.category_id, - dist_along_m: w.dist_along_m, - }); - }) - .map_err(describe_route_read_error)?; - Ok(out) -} - /// Map a failure to open or read an `.obcr` onto the browser vocabulary. Exhaustive like the other /// maps in this file: a new seam variant must break this build. fn describe_route_read_error(e: Error) -> ConvertFailure { @@ -414,58 +372,6 @@ mod tests { } } - /// The tiny track with two waypoints ahead of it: one categorized with an elevation, one with - /// an unmapped symbol and no elevation. They sit near different ends of the track, so the - /// stored distances must differ. - const WPT_GPX: &str = r#" - - AussichtViewpoint - 238.0BrunnenDrinking Water - t - 236.0 - 241.0 - 249.5 - - -"#; - - /// What the converter stored, `obcr_to_waypoints` returns, sorted by distance along. - #[test] - fn obcr_round_trips_the_waypoints_it_stored() { - let obcr = gpx_to_obcr(WPT_GPX.as_bytes(), "Tiny", BikeType::Road).unwrap(); - let wps = obcr_to_waypoints(&obcr).unwrap(); - assert_eq!(wps.len(), 2); - - // Sorted ascending by distance along: Brunnen sits by the start, Aussicht by the end. - let (near, far) = (&wps[0], &wps[1]); - assert_eq!(near.name, "Brunnen"); - assert_eq!(near.category, 1, "Drinking Water maps to water (§4.1)"); - assert_eq!(near.ele, Some(238.0)); - assert!((near.lat - 48.0001).abs() < 1e-5); - assert!((near.lon - 7.8201).abs() < 1e-5); - - assert_eq!(far.name, "Aussicht"); - assert_eq!(far.category, 0, "Viewpoint is deliberately unmapped — generic"); - assert_eq!(far.ele, None, "no comes back as None, not as the sentinel"); - assert!(near.dist_along_m < far.dist_along_m, "route order: {near:?} vs {far:?}"); - // The track is about 500 m long, and the far waypoint's anchor is near its end. - assert!(far.dist_along_m > 300 && far.dist_along_m < 700, "{far:?}"); - } - - /// A route without waypoints is an empty list, which is the common case and not an error. - #[test] - fn a_waypoint_free_route_decodes_to_no_waypoints() { - let obcr = gpx_to_obcr(TINY_GPX.as_bytes(), "Tiny", BikeType::Road).unwrap(); - assert_eq!(obcr_to_waypoints(&obcr).unwrap(), Vec::new()); - } - - /// The waypoint direction shares the track direction's error vocabulary. - #[test] - fn obcr_to_waypoints_refuses_what_is_not_a_route() { - assert_eq!(code_of(obcr_to_waypoints(&[0u8; 200])), ErrorCode::NotRoute); - assert_eq!(code_of(obcr_to_waypoints(b"short")), ErrorCode::InputTruncated); - } - #[test] fn obcr_to_track_refuses_what_is_not_a_route() { // Long enough to read a header out of, wrong magic: not a route. diff --git a/builder/wasm/src/convert_web.rs b/builder/wasm/src/convert_web.rs index 7c9f7723ea..503624b55c 100644 --- a/builder/wasm/src/convert_web.rs +++ b/builder/wasm/src/convert_web.rs @@ -40,38 +40,6 @@ mod web { crate::convert::obcr_to_track(bytes).map_err(to_js) } - /// Decode a `.obcr` route's waypoint table: an `Array` of plain - /// `{name, lat, lon, ele, category, distAlongM}` objects in ascending `distAlongM` order. - /// `ele` is `null` where the source carried none, `category` is the stored byte raw, and - /// `distAlongM` is the stored placement-time distance and not a recomputation. A route without - /// waypoints yields `[]`. - /// - /// Plain objects rather than a flat array because names are strings, and at most 32 waypoints - /// cross per route. - /// - /// Throws an `Error` carrying `code` and `message` on failure; see [`crate::convert::ErrorCode`]. - #[wasm_bindgen] - pub fn obc_convert_obcr_to_waypoints(bytes: &[u8]) -> Result { - let wps = crate::convert::obcr_to_waypoints(bytes).map_err(to_js)?; - let arr = js_sys::Array::new(); - for w in wps { - let obj = js_sys::Object::new(); - set(&obj, "name", &JsValue::from_str(&w.name)); - set(&obj, "lat", &JsValue::from_f64(w.lat)); - set(&obj, "lon", &JsValue::from_f64(w.lon)); - set(&obj, "ele", &w.ele.map_or(JsValue::NULL, JsValue::from_f64)); - set(&obj, "category", &JsValue::from_f64(f64::from(w.category))); - set(&obj, "distAlongM", &JsValue::from_f64(f64::from(w.dist_along_m))); - arr.push(&obj.into()); - } - Ok(arr) - } - - /// `Reflect::set` on a fresh plain object, which cannot fail, so the result is ignored. - fn set(obj: &js_sys::Object, key: &str, value: &JsValue) { - let _ = js_sys::Reflect::set(obj, &JsValue::from_str(key), value); - } - /// Build the JS exception as a real `Error` instance, so it carries a stack and survives /// `instanceof Error`, with the stable code hung off it as a plain property. /// diff --git a/builder/web/package-lock.json b/builder/web/package-lock.json index 568ae6854c..ab829fbd19 100644 --- a/builder/web/package-lock.json +++ b/builder/web/package-lock.json @@ -11,7 +11,6 @@ "@mapbox/vector-tile": "^3.0.0", "@maplibre/maplibre-gl-leaflet": "^0.1.4", "@protomaps/basemaps": "^5.7.2", - "@tauri-apps/api": "^2.11.1", "earcut": "^3.2.4", "leaflet": "^1.9.4", "maplibre-contour": "^0.1.1", @@ -1042,16 +1041,6 @@ "vite": "^6.3.0 || ^7.0.0" } }, - "node_modules/@tauri-apps/api": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.11.1.tgz", - "integrity": "sha512-M2FPuYND2m+wh5hfW9ZpSdxMPdEJovPBWwoHJmwUpysTYNHaOkVFN419m/K0LIgjb/7KU2vBgsUepJWugQCvAA==", - "license": "Apache-2.0 OR MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/tauri" - } - }, "node_modules/@tsconfig/svelte": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/svelte/-/svelte-5.0.8.tgz", diff --git a/builder/web/package.json b/builder/web/package.json index d8673dd761..338d10b7ed 100644 --- a/builder/web/package.json +++ b/builder/web/package.json @@ -10,8 +10,7 @@ "build:data": "vite build --mode data", "build:trailview": "vite build --mode trailview", "build:web": "vite build --mode web", - "build:desktop": "vite build --mode desktop", - "build:all": "npm run build && npm run build:web && npm run build:desktop", + "build:all": "npm run build && npm run build:web", "build:wasm": "bash ../build-wasm-bridges.sh", "preview": "vite preview", "check": "svelte-check --tsconfig ./tsconfig.json --fail-on-warnings", @@ -23,7 +22,6 @@ "@mapbox/vector-tile": "^3.0.0", "@maplibre/maplibre-gl-leaflet": "^0.1.4", "@protomaps/basemaps": "^5.7.2", - "@tauri-apps/api": "^2.11.1", "earcut": "^3.2.4", "leaflet": "^1.9.4", "maplibre-contour": "^0.1.1", diff --git a/builder/web/src/App.svelte b/builder/web/src/App.svelte index a18729aeee..253f9f5a22 100644 --- a/builder/web/src/App.svelte +++ b/builder/web/src/App.svelte @@ -2,13 +2,10 @@ import ConfirmDialog from "./components/ConfirmDialog.svelte"; import Header from "./components/Header.svelte"; import UpdatePrompt from "./components/UpdatePrompt.svelte"; - import Desktop from "./routes/Desktop.svelte"; import Home from "./routes/Home.svelte"; import { LINKS } from "./lib/constants"; import { platform, type StyleEditorModule } from "./lib/platform"; - import { DESKTOP_ADDS } from "./lib/platform/gating"; import { router } from "./lib/router.svelte"; - import { DESKTOP_ROUTE } from "./lib/routes"; // The advanced editor is maintainer tooling, reached through an `import()` // only the dev host declares — product hosts have no reference to the route @@ -20,28 +17,8 @@ let editor: Promise | undefined; const openEditor = load ? () => (editor ??= load()) : null; - // The device and rides pages reach the protocol codecs and the library — - // exactly the modules the entry chunk must not contain (platform/bundle.test.ts) - // — so both live behind memoized dynamic imports, the same shape the device - // surfaces already use. Gated on caps, not on a host name: a tier without - // the page treats its hash as home. - let devicePage: Promise | undefined; - const openDevice = platform.caps.deviceDashboard - ? () => (devicePage ??= import("./routes/Device.svelte")) - : null; - let ridesPage: Promise | undefined; - const openRides = platform.caps.rideLibrary - ? () => (ridesPage ??= import("./routes/Rides.svelte")) - : null; - const showEditor = $derived(router.route === "advanced" && openEditor !== null); - // Same shape as the editor's gate: a host that is missing nothing has - // nothing to read there, so #/desktop falls back to home rather than - // rendering a page that pitches the app you are already running. - const showDesktop = $derived(router.route === "desktop" && DESKTOP_ADDS.length > 0); - const showDevice = $derived(router.route === "device" && openDevice !== null); - const showRides = $derived(router.route === "rides" && openRides !== null); - const showHome = $derived(!showEditor && !showDesktop && !showDevice && !showRides); + const showHome = $derived(!showEditor); @@ -64,35 +41,18 @@ {/await} {/if} - {#if showDesktop} - - {/if} - {#if showDevice && openDevice} - {#await openDevice() then { default: Device }} - - {/await} - {/if} - {#if showRides && openRides} - {#await openRides() then { default: Rides }} - - {/await} - {/if} - + - -
- {#if active} - - sending {active.label}{#if active.total > 0} - · {active.pct}%{/if} - - {/if} - - {#if session?.status === "ready"} - - - - OBC - {#if session.info}{session.info.hardwareRevision}{/if} - - - - {:else if session?.status === "connecting"} - - - Connecting… - - {:else if session?.status === "unsupported"} - - - USB unavailable - - {:else} - - - No device - - - {/if} -
- - diff --git a/builder/web/src/components/Gated.svelte b/builder/web/src/components/Gated.svelte deleted file mode 100644 index 6e90efc05c..0000000000 --- a/builder/web/src/components/Gated.svelte +++ /dev/null @@ -1,98 +0,0 @@ - - - -{#if blocked} - {#if unavailable} -
{@render unavailable(reasonId)}
- {/if} -

- - {GATES[blocked].reason} - {DESKTOP_LINK.label} -

-{:else if children} - {@render children(value as T)} -{/if} - - diff --git a/builder/web/src/components/Header.svelte b/builder/web/src/components/Header.svelte index 107eef600b..4b783443a4 100644 --- a/builder/web/src/components/Header.svelte +++ b/builder/web/src/components/Header.svelte @@ -4,37 +4,25 @@ import { setupSiteNavigation } from "../../../../docs/assets/site-navigation.js"; import { appearance, startTheme, toggleTheme } from "../lib/theme.svelte"; - import DeviceChip from "./DeviceChip.svelte"; import { platform } from "../lib/platform"; - import { available } from "../lib/platform/gating"; import { router, type Route } from "../lib/router.svelte"; - import { ADVANCED_ROUTE, DEVICE_ROUTE, RIDES_ROUTE } from "../lib/routes"; + import { ADVANCED_ROUTE } from "../lib/routes"; let header: HTMLElement; onMount(startTheme); - onMount(() => siteNav ? setupSiteNavigation(header) : undefined); + onMount(() => setupSiteNavigation(header)); - // The header has two shapes, decided by capability rather than host name: - // an app with more than one place to be gets tabs; a single-page site keeps - // links. Each tab exists exactly where its route does (`App.svelte` gates - // the same way), so a tab can never point at a page that falls back home. + // A host with more than one place to be gets tabs under the site links. Each + // tab exists exactly where its route does (`App.svelte` gates the same way), + // so a tab can never point at a page that falls back home. const tabs: Array<{ route: Route; href: string; label: string }> = [ { route: "home", href: "#/", label: "Maps" }, ...(platform.styleEditor ? [{ route: "advanced" as const, href: ADVANCED_ROUTE, label: "Style editor" }] : []), - ...(available("deviceDashboard") - ? [{ route: "device" as const, href: DEVICE_ROUTE, label: "Device" }] - : []), - ...(available("rideLibrary") - ? [{ route: "rides" as const, href: RIDES_ROUTE, label: "Ride library" }] - : []), ]; const tabbed = tabs.length > 1; - // Links out of the app, present only where there is a site around it (the - // desktop app has none — `platform.siteNav` is absent there, and so are - // these). Orthogonal to the tabs: the dev server shows both. const siteNav = platform.siteNav; @@ -57,20 +45,15 @@
- {#if siteNav} - {@render brand()} - - - {:else} -
{@render brand()}
- {@render appTabs()} - {/if} + {@render brand()} + + - {#if available("deviceDashboard")} - - {/if}
- {#if siteNav && tabbed} + {#if tabbed}
{@render appTabs()}
@@ -103,7 +83,4 @@ .site-head:has(.tabs) :global(.name) { display: none; } .site-head:has(.tabs) :global(.short-name) { display: inline; } } - @media (max-width: 760px) { - .head-inner > .tabs { order: 3; width: 100%; } - } diff --git a/builder/web/src/components/UpdatePrompt.svelte b/builder/web/src/components/UpdatePrompt.svelte index d7299492c9..b783348da6 100644 --- a/builder/web/src/components/UpdatePrompt.svelte +++ b/builder/web/src/components/UpdatePrompt.svelte @@ -17,9 +17,7 @@ import { jobRegistry } from "../lib/device/job.svelte"; import { deviceHolder } from "../lib/device/session.svelte"; import { firmwareCheck } from "../lib/firmware/check.svelte"; - import { platform } from "../lib/platform"; - import { router } from "../lib/router.svelte"; - import { DEVICE_ROUTE, FIRMWARE_ANCHOR } from "../lib/routes"; + import { FIRMWARE_ANCHOR } from "../lib/routes"; const session = $derived(deviceHolder.session); /** Non-null exactly while a device is connected and has said what it is. */ @@ -42,15 +40,11 @@ } /** - * Take the rider to the card. - * - * On a tier with a Device page that is a navigation, and the page arrives through a dynamic - * import — so the element does not exist yet at the moment of the click. Hence the short poll - * rather than one `scrollIntoView` into nothing; it gives up quietly after a second. + * Take the rider to the card. The device surfaces arrive through a dynamic import, so the card + * can be missing at the moment of the click: a short poll, which gives up quietly after a second. */ function show(release: { version: string }) { answer(release); - if (platform.caps.deviceDashboard && router.route !== "device") router.go("device"); let tries = 0; const settle = () => { const card = document.getElementById(FIRMWARE_ANCHOR); @@ -73,13 +67,7 @@ {/if}
- - {#if platform.caps.deviceDashboard} - show(release)}>View update - {:else} - - {/if} +
{/if} @@ -115,11 +103,4 @@ gap: 8px; margin-top: 6px; } - - /* The link-shaped primary: `.btn` is written for buttons, so undo the anchor's own colour rule - and keep the label from picking up an underline on hover. */ - a.btn.primary { - color: var(--parchment); - text-decoration: none; - } diff --git a/builder/web/src/components/coverage/CorridorPanel.svelte b/builder/web/src/components/coverage/CorridorPanel.svelte index 7be7e55b58..32754420db 100644 --- a/builder/web/src/components/coverage/CorridorPanel.svelte +++ b/builder/web/src/components/coverage/CorridorPanel.svelte @@ -272,9 +272,6 @@ >

Add corridor

- {deviceHolder.session?.status === "ready" ? "device connected" : "device optional"} diff --git a/builder/web/src/components/coverage/CoverageHome.svelte b/builder/web/src/components/coverage/CoverageHome.svelte index aa6e98dff3..e41f18ddae 100644 --- a/builder/web/src/components/coverage/CoverageHome.svelte +++ b/builder/web/src/components/coverage/CoverageHome.svelte @@ -2,9 +2,7 @@ import { tick } from "svelte"; import type { CatalogClient } from "../../lib/catalog/client"; import { CoverageStore } from "../../lib/coverage/store.svelte"; - import { available } from "../../lib/platform/gating"; import DeviceStep from "../device/DeviceStep.svelte"; - import MapSendStep from "../device/MapSendStep.svelte"; import CoverageMap from "./CoverageMap.svelte"; import DownloadStep from "./DownloadStep.svelte"; import MapSummary from "./MapSummary.svelte"; @@ -115,11 +113,7 @@

Or send directly to device

- {#if available("deviceDashboard")} - - {:else} - - {/if} +
diff --git a/builder/web/src/components/coverage/CoverageHome.svelte.test.ts b/builder/web/src/components/coverage/CoverageHome.svelte.test.ts index e122fa2a3f..6d74947135 100644 --- a/builder/web/src/components/coverage/CoverageHome.svelte.test.ts +++ b/builder/web/src/components/coverage/CoverageHome.svelte.test.ts @@ -14,8 +14,7 @@ vi.mock("./CoverageMap.svelte", async () => ({ default: (await import("../../../ vi.mock("./SkinStep.svelte", async () => ({ default: (await import("./ToolIcon.svelte")).default })); vi.mock("../device/DeviceStep.svelte", async () => ({ default: (await import("./ToolIcon.svelte")).default })); const host = vi.hoisted(() => ({ catalog: vi.fn(), catalogFetch: vi.fn(async () => new Response("gone", { status: 404 })) })); -vi.mock("../../lib/platform", () => ({ platform: { ...host, name: "web", caps: { deviceDashboard: false }, openMapOutput: null } })); -vi.mock("../../lib/platform/gating", () => ({ available: () => false })); +vi.mock("../../lib/platform", () => ({ platform: { ...host, name: "web" } })); const client = (body: string, url: string) => CatalogClient.fromBody(body, url, { fetchImpl: host.catalogFetch, attempts: 1 }); async function settle() { for (let n = 0; n < 20; n++) { await Promise.resolve(); await tick(); } } diff --git a/builder/web/src/components/coverage/DownloadStep.svelte b/builder/web/src/components/coverage/DownloadStep.svelte index 0eb7132821..e1bc1265da 100644 --- a/builder/web/src/components/coverage/DownloadStep.svelte +++ b/builder/web/src/components/coverage/DownloadStep.svelte @@ -38,8 +38,6 @@ import { projectedRunDiskBytes } from "../../lib/cells/quota"; import { acquireMapWorkStorage } from "../../lib/cells/workBarrier"; import { saveBlob } from "../../lib/download"; - import { platform } from "../../lib/platform"; - import type { MapOutputSession } from "../../lib/platform/types"; import { downloadCells, planCells, @@ -130,7 +128,7 @@ // owner's outstanding put or a newly mounted component. if (phase !== "finalizing") { // Direct delivery is cancelled through the DeviceJob so the same signal reaches the - // in-flight PUT; its one abort listener enters failRun. Browser/desktop delivery has + // in-flight PUT; its one abort listener enters failRun. Browser delivery has // no outer controller, so it enters that owner path directly. if (output?.kind === "device" && !output.settled) output.ctx.cancel(cause); else void failRun(cause); @@ -164,9 +162,8 @@ let asmFraction = $state(0); /** When each assembly phase began, for the run's debug ledger. */ let asmPhaseStart: Partial> = {}; - /** The map, once there is one: what it is called, how big it is, and where it - * went if the host had somewhere to put it. */ - let savedFile = $state<{ name: string; byteLength: number; path?: string } | null>(null); + /** The map, once there is one: what it is called and how big it is. */ + let savedFile = $state<{ name: string; byteLength: number } | null>(null); /** Whether the file actually reached the disk. Not `savedFile !== null`: it is * set the moment the map is delivered, and a cancel that raced the delivery * must not tell someone to go and discard a file nobody has. */ @@ -192,12 +189,9 @@ // mount maintenance has joined the origin-global map-work barrier. let clearingCells = $state(true); let cellStorageNotice = $state(null); - let outputPath = $state(null); let runWarnings = $state([]); let errorMessage = $state(null); let abortCtl: AbortController | null = null; - let downloadOutput: MapOutputSession | null = null; - let outputCleanupFailed = $state(false); /** The name this run's file will be saved under, fixed when the run starts, so editing the * selection mid-download cannot rename the map that is already being built from the old one. * @@ -299,7 +293,7 @@ phase = "saving"; delivery = output?.kind === "device" ? deliverResidentMap(msg.bytes, msg.byteLength) - : deliverMap(new Blob([msg.bytes as unknown as BlobPart]), msg.byteLength, msg.bytes); + : deliverMap(new Blob([msg.bytes as unknown as BlobPart]), msg.byteLength); void delivery.catch(() => {}); break; case "done": @@ -324,7 +318,6 @@ output.ctx.phase("finalizing"); phase = "finalizing"; } - await closeDownloadOutput(false); } catch (cause) { await failRun(cause); break; @@ -380,9 +373,6 @@ * The map the assembly wrote into OPFS: its bytes were never in wasm memory and never crossed * the worker port, and on the browser host they never enter the tab's heap either — a `Blob` on * an OPFS file is a handle, and that is what the save is given. - * - * The desktop host does read it back, because its output session takes bytes to write into a - * real folder. That is one map resident, which is the residency that host always had. */ async function deliverStoredMap(byteLength: number) { const blob = await readMapOutput(); @@ -392,7 +382,7 @@ `assembler wrote. Free some disk space and try again.`, ); } - await deliverMap(blob, byteLength, null); + await deliverMap(blob, byteLength); } /** Deliver the explicitly memory-priced fallback without creating a second full-map Blob. */ @@ -411,7 +401,7 @@ /** Deliver the verified one-file result without ever materialising an OPFS * map in the tab heap. Device PUT reads the Blob twice in bounded slices * (CRC then transfer); browser download hands the same Blob to the browser. */ - async function deliverMap(blob: Blob, byteLength: number, bytes: Uint8Array | null) { + async function deliverMap(blob: Blob, byteLength: number) { if (sinkClosed) return; if (blob.size !== byteLength) { throw new Error( @@ -422,13 +412,6 @@ if (output?.kind === "device") { const { sendMapBlob } = await import("../../lib/device/write"); output.result = await sendMapBlob(output.client, blob, name, output.ctx); - } else if (downloadOutput) { - // A picked directory (or the desktop's native folder) takes the map - // where the rider wants it, to be sent on to the device later — the card - // itself carries a flat store, not a filesystem a host can write. The - // session streams a Blob without buffering it. - const path = await downloadOutput.write(name, bytes ?? blob); - savedFile = { name, byteLength, path }; } else { // No picker here: one file, one ordinary download, one prompt. saveBlob(blob, name); @@ -446,12 +429,6 @@ else current.resolve(result as PutResponse); } - async function closeDownloadOutput(discard: boolean) { - const current = downloadOutput; - downloadOutput = null; - if (current) await (discard ? current.discard() : current.finish()); - } - async function cleanupTransientCells(owner: Output | null = output) { const revision = owner?.transientCellRevision ?? null; if (owner) owner.transientCellRevision = null; @@ -551,8 +528,7 @@ // returned; only then may cleanup run and the next map action become available. await waitForRunOperations(owner); // A delivery that has not begun is now a no-op, but one may already be in - // flight — let it land before the output is discarded, or the discard races - // the write into the folder it removes. It is bounded by one file's write. + // flight — let it land before cleanup. It is bounded by one file's write. const deliveryCause = await delivery.then( () => null, (error: unknown) => error, @@ -561,7 +537,6 @@ // unwinding. Preserve that stable cause so the DeviceJob can surface interruption. if ((deliveryCause as { code?: unknown } | null)?.code === "link") cause = deliveryCause; const cancelled = cause instanceof DOMException && cause.name === "AbortError"; - await closeDownloadOutput(true).catch(() => (outputCleanupFailed = true)); await cleanupTransientCells(owner); if (direct) await cleanupDirectOutput(); owner.releaseWork?.(); @@ -695,21 +670,8 @@ const admittedEstimate = estimate; const admissionId = estimateGeneration; const requireDisk = estimateOnDisk; - // Native desktop saving still opens its output session under the click - // that started a download. Direct device delivery never opens a save - // destination, and the web host uses an ordinary browser download. - let picked: MapOutputSession | null = null; - if (out.kind === "download" && platform.openMapOutput) { - try { - picked = await platform.openMapOutput(mapName()); - } catch (cause) { - if (cause instanceof DOMException && cause.name === "AbortError") return; - throw cause; - } - } if (destroyed) throw new DOMException("the map builder was closed", "AbortError"); if (estimateGeneration !== admissionId || estimate !== admittedEstimate || !ready) { - await picked?.discard(); throw new Error("The map selection changed. Wait for its memory check before trying again."); } const runId = ++nextRunId; @@ -723,9 +685,6 @@ persisted = false; delivery = Promise.resolve(); sinkClosed = false; - outputPath = picked?.path ?? null; - downloadOutput = picked; - outputCleanupFailed = false; runWarnings = []; dlProgress = null; asmFraction = 0; @@ -1094,8 +1053,6 @@ if (estimate.headroomBytes >= estimate.budgetBytes * 0.15) return null; return ( `Close to the browser's memory budget: about ${formatBytes(estimate.peakBytes)} projected of ` + - // No "use the desktop app" here: the desktop host runs this very worker in - // its webview, so it carries the identical wasm32 ceiling. `${formatBytes(estimate.budgetBytes)}. It will probably assemble; a smaller area is the sure thing.` ); }); @@ -1218,12 +1175,6 @@ ); }); $effect(() => onSendReadyChange?.(ready)); - /** Whether a failed run left a file behind that someone has to delete. Counted from what - * actually reached the disk, and only where nothing cleaned it up: a picked directory's - * session removes what it wrote. */ - const incompleteFileRemains = $derived( - persisted && (!platform.openMapOutput || outputCleanupFailed), - ); const dlPct = $derived( dlProgress && dlProgress.totalBytes > 0 @@ -1355,14 +1306,7 @@ {#if lastRunKind === "device"}

Assembled and sent {runFileName}.

{:else} -

- {#if outputPath} - Saved {savedFile?.name} in - {outputPath}. - {:else} - Downloaded {savedFile?.name}. - {/if} -

+

Downloaded {savedFile?.name}.

{/if} {#if savedFile}

{formatBytes(savedFile.byteLength)}

@@ -1381,7 +1325,7 @@ {:else if phase === "error"}

- {#if incompleteFileRemains} + {#if persisted} The map was not completed. Discard the file it left behind: {errorMessage} {:else} Nothing was saved: {errorMessage} @@ -1389,7 +1333,7 @@

{:else if phase === "cancelled"}

- {#if incompleteFileRemains} + {#if persisted} Cancelled — discard the incomplete file it left behind. {:else} Cancelled — nothing was saved. diff --git a/builder/web/src/components/device/CardFormat.svelte b/builder/web/src/components/device/CardFormat.svelte index ead8f97fae..665000ba4c 100644 --- a/builder/web/src/components/device/CardFormat.svelte +++ b/builder/web/src/components/device/CardFormat.svelte @@ -1,6 +1,5 @@ - - {#snippet children()} - {#if deviceHolder.error} -

- {:else if !session} -

Looking for a device…

- {:else if session.status === "unsupported"} -

{session.error}

- {:else if session.status === "ready" && session.client} -
-

- - Connected - {#if session.info}{session.info.hardwareRevision}{/if} -

- -
- - {#await loadSurfaces()} -

Loading…

- {:then { default: Surfaces }} - - {:catch} - - {/await} - {:else if session.status === "connecting"} -

Connecting…

- {:else} - {#if deviceHolder.interrupted} - - {/if} -
- -

Connect by USB, then choose your device.

-
- {#if session.status === "error" && session.error} - - {/if} - {/if} - {/snippet} - - {#snippet unavailable(reason)} - - {/snippet} - +{#if deviceHolder.error} + +{:else if !session} +

Looking for a device…

+{:else if session.status === "unsupported"} +

{session.error}

+{:else if session.status === "ready" && session.client} +
+

+ + Connected + {#if session.info}{session.info.hardwareRevision}{/if} +

+ +
+ + {#await loadSurfaces()} +

Loading…

+ {:then { default: Surfaces }} + + {:catch} + + {/await} +{:else if session.status === "connecting"} +

Connecting…

+{:else} + {#if deviceHolder.interrupted} + + {/if} +
+ +

Connect by USB, then choose your device.

+
+ {#if session.status === "error" && session.error} + + {/if} +{/if} diff --git a/builder/web/src/components/device/PopMenu.svelte b/builder/web/src/components/device/PopMenu.svelte deleted file mode 100644 index 68e00e3156..0000000000 --- a/builder/web/src/components/device/PopMenu.svelte +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - diff --git a/builder/web/src/components/device/PreviewModal.svelte b/builder/web/src/components/device/PreviewModal.svelte deleted file mode 100644 index f29f99b7d2..0000000000 --- a/builder/web/src/components/device/PreviewModal.svelte +++ /dev/null @@ -1,932 +0,0 @@ - - - - - - - - diff --git a/builder/web/src/components/device/RideExport.svelte b/builder/web/src/components/device/RideExport.svelte index 0c4ba692b5..bca13b876a 100644 --- a/builder/web/src/components/device/RideExport.svelte +++ b/builder/web/src/components/device/RideExport.svelte @@ -23,7 +23,6 @@ --> - -
-
-

Ride library

- - {listed.length} ride{listed.length === 1 ? "" : "s"}{#if totalKm > 0} · {totalKm.toLocaleString()} km - total{/if} - - - - - {#if rides && scope} - - {:else} - Plug the device in to pull new rides. - {/if} - -
- -
-
- {#if error} - - {/if} - - {#if report && report.failed.length > 0} - - {/if} - {#if report && report.recording > 0} -

- {report.recording === 1 ? "One ride is" : `${report.recording} rides are`} still being - recorded on the device and could not be copied. Finish - {report.recording === 1 ? "it" : "them"} there, then pull again. -

- {/if} - - {#if listed.length === 0} -

- No rides here yet. Plug the device in and pull — each ride lands as a GPX file in the - folder above, where you can back it up or drag it into anything that reads GPX. -

- {:else} -
    - {#each listed as ride (ride.key)} - {@const path = trackPath(ride.track, PREVIEW.width, PREVIEW.height)} -
  • (hovered = { key: ride.key, from: "list" })} - onmouseleave={() => (hovered = null)} - > - - - -
  • - {/each} -
- - {#if missingArchive > 0} -

- {missingArchive} ride{missingArchive === 1 ? "" : "s"} listed here - {missingArchive === 1 ? "is" : "are"} no longer on this computer — pull from the - device to restore {missingArchive === 1 ? "it" : "them"}. -

- {/if} - {/if} - - -

- Copying a ride here does not tell the device anything — over the cable a ride is read and - nothing more, so the device still counts every ride as un-copied and keeps it under its own - rules. Check Settings → Rides on the device for how long it keeps one; the - app cannot read that setting. The copies in this folder are yours and are never deleted by - this app. -

- - -
- -
- (hovered = key ? { key, from: "map" } : null)} - onopen={openByKey} - /> -
-
-
- - diff --git a/builder/web/src/components/device/RideMap.svelte b/builder/web/src/components/device/RideMap.svelte deleted file mode 100644 index 4c755dcc2c..0000000000 --- a/builder/web/src/components/device/RideMap.svelte +++ /dev/null @@ -1,209 +0,0 @@ - - - -
- - diff --git a/builder/web/src/components/device/RideTiles.svelte b/builder/web/src/components/device/RideTiles.svelte deleted file mode 100644 index 794575b205..0000000000 --- a/builder/web/src/components/device/RideTiles.svelte +++ /dev/null @@ -1,160 +0,0 @@ - - - -
- {#each rides as ride (ride.objectId)} - {@const recording = isRecording(ride)} - {@const held = heldHere?.has(ride.objectId) ?? false} - onopen(ride)} - > - {#snippet thumb()} - {@const track = trackFor(ride.objectId)} - - - {#snippet tag()} - {#if recording} - recording - {:else if heldHere} - {#if held} - in library - {:else} - not backed up - {/if} - {/if} - {/snippet} - - {/snippet} - -

{nameOf(ride)}

- -

- {recording ? "still on the device" : formatBytes(Number(ride.payloadLength))} -

-
- {#if onpull} - - {/if} -
- {/each} -
- - diff --git a/builder/web/src/components/device/RouteTiles.svelte b/builder/web/src/components/device/RouteTiles.svelte deleted file mode 100644 index 46a243a8e0..0000000000 --- a/builder/web/src/components/device/RouteTiles.svelte +++ /dev/null @@ -1,152 +0,0 @@ - - - -
- {#each routes as route (route.objectId)} - onopen(route)}> - {#snippet thumb()} - {@const track = trackFor(route.objectId)} - - - {/snippet} - - {#if editing && editing.id === route.objectId} - - commitEdit(route)} - onkeydown={(e) => onEditKey(e, route)} - /> - {:else} -

{nameOf(route)}

- {/if} -

{formatBytes(Number(route.payloadLength))}

-
- - - {#each trips as trip (trip.objectId)} - - {/each} - - - -
- {/each} - {@render children?.()} -
- - diff --git a/builder/web/src/components/device/Tile.svelte b/builder/web/src/components/device/Tile.svelte deleted file mode 100644 index e585030211..0000000000 --- a/builder/web/src/components/device/Tile.svelte +++ /dev/null @@ -1,118 +0,0 @@ - - - -
- {@render thumb?.()} -
- {@render children?.()} -
-
- - diff --git a/builder/web/src/components/device/TrackThumb.svelte b/builder/web/src/components/device/TrackThumb.svelte deleted file mode 100644 index 6eeecc39cc..0000000000 --- a/builder/web/src/components/device/TrackThumb.svelte +++ /dev/null @@ -1,127 +0,0 @@ - - - -
- {#if drawn.length > 0} - - {/if} - {#if tag} - {@render tag()} - {/if} -
- - diff --git a/builder/web/src/components/device/TripBand.svelte b/builder/web/src/components/device/TripBand.svelte deleted file mode 100644 index c80edca10d..0000000000 --- a/builder/web/src/components/device/TripBand.svelte +++ /dev/null @@ -1,356 +0,0 @@ - - - -
- -
-
- {#if editing !== null} - - - {:else} -

{name}

- {/if} -

- {#if stageCount !== null}{stageCount} stage{stageCount === 1 ? "" : "s"}{/if} -

- - - - -
- {#if trip.detail === null} -

The trip's stage list could not be read.

- {:else} - {#each stages as stage, index (`${stage.id}-${index}`)} -
- - {#if stage.route} - {@const route = stage.route} - - {:else} - - Route {stage.id} - no longer on the device - - {/if} - - - - - -
- {/each} - {/if} -
-
- - diff --git a/builder/web/src/components/device/TripDropDialog.svelte b/builder/web/src/components/device/TripDropDialog.svelte deleted file mode 100644 index 353f5d7a30..0000000000 --- a/builder/web/src/components/device/TripDropDialog.svelte +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - - - diff --git a/builder/web/src/lib/catalog/client.test.ts b/builder/web/src/lib/catalog/client.test.ts index a93b4218c7..ac94e209cf 100644 --- a/builder/web/src/lib/catalog/client.test.ts +++ b/builder/web/src/lib/catalog/client.test.ts @@ -62,9 +62,9 @@ describe("CatalogClient.load", () => { }); it("refuses a relative URL rather than guessing a base", async () => { - // Resolving one is a host's job: the web host has a `document.baseURI`, - // the desktop host does not, and a client that guessed would resolve a - // CDN path against a Tauri asset scheme. + // Resolving one is a host's job: the web host resolves it against its + // `document.baseURI`, and a client that guessed could resolve a CDN path + // against the wrong base. await expect(CatalogClient.load("./data/catalog.json", { fetchImpl: serving({}).impl })).rejects.toThrow( CatalogFormatError, ); diff --git a/builder/web/src/lib/catalog/client.ts b/builder/web/src/lib/catalog/client.ts index a020c40e49..4d7646ad81 100644 --- a/builder/web/src/lib/catalog/client.ts +++ b/builder/web/src/lib/catalog/client.ts @@ -86,8 +86,8 @@ export class CatalogClient { * Fetch and parse the root. * * `url` must be absolute: resolving a relative one is a host's job — the web host - * has a `document.baseURI`, the desktop host does not — and a client that guessed - * would resolve a CDN path against a Tauri asset scheme. + * resolves it against its `document.baseURI` — and a client that guessed could + * resolve a CDN path against the wrong base. * * The root is fetched on trust, since there is no document above it to pin it, * which is why it is short-cached and everything else is content-addressed. diff --git a/builder/web/src/lib/constants.ts b/builder/web/src/lib/constants.ts index 68d40e60a6..1207ff0874 100644 --- a/builder/web/src/lib/constants.ts +++ b/builder/web/src/lib/constants.ts @@ -6,8 +6,8 @@ * deployed. `VITE_SITE_BASE` is that fact: * * * unset — the default — means the site is somewhere else, so name it - * absolutely. That is the dev server and the desktop app: neither is served - * from the site, and a relative link there would point at nothing. + * absolutely. That is the dev server: it is not served from the site, and a + * relative link there would point at nothing. * * set to a relative prefix (the deploy passes `../`, because the builder is * published at `/builder/` beside `/docs/`) means the site is right here. * Nothing absolute is baked in, so the whole artifact survives the move to a @@ -35,12 +35,9 @@ export const LINKS = { github: "https://github.com/timohueser/OpenBikeComputer", /** * The bundle's own third-party notices, emitted beside it at build time by - * `vite/third-party-licenses.ts` — so it stays relative in every tier, including the - * desktop app, where the file sits next to `index.html` inside the Tauri bundle. + * `vite/third-party-licenses.ts` — so it stays relative in every tier. * `vite dev` has no bundle and therefore no file; the link 404s there by design, * because a stale checked-in copy would be worse than an absent one. */ licenses: "./third-party-licenses.txt", - /** Where the desktop installers are published. */ - releases: "https://github.com/timohueser/OpenBikeComputer/releases", }; diff --git a/builder/web/src/lib/convert/bridge.test.ts b/builder/web/src/lib/convert/bridge.test.ts index 33e3271c7d..c45966af27 100644 --- a/builder/web/src/lib/convert/bridge.test.ts +++ b/builder/web/src/lib/convert/bridge.test.ts @@ -19,7 +19,7 @@ import { dirname, join } from "node:path"; import { fileURLToPath } from "node:url"; import { beforeAll, describe, expect, it } from "vitest"; -import { ConvertError, gpxToObcr, initConvert, routeTrack, routeWaypoints, trackToGpx } from "./bridge"; +import { ConvertError, gpxToObcr, initConvert, routeTrack, trackToGpx } from "./bridge"; /** * The OBCR header's name field, and the GPX ``, are inputs to the conversion, so they have @@ -151,81 +151,6 @@ describe("routeTrack", () => { }); }); -describe("routeWaypoints", () => { - it("reads back the fixture's waypoint table, decoded and in route order", async () => { - // `route-source.gpx` carries two ``s: "Pass Summit" (`Viewpoint` — - // deliberately unmapped, so generic) and "Brunnen" (`Drinking Water` → water). - const wps = await routeWaypoints(vector("route-waypoints.obcr")); - expect(wps.map((w) => w.name).sort()).toEqual(["Brunnen", "Pass Summit"]); - for (let i = 1; i < wps.length; i++) { - expect(wps[i].distAlongM).toBeGreaterThanOrEqual(wps[i - 1].distAlongM); - } - - const brunnen = wps.find((w) => w.name === "Brunnen")!; - expect(brunnen.category).toBe(1); - expect(brunnen.ele).toBe(238); - expect(brunnen.lat).toBeCloseTo(48.0001, 4); - expect(brunnen.lon).toBeCloseTo(7.8201, 4); - - const summit = wps.find((w) => w.name === "Pass Summit")!; - expect(summit.category).toBe(0); - expect(summit.ele).toBeNull(); - - // The absolute distances, not just their order — the modal's `km x.y` labels rest on - // this field. The fixture is byte-pinned, so these are exact stored `uint32` metres: - // Brunnen anchors at the first raw track point, the summit ~1.7 km in. - expect(brunnen.distAlongM).toBe(0); - expect(summit.distAlongM).toBe(1700); - }); - - it("agrees with a fresh conversion of the same GPX", async () => { - // The other way the device gets waypoints: `gpxToObcr` on a GPX with ``s. The - // fixture is byte-pinned to that conversion above, so the tables must agree exactly. - const gpx = text("host/obc-vectors/src/route-source.gpx"); - const obcr = await gpxToObcr(new TextEncoder().encode(gpx), ROUTE_NAME, 0); - expect(await routeWaypoints(obcr)).toEqual(await routeWaypoints(vector("route-waypoints.obcr"))); - }); - - it("resolves to an empty list for a route without waypoints", async () => { - expect(await routeWaypoints(vector("route-plain.obcr"))).toEqual([]); - }); - - it("refuses bytes that are not a route, with the stable code", async () => { - const failure = await routeWaypoints(new Uint8Array(200)).catch((e: unknown) => e); - expect(failure).toBeInstanceOf(ConvertError); - expect((failure as ConvertError).code).toBe("not-route"); - }); -}); - -describe("captured planner exports", () => { - /** - * `fixtures/sources/route-import/` holds the real files, with their provenance and licence. The - * names and the order below are the list `obc-route` and `obc-app` assert on the same bytes, so - * a browser import and a device import agree on what a planner actually sent. - */ - it("reads the komoot export's waypoints the way the Rust importer does", async () => { - const gpx = text("fixtures/sources/route-import/komoot-schwarzwald.gpx"); - const obcr = await gpxToObcr(new TextEncoder().encode(gpx), "Schwarzwald", 0); - const wps = await routeWaypoints(obcr); - - expect(wps.length).toBe(gpx.split(" w.name)).toEqual([ - "Steiler Abschnitt auf de", - "Freudenst\u00e4dter Wasserfo", - "Feuerstelle Schmidsberge", - "Blick auf die Landschaft", - "Fuxxbau", - ]); - // `Restaurant` is resupply; `Fishing Hot Spot Facility` has no home among the six and stays - // generic instead of being dropped or forced into the nearest one. - expect(wps.map((w) => w.category)).toEqual([0, 0, 0, 0, 4]); - for (let i = 1; i < wps.length; i++) { - expect(wps[i].distAlongM).toBeGreaterThanOrEqual(wps[i - 1].distAlongM); - } - }); -}); - describe("failures", () => { const bytes = (s: string): Uint8Array => new TextEncoder().encode(s); diff --git a/builder/web/src/lib/convert/bridge.ts b/builder/web/src/lib/convert/bridge.ts index a00ce9bd7b..91cdac2309 100644 --- a/builder/web/src/lib/convert/bridge.ts +++ b/builder/web/src/lib/convert/bridge.ts @@ -137,48 +137,6 @@ export async function routeTrack(obcr: Uint8Array): Promise { return points; } -/** - * One waypoint of a route: a point of interest pinned along the track, with the position it was - * pinned at. - */ -export interface RouteWaypoint { - /** The stored short name (≤ 24 UTF-8 bytes; may be empty). */ - readonly name: string; - /** The waypoint's own coordinate, degrees — may sit off the polyline. */ - readonly lat: number; - readonly lon: number; - /** Metres, or null where the source carried none. */ - readonly ele: number | null; - /** The stored category byte raw: 0 = generic, 1..=6 the POI category ids. Render anything else - * as generic. */ - readonly category: number; - /** Metres from the route start to the waypoint's position on the track — the stored - * placement-time distance, not a recomputation. */ - readonly distAlongM: number; -} - -/** - * Read a `.obcr` route's waypoint table back out, in route order (ascending {@link - * RouteWaypoint.distAlongM}). A route without waypoints resolves to `[]`. - * - * @throws {ConvertError} with an actionable message; see {@link ConvertErrorCode}. - */ -export async function routeWaypoints(obcr: Uint8Array): Promise { - const mod = await ensure(); - let raw: unknown[]; - try { - raw = mod.obc_convert_obcr_to_waypoints(obcr); - } catch (cause) { - throw asConvertError(cause); - } - // The wasm side builds these objects field by field, so the cast is a statement about that code - // rather than about arbitrary input; the copy keeps the result plain-JS-owned. - return raw.map((entry) => { - const w = entry as RouteWaypoint; - return { name: w.name, lat: w.lat, lon: w.lon, ele: w.ele, category: w.category, distAlongM: w.distAlongM }; - }); -} - function ensure(): Promise { return load(); } diff --git a/builder/web/src/lib/desktop/invoke.ts b/builder/web/src/lib/desktop/invoke.ts deleted file mode 100644 index f9eda97fd9..0000000000 --- a/builder/web/src/lib/desktop/invoke.ts +++ /dev/null @@ -1,176 +0,0 @@ -// The desktop host's transport: Tauri commands. Only the desktop platform and -// native device/library adapters import it, so it never reaches the other two -// bundles. -// -// Every function here is one `invoke()`. The names are the Rust command names in -// builder/desktop/src/main.rs, and the argument shapes are what serde deserializes -// there; that is the whole contract, and it is worth keeping in one file so a rename -// is one place on each side. - -import { invoke, type Channel } from "@tauri-apps/api/core"; - -/** The catalog manifest, plus the URL relative references resolve against. */ -export interface FetchedCatalog { - url: string; - body: string; -} - -export interface OpenedMapOutput { - id: number; - path: string; -} - -// The Rust side moves bytes and nothing else; the protocol is the TS client, the same -// one the hosted site runs. See builder/desktop/src/usb/ for the plane split and why -// the two binary calls below do not go through JSON. - -/** Which endpoint pair a call means — `DeviceLink`'s two members, by name. */ -export type UsbPlane = "control" | "bulk"; -/** Which half of a pair to cancel. Omitted means both. */ -export type UsbDir = "in" | "out"; - -/** A device the backend is willing to open. `id` is opaque: never parse it. */ -export interface UsbDeviceSummary { - id: string; - vendorId: number; - productId: number; - product: string | null; - serialNumber: string | null; -} - -/** Hot-plug, as the backend reports it. `watchFailed` is not a device problem — it - * means the OS notification stream itself is gone, and a watch that died quietly is - * indistinguishable from "nothing is ever plugged in". */ -export type UsbEvent = - | { type: "connected"; device: UsbDeviceSummary } - | { type: "disconnected"; id: string } - | { type: "watchFailed"; message: string }; - -/** What `usb_open` hands back: the handle every later call carries, plus the two - * planes' packet sizes. */ -export interface UsbLinkInfo { - handle: number; - deviceId: string; - interfaceNumber: number; - controlPacketSize: number; - bulkPacketSize: number; - product: string | null; - serialNumber: string | null; -} - -/** A transport failure in `PipeError`'s own vocabulary. Tauri rejects with the - * serialized `Err` value, so this arrives as a plain object rather than an `Error`. */ -export interface UsbFault { - code: string; - message: string; -} - -export const desktop = { - catalog: () => invoke("catalog"), - /** Raw response path: catalog cells can be hundreds of MB, so a JSON byte array is - * not an acceptable transport. Rust restricts this to the configured catalog - * origin. */ - catalogGet: (url: string) => invoke("catalog_get", { url }), - mapOutputBegin: (name: string) => invoke("map_output_begin", { name }), - mapOutputWrite: (id: number, name: string, bytes: Uint8Array) => - invoke("map_output_write", bytes, { - headers: { "output-id": String(id), filename: name }, - }), - mapOutputFinish: (id: number) => invoke("map_output_finish", { id }), - mapOutputDiscard: (id: number) => invoke("map_output_discard", { id }), - - revealFile: (path: string) => invoke("reveal_file", { path }), - - usbWatch: (onEvent: Channel) => invoke("usb_watch", { onEvent }), - usbList: () => invoke("usb_list"), - usbOpen: (deviceId: string) => invoke("usb_open", { deviceId }), - usbClose: (handle: number) => invoke("usb_close", { handle }), - - /** One transfer off a plane's IN endpoint. Resolves to an `ArrayBuffer`: the - * command returns `tauri::ipc::Response`, which is Tauri's raw path. */ - usbRead: (handle: number, plane: UsbPlane) => invoke("usb_read", { handle, plane }), - - /** - * One transfer onto a plane's OUT endpoint. - * - * The bytes are the *whole* invoke body — that is what makes them raw rather than a - * JSON array of numbers, roughly 4 bytes of text per byte — so the handle and the - * plane have nowhere to go but headers. - */ - usbWrite: (handle: number, plane: UsbPlane, bytes: Uint8Array) => - invoke("usb_write", bytes, { headers: { handle: String(handle), plane } }), - - usbCancel: (handle: number, plane: UsbPlane, dir?: UsbDir) => - invoke("usb_cancel", { handle, plane, dir: dir ?? null }), - usbReset: (handle: number, plane: UsbPlane) => invoke("usb_reset", { handle, plane }), - - // `ridesImport` is the one command in this file whose *timing* is part of a - // contract: it resolves after the ride object, the GPX and the index have each been - // fsynced, which is what makes `PullReport` true. See builder/desktop/src/rides.rs. - - ridesIndex: () => invoke("rides_index"), - ridesImport: (request: RideImportRequest) => invoke("rides_import", { request }), - /** The stored ride object. Raw, like `usbRead` — a JSON number array would be 4× the bytes. */ - ridesRead: (key: string) => invoke("rides_read", { key }), - ridesWriteGpx: (key: string, gpx: string) => invoke("rides_write_gpx", { key, gpx }), - /** Opens the OS folder chooser and moves the library. `null` when it was dismissed. */ - ridesChooseFolder: () => invoke("rides_choose_folder"), -}; - -// Field for field what `serde` reads and writes in builder/desktop/src/rides.rs. -// `lib/device/library.ts` owns the app-facing shapes; these are the wire ones. -// StoreId is full lowercase hex; ObjectId is a decimal u64 string, to keep JSON -// precision. - -export interface RideIndexEntry { - key: string; - serial: string; - storeId: string; - objectId: string; - name: string; - startTime: number; - distanceM: number; - movingTimeS: number; - climbM: number; - points: number; - bytes: number; - crc32: number; - importedAt: number; - /** Basenames — what the index stores, because the folder can move. */ - rideFile: string; - gpxFile: string; - track: Array<[number, number]>; - /** The basenames joined to the current folder, by the side that owns a path separator. */ - ridePath: string; - gpxPath: string; - /** Recomputed against the filesystem on every read, never trusted from the index. */ - present: boolean; - gpxPresent: boolean; -} - -export interface RideIndexView { - folder: string; - isDefault: boolean; - rides: RideIndexEntry[]; -} - -export interface RideImportRequest { - serial: string; - storeId: string; - objectId: string; - name: string; - startTime: number; - distanceM: number; - movingTimeS: number; - climbM: number; - points: number; - crc32: number; - track: Array<[number, number]>; - object: number[]; - gpx: string; -} - -export interface RideImported { - ride: RideIndexEntry; - imported: boolean; -} diff --git a/builder/web/src/lib/desktop/library.test.ts b/builder/web/src/lib/desktop/library.test.ts deleted file mode 100644 index b1dc655edb..0000000000 --- a/builder/web/src/lib/desktop/library.test.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { describe, expect, it, vi } from "vitest"; -import { openRideLibrary } from "./library"; -import { desktop, type RideIndexEntry } from "./invoke"; - -vi.mock("./invoke", () => ({ - desktop: { ridesIndex: vi.fn(), ridesImport: vi.fn() }, -})); - -describe("desktop ride identity at the JSON boundary", () => { - it("uses decimal strings in both directions and bigint in the library", async () => { - const library = openRideLibrary(); - for (const storeId of ["a1b2c3d4000000000000000000000000", "a1b2c3d4000000000000000000000001"]) { - for (const objectId of [65536n, 9007199254740993n, 18446744073709551615n]) { - const key = `OBC-24-000317:${storeId}:${objectId}`; - const entry: RideIndexEntry = { - key, serial: "OBC-24-000317", storeId, objectId: objectId.toString(), - name: "Ride", startTime: 0, distanceM: 0, movingTimeS: 0, climbM: 0, - points: 1, bytes: 3, crc32: 0, importedAt: 1, - rideFile: "ride.obcride", gpxFile: "ride.gpx", - ridePath: "/archive/ride.obcride", gpxPath: "/rides/ride.gpx", - track: [], present: true, gpxPresent: true, - }; - vi.mocked(desktop.ridesImport).mockImplementation(async (request) => { - const json = JSON.parse(JSON.stringify(request)); - expect(json.storeId).toBe(storeId); - expect(json.objectId).toBe(objectId.toString()); - return JSON.parse(JSON.stringify({ ride: entry, imported: true })); - }); - const imported = await library.import({ - ...entry, objectId, object: new Uint8Array([1, 2, 3]), gpx: "", - }); - expect(imported.ride.key).toBe(key); - expect(imported.ride.storeId).toBe(storeId); - expect(imported.ride.objectId).toBe(objectId); - - vi.mocked(desktop.ridesIndex).mockResolvedValue( - JSON.parse(JSON.stringify({ folder: "/rides", isDefault: true, rides: [entry] })), - ); - expect((await library.view()).rides[0]).toEqual(imported.ride); - } - } - }); -}); diff --git a/builder/web/src/lib/desktop/library.ts b/builder/web/src/lib/desktop/library.ts deleted file mode 100644 index 82657202e3..0000000000 --- a/builder/web/src/lib/desktop/library.ts +++ /dev/null @@ -1,95 +0,0 @@ -/** - * The desktop host's ride library: `lib/device/library.ts`'s {@link RideLibrary} over six Tauri - * commands. - * - * Deliberately thin. Everything that decides whether this feature is correct is in - * `lib/device/library.ts`, over this interface, where it is tested against a fake that is not a mock - * of these calls. What lives here is the translation between the app's shapes and `serde`'s, and one - * decision worth stating: - * - * **`import()` is awaited for its timing, not just its value.** The Rust side writes the ride - * object, the GPX and the index, fsyncing each and the directory entry, and only then resolves. - * Nothing here may be made "fire and forget" for responsiveness — that would turn a durability - * predicate into an optimistic one, which is the single way this feature can lose a rider's ride. - */ - -import { desktop, type RideIndexEntry } from "./invoke"; -import type { LibraryRide, LibraryView, RideImport, RideLibrary } from "../device/library"; - -/** - * `RideIndexEntry` → `LibraryRide`. - * - * Convert the JSON decimal ObjectId to bigint. The wire carries `rideFile`/`gpxFile` as *basenames* - * plus the joined absolute paths, because a basename is what the index stores — the GPX folder can - * move — and a path is what `reveal()` needs, and joining them in JavaScript would have to guess a - * path separator. The two paths point at different roots: `ridePath` into the internal archive under - * app data, `gpxPath` into the visible folder. - */ -function toRide(entry: RideIndexEntry): LibraryRide { - return { - key: entry.key, - serial: entry.serial, - storeId: entry.storeId, - objectId: BigInt(entry.objectId), - name: entry.name, - startTime: entry.startTime, - distanceM: entry.distanceM, - movingTimeS: entry.movingTimeS, - climbM: entry.climbM, - points: entry.points, - bytes: entry.bytes, - crc32: entry.crc32, - importedAt: entry.importedAt, - ridePath: entry.ridePath, - gpxPath: entry.gpxPath, - track: entry.track, - present: entry.present, - gpxPresent: entry.gpxPresent, - }; -} - -export function openRideLibrary(): RideLibrary { - return { - async view(): Promise { - const view = await desktop.ridesIndex(); - return { - folder: view.folder, - isDefault: view.isDefault, - rides: view.rides.map(toRide), - }; - }, - - async import(ride: RideImport) { - const landed = await desktop.ridesImport({ - serial: ride.serial, - storeId: ride.storeId, - objectId: ride.objectId.toString(), - name: ride.name, - startTime: ride.startTime, - distanceM: ride.distanceM, - movingTimeS: ride.movingTimeS, - climbM: ride.climbM, - points: ride.points, - crc32: ride.crc32, - track: ride.track.map((p) => [p[0], p[1]] as [number, number]), - // The one place this host pays the JSON tax on binary. A ride object is hundreds of - // kilobytes, written exactly once per ride, behind a transfer that already took - // longer than the encode will. - object: Array.from(ride.object), - gpx: ride.gpx, - }); - return { ride: toRide(landed.ride), imported: landed.imported }; - }, - - // USB carries no possession acknowledgement: it changes no object, so it keeps the BLE - // surface it had. - - async readObject(key: string): Promise { - return new Uint8Array(await desktop.ridesRead(key)); - }, - - writeGpx: (key: string, gpx: string) => desktop.ridesWriteGpx(key, gpx), - reveal: (path: string) => desktop.revealFile(path), - chooseFolder: () => desktop.ridesChooseFolder(), - }; -} diff --git a/builder/web/src/lib/desktop/release.test.ts b/builder/web/src/lib/desktop/release.test.ts deleted file mode 100644 index b679ed8f0f..0000000000 --- a/builder/web/src/lib/desktop/release.test.ts +++ /dev/null @@ -1,38 +0,0 @@ -// A ratchet, not a test of today: `RELEASE` is null until the first installers are -// published, so the body below runs zero assertions right now — on -// purpose. The moment there is a build, these are the things that have to be -// true of it, and a missing checksum or a placeholder URL fails here instead of -// on someone's machine. The one assertion that always runs pins that the page -// has an honest empty state to fall back on. - -import { describe, expect, it } from "vitest"; -import { RELEASE } from "./release"; - -describe("the desktop release", () => { - it("either exists or is null — never a half-filled record", () => { - expect(RELEASE === null || typeof RELEASE === "object").toBe(true); - }); - - it("offers a real, checksummed file per platform", () => { - if (!RELEASE) return; - expect(RELEASE.version).toMatch(/\S/); - expect(RELEASE.date).toMatch(/^\d{4}-\d{2}-\d{2}$/); - expect(RELEASE.downloads.length).toBeGreaterThan(0); - - const seen = new Set(); - for (const file of RELEASE.downloads) { - expect(file.url).toMatch(/^https:\/\//); - expect(file.filename).toMatch(/\S/); - expect(file.size).toBeGreaterThan(0); - expect(file.sha256).toMatch(/^[0-9a-f]{64}$/); - const key = `${file.os} ${file.arch ?? ""}`; - expect(seen.has(key)).toBe(false); - seen.add(key); - } - }); - - it("writes the install note as instructions, not an apology", () => { - if (!RELEASE?.installNote) return; - expect(RELEASE.installNote).not.toMatch(/!|sorry|unfortunately|afraid|apolog/i); - }); -}); diff --git a/builder/web/src/lib/desktop/release.ts b/builder/web/src/lib/desktop/release.ts deleted file mode 100644 index fafef277f2..0000000000 --- a/builder/web/src/lib/desktop/release.ts +++ /dev/null @@ -1,36 +0,0 @@ -// What the desktop page offers to download. Until the installers are built, -// signed and published, `RELEASE` is null and the page says there are no builds -// yet rather than linking at files that do not exist. Inventing a URL now would -// cost a visitor a 404 and cost us the one thing the page is for. - -export interface DesktopDownload { - readonly os: "macOS" | "Windows" | "Linux"; - /** Only where one OS ships more than one build (`Apple silicon`, `x86-64`). */ - readonly arch?: string; - readonly filename: string; - readonly url: string; - /** Bytes, for the size shown next to the button. */ - readonly size: number; - /** Lowercase hex, 64 chars. Shown in full: a checksum you have to expand to - * read is a checksum nobody checks. */ - readonly sha256: string; -} - -export interface DesktopRelease { - readonly version: string; - /** ISO date, `YYYY-MM-DD`. */ - readonly date: string; - readonly downloads: readonly DesktopDownload[]; - /** - * Set only if D3 ships unsigned builds, and written as **instructions**: - * what to click, in what order, in the imperative. "Right-click the app and - * choose Open, then confirm" — not "unfortunately macOS will warn you that - * …". The page renders it under a *First run* heading, so it needs no - * preamble explaining that something is about to be awkward. - */ - readonly installNote?: string; -} - -/** Filled in once the installers are published. `src/lib/desktop/release.test.ts` holds it to - * its shape from then on. */ -export const RELEASE: DesktopRelease | null = null; diff --git a/builder/web/src/lib/desktop/usb.svelte.ts b/builder/web/src/lib/desktop/usb.svelte.ts deleted file mode 100644 index b08b46acd8..0000000000 --- a/builder/web/src/lib/desktop/usb.svelte.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * The desktop host's device session — the reactive shell C3 already wrote, over a native watcher. - * - * This file is three lines of substance on purpose. `WatchedDeviceSession` mirrors any - * `DeviceWatcher`'s snapshots into runes, and `NativeWatcher` has the same three methods - * `WebUsbWatcher` does, so the entire desktop USB session is "the same session, different - * transport". If this file ever needs to grow a branch, the seam has stopped holding. - */ - -import { WatchedDeviceSession } from "../usb/session.svelte"; -import type { DeviceSession } from "../usb/session"; -import { NativeWatcher, type NativeWatcherOptions } from "./usb"; - -/** - * Open a native USB session and adopt an attached device if there is one. - * - * Returns as soon as the adopt attempt has settled — with a live client when a device was found and - * `idle` when none was. Neither is a failure: the session's job is to be something the UI can - * render in every state, including "nothing is plugged in yet". - * - * There is no `unsupported` state to reach here. That one means "this browser has no WebUSB", and - * not having to say it is the reason this tier exists. - */ -export async function openNativeSession(options: NativeWatcherOptions = {}): Promise { - const watcher = new NativeWatcher(options); - const session = new WatchedDeviceSession(watcher, "native"); - await watcher.start(); - return session; -} diff --git a/builder/web/src/lib/desktop/usb.test.ts b/builder/web/src/lib/desktop/usb.test.ts deleted file mode 100644 index d676d4a23a..0000000000 --- a/builder/web/src/lib/desktop/usb.test.ts +++ /dev/null @@ -1,683 +0,0 @@ -/** - * The native transport, driven end to end. - * - * There is no device in CI, so the substitution is made at exactly one place: the **Tauri command - * boundary**. Everything above it — `NativePipe`, `NativeWatcher`, `FlatStoreClient`, the record - * framing, the codecs, the CRC — is the shipping code, and the fake backend below stands in for - * `builder/desktop/src/usb/`, forwarding to the simulated device. - * - * That leaves two things a fake can prove: that a real fixture object round-trips through the real - * client over the native pipes byte for byte, with the device verifying the whole-object CRC, and - * that the transport properties hold — a read is not a record, a zero-length packet is a marker and - * not data, concurrent writes keep submission order, cancellation reaches the transport, and an - * unplug settles pending calls. - * - * A third is an absence: this host has no EP0 vendor request, which is asserted rather than worked - * around, because a connection that invented a firmware revision would feed "an update is - * available" a lie. - * - * Nothing here proves anything about `nusb`, the OS or the descriptors. - */ - -import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { existsSync, readFileSync } from "node:fs"; -import { dirname, join } from "node:path"; -import { fileURLToPath } from "node:url"; - -import { FlatStoreClient } from "../usb/client"; -import { Crc32 } from "../usb/crc32"; -import { loadFlatDevice } from "../../../test-support/flat-device/load"; -import { FlatDevice, type FlatDeviceOptions } from "../usb/flat-device"; -import { loopbackLink, type LoopbackLink, type LoopbackOptions } from "../usb/loopback"; -import { PipeError, type BytePipe } from "../usb/pipe"; -import { MAX_HOST_STREAM_RECORD } from "../usb/records"; -import { HEAD_REVISION, ObjectKind } from "../usb/protocol"; - -/** One `invoke()` the fake backend saw, for the wire assertions. */ -interface Call { - cmd: string; - args: unknown; - options?: { headers?: Record }; -} - -class FakeChannel { - onmessage: ((message: T) => void) | null = null; -} - -const calls: Call[] = []; -/** Set per test: what `usb_watch` / `usb_list` report is attached. */ -let attached: Array<{ - id: string; - vendorId: number; - productId: number; - product: string | null; - serialNumber: string | null; -}> = []; -/** The hot-plug channel the watcher handed `usb_watch` — a test pushes plug events through it. */ -let watchChannel: FakeChannel | null = null; -let wire: LoopbackLink | null = null; -let device: FlatDevice | null = null; -/** Whether `usb_open` should refuse, and with what. `onlyId` scopes the fault to one device. */ -let openFault: { code: string; message: string; onlyId?: string } | null = null; -/** Gates shifted per `usb_open` call — an entry parks that open until its promise resolves, - * which is how a test freezes one connect flow mid-open while another overtakes it. */ -let openGates: Array<(() => Promise) | undefined> = []; -/** Per-call gates for `usb_write` on the stream plane, modelling the backend's free ordering of - * concurrent invokes. */ -let writeGates: Array<(() => Promise) | undefined> = []; -/** In-flight reads/writes, so `usb_cancel` can settle them the way a cancelled URB does. */ -const inFlight = new Map(); - -/** - * The backend's plane name → the channel the protocol gives it. `"bulk"` is `DeviceLink.stream` - * under the Rust side's older name for the endpoint pair; renaming it is a Rust change. - */ -function planeOf(name: string): BytePipe { - const link = wire?.host; - if (!link) throw { code: "closed", message: "no link" }; - return name === "control" ? link.control : link.stream; -} - -async function backend(cmd: string, args: unknown, options?: { headers?: Record }): Promise { - const a = (args ?? {}) as Record; - switch (cmd) { - case "usb_watch": - watchChannel = a.onEvent as FakeChannel; - return attached; - case "usb_list": - return attached; - case "usb_open": { - const gate = openGates.shift(); - if (gate) await gate(); - if (openFault && (!openFault.onlyId || openFault.onlyId === a.deviceId)) throw openFault; - const found = attached.find((d) => d.id === a.deviceId); - if (!found) throw { code: "closed", message: "That device is no longer attached." }; - return { - handle: 1, - deviceId: found.id, - interfaceNumber: 0, - controlPacketSize: 512, - bulkPacketSize: 512, - product: found.product, - serialNumber: found.serialNumber, - }; - } - case "usb_close": - await wire?.host.close(); - return null; - case "usb_read": { - const key = `${a.plane}:in`; - const controller = new AbortController(); - inFlight.set(key, controller); - try { - const bytes = await planeOf(a.plane as string).read(controller.signal); - return bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength); - } catch (cause) { - throw asFault(cause); - } finally { - inFlight.delete(key); - } - } - case "usb_write": { - // The real command takes the bytes as the whole invoke body, with the handle and plane - // in headers — which is exactly what is asserted here rather than assumed. - const plane = options?.headers?.plane ?? ""; - if (plane === "bulk") { - const gate = writeGates.shift(); - if (gate) await gate(); - } - const key = `${plane}:out`; - const controller = new AbortController(); - inFlight.set(key, controller); - try { - await planeOf(plane).write(new Uint8Array(args as ArrayBufferLike), controller.signal); - return null; - } catch (cause) { - throw asFault(cause); - } finally { - inFlight.delete(key); - } - } - case "usb_cancel": { - const dirs = a.dir ? [a.dir as string] : ["in", "out"]; - for (const dir of dirs) inFlight.get(`${a.plane}:${dir}`)?.abort(); - return null; - } - case "usb_reset": - await planeOf(a.plane as string).reset(); - return null; - default: - throw new Error(`the fake backend has no command ${cmd}`); - } -} - -/** Translate the loopback's `PipeError` into the `{code, message}` the Rust side rejects with. */ -function asFault(cause: unknown): { code: string; message: string } { - if (cause instanceof PipeError) return { code: cause.code, message: cause.message }; - return { code: "device-error", message: String(cause) }; -} - -vi.mock("@tauri-apps/api/core", () => ({ - invoke: (cmd: string, args?: unknown, options?: { headers?: Record }) => { - calls.push({ cmd, args, options }); - return backend(cmd, args, options); - }, - Channel: FakeChannel, -})); - -const { NativeWatcher, openNativeLink } = await import("./usb"); - -function repoRoot(): string { - let dir = dirname(fileURLToPath(import.meta.url)); - for (let up = 0; up < 12; up++) { - if (existsSync(join(dir, "specs", "vectors", "manifest.json"))) return dir; - dir = dirname(dir); - } - throw new Error("could not locate the repo root"); -} -const ROOT = repoRoot(); -const vector = (name: string): Uint8Array => new Uint8Array(readFileSync(join(ROOT, "specs/vectors", name))); - -const DEVICE = { - id: "usb#1", - vendorId: 0x1209, - productId: 0x0001, - product: "OpenBikeComputer", - serialNumber: "0011223344556677", -}; -const DEVICE_B = { - id: "usb#2", - vendorId: 0x1209, - productId: 0x0001, - product: "OpenBikeComputer", - serialNumber: "8877665544332211", -}; - -/** A live simulated device behind the fake backend, and a watcher already connected to it. */ -async function connected(options: LoopbackOptions & FlatDeviceOptions = {}) { - wire = loopbackLink(options); - device = new FlatDevice(wire.device, options); - void device.run(); - attached = [DEVICE]; - const watcher = new NativeWatcher(); - const ok = await watcher.start(); - return { watcher, ok }; -} - -beforeAll(loadFlatDevice); - -beforeEach(() => { - calls.length = 0; - attached = []; - watchChannel = null; - openFault = null; - openGates = []; - writeGates = []; - inFlight.clear(); - wire = null; - device = null; -}); - -// Each test moves an object through the wasm flat device, which a machine that runs other suites slows past 5 s. -describe("the native pipes under the flat-store client", { timeout: 30_000 }, () => { - it("round-trips a specs/vectors object, byte for byte", async () => { - // 64-byte packets, so every record of any size spans several transfers in both directions. A - // client that treated one `usb_read` as one record would pass against a device that wrote - // whole records and fail here, which is the whole reason the loopback re-slices. - const { watcher, ok } = await connected({ packetSize: 64 }); - expect(ok).toBe(true); - const client = watcher.current.client!; - expect(watcher.current.status).toBe("ready"); - // The `LIST` every connection issues first is where the card's identity comes from. - expect(watcher.current.store).toEqual({ storeId: device!.storeId, commitSequence: device!.sequence }); - - // A `PUT` of a real OBCR fixture: the request over the control channel, the payload as - // stream records, and the device verifying the whole-object CRC at commit. The device is the - // one checking, so a mis-framed record fails here rather than being "uploaded". - const obcr = vector("route-waypoints.obcr"); - const put = await client.put({ kind: ObjectKind.Route, displayName: "waypoints" }, obcr); - expect(put.payloadLength).toBe(BigInt(obcr.length)); - expect(put.payloadCrc32).toBe(Crc32.of(obcr)); - expect(device!.payloadOf(put.objectId)).toEqual(obcr); - - // …and a `GET` in the other direction, whose length and CRC this side verifies. - const got = await client.get({ objectId: put.objectId, revision: HEAD_REVISION }); - expect(got.bytes).toEqual(obcr); - expect(got.revisionServed).toBe(put.revision); - - // The catalog, paged over the same channel, now names it. - const catalog = await client.list(); - expect(catalog.entries.map((e) => e.objectId)).toContain(put.objectId); - expect(catalog.entries.find((e) => e.objectId === put.objectId)?.displayName).toBe("waypoints"); - - await watcher.close(); - }); - - it("keeps concurrent stream writes in submission order across the bridge", async () => { - // The backend gives concurrent invokes no ordering guarantee — each lands in its own task - // racing for the endpoint lock. Delaying the first stream invoke a few ticks models the race: - // without the pipe's submission chain the second batch reaches the wire first and the object - // arrives with its middle swapped — right total length, wrong whole-object CRC. - const { watcher, ok } = await connected(); - expect(ok).toBe(true); - const client = watcher.current.client!; - // Big enough that the upload keeps several batches in its window, plus an odd tail. - const bytes = new Uint8Array(200_003); - for (let i = 0; i < bytes.length; i++) bytes[i] = (i * 31 + (i >> 9)) & 0xff; - writeGates.push(() => new Promise((resolve) => setTimeout(resolve, 10))); - const put = await client.put({ kind: ObjectKind.MapShard, displayName: "black forest" }, bytes); - expect(put.payloadCrc32).toBe(Crc32.of(bytes)); - expect(device!.payloadOf(put.objectId)).toEqual(bytes); - await watcher.close(); - }); -}); - -describe("the native pipe's transport contract", () => { - it("puts the bytes in a raw body and the routing in headers", async () => { - const { watcher } = await connected(); - const write = calls.find((c) => c.cmd === "usb_write"); - // A `Vec` argument would have been JSON — about four bytes of text per byte of payload, - // which is fine for a 32-byte `LIST` and absurd for a 300 MB map. - expect(write?.args).toBeInstanceOf(Uint8Array); - expect(write?.options?.headers).toEqual({ handle: "1", plane: "control" }); - const read = calls.find((c) => c.cmd === "usb_read"); - expect(read?.args).toEqual({ handle: 1, plane: "control" }); - await watcher.close(); - }); - - it("sends a record that spans packets instead of refusing it", async () => { - // A record is self-delimiting — a `record_length u32`, frame bytes and alignment padding, - // across as many packets as it takes — so the ordinary 8,208-byte stream frame has to go out, - // and so does a control record that lands on the 512-byte boundary. - wire = loopbackLink(); - attached = [DEVICE]; - const link = await openNativeLink(DEVICE.id); - const stream = Uint8Array.from({ length: MAX_HOST_STREAM_RECORD }, (_, i) => (i * 13) & 0xff); - await link.stream.write(stream); - expect(await drain(wire.device.stream, stream.length)).toEqual(stream); - - const control = new Uint8Array(512).fill(0xa5); - await link.control.write(control); - expect(await drain(wire.device.control, control.length)).toEqual(control); - await link.close(); - }); - - it("cancels at the transport rather than merely releasing the caller", async () => { - const { watcher } = await connected(); - const link = await openNativeLink(DEVICE.id); - const abort = new AbortController(); - const read = link.stream.read(abort.signal); - // Nothing is queued on the stream plane, so this read is genuinely parked — the case that - // wedges if a cancel only settles the promise: the backend would still hold the endpoint and - // the next read would queue behind an orphan that never completes. - await Promise.resolve(); - abort.abort(); - await expect(read).rejects.toMatchObject({ name: "PipeError", code: "aborted" }); - expect(calls.some((c) => c.cmd === "usb_cancel")).toBe(true); - await watcher.close(); - }); - - it("settles everything parked on it the moment the device is unplugged", async () => { - const { watcher } = await connected(); - const link = await openNativeLink(DEVICE.id); - const read = link.stream.read(); - link.disconnected(); - await expect(read).rejects.toMatchObject({ code: "closed" }); - // …and stays closed: a later call fails immediately instead of making another doomed round - // trip, which is the difference between one error message and a stuck spinner. - await expect(link.stream.read()).rejects.toMatchObject({ code: "closed" }); - - // The abandoned command settles *after* the caller was failed by the unplug, so its - // rejection lands on nobody. It must stay harmless: no second error, no resurrected pipe, and - // a `close()` afterwards that still works on a link whose device is already gone. - await wire!.host.close(); - await new Promise((resolve) => setTimeout(resolve, 10)); - expect(link.stream.open).toBe(false); - await watcher.close(); - }); -}); - -/** Read `total` bytes off a loopback end, which delivers them one packet at a time. */ -async function drain(pipe: BytePipe, total: number): Promise { - const out = new Uint8Array(total); - let at = 0; - while (at < total) { - const slice = await pipe.read(); - out.set(slice, at); - at += slice.length; - } - return out; -} - -// --- the device info this host cannot ask for ---------------------------------- - -describe("the device info this host cannot read", () => { - it("says so rather than answering with a version nobody read off the device", async () => { - // `GET_DEVICE_INFO` is an EP0 vendor request and the Rust bridge exposes no - // control-transfer command, so the link omits `vendorIn` entirely. The client turns that - // absence into one specific code, which is what the connect flow catches. - wire = loopbackLink(); - attached = [DEVICE]; - const link = await openNativeLink(DEVICE.id); - expect(link.vendorIn, "a link that cannot issue EP0 must not pretend to").toBeUndefined(); - const client = new FlatStoreClient(link); - await expect(client.deviceInfo()).rejects.toMatchObject({ name: "DeviceError", code: "unavailable" }); - await client.close(); - }); - - it("connects anyway, publishing no firmware version at all", async () => { - // The alternative — failing the connection, or filling the field with a plausible number — - // would either strand the desktop tier or hand "an update is available" a lie. `null` is the - // honest third answer, and the UI renders the absence. - const { watcher, ok } = await connected(); - expect(ok).toBe(true); - expect(watcher.current.status).toBe("ready"); - expect(watcher.current.info).toBeNull(); - expect(watcher.current.store).not.toBeNull(); - await watcher.close(); - }); -}); - -// --- discovery ----------------------------------------------------------------- - -describe("native discovery", () => { - it("adopts an attached device with no prompt and no gesture", async () => { - const { ok, watcher } = await connected(); - expect(ok).toBe(true); - // The watch is started before the listing, which is the ordering that cannot miss a device - // plugged in during the call. - expect(calls[0].cmd).toBe("usb_watch"); - await watcher.close(); - }); - - it("reports nothing attached as idle, which is not an error", async () => { - attached = []; - const watcher = new NativeWatcher(); - expect(await watcher.start()).toBe(false); - expect(watcher.current).toMatchObject({ status: "idle", error: null, client: null, store: null }); - await watcher.close(); - }); - - it("releases the interface when a connection fails partway", async () => { - // A device claimed but never listed still holds its interface, and an interface can be - // claimed once — so a failed connect that kept it would lock out every retry. - wire = loopbackLink(); - attached = [DEVICE]; - const watcher = new NativeWatcher({ timeoutMs: 20, hotplugRetryDelayMs: 1 }); - // No device running, so the `LIST` times out. - expect(await watcher.start()).toBe(false); - expect(watcher.current.status).toBe("error"); - expect(calls.some((c) => c.cmd === "usb_close")).toBe(true); - await watcher.close(); - }); - - it("surfaces a refused open as the sentence the backend wrote", async () => { - attached = [DEVICE]; - openFault = { - code: "device-error", - message: "Interface 0 could not be claimed: busy — something else has it open.", - }; - const watcher = new NativeWatcher({ hotplugRetryDelayMs: 1 }); - expect(await watcher.start()).toBe(false); - expect(watcher.current.error).toContain("something else has it open"); - await watcher.close(); - }); - - it("connects by itself when the device is plugged in after start", async () => { - // The hot-plug contract on hardware: app open, nothing attached, cable in — the window - // lights up with no click. The event rides the channel `usb_watch` was given. - attached = []; - const watcher = new NativeWatcher(); - await watcher.start(); - expect(watcher.current.status).toBe("idle"); - - wire = loopbackLink(); - device = new FlatDevice(wire.device); - void device.run(); - attached = [DEVICE]; - watchChannel!.onmessage!({ type: "connected", device: DEVICE }); - - await vi.waitFor(() => expect(watcher.current.status).toBe("ready")); - await watcher.close(); - }); - - it("retries when the OS announces the device before it is claimable", async () => { - // nusb's own hot-plug docs: a `Connected` event can precede the device being openable, so - // retry after a short delay. The failure that motivated this: one transient claim failure - // parked the session in `error` — which the chip renders as "No device" — forever. - attached = []; - const watcher = new NativeWatcher({ hotplugRetryDelayMs: 1 }); - await watcher.start(); - - wire = loopbackLink(); - device = new FlatDevice(wire.device); - void device.run(); - attached = [DEVICE]; - openFault = { code: "device-error", message: "Interface 0 could not be claimed: busy." }; - watchChannel!.onmessage!({ type: "connected", device: DEVICE }); - - // The first attempt has failed; between attempts the state stays `connecting`, not `error`. - await vi.waitFor(() => expect(calls.filter((c) => c.cmd === "usb_open").length).toBeGreaterThanOrEqual(1)); - expect(watcher.current.status).toBe("connecting"); - - openFault = null; // the OS finished setting the device up - await vi.waitFor(() => expect(watcher.current.status).toBe("ready")); - await watcher.close(); - }); - - it("settles back to idle when the device vanishes during the retries", async () => { - attached = []; - const watcher = new NativeWatcher({ hotplugRetryDelayMs: 1 }); - await watcher.start(); - - attached = [DEVICE]; - openFault = { code: "device-error", message: "busy" }; - watchChannel!.onmessage!({ type: "connected", device: DEVICE }); - await vi.waitFor(() => expect(calls.some((c) => c.cmd === "usb_open")).toBe(true)); - - // Unplugged again before any attempt succeeded: the truthful end state is idle, not an - // error about a device that is no longer there. - attached = []; - await vi.waitFor(() => expect(watcher.current.status).toBe("idle")); - expect(watcher.current.error).toBeNull(); - await watcher.close(); - }); - - it("gives up with the device's own error once the retries run out", async () => { - attached = []; - const watcher = new NativeWatcher({ hotplugRetryDelayMs: 1 }); - await watcher.start(); - - attached = [DEVICE]; - openFault = { - code: "device-error", - message: "Interface 0 could not be claimed: busy — something else has it open.", - }; - watchChannel!.onmessage!({ type: "connected", device: DEVICE }); - - await vi.waitFor(() => expect(watcher.current.status).toBe("error")); - expect(watcher.current.error).toContain("something else has it open"); - // Bounded: it tried its attempts and stopped, rather than polling forever. - expect(calls.filter((c) => c.cmd === "usb_open")).toHaveLength(5); - await watcher.close(); - }); - - it("retries start()'s own initial adopt through the same window", async () => { - // App launched moments after the cable went in: the initial probe hits the exact same - // not-yet-claimable window a hot-plug event does, where a single failed attempt would - // park in `error` with no event ever coming to rescue it. - wire = loopbackLink(); - device = new FlatDevice(wire.device); - void device.run(); - attached = [DEVICE]; - openFault = { code: "device-error", message: "not ready yet" }; - const watcher = new NativeWatcher({ hotplugRetryDelayMs: 1 }); - - let release1!: () => void; - let release2!: () => void; - openGates.push(() => new Promise((resolve) => (release1 = resolve))); - const started = watcher.start(); - await vi.waitFor(() => expect(calls.filter((c) => c.cmd === "usb_open")).toHaveLength(1)); - openGates.push(() => new Promise((resolve) => (release2 = resolve))); - release1(); // attempt 1 fails against the not-yet-claimable device - await vi.waitFor(() => expect(calls.filter((c) => c.cmd === "usb_open")).toHaveLength(2)); - openFault = null; // the OS finished setting the device up - release2(); - - expect(await started).toBe(true); - expect(watcher.current.status).toBe("ready"); - await watcher.close(); - }); - - it("lets a Connect click win over an adopt loop parked between attempts", async () => { - // The wedge this guards against: the click and the loop both open the same device, the - // loop's late failure publishes `error` over the click's `ready`, and whichever link - // loses is dropped still holding the interface claim. The click claims the flow, so the - // loop must notice and stand down without another attempt. - attached = []; - const watcher = new NativeWatcher({ hotplugRetryDelayMs: 120 }); - await watcher.start(); - - wire = loopbackLink(); - device = new FlatDevice(wire.device); - void device.run(); - attached = [DEVICE]; - openFault = { code: "device-error", message: "busy" }; - watchChannel!.onmessage!({ type: "connected", device: DEVICE }); - await vi.waitFor(() => expect(calls.filter((c) => c.cmd === "usb_open")).toHaveLength(1)); - - // The rider clicks Connect while the loop sleeps out its retry delay. - openFault = null; - expect(await watcher.requestDevice()).toBe(true); - expect(watcher.current.status).toBe("ready"); - - // The loop wakes, sees it lost the flow, and goes quietly: no third open, no late error, - // and the winner's client still works. - await new Promise((resolve) => setTimeout(resolve, 200)); - expect(watcher.current.status).toBe("ready"); - expect(calls.filter((c) => c.cmd === "usb_open")).toHaveLength(2); - const page = await watcher.current.client!.listPage({}); - expect(page.storeId).toBe(device!.storeId); - await watcher.close(); - }); - - it("closes, not orphans, a link whose flow lost while the handshake ran", async () => { - // The expensive half of the same race: a flow that already *opened* the device loses - // while its handshake runs. The Rust side holds the interface claim until the link is - // closed, so dropping the client on the floor would make every later open fail "busy" - // until a physical replug. The loser must close what it opened and publish nothing. - attached = []; - const watcher = new NativeWatcher({ hotplugRetryDelayMs: 1 }); - await watcher.start(); - - wire = loopbackLink(); - device = new FlatDevice(wire.device); - void device.run(); - attached = [DEVICE]; - let release!: () => void; - openGates.push(() => new Promise((resolve) => (release = resolve))); - watchChannel!.onmessage!({ type: "connected", device: DEVICE }); - await vi.waitFor(() => expect(calls.some((c) => c.cmd === "usb_open")).toBe(true)); - - // Overtaken while parked inside the open: a deliberate disconnect claims the flow. - await watcher.disconnect(); - const seen: string[] = []; - const unsubscribe = watcher.subscribe((s) => seen.push(s.status)); - release(); - - // The open and the handshake complete against the live device — and then the loser - // notices it lost: the link is closed at the backend, nothing is published. - await vi.waitFor(() => expect(calls.some((c) => c.cmd === "usb_close")).toBe(true)); - await new Promise((resolve) => setTimeout(resolve, 50)); - expect(watcher.current.status).toBe("idle"); - expect(seen).not.toContain("ready"); - expect(seen).not.toContain("error"); - expect(calls.filter((c) => c.cmd === "usb_open")).toHaveLength(1); - unsubscribe(); - await watcher.close(); - }); - - it("keeps a successor alive when a superseded loop's final attempt fails late", async () => { - // A replugged device gets a new id and a new `Connected` event while the old id's loop is - // still failing its last attempt. That final failure must not publish `error` over the - // fresh loop's `connecting` — before the flow token, it did, and the fresh loop then saw - // the wrong status and stood down: the freshly plugged device never connected. - attached = []; - const watcher = new NativeWatcher({ hotplugRetryDelayMs: 1 }); - await watcher.start(); - - wire = loopbackLink(); - device = new FlatDevice(wire.device); - void device.run(); - attached = [DEVICE, DEVICE_B]; - openFault = { code: "device-error", message: "gone", onlyId: DEVICE.id }; - // Attempts 1–4 fail fast; the 5th parks in its open so the successor can overtake it. - let release!: () => void; - openGates = [ - undefined, - undefined, - undefined, - undefined, - () => new Promise((resolve) => (release = resolve)), - ]; - watchChannel!.onmessage!({ type: "connected", device: DEVICE }); - await vi.waitFor(() => expect(calls.filter((c) => c.cmd === "usb_open")).toHaveLength(5)); - - watchChannel!.onmessage!({ type: "connected", device: DEVICE_B }); - await vi.waitFor(() => expect(watcher.current.status).toBe("ready")); - release(); // the old loop's final attempt now fails, late and superseded - - await new Promise((resolve) => setTimeout(resolve, 50)); - expect(watcher.current.status).toBe("ready"); - expect(watcher.current.error).toBeNull(); - // …and the connection that stands is the successor's, not a resurrected old one. - const opens = calls.filter((c) => c.cmd === "usb_open"); - expect((opens.at(-1)?.args as { deviceId: string }).deviceId).toBe(DEVICE_B.id); - await watcher.close(); - }); - - it("ends in idle when the unplug event lands mid-flow", async () => { - // The Disconnected event arrives while the flow has no link yet (so the link-based - // handler ignores it) and the device is even still *listed* by a stale probe. The flow - // chasing exactly this id is ended in the honest state, and its in-flight attempt's - // failure stays silent. - attached = []; - const watcher = new NativeWatcher({ hotplugRetryDelayMs: 1 }); - await watcher.start(); - - attached = [DEVICE]; - openFault = { code: "device-error", message: "busy" }; - // Park the attempt inside its open, so the unplug event demonstrably lands mid-flight. - let release!: () => void; - openGates.push(() => new Promise((resolve) => (release = resolve))); - watchChannel!.onmessage!({ type: "connected", device: DEVICE }); - await vi.waitFor(() => expect(calls.some((c) => c.cmd === "usb_open")).toBe(true)); - - watchChannel!.onmessage!({ type: "disconnected", id: DEVICE.id }); - await vi.waitFor(() => expect(watcher.current.status).toBe("idle")); - release(); // the parked attempt now fails, sees a stale token, and says nothing - await new Promise((resolve) => setTimeout(resolve, 60)); - expect(watcher.current.status).toBe("idle"); - expect(watcher.current.error).toBeNull(); - await watcher.close(); - }); - - it("re-scans instead of opening a chooser", async () => { - // The native host has no permission prompt, so `requestDevice()` is "look again now" — the - // Connect button keeps working and no UI branches on which transport it got. - attached = []; - const watcher = new NativeWatcher(); - await watcher.start(); - wire = loopbackLink(); - device = new FlatDevice(wire.device); - void device.run(); - attached = [DEVICE]; - expect(await watcher.requestDevice()).toBe(true); - expect(watcher.current.status).toBe("ready"); - await watcher.close(); - }); -}); - -// A map sent disk to endpoint inside Rust cannot exist until the Rust side frames records: every -// stream record carries a `RequestId`, an absolute offset and a length. The heap claim that path made belongs to the shared upload loop and is -// tested where that loop lives; the CRC constant it pinned is `usb/crc32.test.ts`'s. diff --git a/builder/web/src/lib/desktop/usb.ts b/builder/web/src/lib/desktop/usb.ts deleted file mode 100644 index 9c502a31b4..0000000000 --- a/builder/web/src/lib/desktop/usb.ts +++ /dev/null @@ -1,551 +0,0 @@ -/** - * The native USB transport: `nusb` behind the {@link BytePipe} seam. - * - * Tauri's webview has no WebUSB — WKWebView, WebView2 and WebKitGTK all lack it — so this tier - * drives USB from Rust. It is also the only universal USB path, and the answer for every Safari and - * Firefox user the hosted site cannot reach. - * - * Nothing about the protocol lives here. `lib/usb/` is the codec, the record framing and the client; - * this file supplies the two byte pipes underneath them and a watcher with the same three methods - * `WebUsbWatcher` has. It lives in `lib/desktop/` because it imports `@tauri-apps/api`, and - * `platform/bundle.test.ts` asserts nothing in that folder reaches the hosted bundle. - * - * What differs from the browser: - * - * - Cancellation reaches the transport. WebUSB cannot cancel a submitted `transferIn`; nusb can, and - * here it must, because after an abort the device stops sending and an orphaned read would hold - * the endpoint forever. - * - There is no chooser and no permission prompt. `requestDevice()` is "look again now". - * - There is no EP0 read: the Rust side exposes no control-transfer command, so the link omits - * `DeviceLink.vendorIn` and the connect flow publishes `info: null` rather than a fabricated - * firmware revision. - * - * A map is not sent from disk. Every stream record must be framed by the protocol client, which is - * TypeScript, so the desktop app sends a map exactly the way the browser does: a picked `File` - * through the webview. - */ - -import { PipeError, withAbort, type BytePipe, type DeviceLink } from "../usb/pipe"; -import { DeviceError, FlatStoreClient, isFormatRecoveryState, type ClientOptions } from "../usb/client"; -import type { DeviceInfo } from "../usb/records"; -import type { DeviceState, DeviceWatcher } from "../usb/session"; -import { Channel } from "@tauri-apps/api/core"; -import { desktop, type UsbDeviceSummary, type UsbEvent, type UsbLinkInfo, type UsbPlane } from "./invoke"; - -/** One endpoint pair, as a byte pipe over the Tauri commands in `builder/desktop/src/usb/`. */ -class NativePipe implements BytePipe { - readonly transport = "native"; - - private failure: PipeError | null = null; - private closedByUs = false; - /** Rejectors for {@link dead}, released when the pipe closes or fails. */ - private readonly mourners: Array<(error: PipeError) => void> = []; - /** - * The previous {@link write}'s settlement — each write chains on it, so submission order is wire - * order. Without the chain, concurrent writes each travel as an independent IPC invoke and the - * backend gives them no ordering: two in-flight chunks can swap on the wire, giving the right - * total length and the wrong whole-object CRC. The chain costs one IPC round trip of idle bridge - * per chunk, not wire idle. WebUSB needs none of this: the browser queues per-endpoint transfers - * in call order. - */ - private writeTail: Promise = Promise.resolve(); - - constructor( - /** - * The backend's name for this endpoint pair. `"bulk"` is what `DeviceLink.stream` is called - * on the Rust side; renaming it is a Rust change, so the wire word stays and the seam is here. - */ - readonly plane: UsbPlane, - private readonly handle: number, - /** - * The endpoint's max packet size, as `usb_open` reported it. Diagnostics only, never a - * branch target: packet boundaries carry no protocol meaning. - */ - readonly packetSize: number, - ) {} - - get open(): boolean { - return !this.failure && !this.closedByUs; - } - - async read(signal?: AbortSignal): Promise { - this.check(); - // The backend cancels the URB, so the abort is not merely the caller walking away: the - // transfer is really gone, and the endpoint is free for the reset that always follows. - const release = this.cancelOnAbort(signal, "in"); - try { - const body = await Promise.race([ - withAbort(desktop.usbRead(this.handle, this.plane), signal, "the read"), - this.dead(), - ]); - // Never empty: the backend absorbs zero-length packets, which are USB-level markers - // rather than data, and an empty read is indistinguishable from a spurious wakeup. - return new Uint8Array(body); - } catch (cause) { - throw this.asPipeError(cause, "read"); - } finally { - release(); - } - } - - /** - * One OUT transfer of whatever the caller handed over. There is deliberately no "a control frame - * must fit one packet" rule: records span packets by design, and the only thing that says where a - * record ends is its own four-byte prefix. - */ - async write(bytes: Uint8Array, signal?: AbortSignal): Promise { - this.check(); - const run = async () => { - const release = this.cancelOnAbort(signal, "out"); - try { - await Promise.race([ - withAbort(desktop.usbWrite(this.handle, this.plane, bytes), signal, "the write"), - this.dead(), - ]); - } catch (cause) { - throw this.asPipeError(cause, "write"); - } finally { - release(); - } - }; - // Chain on the predecessor whether it settled well or badly — its caller owns its error; - // this write only needs it to be off the bridge. See `writeTail` for why order is load-bearing. - const chained = this.writeTail.then(run, run); - this.writeTail = chained.then( - () => {}, - () => {}, - ); - return chained; - } - - /** - * Cancel everything in flight and clear both halves of the pair. - * - * An exchange that does not reach its correlated close leaves the channel at an unknown offset. - * Here that is a real cancel plus `CLEAR_FEATURE(ENDPOINT_HALT)`, not the best-effort `clearHalt` - * the browser can manage, so a cancelled download's tail is genuinely discarded. - */ - async reset(): Promise { - this.check(); - try { - await desktop.usbReset(this.handle, this.plane); - } catch (cause) { - // A pipe whose device has already gone has nothing left to reset, and the caller's - // original error is the interesting one. - if (this.failure) return; - throw this.asPipeError(cause, "reset"); - } - } - - async close(): Promise { - this.closedByUs = true; - this.bury(new PipeError("closed", "The device link is closed.")); - } - - /** Mark the pipe dead and fail everything waiting on it — what an unplug calls. */ - fail(error: PipeError): void { - this.failure ??= error; - this.bury(error); - } - - /** Tell the backend to cancel this direction when `signal` fires. Returns the unsubscriber. */ - private cancelOnAbort(signal: AbortSignal | undefined, dir: "in" | "out"): () => void { - if (!signal) return () => undefined; - const onAbort = () => void desktop.usbCancel(this.handle, this.plane, dir).catch(() => undefined); - signal.addEventListener("abort", onAbort, { once: true }); - return () => signal.removeEventListener("abort", onAbort); - } - - /** - * A promise that rejects when this pipe closes or fails. Raced against every call so an unplug - * settles the caller from the *event*, deterministically, rather than from whichever of the OS - * transfer error and the hot-plug notification wins. - */ - private dead(): Promise { - return new Promise((_, reject) => { - if (this.failure) reject(this.failure); - else if (this.closedByUs) reject(new PipeError("closed", "The device link is closed.")); - else this.mourners.push(reject); - }); - } - - private bury(error: PipeError): void { - while (this.mourners.length) this.mourners.shift()?.(error); - } - - private check(): void { - if (this.failure) throw this.failure; - if (this.closedByUs) throw new PipeError("closed", "The device link is closed."); - } - - private asPipeError(cause: unknown, what: string): PipeError { - if (this.failure) return this.failure; - const error = asPipeError(cause, what); - // A transport-level `closed` is terminal for this pipe, exactly as an unplug is: recording - // it means the next call fails immediately instead of making another doomed round trip. - if (error.code === "closed") this.fail(error); - return error; - } -} - -/** - * Translate a rejected Tauri command into a {@link PipeError}. - * - * The backend rejects with its own `{ code, message }`, deliberately in `PipeError`'s vocabulary, so - * the mapping is a lookup rather than string-matching an OS error. Anything else is a `device-error`. - */ -function asPipeError(cause: unknown, what: string): PipeError { - if (cause instanceof PipeError) return cause; - const fault = cause as { code?: unknown; message?: unknown } | null; - const code = fault?.code; - const message = typeof fault?.message === "string" ? fault.message : String(cause); - if (code === "closed" || code === "aborted" || code === "device-error") { - return new PipeError(code, message, { cause }); - } - return new PipeError("device-error", `The ${what} failed: ${message}`, { cause }); -} - -/** A claimed device, as a {@link DeviceLink}. */ -export interface NativeLink extends DeviceLink { - readonly info: UsbLinkInfo; - /** Fail both pipes at once — what a `disconnected` event calls. */ - disconnected(): void; -} - -/** - * Open and claim a device by the backend's opaque id, returning its two channels. - * - * `DeviceLink.vendorIn` is deliberately absent: the Rust side has no control-transfer command, and - * omitting the method is what lets {@link FlatStoreClient.deviceInfo} say "this host cannot ask". - */ -export async function openNativeLink(deviceId: string): Promise { - let info: UsbLinkInfo; - try { - info = await desktop.usbOpen(deviceId); - } catch (cause) { - throw asPipeError(cause, "connection"); - } - const control = new NativePipe("control", info.handle, info.controlPacketSize); - // The stream channel, under the backend's own name for the pair — see {@link NativePipe.plane}. - const stream = new NativePipe("bulk", info.handle, info.bulkPacketSize); - return { - info, - control, - stream, - disconnected() { - const error = new PipeError("closed", "The device was unplugged."); - control.fail(error); - stream.fail(error); - }, - async close() { - await control.close(); - await stream.close(); - try { - await desktop.usbClose(info.handle); - } catch { - // Closing a link whose device is already gone is the normal unplug path. - } - }, - }; -} - -export interface NativeWatcherOptions extends ClientOptions { - /** Injected by tests; defaults to the real Tauri bridge. */ - bridge?: Bridge; - /** Pause between hot-plug connect attempts; tests shrink it. */ - hotplugRetryDelayMs?: number; -} - -/** - * How a hot-plug connect is allowed to fail before it is a real error. - * - * The OS announces a device the moment it enumerates, which can be *before* it is claimable: nusb's - * own hot-plug docs say to retry after a short delay, and macOS has the same window while IOKit is - * still matching drivers. One failed attempt at that instant must not park the session in a dead - * `error` state, because the error chip reads as "No device". - */ -const HOTPLUG_CONNECT_ATTEMPTS = 5; -const HOTPLUG_RETRY_DELAY_MS = 400; - -const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); - -/** The slice of the Tauri bridge discovery uses, named so a test can drive the real code paths. */ -export interface Bridge { - usbWatch(onEvent: Channel): Promise; - usbList(): Promise; -} - -/** - * Finds the device, keeps up with plugging and unplugging, and owns the {@link FlatStoreClient}. - * - * The same three-method shape as `WebUsbWatcher`, so `WatchedDeviceSession` wraps either one and the - * UI above never learns which. - */ -export class NativeWatcher implements DeviceWatcher { - private readonly options: NativeWatcherOptions; - private readonly bridge: Bridge; - private readonly listeners = new Set<(state: DeviceState) => void>(); - - private link: NativeLink | null = null; - private state: DeviceState = { status: "idle", client: null, store: null, info: null, error: null }; - - constructor(options: NativeWatcherOptions = {}) { - this.options = options; - this.bridge = options.bridge ?? desktop; - } - - get current(): DeviceState { - return this.state; - } - - subscribe(listener: (state: DeviceState) => void): () => void { - this.listeners.add(listener); - listener(this.state); - return () => this.listeners.delete(listener); - } - - /** - * Start watching for hot-plug and adopt a device that is already attached. - * - * No gesture and no prompt, ever — that restriction is WebUSB's. Returns whether a device - * connected. The initial adopt runs through the same retrying flow the hot-plug path uses: an app - * launched moments after the cable went in hits the same not-yet-claimable window. - */ - async start(): Promise { - const channel = new Channel(); - channel.onmessage = (event) => this.onEvent(event); - let devices: UsbDeviceSummary[]; - try { - devices = await this.bridge.usbWatch(channel); - } catch (cause) { - this.publish({ ...this.state, status: "error", error: describe(cause) }); - return false; - } - return devices.length > 0 ? this.adopt(devices[0]) : false; - } - - /** - * Look for a device now. The native counterpart of the browser's chooser, and deliberately not a - * dialog: this host can see the device without asking anyone. It stays because the UI's Connect - * button calls it, and a button that re-scans is reasonable. - */ - async requestDevice(): Promise { - if (this.state.status === "ready") return true; - // Claim the flow before anything async: from here the click owns the published state, and a - // sleeping adopt loop stands down instead of racing it for the one interface claim. - const token = this.claimFlow(); - this.publish({ ...this.state, status: "connecting", error: null }); - let devices: UsbDeviceSummary[]; - try { - devices = await this.bridge.usbList(); - } catch (cause) { - if (this.owns(token)) { - this.publish({ status: "error", client: null, store: null, info: null, error: describe(cause) }); - } - return false; - } - if (!this.owns(token)) return false; - if (devices.length === 0) { - this.publish({ - status: "idle", - client: null, - store: null, - info: null, - error: null, - }); - return false; - } - return this.adopt(devices[0], token); - } - - /** Drop the link but keep watching, so re-plugging reconnects. */ - async disconnect(): Promise { - // A deliberate disconnect outranks any connect flow still in flight: claim the flow so a - // sleeping adopt loop stands down and an in-flight attempt finishes into silence. - this.claimFlow(); - this.chasing = null; - const client = this.state.client; - this.publish({ status: "idle", client: null, store: null, info: null, error: null }); - this.link = null; - await client?.close(); - } - - /** Stop following this session. The backend's watch outlives it and is re-pointed on the next - * `start()`, which is what makes a window reload cheap. */ - async close(): Promise { - await this.disconnect(); - this.listeners.clear(); - } - - // At most one connect flow may drive the published state and `this.link` at a time, but three - // things can start one — the hot-plug adopt loop, the Connect click, `start()`'s initial probe — - // and a running flow parks on awaits where any of the others can overtake it. So every flow - // claims a monotonically increasing token, claiming invalidates every older flow, and each older - // flow notices at its next step and stands down *silently*: it must not publish over the winner, - // must not null a link it no longer owns, and must close any link it did open, because the Rust - // side holds the interface claim until it is closed and an orphaned claim makes every later open - // fail "busy" until a physical replug. - - /** The current flow's token. Bump-to-claim. */ - private flow = 0; - /** The device id the current flow is chasing while it has no link yet — how a `disconnected` - * event can end a flow whose device vanished mid-attempt. */ - private chasing: string | null = null; - - private claimFlow(): number { - return ++this.flow; - } - - private owns(token: number): boolean { - return this.flow === token; - } - - /** - * One connect attempt: publish `connecting`, open, handshake, publish `ready` — with every - * publish and every `this.link` write gated on still owning `token`. A failure publishes nothing - * terminal and returns the failure's sentence; the *caller* owns the verdict. - */ - private async connectOnce(device: UsbDeviceSummary, token: number): Promise<{ ok: boolean; error?: string }> { - if (!this.owns(token)) return { ok: false }; - this.publish({ ...this.state, status: "connecting", error: null }); - let link: NativeLink | null = null; - try { - link = await openNativeLink(device.id); - const client = new FlatStoreClient(link, { timeoutMs: this.options.timeoutMs }); - // The EP0 read first, mirroring `WebUsbWatcher.connect`, except that this host cannot - // issue one. Only `unavailable` is caught: a device that answered a request badly is a - // real failure and must not be rounded down to "no info". - let info: DeviceInfo | null; - try { - info = await client.deviceInfo(); - } catch (cause) { - if (!(cause instanceof DeviceError) || cause.code !== "unavailable") throw cause; - info = null; - } - // Then `LIST`, which every client issues before anything else and which carries the - // store's identity. The wire major is settled by descriptor matching, not read here. - let store: DeviceState["store"]; - try { - const page = await client.listPage({}); - store = { storeId: page.storeId, commitSequence: page.commitSequence }; - } catch (cause) { - if (!isFormatRecoveryState(cause)) throw cause; - store = null; - } - if (!this.owns(token)) { - // A newer flow (or a disconnect) took the state while this handshake ran. The - // connection itself is real, so it must be closed, not dropped. - await client.close().catch(() => undefined); - return { ok: false }; - } - this.link = link; - this.publish({ - status: "ready", - client, - store, - info, - error: null, - }); - return { ok: true }; - } catch (cause) { - // A device claimed but never handshaken still holds its interface, and an interface can - // be claimed once, so releasing it lets a retry get at the device instead of finding it - // busy. `this.link` is deliberately not touched: a newer flow's may already be in there. - await link?.close().catch(() => undefined); - return { ok: false, error: describe(cause) }; - } - } - - /** - * Connect to a device, retrying over the window in which the OS has announced it but not - * finished setting it up — the shared flow behind the hot-plug event, `start()`'s initial probe - * and the Connect click. Between attempts the loop re-checks that the device is still attached, - * so a re-unplug ends in `idle` rather than an error about a device that is not there. - */ - private async adopt(device: UsbDeviceSummary, token: number = this.claimFlow()): Promise { - if (this.owns(token)) this.chasing = device.id; - try { - let lastError = "The device could not be opened."; - for (let attempt = 1; attempt <= HOTPLUG_CONNECT_ATTEMPTS; attempt++) { - const result = await this.connectOnce(device, token); - if (result.ok) return true; - // Superseded by a newer event, a Connect click or a disconnect — stand down silently - // rather than fight over the published state. This covers the final attempt too. - if (!this.owns(token)) return false; - if (result.error !== undefined) lastError = result.error; - if (attempt < HOTPLUG_CONNECT_ATTEMPTS) { - await delay(this.options.hotplugRetryDelayMs ?? HOTPLUG_RETRY_DELAY_MS); - if (!this.owns(token)) return false; - } - // Still attached? Between attempts this decides whether to keep trying; after the - // final one it decides between the honest `idle` and the device's own error. - const present = await this.stillAttached(device.id); - if (!this.owns(token)) return false; - if (present === false) { - this.publish({ status: "idle", client: null, store: null, info: null, error: null }); - return false; - } - } - this.publish({ status: "error", client: null, store: null, info: null, error: lastError }); - return false; - } finally { - if (this.owns(token)) this.chasing = null; - } - } - - /** Whether `deviceId` is still listed; null when the probe itself failed (unknown). */ - private async stillAttached(deviceId: string): Promise { - try { - return (await this.bridge.usbList()).some((d) => d.id === deviceId); - } catch { - return null; - } - } - - private onEvent(event: UsbEvent): void { - switch (event.type) { - case "connected": - if (this.state.status === "ready") return; - void this.adopt(event.device); - return; - case "disconnected": { - if (this.link && this.link.info.deviceId === event.id) { - // Fail the pipes *before* awaiting anything: every pending read and write - // settles now, so an in-flight transfer's UI reports "unplugged". - this.link.disconnected(); - const client = this.state.client; - this.link = null; - this.publish({ status: "idle", client: null, store: null, info: null, error: null }); - void client?.close(); - return; - } - // No link yet, but a connect flow is chasing exactly this device: end it in the - // honest state now. The in-flight attempt sees a stale token and says nothing. - if (this.chasing === event.id) { - this.claimFlow(); - this.chasing = null; - this.publish({ status: "idle", client: null, store: null, info: null, error: null }); - } - return; - } - case "watchFailed": - // Only meaningful when there is nothing connected: a live link keeps working without - // hot-plug, and replacing it with an error would be a lie about what is wrong. - if (this.state.status === "idle") { - this.publish({ ...this.state, status: "error", error: event.message }); - } - return; - } - } - - private publish(state: DeviceState): void { - this.state = state; - for (const listener of this.listeners) listener(state); - } -} - -function describe(cause: unknown): string { - if (cause instanceof Error) return cause.message; - const message = (cause as { message?: unknown } | null)?.message; - return typeof message === "string" ? message : String(cause); -} diff --git a/builder/web/src/lib/device/dashboard.svelte.test.ts b/builder/web/src/lib/device/dashboard.svelte.test.ts deleted file mode 100644 index 7a3215f111..0000000000 --- a/builder/web/src/lib/device/dashboard.svelte.test.ts +++ /dev/null @@ -1,194 +0,0 @@ -/** - * The device page's store, against the loopback device: loading and grouping, the serialization - * chain, busy-conflict accounting, and scope invalidation. - * - * A `LIST` is an ordinary control exchange, served beside a live transfer — but a trip's stage list - * is a `GET`, and one transfer at a time is a device-wide rule, so two of those fired together - * still collide. That is what these - * tests drive the chain with. - */ - -import { beforeAll, describe, expect, it } from "vitest"; - -import { DeviceDashboard } from "./dashboard.svelte"; -import type { RideScope } from "./rides"; -import { Crc32 } from "../usb/crc32"; -import { encodeTripObject, wholeDay } from "../usb/objects"; -import { FlatDevice, flatDevice } from "../usb/flat-device"; -import { loadFlatDevice } from "../../../test-support/flat-device/load"; -import { EntryFlags, ObjectKind } from "../usb/protocol"; - -beforeAll(loadFlatDevice); - -const SCOPE: RideScope = { serial: "0011223344556677", storeId: "a1b2c3d4000000000000000000000000" }; - -/** An OBCR-sized payload with a distinct byte at every offset — the page never looks inside one. */ -function routeBytes(seed: number): Uint8Array { - const out = new Uint8Array(128); - for (let i = 0; i < out.length; i++) out[i] = (i * 31 + seed) & 0xff; - return out; -} - -/** The store assigns the id; `seed` is the payload's own, so a test can name the bytes it expects. */ -function seedRoute(device: FlatDevice, name: string, seed = 0) { - return device.seed({ kind: ObjectKind.Route, displayName: name, bytes: routeBytes(seed) }); -} - -function seedTrip(device: FlatDevice, name: string, stages: bigint[]) { - const bytes = encodeTripObject({ key: 1n, name, startDate: 0, days: stages.map(wholeDay) }); - return device.seed({ kind: ObjectKind.Trip, displayName: name, bytes }); -} - -async function withDevice( - body: (rig: ReturnType, dash: DeviceDashboard) => Promise, -): Promise { - const rig = flatDevice({}); - try { - await body(rig, new DeviceDashboard()); - expect(rig.device.faults, "the device adapter saw a reaction it did not expect").toEqual([]); - } finally { - await rig.close(); - } -} - -describe("DeviceDashboard", () => { - it("loads and groups: trips resolve their stages, top-level excludes them", async () => { - await withDevice(async ({ client, device }, dash) => { - const first = seedRoute(device, "Day 1"); - const second = seedRoute(device, "Day 2"); - const loop = seedRoute(device, "Home loop"); - seedTrip(device, "Jura Crest Trail", [first.objectId, second.objectId]); - - await dash.ensureLoaded(client, SCOPE); - expect(dash.error).toBeNull(); - expect(dash.routes.map((r) => r.objectId)).toEqual([first.objectId, second.objectId, loop.objectId]); - expect(dash.topLevelRoutes.map((r) => r.objectId)).toEqual([loop.objectId]); - expect(dash.trips).toHaveLength(1); - expect(dash.stagesOf(dash.trips[0]).map((s) => s.route?.displayName)).toEqual(["Day 1", "Day 2"]); - }); - }); - - it("lists a ride the device is still recording, and marks it rather than offering it", async () => { - // A `GET` of a `RECORDING` entry is refused — its length and CRC are zero until the commit - // that ends it — so the page's job is to show it as in progress, not to hide it. - await withDevice(async ({ client, device }, dash) => { - const finished = device.seed({ kind: ObjectKind.Ride, displayName: "Tuesday", bytes: routeBytes(9) }); - const live = device.seed({ kind: ObjectKind.Ride, displayName: "Now", flags: EntryFlags.Recording }); - - await dash.ensureLoaded(client, SCOPE); - expect(dash.rides.map((r) => r.objectId)).toEqual([finished.objectId, live.objectId]); - expect(dash.rides.map((r) => dash.isRecording(r))).toEqual([false, true]); - }); - }); - - it("marks a dangling stage instead of dropping it", async () => { - await withDevice(async ({ client, device }, dash) => { - const kept = seedRoute(device, "Still here"); - // Stage 9 is a reference the trip's payload carries to an object that is not on the card. - seedTrip(device, "Half gone", [9n, kept.objectId]); - - await dash.ensureLoaded(client, SCOPE); - const stages = dash.stagesOf(dash.trips[0]); - expect(stages[0]).toEqual({ id: 9n, route: null }); - expect(stages[1].route?.displayName).toBe("Still here"); - }); - }); - - it("does not re-list for the same scope, and reloads for a new one", async () => { - await withDevice(async ({ client, device }, dash) => { - seedRoute(device, "First"); - await dash.ensureLoaded(client, SCOPE); - seedRoute(device, "Second"); - await dash.ensureLoaded(client, SCOPE); - expect(dash.routes, "same scope: the cached lists stand").toHaveLength(1); - await dash.ensureLoaded(client, { ...SCOPE, storeId: "00000000000000000000000000000007" }); - expect(dash.routes, "new scope: reloaded").toHaveLength(2); - }); - }); - - it("serializes enqueued transfers instead of tripping §1's one-at-a-time rule", async () => { - await withDevice(async ({ client, device }, dash) => { - const first = seedRoute(device, "One", 1); - const second = seedRoute(device, "Two", 2); - // Fired together; without the chain the second `GET` would throw `busy` before it left. - const [a, b] = await Promise.all([ - dash.enqueue(() => client.get({ objectId: first.objectId, revision: first.revision })), - dash.enqueue(() => client.get({ objectId: second.objectId, revision: second.revision })), - ]); - expect(a.bytes).toEqual(routeBytes(1)); - expect(b.bytes).toEqual(routeBytes(2)); - expect(dash.busy).toBe(false); - }); - }); - - it("keeps the chain alive after a failed operation", async () => { - await withDevice(async ({ client, device }, dash) => { - seedRoute(device, "Survivor"); - await expect(dash.enqueue(() => client.get({ objectId: 99n, revision: 0n }))).rejects.toMatchObject({ - code: "not-found", - }); - const catalog = await dash.enqueue(() => client.list({ kind: ObjectKind.Route })); - expect(catalog.entries).toHaveLength(1); - }); - }); - - it("flags busy when a foreign transfer holds the slot, and recovers after clearBusy", async () => { - await withDevice(async ({ client, device }, dash) => { - const route = seedRoute(device, "One"); - // A transfer the page does not own: started directly on the client, outside the chain — - // the builder tab's map send, in miniature. The rule is device-wide, so the page cannot - // serialize its way out of this one; it renders it. - let releaseForeign!: () => void; - const gate = new Promise((resolve) => (releaseForeign = resolve)); - const payload = new Uint8Array([1, 2, 3, 4]); - const foreign = client.put({ kind: ObjectKind.Route, displayName: "Foreign" }, { - totalLen: payload.length, - crc32: Crc32.of(payload), - chunks: async function* () { - await gate; - yield payload; - }, - }); - - await expect( - dash.enqueue(() => client.get({ objectId: route.objectId, revision: route.revision })), - ).rejects.toMatchObject({ code: "busy" }); - expect(dash.busy).toBe(true); - - releaseForeign(); - await foreign; - dash.clearBusy(); - const catalog = await dash.enqueue(() => client.list({ kind: ObjectKind.Route })); - expect(catalog.entries.map((entry) => entry.objectId)).toContain(route.objectId); - expect(dash.busy).toBe(false); - }); - }); - - it("refresh after a remove drops the row", async () => { - await withDevice(async ({ client, device }, dash) => { - const doomed = seedRoute(device, "Doomed"); - const stays = seedRoute(device, "Stays"); - await dash.ensureLoaded(client, SCOPE); - expect(dash.routes).toHaveLength(2); - await dash.enqueue(() => client.remove({ objectId: doomed.objectId, revision: doomed.revision })); - await dash.refresh(client); - expect(dash.routes.map((r) => r.objectId)).toEqual([stays.objectId]); - }); - }); - - it("invalidate drops everything, so the next connect decides what to load", async () => { - await withDevice(async ({ client, device }, dash) => { - seedRoute(device, "Loaded"); - await dash.ensureLoaded(client, SCOPE); - expect(dash.routes).toHaveLength(1); - - dash.invalidate(); - expect(dash.routes).toEqual([]); - expect(dash.trips).toEqual([]); - expect(dash.rides).toEqual([]); - // The same scope loads again, because nothing is remembered about it. - await dash.ensureLoaded(client, SCOPE); - expect(dash.routes).toHaveLength(1); - }); - }); -}); diff --git a/builder/web/src/lib/device/dashboard.svelte.ts b/builder/web/src/lib/device/dashboard.svelte.ts deleted file mode 100644 index 99fca8ba3a..0000000000 --- a/builder/web/src/lib/device/dashboard.svelte.ts +++ /dev/null @@ -1,166 +0,0 @@ -/** - * The device page's model of what is on the card: routes, trips (with their stage lists), rides. - * - * Three rules shape everything here, all inherited from the protocol: - * - * 1. **One transfer at a time, enforced by throwing.** A `LIST` is an ordinary control exchange, - * served beside a live upload, but a trip's stage list is a `GET`. `enqueue` keeps every cable - * operation this page makes on one promise chain, so the page can never collide with *itself*. - * It can still collide with a transfer another surface started, since the rule is device-wide, - * and that is not an error to retry into but a state to render. - * - * 2. **Ids are only meaningful inside `(serial, era)`.** A card swap or a different device makes - * every cached entry a claim about different objects, so the store reloads when the scope - * changes. - * - * 3. **The catalog is what a client can know without downloading.** A route's distance, a ride's - * start time and a trip's stage list live in the payload. Only the last is fetched here, - * because a trip object is 56 bytes plus eight per stage and the page cannot draw a trip - * without it. - * - * A module singleton, deliberately: the lists survive a tab switch, so returning to the Device tab - * does not re-list the card. - */ - -import type { FlatStoreClient } from "../usb/client"; -import { DeviceError } from "../usb/client"; -import { EntryFlags, ObjectKind, type CatalogEntry } from "../usb/protocol"; -import { decodeTripObject, type TripObject } from "../usb/objects"; -import { scopeKey, type RideScope } from "./rides"; - -/** A trip as the page renders it: the catalog row plus the stage list behind it. `detail` is null - * only when the trip object itself could not be read — rendered as a group with no rows. */ -export interface TripView extends CatalogEntry { - readonly detail: TripObject | null; -} - -export class DeviceDashboard { - routes = $state([]); - trips = $state([]); - rides = $state([]); - loading = $state(false); - /** A failure loading or mutating, rendered once at the top of the page. */ - error = $state(null); - /** A transfer owned by another surface holds the link's one slot. */ - busy = $state(false); - - private chain: Promise = Promise.resolve(); - private loadedFor: string | null = null; - - /** - * Run one cable operation, strictly after every previously enqueued one. - * - * The chain never rejects — each link settles — but the caller's promise still carries the - * failure, so call sites decide what a failure means. - */ - enqueue(op: () => Promise): Promise { - const run = this.chain.then(op, op); - this.chain = run.then( - () => undefined, - () => undefined, - ); - return run.catch((cause: unknown) => { - if (cause instanceof DeviceError && cause.code === "busy") this.busy = true; - throw cause; - }); - } - - /** Forget the slot conflict — called when the rider retries, or when the header's readout - * shows the foreign transfer finished. */ - clearBusy(): void { - this.busy = false; - } - - /** - * Load the three lists, once per `(serial, StoreId)`. A remount of the page on the same device - * renders what is already here; a card swap or another device reloads. - */ - async ensureLoaded(client: FlatStoreClient, scope: RideScope): Promise { - const key = scopeKey(scope); - if (this.loadedFor === key) return; - this.loadedFor = key; - await this.refresh(client); - } - - /** Re-read everything. Called after every mutation — a catalog page is metadata and the card is - * the authority, so re-listing beats mirroring each edit locally and drifting. */ - async refresh(client: FlatStoreClient): Promise { - this.loading = true; - this.error = null; - try { - // One listing, filtered here rather than three filtered by the device. A kind filter - // exists, but three round trips buy nothing when the whole catalog fits in a couple of - // pages and the page wants all three kinds every time. - const catalog = await this.enqueue(() => client.list()); - const routes = catalog.entries.filter((entry) => entry.kind === ObjectKind.Route); - const trips = catalog.entries.filter((entry) => entry.kind === ObjectKind.Trip); - const details: TripView[] = []; - for (const entry of trips) { - // Sequential on purpose — each is a `GET`, and the chain is the page's - // serialization guarantee. - const detail = await this.enqueue(() => - client.get({ objectId: entry.objectId, revision: entry.revision }), - ) - .then((result) => decodeTripObject(result.bytes)) - .catch(() => null); - details.push({ ...entry, detail }); - } - this.routes = routes; - this.trips = details; - // A ride the device is still recording has a zero length and CRC until the commit that - // ends it, so it is listed and not offered: the page shows it as recording. - this.rides = catalog.entries.filter((entry) => entry.kind === ObjectKind.Ride); - } catch (cause) { - this.error = cause instanceof Error ? cause.message : String(cause); - // Nothing loaded is a fact worth retrying, not a scope worth remembering. - this.loadedFor = null; - } finally { - this.loading = false; - } - } - - /** - * Every route id that is a stage of some trip — the rows the top-level list leaves out. Full-width - * flat-store ObjectIds, exactly as the trip payload carries them. - */ - get stagedIds(): Set { - const staged = new Set(); - for (const trip of this.trips) for (const day of trip.detail?.days ?? []) staged.add(day.route); - return staged; - } - - /** Routes that are not inside any trip, in list order. */ - get topLevelRoutes(): CatalogEntry[] { - const staged = this.stagedIds; - return this.routes.filter((route) => !staged.has(route.objectId)); - } - - /** - * A trip's stages resolved against the route list. Null marks a dangling id — a member route - * deleted on its own, which the device tolerates and serves verbatim. - * - * A trip stores the catalog's complete `u64` ObjectId, so resolution stays exact even after the - * allocation cursor has moved beyond JavaScript's safe integer range. - */ - stagesOf(trip: TripView): Array<{ id: bigint; route: CatalogEntry | null }> { - const byId = new Map(this.routes.map((route) => [route.objectId, route])); - return (trip.detail?.days ?? []).map(({ route: id }) => ({ id, route: byId.get(id) ?? null })); - } - - /** True where this entry is a ride the device is still recording, which cannot be served. */ - isRecording(entry: CatalogEntry): boolean { - return (entry.flags & EntryFlags.Recording) !== 0; - } - - /** Drop everything, for a disconnect: the next connect decides what to load. */ - invalidate(): void { - this.loadedFor = null; - this.routes = []; - this.trips = []; - this.rides = []; - this.error = null; - this.busy = false; - } -} - -export const dashboard = new DeviceDashboard(); diff --git a/builder/web/src/lib/device/elevation.test.ts b/builder/web/src/lib/device/elevation.test.ts deleted file mode 100644 index 10101e2554..0000000000 --- a/builder/web/src/lib/device/elevation.test.ts +++ /dev/null @@ -1,287 +0,0 @@ -import { describe, expect, it } from "vitest"; - -import { - FULL_WINDOW, - MIN_WINDOW_SPAN, - clampWindow, - cumulativeDistances, - elevationAtDistance, - elevationProfile, - isFullWindow, - nearestPointIndex, - panWindow, - pointAtDistance, - windowIndexRange, - zoomWindow, -} from "./elevation"; - -const climb = [ - { lat: 48.0, lon: 7.82, ele: 236 }, - { lat: 48.01, lon: 7.83, ele: 400 }, - { lat: 48.02, lon: 7.84, ele: 320 }, -]; - -/** Four points spaced ~1.11 km apart along a meridian — a near-uniform distance axis. */ -const ladder = [ - { lat: 48.0, lon: 7.82, ele: 100 }, - { lat: 48.01, lon: 7.82, ele: 200 }, - { lat: 48.02, lon: 7.82, ele: 300 }, - { lat: 48.03, lon: 7.82, ele: 400 }, -]; - -describe("elevationProfile", () => { - it("draws a climb: paths inside the box, extremes reported, distance positive", () => { - const profile = elevationProfile(climb, 600, 64); - expect(profile).not.toBeNull(); - expect(profile!.minEle).toBe(236); - expect(profile!.maxEle).toBe(400); - expect(profile!.totalM).toBeGreaterThan(1000); - expect(profile!.startM).toBe(0); - expect(profile!.endM).toBe(profile!.totalM); - expect(profile!.linePath.startsWith("M")).toBe(true); - expect(profile!.areaPath.endsWith("Z")).toBe(true); - // The peak maps to the top of the box (pad), the lowest point to the bottom. - const ys = profile!.linePath.match(/ (\d+\.\d)/g)!.map(Number); - expect(Math.min(...ys)).toBeCloseTo(2, 0); - expect(Math.max(...ys)).toBeCloseTo(62, 0); - }); - - it("draws a flat track mid-box rather than refusing it", () => { - const flat = climb.map((p) => ({ ...p, ele: 100 })); - const profile = elevationProfile(flat, 600, 64); - expect(profile).not.toBeNull(); - expect(profile!.minEle).toBe(100); - expect(profile!.maxEle).toBe(100); - }); - - it("returns null where nothing honest can be drawn", () => { - expect(elevationProfile([], 600, 64)).toBeNull(); - expect(elevationProfile([climb[0]], 600, 64)).toBeNull(); - expect(elevationProfile(climb.map((p) => ({ ...p, ele: null })), 600, 64)).toBeNull(); - // Two points at the same place: no distance axis. - expect(elevationProfile([climb[0], climb[0]], 600, 64)).toBeNull(); - }); - - it("keeps elevation-less points on the distance axis but out of the drawn series", () => { - const gappy = [climb[0], { lat: 48.005, lon: 7.825, ele: null }, climb[1], climb[2]]; - const profile = elevationProfile(gappy, 600, 64); - expect(profile).not.toBeNull(); - expect(profile!.maxEle).toBe(400); - // The gap point advances the axis: the total matches the all-points cumulative distance, - // not a collapsed one. - const cum = cumulativeDistances(gappy); - expect(profile!.totalM).toBeCloseTo(cum[cum.length - 1], 6); - }); - - describe("windowed", () => { - it("redraws only the window, with its own extremes and metre bounds", () => { - const full = elevationProfile(ladder, 600, 64)!; - const half = elevationProfile(ladder, 600, 64, [0.5, 1])!; - expect(half.startM).toBeCloseTo(full.totalM / 2, 6); - expect(half.endM).toBeCloseTo(full.totalM, 6); - expect(half.totalM).toBeCloseTo(full.totalM, 6); - // Only the back half's elevations: min is the interpolated 250 m at the cut. - expect(half.minEle).toBeCloseTo(250, 0); - expect(half.maxEle).toBe(400); - // The redrawn path spans the whole box, not a squeezed half of it. - const xs = half.linePath.match(/[ML](\d+\.\d)/g)!.map((m) => Number(m.slice(1))); - expect(Math.min(...xs)).toBeCloseTo(2, 0); - expect(Math.max(...xs)).toBeCloseTo(598, 0); - }); - - it("interpolates the elevation where the window cuts between samples", () => { - // A window strictly inside the middle segment: both edges are interpolants. - const profile = elevationProfile(ladder, 600, 64, [0.4, 0.6])!; - expect(profile.minEle).toBeCloseTo(220, 0); - expect(profile.maxEle).toBeCloseTo(280, 0); - }); - - it("returns null when the window holds no drawable elevation", () => { - const headOnly = [ - { lat: 48.0, lon: 7.82, ele: 100 }, - { lat: 48.01, lon: 7.82, ele: 200 }, - { lat: 48.02, lon: 7.82, ele: null }, - { lat: 48.03, lon: 7.82, ele: null }, - ]; - expect(elevationProfile(headOnly, 600, 64, [0.75, 1])).toBeNull(); - }); - }); -}); - -describe("cumulativeDistances", () => { - it("starts at zero, one entry per point, monotonic", () => { - const cum = cumulativeDistances(ladder); - expect(cum.length).toBe(4); - expect(cum[0]).toBe(0); - for (let i = 1; i < cum.length; i++) expect(cum[i]).toBeGreaterThan(cum[i - 1]); - // ~1.11 km per 0.01° of latitude. - expect(cum[3]).toBeGreaterThan(3200); - expect(cum[3]).toBeLessThan(3500); - }); - - it("is empty for no points and [0] for one", () => { - expect(cumulativeDistances([])).toEqual([]); - expect(cumulativeDistances([ladder[0]])).toEqual([0]); - }); -}); - -describe("clampWindow", () => { - it("orders and clamps a dragged pair", () => { - expect(clampWindow(0.8, 0.2)).toEqual([0.2, 0.8]); - expect(clampWindow(-0.5, 1.5)).toEqual([0, 1]); - }); - - it("grows a degenerate drag to the minimum span, kept inside the track", () => { - const [t0, t1] = clampWindow(0.5, 0.5); - expect(t1 - t0).toBeCloseTo(MIN_WINDOW_SPAN, 9); - expect(t0).toBeCloseTo(0.5 - MIN_WINDOW_SPAN / 2, 9); - expect(clampWindow(0, 0)).toEqual([0, MIN_WINDOW_SPAN]); - expect(clampWindow(1, 1)).toEqual([1 - MIN_WINDOW_SPAN, 1]); - }); -}); - -describe("zoomWindow", () => { - it("zooms in about the anchor, keeping the ground under it still", () => { - const [t0, t1] = zoomWindow([0, 1], 0.5, 0.5); - expect(t1 - t0).toBeCloseTo(0.5, 9); - expect((0.5 - t0) / (t1 - t0)).toBeCloseTo(0.5, 9); - // An off-centre anchor keeps its relative position. - const [u0, u1] = zoomWindow([0, 1], 0.5, 0.2); - expect((0.2 - u0) / (u1 - u0)).toBeCloseTo(0.2, 9); - }); - - it("never inverts, undershoots the minimum span, or leaves the track", () => { - const tiny = zoomWindow([0.4, 0.4 + MIN_WINDOW_SPAN], 0.1, 0.405); - expect(tiny[1] - tiny[0]).toBeCloseTo(MIN_WINDOW_SPAN, 9); - const out = zoomWindow([0.9, 1], 4, 0.99); - expect(out[0]).toBeGreaterThanOrEqual(0); - expect(out[1]).toBeLessThanOrEqual(1); - expect(zoomWindow([0, 1], 3, 0.5)).toEqual([0, 1]); - }); -}); - -describe("windowIndexRange", () => { - // Four points, three equal segments: cum = [0, 1, 2, 3]. - const cum = [0, 1, 2, 3]; - - it("covers the whole track at the full window", () => { - expect(windowIndexRange(cum, FULL_WINDOW)).toEqual([0, 3]); - }); - - it("rounds outward so the highlight covers the window", () => { - // [0.5, 0.83] in distance = [1.5 m, 2.5 m]: needs points 1..3 to cover. - expect(windowIndexRange(cum, [0.5, 5 / 6])).toEqual([1, 3]); - // Exactly on vertices: no widening. - expect(windowIndexRange(cum, [1 / 3, 2 / 3])).toEqual([1, 2]); - }); - - it("degenerates safely", () => { - expect(windowIndexRange([], FULL_WINDOW)).toEqual([0, 0]); - expect(windowIndexRange([0], FULL_WINDOW)).toEqual([0, 0]); - }); -}); - -describe("panWindow", () => { - it("slides without resizing", () => { - const [t0, t1] = panWindow([0.2, 0.4], 0.3); - expect(t0).toBeCloseTo(0.5, 9); - expect(t1).toBeCloseTo(0.7, 9); - }); - - it("clamps at both ends, span preserved", () => { - expect(panWindow([0.2, 0.4], -1)).toEqual([0, 0.2]); - const [t0, t1] = panWindow([0.2, 0.4], 1); - expect(t0).toBeCloseTo(0.8, 9); - expect(t1).toBeCloseTo(1, 9); - // The full window has nowhere to go. - expect(panWindow([0, 1], 0.5)).toEqual([0, 1]); - }); -}); - -describe("pointAtDistance", () => { - const cum = cumulativeDistances(ladder); - - it("lands on vertices at their exact distances", () => { - expect(pointAtDistance(ladder, cum, 0)).toEqual({ lat: 48.0, lon: 7.82 }); - expect(pointAtDistance(ladder, cum, cum[2])).toEqual({ lat: 48.02, lon: 7.82 }); - expect(pointAtDistance(ladder, cum, cum[3])).toEqual({ lat: 48.03, lon: 7.82 }); - }); - - it("interpolates within a segment", () => { - const mid = pointAtDistance(ladder, cum, (cum[1] + cum[2]) / 2)!; - expect(mid.lat).toBeCloseTo(48.015, 6); - expect(mid.lon).toBeCloseTo(7.82, 9); - }); - - it("clamps past the ends and degenerates safely", () => { - expect(pointAtDistance(ladder, cum, -5)).toEqual({ lat: 48.0, lon: 7.82 }); - expect(pointAtDistance(ladder, cum, cum[3] + 500)).toEqual({ lat: 48.03, lon: 7.82 }); - expect(pointAtDistance([], [], 0)).toBeNull(); - expect(pointAtDistance([ladder[0]], [0], 10)).toEqual({ lat: 48.0, lon: 7.82 }); - // A mismatched axis is a caller bug, answered with null rather than a wrong point. - expect(pointAtDistance(ladder, [0, 1], 0.5)).toBeNull(); - }); -}); - -describe("elevationAtDistance", () => { - const cum = cumulativeDistances(ladder); - - it("reads vertices exactly and interpolates within a segment", () => { - expect(elevationAtDistance(ladder, cum, 0)).toBe(100); - expect(elevationAtDistance(ladder, cum, cum[2])).toBe(300); - expect(elevationAtDistance(ladder, cum, (cum[1] + cum[2]) / 2)).toBeCloseTo(250, 6); - }); - - it("clamps past the ends", () => { - expect(elevationAtDistance(ladder, cum, -5)).toBe(100); - expect(elevationAtDistance(ladder, cum, cum[3] + 500)).toBe(400); - }); - - it("goes quiet inside a null gap instead of printing the profile's interpolated ramp", () => { - // The middle two points recorded no elevation: the drawn line spans them (samples at the - // outer two), but any hover between points 0→1, 1→2 or 2→3 has a null neighbour. - const gappy = [ - { ...ladder[0], ele: 100 }, - { ...ladder[1], ele: null }, - { ...ladder[2], ele: null }, - { ...ladder[3], ele: 400 }, - ]; - const gcum = cumulativeDistances(gappy); - expect(elevationAtDistance(gappy, gcum, gcum[1] / 2)).toBeNull(); - expect(elevationAtDistance(gappy, gcum, (gcum[1] + gcum[2]) / 2)).toBeNull(); - expect(elevationAtDistance(gappy, gcum, (gcum[2] + gcum[3]) / 2)).toBeNull(); - // The real samples at the ends still read. - expect(elevationAtDistance(gappy, gcum, 0)).toBe(100); - expect(elevationAtDistance(gappy, gcum, gcum[3])).toBe(400); - // On a null vertex itself the answer is the vertex's: nothing. - expect(elevationAtDistance(gappy, gcum, gcum[3] + 1), "clamp lands on a real end").toBe(400); - }); - - it("degenerates safely", () => { - expect(elevationAtDistance([], [], 0)).toBeNull(); - expect(elevationAtDistance([ladder[0]], [0], 10)).toBe(100); - expect(elevationAtDistance([{ ...ladder[0], ele: null }], [0], 0)).toBeNull(); - // A mismatched axis is a caller bug, answered with null rather than a wrong number. - expect(elevationAtDistance(ladder, [0, 1], 0.5)).toBeNull(); - }); -}); - -describe("nearestPointIndex", () => { - it("finds the closest vertex, ends included", () => { - expect(nearestPointIndex(ladder, 48.001, 7.82)).toBe(0); - expect(nearestPointIndex(ladder, 48.014, 7.821)).toBe(1); - expect(nearestPointIndex(ladder, 48.9, 7.82)).toBe(3); - }); - - it("is -1 for an empty track", () => { - expect(nearestPointIndex([], 48, 7.82)).toBe(-1); - }); -}); - -describe("isFullWindow", () => { - it("tells the reset state from a zoom", () => { - expect(isFullWindow(FULL_WINDOW)).toBe(true); - expect(isFullWindow([0, 0.999])).toBe(false); - expect(isFullWindow([0.001, 1])).toBe(false); - }); -}); diff --git a/builder/web/src/lib/device/elevation.ts b/builder/web/src/lib/device/elevation.ts deleted file mode 100644 index 59f54cdca9..0000000000 --- a/builder/web/src/lib/device/elevation.ts +++ /dev/null @@ -1,303 +0,0 @@ -/** - * The preview's elevation profile: distance-along-track on x, elevation on y, as one SVG path, plus - * the windowing math behind the preview's zoom. - * - * Pure geometry, shared by the route preview and the ride preview. Distance is equirectangular with - * a `cos(lat)` correction, which is metres-accurate at track scale. - * - * One distance axis for everything: {@link cumulativeDistances} runs over **all** points, including - * elevation-less ones, since they exist on the map polyline. A zoom window is a `[t0, t1]` pair of - * fractions of the total distance. - */ - -/** The minimum a profile is drawn from: with one point there is no distance axis at all. */ -const MIN_POINTS = 2; - -export interface ProfilePoint { - readonly lat: number; - readonly lon: number; - /** Metres; null where the source recorded none. */ - readonly ele: number | null; -} - -/** A zoom window over the track: fractions of the total distance, `0 <= t0 < t1 <= 1`. */ -export type ProfileWindow = readonly [number, number]; - -/** The whole track — the reset state, and the only window a profile-less preview ever has. */ -export const FULL_WINDOW: ProfileWindow = [0, 1]; - -/** The narrowest a window may get — 1% of the track, so a zoom can never collapse or invert. */ -export const MIN_WINDOW_SPAN = 0.01; - -export interface ElevationProfile { - /** `M … L …` path in a `width` × `height` viewBox, baseline-closed for an area fill. */ - readonly areaPath: string; - /** The same polyline without the baseline, for the stroke on top. */ - readonly linePath: string; - /** Extremes of the elevation *within the window*. */ - readonly minEle: number; - readonly maxEle: number; - /** The window's bounds and the whole track's length, metres — the axis captions' numbers. */ - readonly startM: number; - readonly endM: number; - readonly totalM: number; -} - -/** - * Cumulative ground distance at every point, metres — `result[0] === 0`, one entry per point, - * elevation-less points included. The shared axis: the profile's x, the map split's cut, and a - * waypoint tick's position are all fractions of `result[result.length - 1]`. - */ -export function cumulativeDistances(points: readonly ProfilePoint[]): number[] { - const cum: number[] = points.length ? [0] : []; - for (let i = 1; i < points.length; i++) { - cum.push(cum[i - 1] + groundDistanceM(points[i - 1], points[i])); - } - return cum; -} - -/** Is `window` (effectively) the whole track — the state with no gray on the map, no reset. */ -export function isFullWindow([t0, t1]: ProfileWindow): boolean { - return t0 <= 0 && t1 >= 1; -} - -/** - * Order and clamp a dragged pair of fractions into a valid window: inside `[0, 1]`, at least - * {@link MIN_WINDOW_SPAN} wide (grown symmetrically around the pair's centre, pushed back inside - * the track when the centre sits near an end). - */ -export function clampWindow(a: number, b: number): ProfileWindow { - let t0 = Math.max(0, Math.min(a, b)); - let t1 = Math.min(1, Math.max(a, b)); - if (t1 - t0 < MIN_WINDOW_SPAN) { - const centre = (t0 + t1) / 2; - t0 = centre - MIN_WINDOW_SPAN / 2; - t1 = centre + MIN_WINDOW_SPAN / 2; - if (t0 < 0) [t0, t1] = [0, MIN_WINDOW_SPAN]; - if (t1 > 1) [t0, t1] = [1 - MIN_WINDOW_SPAN, 1]; - } - return [t0, t1]; -} - -/** - * Scale a window by `factor` (>1 zooms out, <1 zooms in) about `centreT` — an absolute fraction - * of the track, normally the cursor's position — keeping the centre's relative position in the - * window so the ground under the cursor stays put. Clamped to `[0, 1]` and the minimum span. - */ -export function zoomWindow(window: ProfileWindow, factor: number, centreT: number): ProfileWindow { - const [t0, t1] = window; - const span = t1 - t0; - const next = Math.min(1, Math.max(MIN_WINDOW_SPAN, span * factor)); - // Where the anchor sits within the window (0 = left edge, 1 = right), kept across the scale. - const r = span > 0 ? (centreT - t0) / span : 0.5; - let n0 = centreT - r * next; - n0 = Math.max(0, Math.min(1 - next, n0)); - return [n0, n0 + next]; -} - -/** - * The point indices the map highlights for `window`: `[first, last]` such that the polyline - * `points[first..=last]` covers the window's distance span (the boundary segments are included - * whole — a cut mid-segment rounds outward, so the coral never falls short of the window). - * `[0, points.length - 1]` at the full window. - */ -export function windowIndexRange(cum: readonly number[], window: ProfileWindow): [number, number] { - const last = cum.length - 1; - if (last < 1) return [0, Math.max(0, last)]; - const total = cum[last]; - const d0 = window[0] * total; - const d1 = window[1] * total; - let first = 0; - while (first < last && cum[first + 1] <= d0) first++; - let end = last; - while (end > 0 && cum[end - 1] >= d1) end--; - return first <= end ? [first, end] : [end, first]; -} - -/** - * Slide the window along the track by `deltaT` (a fraction of the total distance), preserving its - * span — the Ctrl/⌘-drag pan. Clamped so the window never leaves `[0, 1]` and never resizes. - */ -export function panWindow(window: ProfileWindow, deltaT: number): ProfileWindow { - const [t0, t1] = window; - const span = t1 - t0; - const n0 = Math.max(0, Math.min(1 - span, t0 + deltaT)); - return [n0, n0 + span]; -} - -/** - * The `[lat, lon]` at distance `d` metres along the track — interpolated within the segment that - * contains it, clamped to the ends. The hover cursor's map position: one distance axis - * ({@link cumulativeDistances}) in, one point on the drawn polyline out. Null on an empty track. - */ -export function pointAtDistance( - points: readonly ProfilePoint[], - cum: readonly number[], - d: number, -): { lat: number; lon: number } | null { - if (points.length === 0 || cum.length !== points.length) return null; - if (points.length === 1) return { lat: points[0].lat, lon: points[0].lon }; - const target = Math.max(0, Math.min(d, cum[cum.length - 1])); - // Binary search for the segment holding `target` — hover runs per animation frame. - let lo = 0; - let hi = cum.length - 1; - while (lo + 1 < hi) { - const mid = (lo + hi) >> 1; - if (cum[mid] <= target) lo = mid; - else hi = mid; - } - const span = cum[hi] - cum[lo]; - const t = span > 0 ? (target - cum[lo]) / span : 0; - return { - lat: points[lo].lat + (points[hi].lat - points[lo].lat) * t, - lon: points[lo].lon + (points[hi].lon - points[lo].lon) * t, - }; -} - -/** - * The elevation at distance `d` metres along the track, or null where there is no honest number. - * Interpolated between the two track points bracketing `d`, and **only** when both carry real - * elevation. A null-elevation neighbour means `d` falls in a gap the source recorded nothing for: - * the profile's line spans such a gap, but a readout that printed that ramp would be inventing a - * number, so the label goes quiet instead. - */ -export function elevationAtDistance( - points: readonly ProfilePoint[], - cum: readonly number[], - d: number, -): number | null { - if (points.length === 0 || cum.length !== points.length) return null; - if (points.length === 1) return points[0].ele; - const target = Math.max(0, Math.min(d, cum[cum.length - 1])); - // The same binary search the map dot uses — hover runs per animation frame. - let lo = 0; - let hi = cum.length - 1; - while (lo + 1 < hi) { - const mid = (lo + hi) >> 1; - if (cum[mid] <= target) lo = mid; - else hi = mid; - } - const span = cum[hi] - cum[lo]; - const t = span > 0 ? (target - cum[lo]) / span : 0; - // Exactly on a point (the clamped ends, mostly): that point's own value is the honest - // answer, whatever its neighbour recorded. - if (t <= 0) return points[lo].ele; - if (t >= 1) return points[hi].ele; - const a = points[lo].ele; - const b = points[hi].ele; - if (a === null || b === null) return null; - return a + (b - a) * t; -} - -/** - * The index of the track point nearest `(lat, lon)`, by the same equirectangular metric the distance - * axis uses. A plain scan: preview tracks are thousands of points, and one pass per animation frame - * is nothing. `-1` on an empty track. - */ -export function nearestPointIndex(points: readonly ProfilePoint[], lat: number, lon: number): number { - const probe: ProfilePoint = { lat, lon, ele: null }; - let best = -1; - let bestM = Infinity; - for (let i = 0; i < points.length; i++) { - const m = groundDistanceM(points[i], probe); - if (m < bestM) { - bestM = m; - best = i; - } - } - return best; -} - -/** - * Build the profile for the window, or null where there is nothing honest to draw — fewer than two - * usable points in the window, or no elevation anywhere in it. A *flat* track still draws, because a - * flat line is a true statement; a track with no elevation data does not. - * - * The x axis is true distance along the whole track: points without elevation still advance it, they - * just contribute no sample. Where the window's edge cuts between two samples, the elevation at the - * cut is interpolated so the drawn span is exactly the window. - */ -export function elevationProfile( - points: readonly ProfilePoint[], - width: number, - height: number, - window: ProfileWindow = FULL_WINDOW, - pad = 2, -): ElevationProfile | null { - const cum = cumulativeDistances(points); - const totalM = cum.length ? cum[cum.length - 1] : 0; - if (totalM <= 0) return null; - - // The usable series: (distance, elevation) samples over the whole track. - const samples: Array<{ d: number; ele: number }> = []; - for (let i = 0; i < points.length; i++) { - const ele = points[i].ele; - if (ele !== null) samples.push({ d: cum[i], ele }); - } - if (samples.length < MIN_POINTS) return null; - - const startM = window[0] * totalM; - const endM = window[1] * totalM; - const drawn = windowSamples(samples, startM, endM); - if (drawn.length < MIN_POINTS) return null; - - let minEle = Infinity; - let maxEle = -Infinity; - for (const s of drawn) { - if (s.ele < minEle) minEle = s.ele; - if (s.ele > maxEle) maxEle = s.ele; - } - // A dead-flat profile gets a nominal band so the line sits mid-box instead of on an edge. - const span = Math.max(maxEle - minEle, 1); - - const w = width - 2 * pad; - const h = height - 2 * pad; - const x = (d: number) => pad + ((d - startM) / (endM - startM)) * w; - const y = (ele: number) => pad + (1 - (ele - minEle) / span) * h; - - const parts = drawn.map((s, i) => `${i === 0 ? "M" : "L"}${x(s.d).toFixed(1)} ${y(s.ele).toFixed(1)}`); - const linePath = parts.join(" "); - const baselineY = (height - pad).toFixed(1); - const first = drawn[0]; - const last = drawn[drawn.length - 1]; - const areaPath = `${linePath} L${x(last.d).toFixed(1)} ${baselineY} L${x(first.d).toFixed(1)} ${baselineY} Z`; - - return { areaPath, linePath, minEle, maxEle, startM, endM, totalM }; -} - -/** The samples inside `[d0, d1]`, with interpolated samples at any edge that cuts the series. */ -function windowSamples( - samples: ReadonlyArray<{ d: number; ele: number }>, - d0: number, - d1: number, -): Array<{ d: number; ele: number }> { - const out: Array<{ d: number; ele: number }> = []; - for (let i = 0; i < samples.length; i++) { - const s = samples[i]; - if (s.d < d0) { - const next = samples[i + 1]; - if (next && next.d > d0) out.push({ d: d0, ele: lerp(s, next, d0) }); - } else if (s.d > d1) { - const prev = samples[i - 1]; - if (prev && prev.d < d1) out.push({ d: d1, ele: lerp(prev, s, d1) }); - break; - } else { - out.push(s); - } - } - return out; -} - -function lerp(a: { d: number; ele: number }, b: { d: number; ele: number }, d: number): number { - const t = b.d === a.d ? 0 : (d - a.d) / (b.d - a.d); - return a.ele + (b.ele - a.ele) * t; -} - -/** Equirectangular ground distance in metres — fine at the scale of one track. */ -function groundDistanceM(a: ProfilePoint, b: ProfilePoint): number { - const R = 6_371_000; - const toRad = Math.PI / 180; - const dLat = (b.lat - a.lat) * toRad; - const dLon = (b.lon - a.lon) * toRad * Math.cos(((a.lat + b.lat) / 2) * toRad); - return Math.sqrt(dLat * dLat + dLon * dLon) * R; -} diff --git a/builder/web/src/lib/device/library.test.ts b/builder/web/src/lib/device/library.test.ts deleted file mode 100644 index 480be8b844..0000000000 --- a/builder/web/src/lib/device/library.test.ts +++ /dev/null @@ -1,523 +0,0 @@ -/** - * The managed ride library's pull, end to end against the simulated device. - * - * Each test here is a *library* assertion rather than a call-count assertion: what the library holds - * afterwards, and whether the files behind those rows exist. The failure modes this feature has are - * not "the wrong function was called" — they are "the app believes it has a rider's only copy of a - * ride and it does not". - * - * The real durable write is Rust (`builder/desktop/src/rides.rs`) and is tested there, against the - * real filesystem, with the power cut between `write()` and `fsync()`. What *this* file owns is the - * other half of the same claim: a ride only counts as held once the library's `import()` has - * resolved. {@link RecordingLibrary} is a fake, not a mock of the Tauri boundary: it holds real - * state, it can fail, and the tests read its state rather than its call log. - * - * A possession acknowledgement is deliberately absent from this cable surface: it changes no object, - * so it has no store meaning and USB does not carry it. The ordering discipline it needed — an - * import resolves only after fsync — is kept regardless, because it is what makes - * {@link PullReport} true. - */ - -import { existsSync, readFileSync } from "node:fs"; -import { dirname, join } from "node:path"; -import { fileURLToPath } from "node:url"; -import { beforeAll, describe, expect, it } from "vitest"; - -import { initConvert } from "../convert/bridge"; -import type { FlatStoreClient } from "../usb/client"; -import { flatDevice } from "../usb/flat-device"; -import { loadFlatDevice } from "../../../test-support/flat-device/load"; -import { encodeRideObject, type RideObject, type RidePoint } from "../usb/objects"; -import { EntryFlags, ObjectKind } from "../usb/protocol"; -import { - PREVIEW_POINTS, - previewTrack, - pullRide, - pullRides, - trackPath, - type LibraryRide, - type LibraryView, - type RideImport, - type RideLibrary, -} from "./library"; -import { rideAccess, rideKey, rideScope, type RideScope } from "./rides"; -import type { JobContext, JobPhase } from "./progress"; - -beforeAll(async () => { - const wasm = join(dirname(fileURLToPath(import.meta.url)), "..", "core", "pkg", "obc_builder_bridge_bg.wasm"); - if (!existsSync(wasm)) { - throw new Error(`the wasm bridge is not built (${wasm} missing). Run \`npm run build:wasm\`.`); - } - await initConvert(readFileSync(wasm)); - await loadFlatDevice(); -}); - -/** The loopback link's default serial, and the two cards these tests swap between. */ -const SERIAL = "0011223344556677"; -const CARD_A = "8f2c41d96b074ea3b1559c207de83466"; -const CARD_B = CARD_A.slice(0, 8) + "00000000000000000000abcd"; - -function ctx(): JobContext { - const phases: JobPhase[] = []; - return { - signal: new AbortController().signal, - cancel() {}, - phase: (phase) => phases.push(phase), - progress: () => undefined, - }; -} - -/** A ride the device would have recorded: a short, real-looking track through the Black Forest. */ -function rideObject(name: string, startTime: number, points = 24): RideObject { - const track: RidePoint[] = []; - for (let i = 0; i < points; i++) { - track.push({ - tMs: i * 5_000, - latMicrodegrees: Math.round((47.9 + i * 0.0012) * 1e6), - lonMicrodegrees: Math.round((7.85 + i * 0.0009) * 1e6), - elevationM: 300 + i * 4, - segmentStart: i === 0, - hrBpm: 140 + (i % 7), - cadenceRpm: 80, - powerW: null, - }); - } - return { - version: 6, - isDemo: false, - effortLimits: { maxHrBpm: null, ftpW: null }, - name, - startTime, - distanceM: 12_340, - movingTimeS: 2_700, - avgSpeedCms: 457, - climbM: 96, - descentM: 96, - avgHr: 143, - maxHr: 171, - avgCadence: 80, - avgPower: null, - maxPower: null, - energyKj: null, - bikeType: 0, - trip: null, - points: track, - }; -} - -/** - * A ride library that keeps real state and can be made to fail. - * - * Not a mock of the `invoke()` calls — the tests below never look at what was called. It models the - * one property the whole feature hangs off: **`import()` resolving is what makes a ride held**. A - * rejected import leaves nothing behind, exactly as a power cut before fsync does on the real thing. - */ -class RecordingLibrary implements RideLibrary { - readonly rides = new Map(); - /** Every library call, in order — read by the ordering assertions and nothing else. */ - readonly events: string[] = []; - /** Keys whose import must fail, as a crash between write and fsync would. */ - failFor = new Set(); - folder = "/library"; - - async view(): Promise { - return { folder: this.folder, isDefault: true, rides: [...this.rides.values()] }; - } - - async import(ride: RideImport): Promise<{ ride: LibraryRide; imported: boolean }> { - const key = `${ride.serial}:${ride.storeId}:${ride.objectId}`; - if (this.failFor.has(key)) { - this.events.push(`import-failed:${ride.objectId}`); - throw new Error("simulated power loss between write() and fsync()"); - } - const held = this.rides.get(key); - if (held) { - // The real thing rewrites the files it is missing, keeps the names and keeps - // `importedAt`, and reports `imported: false` — this is the same ride arriving again, - // not a new one. Mirrored here so the pull's repair path is exercised rather than - // stubbed. - const repaired = { ...held, present: true, gpxPresent: true }; - this.rides.set(key, repaired); - this.gpx.set(key, ride.gpx); - this.objects.set(key, ride.object); - this.events.push(held.present ? `import-noop:${ride.objectId}` : `repaired:${ride.objectId}`); - return { ride: repaired, imported: false }; - } - const landed: LibraryRide = { - key, - serial: ride.serial, - storeId: ride.storeId, - objectId: ride.objectId, - name: ride.name, - startTime: ride.startTime, - distanceM: ride.distanceM, - movingTimeS: ride.movingTimeS, - climbM: ride.climbM, - points: ride.points, - bytes: ride.object.length, - crc32: ride.crc32, - importedAt: 1_700_000_000 + this.rides.size, - // The split layout: the archive lives in app data, only the GPX in the visible folder. - ridePath: `/app-data/ride-archive/${ride.objectId}.obcride`, - gpxPath: `${this.folder}/${ride.objectId}.gpx`, - track: ride.track, - present: true, - gpxPresent: true, - }; - this.rides.set(key, landed); - this.gpx.set(key, ride.gpx); - this.objects.set(key, ride.object); - this.events.push(`imported:${ride.objectId}`); - return { ride: landed, imported: true }; - } - - readonly gpx = new Map(); - readonly objects = new Map(); - - async readObject(key: string): Promise { - const bytes = this.objects.get(key); - if (!bytes) throw new Error(`no ride ${key}`); - return bytes; - } - - async writeGpx(key: string, gpx: string): Promise { - this.gpx.set(key, gpx); - return `${this.folder}/${key}.gpx`; - } - - async reveal(): Promise {} - async chooseFolder(): Promise { - return null; - } - - /** A ride the rider deleted in the file manager: the record stays, the bytes are gone. */ - loseFile(key: string): void { - const held = this.rides.get(key); - if (held) this.rides.set(key, { ...held, present: false }); - } - - /** Keys whose file is really there — "what is on the disk", which is what a pull asks. */ - held(): string[] { - return [...this.rides.values()].filter((ride) => ride.present).map((ride) => ride.key).sort(); - } -} - -/** A live client + device pair over the loopback pipe, plus the narrowed source the pull is given. */ -function connect(options: { storeId?: string } = {}) { - const rig = flatDevice({ storeId: options.storeId ?? CARD_A }); - return { ...rig, source: rideAccess(rig.client) }; -} - -/** - * The connected device's `(serial, era)`, derived exactly as the UI derives it — over the two reads - * every connection already does. Re-read rather than remembered, because that is the point of the - * era: a card swap changes it under a running app. - */ -async function scopeNow(client: FlatStoreClient): Promise { - const page = await client.listPage({}); - return rideScope(await client.deviceInfo(), { storeId: page.storeId, commitSequence: page.commitSequence }); -} - -/** - * Put a ride on the device's card, catalog entry and all. - * - * The store assigns the id, so a caller that needs one reads it off the entry that comes back. - * Seeding in order gives 1, 2, 3 — which is what the keys below are written against. - */ -function seedRide(device: ReturnType["device"], name: string, startTime: number) { - const bytes = encodeRideObject(rideObject(name, startTime)); - const entry = device.seed({ kind: ObjectKind.Ride, displayName: name, bytes }); - return { entry, bytes }; -} - -// --- acceptance ---------------------------------------------------------------- - -describe("pulling rides into the library", () => { - it("pulls every ride the card holds and deduplicates them by the id the card assigned", async () => { - // The ids are the store's, not this test's. That a key survives an id above 2^53 is pinned - // where the key is built (`rides.test.ts`, "keys the complete card identity and decimal u64 - // object id"); what is pinned here is that a pull uses that key and repeats nothing. - const { device, client, source, close } = connect(); - try { - const scope = await scopeNow(client); - const seeded = ["Dawn", "Noon", "Dusk"].map((name) => seedRide(device, name, 1_700_000_000).entry); - const ids = seeded.map((entry) => entry.objectId); - const library = new RecordingLibrary(); - const first = await pullRides(source, library, scope, ctx()); - expect(first.failed).toEqual([]); - expect(first.imported.map((ride) => ride.objectId)).toEqual(ids); - expect(library.held()).toEqual(ids.map((id) => `${SERIAL}:${CARD_A}:${id}`).sort()); - const second = await pullRides(source, library, scope, ctx()); - expect(second.imported).toEqual([]); - expect(second.alreadyHeld).toBe(3); - } finally { - await close(); - } - }); - - it("is idempotent: a second pull downloads nothing, duplicates nothing and re-stamps nothing", async () => { - const { device, client, source, close } = connect(); - try { - const scope = await scopeNow(client); - seedRide(device, "Dawn Patrol", 1_700_000_000); - seedRide(device, "Gravel Hour", 1_700_100_000); - const library = new RecordingLibrary(); - - const first = await pullRides(source, library, scope, ctx()); - expect(first.listed).toBe(2); - expect(first.imported.map((ride) => ride.objectId)).toEqual([1n, 2n]); - const stamps = [...library.rides.values()].map((r) => [r.key, r.importedAt] as const); - - const second = await pullRides(source, library, scope, ctx()); - expect(second.imported).toEqual([]); - expect(second.alreadyHeld).toBe(2); - expect(library.rides.size).toBe(2); - // The ride files were never touched a second time. - expect(library.events.filter((e) => e.startsWith("imported:"))).toEqual(["imported:1", "imported:2"]); - expect([...library.rides.values()].map((r) => [r.key, r.importedAt] as const)).toEqual(stamps); - } finally { - await close(); - } - }); - - it("skips a ride the device is still recording, and names it in the report", async () => { - // A `GET` of a `RECORDING` entry is refused — its length and CRC are zero until the commit - // that ends it — so there is nothing to copy yet. Counting it is what lets the page say "one - // ride is still being recorded" rather than silently listing fewer rides than the device has. - const { device, client, source, close } = connect(); - try { - const scope = await scopeNow(client); - seedRide(device, "Finished", 1_700_000_000); - device.seed({ kind: ObjectKind.Ride, displayName: "Still going", flags: EntryFlags.Recording }); - const library = new RecordingLibrary(); - - const report = await pullRides(source, library, scope, ctx()); - - expect(report.recording).toBe(1); - expect(report.listed, "the recording ride is not something the pull could act on").toBe(1); - expect(report.imported.map((ride) => ride.objectId)).toEqual([1n]); - expect(report.failed).toEqual([]); - expect(library.held()).toEqual([rideKey(scope, 1n)]); - } finally { - await close(); - } - }); - - it("leaves a ride out of the library when its durable write fails, and fetches it again next time", async () => { - const { device, client, source, close } = connect(); - try { - const scope = await scopeNow(client); - seedRide(device, "Landed", 1_700_000_000); - seedRide(device, "Interrupted", 1_700_100_000); - seedRide(device, "Also landed", 1_700_200_000); - const library = new RecordingLibrary(); - library.failFor.add(rideKey(scope, 2n)); - - const report = await pullRides(source, library, scope, ctx()); - - expect(report.failed.map((f) => f.objectId)).toEqual([2n]); - expect(report.imported.map((r) => r.objectId)).toEqual([1n, 3n]); - expect(library.held()).toEqual([rideKey(scope, 1n), rideKey(scope, 3n)].sort()); - - // …and the next pull, with the write working, fetches ride 2 and only then holds it. - library.failFor.clear(); - const retry = await pullRides(source, library, scope, ctx()); - expect(retry.imported.map((r) => r.objectId)).toEqual([2n]); - expect(library.held()).toHaveLength(3); - } finally { - await close(); - } - }); - - it("imports both rides when a card swap recycles an object id", async () => { - // A re-initialized card mints a new `StoreId` and starts its ids at 1 again, so a *different* - // ride lands on id 1. A bare-id library would hold one row and answer "up to date" forever. - const library = new RecordingLibrary(); - - const first = connect({ storeId: CARD_A }); - const oldEra = await scopeNow(first.client); - expect(oldEra.storeId).toBe(CARD_A); - seedRide(first.device, "Old era ride", 1_700_000_000); - await pullRides(first.source, library, oldEra, ctx()); - expect(library.rides.size).toBe(1); - await first.close(); - - const second = connect({ storeId: CARD_B }); - try { - const newEra = await scopeNow(second.client); - expect(newEra.storeId).toBe(CARD_B); - expect(newEra.serial).toBe(oldEra.serial); - seedRide(second.device, "New era ride", 1_800_000_000); - - const after = await pullRides(second.source, library, newEra, ctx()); - expect(after.imported.map((r) => r.name)).toEqual(["New era ride"]); - // Two rows, two keys, one object id. - expect([...library.rides.keys()].sort()).toEqual( - [`${SERIAL}:${CARD_A}:1`, `${SERIAL}:${CARD_B}:1`].sort(), - ); - expect(new Set([...library.rides.values()].map((r) => r.objectId))).toEqual(new Set([1n])); - } finally { - await second.close(); - } - }); - - it("re-downloads a ride whose file the rider deleted, keeping its original importedAt", async () => { - // "Do I already have it" is a question about the disk, not about the index: a record whose - // file is gone is not a durable copy, so the ride is fetched again — and it is a repair - // rather than an import, because the rider first got it long ago. - const { device, client, source, close } = connect(); - try { - const scope = await scopeNow(client); - for (const [at, name] of ["One", "Two", "Three"].entries()) { - seedRide(device, name, 1_700_000_000 + at * 1000); - } - const library = new RecordingLibrary(); - await pullRides(source, library, scope, ctx()); - const firstStamp = library.rides.get(rideKey(scope, 2n))!.importedAt; - - library.loseFile(rideKey(scope, 2n)); - const again = await pullRides(source, library, scope, ctx()); - - expect(again.imported).toEqual([]); - expect(again.repaired.map((r) => r.objectId)).toEqual([2n]); - expect(again.repaired[0].importedAt).toBe(firstStamp); - expect(again.alreadyHeld).toBe(2); - expect(library.held()).toHaveLength(3); - } finally { - await close(); - } - }); - - it("refuses to import anything from a device whose card identity it could not read", async () => { - // The fail-closed posture: without both halves of the era, an id from this device cannot be - // told apart from another device's, so nothing is keyed and nothing is copied. A missing - // StoreId never shares an identity with a readable card. - const { device, source, close } = connect(); - try { - seedRide(device, "Unkeyable", 1_700_000_000); - const library = new RecordingLibrary(); - await expect(pullRides(source, library, { serial: SERIAL, storeId: null }, ctx())).rejects.toMatchObject({ - name: "RideLibraryError", - code: "no-scope", - }); - await expect(pullRides(source, library, { serial: "", storeId: CARD_A }, ctx())).rejects.toThrow( - /card identity/, - ); - expect(library.rides.size).toBe(0); - } finally { - await close(); - } - }); - - it("stores a GPX the device itself would have written, and the object it sent", async () => { - const { device, client, source, close } = connect(); - try { - const scope = await scopeNow(client); - const { bytes } = seedRide(device, "Schauinsland", 1_700_000_000); - const library = new RecordingLibrary(); - await pullRides(source, library, scope, ctx()); - - const key = rideKey(scope, 1n); - // The archive is the device's bytes, unaltered — which is what makes the library - // lossless while `track_to_gpx` still omits `"); - expect(gpx.match(/ { - // An 88-byte catalog entry is id, revision, length, CRC, kind, flags and a display name. A - // ride's start time, distance and moving time exist only inside the object — which this path - // downloads anyway, so nothing is lost; what is gone is showing those figures beforehand. - const { device, client, source, close } = connect(); - try { - const scope = await scopeNow(client); - const ride = rideObject("Kaiserstuhl", 1_700_300_000); - const seeded = device.seed({ - kind: ObjectKind.Ride, - displayName: "Kaiserstuhl", - bytes: encodeRideObject(ride), - }); - const library = new RecordingLibrary(); - - const landed = (await pullRides(source, library, scope, ctx())).imported[0]; - - expect(landed).toMatchObject({ - objectId: seeded.objectId, - serial: scope.serial, - storeId: scope.storeId, - name: ride.name, - startTime: ride.startTime, - distanceM: ride.distanceM, - movingTimeS: ride.movingTimeS, - climbM: ride.climbM, - points: ride.points.length, - }); - } finally { - await close(); - } - }); - - it("pulls one ride down the same path the batch uses", async () => { - const { device, client, source, close } = connect(); - try { - const scope = await scopeNow(client); - seedRide(device, "First", 1_700_000_000); - seedRide(device, "Second", 1_700_100_000); - const library = new RecordingLibrary(); - - const listed = await source.listRides(); - const one = await pullRide(source, library, scope, listed[1], ctx()); - - expect(one.imported).toBe(true); - expect(library.held()).toEqual([rideKey(scope, 2n)]); - } finally { - await close(); - } - }); -}); - -describe("the track preview", () => { - it("is drawn from the ride's own points, keeping the first and the last", () => { - const ride = rideObject("Long", 1_700_000_000, 5_000); - const track = previewTrack(ride); - expect(track.length).toBeLessThanOrEqual(PREVIEW_POINTS); - expect(track.length).toBeGreaterThan(2); - expect(track[0]).toEqual([ - ride.points[0].latMicrodegrees / 1e6, - ride.points[0].lonMicrodegrees / 1e6, - ]); - const last = ride.points[ride.points.length - 1]; - expect(track[track.length - 1]).toEqual([ - last.latMicrodegrees / 1e6, - last.lonMicrodegrees / 1e6, - ]); - }); - - it("keeps a short ride whole", () => { - expect(previewTrack(rideObject("Short", 1, 10))).toHaveLength(10); - expect(previewTrack({ ...rideObject("None", 1, 1), points: [] })).toEqual([]); - }); - - it("fits inside its box and never divides by zero on a ride that never moved", () => { - const path = trackPath(previewTrack(rideObject("Loop", 1, 100)), 120, 60); - expect(path).toMatch(/^M[\d.]+ [\d.]+L/); - const coords = [...(path ?? "").matchAll(/([\d.]+) ([\d.]+)/g)]; - expect(coords.length).toBeGreaterThan(2); - for (const [, x, y] of coords) { - expect(Number(x)).toBeGreaterThanOrEqual(0); - expect(Number(x)).toBeLessThanOrEqual(120); - expect(Number(y)).toBeGreaterThanOrEqual(0); - expect(Number(y)).toBeLessThanOrEqual(60); - } - // A stationary ride is a dot, not a NaN. - expect(trackPath([[48, 7.8], [48, 7.8]], 100, 50)).not.toContain("NaN"); - expect(trackPath([[48, 7.8]], 100, 50)).toBeNull(); - expect(trackPath([], 100, 50)).toBeNull(); - }); -}); diff --git a/builder/web/src/lib/device/library.ts b/builder/web/src/lib/device/library.ts deleted file mode 100644 index f5cfbc1e48..0000000000 --- a/builder/web/src/lib/device/library.ts +++ /dev/null @@ -1,462 +0,0 @@ -/** - * The managed ride library, and the pull that fills it. - * - * The counterpart to `rides.ts`, which is the hosted tier's one-shot GPX export and is deliberately - * a dead end. This is the real product for Android and no-phone riders: rides land in a folder they - * can see, back up and drag into anything. - * - * Nothing in this file is Tauri-aware. The {@link RideLibrary} it writes through is an interface - * whose only shipped implementation is `lib/desktop/library.ts`, and whose other implementation is - * the fake in `library.test.ts`. That split is what lets the two rules below be tested as behaviour - * rather than as a mocked call sequence. - * - * **Always pull the full ride list and dedupe locally.** What decides whether a ride is fetched is - * whether *this library* already holds it, never anything the device says about it. Pulling twice is - * then a no-op by construction. `LIST` makes that cheap: a catalog page is metadata, and nothing is - * downloaded to decide what to download. - * - * **The key is `(serial, StoreId, ObjectId)`.** An `ObjectId` is never reused within one card, but a - * re-initialized card mints a new `StoreId` and starts its ids again, so a bare id names two - * different rides on either side of one. The iOS companion uses the same key, so the two libraries - * agree about what "the same ride" is. - * - * A possession acknowledgement is not on the USB cable: it changes no object and therefore has no - * store meaning, so it keeps the BLE control surface it already had. A rider who syncs only over the - * cable gets their rides copied and the device is not told. The ordering discipline that ack needed - * — import resolves only after fsync — is kept anyway, because it is what makes - * {@link PullReport} true. - */ - -import { trackToGpx } from "../convert/bridge"; -import { Crc32 } from "../usb/crc32"; -import { decodeRideObject, encodeRideObject, type RideObject } from "../usb/objects"; -import type { CatalogEntry } from "../usb/protocol"; -import { - RideExportError, - recordedRides, - rideKey, - type RideScope, - type RideSource, -} from "./rides"; -import type { JobContext } from "./progress"; - -export type { CatalogEntry, RideObject, RideScope }; - -/** - * One ride in the library, as the index stores it. - * - * Mirrors `rides::LibraryRide` in `builder/desktop/src/rides.rs` field for field. `present` and - * `gpxPresent` are recomputed against the filesystem on every read there, so they describe the disk - * now rather than when the entry was written. The two paths point at different places: `ridePath` is - * the archived `.obcride` in **app data**, `gpxPath` the `.gpx` in the **visible** folder, and - * `present` means the archive file exists. - */ -export interface LibraryRide { - readonly key: string; - readonly serial: string; - /** The complete lowercase 32-digit StoreId hex string. */ - readonly storeId: string; - readonly objectId: bigint; - readonly name: string; - /** Ride start, unix seconds UTC. `0` on a device that never had a trusted clock. */ - readonly startTime: number; - readonly distanceM: number; - readonly movingTimeS: number; - readonly climbM: number; - readonly points: number; - readonly bytes: number; - readonly crc32: number; - /** When this app first landed the ride. Never re-stamped by a second pull. */ - readonly importedAt: number; - readonly ridePath: string; - readonly gpxPath: string; - /** The downsampled `[lat, lon]` preview, in degrees — drawn from the ride's own points. */ - readonly track: readonly (readonly [number, number])[]; - readonly present: boolean; - readonly gpxPresent: boolean; -} - -/** One ride, on its way into the library. */ -export interface RideImport { - readonly serial: string; - readonly storeId: string; - readonly objectId: bigint; - readonly name: string; - readonly startTime: number; - readonly distanceM: number; - readonly movingTimeS: number; - readonly climbM: number; - readonly points: number; - readonly crc32: number; - readonly track: readonly (readonly [number, number])[]; - /** The ride object exactly as it came off the wire — the lossless archive. */ - readonly object: Uint8Array; - readonly gpx: string; -} - -/** Where the library is, and what is in it. */ -export interface LibraryView { - readonly folder: string; - /** False once the rider has relocated it. Only affects what the UI says. */ - readonly isDefault: boolean; - readonly rides: readonly LibraryRide[]; -} - -/** - * The managed folder, as this module needs it. - * - * Every method is a promise because the only implementation is a filesystem behind an IPC boundary, - * and because {@link import} has to be awaited for its durability to mean anything. - */ -export interface RideLibrary { - view(): Promise; - /** - * Land one ride durably. **Resolves only after fsync** — of the ride object, of the GPX, and of - * the index that names them. Idempotent on `(serial, storeId, id)`: a second import of a ride - * already held writes nothing and does not move its `importedAt`. - */ - import(ride: RideImport): Promise<{ ride: LibraryRide; imported: boolean }>; - /** The stored ride object of one key — what a GPX re-export decodes. */ - readObject(key: string): Promise; - /** (Re-)write one ride's GPX. Resolves to where it went. */ - writeGpx(key: string, gpx: string): Promise; - /** Show a file (or the folder) in the OS file manager. */ - reveal(path: string): Promise; - /** Open the native chooser and move the library. `null` when the rider dismissed it. */ - chooseFolder(): Promise; -} - -/** - * - `no-scope` — the device reported no serial, or no `StoreId`. Ids from it cannot be keyed to an - * era, so nothing is imported. - */ -export type RideLibraryErrorCode = "no-scope"; - -export class RideLibraryError extends Error { - readonly code: RideLibraryErrorCode; - - constructor(code: RideLibraryErrorCode, message: string) { - super(message); - this.name = "RideLibraryError"; - this.code = code; - } -} - -/** One ride the pull could not land, and why. The rest of the batch still lands. */ -interface RideFailure { - readonly objectId: bigint; - readonly name: string; - readonly message: string; -} - -export interface PullReport { - /** Rides the device listed — the *whole* catalog, always. */ - readonly listed: number; - /** Rides new to this library. */ - readonly imported: readonly LibraryRide[]; - /** - * Rides the library had a *record* of but not the file — most often because the rider deleted - * something in the file manager. Re-downloaded and re-written; their `importedAt` is untouched, - * so they are not new and are not counted as such. - */ - readonly repaired: readonly LibraryRide[]; - /** Rides the library already held whole, so nothing was downloaded. */ - readonly alreadyHeld: number; - readonly failed: readonly RideFailure[]; - /** Rides the device is still recording, which it refuses to serve. Named, never silent. */ - readonly recording: number; -} - -/** - * Pull every ride the device does not already hold a durable copy of here. - * - * The order is the contract: - * - * 1. list the whole ride catalog, unconditionally, minus what is still recording; - * 2. dedupe locally by `(serial, StoreId, ObjectId)` against the library's own index; - * 3. download, decode, convert and import each missing ride one at a time, each import resolving - * only after its fsync. - * - * A ride that fails at step 3 is reported and skipped; the others still land. - */ -export async function pullRides( - source: RideSource, - library: RideLibrary, - scope: RideScope, - ctx: JobContext, -): Promise { - requireScope(scope); - - ctx.phase("reading"); - // Rule 1: the full catalog, every time. There is no "what's new" query and there must not be - // one — the device does not know what this library holds. - const listed = await source.listRides(ctx.signal); - const available = recordedRides(listed); - - // Rule 2: dedupe here, by the composite key. `present` is part of the test on purpose — a record - // whose ride object the rider deleted is not a durable copy, so it is fetched again. - // - // `gpxPresent` deliberately is *not*: a missing GPX is a derived file and the archive it comes - // from is right there, so the logbook's auto-repair regenerates it locally instead - // ({@link reexportGpx}). - const held = new Map((await library.view()).rides.map((ride) => [ride.key, ride])); - const wanted = [...available] - // Oldest first, by `ObjectId`. A `LIST` entry carries no start time, and the id is a - // monotonic allocation cursor — so on one card, id order *is* recording order. It is a proxy, - // and it is the only one the catalog offers. - .sort((a, b) => (a.objectId < b.objectId ? -1 : a.objectId > b.objectId ? 1 : 0)) - .filter((entry) => !held.get(rideKey(scope, entry.objectId))?.present); - - const imported: LibraryRide[] = []; - const repaired: LibraryRide[] = []; - const failed: RideFailure[] = []; - for (const entry of wanted) { - ctx.signal.throwIfAborted(); - try { - const landed = await importRide(source, library, scope, entry, ctx); - // Everything in `wanted` was missing something, so a ride the library reports as not - // new was a record without its file — repaired rather than imported. - (landed.imported ? imported : repaired).push(landed.ride); - } catch (cause) { - if (ctx.signal.aborted) throw cause; - failed.push({ - objectId: entry.objectId, - name: entry.displayName || `Ride ${entry.objectId}`, - message: cause instanceof Error ? cause.message : String(cause), - }); - } - } - - ctx.phase("done"); - return { - listed: available.length, - imported, - repaired, - alreadyHeld: available.length - wanted.length, - failed, - recording: listed.length - available.length, - }; -} - -/** Both halves of the era, or nothing is copied. */ -function requireScope(scope: RideScope): asserts scope is RideScope & { storeId: string } { - if (!scope.serial || scope.storeId === null) { - throw new RideLibraryError( - "no-scope", - "This device did not report both a serial number and a card identity, so its ride ids " + - "cannot be told apart from another device's. Nothing was copied.", - ); - } -} - -/** Pull one ride and land it. Split out so a single-ride retry is the same code path. */ -async function importRide( - source: RideSource, - library: RideLibrary, - scope: RideScope & { storeId: string }, - entry: CatalogEntry, - ctx: JobContext, -): Promise<{ ride: LibraryRide; imported: boolean }> { - ctx.phase("downloading", Number(entry.payloadLength)); - const object = await source.downloadRide(entry, { - signal: ctx.signal, - onProgress: (done: number, total: number) => ctx.progress(done, total), - }); - - ctx.phase("converting", object.length); - // The client verified the whole-payload CRC before returning, so a decode failure here is a - // *format* disagreement — firmware newer than this build — and needs the other sentence. - let ride: RideObject; - try { - ride = decodeRideObject(object); - } catch (cause) { - throw new RideExportError( - "unreadable-ride", - "That ride arrived intact but this build cannot read it. That usually means the device " + - "is running newer firmware than the app.", - { cause }, - ); - } - if (ride.points.length === 0) { - throw new RideExportError( - "empty-ride", - "That ride has no recorded points — it was probably stopped before the device had a fix.", - ); - } - - const gpx = await gpxOf(ride); - ctx.phase("verifying"); - // Everything below this line is the durable write. - // - // Every field but the id and the name comes from the **payload**: a `LIST` entry carries id, - // revision, length, CRC, kind, flags and a display name, so the distance, the duration and the - // start time exist only inside the ride object. This path downloads the object anyway; what is - // gone is the ability to show those figures *before* downloading. - return library.import({ - serial: scope.serial, - storeId: scope.storeId, - objectId: entry.objectId, - name: ride.name || entry.displayName, - startTime: ride.startTime, - distanceM: ride.distanceM, - movingTimeS: ride.movingTimeS, - climbM: ride.climbM, - points: ride.points.length, - // The device's own CRC-32 over the same bytes, kept in the index so the archive can be - // re-checked without the device. It is also what a lost create is reconciled against. - crc32: Crc32.of(object), - track: previewTrack(ride), - object, - gpx, - }); -} - -/** Pull one ride: the per-row pull, same code path as the bulk one. */ -export async function pullRide( - source: RideSource, - library: RideLibrary, - scope: RideScope, - entry: CatalogEntry, - ctx: JobContext, -): Promise<{ ride: LibraryRide; imported: boolean }> { - requireScope(scope); - const result = await importRide(source, library, scope, entry, ctx); - ctx.phase("done"); - return result; -} - -/** - * The GPX, from the same `obc_route::track_to_gpx` the device runs at Finish. - * - * Through the wasm bridge over the same finished bytes the device serves, pinned byte-for-byte - * against `specs/vectors/track-export.gpx`. There is no TypeScript GPX writer in this app and there - * must never be one — a library whose files disagreed with the device's own export would be a - * slow-burning support problem. - */ -export async function gpxOf(ride: RideObject): Promise { - return trackToGpx(encodeRideObject(ride), ride.name); -} - -/** Re-export one library ride's GPX from its stored object. The auto-repair is this, in a loop. */ -export async function reexportGpx(library: RideLibrary, ride: LibraryRide): Promise { - const object = await library.readObject(ride.key); - return library.writeGpx(ride.key, await gpxOf(decodeRideObject(object))); -} - -/** - * How many points a stored preview keeps. - * - * The list draws a track a couple of hundred pixels wide, so more than this is index weight nobody - * can see — and the index is read on every open. The Rust side enforces the same number, because a - * ceiling only one end believes in is not a ceiling. - */ -export const PREVIEW_POINTS = 256; - -/** - * Downsample any `[lat, lon]` track to at most {@link PREVIEW_POINTS}, rounded to six decimals. - * - * Uniform stride rather than Douglas–Peucker: this is a thumbnail, the input is already a recorded - * track, and a stride cannot introduce a shortcut across a switchback the way a tolerance-based - * simplifier can. The first and last points are always kept. Shared by the library index and the - * device page's thumbnail store, so a ride thumbnail is the same points in both places. - */ -export function downsampleTrack(points: readonly (readonly [number, number])[]): Array<[number, number]> { - if (points.length === 0) return []; - // At or under the cap nothing is dropped — which also makes a second pass a no-op, so a track - // that went through the ride library's downsample once is not thinned again by the thumb store. - const stride = points.length <= PREVIEW_POINTS ? 1 : Math.ceil(points.length / (PREVIEW_POINTS - 1)); - const out: Array<[number, number]> = []; - for (let i = 0; i < points.length; i += stride) { - out.push([round6(points[i][0]), round6(points[i][1])]); - } - const last = points[points.length - 1]; - const tail: [number, number] = [round6(last[0]), round6(last[1])]; - if (out.length === 0 || out[out.length - 1][0] !== tail[0] || out[out.length - 1][1] !== tail[1]) { - out.push(tail); - } - return out; -} - -/** A downsampled `[lat, lon]` track for the list — {@link downsampleTrack} over a ride's points. */ -export function previewTrack(ride: RideObject): Array<[number, number]> { - return downsampleTrack(ride.points.map((p) => [p.latMicrodegrees / 1e6, p.lonMicrodegrees / 1e6])); -} - -/** Six decimals is a ~11 cm grid — the device's own GPX precision, and about a third of the JSON. */ -export function round6(deg: number): number { - return Math.round(deg * 1e6) / 1e6; -} - -/** One track fitted into a box by {@link fitTracks}: its path, and where it starts and ends. */ -export interface FittedTrack { - /** `M … L …` path in the `width × height` viewBox. */ - readonly d: string; - /** Projected `[x, y]` of the first point — the start dot. */ - readonly start: readonly [number, number]; - /** Projected `[x, y]` of the last point — the end dot. */ - readonly end: readonly [number, number]; -} - -/** - * Fit one or more `[lat, lon]` tracks into a shared `width × height` box. - * - * One projection for the lot — a trip's stages are drawn against common bounds, so where stage 2 - * begins is where stage 1 ended. Equirectangular with a `cos(lat)` correction on longitude, which is - * the projection a few kilometres of track deserves. A track with fewer than two points maps to - * `null`. - */ -export function fitTracks( - tracks: ReadonlyArray, - width: number, - height: number, - pad = 2, -): Array { - const all = tracks.flat(); - if (all.length < 2) return tracks.map(() => null); - const lats = all.map((p) => p[0]); - const lons = all.map((p) => p[1]); - const midLat = (Math.min(...lats) + Math.max(...lats)) / 2; - const kx = Math.cos((midLat * Math.PI) / 180) || 1e-6; - - const xs = lons.map((lon) => lon * kx); - const minX = Math.min(...xs); - const maxX = Math.max(...xs); - const minY = Math.min(...lats); - const maxY = Math.max(...lats); - // A ride that never moved is a dot, not a divide-by-zero. - const spanX = maxX - minX || 1e-9; - const spanY = maxY - minY || 1e-9; - const scale = Math.min((width - 2 * pad) / spanX, (height - 2 * pad) / spanY); - const offsetX = (width - spanX * scale) / 2; - const offsetY = (height - spanY * scale) / 2; - - const project = (point: readonly [number, number]): [number, number] => [ - offsetX + (point[1] * kx - minX) * scale, - // SVG y grows downwards; north is up. - height - offsetY - (point[0] - minY) * scale, - ]; - - return tracks.map((track) => { - if (track.length < 2) return null; - const d = track - .map((point, i) => { - const [x, y] = project(point); - return `${i === 0 ? "M" : "L"}${x.toFixed(1)} ${y.toFixed(1)}`; - }) - .join(""); - return { d, start: project(track[0]), end: project(track[track.length - 1]) }; - }); -} - -/** - * An SVG path for one preview track, fitted to a `width × height` box — {@link fitTracks} for the - * single-track case. Returns `null` when there is nothing to draw. - */ -export function trackPath( - track: readonly (readonly [number, number])[], - width: number, - height: number, - pad = 2, -): string | null { - return fitTracks([track], width, height, pad)[0]?.d ?? null; -} diff --git a/builder/web/src/lib/device/manage.test.ts b/builder/web/src/lib/device/manage.test.ts deleted file mode 100644 index 15ced6110f..0000000000 --- a/builder/web/src/lib/device/manage.test.ts +++ /dev/null @@ -1,187 +0,0 @@ -/** - * Rename and trip editing: byte-level checks for the name rewrite (the one place this code edits a - * format by hand), loopback round-trips for the replace-at-same-id semantics everything rests on. - * - * Both mutations are a `PUT` naming an existing object, so the two properties worth pinning - * against a real device are that the replace keeps the `ObjectId` — every reference to the route - * survives — and that it carries the revision it expects, so a listing something else has already - * overtaken fails the compare-and-swap instead of clobbering. - */ - -import { beforeAll, describe, expect, it } from "vitest"; - -import { - MAX_TRIP_STAGE_ID, - TripStageError, - addStage, - createTrip, - moveStage, - removeStage, - renameRoute, - renameRouteBytes, - stageId, - updateTrip, -} from "./manage"; -import { decodeRouteHeader } from "./route"; -import { decodeTripObject, wholeDay, type TripObject } from "../usb/objects"; -import { flatDevice } from "../usb/flat-device"; -import { loadFlatDevice } from "../../../test-support/flat-device/load"; -import { ObjectKind } from "../usb/protocol"; - -/** A minimal, valid OBCR: the 160-byte header + no points — enough for the header codec. */ -function obcrWithName(name: string): Uint8Array { - const out = new Uint8Array(160); - const view = new DataView(out.buffer); - view.setUint32(0, 0x4f424352, false); // "OBCR" - out[4] = 5; // version - const bytes = new TextEncoder().encode(name); - out[6] = bytes.length; - out.set(bytes, 64); - return out; -} - -describe("renameRouteBytes", () => { - it("rewrites the name and only the name", () => { - const original = obcrWithName("Old name"); - original[100 + 12] = 0; // (offset 112 is outside the name field) - const renamed = renameRouteBytes(original, "Grimsel – Furka"); - expect(decodeRouteHeader(renamed).name).toBe("Grimsel – Furka"); - // Everything outside the name field is untouched… - expect(renamed.subarray(0, 6)).toEqual(original.subarray(0, 6)); - expect(renamed.subarray(7, 64)).toEqual(original.subarray(7, 64)); - // …and the input was not mutated. - expect(decodeRouteHeader(original).name).toBe("Old name"); - }); - - it("zero-pads: a shorter name leaves no tail of the longer one", () => { - const renamed = renameRouteBytes(obcrWithName("A very long route name here"), "Short"); - expect(decodeRouteHeader(renamed).name).toBe("Short"); - expect(renamed.subarray(64 + 5, 64 + 48).every((b) => b === 0)).toBe(true); - }); - - it("caps at 48 bytes without splitting a codepoint, and refuses non-routes", () => { - const long = "Ü".repeat(30); // 60 bytes of UTF-8 - const renamed = renameRouteBytes(obcrWithName("x"), long); - const name = decodeRouteHeader(renamed).name; - expect(new TextEncoder().encode(name).length).toBeLessThanOrEqual(48); - expect(name).toBe("Ü".repeat(24)); - expect(() => renameRouteBytes(new Uint8Array(200), "x")).toThrow(/not an OBCR/); - }); - - it("falls back rather than writing an empty name", () => { - expect(decodeRouteHeader(renameRouteBytes(obcrWithName("x"), " ")).name).toBe("Route"); - }); -}); - -describe("stage mutators", () => { - const trip: TripObject = { key: 1n, name: "T", startDate: 0, days: [1n, 2n, 3n].map(wholeDay) }; - const routes = (t: TripObject) => t.days.map((day) => day.route); - - it("add dedupes, remove drops by index, move clamps", () => { - expect(addStage(trip, 2n)).toBe(trip); - expect(routes(addStage(trip, 4n))).toEqual([1n, 2n, 3n, 4n]); - expect(routes(removeStage(trip, 1))).toEqual([1n, 3n]); - expect(routes(moveStage(trip, 0, 1))).toEqual([2n, 1n, 3n]); - expect(routes(moveStage(trip, 2, 5))).toEqual([1n, 2n, 3n]); - expect(moveStage(trip, 0, -1)).toBe(trip); - }); -}); - -describe("stageId", () => { - it("refuses an ObjectId the trip format cannot name", () => { - expect(stageId(1n)).toBe(1n); - expect(stageId(MAX_TRIP_STAGE_ID)).toBe(MAX_TRIP_STAGE_ID); - expect(() => stageId(MAX_TRIP_STAGE_ID + 1n)).toThrow(TripStageError); - expect(() => stageId(0n)).toThrow(TripStageError); - }); -}); - -describe("against the real device", () => { - beforeAll(loadFlatDevice); - - async function withDevice(body: (rig: ReturnType) => Promise) { - const rig = flatDevice({}); - try { - await body(rig); - expect(rig.device.faults, "the device adapter saw a reaction it did not expect").toEqual([]); - } finally { - await rig.close(); - } - } - - it("renames in both places: the OBCR header and §3.6's display name", async () => { - // The two fields have different readers — the header's name is what the device shows while - // navigating, the display name is what a catalog listing shows — so writing only one of them - // would make the device and the device page disagree about what a route is called. - await withDevice(async ({ client, device }) => { - const seeded = device.seed({ kind: ObjectKind.Route, displayName: "Before", bytes: obcrWithName("Before") }); - - const written = await renameRoute(client, seeded, "After"); - - expect(written.objectId, "the id — and every reference to it — survives").toBe(seeded.objectId); - expect(written.revision).toBe(2n); - expect(device.entries).toHaveLength(1); - expect(device.entries[0].displayName).toBe("After"); - expect(decodeRouteHeader(device.payloadOf(seeded.objectId)!).name).toBe("After"); - }); - }); - - it("refuses a rename against a revision the object has already left, and changes nothing", async () => { - // The page renames the entry it listed. A retaining replace by another peer leaves that - // revision readable while moving the head on, which is exactly the state where a client that - // did not carry an expected revision would silently overwrite the newer bytes. - await withDevice(async ({ client, device }) => { - const listed = device.seed({ kind: ObjectKind.Route, bytes: obcrWithName("Listed") }); - const head = obcrWithName("Someone else's"); - device.retain(listed, head, "Someone else's"); - - await expect(renameRoute(client, listed, "Mine")).rejects.toMatchObject({ code: "revision-conflict" }); - expect(device.payloadOf(listed.objectId)).toEqual(head); - expect(device.entries.map((entry) => [entry.revision, entry.displayName])).toEqual([ - [1n, ""], - [2n, "Someone else's"], - ]); - }); - }); - - it("creates, edits and reorders a trip through replace-at-same-id", async () => { - await withDevice(async ({ client, device }) => { - const created = await createTrip(client, " Tour du Mont Blanc ", [3n, 1n]); - expect(decodeTripObject(device.payloadOf(created.objectId)!)).toMatchObject({ - name: "Tour du Mont Blanc", - startDate: 0, - days: [wholeDay(3n), wholeDay(1n)], - }); - - // The page re-lists after every mutation, so the revision each edit expects is the one - // the catalog just reported — never one this code remembered. - const revisionOf = async () => (await client.list({ kind: ObjectKind.Trip })).entries[0].revision; - await updateTrip(client, { objectId: created.objectId, revision: await revisionOf() }, (t) => - addStage(t, 7n), - ); - const moved = await updateTrip(client, { objectId: created.objectId, revision: await revisionOf() }, (t) => - moveStage(t, 2, -2), - ); - - expect(moved.days.map((day) => day.route)).toEqual([7n, 3n, 1n]); - expect(decodeTripObject(device.payloadOf(created.objectId)!)).toEqual(moved); - const trips = await client.list({ kind: ObjectKind.Trip }); - expect(trips.entries.map((entry) => [entry.objectId, entry.revision, entry.displayName])).toEqual([ - [created.objectId, 3n, "Tour du Mont Blanc"], - ]); - }); - }); - - it("refuses to build a trip over a route the format cannot name, before sending anything", async () => { - await withDevice(async ({ client, device }) => { - await expect(createTrip(client, "Too far", [MAX_TRIP_STAGE_ID + 1n])).rejects.toBeInstanceOf( - TripStageError, - ); - expect(device.entries).toEqual([]); - }); - }); - - // Gone with the v1 wire: "uploading identical trip bytes twice converges on one object". The - // A create is reconciled by the client rather than deduped on the wire — - // `FlatStoreClient.findCreated`, covered in `flows.test.ts` and `client.test.ts`. -}); diff --git a/builder/web/src/lib/device/manage.ts b/builder/web/src/lib/device/manage.ts deleted file mode 100644 index 08aab8e5a2..0000000000 --- a/builder/web/src/lib/device/manage.ts +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Renaming routes and editing trips — the mutations the device page offers beyond remove. - * - * Neither is a protocol feature, and that is the point: both ride on the one primitive the wire - * already has, **a `PUT` naming an existing object replaces it in one commit**. A rename gets the - * OBCR, rewrites the 48-byte name field in the payload, and puts the same object back under the same - * `ObjectId`, so every reference to it survives. A trip edit does the same to its day list. - * - * **Every replace carries the revision it expects**, checked at admission and again immediately - * before the commit, so an object something else replaced in between fails the compare-and-swap - * instead of silently clobbering. A stale entry earns `revisionConflict` and the page re-lists. - * - * A rename writes the name in **two** places, because they have different readers: the OBCR header's - * name is what the device shows while navigating, and the display name is what a catalog listing - * shows. Writing only one would make the device page and the device disagree. - * - * Nothing here talks to the store: callers run these inside `dashboard.enqueue` and refresh after. - */ - -import type { FlatStoreClient } from "../usb/client"; -import { truncateUtf8 } from "../format"; -import { decodeTripObject, encodeTripObject, wholeDay, type TripObject } from "../usb/objects"; -import { ObjectKind, type CatalogEntry, type PutResponse } from "../usb/protocol"; -import { decodeRouteHeader, ROUTE_NAME_MAX } from "./route"; - -/** The trip name field's cap — the same 48-byte field a route's name and the display name use. */ -export const TRIP_NAME_MAX = 48; - -/** The largest route id a trip can name: the flat store's complete nonzero `u64` ObjectId. */ -export const MAX_TRIP_STAGE_ID = 0xffff_ffff_ffff_ffffn; - -/** A route this trip format cannot name. Its own error, because the fix is not "try again". */ -export class TripStageError extends Error { - constructor(objectId: bigint) { - super( - `Route ${objectId} cannot be put in a trip: its id is outside the trip format's nonzero ` + - `u64 range (maximum ${MAX_TRIP_STAGE_ID}).`, - ); - this.name = "TripStageError"; - } -} - -/** Validate an `ObjectId` for the trip object's nonzero `u64` stage field. */ -export function stageId(objectId: bigint): bigint { - if (objectId <= 0n || objectId > MAX_TRIP_STAGE_ID) throw new TripStageError(objectId); - return objectId; -} - -/** - * The OBCR bytes with a new name in the header: length byte at offset 6, the null-padded 48-byte - * field at 64. The old name is zeroed before the new one lands, because the field is *null-padded* - * and a shorter name over a longer one would otherwise leave the tail of the old name in the file. - */ -export function renameRouteBytes(obcr: Uint8Array, name: string): Uint8Array { - decodeRouteHeader(obcr); // magic, version, length — refuse to "rename" something else - const bytes = new TextEncoder().encode(cleanName(name, ROUTE_NAME_MAX, "Route")); - const out = obcr.slice(); - out[6] = bytes.length; - out.fill(0, 64, 64 + ROUTE_NAME_MAX); - out.set(bytes, 64); - return out; -} - -/** Get, rewrite the name, replace at the same id. The `ObjectId` — and with it every reference to - * the route — is exactly what this dance preserves. */ -export async function renameRoute( - client: FlatStoreClient, - route: Pick, - name: string, - signal?: AbortSignal, -): Promise { - const obcr = await client.get({ objectId: route.objectId, revision: route.revision }, { signal }); - const clean = cleanName(name, ROUTE_NAME_MAX, "Route"); - return client.put( - { - objectId: route.objectId, - expectedRevision: route.revision, - kind: ObjectKind.Route, - displayName: clean, - }, - renameRouteBytes(obcr.bytes, clean), - { signal }, - ); -} - -/** Create a trip over existing routes. Returns what the commit published, id included. */ -export async function createTrip( - client: FlatStoreClient, - name: string, - stages: readonly bigint[], - signal?: AbortSignal, -): Promise { - const clean = cleanName(name, TRIP_NAME_MAX, "Trip"); - // The key names this trip for life; zero is reserved for "no trip". - const key = crypto.getRandomValues(new BigUint64Array(1))[0] || 1n; - const days = stages.map((id) => wholeDay(stageId(id))); - const bytes = encodeTripObject({ key, name: clean, startDate: 0, days }); - return client.put({ kind: ObjectKind.Trip, displayName: clean }, bytes, { signal }); -} - -/** - * Edit a trip: get, apply `mutate`, replace at the same id. Returns what was written. - * - * The read-modify-write is serialized against this page's other operations by the caller's queue, - * and against everything else by the compare-and-swap: a trip that moved underneath this returns - * `revisionConflict` rather than overwriting the change. - */ -export async function updateTrip( - client: FlatStoreClient, - trip: Pick, - mutate: (trip: TripObject) => TripObject, - signal?: AbortSignal, -): Promise { - const current = decodeTripObject( - (await client.get({ objectId: trip.objectId, revision: trip.revision }, { signal })).bytes, - ); - const next = mutate(current); - const written: TripObject = { ...next, name: cleanName(next.name, TRIP_NAME_MAX, "Trip") }; - await client.put( - { - objectId: trip.objectId, - expectedRevision: trip.revision, - kind: ObjectKind.Trip, - displayName: written.name, - }, - encodeTripObject(written), - { signal }, - ); - return written; -} - -export function addStage(trip: TripObject, routeId: bigint): TripObject { - // Adding a stage that is already in the trip is a no-op, not a duplicate: the - // menu offering the add has no way to know the trip's current stages are stale. - if (trip.days.some((day) => day.route === routeId)) return trip; - return { ...trip, days: [...trip.days, wholeDay(routeId)] }; -} - -export function removeStage(trip: TripObject, index: number): TripObject { - return { ...trip, days: trip.days.filter((_, i) => i !== index) }; -} - -/** Move the stage at `index` by `delta` places, clamped to the list. */ -export function moveStage(trip: TripObject, index: number, delta: number): TripObject { - const to = Math.max(0, Math.min(trip.days.length - 1, index + delta)); - if (to === index || index < 0 || index >= trip.days.length) return trip; - const days = [...trip.days]; - const [moved] = days.splice(index, 1); - days.splice(to, 0, moved); - return { ...trip, days }; -} - -/** Trimmed, non-empty, inside the field's byte cap. */ -function cleanName(name: string, maxBytes: number, fallback: string): string { - return truncateUtf8(name.trim() || fallback, maxBytes); -} diff --git a/builder/web/src/lib/device/multidrop.test.ts b/builder/web/src/lib/device/multidrop.test.ts deleted file mode 100644 index b24badf9a6..0000000000 --- a/builder/web/src/lib/device/multidrop.test.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { describe, expect, it } from "vitest"; - -import { commonPrefixName, sortForTrip } from "./multidrop"; - -describe("sortForTrip", () => { - it("orders naturally, so day 10 follows day 2", () => { - const files = [{ name: "tmb-day10.gpx" }, { name: "tmb-day2.gpx" }, { name: "tmb-day1.gpx" }]; - expect(sortForTrip(files).map((f) => f.name)).toEqual([ - "tmb-day1.gpx", - "tmb-day2.gpx", - "tmb-day10.gpx", - ]); - }); -}); - -describe("commonPrefixName", () => { - it("suggests the shared stem, shorn of day numbering", () => { - expect(commonPrefixName(["tour-mont-blanc-day1.gpx", "tour-mont-blanc-day2.gpx"])).toBe( - "tour-mont-blanc", - ); - expect(commonPrefixName(["Jura Crest 1.gpx", "Jura Crest 2.gpx"])).toBe("Jura Crest"); - expect(commonPrefixName(["Etappe_1.gpx", "Etappe_2.gpx"])).toBe("Etappe"); - }); - - it("suggests nothing rather than something silly", () => { - expect(commonPrefixName([])).toBe(""); - expect(commonPrefixName(["alps.gpx", "coast.gpx"])).toBe(""); - expect(commonPrefixName(["a1.gpx", "a2.gpx"])).toBe(""); - }); - - it("stays inside the trip name's 48-byte cap", () => { - const long = "Ü".repeat(40); // 80 UTF-8 bytes shared by both names - const name = commonPrefixName([`${long} one.gpx`, `${long} two.gpx`]); - expect(new TextEncoder().encode(name).length).toBeLessThanOrEqual(48); - expect(name.length).toBeGreaterThan(0); - }); -}); diff --git a/builder/web/src/lib/device/multidrop.ts b/builder/web/src/lib/device/multidrop.ts deleted file mode 100644 index 7ef1115cdf..0000000000 --- a/builder/web/src/lib/device/multidrop.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Several GPX files at once: the small pure pieces behind the "add as a trip?" dialog. - * - * The uploads themselves are ordinary `sendRoute` calls the page sequences; what lives here is - * only what a test can hold still — the ordering and the suggested trip name. - */ - -import { truncateUtf8 } from "../format"; -import { TRIP_NAME_MAX } from "./manage"; - -/** - * Sort dropped files the way a rider numbered them: natural order ("day 2" before "day 10"), - * case-insensitive. `DataTransfer` order is whatever the OS felt like; filenames are the one - * ordering hint the drop actually carries. - */ -export function sortForTrip(files: readonly T[]): T[] { - return [...files].sort((a, b) => - a.name.localeCompare(b.name, undefined, { numeric: true, sensitivity: "base" }), - ); -} - -/** - * A trip name suggested from the files' common prefix — "tmb-day1.gpx, tmb-day2.gpx" → "tmb". - * Empty when the names share nothing usable, so the dialog shows a blank field rather than a - * guess nobody typed. - */ -export function commonPrefixName(filenames: readonly string[]): string { - if (filenames.length === 0) return ""; - const stems = filenames.map(stem); - let prefix = stems[0]; - for (const name of stems.slice(1)) { - let i = 0; - while (i < prefix.length && i < name.length && prefix[i].toLowerCase() === name[i].toLowerCase()) i++; - prefix = prefix.slice(0, i); - if (!prefix) return ""; - } - // Trim the numbering tail ("tmb-day" → "tmb", "Etappe_" → "Etappe"): digits and separators - // always; an ordinal word only when a separator precedes it, so a name that *is* the word - // ("Etappe") survives. A two-character residue is noise, not a name. - const base = prefix.replace(/[\s._-]*\d*$/, "").replace(/[\s._-]+$/, ""); - const shorn = base.replace(/[\s._-]+(day|stage|etappe|part|tag)$/i, ""); - const trimmed = shorn || base; - return trimmed.length >= 3 ? truncateUtf8(trimmed, TRIP_NAME_MAX) : ""; -} - -/** A filename without its extension or any path. */ -function stem(filename: string): string { - return filename.replace(/^.*[\\/]/, "").replace(/\.[^./\\]+$/, ""); -} diff --git a/builder/web/src/lib/device/progress.ts b/builder/web/src/lib/device/progress.ts index 8040c533d8..48452bb63b 100644 --- a/builder/web/src/lib/device/progress.ts +++ b/builder/web/src/lib/device/progress.ts @@ -3,7 +3,7 @@ * TypeScript, tested under Node) and the thing that renders them (`job.svelte.ts`, runes). * * It lives in its own file so the flows never import a `.svelte.ts` module: everything with logic in - * it stays framework-free and reusable by the desktop app. + * it stays framework-free. */ /** diff --git a/builder/web/src/lib/device/rideMap.test.ts b/builder/web/src/lib/device/rideMap.test.ts deleted file mode 100644 index ced581699a..0000000000 --- a/builder/web/src/lib/device/rideMap.test.ts +++ /dev/null @@ -1,124 +0,0 @@ -// The logbook map's clustering, pinned as pure math (see rideMap.ts): membership and counts, -// the adjacent-cell merge, the zoom threshold, and the representative point. No Leaflet here — -// the component draws whatever these functions answer, so these answers are the behavior. - -import { describe, expect, it } from "vitest"; -import { - CLUSTER_BELOW_ZOOM, - clusterRides, - clustersAt, - projectPx, - representativePoint, - type RideTrack, -} from "./rideMap"; - -/** A tiny synthetic track around a center — enough points for a midpoint and real bounds. */ -function trackAround(lat: number, lon: number, key: string, span = 0.02): RideTrack { - const track: Array<[number, number]> = []; - for (let i = 0; i < 9; i++) { - const t = i / 8; - track.push([lat - span / 2 + span * t, lon + span * Math.sin(t * Math.PI)]); - } - return { key, track }; -} - -const FREIBURG_A = trackAround(47.99, 7.85, "a"); -const FREIBURG_B = trackAround(48.01, 7.87, "b"); -const KAISERSTUHL = trackAround(48.09, 7.66, "c"); -const INNSBRUCK = trackAround(47.27, 11.39, "d"); - -describe("clustersAt", () => { - it("clusters below the threshold and shows tracks at and above it", () => { - expect(clustersAt(CLUSTER_BELOW_ZOOM - 1)).toBe(true); - expect(clustersAt(CLUSTER_BELOW_ZOOM)).toBe(false); - expect(clustersAt(CLUSTER_BELOW_ZOOM + 5)).toBe(false); - expect(clustersAt(2)).toBe(true); - }); -}); - -describe("representativePoint", () => { - it("is the track's midpoint by index", () => { - const odd = [[1, 1], [2, 2], [3, 3]] as const; - expect(representativePoint(odd)).toEqual([2, 2]); - const even = [[1, 1], [2, 2], [3, 3], [4, 4]] as const; - expect(representativePoint(even)).toEqual([3, 3]); - expect(representativePoint([[5, 6]])).toEqual([5, 6]); - expect(representativePoint([])).toBeNull(); - }); -}); - -describe("clusterRides", () => { - it("groups nearby rides and keeps a lone ride its own badge, with counts", () => { - // Zoom 7: Freiburg and the Kaiserstuhl (~20 km) share a neighborhood of ~60 px cells; - // Innsbruck (~280 km away) cannot. - const clusters = clusterRides([FREIBURG_A, FREIBURG_B, KAISERSTUHL, INNSBRUCK], 7); - expect(clusters).toHaveLength(2); - const [black_forest, alps] = clusters; - expect(black_forest.keys).toEqual(["a", "b", "c"]); - expect(black_forest.count).toBe(3); - expect(alps.keys).toEqual(["d"]); - expect(alps.count).toBe(1); - }); - - it("separates the same rides as the zoom grows — the grid is the threshold behavior", () => { - // At zoom 9 the Kaiserstuhl ride (~15 km from Freiburg) gets its own badge… - const mid = clusterRides([FREIBURG_A, FREIBURG_B, KAISERSTUHL], 9); - expect(mid.map((c) => [...c.keys].sort().join(""))).toEqual(["ab", "c"]); - // …and at zoom 13 every ride stands alone. - const close = clusterRides([FREIBURG_A, FREIBURG_B, KAISERSTUHL], 13); - expect(close).toHaveLength(3); - expect(close.every((c) => c.count === 1)).toBe(true); - }); - - it("merges rides in adjacent cells into one badge", () => { - // Two representative points straddling a cell edge: same cluster, even though their cells - // differ — a badge pair two pixels apart would be the bug this rule exists for. - const zoom = 8; - const cell = 60; - const [ax] = projectPx(48.0, 7.85, zoom); - expect(Math.floor(ax / cell)).not.toBe(Math.floor((ax + cell) / cell)); - // Build a second ride whose midpoint lands one cell to the east. - const scale = 256 * 2 ** zoom; - const lonShift = ((cell * 1.001) / scale) * 360; - const neighbour = trackAround(48.0, 7.85 + lonShift, "n"); - const clusters = clusterRides([trackAround(48.0, 7.85, "m"), neighbour], zoom, cell); - expect(clusters).toHaveLength(1); - expect(clusters[0].keys).toEqual(["m", "n"]); - }); - - it("centers a badge between its members and bounds it around every member point", () => { - const clusters = clusterRides([FREIBURG_A, FREIBURG_B], 7); - expect(clusters).toHaveLength(1); - const { center, bounds } = clusters[0]; - const reps = [representativePoint(FREIBURG_A.track)!, representativePoint(FREIBURG_B.track)!]; - expect(center[0]).toBeCloseTo((reps[0][0] + reps[1][0]) / 2, 10); - expect(center[1]).toBeCloseTo((reps[0][1] + reps[1][1]) / 2, 10); - // The click-to-zoom bounds cover every point of every member track. - const [[south, west], [north, east]] = bounds; - for (const ride of [FREIBURG_A, FREIBURG_B]) { - for (const [lat, lon] of ride.track) { - expect(lat).toBeGreaterThanOrEqual(south); - expect(lat).toBeLessThanOrEqual(north); - expect(lon).toBeGreaterThanOrEqual(west); - expect(lon).toBeLessThanOrEqual(east); - } - } - }); - - it("skips rides with no track and answers an empty library with no clusters", () => { - expect(clusterRides([], 7)).toEqual([]); - expect(clusterRides([{ key: "x", track: [] }], 7)).toEqual([]); - const clusters = clusterRides([{ key: "x", track: [] }, FREIBURG_A], 7); - expect(clusters).toHaveLength(1); - expect(clusters[0].keys).toEqual(["a"]); - }); - - it("projects north up and east right, like the map it feeds", () => { - const [x1, y1] = projectPx(48, 7, 7); - const [x2, y2] = projectPx(49, 8, 7); - expect(x2).toBeGreaterThan(x1); - expect(y2).toBeLessThan(y1); // pixel y grows southwards - // The poles clamp instead of diverging. - expect(Number.isFinite(projectPx(90, 0, 7)[1])).toBe(true); - }); -}); diff --git a/builder/web/src/lib/device/rideMap.ts b/builder/web/src/lib/device/rideMap.ts deleted file mode 100644 index a4f631095a..0000000000 --- a/builder/web/src/lib/device/rideMap.ts +++ /dev/null @@ -1,171 +0,0 @@ -/** - * The logbook map's clustering: pure math, no Leaflet. - * - * Zoomed out, the all-rides map draws forest circles with counts, one per area, and a click zooms - * into that area. Zoomed in past {@link CLUSTER_BELOW_ZOOM}, the circles dissolve into the actual - * tracks. The two never show at once. - * - * The grouping is a **grid cluster in projected pixel space**: each ride is reduced to one - * representative point — the track's midpoint, a better "where was this" than its start, which for - * loops is the rider's front door — projected to Web-Mercator pixels at the current zoom, and binned - * into ~{@link DEFAULT_CELL_PX}-pixel cells. Occupied cells that touch merge into one cluster, so a - * group of rides straddling a cell edge reads as one badge. Because the projection scales with zoom, - * the same rides separate into more clusters as the map zooms in. - * - * Everything here is a pure function over `[lat, lon]` arrays, so the behaviour can be pinned - * without a DOM or a tile server. - */ - -/** One ride as the map needs it: its key (for hover/click identity) and its preview track. */ -export interface RideTrack { - readonly key: string; - readonly track: readonly (readonly [number, number])[]; -} - -/** One badge on the zoomed-out map. */ -export interface RideCluster { - /** The member rides' keys, in input order. */ - readonly keys: readonly string[]; - readonly count: number; - /** Where the badge sits: the mean of the members' representative points, `[lat, lon]`. */ - readonly center: readonly [number, number]; - /** - * `[[south, west], [north, east]]` over **every point of every member track** — what a click - * on the badge zooms to, so the whole rides come into view, not just their midpoints. - */ - readonly bounds: readonly [readonly [number, number], readonly [number, number]]; -} - -/** Below this Leaflet zoom the map shows clusters; at or above it, the tracks themselves. */ -export const CLUSTER_BELOW_ZOOM = 10; - -/** A chosen ~60 px cell: two badges can get no closer than a badge's own diameter. */ -export const DEFAULT_CELL_PX = 60; - -/** Whether `zoom` is in cluster territory. The component's one branch. */ -export function clustersAt(zoom: number): boolean { - return zoom < CLUSTER_BELOW_ZOOM; -} - -/** A ride's one point for clustering: the track's midpoint (by index). `null` for an empty track. */ -export function representativePoint( - track: readonly (readonly [number, number])[], -): readonly [number, number] | null { - if (track.length === 0) return null; - return track[Math.floor(track.length / 2)]; -} - -/** Web-Mercator's latitude limit; beyond it the projection diverges. */ -const MAX_LAT = 85.05112878; - -/** - * `[lat, lon]` → Web-Mercator pixels at `zoom` (256 px tiles, Leaflet's own convention). Exported - * for the tests, which assert cell membership in the same space the clustering bins in. - */ -export function projectPx(lat: number, lon: number, zoom: number): [number, number] { - const scale = 256 * 2 ** zoom; - const clamped = Math.max(-MAX_LAT, Math.min(MAX_LAT, lat)); - const s = Math.sin((clamped * Math.PI) / 180); - return [ - ((lon + 180) / 360) * scale, - (0.5 - Math.log((1 + s) / (1 - s)) / (4 * Math.PI)) * scale, - ]; -} - -/** - * Group rides into clusters for one zoom level. - * - * Rides with empty tracks are skipped — there is nothing to place. The result is deterministic: - * clusters come out ordered by their first member's input position, members in input order. - */ -export function clusterRides( - rides: readonly RideTrack[], - zoom: number, - cellPx: number = DEFAULT_CELL_PX, -): RideCluster[] { - interface Placed { - readonly ride: RideTrack; - readonly rep: readonly [number, number]; - readonly cx: number; - readonly cy: number; - } - const placed: Placed[] = []; - for (const ride of rides) { - const rep = representativePoint(ride.track); - if (!rep) continue; - const [x, y] = projectPx(rep[0], rep[1], zoom); - placed.push({ ride, rep, cx: Math.floor(x / cellPx), cy: Math.floor(y / cellPx) }); - } - if (placed.length === 0) return []; - - // Union occupied cells that touch (8-neighborhood), BFS over the occupancy map. - const byCell = new Map(); - for (const p of placed) { - const id = `${p.cx}:${p.cy}`; - const cell = byCell.get(id); - if (cell) cell.push(p); - else byCell.set(id, [p]); - } - const seen = new Set(); - const clusters: RideCluster[] = []; - for (const p of placed) { - const startId = `${p.cx}:${p.cy}`; - if (seen.has(startId)) continue; - const members: Placed[] = []; - const queue = [startId]; - seen.add(startId); - while (queue.length > 0) { - const id = queue.pop()!; - const cell = byCell.get(id)!; - members.push(...cell); - const [cx, cy] = id.split(":").map(Number); - for (let dx = -1; dx <= 1; dx++) { - for (let dy = -1; dy <= 1; dy++) { - const next = `${cx + dx}:${cy + dy}`; - if ((dx !== 0 || dy !== 0) && byCell.has(next) && !seen.has(next)) { - seen.add(next); - queue.push(next); - } - } - } - } - // Input order inside the cluster, so the result never depends on Map iteration details. - members.sort((a, b) => placed.indexOf(a) - placed.indexOf(b)); - clusters.push(toCluster(members.map((m) => ({ ride: m.ride, rep: m.rep })))); - } - return clusters; -} - -/** - * Known limit: a track crossing the antimeridian makes its cluster's bounds span most of the world, - * so a badge click zooms way out instead of in. Left as-is deliberately — unwrapping longitudes is - * real complexity for a case a bikepacking track effectively never hits, and the failure is a wrong - * zoom, not a lost ride. - */ -function toCluster(members: ReadonlyArray<{ ride: RideTrack; rep: readonly [number, number] }>): RideCluster { - let south = Infinity; - let west = Infinity; - let north = -Infinity; - let east = -Infinity; - let latSum = 0; - let lonSum = 0; - for (const { ride, rep } of members) { - latSum += rep[0]; - lonSum += rep[1]; - for (const [lat, lon] of ride.track) { - if (lat < south) south = lat; - if (lat > north) north = lat; - if (lon < west) west = lon; - if (lon > east) east = lon; - } - } - return { - keys: members.map((m) => m.ride.key), - count: members.length, - center: [latSum / members.length, lonSum / members.length], - bounds: [ - [south, west], - [north, east], - ], - }; -} diff --git a/builder/web/src/lib/device/rides.ts b/builder/web/src/lib/device/rides.ts index 0491877cda..b11a65977c 100644 --- a/builder/web/src/lib/device/rides.ts +++ b/builder/web/src/lib/device/rides.ts @@ -2,7 +2,7 @@ * Pulling a recorded ride off the device and handing it to the browser as a GPX. * * This is the hosted tier's **only** ride feature, and it is deliberately a dead end: a file lands - * in a Downloads folder and nothing else happens anywhere. The managed library is the desktop app's. + * in a Downloads folder and nothing else happens anywhere. * * {@link RideSource} holds exactly two reads: list the catalog, download one ride. There is no * delete and no arm — not as discipline, but because the object {@link rideAccess} hands over does @@ -98,7 +98,7 @@ export function scopeKey(scope: RideScope): string { return `${scope.serial}:${scope.storeId ?? "no-store"}`; } -/** Shared with the desktop index: full StoreId hex and decimal u64 ObjectId. */ +/** The key of a ride in one scope: full StoreId hex and decimal u64 ObjectId. */ export function rideKey(scope: RideScope, objectId: bigint): string { return `${scopeKey(scope)}:${objectId}`; } diff --git a/builder/web/src/lib/device/segments.test.ts b/builder/web/src/lib/device/segments.test.ts deleted file mode 100644 index 9c7a61bb29..0000000000 --- a/builder/web/src/lib/device/segments.test.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { describe, expect, it } from "vitest"; - -import { cumulativeDistances, type ProfilePoint } from "./elevation"; -import { concatSegments, waypointDistanceM } from "./segments"; - -/** Points ~1.11 km apart along a meridian — a near-uniform axis, like elevation.test.ts's ladder. */ -const meridian = (fromLat: number, count: number, lon = 7.82): ProfilePoint[] => - Array.from({ length: count }, (_, i) => ({ lat: fromLat + i * 0.01, lon, ele: 100 + i })); - -/** One 0.01°-of-latitude step in metres, per the module's own metric. */ -const STEP = cumulativeDistances(meridian(48, 2))[1]; - -describe("concatSegments", () => { - it("concatenates points in order onto one cumulative axis", () => { - // Two contiguous stages: the second starts exactly where the first ends. - const a = meridian(48.0, 3); // 48.00 .. 48.02 - const b = meridian(48.02, 4); // 48.02 .. 48.05 - const axis = concatSegments([a, b]); - expect(axis.points.length).toBe(7); - expect(axis.cum).toEqual(cumulativeDistances([...a, ...b])); - expect(axis.totalM).toBeCloseTo(5 * STEP, 6); - expect(axis.ranges).toEqual([ - [0, 2], - [3, 6], - ]); - }); - - it("gives each stage its offset and drawn length, and marks the seam", () => { - const a = meridian(48.0, 3); // 2 steps long - const b = meridian(48.02, 4); // 3 steps long - const axis = concatSegments([a, b]); - expect(axis.offsetsM[0]).toBe(0); - expect(axis.lengthsM[0]).toBeCloseTo(2 * STEP, 6); - // The seam jump is zero here (contiguous stages), so b starts at a's end. - expect(axis.offsetsM[1]).toBeCloseTo(2 * STEP, 6); - expect(axis.lengthsM[1]).toBeCloseTo(3 * STEP, 6); - expect(axis.boundariesM.length).toBe(1); - expect(axis.boundariesM[0]).toBeCloseTo(2 * STEP, 6); - }); - - it("keeps a gap between non-contiguous stages on the axis but out of the stage lengths", () => { - const a = meridian(48.0, 2); // ends at 48.01 - const b = meridian(48.03, 2); // starts 2 steps later - const axis = concatSegments([a, b]); - // The axis walks the jump; the second stage's own length is still one step. - expect(axis.totalM).toBeCloseTo(4 * STEP, 6); - expect(axis.offsetsM[1]).toBeCloseTo(3 * STEP, 6); - expect(axis.lengthsM[1]).toBeCloseTo(1 * STEP, 6); - expect(axis.boundariesM[0]).toBeCloseTo(3 * STEP, 6); - }); - - it("tolerates empty segments without ranges or boundaries", () => { - const a = meridian(48.0, 3); - const axis = concatSegments([[], a, []]); - expect(axis.ranges).toEqual([null, [0, 2], null]); - expect(axis.offsetsM).toEqual([0, 0, axis.totalM]); - expect(axis.lengthsM[0]).toBe(0); - expect(axis.lengthsM[2]).toBe(0); - expect(axis.boundariesM).toEqual([]); - }); - - it("a single segment is the plain track: no boundaries, full range", () => { - const a = meridian(48.0, 4); - const axis = concatSegments([a]); - expect(axis.ranges).toEqual([[0, 3]]); - expect(axis.offsetsM).toEqual([0]); - expect(axis.lengthsM[0]).toBeCloseTo(axis.totalM, 9); - expect(axis.boundariesM).toEqual([]); - expect(axis.cum).toEqual(cumulativeDistances(a)); - }); - - it("degenerates safely on nothing at all", () => { - const axis = concatSegments([]); - expect(axis.points).toEqual([]); - expect(axis.totalM).toBe(0); - expect(axis.boundariesM).toEqual([]); - }); -}); - -describe("waypointDistanceM", () => { - const axis = concatSegments([meridian(48.0, 3), meridian(48.02, 4)]); - - it("offsets a stage waypoint by everything before its stage", () => { - expect(waypointDistanceM(axis, 0, 0)).toBe(0); - expect(waypointDistanceM(axis, 1, 0)).toBeCloseTo(axis.offsetsM[1], 9); - expect(waypointDistanceM(axis, 1, STEP)).toBeCloseTo(axis.offsetsM[1] + STEP, 6); - }); - - it("clamps into the stage's drawn span — a raw-track overshoot lands on the stage's end", () => { - expect(waypointDistanceM(axis, 0, 99_999)).toBeCloseTo(axis.lengthsM[0], 6); - expect(waypointDistanceM(axis, 0, -5)).toBe(0); - expect(waypointDistanceM(axis, 1, 99_999)).toBeCloseTo(axis.totalM, 6); - }); - - it("passes the raw distance through on a degenerate axis", () => { - expect(waypointDistanceM(concatSegments([]), 0, 1234)).toBe(1234); - }); -}); diff --git a/builder/web/src/lib/device/segments.ts b/builder/web/src/lib/device/segments.ts deleted file mode 100644 index ea74469e1e..0000000000 --- a/builder/web/src/lib/device/segments.ts +++ /dev/null @@ -1,102 +0,0 @@ -/** - * The trip preview's shared distance axis: several stage tracks, concatenated in trip order into the - * one polyline the chart-room modal already knows how to window, hover and zoom, plus the - * bookkeeping that keeps each stage addressable on that axis. - * - * Pure geometry, like `elevation.ts`: the modal derives everything else from this one result. - * - * The axis is `cumulativeDistances` over the **concatenated** points, so the straight-line jump - * between one stage's end and the next stage's start is part of the axis, exactly as it would be had - * the stages been one recorded track. - * - * Deliberate tradeoff for a *discontinuous* trip: the map marks the jump with a thin dashed - * connector, so the hover dot visibly travels a transfer leg, but the elevation profile still draws - * one straight interpolated ramp across the jump's span. Masking that ramp would mean splitting the - * profile's SVG path per stage, and the seam rules already say where the stages meet. - */ - -import type { RouteWaypoint } from "../convert/bridge"; -import { cumulativeDistances, type ProfilePoint } from "./elevation"; - -/** One stage of a trip as the preview draws it: the decoded track, the stage's band color, and - * the stage's own waypoints (distances measured from *its* start — see {@link waypointDistanceM}). */ -export interface TrackSegment { - readonly name: string; - /** The stage color — the same palette entry the trip band's dot uses. */ - readonly color: string; - readonly points: readonly ProfilePoint[]; - readonly waypoints: readonly RouteWaypoint[]; -} - -/** The concatenated axis and each segment's place on it. All distances metres, all on the drawn - * (post-decimation) polyline. */ -export interface SegmentAxis { - /** Every segment's points, in order — the one track the modal windows and hovers. */ - readonly points: ProfilePoint[]; - /** `cumulativeDistances(points)` — computed once here, shared by every consumer. */ - readonly cum: number[]; - /** The whole axis's length. */ - readonly totalM: number; - /** Per segment: its `[first, last]` point indices in {@link points}, or null for a segment - * that brought no points. */ - readonly ranges: ReadonlyArray; - /** Per segment: the axis distance at its first point (for an empty segment: where it would - * have started). `offsetsM[0] === 0`. */ - readonly offsetsM: number[]; - /** Per segment: the drawn length of its own track — `cum[last] - cum[first]`, 0 if empty. */ - readonly lengthsM: number[]; - /** The seams between consecutive non-empty segments — the axis distance where a later - * segment begins. One entry per internal boundary; empty for 0 or 1 drawable segments. */ - readonly boundariesM: number[]; -} - -/** Concatenate stage tracks into one shared axis. */ -export function concatSegments(segments: ReadonlyArray): SegmentAxis { - const points: ProfilePoint[] = []; - const spans: Array = []; - for (const segment of segments) { - if (segment.length === 0) { - spans.push(null); - continue; - } - const first = points.length; - points.push(...segment); - spans.push([first, points.length - 1]); - } - const cum = cumulativeDistances(points); - const totalM = cum.length ? cum[cum.length - 1] : 0; - - const offsetsM: number[] = []; - const lengthsM: number[] = []; - const boundariesM: number[] = []; - let cursorM = 0; - let drawnBefore = false; - for (const span of spans) { - if (span === null) { - offsetsM.push(cursorM); - lengthsM.push(0); - continue; - } - const [first, last] = span; - offsetsM.push(cum[first]); - lengthsM.push(cum[last] - cum[first]); - if (drawnBefore) boundariesM.push(cum[first]); - drawnBefore = true; - cursorM = cum[last]; - } - return { points, cum, totalM, ranges: spans, offsetsM, lengthsM, boundariesM }; -} - -/** - * A stage waypoint's position on the shared axis: its stored `distAlongM` — measured from the - * stage's own start on the RAW pre-decimation track, so it can slightly exceed the drawn stage's - * length — clamped into the stage's drawn span, then offset by everything before the stage. - * - * On a degenerate axis the raw value is passed through: there is no span to clamp into, and the - * caption should say what was stored rather than 0. - */ -export function waypointDistanceM(axis: SegmentAxis, segment: number, distAlongM: number): number { - if (axis.totalM <= 0) return distAlongM; - const clamped = Math.max(0, Math.min(distAlongM, axis.lengthsM[segment] ?? 0)); - return (axis.offsetsM[segment] ?? 0) + clamped; -} diff --git a/builder/web/src/lib/device/session.svelte.ts b/builder/web/src/lib/device/session.svelte.ts index b65151c137..c84207a044 100644 --- a/builder/web/src/lib/device/session.svelte.ts +++ b/builder/web/src/lib/device/session.svelte.ts @@ -11,7 +11,6 @@ * a click, is what shows the chooser the first time. Neither can substitute for the other. */ -import { platform } from "../platform"; import type { DeviceSession } from "../usb/session"; /** Reactive holder for the shared session. */ @@ -47,18 +46,18 @@ class DeviceHolder { private opening: Promise | null = null; - /** Open the host's device session, at most once per page. Safe to call from several components' `onMount`. */ + /** Open the device session, at most once per page. Safe to call from several components' `onMount`. */ open(): Promise { - this.opening ??= this.start(platform.device); + this.opening ??= this.start(); return this.opening; } - private async start(openDevice: (() => Promise) | null): Promise { - // Null on a tier without USB at all. The UI never reaches here in that case — `` has - // already replaced the control — so this is a guard, not a branch anyone renders. - if (!openDevice) return null; + private async start(): Promise { try { - const session = await openDevice(); + // Dynamic, so the transport, the protocol codecs and the client stay in their own chunk: + // a visitor who only downloads a map never loads the device code. + const { openDeviceSession } = await import("../usb/session.svelte"); + const session = await openDeviceSession(); this.session = session; return session; } catch (cause) { diff --git a/builder/web/src/lib/device/thumbs.svelte.ts b/builder/web/src/lib/device/thumbs.svelte.ts deleted file mode 100644 index 2eb884aa85..0000000000 --- a/builder/web/src/lib/device/thumbs.svelte.ts +++ /dev/null @@ -1,309 +0,0 @@ -/** - * Track thumbnails for the device page's tiles: one downsampled `[lat, lon]` track per route and - * ride on the card. The hosted web app holds them for the current page session; the installed - * desktop app keeps a bounded local cache so reconnecting a device does not download every object - * again after each restart. - * - * Cache keys carry the device scope and an object fingerprint, so changed routes are never shown - * with an old track. Entries without a stable fingerprint remain session-only on every host. - * - * `fill` walks the dashboard's lists sequentially. Every load runs through the page's `enqueue`, - * FIFO with whatever the rider clicks, because the cable has one transfer slot and thumbnails are - * the least important work on it. What is held is points, not pixels. - */ - -import { SvelteMap } from "svelte/reactivity"; - -import { platform, type PlatformName } from "../platform"; -import { downsampleTrack, round6 } from "./library"; -import { scopeKey, type RideScope } from "./rides"; - -/** A downsampled `[lat, lon]` polyline, ready for `fitTracks`. */ -export type Thumb = ReadonlyArray; - -export type ThumbKind = "route" | "ride"; - -/** The stage colors of a trip's combined preview, cycled — the field-guide palette. */ -export const STAGE_COLORS = ["#3c6b39", "#cf6a2a", "#33575b", "#e3ad33", "#5f7d3d"] as const; - -const PREFIX = "obc-thumb:v1:"; - -/** A chosen cap: about 1.5 MiB at the usual track size. Older entries go least-recently-used first. */ -export const THUMB_CACHE_CAP = 300; - -/** The small persistent-storage seam, injectable for tests. */ -export interface ThumbStorage { - get(key: string): string | null; - set(key: string, value: string): void; - remove(key: string): void; - keys(): string[]; -} - -/** - * A catalog entry's content identity, for the cache key. - * - * One function for every kind, because a committed object's payload never changes under one - * revision: the payload's CRC names exactly those bytes, and a replace publishes a new revision with - * a new CRC, which is what makes a stale thumbnail impossible. - * - * `null` where the device declared no CRC — a ride it is still recording — which keeps that entry - * out of the durable cache rather than caching a thumbnail of a payload that is still growing. - */ -export function entryFingerprint(entry: { readonly payloadCrc32: number }): string | null { - return entry.payloadCrc32 !== 0 ? `c${entry.payloadCrc32 >>> 0}` : null; -} - -export function thumbKey(scope: RideScope, kind: ThumbKind, id: bigint, fingerprint: string): string { - return `${PREFIX}${scopeKey(scope)}:${kind}:${id}:${fingerprint}`; -} - -interface StoredThumb { - at: number; - track: Array<[number, number]>; -} - -const QUOTA_HEADROOM = 25; - -/** Bounded, defensive LRU storage. A corrupt or unavailable entry is simply downloaded again. */ -export class ThumbCache { - constructor( - private readonly storage: ThumbStorage, - private readonly cap: number = THUMB_CACHE_CAP, - private readonly now: () => number = Date.now, - ) {} - - get(key: string): Thumb | null { - const raw = this.storage.get(key); - if (raw === null) return null; - const parsed = parseStored(raw); - if (parsed === null) { - this.storage.remove(key); - return null; - } - this.write(key, { at: this.now(), track: parsed.track }); - return parsed.track; - } - - put(key: string, track: Thumb): void { - this.write(key, { - at: this.now(), - track: track.map((point) => [round6(point[0]), round6(point[1])]), - }); - this.evict(this.cap); - } - - clear(): number { - let removed = 0; - for (const key of this.storage.keys()) { - if (!key.startsWith(PREFIX)) continue; - this.storage.remove(key); - removed += 1; - } - return removed; - } - - private write(key: string, stored: StoredThumb): void { - const value = JSON.stringify(stored); - try { - this.storage.set(key, value); - } catch { - this.evict(Math.max(0, this.cap - QUOTA_HEADROOM)); - try { - this.storage.set(key, value); - } catch { - // A full or denied store removes the optimization, not the feature. - } - } - } - - private evict(keep: number): void { - const entries: Array<{ key: string; at: number }> = []; - for (const key of this.storage.keys()) { - if (!key.startsWith(PREFIX)) continue; - const parsed = parseStored(this.storage.get(key) ?? ""); - if (parsed === null) { - this.storage.remove(key); - } else { - entries.push({ key, at: parsed.at }); - } - } - if (entries.length <= keep) return; - entries.sort((a, b) => a.at - b.at); - for (const entry of entries.slice(0, entries.length - keep)) this.storage.remove(entry.key); - } -} - -function parseStored(raw: string): StoredThumb | null { - let value: unknown; - try { - value = JSON.parse(raw); - } catch { - return null; - } - if (typeof value !== "object" || value === null) return null; - const { at, track } = value as { at?: unknown; track?: unknown }; - if (typeof at !== "number" || !Number.isFinite(at) || !Array.isArray(track)) return null; - for (const point of track) { - if ( - !Array.isArray(point) || - point.length !== 2 || - typeof point[0] !== "number" || - typeof point[1] !== "number" || - !Number.isFinite(point[0]) || - !Number.isFinite(point[1]) - ) { - return null; - } - } - return { at, track: track as Array<[number, number]> }; -} - -/** One thumbnail the page wants and how to fetch its full-resolution points. */ -export interface ThumbRequest { - readonly kind: ThumbKind; - readonly id: bigint; - /** Stable content identity. Without one, persistence is intentionally skipped. */ - readonly fingerprint: string | null; - /** A cable download for most objects, or the ride library's held preview for a pulled ride. */ - readonly load: (signal: AbortSignal) => Promise; -} - -/** Run one operation behind every previously queued one — the dashboard's `enqueue`, in practice. */ -export type ThumbQueue = (op: () => Promise) => Promise; - -export class DeviceThumbs { - /** What the tiles read, keyed `kind:id` within the current scope. */ - private readonly tracks = new SvelteMap(); - private readonly cache: ThumbCache | null; - private scope: string | null = null; - - constructor(storage: ThumbStorage | null = null) { - this.cache = storage ? new ThumbCache(storage) : null; - } - - /** The track for a tile, or null while it is still on its way. Reactive. */ - get(kind: ThumbKind, id: bigint): Thumb | null { - return this.tracks.get(memKey(kind, id))?.track ?? null; - } - - /** Forget the map when `(serial, StoreId)` changes; ids are recycled across device scopes. */ - ensureScope(scope: RideScope): void { - const key = scopeKey(scope); - if (this.scope === key) return; - this.scope = key; - this.tracks.clear(); - } - - /** - * One thumbnail: memory, then the loader. The load runs through `queue`, so it cannot race a - * user action on the single transfer slot. - * - * A completion that crossed an abort or scope change is dropped: device A's route 1 must never - * land on device B's route 1 tile. - */ - async ensure(scope: RideScope, request: ThumbRequest, queue: ThumbQueue, signal: AbortSignal): Promise { - this.ensureScope(scope); - const started = this.scope; - const key = memKey(request.kind, request.id); - const held = this.tracks.get(key); - if (held?.fingerprint === request.fingerprint) return held.track; - const storageKey = - request.fingerprint === null ? null : thumbKey(scope, request.kind, request.id, request.fingerprint); - const stored = storageKey === null ? null : (this.cache?.get(storageKey) ?? null); - if (stored) { - this.tracks.set(key, { fingerprint: request.fingerprint, track: stored }); - return stored; - } - const track = await queue(async () => { - // A preview click and the background fill can both ask for the same object while one is - // queued. Recheck after entering the slot so the second request reuses the first. - const landed = this.scope === started ? this.tracks.get(key) : null; - if (landed?.fingerprint === request.fingerprint) return landed.track; - return downsampleTrack(await request.load(signal)); - }); - if (!signal.aborted && this.scope === started) { - if (storageKey !== null) this.cache?.put(storageKey, track); - this.tracks.set(key, { fingerprint: request.fingerprint, track }); - } - return track; - } - - /** Delete durable previews. Current on-screen previews stay in memory until the app closes. */ - clearPersistent(): number { - return this.cache?.clear() ?? 0; - } - - /** Fill every missing thumbnail one at a time. A failed load is skipped; abort ends the walk. */ - async fill( - scope: RideScope, - requests: readonly ThumbRequest[], - queue: ThumbQueue, - signal: AbortSignal, - ): Promise { - for (const request of requests) { - if (signal.aborted) return; - try { - await this.ensure(scope, request, queue, signal); - } catch { - if (signal.aborted) return; - } - } - } -} - -function memKey(kind: ThumbKind, id: bigint): string { - return `${kind}:${id}`; -} - -/** `localStorage` behind the seam, when the host permits it. */ -function browserStorage(): ThumbStorage | null { - try { - const storage = globalThis.localStorage; - storage.getItem(`${PREFIX}probe`); - return { - get: (key) => storage.getItem(key), - set: (key, value) => storage.setItem(key, value), - remove: (key) => storage.removeItem(key), - keys: () => { - const keys: string[] = []; - for (let i = 0; i < storage.length; i++) { - const key = storage.key(i); - if (key !== null) keys.push(key); - } - return keys; - }, - }; - } catch { - return null; - } -} - -/** A Map wearing the storage interface, used by tests and harmless fallbacks. */ -export function memoryStorage(): ThumbStorage { - const map = new Map(); - return { - get: (key) => map.get(key) ?? null, - set: (key, value) => void map.set(key, value), - remove: (key) => void map.delete(key), - keys: () => [...map.keys()], - }; -} - -/** Pure policy seam: only the installed desktop build receives durable thumbnail storage. */ -export function thumbnailStorageFor(host: PlatformName, storage: ThumbStorage | null): ThumbStorage | null { - return host === "desktop" ? storage : null; -} - -/** Remove old web entries while preserving the desktop cache. */ -function purgeWebThumbs(storage: ThumbStorage | null): void { - if (platform.name === "desktop" || storage === null) return; - for (const key of storage.keys()) { - if (key.startsWith(PREFIX)) storage.remove(key); - } -} - -const hostStorage = browserStorage(); -purgeWebThumbs(hostStorage); - -/** Shared session store; durable backing exists in the installed desktop build only. */ -export const deviceThumbs = new DeviceThumbs(thumbnailStorageFor(platform.name, hostStorage)); diff --git a/builder/web/src/lib/device/thumbs.test.ts b/builder/web/src/lib/device/thumbs.test.ts deleted file mode 100644 index 3b83c99895..0000000000 --- a/builder/web/src/lib/device/thumbs.test.ts +++ /dev/null @@ -1,314 +0,0 @@ -/** The host-specific thumbnail store, with device I/O represented by loader functions. */ - -import { describe, expect, it } from "vitest"; - -import { PREVIEW_POINTS } from "./library"; -import type { RideScope } from "./rides"; -import { - DeviceThumbs, - ThumbCache, - memoryStorage, - entryFingerprint, - thumbKey, - thumbnailStorageFor, - type Thumb, - type ThumbRequest, - type ThumbStorage, -} from "./thumbs.svelte"; - -const SCOPE: RideScope = { serial: "OBC-0042", storeId: "00000000000000000000000000000007" }; -const TRACK: Thumb = [ - [47.9950001234, 7.8420009876], - [47.996, 7.843], - [47.997, 7.844], -]; - -const request = (id: number, load: ThumbRequest["load"]): ThumbRequest => ({ - kind: "route", - id: BigInt(id), - fingerprint: `c${id}`, - load, -}); - -function recordedStorage(): { storage: ThumbStorage; map: Map } { - const map = new Map(); - return { - map, - storage: { - get: (key) => map.get(key) ?? null, - set: (key, value) => void map.set(key, value), - remove: (key) => void map.delete(key), - keys: () => [...map.keys()], - }, - }; -} - -function ticker(): { now: () => number; tick: () => void } { - let value = 1_000; - return { now: () => value, tick: () => void (value += 1) }; -} - -describe("thumb keys", () => { - it("carry device scope, kind, id and fingerprint", () => { - const key = thumbKey(SCOPE, "route", 12n, "c123"); - expect(key).toContain("OBC-0042"); - expect(thumbKey(SCOPE, "ride", 9007199254740992n, "c123")).not.toBe( - thumbKey(SCOPE, "ride", 9007199254740993n, "c123"), - ); - expect(key).toContain(":00000000000000000000000000000007:route:12:c123"); - expect(thumbKey({ ...SCOPE, storeId: "00000000000000000000000000000008" }, "route", 12n, "c123")).not.toBe(key); - }); - - it("uses the route CRC and does not invent a missing fingerprint", () => { - expect(entryFingerprint({ payloadCrc32: 0xdeadbeef })).toBe(`c${0xdeadbeef}`); - // A ride the device is still recording declares a zero CRC, and a null fingerprint is - // what keeps its half-written payload out of the durable cache. - expect(entryFingerprint({ payloadCrc32: 0 })).toBeNull(); - }); - - it("fingerprints an immutable ride by start time and length", () => { - expect(entryFingerprint({ payloadCrc32: 4_242 })).toBe("c4242"); - }); -}); - -describe("ThumbCache", () => { - it("round-trips a track and rounds coordinates to six decimals", () => { - const cache = new ThumbCache(recordedStorage().storage); - const key = thumbKey(SCOPE, "route", 1n, "c1"); - cache.put(key, TRACK); - expect(cache.get(key)).toEqual([ - [47.995, 7.842001], - [47.996, 7.843], - [47.997, 7.844], - ]); - }); - - it("removes corrupt entries so the caller can refetch", () => { - const { storage, map } = recordedStorage(); - const cache = new ThumbCache(storage); - const key = thumbKey(SCOPE, "route", 1n, "c1"); - for (const junk of ["not json", "42", `{"at":"soon","track":[]}`, `{"at":1,"track":[[1]]}`]) { - map.set(key, junk); - expect(cache.get(key)).toBeNull(); - expect(map.has(key)).toBe(false); - } - }); - - it("evicts the least recently used entry past the cap", () => { - const { storage, map } = recordedStorage(); - const clock = ticker(); - const cache = new ThumbCache(storage, 3, clock.now); - const keys = [1, 2, 3, 4].map((id) => thumbKey(SCOPE, "route", BigInt(id), `c${id}`)); - for (const key of keys.slice(0, 3)) { - cache.put(key, TRACK); - clock.tick(); - } - cache.get(keys[0]); - clock.tick(); - cache.put(keys[3], TRACK); - expect(map.has(keys[0])).toBe(true); - expect(map.has(keys[1])).toBe(false); - expect(map.has(keys[2])).toBe(true); - expect(map.has(keys[3])).toBe(true); - }); - - it("treats storage quota failures as a missing optimization", () => { - const { storage, map } = recordedStorage(); - const cache = new ThumbCache( - { - ...storage, - set: (key, value) => { - if (map.size >= 1 && !map.has(key)) throw new DOMException("quota"); - storage.set(key, value); - }, - }, - 1, - ); - expect(() => cache.put(thumbKey(SCOPE, "route", 1n, "c1"), TRACK)).not.toThrow(); - expect(() => cache.put(thumbKey(SCOPE, "route", 2n, "c2"), TRACK)).not.toThrow(); - }); -}); - -describe("DeviceThumbs", () => { - it("fills strictly one at a time, in order, through the queue", async () => { - const thumbs = new DeviceThumbs(); - const order: string[] = []; - const queue = async (op: () => Promise): Promise => { - order.push("enter"); - const result = await op(); - order.push("leave"); - return result; - }; - const requests = [1, 2, 3].map((id) => - request(id, async () => { - order.push(`load ${id}`); - return TRACK; - }), - ); - await thumbs.fill(SCOPE, requests, queue, new AbortController().signal); - expect(order).toEqual(["enter", "load 1", "leave", "enter", "load 2", "leave", "enter", "load 3", "leave"]); - expect(thumbs.get("route", 2n)).not.toBeNull(); - }); - - it("reuses a track within the session but refetches after a reload", async () => { - const first = new DeviceThumbs(); - let loads = 0; - const load = async (): Promise => { - loads += 1; - return TRACK; - }; - const queue = (op: () => Promise) => op(); - const signal = new AbortController().signal; - await first.fill(SCOPE, [request(1, load)], queue, signal); - await first.fill(SCOPE, [request(1, load)], queue, signal); - expect(loads).toBe(1); - - // A fresh store models a reload: no device-derived coordinates survive it. - const second = new DeviceThumbs(); - await second.fill(SCOPE, [request(1, load)], queue, signal); - expect(loads).toBe(2); - }); - - it("persists across a desktop restart but never across a web reload", async () => { - const storage = memoryStorage(); - const queue = (op: () => Promise) => op(); - const signal = new AbortController().signal; - let loads = 0; - const load = async (): Promise => { - loads += 1; - return TRACK; - }; - - const desktopFirst = new DeviceThumbs(thumbnailStorageFor("desktop", storage)); - await desktopFirst.fill(SCOPE, [request(1, load)], queue, signal); - const desktopRestart = new DeviceThumbs(thumbnailStorageFor("desktop", storage)); - await desktopRestart.fill(SCOPE, [request(1, load)], queue, signal); - expect(loads).toBe(1); - - const webReload = new DeviceThumbs(thumbnailStorageFor("web", storage)); - await webReload.fill(SCOPE, [request(1, load)], queue, signal); - expect(loads).toBe(2); - }); - - it("refetches an edited object in the same session and after restart", async () => { - const storage = memoryStorage(); - const thumbs = new DeviceThumbs(storage); - const queue = (op: () => Promise) => op(); - const signal = new AbortController().signal; - let loads = 0; - const load = async (): Promise => { - loads += 1; - return TRACK; - }; - - await thumbs.fill(SCOPE, [request(1, load)], queue, signal); - await thumbs.fill(SCOPE, [{ ...request(1, load), fingerprint: "c-edited" }], queue, signal); - const restarted = new DeviceThumbs(storage); - await restarted.fill(SCOPE, [{ ...request(1, load), fingerprint: "c-edited" }], queue, signal); - expect(loads).toBe(2); - }); - - it("can delete every durable preview without touching unrelated storage", async () => { - const map = new Map(); - const storage: ThumbStorage = { - get: (key) => map.get(key) ?? null, - set: (key, value) => void map.set(key, value), - remove: (key) => void map.delete(key), - keys: () => [...map.keys()], - }; - map.set("unrelated", "keep"); - const thumbs = new DeviceThumbs(storage); - await thumbs.fill( - SCOPE, - [request(1, async () => TRACK), request(2, async () => TRACK)], - (op) => op(), - new AbortController().signal, - ); - expect(thumbs.clearPersistent()).toBe(2); - expect(map).toEqual(new Map([["unrelated", "keep"]])); - }); - - it("downsamples an over-long load to the preview cap", async () => { - const thumbs = new DeviceThumbs(); - const long: Thumb = Array.from({ length: 3 * PREVIEW_POINTS }, (_, i) => [47 + i * 1e-5, 7.8]); - await thumbs.fill(SCOPE, [request(1, async () => long)], (op) => op(), new AbortController().signal); - expect(thumbs.get("route", 1n)!.length).toBeLessThanOrEqual(PREVIEW_POINTS); - }); - - it("stops the walk on abort, and skips a failed load", async () => { - const thumbs = new DeviceThumbs(); - const controller = new AbortController(); - const loaded: number[] = []; - const requests = [ - request(1, async () => { - throw new Error("cable hiccup"); - }), - request(2, async () => { - loaded.push(2); - return TRACK; - }), - request(3, async () => { - controller.abort(); - throw new Error("unplugged"); - }), - request(4, async () => { - loaded.push(4); - return TRACK; - }), - ]; - await thumbs.fill(SCOPE, requests, (op) => op(), controller.signal); - expect(loaded).toEqual([2]); - expect(thumbs.get("route", 1n)).toBeNull(); - expect(thumbs.get("route", 4n)).toBeNull(); - }); - - it("drops a completion that crossed an abort and scope change", async () => { - const thumbs = new DeviceThumbs(); - const scopeB: RideScope = { serial: "OBC-0042", storeId: "00000000000000000000000000000008" }; - let resolveA: ((track: Thumb) => void) | undefined; - const pendingA = new Promise((resolve) => (resolveA = resolve)); - const aborter = new AbortController(); - - const fillA = thumbs.fill(SCOPE, [request(1, () => pendingA)], (op) => op(), aborter.signal); - aborter.abort(); - thumbs.ensureScope(scopeB); - resolveA!(TRACK); - await fillA; - expect(thumbs.get("route", 1n)).toBeNull(); - - let loadsB = 0; - await thumbs.fill( - scopeB, - [ - request(1, async () => { - loadsB += 1; - return TRACK; - }), - ], - (op) => op(), - new AbortController().signal, - ); - expect(loadsB).toBe(1); - expect(thumbs.get("route", 1n)).not.toBeNull(); - }); - - it("drops a completion that crossed a plain abort", async () => { - const thumbs = new DeviceThumbs(); - const aborter = new AbortController(); - let resolveLoad: ((track: Thumb) => void) | undefined; - const pending = new Promise((resolve) => (resolveLoad = resolve)); - const fill = thumbs.fill(SCOPE, [request(1, () => pending)], (op) => op(), aborter.signal); - aborter.abort(); - resolveLoad!(TRACK); - await fill; - expect(thumbs.get("route", 1n)).toBeNull(); - }); - - it("forgets the in-memory map on a scope change", async () => { - const thumbs = new DeviceThumbs(); - await thumbs.fill(SCOPE, [request(1, async () => TRACK)], (op) => op(), new AbortController().signal); - expect(thumbs.get("route", 1n)).not.toBeNull(); - thumbs.ensureScope({ serial: "OBC-0042", storeId: "00000000000000000000000000000008" }); - expect(thumbs.get("route", 1n)).toBeNull(); - }); -}); diff --git a/builder/web/src/lib/device/tripDelete.test.ts b/builder/web/src/lib/device/tripDelete.test.ts deleted file mode 100644 index 9b3017a27e..0000000000 --- a/builder/web/src/lib/device/tripDelete.test.ts +++ /dev/null @@ -1,102 +0,0 @@ -/** - * The delete-trip offer's rules (`tripDelete.ts`), held still: shared stages are protected, - * unreadable stage lists degrade the offer, duplicates and dangling ids never inflate the counts. - */ - -import { describe, expect, it } from "vitest"; - -import { planTripDelete, type TripStages } from "./tripDelete"; - -const trip = (objectId: number, name: string, stages: readonly number[] | null): TripStages => ({ - objectId: BigInt(objectId), - name, - detail: stages === null ? null : { days: stages.map((id) => ({ route: BigInt(id) })) }, -}); - -const routes = (...ids: number[]) => new Set(ids.map(BigInt)); -const ids = (...values: number[]) => values.map(BigInt); - -describe("planTripDelete", () => { - it("offers both options with every unshared existing route deletable", () => { - const t = trip(1, "Traverse", [2, 3, 4]); - const plan = planTripDelete(t, [t], routes(2, 3, 4)); - expect(plan).toEqual({ offer: "both", deletable: ids(2, 3, 4), routeCount: 3, note: null }); - }); - - it("protects a route that is also a stage of another trip, and says so", () => { - const t = trip(1, "Traverse", [2, 3, 4, 5]); - const other = trip(9, "Other trip", [3, 5, 77]); - const plan = planTripDelete(t, [t, other], routes(2, 3, 4, 5, 77)); - expect(plan).toEqual({ - offer: "both", - deletable: ids(2, 4), - routeCount: 4, - note: "2 of its 4 routes are also in “Other trip” and will stay.", - }); - }); - - it("names every trip a shared route belongs to", () => { - const t = trip(1, "Traverse", [2, 3]); - const a = trip(8, "Alps", [2]); - const b = trip(9, "Baltic", [3]); - const plan = planTripDelete(t, [t, a, b], routes(2, 3)); - expect(plan).toMatchObject({ - offer: "trip-only", - reason: "All of its routes are also in other trips and would stay anyway.", - }); - // With one route of three still deletable, both names appear in the note. - const t2 = trip(1, "Traverse", [2, 3, 4]); - const plan2 = planTripDelete(t2, [t2, a, b], routes(2, 3, 4)); - expect(plan2).toMatchObject({ - deletable: ids(4), - note: "2 of its 3 routes are also in “Alps” and “Baltic” and will stay.", - }); - }); - - it("counts a duplicated stage id once", () => { - const t = trip(1, "Loop twice", [2, 2, 3]); - const plan = planTripDelete(t, [t], routes(2, 3)); - expect(plan).toEqual({ offer: "both", deletable: ids(2, 3), routeCount: 2, note: null }); - }); - - it("ignores dangling stage ids — they are not routes", () => { - const t = trip(1, "Traverse", [2, 3, 99]); - const plan = planTripDelete(t, [t], routes(2, 3)); - expect(plan).toEqual({ offer: "both", deletable: ids(2, 3), routeCount: 2, note: null }); - }); - - it("degrades to trip-only when another trip's stage list is unreadable", () => { - const t = trip(1, "Traverse", [2, 3]); - const broken = trip(9, "Mystery", null); - expect(planTripDelete(t, [t, broken], routes(2, 3))).toEqual({ - offer: "trip-only", - reason: "Another trip's stage list could not be read, so no routes are deleted with this one.", - }); - }); - - it("degrades to trip-only when this trip's own stage list is unreadable", () => { - const t = trip(1, "Traverse", null); - expect(planTripDelete(t, [t], routes(2, 3))).toEqual({ - offer: "trip-only", - reason: "This trip's own stage list could not be read.", - }); - }); - - it("offers trip-only (no reason line) when nothing it lists is still on the device", () => { - const t = trip(1, "Ghost tour", [98, 99]); - expect(planTripDelete(t, [t], routes(2, 3))).toEqual({ offer: "trip-only", reason: null }); - }); - - it("uses the singular for one protected route of one", () => { - const t = trip(1, "Solo", [2]); - const other = trip(9, "Other trip", [2, 3]); - expect(planTripDelete(t, [t, other], routes(2, 3))).toMatchObject({ - offer: "trip-only", - reason: "All of its routes are also in other trips and would stay anyway.", - }); - const t2 = trip(1, "Pair", [2, 4]); - expect(planTripDelete(t2, [t2, other], routes(2, 3, 4))).toMatchObject({ - note: "1 of its 2 routes is also in “Other trip” and will stay.", - }); - }); -}); diff --git a/builder/web/src/lib/device/tripDelete.ts b/builder/web/src/lib/device/tripDelete.ts deleted file mode 100644 index be50ad3b25..0000000000 --- a/builder/web/src/lib/device/tripDelete.ts +++ /dev/null @@ -1,102 +0,0 @@ -/** - * What deleting a trip *with its routes* may actually delete — computed up front, so the - * confirmation can say the truth before anything happens. - * - * Pure bookkeeping over the dashboard's trip views, separated from the page because the rules are - * easy to state and easy to get subtly wrong. - * - * The rules: - * - * 1. A route that is **also a stage of another trip** is never deleted with this one — the other - * trip still points at it. Shared stages are excluded and named in the dialog's note. - * 2. **Unreadable stage lists poison the whole offer.** If any *other* trip's `detail` is null, - * nothing can prove a route of this trip is not shared with it, so the offer degrades to - * "delete the trip only", with the reason. Same when this trip's own list is unreadable. - * 3. Duplicate stage ids within the trip count once, and ids that no longer resolve to a route on - * the device are not "routes" at all. - */ - -/** The slice of a `TripView` this module reads — structural, so tests need no protocol types. */ -export interface TripStages { - readonly objectId: bigint; - readonly name: string; - /** The trip's days, or null when the trip object could not be read. */ - readonly detail: { readonly days: readonly { readonly route: bigint }[] } | null; -} - -export type TripDeletePlan = - | { - /** Only "delete the trip only" is offered; `reason` (when set) says why in one line. */ - readonly offer: "trip-only"; - readonly reason: string | null; - } - | { - readonly offer: "both"; - /** The route ids deleted by the second option — deduped, existing, not shared. */ - readonly deletable: readonly bigint[]; - /** The trip's unique stage ids that exist as routes — the dialog's "its N routes". */ - readonly routeCount: number; - /** "2 of its 4 routes are also in “Other trip” and will stay" — null when none are. */ - readonly note: string | null; - }; - -/** - * Decide what the delete-trip confirmation may offer for `trip`, given every trip on the card - * (`allTrips` includes `trip` itself) and the ids of the routes that actually exist. - */ -function routesOf(trip: TripStages): bigint[] { - return trip.detail?.days.map((day) => day.route) ?? []; -} - -export function planTripDelete( - trip: TripStages, - allTrips: readonly TripStages[], - existingRouteIds: ReadonlySet, -): TripDeletePlan { - if (trip.detail === null) { - return { offer: "trip-only", reason: "This trip's own stage list could not be read." }; - } - const others = allTrips.filter((t) => t.objectId !== trip.objectId); - if (others.some((t) => t.detail === null)) { - return { - offer: "trip-only", - reason: "Another trip's stage list could not be read, so no routes are deleted with this one.", - }; - } - - // Unique stage ids that are still routes on the device, in stage order. - const routes = [...new Set(routesOf(trip))].filter((id) => existingRouteIds.has(id)); - if (routes.length === 0) return { offer: "trip-only", reason: null }; - - // A route is shared when any other trip lists it too; remember who, for the note. - const sharedIn = new Map(); - for (const other of others) { - for (const id of new Set(routesOf(other))) { - if (routes.includes(id)) sharedIn.set(id, [...(sharedIn.get(id) ?? []), other]); - } - } - const deletable = routes.filter((id) => !sharedIn.has(id)); - if (deletable.length === 0) { - return { offer: "trip-only", reason: "All of its routes are also in other trips and would stay anyway." }; - } - - return { offer: "both", deletable, routeCount: routes.length, note: sharedNote(routes.length, sharedIn) }; -} - -/** - * The dialog's up-front sentence about the routes that stay: how many, and with whom. Only reached - * from the "both" offer, where at least one route is shared and at least one is not. - */ -function sharedNote(routeCount: number, sharedIn: ReadonlyMap): string | null { - if (sharedIn.size === 0) return null; - const names = [...new Set([...sharedIn.values()].flat().map((t) => t.name || `Trip ${t.objectId}`))]; - const listed = - names.length === 1 - ? `“${names[0]}”` - : `${names - .slice(0, -1) - .map((n) => `“${n}”`) - .join(", ")} and “${names[names.length - 1]}”`; - const verb = sharedIn.size === 1 ? "is" : "are"; - return `${sharedIn.size} of its ${routeCount} routes ${verb} also in ${listed} and will stay.`; -} diff --git a/builder/web/src/lib/firmware/release.test.ts b/builder/web/src/lib/firmware/release.test.ts index 4a6dfdeee9..171e2b3795 100644 --- a/builder/web/src/lib/firmware/release.test.ts +++ b/builder/web/src/lib/firmware/release.test.ts @@ -59,8 +59,8 @@ describe("fetchFirmwareRelease", () => { it("asks the mirror rather than GitHub", async () => { // Not a style preference: a GitHub release asset 302s to storage that sends no CORS - // header, so this fetch fails in a browser and in the desktop webview — the two hosts that - // have a browser in them. The manifest is mirrored to R2 for exactly that reason. + // header, so this fetch fails in a browser. The manifest is mirrored to R2 for exactly that + // reason. expect(FIRMWARE_MANIFEST_URL).toBe("https://updates.openbikecomputer.com/fw/manifest.json"); expect(FIRMWARE_MANIFEST_URL).not.toContain("github"); diff --git a/builder/web/src/lib/platform/bundle.test.ts b/builder/web/src/lib/platform/bundle.test.ts index 847b0a375a..643e23cbd8 100644 --- a/builder/web/src/lib/platform/bundle.test.ts +++ b/builder/web/src/lib/platform/bundle.test.ts @@ -2,9 +2,8 @@ // Vite actually emits is asserted here, against what Rollup put in the emitted // output rather than against source imports or a grep of them. // -// One file, because Vitest isolates by file and not by test. Three builds, -// because `web`, `production` (the dev host) and `desktop` are three different -// module graphs. +// One file, because Vitest isolates by file and not by test. Two builds, +// because `web` and `production` (the dev host) are two different module graphs. import { build } from "vite"; import { describe, expect, it } from "vitest"; @@ -62,13 +61,12 @@ function product(mode: string, env: Record = {}): Promise return next; } -/** The static web tier as `.github/workflows/deploy-site.yml` builds it, the - * maintainer dev host, and the Tauri app. `VITE_SITE_BASE` only sets the link +/** The static web tier as `.github/workflows/deploy-site.yml` builds it, and the + * maintainer dev host. `VITE_SITE_BASE` only sets the link * prefix in `lib/constants.ts`, so the deployed build stands for `npm run build:web` * too. */ const web = () => product("web", { VITE_SITE_BASE: "../" }); const dev = () => product("production"); -const desktop = () => product("desktop"); /** Every source module in every emitted chunk of one product, and only the ones * Rollup put in an entry chunk. */ @@ -89,45 +87,14 @@ function textFiles(b: Built): Map { return files; } -/** - * Source modules the static web tier must not contain. - * - * `@tauri-apps/api` in a static site's bundle would mean the host alias picked - * the wrong module, which the assertions below could not otherwise notice: a - * desktop host's methods all resolve and simply never work in a browser. - * `lib/desktop/release.ts` is deliberately absent — the web tier reads it, to - * decide whether the desktop app has a download link yet. - */ -const DESKTOP_ONLY = { +/** Source modules the static web tier must not contain: only the dev host has them. */ +const DEV_ONLY = { "the FastAPI client": /\/src\/lib\/api\/client\.ts$/, "the dev host": /\/src\/lib\/platform\/dev\.ts$/, - "the desktop host": /\/src\/lib\/platform\/desktop\.ts$/, - "the Tauri command bridge": /\/src\/lib\/desktop\/invoke\.ts$/, - "the native USB transport": /\/src\/lib\/desktop\/usb\.ts$/, - "the native USB session": /\/src\/lib\/desktop\/usb\.svelte\.ts$/, - "the ride library's Tauri backing": /\/src\/lib\/desktop\/library\.ts$/, - "the Tauri JS API": /\/@tauri-apps\/api\//, "the style editor route": /\/src\/routes\/Advanced\.svelte/, "the style editor components": /\/src\/components\/advanced\//, }; -/** …and the ones only the *desktop* target may contain, for the same reason in - * the other direction: a desktop build that quietly fell back to the dev host - * would talk to a FastAPI server that isn't running. */ -const DESKTOP_TARGET_ONLY = { - "the desktop host": /\/src\/lib\/platform\/desktop\.ts$/, - "the Tauri command bridge": /\/src\/lib\/desktop\/invoke\.ts$/, - // The desktop tier drives USB natively. Its presence here also proves the - // dynamic `import()` in `desktop.ts` still resolves — `device()` is only - // called from a click, so a broken path would surface on someone's desk. - "the native USB transport": /\/src\/lib\/desktop\/usb\.ts$/, - "the native USB session": /\/src\/lib\/desktop\/usb\.svelte\.ts$/, - // Only the tier with a disk may carry the code that writes the ride library. - // Its presence also proves `desktop.ts`'s dynamic `import()` still resolves. - "the ride library's Tauri backing": /\/src\/lib\/desktop\/library\.ts$/, - "the Tauri JS API": /\/@tauri-apps\/api\//, -}; - describe("bundle split", () => { it("keeps build and style-editor code out of the web target", async () => { const modules = modulesOf(await web()); @@ -136,7 +103,7 @@ describe("bundle split", () => { expect(modules.some((id) => id.endsWith("/src/lib/platform/web.ts"))).toBe(true); expect(modules.some((id) => id.includes("/src/routes/Home.svelte"))).toBe(true); - const found = Object.entries(DESKTOP_ONLY).flatMap(([what, re]) => + const found = Object.entries(DEV_ONLY).flatMap(([what, re]) => modules.filter((id) => re.test(id)).map((id) => `${what}: ${id}`), ); expect(found).toEqual([]); @@ -147,40 +114,21 @@ describe("bundle split", () => { }, 180_000); it("ships the maintainer style editor only in the dev target", async () => { - // The dev host's own set: everything in DESKTOP_ONLY except the rows that - // name the *desktop* host — one alias picks exactly one host. const modules = modulesOf(await dev()); - const missing = Object.entries(DESKTOP_ONLY) - .filter(([what]) => !(what in DESKTOP_TARGET_ONLY)) + const missing = Object.entries(DEV_ONLY) .filter(([, re]) => !modules.some((id) => re.test(id))) .map(([what]) => what); expect(missing).toEqual([]); - const strays = Object.entries(DESKTOP_TARGET_ONLY).flatMap(([what, re]) => - modules.filter((id) => re.test(id)).map((id) => `${what}: ${id}`), - ); - expect(strays).toEqual([]); - - // Localhost is a secure WebUSB context, so this build must keep the same - // lazy browser transport rather than a desktop-only dead end. + // Localhost is a secure WebUSB context, so this build keeps the same lazy + // browser transport. expect(modules.some((id) => id.endsWith("/src/lib/usb/webusb.ts"))).toBe(true); }, 180_000); - - it("wires the desktop target to the Tauri backend", async () => { - const modules = modulesOf(await desktop()); - const missing = Object.entries(DESKTOP_TARGET_ONLY) - .filter(([, re]) => !modules.some((id) => re.test(id))) - .map(([what]) => what); - expect(missing).toEqual([]); - // …and not to the maintainer dev server. - expect(modules.some((id) => /\/src\/lib\/api\/client\.ts$/.test(id))).toBe(false); - }, 180_000); }); // Whatever the bundler puts in the bundle, its licence text has to ship beside // it. A list of `dependencies` would prove nothing: Svelte is a devDependency -// compiled into every chunk, and `@tauri-apps/api` is one the web tier never -// bundles. +// compiled into every chunk. const LICENSE_FILE = "third-party-licenses.txt"; @@ -223,13 +171,6 @@ describe("third-party licences", () => { expect(notices).toContain(`Map data ${registryAttribution("osm-planet")}, under the ODbL`); }, 180_000); - it("describes the tier it was built for, not a fixed list", async () => { - // The desktop tier bundles the Tauri API the web tier does not, so the two - // notice files must differ. - const built = await desktop(); - expect(bundledPackages(modulesOf(built))).toContain("@tauri-apps/api"); - expect(noticesOf(built)).toContain("@tauri-apps/api"); - }, 180_000); }); // The static web tier is published under a project sub-path and is expected to @@ -286,15 +227,10 @@ describe("deployment portability", () => { }, 180_000); }); -// The USB stack must stay in its own chunk, not the web tier's entry bundle. `platform/web.ts` +// The USB stack must stay in its own chunk, not the web tier's entry bundle. `lib/device/session` // reaches it through a dynamic `import()` so a visitor who only downloads a map never fetches the // transport, the codecs and the client. That split disappears *silently*: everything still works, // the entry chunk is just bigger. -// -// The likeliest way to break it is deduplication that looks like a tidy-up. `platform/gating.ts` -// has its own one-line `hasWebUsb()` that overlaps this module's `webUsb()`. They are duplicated on -// purpose: `gating.ts` lives in the entry chunk, so importing anything from `lib/usb/` into it would -// drag the whole stack in behind it. const IS_USB = /\/src\/lib\/usb\//; @@ -311,15 +247,10 @@ describe("the USB stack's chunk", () => { expect(inEntry, "the USB stack leaked into the entry chunk").toEqual([]); }, 180_000); - it.each([ - ["web", web], - ["desktop", desktop], - ])("does not ship the simulated device (%s target)", async (_mode, target) => { + it("does not ship the simulated device", async () => { // `loopback.ts` is the in-memory transport and `flat-device.ts` with its wasm package is a - // whole device. Neither belongs in anything a person installs or visits. The desktop row - // matters most: that app is the one people take to a bench with a real board, where "if the - // window says Connected, something enumerated" is the first tell that a transfer is real. - const built = await target(); + // whole device. Neither belongs in anything a person visits. + const built = await web(); const shipped = modulesOf(built).filter((id) => /\/src\/lib\/usb\/(loopback|flat-device)\.ts$|\/test-support\/flat-device\//.test(id), ); diff --git a/builder/web/src/lib/platform/desktop.ts b/builder/web/src/lib/platform/desktop.ts deleted file mode 100644 index 67cbce0b90..0000000000 --- a/builder/web/src/lib/platform/desktop.ts +++ /dev/null @@ -1,99 +0,0 @@ -// The desktop host: the same catalog builder inside a Tauri shell, with a real -// filesystem and native device access underneath. Every method here is one -// `invoke()` of a Rust command in builder/desktop. -// -// The caps are the tier's contract, and what the gating layer compares the web tier -// against. -// -// Where this host differs from the dev server, it differs because of the two things -// it has that a server does not: -// -// * `catalog()` reads the published manifest through Rust rather than `fetch()`. -// The window is granted no network capability at all, so the set of hosts this -// app talks to is a reviewable list in one Rust module. -// * `device()` drives USB itself (`nusb`), because the system webview has no -// WebUSB — which is also what makes this the only tier a Safari or Firefox user -// can plug a device into at all. - -import type { MapOutputSession, Platform } from "./types"; -import { desktop } from "../desktop/invoke"; - -/** - * The catalog document as the Rust side fetched it. Validation belongs to the catalog - * client, so the desktop host has the same single root-fetch seam as the web host. - * Only a fulfilled read is memoized. - */ -let rootInflight: Promise<{ url: string; body: string }> | null = null; - -function catalog({ refresh = false }: { refresh?: boolean } = {}): Promise<{ url: string; body: string }> { - if (refresh) rootInflight = null; - if (!rootInflight) { - const request = Promise.resolve().then(() => desktop.catalog()).catch((e: unknown) => { - if (rootInflight === request) rootInflight = null; - throw e; - }); - rootInflight = request; - } - return rootInflight; -} - -const catalogFetch: typeof fetch = async (input, init) => { - if (init?.signal?.aborted) throw init.signal.reason; - const url = input instanceof Request ? input.url : input.toString(); - const bytes = await desktop.catalogGet(url); - if (init?.signal?.aborted) throw init.signal.reason; - return new Response(bytes, { status: 200 }); -}; - -async function openMapOutput(name: string): Promise { - const opened = await desktop.mapOutputBegin(name); - return { - path: opened.path, - // The IPC takes contiguous bytes; a Blob is read back here, which is the - // whole map resident — the residency this host has always had, and the - // reason the assembly's own sink is the saving that matters. - write: async (filename, body) => - desktop.mapOutputWrite( - opened.id, - filename, - body instanceof Uint8Array ? body : new Uint8Array(await body.arrayBuffer()), - ), - finish: () => desktop.mapOutputFinish(opened.id), - discard: () => desktop.mapOutputDiscard(opened.id), - }; -} - -export const platform: Platform = { - name: "desktop", - caps: { - rideLibrary: true, - deviceUsb: true, - deviceDashboard: true, - }, - - // A native driver, which is the point: the desktop app is the universal USB path, - // including for the browsers WebUSB never reaches. - usbViaWebUsb: false, - - catalog, - catalogFetch, - openMapOutput, - - styleEditor: null, - - // Native USB, loaded on demand for the same reason the web host does it: the - // protocol client, the codecs and the transport are their own chunk, and a window - // that only builds a map never parses them. Underneath it is the same - // `FlatStoreClient` the browser drives — only the byte pipe differs. - device: async () => { - const { openNativeSession } = await import("../desktop/usb.svelte"); - return openNativeSession(); - }, - // The managed ride library, loaded on demand for the same reason `device()` is: it - // reaches the ride codecs, the wasm GPX exporter and the Tauri ride commands. - // `platform/bundle.test.ts` pins the module to this target. - rides: async () => { - const { openRideLibrary } = await import("../desktop/library"); - return openRideLibrary(); - }, -}; diff --git a/builder/web/src/lib/platform/desktop.wire.test.ts b/builder/web/src/lib/platform/desktop.wire.test.ts deleted file mode 100644 index f2123ae9ba..0000000000 --- a/builder/web/src/lib/platform/desktop.wire.test.ts +++ /dev/null @@ -1,112 +0,0 @@ -// The desktop host reads the same published catalog root as the website. - -import { readFileSync } from "node:fs"; -import { beforeEach, describe, expect, it, vi } from "vitest"; - -const EXAMPLE = readFileSync( - new URL("../../../../../host/obc-pack/schema/catalog.example.json", import.meta.url), - "utf8", -); - -interface Call { - cmd: string; - args: unknown; - options: unknown; -} - -const calls: Call[] = []; -let reply: (cmd: string) => unknown = () => ({}); - -vi.mock("@tauri-apps/api/core", () => ({ - invoke: (cmd: string, args?: unknown, options?: unknown) => { - calls.push({ cmd, args, options }); - return Promise.resolve(reply(cmd)); - }, - Channel: class { onmessage: ((message: unknown) => void) | null = null; }, -})); - -async function freshHost() { - vi.resetModules(); - return (await import("./desktop")).platform; -} - -beforeEach(() => { - calls.length = 0; - reply = () => ({}); -}); - -describe("desktop catalog command", () => { - it("returns the root exactly as Rust fetched it", async () => { - reply = () => ({ url: "https://example.invalid/data/catalog.json", body: EXAMPLE }); - await expect((await freshHost()).catalog()).resolves.toEqual({ - url: "https://example.invalid/data/catalog.json", - body: EXAMPLE, - }); - }); - - it("memoizes a fulfilled read", async () => { - reply = () => ({ url: "https://example.invalid/catalog.json", body: EXAMPLE }); - const host = await freshHost(); - await host.catalog(); - await host.catalog(); - expect(calls.map((call) => call.cmd)).toEqual(["catalog"]); - }); - - it("refreshes the native root without retaining the previous document", async () => { - let body = EXAMPLE; - reply = () => ({ url: "https://example.invalid/catalog.json", body }); - const host = await freshHost(); - await host.catalog(); - body = "new root"; - await expect(host.catalog()).resolves.toMatchObject({ body: EXAMPLE }); - await expect(host.catalog({ refresh: true })).resolves.toMatchObject({ body: "new root" }); - await host.catalog(); - expect(calls.map((call) => call.cmd)).toEqual(["catalog", "catalog"]); - }); - - it("retries a failed read", async () => { - let fail = true; - reply = () => { - if (fail) throw new Error("offline"); - return { url: "https://example.invalid/catalog.json", body: EXAMPLE }; - }; - const host = await freshHost(); - await expect(host.catalog()).rejects.toThrow(/offline/); - fail = false; - await expect(host.catalog()).resolves.toMatchObject({ body: EXAMPLE }); - expect(calls.map((call) => call.cmd)).toEqual(["catalog", "catalog"]); - }); - - it("moves catalog objects through the native byte command", async () => { - const bytes = new Uint8Array([1, 2, 3]); - reply = (cmd) => (cmd === "catalog_get" ? bytes.buffer : {}); - const response = await (await freshHost()).catalogFetch("https://maps.example.test/cell.obcm"); - expect(new Uint8Array(await response.arrayBuffer())).toEqual(bytes); - expect(calls.at(-1)).toMatchObject({ - cmd: "catalog_get", - args: { url: "https://maps.example.test/cell.obcm" }, - }); - }); - - it("groups assembled files in one native output session", async () => { - reply = (cmd) => { - if (cmd === "map_output_begin") return { id: 7, path: "/maps/Baden" }; - if (cmd === "map_output_write") return "/maps/Baden/MS1.OBS"; - return undefined; - }; - const output = await (await freshHost()).openMapOutput!("Baden"); - const bytes = new Uint8Array([4, 5]); - await expect(output.write("MS1.OBS", bytes)).resolves.toBe("/maps/Baden/MS1.OBS"); - await output.finish(); - expect(calls.map((call) => call.cmd)).toEqual(["map_output_begin", "map_output_write", "map_output_finish"]); - expect(calls[1].args).toBe(bytes); - expect(calls[1].options).toEqual({ headers: { "output-id": "7", filename: "MS1.OBS" } }); - }); - - it("can discard an incomplete output session", async () => { - reply = (cmd) => (cmd === "map_output_begin" ? { id: 8, path: "/maps/Partial" } : undefined); - const output = await (await freshHost()).openMapOutput!("Partial"); - await output.discard(); - expect(calls.map((call) => call.cmd)).toEqual(["map_output_begin", "map_output_discard"]); - }); -}); diff --git a/builder/web/src/lib/platform/dev.ts b/builder/web/src/lib/platform/dev.ts index 4589622516..d840debcbc 100644 --- a/builder/web/src/lib/platform/dev.ts +++ b/builder/web/src/lib/platform/dev.ts @@ -1,8 +1,7 @@ // The dev host: `python -m builder.server` on :8000, which is what local // development has always talked to. This file is a thin adapter — every call // below adapts the local tools to the same coverage composer the shipped web -// and desktop targets use. Localhost is a secure WebUSB context, so the local -// builder also uses the browser transport offered by the static web host. +// target uses. import { api } from "../api/client"; import { LINKS } from "../constants"; @@ -14,16 +13,6 @@ async function catalog({ refresh = false }: { refresh?: boolean } = {}): Promise export const platform: Platform = { name: "dev", - caps: { - // Rides still live on the phone or desktop app. USB map/route transfer, - // however, is a browser feature and works from this localhost host in - // Chrome and Edge exactly as it does from the published web app. - rideLibrary: false, - deviceUsb: true, - deviceDashboard: false, - }, - - usbViaWebUsb: true, styleEditor: { load: () => import("../../routes/Advanced.svelte"), @@ -37,13 +26,6 @@ export const platform: Platform = { }, catalog, catalogFetch: (input, init) => api.catalogFetch(input, init), - openMapOutput: null, - - device: async () => { - const { openWebUsbSession } = await import("../usb/session.svelte"); - return openWebUsbSession(); - }, - rides: null, // A localhost stand-in for the hosted site keeps the site's chrome. siteNav: LINKS, diff --git a/builder/web/src/lib/platform/dev.wire.test.ts b/builder/web/src/lib/platform/dev.wire.test.ts index c84d6b20ce..d718605e2c 100644 --- a/builder/web/src/lib/platform/dev.wire.test.ts +++ b/builder/web/src/lib/platform/dev.wire.test.ts @@ -1,5 +1,5 @@ // The maintainer dev host keeps only the schema-editor HTTP seam. Product map -// building consumes the same published catalog as web and desktop. +// building consumes the same published catalog as the web host. import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { platform } from "./dev"; diff --git a/builder/web/src/lib/platform/gating.test.ts b/builder/web/src/lib/platform/gating.test.ts deleted file mode 100644 index 12c4785f68..0000000000 --- a/builder/web/src/lib/platform/gating.test.ts +++ /dev/null @@ -1,140 +0,0 @@ -// The gating layer's three promises, held where they can't quietly stop being true: -// -// 1. Nothing is disabled without a reason and a next step. -// 2. The tier question and the browser question stay separate — a Safari -// visitor and a Firefox user wanting a ride library get different -// sentences, because they have different problems. -// 3. The copy stays plain: no apology, no exclamation, one line. -// -// The hosts are imported directly, like hosts.test.ts, so all three tiers and -// both answers to the browser question are reachable without mocking anything. - -import { describe, expect, it } from "vitest"; -import * as desktop from "./desktop"; -import * as dev from "./dev"; -import * as web from "./web"; -import { - desktopAddsIn, - GATES, - hasWebUsb, - REQUIREMENTS, - unmetIn, - type GateEnv, - type Requirement, -} from "./gating"; -import type { Platform } from "./types"; - -/** A host as the gating layer sees it, with the browser's answer supplied. */ -function envOf(p: Platform, browserHasUsb: boolean): GateEnv { - return { caps: p.caps, usbViaWebUsb: p.usbViaWebUsb, browserHasUsb }; -} - -const chromium = envOf(web.platform, true); -const safari = envOf(web.platform, false); -const desktopApp = envOf(desktop.platform, false); -const devServer = envOf(dev.platform, true); -const devSafari = envOf(dev.platform, false); - -describe("the reason table", () => { - it("covers every requirement, in a listed order", () => { - expect([...REQUIREMENTS].sort()).toEqual(Object.keys(GATES).sort()); - }); - - it("has a reason for every capability flag", () => { - // `Record` already forces this at compile time; this - // is the runtime half, and it fails on the host whose caps grew. - for (const cap of Object.keys(web.platform.caps)) { - expect(GATES).toHaveProperty(cap); - } - }); - - it.each(REQUIREMENTS)("says %s in one plain line", (need) => { - const { reason, title, offer } = GATES[need]; - expect(reason.length).toBeLessThanOrEqual(90); - expect(reason.endsWith(".")).toBe(true); - expect(reason).not.toContain("\n"); - // The house voice, as a guard rather than a review note: no apology, - // no exclamation, no hedging. - expect(reason).not.toMatch(/!|sorry|unfortunately|afraid|please|oops/i); - expect(offer).not.toMatch(/!|sorry|unfortunately|afraid|please|oops/i); - expect(title).toBeTruthy(); - expect(offer).toBeTruthy(); - }); -}); - -describe("tier gating", () => { - it("blocks the locked web-tier features and names which one", () => { - expect(unmetIn(chromium, "rideLibrary")).toBe("rideLibrary"); - expect(unmetIn(chromium, "deviceDashboard")).toBe("deviceDashboard"); - }); - - it("blocks nothing in the desktop app", () => { - for (const need of REQUIREMENTS) expect(unmetIn(desktopApp, need)).toBeNull(); - }); - - it("keeps desktop-only device features out of the maintainer dev server", () => { - expect(unmetIn(devServer, "deviceDashboard")).toBe("deviceDashboard"); - }); - - it("offers WebUSB from the maintainer dev server in Chromium", () => { - expect(unmetIn(devServer, ["deviceUsb", "webUsb"])).toBeNull(); - }); - - it("reports the browser limitation from the dev server when WebUSB is absent", () => { - expect(unmetIn(devSafari, ["deviceUsb", "webUsb"])).toBe("webUsb"); - }); - - it("blocks a control whose platform member is null even where the cap says yes", () => { - // Only reachable if a host breaks A1's `caps.X === (member !== null)` - // invariant — better a reason on screen than a live control over null. - expect(unmetIn(desktopApp, "deviceUsb", null)).toBe("deviceUsb"); - expect(unmetIn(desktopApp, "deviceUsb", () => undefined)).toBeNull(); - // `undefined` means "this gate has no member", not "the member is - // missing" — otherwise every value-less gate would fail. - expect(unmetIn(desktopApp, "deviceUsb", undefined)).toBeNull(); - }); -}); - -describe("the browser question is not the tier question", () => { - it("passes USB on the hosted tier in Chromium", () => { - expect(unmetIn(chromium, ["deviceUsb", "webUsb"])).toBeNull(); - }); - - it("blames the browser, not the tier, in Safari", () => { - // The tier is perfectly willing — `caps.deviceUsb` is true on the - // hosted site because WebUSB is its design. What's missing is WebUSB. - expect(web.platform.caps.deviceUsb).toBe(true); - expect(unmetIn(safari, ["deviceUsb", "webUsb"])).toBe("webUsb"); - expect(GATES.webUsb.reason).toMatch(/Chrome and Edge/); - }); - - it("ignores the browser where the host drives USB itself", () => { - // The Tauri webview is WKWebView on macOS and WebKitGTK on Linux — - // neither has WebUSB, and neither matters, because `nusb` does the - // talking. A browser probe alone would have gated this off. - expect(desktop.platform.usbViaWebUsb).toBe(false); - expect(unmetIn(desktopApp, "webUsb")).toBeNull(); - }); - - it("does not claim WebUSB in a plain node environment", () => { - expect(hasWebUsb()).toBe(false); - }); -}); - -describe("what the desktop page lists", () => { - it("is what this visitor is actually missing", () => { - expect(desktopAddsIn(chromium)).toEqual([ - "rideLibrary", - "deviceDashboard", - ]); - }); - - it("gains the USB line exactly when the browser can't do it", () => { - expect(desktopAddsIn(chromium)).not.toContain("webUsb"); - expect(desktopAddsIn(safari)).toContain("webUsb"); - }); - - it("is empty in the desktop app, which is why nothing links there", () => { - expect(desktopAddsIn(desktopApp)).toEqual([]); - }); -}); diff --git a/builder/web/src/lib/platform/gating.ts b/builder/web/src/lib/platform/gating.ts deleted file mode 100644 index c9e0ba1b76..0000000000 --- a/builder/web/src/lib/platform/gating.ts +++ /dev/null @@ -1,165 +0,0 @@ -// The gating layer. Desktop-only features stay on screen, disabled, each with a -// one-line reason and a next step — the moment of intent is where the explanation -// belongs. -// -// **Two questions, not one.** They look alike and they are not: -// -// * **Tier** — does this *host* have the feature at all? A `Caps` flag. The remedy is -// the desktop app. -// * **Browser** — can the browser running right now reach a USB device? This has -// nothing to do with the tier: `caps.deviceUsb` is true on the hosted site because -// WebUSB is that tier's design, not a claim about Safari. The remedy is Chrome or -// Edge, or the desktop app for a different reason. -// -// Collapse them and half the visitors get the wrong sentence, so they stay apart the -// whole way down. Every reason and every next step is written here, once. A component -// declares the requirement it needs; it never reads `platform.caps` and never writes -// its own copy. `Record` makes that structural — a new capability -// flag fails to compile until someone has written the sentence that goes with it. - -import { RELEASE } from "../desktop/release"; -import { DESKTOP_ROUTE } from "../routes"; -import { platform, type Caps } from "./index"; - -/** A capability of the *host*: absent tiers point at the desktop app. */ -export type TierRequirement = keyof Caps; - -/** The one gate that is not a tier decision. */ -export type BrowserRequirement = "webUsb"; - -export type Requirement = TierRequirement | BrowserRequirement; - -/** - * Every requirement, in the order the desktop page lists them: what you make, - * then what you keep, then how you reach the device. - */ -export const REQUIREMENTS: readonly Requirement[] = [ - "rideLibrary", - "deviceUsb", - "deviceDashboard", - "webUsb", -]; - -export interface Gate { - /** Shown inline where the control is. One line, present tense, stating where the - * feature lives — not apologising that it isn't here. */ - readonly reason: string; - /** Its heading on the desktop page. */ - readonly title: string; - /** What the desktop app does instead, for the desktop page's list. */ - readonly offer: string; -} - -export const GATES: Record = { - rideLibrary: { - reason: "Your ride library lives in the desktop app.", - title: "A ride library", - offer: "Rides pulled off the device land in a folder you pick, with a list, a track preview and GPX export.", - }, - deviceUsb: { - reason: "USB transfers live in the desktop app.", - title: "USB to the device", - offer: "Maps, routes and firmware updates go over the cable instead of the card.", - }, - deviceDashboard: { - reason: "The device dashboard lives in the desktop app.", - title: "Device dashboard", - offer: "Battery, card space and every setting the device exposes, edited from the app.", - }, - webUsb: { - reason: "Your browser can't talk to USB devices — Chrome and Edge can.", - title: "USB without Chrome", - offer: "The app drives USB itself, so Safari and Firefox work the same as Chrome.", - }, -}; - -/** - * The next step every gate offers. One link, because the desktop app is the answer to - * all of them — a Safari visitor's other remedy, switching browser, is in the sentence - * itself. - * - * The label tracks reality: promising a download before one is published would send - * people to a page with nothing on it, so until `RELEASE` exists the link says what the - * page actually holds. - */ -export const DESKTOP_LINK = { - href: DESKTOP_ROUTE, - label: RELEASE ? "Get the desktop app →" : "What the desktop app adds →", -}; - -/** - * Everything a gate decision depends on. Passed in rather than read from the module so - * all three tiers — and both answers to the browser question — are reachable from a test - * without mocking a host. - */ -export interface GateEnv { - readonly caps: Caps; - readonly usbViaWebUsb: boolean; - readonly browserHasUsb: boolean; -} - -/** Does the browser running this code expose WebUSB? Chromium yes, Safari and - * Firefox no — a fact about the browser, never about the tier. */ -export function hasWebUsb(): boolean { - return typeof navigator !== "undefined" && "usb" in navigator; -} - -function satisfied(env: GateEnv, need: Requirement): boolean { - // A host with its own USB driver is not affected by the browser's answer; - // one borrowing WebUSB inherits it. - if (need === "webUsb") return !env.usbViaWebUsb || env.browserHasUsb; - return env.caps[need]; -} - -/** - * The first requirement in `need` this environment does not meet, or null if it meets - * them all. *First* matters: a USB control declares `["deviceUsb", "webUsb"]`, so a tier - * that has no USB at all says so, and only a tier that does gets as far as blaming the - * browser. - * - * `value` is the platform member the control needs. `caps.X === (member !== null)` is - * pinned elsewhere, so passing it lets a call site make one check instead of two. - */ -export function unmetIn( - env: GateEnv, - need: Requirement | readonly Requirement[], - value?: unknown, -): Requirement | null { - const needs = typeof need === "string" ? [need] : need; - for (const one of needs) if (!satisfied(env, one)) return one; - // Only reachable if a host broke the caps invariant. Report the tier requirement - // rather than rendering a live control over a null member. - if (value === null) return needs[0]; - return null; -} - -/** What the desktop app adds *for this visitor* — the requirements this - * environment does not meet, in `REQUIREMENTS` order. On Chrome that leaves - * USB off the list, because on Chrome the site does USB. */ -export function desktopAddsIn(env: GateEnv): Requirement[] { - return REQUIREMENTS.filter((need) => unmetIn(env, need) !== null); -} - -/** The environment this page is actually running in. Read once: neither the - * host nor the browser's USB support changes while the tab is open. */ -export const ENV: GateEnv = { - caps: platform.caps, - usbViaWebUsb: platform.usbViaWebUsb, - browserHasUsb: hasWebUsb(), -}; - -/** `unmetIn` against the live environment. What `` calls. */ -export function unmet( - need: Requirement | readonly Requirement[], - value?: unknown, -): Requirement | null { - return unmetIn(ENV, need, value); -} - -/** For the handful of places where the honest answer is to show nothing rather - * than something disabled — a nav link has no moment of intent to gate. */ -export function available(need: Requirement | readonly Requirement[]): boolean { - return unmet(need) === null; -} - -export const DESKTOP_ADDS: Requirement[] = desktopAddsIn(ENV); diff --git a/builder/web/src/lib/platform/hosts.test.ts b/builder/web/src/lib/platform/hosts.test.ts index 22d411c2be..0083f05595 100644 --- a/builder/web/src/lib/platform/hosts.test.ts +++ b/builder/web/src/lib/platform/hosts.test.ts @@ -1,72 +1,23 @@ -// The invariant that makes the seam safe: a capability flag and the -// member it gates are the same fact. -// // The hosts are imported directly, not through `$host`, because the point is -// to check all three in one run. +// to check both in one run. import { describe, expect, it } from "vitest"; -import * as desktop from "./desktop"; import * as dev from "./dev"; import * as web from "./web"; -import type { Caps, Platform } from "./types"; -const HOSTS = { web, desktop, dev }; - -/** Every cap that gates a member, paired with the member it gates. */ -const GATED: Array<[keyof Caps, (p: Platform) => unknown]> = [ - ["deviceUsb", (p) => p.device], - ["rideLibrary", (p) => p.rides], -]; +const HOSTS = { web, dev }; describe.each(Object.entries(HOSTS))("%s host", (name, host) => { it("names itself", () => { expect(host.platform.name).toBe(name); }); - - it.each(GATED)("has a %s member exactly when the cap says so", (cap, member) => { - expect(member(host.platform) !== null).toBe(host.platform.caps[cap]); - }); - }); describe("the hosts as a set", () => { - it("agrees with the tier split in #894", () => { - // Product hosts consume published cells; only the dev host loads the + it("loads the style editor only on the dev host", () => { + // The web host consumes published cells; only the dev host loads the // maintainer schema editor. expect(web.platform.styleEditor).toBeNull(); - expect(desktop.platform.styleEditor).toBeNull(); expect(dev.platform.styleEditor).not.toBeNull(); - expect(web.platform.caps.rideLibrary).toBe(false); - // Which is *why* the hosted tier has no schema and no palette: both are - // absent by design, so neither may become a seam some issue owes. - expect(desktop.platform.caps).toEqual({ - rideLibrary: true, - deviceUsb: true, - deviceDashboard: true, - }); - }); - - it("borrows the browser's USB stack only where there is nothing else", () => { - // Which transport `device()` uses, not whether it has one. Both browser - // hosts borrow Chromium's WebUSB stack; the desktop app has a native - // transport. The gating layer turns the browser limitation into its own gate - // and its own sentence. - expect(web.platform.usbViaWebUsb).toBe(true); - expect(dev.platform.usbViaWebUsb).toBe(true); - expect(desktop.platform.usbViaWebUsb).toBe(false); - // Never true where there is no USB at all, or the gate would blame a - // browser for a tier that was never going to connect. - for (const host of Object.values(HOSTS)) { - if (!host.platform.caps.deviceUsb) expect(host.platform.usbViaWebUsb).toBe(false); - } - }); - - it("links back to the site only where there is a site around the app", () => { - // The desktop app is a standalone window: no docs/simulator/GitHub in - // its chrome, tabs instead. Optional member, not a cap — a nav link has - // no moment of intent to gate. - expect(web.platform.siteNav).toBeDefined(); - expect(dev.platform.siteNav).toBeDefined(); - expect(desktop.platform.siteNav).toBeUndefined(); }); }); diff --git a/builder/web/src/lib/platform/index.ts b/builder/web/src/lib/platform/index.ts index 28840e07f5..9b7f1b1917 100644 --- a/builder/web/src/lib/platform/index.ts +++ b/builder/web/src/lib/platform/index.ts @@ -1,12 +1,11 @@ // The one place the app reaches its host. `$host` is a Vite alias resolved at -// build time (see vite.config.ts) to exactly one of web.ts / desktop.ts / -// dev.ts, so this is a static re-export, not a dispatch: the hosts you did not -// build have no path into the module graph. That, rather than any dead-code -// elimination, is what keeps maintainer-only and native-only code out of the -// static web bundle. +// build time (see vite.config.ts) to exactly one of web.ts / dev.ts, so this +// is a static re-export, not a dispatch: the host you did not build has no path +// into the module graph. That, rather than any dead-code elimination, is what +// keeps maintainer-only code out of the static web bundle. // // Type-checking resolves `$host` to dev.ts (tsconfig `paths`) — the mode -// `npm run dev` and `npm run build` use. All three hosts are still checked as +// `npm run dev` and `npm run build` use. Both hosts are still checked as // files, each against `Platform`. export { platform } from "$host"; diff --git a/builder/web/src/lib/platform/types.ts b/builder/web/src/lib/platform/types.ts index 7308dd77e3..b829463054 100644 --- a/builder/web/src/lib/platform/types.ts +++ b/builder/web/src/lib/platform/types.ts @@ -1,9 +1,7 @@ import type { Component } from "svelte"; import type { Preset, SchemaEnvelope } from "../config/model"; -import type { RideLibrary } from "../device/library"; -import type { DeviceSession } from "../usb/session"; -export type PlatformName = "web" | "desktop" | "dev"; +export type PlatformName = "web" | "dev"; export interface Palette { columns: number; @@ -29,42 +27,6 @@ export interface SchemaPreviewService { pack(config: Record, signal: AbortSignal): Promise; } -/** Capability flags are the only supported way for the UI to gate host features. */ -export interface Caps { - readonly rideLibrary: boolean; - readonly deviceUsb: boolean; - readonly deviceDashboard: boolean; -} - -export type { DeviceSession, RideLibrary }; - -/** - * A place on disk to put the assembled map in a native host. Web exports - * `openMapOutput: null` and uses the browser's ordinary one-file downloader. - * - * The assembled `.obcm` is an OPFS-backed `Blob` when the host's writable-storage - * probe succeeds, so the web downloader can stream it without the tab's heap holding - * the map. The explicitly memory-priced fallback is a Blob too. Native hosts retain - * this session because a webview does not provide a useful browser destination. - * - * The session is opened once and written once — a map is one file — but `write` - * still names it, because the destination is a *folder* and the file needs a name in - * it. The name comes from the caller: the assembler names nothing. - * - * A host that presents a picker must be called under the user gesture that starts - * the run. A dismissed picker rejects with an `AbortError`, which callers treat as - * "changed my mind", not as a failure. - */ -export interface MapOutputSession { - readonly path: string; - /** Accepts a `Blob` so the OPFS-backed map can stream to disk without entering - * the tab's heap; hosts that need contiguous bytes (the desktop IPC) do their - * own conversion — the residency is theirs to own. */ - write(name: string, body: Uint8Array | Blob): Promise; - finish(): Promise; - discard(): Promise; -} - export type StyleEditorModule = { default: Component> }; export interface StyleEditorService { @@ -81,20 +43,12 @@ export interface StyleEditorService { */ export interface Platform { readonly name: PlatformName; - readonly caps: Caps; - - /** Whether `device()` uses browser WebUSB rather than a native driver. */ - readonly usbViaWebUsb: boolean; /** Resolved catalog URL and its raw root document. */ catalog(options?: { refresh?: boolean }): Promise<{ url: string; body: string }>; readonly catalogFetch: typeof fetch; - readonly openMapOutput: ((name: string) => Promise) | null; - - readonly device: (() => Promise) | null; - readonly rides: (() => Promise) | null; readonly styleEditor: StyleEditorService | null; - readonly siteNav?: { readonly home: string; readonly docs: string; readonly blog: string; readonly github: string }; + readonly siteNav: { readonly home: string; readonly docs: string; readonly blog: string; readonly github: string }; } diff --git a/builder/web/src/lib/platform/web.download.test.ts b/builder/web/src/lib/platform/web.download.test.ts index 9a55619fc0..d4951bcc44 100644 --- a/builder/web/src/lib/platform/web.download.test.ts +++ b/builder/web/src/lib/platform/web.download.test.ts @@ -1,28 +1,9 @@ -import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; +import { afterEach, describe, expect, it, vi } from "vitest"; import { saveBlob } from "../download"; -async function freshHost() { - vi.resetModules(); - return (await import("./web")).platform; -} - -beforeEach(() => { - Object.assign(globalThis, { document: { baseURI: "https://maps.example.org/builder/" } }); -}); - afterEach(() => vi.unstubAllGlobals()); describe("web map delivery", () => { - it("uses an ordinary download even when Chromium exposes a directory picker", async () => { - const showDirectoryPicker = vi.fn(); - vi.stubGlobal("window", { showDirectoryPicker }); - - const host = await freshHost(); - - expect(host.openMapOutput).toBeNull(); - expect(showDirectoryPicker).not.toHaveBeenCalled(); - }); - it("dispatches an ordinary anchor download with the requested map name", () => { const click = vi.fn(); const anchor = { href: "", download: "", click }; diff --git a/builder/web/src/lib/platform/web.ts b/builder/web/src/lib/platform/web.ts index afed4d1897..2bb2508a64 100644 --- a/builder/web/src/lib/platform/web.ts +++ b/builder/web/src/lib/platform/web.ts @@ -61,39 +61,9 @@ async function releaseCatalog(): Promise<{ url: string; body: string }> { export const platform: Platform = { name: "web", - caps: { - // A browser ride library would be OPFS/IndexedDB: invisible, evictable - // and unbackupable. Web exports one GPX and keeps no record. - rideLibrary: false, - // WebUSB is this tier's design, Chromium-only, which is why the desktop app - // exists. - deviceUsb: true, - deviceDashboard: false, - }, - - // Chromium-only, and this tier has no other way to reach a cable — so on Safari - // and Firefox the USB features gate on the *browser*, with their own reason and - // their own remedy. The download-and-copy-to-the-card path is unaffected. - // - usbViaWebUsb: true, catalog: fetchCatalog, catalogFetch: globalThis.fetch, - // A map is one `.obcm` again, so the web tier uses the browser's ordinary - // download flow. This avoids Chromium's restricted directory picker and - // makes Downloads behave like every other file from the site. - openMapOutput: null, - - // WebUSB, loaded on demand. The import is dynamic so the transport, the protocol - // codecs and the client land in their own chunk: a visitor who only downloads a - // map never pays for the device stack. The session it returns is `unsupported` - // on a browser without WebUSB rather than absent — the tier *has* the capability, - // this browser does not, and those are different sentences for the UI to say. - device: async () => { - const { openWebUsbSession } = await import("../usb/session.svelte"); - return openWebUsbSession(); - }, - rides: null, styleEditor: null, diff --git a/builder/web/src/lib/router.svelte.ts b/builder/web/src/lib/router.svelte.ts index c2c4800c59..1ce05f4a60 100644 --- a/builder/web/src/lib/router.svelte.ts +++ b/builder/web/src/lib/router.svelte.ts @@ -1,28 +1,15 @@ // Hash routing keeps the SPA sub-path tolerant: it works served at "/" or -// under any prefix without server rewrite rules. Five routes are all we need. +// under any prefix without server rewrite rules. // // The hashes themselves live in `lib/routes.ts`, which has no side effects — // this module reads `location` and subscribes to `hashchange` on import. -import { ADVANCED_ROUTE, DESKTOP_ROUTE, DEVICE_ROUTE, HOME_ROUTE, RIDES_ROUTE } from "./routes"; +import { ADVANCED_ROUTE } from "./routes"; -export type Route = "home" | "advanced" | "desktop" | "device" | "rides"; - -const HASH: Record = { - home: HOME_ROUTE, - advanced: ADVANCED_ROUTE, - desktop: DESKTOP_ROUTE, - device: DEVICE_ROUTE, - rides: RIDES_ROUTE, -}; +export type Route = "home" | "advanced"; function parse(): Route { if (location.hash.startsWith(ADVANCED_ROUTE)) return "advanced"; - // "#/device" before "#/desktop" would also work — `startsWith` on the full - // hash never confuses the two, but keep them adjacent so nobody wonders. - if (location.hash.startsWith(DESKTOP_ROUTE)) return "desktop"; - if (location.hash.startsWith(DEVICE_ROUTE)) return "device"; - if (location.hash.startsWith(RIDES_ROUTE)) return "rides"; return "home"; } @@ -34,10 +21,6 @@ class Router { this.route = parse(); }); } - - go(route: Route) { - location.hash = HASH[route]; - } } export const router = new Router(); diff --git a/builder/web/src/lib/routes.ts b/builder/web/src/lib/routes.ts index 79abf7222c..4a99e056cf 100644 --- a/builder/web/src/lib/routes.ts +++ b/builder/web/src/lib/routes.ts @@ -1,26 +1,15 @@ // The hash each route lives at, kept in a module with no side effects: // `router.svelte.ts` reads `location` and subscribes to `hashchange` the moment // it is imported, so anything that only needs a URL — a link in a component, -// the gating layer's next step, a node-environment test — imports this instead. +// a node-environment test — imports this instead. -export const HOME_ROUTE = ""; export const ADVANCED_ROUTE = "#/advanced"; -/** The desktop download page. The one next step every gate offers, so it is - * also the constant sibling features link to rather than spelling out. */ -export const DESKTOP_ROUTE = "#/desktop"; - -/** The device page — what is on the card. Tiers with `caps.deviceDashboard`. */ -export const DEVICE_ROUTE = "#/device"; - -/** The ride library — the managed folder. Tiers with `caps.rideLibrary`. */ -export const RIDES_ROUTE = "#/rides"; - /** * The firmware card's DOM id — a destination inside a page rather than a page, and the only one * the app navigates to on its own, since the update prompt scrolls the rider there. It lives with * the routes because it is the same kind of thing: a target two modules have to agree on, spelled - * once. Not a hash route: the card is a section of whichever page carries the device surfaces, and - * making it a route would mean two ways to be in the same place. + * once. Not a hash route: the card is a section of the device surfaces, and making it a route + * would mean two ways to be in the same place. */ export const FIRMWARE_ANCHOR = "firmware-card"; diff --git a/builder/web/src/lib/ui/confirm.svelte.test.ts b/builder/web/src/lib/ui/confirm.svelte.test.ts index c9c8e52831..1fbfe8bf98 100644 --- a/builder/web/src/lib/ui/confirm.svelte.test.ts +++ b/builder/web/src/lib/ui/confirm.svelte.test.ts @@ -1,6 +1,5 @@ /** - * The app's confirmation, which exists because the browser's answers "no" by itself inside the - * desktop webview (see the module docs). Two things are worth pinning: + * The app's confirmation (see the module docs). Two things are worth pinning: * * - every way of declining resolves `false`, so a caller never has to tell "no" from "went away"; * - a second question while one is open is declined rather than queued, because the only way to @@ -9,7 +8,7 @@ import { describe, expect, it } from "vitest"; -import { confirmAction, confirmChoice, confirmQueue } from "./confirm.svelte"; +import { confirmAction, confirmQueue } from "./confirm.svelte"; describe("confirmAction", () => { it("resolves true only when the affirmative button is pressed", async () => { @@ -53,40 +52,3 @@ describe("confirmAction", () => { }); }); -describe("confirmChoice", () => { - it("resolves each of the three answers by name", async () => { - for (const choice of ["confirm", "extra", "cancel"] as const) { - const asked = confirmChoice({ - title: "Delete the trip “Traverse”?", - extra: { label: "Delete trip only", destructive: true }, - }); - expect(confirmQueue.pending?.extra?.label).toBe("Delete trip only"); - confirmQueue.pending!.answer(choice); - expect(await asked).toBe(choice); - expect(confirmQueue.pending).toBeNull(); - } - }); - - it("keeps the dialog's boolean answers meaning confirm/cancel", async () => { - const asked = confirmChoice({ title: "still yes/no", extra: { label: "third" } }); - confirmQueue.pending!.answer(true); - expect(await asked).toBe("confirm"); - const declined = confirmChoice({ title: "still yes/no" }); - confirmQueue.pending!.answer(false); - expect(await declined).toBe("cancel"); - }); - - it("never answers a boolean caller with the extra it could not have asked for", async () => { - // `confirmAction` maps only "confirm" to true — anything else is a no. - const asked = confirmAction({ title: "two buttons" }); - confirmQueue.pending!.answer("extra"); - expect(await asked).toBe(false); - }); - - it("declines a second question with cancel rather than stacking", async () => { - const first = confirmChoice({ title: "first" }); - expect(await confirmChoice({ title: "second", extra: { label: "x" } })).toBe("cancel"); - confirmQueue.pending!.answer("cancel"); - expect(await first).toBe("cancel"); - }); -}); diff --git a/builder/web/src/lib/ui/confirm.svelte.ts b/builder/web/src/lib/ui/confirm.svelte.ts index 24e0b01e0e..580fb62968 100644 --- a/builder/web/src/lib/ui/confirm.svelte.ts +++ b/builder/web/src/lib/ui/confirm.svelte.ts @@ -1,14 +1,8 @@ /** * "Are you sure?", asked by the app rather than by the browser. * - * `window.confirm()` **does not work in the desktop app**, and it does not fail loudly — it returns - * `false`. WKWebView has no built-in UI for the JavaScript dialogs: it asks its `WKUIDelegate`, and - * wry's delegate implements `runOpenPanel`, the media-capture permission and the new-window request, - * but not `runJavaScriptConfirmPanel`. So every `if (!confirm(...)) return;` in this frontend is, - * inside the app, a statement that reads *"never do this"*. - * - * WebView2 and a browser tab do show the native dialog, so the bug was invisible on two of the three - * places this frontend runs. Owning the dialog makes all three behave alike. + * The app owns the dialog, so the affirmative button names its action and a destructive one looks + * destructive, which `window.confirm()` cannot do. * * One question at a time, held here rather than in whichever component asked, so the markup is * mounted once at the app root. The promise resolves `false` for every way of declining — Cancel, @@ -25,22 +19,11 @@ export interface ConfirmRequest { readonly confirmLabel?: string; /** Colours the affirmative button as a destructive action. */ readonly destructive?: boolean; - /** - * An optional second affirmative, rendered between Cancel and the primary — for the one question - * with two honest yeses. Only {@link confirmChoice} can see it picked. - */ - readonly extra?: { readonly label: string; readonly destructive?: boolean }; } -/** The three ways a question with an {@link ConfirmRequest.extra} can resolve. Every way of - * declining — Cancel, Escape, a click outside — is `"cancel"`. */ -export type ConfirmChoice = "confirm" | "extra" | "cancel"; - -/** A question waiting for an answer, as the dialog component renders it. Booleans are accepted - * as a convenience (`true` ≡ `"confirm"`, `false` ≡ `"cancel"`), so a two-button dialog keeps - * reading as yes/no. */ +/** A question waiting for an answer, as the dialog component renders it. */ export interface PendingConfirm extends ConfirmRequest { - readonly answer: (choice: ConfirmChoice | boolean) => void; + readonly answer: (yes: boolean) => void; } class ConfirmQueue { @@ -50,18 +33,18 @@ class ConfirmQueue { /** * Ask, and resolve with the answer. * - * A second question while one is open resolves `"cancel"` immediately rather than queueing. + * A second question while one is open resolves `false` immediately rather than queueing. * Two modals stacked over each other is never the right screen, and the only way to reach this * is a click that got through while a dialog was up — which is exactly the click to decline. */ - ask(request: ConfirmRequest): Promise { - if (this.pending) return Promise.resolve("cancel"); - return new Promise((resolve) => { + ask(request: ConfirmRequest): Promise { + if (this.pending) return Promise.resolve(false); + return new Promise((resolve) => { this.pending = { ...request, - answer: (choice: ConfirmChoice | boolean) => { + answer: (yes: boolean) => { this.pending = null; - resolve(typeof choice === "boolean" ? (choice ? "confirm" : "cancel") : choice); + resolve(yes); }, }; }); @@ -71,12 +54,6 @@ class ConfirmQueue { export const confirmQueue = new ConfirmQueue(); /** The one call a surface makes. `await confirmAction({...})`, in place of `confirm(...)`. */ -export async function confirmAction(request: ConfirmRequest): Promise { - return (await confirmQueue.ask(request)) === "confirm"; -} - -/** The three-way ask, for the one dialog with a second affirmative ({@link ConfirmRequest.extra}). - * Without `extra` it degenerates to `confirmAction` with the answer spelled out. */ -export function confirmChoice(request: ConfirmRequest): Promise { +export function confirmAction(request: ConfirmRequest): Promise { return confirmQueue.ask(request); } diff --git a/builder/web/src/lib/ui/menu.ts b/builder/web/src/lib/ui/menu.ts deleted file mode 100644 index 28cc8d18e7..0000000000 --- a/builder/web/src/lib/ui/menu.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * The `
`-menu closer: a `
` does not close itself when an item is picked, and the - * "Keep on device" submenu means the picked button can sit two `
` deep. Close the whole - * ancestor chain, then run the action. - */ -export function menuPick(event: Event, action: () => void): void { - let details = (event.currentTarget as HTMLElement).closest("details"); - while (details) { - details.removeAttribute("open"); - details = details.parentElement?.closest("details") ?? null; - } - action(); -} diff --git a/builder/web/src/lib/usb/client.test.ts b/builder/web/src/lib/usb/client.test.ts index 828e7aa6d3..fa40c34da0 100644 --- a/builder/web/src/lib/usb/client.test.ts +++ b/builder/web/src/lib/usb/client.test.ts @@ -15,9 +15,8 @@ import { afterEach, beforeAll, describe, expect, it, vi } from "vitest"; import { expectBytes } from "../../../test-support/bytes"; import { loadFlatDevice } from "../../../test-support/flat-device/load"; import { Crc32 } from "./crc32"; -import { DeviceError, FlatStoreClient, blobSource, bytesSource } from "./client"; -import { FlatDevice, controlCeilingFor, flatDevice, streamCeilingFor } from "./flat-device"; -import { loopbackLink } from "./loopback"; +import { DeviceError, blobSource, bytesSource } from "./client"; +import { controlCeilingFor, flatDevice, streamCeilingFor } from "./flat-device"; import { EntryFlags, ObjectKind, ObjectState, Opcode } from "./protocol"; beforeAll(loadFlatDevice); @@ -113,19 +112,6 @@ describe("what a connection learns before anything else", () => { }); }); - it("says the host cannot ask rather than inventing a firmware version", async () => { - // A transport with no EP0 path — the desktop bridge today. A fabricated revision would feed - // "an update is available" a lie, so the honest answer is that nobody asked. - const link = loopbackLink(); - const device = new FlatDevice(link.device); - void device.run(); - const pathless = { control: link.host.control, stream: link.host.stream, close: () => link.host.close() }; - const client = new FlatStoreClient(pathless); - await expect(client.deviceInfo()).rejects.toMatchObject({ code: "unavailable" }); - await client.close(); - device.stop(); - }); - it("takes the store's identity and cache freshness from the first LIST, not from a read", async () => { await withDevice({ storeId: CARD }, async ({ client, device }) => { // Something has committed, so the sequence is not the one a fresh card starts at and the diff --git a/builder/web/src/lib/usb/client.ts b/builder/web/src/lib/usb/client.ts index 53670c2615..c32fd73604 100644 --- a/builder/web/src/lib/usb/client.ts +++ b/builder/web/src/lib/usb/client.ts @@ -1,4 +1,4 @@ -/** The shared Rust store client over browser, desktop and loopback byte channels. */ +/** The shared Rust store client over the WebUSB and loopback byte channels. */ import { ClientIO, type NativeOutcome } from "./client-io"; import { DeviceError, asDeviceError } from "./errors"; @@ -109,7 +109,6 @@ export class FlatStoreClient { get liveTransfer(): number | null { return this.io.liveTransfer; } async deviceInfo(signal?: AbortSignal): Promise { - if (!this.link.vendorIn) throw new DeviceError("unavailable", "This host cannot read the device's firmware version: it cannot issue a USB control request."); try { return decodeDeviceInfo(await this.link.vendorIn(GET_DEVICE_INFO, 0, DEVICE_INFO_MAX, signal)); } catch (cause) { throw asDeviceError(cause); } } diff --git a/builder/web/src/lib/usb/errors.ts b/builder/web/src/lib/usb/errors.ts index abc8366bb6..ba2c9b89b1 100644 --- a/builder/web/src/lib/usb/errors.ts +++ b/builder/web/src/lib/usb/errors.ts @@ -7,14 +7,14 @@ import { Detail, ErrorCode, opcodeName, refusalName, type Refusal } from "./prot * * The wire's fourteen refusal codes each get their own member, because a client's response to them * differs: `no-space` asks the rider to delete something, `busy` retries, `catalog-changed` restarts - * a listing. The last five are this side of the wire, not the device's. + * a listing. `link`, `timeout`, `aborted`, `protocol` and `device-error` are this side of the wire, + * not the device's. */ export type DeviceErrorCode = | "link" | "timeout" | "aborted" | "protocol" - | "unavailable" | "unsupported" | "invalid-frame" | "invalid-request" diff --git a/builder/web/src/lib/usb/flat-device.ts b/builder/web/src/lib/usb/flat-device.ts index ccb7b6da8d..b97a2e0afb 100644 --- a/builder/web/src/lib/usb/flat-device.ts +++ b/builder/web/src/lib/usb/flat-device.ts @@ -1,5 +1,5 @@ /** - * The real device, on the other end of a {@link DeviceLink}. + * The real device, on the other end of a {@link RecordLink}. * * `obc_link::flat::Engine` over `obc_storage::flat`'s simulated card, compiled to wasm and driven * from here. It is the same assembly `firmware/obc-link`'s Rust suites run on, so a difference @@ -20,7 +20,7 @@ import init, { FlatDevice as WasmDevice, type DeviceReaction, type InitInput } from "../../../test-support/flat-device/pkg/obc_builder_bridge.js"; import { FlatStoreClient } from "./client"; -import { PipeError, type DeviceLink } from "./pipe"; +import { PipeError, type RecordLink } from "./pipe"; import { MAX_DEVICE_RECORD, MAX_HOST_CONTROL_RECORD, MAX_HOST_STREAM_RECORD, RecordChannel, type DeviceInfo } from "./records"; import { EntryFlags, @@ -123,7 +123,7 @@ export class FlatDevice { /** Anything that failed which is not a disconnect — a defect in the adapter or the device. */ readonly faults: unknown[] = []; - constructor(link: DeviceLink, options: FlatDeviceOptions = {}) { + constructor(link: RecordLink, options: FlatDeviceOptions = {}) { this.device = new WasmDevice( options.extents ?? 64, options.formatted ?? true, diff --git a/builder/web/src/lib/usb/loopback.ts b/builder/web/src/lib/usb/loopback.ts index 8cfeca3691..8e19e4c7d9 100644 --- a/builder/web/src/lib/usb/loopback.ts +++ b/builder/web/src/lib/usb/loopback.ts @@ -15,7 +15,7 @@ * Timing, stalls and enumeration are not here: those belong to the WebUSB pipe and its own suite. */ -import { PipeError, throwIfAborted, type BytePipe, type DeviceLink } from "./pipe"; +import { PipeError, throwIfAborted, type BytePipe, type DeviceLink, type RecordLink } from "./pipe"; import { encodeDeviceInfo, type DeviceInfo } from "./records"; /** The identity strings a link answers with unless a test names others. */ @@ -198,7 +198,7 @@ export interface LoopbackOptions { /** The two ends of a link: `host` for the client, `device` for the simulated device. */ export interface LoopbackLink { host: DeviceLink; - device: DeviceLink; + device: RecordLink; /** Bytes queued but unread on the stream channel in one direction — the backpressure gauge. */ streamDepth(direction: "to-device" | "to-host"): number; } @@ -231,7 +231,7 @@ export function loopbackLink(options: LoopbackOptions & { deviceInfo?: DeviceInf await this.stream.close(); }, }; - const device: DeviceLink = { + const device: RecordLink = { control: new LoopbackPipe(hostToDeviceControl, deviceToHostControl), stream: new LoopbackPipe(hostToDeviceStream, deviceToHostStream), async close() { diff --git a/builder/web/src/lib/usb/objects.ts b/builder/web/src/lib/usb/objects.ts index 8d1d2344e6..f21f8cac01 100644 --- a/builder/web/src/lib/usb/objects.ts +++ b/builder/web/src/lib/usb/objects.ts @@ -1,9 +1,9 @@ /** - * Object **payload** layouts: the ride object and the trip object. + * Object **payload** layout: the ride object. * * Not the wire. The protocol carries an object as opaque bytes with a kind, a display name and a * whole-payload CRC, so nothing in this file crosses a frame boundary — it is what the bytes - * *inside* one object mean, and only for the two kinds this app has to look inside. + * *inside* one object mean, and only for the one kind this app has to look inside. * * Routes, maps and firmware images are absent on purpose: an `.obcr`, an `.obcm` and an `UPDATE.BIN` * are written verbatim and read back verbatim. The browser's OBCR encoding is the wasm bridge's job, @@ -241,116 +241,6 @@ function clippedUtf8(value: string, cap: number): Uint8Array { return encoded.subarray(0, end); } -export const TRIP_HEADER_LEN = 64; -export const TRIP_DAY_LEN = 16; - -/** One day of a trip: its route object id and where that route runs on the trip's main line. */ -export interface TripDay { - route: bigint; - /** Metres along the day route where it joins the main line. */ - joinM: number; - /** Metres along the day route where it leaves the main line; at or past its end = ends on it. */ - leaveM: number; -} - -/** A day that starts and ends on the main line. */ -export function wholeDay(route: bigint): TripDay { - return { route, joinM: 0, leaveM: 0xffffffff }; -} - -/** - * A trip (spec §7.7): a key, a name, a start date and one **route object id** per day, never route - * bytes. - * - * Dangling days — a day route deleted on its own — are tolerated on read and served verbatim; the - * device never rewrites a stored trip. Compaction happens when the *peer* re-uploads the trip - * built from resolvable days, which is why this decoder keeps every day it finds. - */ -export interface TripObject { - /** The trip's stable key; a re-upload keeps it. */ - key: bigint; - name: string; - /** Days since 1970-01-01; 0 = no start date. */ - startDate: number; - days: TripDay[]; -} - -export function decodeTripObject(data: Uint8Array): TripObject { - if (data.length < TRIP_HEADER_LEN) { - throw new ObjectDecodeError(`trip object is ${data.length} bytes, shorter than its 64-byte header.`); - } - if (data[0] !== 3) { - throw new ObjectDecodeError(`trip object version ${data[0]}; this client decodes 3.`); - } - const view = viewOf(data); - const dayCount = view.getUint16(2, true); - const expected = TRIP_HEADER_LEN + TRIP_DAY_LEN * dayCount; - if (data.length !== expected) { - throw new ObjectDecodeError(`trip with ${dayCount} days should be ${expected} bytes, got ${data.length}.`); - } - const days: TripDay[] = []; - for (let i = 0; i < dayCount; i++) { - const at = TRIP_HEADER_LEN + i * TRIP_DAY_LEN; - days.push({ - route: view.getBigUint64(at, true), - joinM: view.getUint32(at + 8, true), - leaveM: view.getUint32(at + 12, true), - }); - } - const key = view.getBigUint64(56, true); - // The device reads key 0 as "no trip". - if (key === 0n) throw new ObjectDecodeError("trip object has key 0."); - return { - key, - name: paddedName(data, 4, 5, 48), - startDate: view.getUint16(54, true), - days, - }; -} - -export function encodeTripObject(t: TripObject): Uint8Array { - // **Refused here, not left to call-site discipline.** `setUint16` wraps silently, so a trip - // with 65,536 days would encode as one with zero and the device would commit a trip that is - // not the trip it was given — a wrong object rather than a rejected one. - if (t.days.length > 0xffff) { - throw new RangeError(`a trip carries at most 65535 days; this one has ${t.days.length}`); - } - const out = new Uint8Array(TRIP_HEADER_LEN + TRIP_DAY_LEN * t.days.length); - const view = new DataView(out.buffer); - out[0] = 3; - view.setUint16(2, t.days.length, true); - writePaddedName(out, 4, 5, 48, t.name); - view.setUint16(54, t.startDate, true); - view.setBigUint64(56, t.key, true); - t.days.forEach((day, i) => { - const at = TRIP_HEADER_LEN + i * TRIP_DAY_LEN; - view.setBigUint64(at, day.route, true); - view.setUint32(at + 8, day.joinM, true); - view.setUint32(at + 12, day.leaveM, true); - }); - return out; -} - -/** Read a `name_len u8` + zero-padded UTF-8 field, clamping a bogus length to the field's cap. */ -function paddedName(data: Uint8Array, lenAt: number, nameAt: number, cap: number): string { - const len = Math.min(data[lenAt], cap); - return new TextDecoder().decode(data.subarray(nameAt, nameAt + len)); -} - -/** - * Write a `name_len u8` + zero-padded UTF-8 field, truncating an over-long name. - * - * Truncation is on a **byte** boundary, matching the firmware encoder, which can split a multi-byte - * character. Names are capped at the source, so this is a backstop rather than a path anything - * travels. - */ -function writePaddedName(out: Uint8Array, lenAt: number, nameAt: number, cap: number, name: string): void { - const bytes = new TextEncoder().encode(name); - const n = Math.min(bytes.length, cap); - out[lenAt] = n; - out.set(bytes.subarray(0, n), nameAt); -} - function absent8(v: number): number | null { return v === NO_U8 ? null : v; } diff --git a/builder/web/src/lib/usb/pipe.ts b/builder/web/src/lib/usb/pipe.ts index e69c070628..585a4f2773 100644 --- a/builder/web/src/lib/usb/pipe.ts +++ b/builder/web/src/lib/usb/pipe.ts @@ -1,7 +1,6 @@ /** * The byte-channel seam under the USB stack: `records.ts` turns these bytes into records and - * `client.ts` speaks the protocol above them. WebUSB, the desktop `nusb` bridge and the loopback - * device implement it. + * `client.ts` speaks the protocol above them. WebUSB and the loopback device implement it. * * There is no barrel over the stack. Every consumer imports the module it needs, which keeps the * simulated `loopback.ts` device out of the hosted bundle. @@ -36,7 +35,7 @@ export class PipeError extends Error { * client serialises them. */ export interface BytePipe { - /** Diagnostics only, never a branch target: `"webusb"`, `"loopback"`, `"native"`. */ + /** Diagnostics only, never a branch target: `"webusb"`, `"loopback"`. */ readonly transport: string; /** False once {@link close} has run or the device has disappeared. */ @@ -70,30 +69,30 @@ export interface BytePipe { } /** - * The pair of channels one device speaks over, plus USB's one out-of-band read. + * The pair of channels one device speaks over. * * `control` carries control frames and `stream` carries stream frames. Both are record-framed by * `records.ts`; neither is a message pipe. */ -export interface DeviceLink { +export interface RecordLink { /** Control frames: requests out, responses in, one frame per record. */ readonly control: BytePipe; /** Stream frames: a 16-byte frame and its payload, one frame per record. */ readonly stream: BytePipe; - /** - * One EP0 vendor device-to-host request, recipient interface. - * - * Present only on a transport that can issue one. The desktop bridge exposes no control-transfer - * command, so it omits this rather than answering with a fabricated payload. Resolves with - * however many bytes the device returned, which can be short of `length`. - */ - vendorIn?(request: number, value: number, length: number, signal?: AbortSignal): Promise; - /** Close both pipes. Idempotent. */ close(): Promise; } +/** The host's end of a link: the two channels, plus USB's one out-of-band read. */ +export interface DeviceLink extends RecordLink { + /** + * One EP0 vendor device-to-host request, recipient interface. Resolves with however many bytes + * the device returned, which can be short of `length`. + */ + vendorIn(request: number, value: number, length: number, signal?: AbortSignal): Promise; +} + /** Throw `PipeError("aborted")` if `signal` has already fired. */ export function throwIfAborted(signal: AbortSignal | undefined, what: string): void { if (signal?.aborted) throw abortedError(signal, what); diff --git a/builder/web/src/lib/usb/session.svelte.ts b/builder/web/src/lib/usb/session.svelte.ts index 4b04947367..d8aacdda3e 100644 --- a/builder/web/src/lib/usb/session.svelte.ts +++ b/builder/web/src/lib/usb/session.svelte.ts @@ -2,7 +2,7 @@ * The reactive shell over a {@link DeviceWatcher} — the one Svelte-aware file in `lib/usb/`. * * Everything with logic in it (pipes, codecs, the client, discovery, the mock device) is plain - * TypeScript, tested under Node and reusable by the desktop app. This file exists only to mirror a + * TypeScript, tested under Node. This file exists only to mirror a * watcher's snapshots into runes so a component can read `session.status` and re-render, mirroring * how `JobTracker` shells the build API. */ @@ -19,16 +19,11 @@ export class WatchedDeviceSession implements DeviceSession { info = $state(null); error = $state(null); - readonly transport: string; - readonly supported: boolean; - private readonly watcher: DeviceWatcher; private readonly unsubscribe: () => void; - constructor(watcher: DeviceWatcher, transport: string) { + constructor(watcher: DeviceWatcher) { this.watcher = watcher; - this.transport = transport; - this.supported = watcher.current.status !== "unsupported"; // `subscribe` fires immediately with the current snapshot, so the initial state is set here // rather than duplicated above. this.unsubscribe = watcher.subscribe((state) => { @@ -55,15 +50,15 @@ export class WatchedDeviceSession implements DeviceSession { } /** - * Open a WebUSB session and adopt an already-permitted device if one is plugged in. + * Open the device session and adopt an already-permitted device if one is plugged in. * * Returns as soon as the adopt attempt has settled — with a live client when a device was found, * `idle` when none was, and `unsupported` in a browser without WebUSB. None of those is a failure, * because the session's whole job is to be something the UI can render in every one of them. */ -export async function openWebUsbSession(options: WatcherOptions = {}): Promise { +export async function openDeviceSession(options: WatcherOptions = {}): Promise { const watcher = new WebUsbWatcher(options); - const session = new WatchedDeviceSession(watcher, "webusb"); + const session = new WatchedDeviceSession(watcher); await watcher.start(); return session; } diff --git a/builder/web/src/lib/usb/session.ts b/builder/web/src/lib/usb/session.ts index dffe4ab5ef..fa02e3713c 100644 --- a/builder/web/src/lib/usb/session.ts +++ b/builder/web/src/lib/usb/session.ts @@ -14,16 +14,11 @@ * catalog read. * 3. `ready` — {@link DeviceSession.client} is live. * 4. `error` — {@link DeviceSession.error} is a sentence written for a rider. - * 5. `unsupported` — no WebUSB in this browser. Not a failure to retry: the answer is the desktop - * app, and the UI should say so rather than offering a button that cannot work. + * 5. `unsupported` — no WebUSB in this browser. Not a failure to retry: the answer is another + * browser, and the UI should say so rather than offering a button that cannot work. * * Unplugging returns the session to `idle` with no error — a rider pulling a cable is not a fault — * and re-plugging a permitted device reconnects on its own. - * - * **Do not gate a USB affordance on this session's `supported` flag.** It is a runtime probe of - * `navigator.usb`, and the desktop app's webview has no WebUSB while its tier reaches USB natively, - * so probing would disable the very tier that works best. Gating belongs to `` and the - * platform caps; `supported` exists to explain a session that cannot connect. */ import type { FlatStoreClient } from "./client"; @@ -39,10 +34,6 @@ export type { DeviceState, DeviceStatus, StoreIdentity }; * only promises they are observable, not how. */ export interface DeviceSession { - /** Diagnostics only: `"webusb"` on the hosted tier, `"native"` in the desktop app. */ - readonly transport: string; - /** False where the browser has no WebUSB at all. Distinct from "nothing plugged in". */ - readonly supported: boolean; readonly status: DeviceStatus; /** Non-null exactly when `status === "ready"`. */ readonly client: FlatStoreClient | null; @@ -77,9 +68,8 @@ export interface DeviceSession { /** * The framework-free half a session wraps: discovery, hot-plug and the client's lifetime. * - * `WebUsbWatcher` is the browser implementation and `NativeWatcher` the desktop one, over `nusb`; - * the reactive shell above them does not change, and neither does any component that renders a - * session. + * `WebUsbWatcher` is the browser implementation. A second transport implements the same interface; + * the reactive shell above it and the components that render a session do not change. */ export interface DeviceWatcher { readonly current: DeviceState; diff --git a/builder/web/src/lib/usb/webusb.test.ts b/builder/web/src/lib/usb/webusb.test.ts index df2a08cecf..afd0e689b8 100644 --- a/builder/web/src/lib/usb/webusb.test.ts +++ b/builder/web/src/lib/usb/webusb.test.ts @@ -253,12 +253,12 @@ beforeAll(loadFlatDevice); describe("browser support", () => { it("reports no WebUSB rather than pretending", () => { - // Firefox and Safari take this path. The answer is the desktop app, not a retry. + // Firefox and Safari take this path. The answer is another browser, not a retry. const watcher = new WebUsbWatcher({ usb: undefined }); // No `navigator.usb` under Node, so the default lookup finds nothing. expect(webUsb()).toBeNull(); expect(watcher.current.status).toBe("unsupported"); - expect(watcher.current.error).toMatch(/desktop app/); + expect(watcher.current.error).toBe("This browser cannot use the USB cable. Use Chrome or Edge."); }); it("cannot prompt where there is no API", async () => { diff --git a/builder/web/src/lib/usb/webusb.ts b/builder/web/src/lib/usb/webusb.ts index e87649ab43..e1404044eb 100644 --- a/builder/web/src/lib/usb/webusb.ts +++ b/builder/web/src/lib/usb/webusb.ts @@ -9,7 +9,7 @@ * taken off the page. * * WebUSB is Chromium-only and needs a secure context. Firefox and Safari get {@link PipeError} - * `unsupported`, and the honest answer for them is the desktop app. + * `unsupported`, and the honest answer for them is another browser. * * The endpoint layout — a vendor-specific interface, lowest IN/OUT pair control, next pair stream — * is what the firmware descriptors declare, so {@link discoverLayout}'s rule is a contract rather @@ -550,9 +550,9 @@ export interface WatcherOptions extends ClientOptions { /** * Finds the device, keeps up with plugging and unplugging, and owns the {@link FlatStoreClient}. * - * Framework-free on purpose — `session.svelte.ts` is a thin reactive shell over this, and the - * desktop app reuses it unchanged behind a native transport. Subscribers get an immutable snapshot - * per change, so a consumer can hold one without watching it mutate underneath. + * Framework-free on purpose — `session.svelte.ts` is a thin reactive shell over this. Subscribers + * get an immutable snapshot per change, so a consumer can hold one without watching it mutate + * underneath. */ export class WebUsbWatcher { private readonly usb: UsbLike | null; @@ -572,8 +572,7 @@ export class WebUsbWatcher { info: null, error: this.usb ? null - : "This browser cannot talk to USB devices. Chrome, Edge and other Chromium browsers can — " + - "or use the desktop app, which works everywhere.", + : "This browser cannot use the USB cable. Use Chrome or Edge.", }; } diff --git a/builder/web/src/routes/Advanced.svelte b/builder/web/src/routes/Advanced.svelte index 216d273c49..831d1d3398 100644 --- a/builder/web/src/routes/Advanced.svelte +++ b/builder/web/src/routes/Advanced.svelte @@ -76,9 +76,8 @@ // that happens: there is nothing to reset to without a config. if (!preset || !isBuildable(preset)) return; // The explicit re-copy the envelope's semantics are built around: a preset never reaches a - // working config except by someone asking for it. Asked through the app's own dialog, - // because the browser's `confirm()` answers "no" on its own in the desktop webview — which - // made this exact button a no-op there (see lib/ui/confirm.svelte.ts). + // working config except by someone asking for it, through the app's own dialog + // (lib/ui/confirm.svelte.ts). const ok = await confirmAction({ title: `Re-apply “${preset.name}” (v${preset.version})?`, body: "Your edits to this style are discarded and the preset is copied in again.", diff --git a/builder/web/src/routes/Desktop.svelte b/builder/web/src/routes/Desktop.svelte deleted file mode 100644 index 85a65d9bc8..0000000000 --- a/builder/web/src/routes/Desktop.svelte +++ /dev/null @@ -1,130 +0,0 @@ - - - -
-

The desktop app

-

- Build maps and route corridors with direct access to folders and USB devices. -

- -
-

What it adds

-
- {#each DESKTOP_ADDS as need (need)} -
{GATES[need].title}
-
{GATES[need].offer}
- {/each} -
-
- -
-

Downloads

- {#if RELEASE} -

Version {RELEASE.version} · {RELEASE.date}

- - {#if RELEASE.installNote} -

First run

-

{RELEASE.installNote}

- {/if} - {:else} -

- Installers are not available yet. Check the releases page for macOS, Windows, and Linux builds. -

-

Releases →

- {/if} -
-
- - diff --git a/builder/web/src/routes/Device.svelte b/builder/web/src/routes/Device.svelte deleted file mode 100644 index e3173321a6..0000000000 --- a/builder/web/src/routes/Device.svelte +++ /dev/null @@ -1,897 +0,0 @@ - - -
- {#if deviceHolder.interrupted} - - {/if} - - {#if client && session} -
-

OpenBikeComputer

-
- - {#if !session.store} -
- -
- {:else} - {#if dashboard.busy} -

- Another transfer is holding the cable - {#if jobRegistry.active}(sending {jobRegistry.active.label} — see the top bar){/if} - — the lists will load once it finishes. - -

- {/if} - - {#if dashboard.error} - - {/if} - - {#if dashboard.loading && dashboard.routes.length === 0 && dashboard.rides.length === 0} -

Reading the card…

- {/if} - -
-
-

Routes

- - {dashboard.routes.length} - {dashboard.routes.length === 1 ? "route" : "routes"}{#if dashboard.trips.length} - · {dashboard.trips.length} - {dashboard.trips.length === 1 ? "trip" : "trips"}{/if} - -
- - {#each dashboard.trips as trip (trip.objectId)} - deviceThumbs.get("route", id)} - busy={previewing !== null} - onopen={() => void previewTrip(trip)} - onopenstage={(route) => void previewRoute(route)} - onrename={(name) => doRenameTrip(trip, name)} - ondelete={() => void deleteTrip(trip)} - onmovestage={(index, delta) => doMoveStage(trip, index, delta)} - onremovestage={(index) => void doRemoveStage(trip, index)} - /> - {/each} - - deviceThumbs.get("route", id)} - busy={previewing !== null} - onopen={(route) => void previewRoute(route)} - onrename={doRenameRoute} - ondelete={(route) => void deleteRoute(route)} - onaddtotrip={doAddToTrip} - > - (tripDrop = files)} - onsent={() => client && void dashboard.refresh(client)} - /> - - -
- - -
-
-

Rides

- {dashboard.rides.length} on the device - - {#if library} - - {/if} - -
- - {#if dashboard.rides.length === 0} -

No rides on the device.

- {:else} - deviceThumbs.get("ride", id)} - busy={previewing !== null} - pulling={pullJob.running} - onopen={(ride) => void previewRide(ride)} - onpull={library ? (ride) => void pullOne(ride) : null} - /> - {/if} - -

- Rides are renamed and deleted on the device itself — this page only reads them, and copying one - to the library does not tell the device anything. -

- - {#if pullJob.running || pullJob.result || pullJob.error} - - {/if} -
- -
- - - -
- - -

- {#if session.info} - {session.info.hardwareRevision} · fw {session.info.firmwareRevision} · serial {session.info.serialNumber} - {/if} - {#if session.store} - · card {session.store.storeId} - {/if} -

- - {#if tripDrop} - void addRoutes(routes, name)} - oncancel={() => (tripDrop = null)} - /> - {/if} - - {#if preview} - {@const open = preview} - (preview = null)} - > - {#snippet actions()} - {#if open.route} - {@const route = open.route} - - {/if} - {/snippet} - - {/if} - {/if} - {:else} -
- - - {#if session?.status === "connecting"} -

Device detected — connecting…

-

The link is being opened; this takes a moment.

- {:else if session?.status === "error"} -

The device could not be opened

- {#if session.error} -

{session.error}

- {/if} -

- Unplug it and plug it back in, or use Connect in the header to try again. -

- {:else} -

No device detected

-

- Plug the OpenBikeComputer in over USB — it will appear here by itself. -

- {#if platform.usbViaWebUsb} - -

- First time in this browser? Click Connect in the header to grant access. -

- {/if} - {/if} -
- {/if} - - {#if platform.name === "desktop"} -

- Route and ride previews are kept locally to avoid downloading them again after every restart. - - {#if thumbnailNotice}{thumbnailNotice}{/if} -

- {/if} -
- - diff --git a/builder/web/src/routes/Rides.svelte b/builder/web/src/routes/Rides.svelte deleted file mode 100644 index b61944f560..0000000000 --- a/builder/web/src/routes/Rides.svelte +++ /dev/null @@ -1,115 +0,0 @@ - - - -
- {#await managed} -

Opening the ride library…

- {:then library} - {#if previewError} - - {/if} - void openPreview(library, ride)} - /> - {:catch reason} -
- -
- {/await} - - {#if preview} - (preview = null)} - /> - {/if} -
- - diff --git a/builder/web/test-support/data/review.json b/builder/web/test-support/data/review.json index 78e1f1d900..51ca3484fe 100644 --- a/builder/web/test-support/data/review.json +++ b/builder/web/test-support/data/review.json @@ -26,7 +26,7 @@ "leaves": [], "drops": [], "dropped_leaves": [], - "readers": ["map builder", "desktop app"], + "readers": ["map builder"], "format": null } ], diff --git a/builder/web/test-support/data/run-planned.json b/builder/web/test-support/data/run-planned.json index 38ec30f216..4250768c82 100644 --- a/builder/web/test-support/data/run-planned.json +++ b/builder/web/test-support/data/run-planned.json @@ -110,8 +110,7 @@ "drops": [], "dropped_leaves": [], "readers": [ - "map builder", - "desktop app" + "map builder" ], "format": null } diff --git a/builder/web/test-support/data/status.json b/builder/web/test-support/data/status.json index be2e9c7111..011bbda48b 100644 --- a/builder/web/test-support/data/status.json +++ b/builder/web/test-support/data/status.json @@ -7,7 +7,7 @@ "at": "/Users/rider/.cache/openbikecomputer/local", "release": {"serving": {"id": "0d9e444444444444444444444444444444444444444444444444444444444444", "since": "2026-10-11T18:17:22Z"}, "rollback": null}, "made": {"machine": "laptop", "time": "2026-10-11T18:10:00Z"}, - "serve": {"target": "local", "url": "http://127.0.0.1:8710", "network": "http://192.168.1.20:8710", "links": [{"app": "web planner", "how": "cd '/home/rider/OpenBikeComputer/builder/web' && VITE_PLANNER_CATALOG=http://127.0.0.1:8710/planner/catalog.json npm run dev -- --mode planner, then open /planner.html; once before: npm ci && npm run build:wasm"}, {"app": "map builder", "how": "VITE_PLANNER_CATALOG=http://127.0.0.1:8710/planner/catalog.json obc site"}, {"app": "desktop app", "how": "OBC_CATALOG_URL=http://127.0.0.1:8710/cell-catalog/catalog.json obc desktop"}, {"app": "simulator", "how": "obc sim MAP.obcm, with a map that the map builder or the desktop app assembles"}, {"app": "iPhone", "how": "the Debug app with the launch argument -OBCPlannerCatalog http://192.168.1.20:8710/planner/catalog.json"}]}, + "serve": {"target": "local", "url": "http://127.0.0.1:8710", "network": "http://192.168.1.20:8710", "links": [{"app": "web planner", "how": "cd '/home/rider/OpenBikeComputer/builder/web' && VITE_PLANNER_CATALOG=http://127.0.0.1:8710/planner/catalog.json npm run dev -- --mode planner, then open /planner.html; once before: npm ci && npm run build:wasm"}, {"app": "map builder", "how": "VITE_PLANNER_CATALOG=http://127.0.0.1:8710/planner/catalog.json obc site"}, {"app": "simulator", "how": "obc sim MAP.obcm, with a map that the map builder assembles"}, {"app": "iPhone", "how": "the Debug app with the launch argument -OBCPlannerCatalog http://192.168.1.20:8710/planner/catalog.json"}]}, "lock": null, "lock_error": null, "region": "freiburg", @@ -23,7 +23,7 @@ "layers": [ {"layer": "device/terrain", "state": "ok", "cause": null, "text": null, "shape": "tiled", "format": 1, "revision": 4, "readers": ["device"], "reads": ["copernicus-glo-30", "terrain"], "served_format": 1, "served_revision": 4, "leaves": ["0037-0032"], "stale_leaves": []}, {"layer": "device/map", "state": "ok", "cause": null, "text": null, "shape": "tiled", "format": 19, "revision": 3, "readers": ["device", "map builder"], "reads": ["device/terrain", "geofabrik-extracts", "geofabrik-poly", "land-polygons"], "served_format": 19, "served_revision": 3, "leaves": ["0037-0032"], "stale_leaves": []}, - {"layer": "device/catalog", "state": "ok", "cause": null, "text": null, "shape": "whole", "format": 3, "revision": 1, "readers": ["map builder", "desktop app"], "reads": ["device/map"], "served_format": 3, "served_revision": 1, "leaves": [], "stale_leaves": []} + {"layer": "device/catalog", "state": "ok", "cause": null, "text": null, "shape": "whole", "format": 3, "revision": 1, "readers": ["map builder"], "reads": ["device/map"], "served_format": 3, "served_revision": 1, "leaves": [], "stale_leaves": []} ], "blocked": [], "notes": [], @@ -58,7 +58,7 @@ {"layer": "device/terrain", "state": "ok", "cause": null, "text": null, "shape": "tiled", "format": 1, "revision": 4, "readers": ["device"], "reads": ["copernicus-glo-30", "terrain"], "served_format": 1, "served_revision": 4, "leaves": ["0037-0032", "0037-0033", "0038-0032", "0038-0033", "0036-0032", "0036-0033"], "stale_leaves": []}, {"layer": "device/map", "state": "stale", "cause": {"kind": "version", "field": "revision", "from": 2, "to": 3}, "text": "revision 2 → 3: improved output", "shape": "tiled", "format": 19, "revision": 3, "readers": ["device", "map builder"], "reads": ["device/terrain", "geofabrik-extracts", "geofabrik-poly", "land-polygons"], "served_format": 19, "served_revision": 2, "leaves": ["0037-0032", "0037-0033", "0038-0032", "0038-0033", "0036-0032", "0036-0033"], "stale_leaves": ["0037-0032", "0037-0033", "0038-0032", "0038-0033"]}, {"layer": "device/landmarks", "state": "stale", "cause": {"kind": "source", "source": "wiki", "from": "2026-06-01", "to": "2026-09-01"}, "text": "wiki 2026-06-01 → 2026-09-01", "shape": "tiled", "format": 19, "revision": 1, "readers": ["device"], "reads": ["geofabrik-extracts", "wiki"], "served_format": 19, "served_revision": 1, "leaves": ["0037-0032", "0037-0033", "0038-0032", "0038-0033", "0036-0032", "0036-0033"], "stale_leaves": ["0037-0032", "0037-0033", "0038-0032", "0038-0033", "0036-0032", "0036-0033"]}, - {"layer": "device/catalog", "state": "stale", "cause": {"kind": "input", "name": "device/map"}, "text": "follows device/map", "shape": "whole", "format": 3, "revision": 1, "readers": ["map builder", "desktop app"], "reads": ["device/landmarks", "device/map"], "served_format": 3, "served_revision": 1, "leaves": [], "stale_leaves": []}, + {"layer": "device/catalog", "state": "stale", "cause": {"kind": "input", "name": "device/map"}, "text": "follows device/map", "shape": "whole", "format": 3, "revision": 1, "readers": ["map builder"], "reads": ["device/landmarks", "device/map"], "served_format": 3, "served_revision": 1, "leaves": [], "stale_leaves": []}, {"layer": "planner/routing", "state": "ok", "cause": null, "text": null, "shape": "whole", "format": 8, "revision": 2, "readers": ["router service", "iOS offline router"], "reads": ["geofabrik-extracts"], "served_format": 8, "served_revision": 2, "leaves": [], "stale_leaves": []}, {"layer": "planner/basemap", "state": "ok", "cause": null, "text": null, "shape": "whole", "format": 1, "revision": 1, "readers": ["web planner", "iOS"], "reads": ["geofabrik-extracts", "land-polygons", "natural-earth"], "served_format": 1, "served_revision": 1, "leaves": [], "stale_leaves": []}, {"layer": "planner/search", "state": "stale", "cause": {"kind": "source", "source": "wiki", "from": "2026-06-01", "to": "2026-09-01"}, "text": "wiki 2026-06-01 → 2026-09-01", "shape": "whole", "format": 6, "revision": 1, "readers": ["search service"], "reads": ["geofabrik-extracts", "wiki"], "served_format": 6, "served_revision": 1, "leaves": [], "stale_leaves": []}, diff --git a/builder/web/tsconfig.json b/builder/web/tsconfig.json index d2ed92b907..7ec63cfc31 100644 --- a/builder/web/tsconfig.json +++ b/builder/web/tsconfig.json @@ -15,8 +15,8 @@ "noUnusedParameters": true, // The platform alias vite.config.ts rewrites per build target. Type // checking pins it to the dev host — the one `npm run dev` and - // `npm run build` use; the other two hosts are still checked as files, - // each against the `Platform` interface they annotate themselves with. + // `npm run build` use; the web host is still checked as a file, against + // the `Platform` interface it annotates itself with. "paths": { "$host": ["./src/lib/platform/dev.ts"] } diff --git a/builder/web/vite.config.ts b/builder/web/vite.config.ts index 19e8841846..02819bc9e4 100644 --- a/builder/web/vite.config.ts +++ b/builder/web/vite.config.ts @@ -5,9 +5,9 @@ import { thirdPartyLicenses } from "./vite/third-party-licenses"; import { plannerConfig } from "./src/lib/planner/config"; import { testConfig } from "./test-support/planner/config"; -// One frontend, three hosts. Which host `$host` resolves to is decided here, at -// build time — a conditional alias, not a runtime `if` — so the two hosts you did not -// build have no path into the module graph at all. That is what keeps the dev +// One frontend, two hosts. Which host `$host` resolves to is decided here, at +// build time — a conditional alias, not a runtime `if` — so the host you did not +// build has no path into the module graph at all. That is what keeps the dev // server's client out of the static web bundle, rather than trusting a bundler to // notice that a branch is unreachable. src/lib/platform/bundle.test.ts asserts it // against the real emitted chunks. @@ -16,7 +16,6 @@ const HOSTS = { // serves — hence the outDir it already mounts. dev: { module: "dev", outDir: "../server/static/dist" }, web: { module: "web", outDir: "dist/web" }, - desktop: { module: "desktop", outDir: "dist/desktop" }, } as const; type HostName = keyof typeof HOSTS; @@ -26,7 +25,7 @@ type HostName = keyof typeof HOSTS; const PAGES: Record = { planner: "planner.html", data: "data.html", trailview: "trailview.html" }; // `vite`/`vite build` default to development/production, and vitest to test — all -// three are the dev host. `--mode web|desktop` opts into the others. Anything else is +// three are the dev host. `--mode web` opts into the other. Anything else is // a typo, and quietly building the dev host for a mistyped deploy target is the one // outcome worth failing over. function hostFor(mode: string): HostName { @@ -58,8 +57,7 @@ export default defineConfig(({ mode }) => { // "/" (local FastAPI) or under a sub-path (a future single-server deployment // serving landing + docs + builder behind one reverse proxy). base: "./", - // The licence notices ride along with every tier's bundle — the static site and - // the Tauri app are the same build, and both are distributions. + // The licence notices ride along with the bundle, which is a distribution. plugins: [svelte(), thirdPartyLicenses()], resolve: { // Root-relative rather than an absolute path so the config needs no diff --git a/builder/web/vite/third-party-licenses.ts b/builder/web/vite/third-party-licenses.ts index e71612f1e1..5ea242867f 100644 --- a/builder/web/vite/third-party-licenses.ts +++ b/builder/web/vite/third-party-licenses.ts @@ -7,9 +7,8 @@ // source is the build product itself, so this reads the modules Rollup actually put in the // emitted chunks and collects a licence text for each npm package behind them. // -// The result is emitted as an asset, which means it ships with the static site *and* inside -// the Tauri bundle, because both are the same `vite build`. The Rust side of the desktop app -// and the firmware are a separate obligation, covered by the repo's THIRD-PARTY.md. +// The result is emitted as an asset, which means it ships with the static site. The firmware +// is a separate obligation, covered by the repo's THIRD-PARTY.md. import fs from "node:fs"; import path from "node:path"; @@ -28,7 +27,7 @@ export function registryAttribution(id: string): string { } // LICENSE, LICENCE, LICENSE.md, COPYING, NOTICE — and the dual-licensed shape, where a -// package ships one file per option (`LICENSE_MIT` + `LICENSE_APACHE-2.0`, @tauri-apps/api). +// package ships one file per option (`LICENSE_MIT` + `LICENSE_APACHE-2.0`). // Both are collected: the licence is the package's to choose between, not ours to narrow. // The optional tail must start with a separator so `licenses.js` is not a licence file. const LICENSE_FILE = /^(licen[cs]e|copying|notice)([._-][\w.+-]+)*$/i; diff --git a/docs/content/datenschutz.md b/docs/content/datenschutz.md index 5327e7918e..8a8fe42673 100644 --- a/docs/content/datenschutz.md +++ b/docs/content/datenschutz.md @@ -79,9 +79,8 @@ Browser zurücksenden kann. Rechtsgrundlage ist jeweils Art. 6 Abs. 1 lit. f DSG ### 6.1 Kartenkacheln -Die Regionsauswahl, Tourenvorschauen und Karten aufgezeichneter Fahrten im Kartenbaukasten -und in der Desktop-App laden Kacheln von `tiles.openbikecomputer.com`. Das ist der Cloudflare -Worker, der auch den Routenplaner bedient (Abschnitt 7.1). Cloudflare erhält die IP-Adresse +Die Regionsauswahl im Kartenbaukasten lädt Kacheln von `tiles.openbikecomputer.com`. Das +ist der Cloudflare Worker, der auch den Routenplaner bedient (Abschnitt 7.1). Cloudflare erhält die IP-Adresse und die angefragte Kachel. Daraus kann Cloudflare den Kartenausschnitt erkennen. Die Streckendaten selbst werden nicht übertragen. Schriften und Symbole der Karte kommen von `maps.openbikecomputer.com` (Abschnitt 6.3). Builds ohne feste Planereinstellungen lesen @@ -198,7 +197,7 @@ gewählte Darstellung lokal unter `obc-theme` in `localStorage`. Ohne Auswahl gi Wert wird nicht an einen Server gesendet. Er bleibt gespeichert, bis die Websitedaten im Browser gelöscht werden. -Webanwendung und installierte Desktop-App verwenden lokalen Gerätespeicher. Der +Die Webanwendung verwendet lokalen Gerätespeicher. Der Kartenbaukasten nutzt `localStorage` und das *Origin Private File System* (OPFS) des Browsers. Diese Daten bleiben auf dem verwendeten Gerät und werden nicht an den Verantwortlichen übertragen. @@ -214,16 +213,12 @@ Verantwortlichen übertragen. | Aktueller Reiseplan des Routenplaners (`obc-planner-routing-v2`) | Automatisch gespeicherter Entwurf mit Wegpunkten und Etappen, damit er einen Reload übersteht; bis zum Ersetzen oder Löschen der Website-Daten. Er verlässt den Browser nur als Suchanfrage nach Abschnitt 7.1. | | Gespeicherte Planversionen des Routenplaners (`obc-planner-lab-versions-v1`) | Nur auf ausdrückliche Speicherung; bis zum Löschen über die Versionsliste oder durch Löschen der Website-Daten. | | Gewähltes Fahrradprofil für Routen (`obcm.routeBikeType`) | Damit die gewählte Einstellung bei einem späteren Besuch erhalten bleibt; bis zur nächsten Änderung oder zum Löschen der Website-Daten. | -| Routen- und Tourenvorschauen in der Webanwendung | Aus dem angeschlossenen Gerät geladene, ausgedünnte Koordinaten zur Darstellung der Kacheln; nur im Arbeitsspeicher der laufenden Seitensitzung, bis zum Neuladen oder Schließen. | -| Routen- und Tourenvorschauen in der installierten Desktop-App | Ausgedünnte Koordinaten werden lokal zwischengespeichert, damit sie nach einem App-Neustart nicht erneut vom angeschlossenen Gerät geladen werden müssen. Der Cache ist auf 300 Einträge begrenzt und entfernt ältere, zuletzt nicht verwendete Einträge. Geänderte Objekte erhalten durch Inhaltsmerkmale einen neuen Cache-Schlüssel. Löschung ist auf der Geräteseite über „Delete saved previews“ oder durch Löschen der App-Daten möglich. | Das kurzfristige Speichern und Auslesen der Arbeitsdaten, das Speichern des Reiseplans, gespeicherter Planversionen und gewählter Einstellungen sowie das Speichern eines vom -Nutzer ausdrücklich gesicherten Skins oder beantworteten Firmware-Hinweises sowie der -begrenzte Vorschau-Cache der ausdrücklich installierten Desktop-App sind für die jeweils -angeforderte Funktion erforderlich (§ 25 Abs. 2 Nr. 2 TDDDG). Der Vorschau-Cache -vermeidet insbesondere wiederholte vollständige Übertragungen aller dargestellten -Routen und Touren über USB. Für diese Vorgänge ist keine Einwilligung erforderlich. +Nutzer ausdrücklich gesicherten Skins oder beantworteten Firmware-Hinweises sind für die +jeweils angeforderte Funktion erforderlich (§ 25 Abs. 2 Nr. 2 TDDDG). Für diese Vorgänge +ist keine Einwilligung erforderlich. Die Wiederverwendung heruntergeladener Kartenzellen bei späteren Builds ist dagegen optional und standardmäßig ausgeschaltet. Das Aktivieren der deutlich bezeichneten @@ -239,12 +234,7 @@ nicht an einen Server übertragen. Das gilt insbesondere für Routendateien, die Positionsdaten enthalten können. Eine WebUSB-Verbindung entsteht erst, nachdem ein Gerät im Auswahldialog des Browsers -bestätigt wurde. Die Daten fließen unmittelbar zwischen Browser und Gerät. Zeigt eine -Karte Touren oder Fahrten, laden Browser und Desktop-App nur Kartenkacheln nach -Abschnitt 6.1; die Streckendaten verlassen das Gerät nicht. Für die -Vorschaubilder der Geräteübersicht werden vereinfachte Streckenverläufe im Arbeitsspeicher -gehalten, jedoch **nicht dauerhaft im Browser gespeichert**. Sie werden bei einem Reload -oder beim Ende der Browsersitzung verworfen. +bestätigt wurde. Die Daten fließen unmittelbar zwischen Browser und Gerät. ## 11. Externe Links diff --git a/docs/content/privacy.md b/docs/content/privacy.md index b74faae9e7..8677433a4e 100644 --- a/docs/content/privacy.md +++ b/docs/content/privacy.md @@ -76,10 +76,9 @@ The legal basis in each case is Art. 6(1)(f) GDPR. ### 6.1 Map tiles -The region picker, tour previews and recorded ride maps in the map builder and desktop -app load tiles from `tiles.openbikecomputer.com`. This is the Cloudflare Worker that also -serves the route planner (section 7.1). Cloudflare receives your IP address and the requested -tile. From this, Cloudflare can see the map area. The route data itself is not transmitted. +The region picker of the map builder loads tiles from `tiles.openbikecomputer.com`. This is +the Cloudflare Worker that also serves the route planner (section 7.1). Cloudflare receives +your IP address and the requested tile. From this, Cloudflare can see the map area. The route data itself is not transmitted. The map's fonts and symbols come from `maps.openbikecomputer.com` (section 6.3). Builds without fixed planner settings also read the active release from the catalog on that host. The tiles load when you open a map. The legitimate interest is to show the map needed to @@ -189,7 +188,7 @@ locally in `localStorage` under `obc-theme`. Without a choice, your browser sett The value is not sent to a server. It stays stored until you delete the website data in your browser. -The web application and the installed desktop app use local device storage. The map builder +The web application uses local device storage. The map builder uses `localStorage` and the browser's *Origin Private File System* (OPFS). This data stays on the device that you use. It is not transmitted to the controller. @@ -204,15 +203,11 @@ the device that you use. It is not transmitted to the controller. | Current trip plan of the route planner (`obc-planner-routing-v2`) | Automatically saved draft with waypoints and stages, so that it survives a reload. Kept until it is replaced or you delete the website data. It leaves the browser only as a search request under section 7.1. | | Saved plan versions of the route planner (`obc-planner-lab-versions-v1`) | Only when you save one. Kept until you delete it in the version list or delete the website data. | | Chosen bike profile for routes (`obcm.routeBikeType`) | So that the setting you chose is kept at a later visit. Kept until the next change or until you delete the website data. | -| Route and tour previews in the web application | Thinned-out coordinates loaded from the connected device, to draw the tiles. Held only in the memory of the running page session, until you reload or close it. | -| Route and tour previews in the installed desktop app | Thinned-out coordinates are cached locally, so that they need not be loaded again from the connected device after an app restart. The cache holds at most 300 entries and removes older entries that were not used recently. Changed objects get a new cache key from content marks. You can delete the cache on the device page with "Delete saved previews" or by deleting the app data. | Saving and reading the working data for a short time, saving the trip plan, saved plan -versions and chosen settings, saving a skin or an answered firmware notice that you -explicitly saved, and the limited preview cache of the explicitly installed desktop app are -necessary for the function that you requested (§ 25(2) no. 2 TDDDG). The preview cache in -particular avoids repeated full transfers of all displayed routes and tours over USB. These -processes need no consent. +versions and chosen settings, and saving a skin or an answered firmware notice that you +explicitly saved are necessary for the function that you requested (§ 25(2) no. 2 TDDDG). +These processes need no consent. Reusing downloaded map cells in later builds is optional and off by default. When you enable the clearly labeled option, this is your consent under § 25(1) TDDDG. You can withdraw it at @@ -226,11 +221,7 @@ locally in the browser. Files that you select or drag into the window are not tr a server. This applies in particular to route files, which can contain position data. A WebUSB connection exists only after you confirm a device in the browser's selection -dialog. The data flows directly between the browser and the device. When a map shows tours -or rides, the browser and the desktop app load only map tiles under section 6.1. The route -data does not leave the device. For the preview images of the device overview, simplified -route lines are held in memory, but **not stored permanently in the browser**. They are -discarded when you reload or when the browser session ends. +dialog. The data flows directly between the browser and the device. ## 11. External links diff --git a/docs/content/software/formats.md b/docs/content/software/formats.md index fe10bac171..182e7a1db9 100644 --- a/docs/content/software/formats.md +++ b/docs/content/software/formats.md @@ -19,7 +19,7 @@ says what each format is for and why it has that shape. | OBCR | Route geometry, statistics, and waypoints | Device | | Ride object | Recorded samples and summary | Device and companion | | OBCT | Terrain height raster | Device and map tools | -| OBCC | Map-builder catalog | Website and desktop app | +| OBCC | Map-builder catalog | Website | | OBCA | Cell and assembly rules | Map tools | Values are little-endian and coordinates are signed microdegrees. A reader uses checked arithmetic diff --git a/docs/content/software/packer-routing.md b/docs/content/software/packer-routing.md index f66ab91c89..928c723f73 100644 --- a/docs/content/software/packer-routing.md +++ b/docs/content/software/packer-routing.md @@ -215,8 +215,8 @@ named regions, boxes, lassos, and GPX corridors, and the builder unions them bef downloads anything, so overlapping parts do not pay twice. It verifies every object against the catalog, and the assembler verifies the finished map with the production readers. -One Svelte application serves the website, the desktop app, and the maintainer server; the host -modules differ in transport and storage, never in the selection or assembly algorithm. The website +One Svelte application serves the website and the maintainer server; the host modules differ in +transport and storage, never in the selection or assembly algorithm. The website is static and the cells live in object storage, so publishing a new region does not deploy the website. diff --git a/docs/design/README.md b/docs/design/README.md index 06d4c823d5..89d21aee14 100644 --- a/docs/design/README.md +++ b/docs/design/README.md @@ -146,7 +146,7 @@ flowchart LR | --- | --- | --- | --- | --- | | [companion-ios](companion-ios.md) | Runs the iPhone app that plans routes, sends them to the device and gets rides back. | approved | | | | [device-firmware](device-firmware.md) | Builds the nRF54L board image from the device systems. | approved | board-inputs, card-storage, device-link, device-runtime, firmware-update, foundations, map-reading, navigation, rendering-display | | -| [device-map-builder](device-map-builder.md) | Runs the map builder, where a rider builds a device map and manages the device, in the browser or as a desktop app. | approved | device-link, firmware-update, map-assembly, map-style, route-planning, trailview, website | device-link, map-assembly, map-style, obc-data, route-planning, search, web-planner | +| [device-map-builder](device-map-builder.md) | Runs the map builder, where a rider builds a device map and manages the device, in the browser. | approved | device-link, firmware-update, map-assembly, map-style, route-planning, trailview, website | device-link, map-assembly, map-style, obc-data, route-planning, search, web-planner | | [obc-data](obc-data.md) | Runs the `obc data` command and its operator page. | approved | data-engine, device-map-baking, device-map-builder, foundations, map-assembly, route-planning, routing, search, source-preparation, trailview | | | [planner-tile-server](planner-tile-server.md) | Serves the map tiles of a planner release from the storage bucket or from a local folder. | approved | | | | [simulators](simulators.md) | Runs the device core on a computer, a phone or a web page, and sends test input to a real board. | approved | board-inputs, card-storage, data-engine, device-link, device-runtime, firmware-update, foundations, host-runtime, map-reading, navigation, rendering-display, repository-tooling | | diff --git a/docs/design/device-map-builder.md b/docs/design/device-map-builder.md index 4367e1b05a..76fc9509dc 100644 --- a/docs/design/device-map-builder.md +++ b/docs/design/device-map-builder.md @@ -1,22 +1,19 @@ --- system: device-map-builder kind: shell -purpose: "Runs the map builder, where a rider builds a device map and manages the device, in the browser or as a desktop app." +purpose: "Runs the map builder, where a rider builds a device map and manages the device, in the browser." owns: - builder/web/vite.config.ts - builder/web/svelte.config.js - builder/web/src/main.ts - builder/web/src/App.svelte - builder/web/src/components/ConfirmDialog.svelte - - builder/web/src/components/DeviceChip.svelte - - builder/web/src/components/Gated.svelte - builder/web/src/components/Header.svelte - builder/web/src/components/UpdatePrompt.svelte - builder/web/src/components/device/** - builder/web/src/lib/api/** - builder/web/src/lib/constants.ts - builder/web/src/lib/core/** - - builder/web/src/lib/desktop/** - builder/web/src/lib/download.ts - builder/web/src/lib/format.ts - builder/web/src/lib/palette.ts @@ -31,7 +28,6 @@ owns: - builder/web/test-support/** - builder/web/scripts/** - builder/web/vite/** - - builder/desktop/** - builder/__init__.py - builder/build-wasm-bridges.sh depends_on: @@ -51,9 +47,9 @@ status: approved ## What it does -In the map builder, a rider selects an area, builds a map for the device and sends it to the card. The rider can also see what is on the card, keep the recorded rides, and install firmware updates. +In the map builder, a rider selects an area, builds a map for the device, and downloads it or sends it to the device over the USB cable. The rider can also send routes, export recorded rides as GPX, format the card and install firmware updates. -One Svelte frontend runs in three hosts: the public web site, a desktop app made with Tauri ([`builder/desktop`](../../builder/desktop/README.md)), and a development server for maintainers. The desktop app adds native downloads, map files on disk, USB and a ride library. The entry point [`main.ts`](../../builder/web/src/main.ts) loads the shared WebAssembly core, then shows [`App.svelte`](../../builder/web/src/App.svelte) and its pages. +One Svelte frontend runs in two hosts: the public web site and a development server for maintainers. The entry point [`main.ts`](../../builder/web/src/main.ts) loads the shared WebAssembly core, then shows [`App.svelte`](../../builder/web/src/App.svelte) and its pages. The shell puts together map assembly, map style, route planning, TrailView, the device link and firmware update. It owns the pages, the host layer [`platform/`](../../builder/web/src/lib/platform/index.ts) and the build configuration [`vite.config.ts`](../../builder/web/vite.config.ts). Map assembly owns the WebAssembly core. @@ -61,11 +57,10 @@ The shell puts together map assembly, map style, route planning, TrailView, the | Rule | Check | | --- | --- | -| The web site's bundle contains no server client, no desktop code and no style editor. | `keeps build and style-editor code out of the web target` in [`bundle.test.ts`](../../builder/web/src/lib/platform/bundle.test.ts) | -| Each host capability has a reason and a next step that the rider sees. | `has a reason for every capability flag` in [`gating.test.ts`](../../builder/web/src/lib/platform/gating.test.ts) | +| The web site's bundle contains no server client and no style editor. | `keeps build and style-editor code out of the web target` in [`bundle.test.ts`](../../builder/web/src/lib/platform/bundle.test.ts) | | The built app refers to its files with relative paths, so it works under any path of a server. | `references its own assets relatively` in [`bundle.test.ts`](../../builder/web/src/lib/platform/bundle.test.ts); the step `Mountable at any prefix` in [`deploy-site.yml`](../../.github/workflows/deploy-site.yml) | ## Decisions -- **The build selects the host.** An alias (`$host`) in [`vite.config.ts`](../../builder/web/vite.config.ts) points at the module of one host, so the code of the other two hosts is not in the bundle. We rejected a test at run time, because then the bundle depends on the bundler to remove code that cannot run. -- **A missing feature stays on the screen.** When a host does not have a feature, its control is disabled and shows a reason and a next step. The rider then reads the explanation when they want the feature. Components state the requirement that they need and do not read the host flags ([`gating.ts`](../../builder/web/src/lib/platform/gating.ts)). +- **The build selects the host.** An alias (`$host`) in [`vite.config.ts`](../../builder/web/vite.config.ts) points at the module of one host, so the code of the other host is not in the bundle. We rejected a test at run time, because then the bundle depends on the bundler to remove code that cannot run. +- **A browser with no WebUSB gets one sentence.** The device session has the state `unsupported` for such a browser, and the device step shows the sentence of the session in place of the Connect button ([`webusb.ts`](../../builder/web/src/lib/usb/webusb.ts)). The download of the map works in each browser. diff --git a/docs/design/map.json b/docs/design/map.json index d2f8bd6620..795acde721 100644 --- a/docs/design/map.json +++ b/docs/design/map.json @@ -133,7 +133,7 @@ "depends_on": [], "test_depends_on": [], "violations": 1, - "lines": 33262, + "lines": 33260, "problems": [ { "rule": "R4", @@ -195,7 +195,7 @@ "map-reading" ], "violations": 9, - "lines": 40052, + "lines": 36306, "problems": [ { "rule": "cycle", @@ -207,7 +207,7 @@ }, { "rule": "cycle", - "message": "device-link -> device-map-builder closes a cycle: builder/web/src/lib/device/dashboard.svelte.test.ts -> builder/web/test-support/flat-device/load.ts (test), builder/web/src/lib/device/flows.test.ts -> builder/web/test-support/bytes.ts (test), builder/web/src/lib/device/flows.test.ts -> builder/web/test-support/flat-device/load.ts (test), and 15 more" + "message": "device-link -> device-map-builder closes a cycle: builder/web/src/lib/device/flows.test.ts -> builder/web/test-support/bytes.ts (test), builder/web/src/lib/device/flows.test.ts -> builder/web/test-support/flat-device/load.ts (test), builder/web/src/lib/device/rides.test.ts -> builder/web/test-support/flat-device/load.ts (test), and 8 more" }, { "rule": "cycle", @@ -215,11 +215,11 @@ }, { "rule": "cycle", - "message": "device-link -> map-assembly closes a cycle: builder/web/src/lib/device/flows.test.ts -> builder/web/src/lib/convert/bridge.ts (test), builder/web/src/lib/device/library.test.ts -> builder/web/src/lib/convert/bridge.ts (test), builder/web/src/lib/device/library.ts -> builder/web/src/lib/convert/bridge.ts, and 4 more" + "message": "device-link -> map-assembly closes a cycle: builder/web/src/lib/device/flows.test.ts -> builder/web/src/lib/convert/bridge.ts (test), builder/web/src/lib/device/rides.test.ts -> builder/web/src/lib/convert/bridge.ts (test), builder/web/src/lib/device/rides.ts -> builder/web/src/lib/convert/bridge.ts, and 1 more" }, { "rule": "cycle", - "message": "device-map-builder -> device-link closes a cycle: obc-desktop -> obc-usb, builder/web/src/components/DeviceChip.svelte -> builder/web/src/lib/device/job.svelte.ts, builder/web/src/components/DeviceChip.svelte -> builder/web/src/lib/device/session.svelte.ts, and 101 more" + "message": "device-map-builder -> device-link closes a cycle: builder/web/src/components/UpdatePrompt.svelte -> builder/web/src/lib/device/job.svelte.ts, builder/web/src/components/UpdatePrompt.svelte -> builder/web/src/lib/device/session.svelte.ts, builder/web/src/components/device/CardFormat.svelte -> builder/web/src/lib/usb/client.ts, and 40 more" }, { "rule": "cycle", @@ -254,7 +254,7 @@ "repository-tooling" ], "violations": 7, - "lines": 60411, + "lines": 60410, "problems": [ { "rule": "cycle", @@ -290,7 +290,7 @@ "name": "device-map-builder", "kind": "shell", "area": "Shells", - "purpose": "Runs the map builder, where a rider builds a device map and manages the device, in the browser or as a desktop app.", + "purpose": "Runs the map builder, where a rider builds a device map and manages the device, in the browser.", "status": "approved", "depends_on": [ "device-link", @@ -305,15 +305,15 @@ "repository-tooling" ], "violations": 10, - "lines": 18435, + "lines": 9075, "problems": [ { "rule": "cycle", - "message": "device-link -> device-map-builder closes a cycle: builder/web/src/lib/device/dashboard.svelte.test.ts -> builder/web/test-support/flat-device/load.ts (test), builder/web/src/lib/device/flows.test.ts -> builder/web/test-support/bytes.ts (test), builder/web/src/lib/device/flows.test.ts -> builder/web/test-support/flat-device/load.ts (test), and 15 more" + "message": "device-link -> device-map-builder closes a cycle: builder/web/src/lib/device/flows.test.ts -> builder/web/test-support/bytes.ts (test), builder/web/src/lib/device/flows.test.ts -> builder/web/test-support/flat-device/load.ts (test), builder/web/src/lib/device/rides.test.ts -> builder/web/test-support/flat-device/load.ts (test), and 8 more" }, { "rule": "cycle", - "message": "device-map-builder -> device-link closes a cycle: obc-desktop -> obc-usb, builder/web/src/components/DeviceChip.svelte -> builder/web/src/lib/device/job.svelte.ts, builder/web/src/components/DeviceChip.svelte -> builder/web/src/lib/device/session.svelte.ts, and 101 more" + "message": "device-map-builder -> device-link closes a cycle: builder/web/src/components/UpdatePrompt.svelte -> builder/web/src/lib/device/job.svelte.ts, builder/web/src/components/UpdatePrompt.svelte -> builder/web/src/lib/device/session.svelte.ts, builder/web/src/components/device/CardFormat.svelte -> builder/web/src/lib/usb/client.ts, and 40 more" }, { "rule": "cycle", @@ -321,7 +321,7 @@ }, { "rule": "cycle", - "message": "device-map-builder -> map-assembly closes a cycle: builder/web/src/components/device/DeviceStep.svelte -> builder/web/src/lib/catalog/ledger.ts, builder/web/src/components/device/DeviceSurfaces.svelte -> builder/web/src/lib/catalog/ledger.ts, builder/web/src/components/device/MapSend.svelte -> builder/web/src/lib/catalog/ledger.ts, and 14 more" + "message": "device-map-builder -> map-assembly closes a cycle: builder/web/src/components/device/DeviceStep.svelte -> builder/web/src/lib/catalog/ledger.ts, builder/web/src/components/device/DeviceSurfaces.svelte -> builder/web/src/lib/catalog/ledger.ts, builder/web/src/components/device/MapSend.svelte -> builder/web/src/lib/catalog/ledger.ts, and 8 more" }, { "rule": "cycle", @@ -337,7 +337,7 @@ }, { "rule": "cycle", - "message": "map-assembly -> device-map-builder closes a cycle: builder/web/src/components/coverage/CorridorPanel.svelte -> builder/web/src/lib/core/gpx.ts, builder/web/src/components/coverage/CorridorPanel.svelte -> builder/web/src/lib/format.ts, builder/web/src/components/coverage/CorridorPanel.svelte -> builder/web/src/lib/ui/confirm.svelte.ts, and 39 more" + "message": "map-assembly -> device-map-builder closes a cycle: builder/web/src/components/coverage/CorridorPanel.svelte -> builder/web/src/lib/core/gpx.ts, builder/web/src/components/coverage/CorridorPanel.svelte -> builder/web/src/lib/format.ts, builder/web/src/components/coverage/CorridorPanel.svelte -> builder/web/src/lib/ui/confirm.svelte.ts, and 35 more" }, { "rule": "cycle", @@ -366,7 +366,7 @@ "repository-tooling" ], "violations": 8, - "lines": 24335, + "lines": 24334, "problems": [ { "rule": "R1", @@ -520,7 +520,7 @@ "depends_on": [], "test_depends_on": [], "violations": 0, - "lines": 782, + "lines": 792, "problems": [] }, { @@ -543,15 +543,15 @@ "content" ], "violations": 10, - "lines": 25807, + "lines": 25741, "problems": [ { "rule": "cycle", - "message": "device-link -> map-assembly closes a cycle: builder/web/src/lib/device/flows.test.ts -> builder/web/src/lib/convert/bridge.ts (test), builder/web/src/lib/device/library.test.ts -> builder/web/src/lib/convert/bridge.ts (test), builder/web/src/lib/device/library.ts -> builder/web/src/lib/convert/bridge.ts, and 4 more" + "message": "device-link -> map-assembly closes a cycle: builder/web/src/lib/device/flows.test.ts -> builder/web/src/lib/convert/bridge.ts (test), builder/web/src/lib/device/rides.test.ts -> builder/web/src/lib/convert/bridge.ts (test), builder/web/src/lib/device/rides.ts -> builder/web/src/lib/convert/bridge.ts, and 1 more" }, { "rule": "cycle", - "message": "device-map-builder -> map-assembly closes a cycle: builder/web/src/components/device/DeviceStep.svelte -> builder/web/src/lib/catalog/ledger.ts, builder/web/src/components/device/DeviceSurfaces.svelte -> builder/web/src/lib/catalog/ledger.ts, builder/web/src/components/device/MapSend.svelte -> builder/web/src/lib/catalog/ledger.ts, and 14 more" + "message": "device-map-builder -> map-assembly closes a cycle: builder/web/src/components/device/DeviceStep.svelte -> builder/web/src/lib/catalog/ledger.ts, builder/web/src/components/device/DeviceSurfaces.svelte -> builder/web/src/lib/catalog/ledger.ts, builder/web/src/components/device/MapSend.svelte -> builder/web/src/lib/catalog/ledger.ts, and 8 more" }, { "rule": "cycle", @@ -563,7 +563,7 @@ }, { "rule": "cycle", - "message": "map-assembly -> device-map-builder closes a cycle: builder/web/src/components/coverage/CorridorPanel.svelte -> builder/web/src/lib/core/gpx.ts, builder/web/src/components/coverage/CorridorPanel.svelte -> builder/web/src/lib/format.ts, builder/web/src/components/coverage/CorridorPanel.svelte -> builder/web/src/lib/ui/confirm.svelte.ts, and 39 more" + "message": "map-assembly -> device-map-builder closes a cycle: builder/web/src/components/coverage/CorridorPanel.svelte -> builder/web/src/lib/core/gpx.ts, builder/web/src/components/coverage/CorridorPanel.svelte -> builder/web/src/lib/format.ts, builder/web/src/components/coverage/CorridorPanel.svelte -> builder/web/src/lib/ui/confirm.svelte.ts, and 35 more" }, { "rule": "cycle", @@ -696,7 +696,7 @@ "repository-tooling" ], "violations": 4, - "lines": 9955, + "lines": 9951, "problems": [ { "rule": "R1", @@ -780,7 +780,7 @@ ], "test_depends_on": [], "violations": 0, - "lines": 18840, + "lines": 18785, "problems": [] }, { @@ -828,7 +828,7 @@ ], "test_depends_on": [], "violations": 7, - "lines": 26995, + "lines": 27021, "problems": [ { "rule": "cycle", @@ -945,7 +945,7 @@ "repository-tooling" ], "violations": 4, - "lines": 18653, + "lines": 18719, "problems": [ { "rule": "cycle", diff --git a/docs/testing.md b/docs/testing.md index 3435c960c6..fdccd1543a 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -107,7 +107,6 @@ and a missing expected file fails the upload. Download with | `web-builder-ATTEMPT` | Vitest JUnit XML | | `web-builder-browser-ATTEMPT`, `web-demo-browser-ATTEMPT` | the two Chromium journeys, with a screenshot and trace on failure | | `ios-tests-coverage-ATTEMPT`, `ios-screenshots-ATTEMPT`, `ios-application-ATTEMPT` | `.xcresult` bundles; restore the suffix and open in Xcode | -| `desktop-tests-PLATFORM-ATTEMPT` | desktop nextest results | The exit status and the CI log stay authoritative; an artifact does not prove a passing run. diff --git a/firmware/README.md b/firmware/README.md index a2ed595974..f04821264e 100644 --- a/firmware/README.md +++ b/firmware/README.md @@ -13,14 +13,13 @@ device-reachable; `firmware/tools/check_dependencies.py` enforces that rule. Dev cross the boundary, because a dev-dependency never enters the `no_std` build. So `cargo test` needs GEOS. -Four crates are excluded from the workspace and built from **inside their own directory**, each +Three crates are excluded from the workspace and built from **inside their own directory**, each with its own `Cargo.lock`, `fmt`, `clippy`, `test` and CI job: | Crate | Why it stands alone | | :-- | :-- | | [`obc-fw-nrf54l`](obc-fw-nrf54l/README.md) | the board: its own MCU target and `.cargo/config.toml` | | [`obc-boot`](obc-boot/README.md) | the 32 KB bootloader, same target, its own link script | -| [`obc-desktop`](../builder/desktop/README.md) | the Tauri app: a platform webview | | [`obc-sensor-sim`](obc-sensor-sim/README.md) | the sensor simulator: its own MCU target | ## Setup @@ -30,7 +29,6 @@ with its own `Cargo.lock`, `fmt`, `clippy`, `test` and CI job: | Anything Rust | A stable toolchain (`rustup`). | | The desktop simulator | Only Rust — the GUI is pure eframe/egui. | | The packer (`obc-pack`) | System **GEOS ≥ 3.14** (`brew install geos`), its only native dependency. | -| The desktop app (`obc-desktop`) | **CMake** and a C++ compiler (it vendors GEOS), plus Node. Linux also needs WebKitGTK — see [its README](../builder/desktop/README.md). | | Compiling the shared crates for the device | `rustup target add thumbv8m.main-none-eabihf`. | ## Build @@ -120,15 +118,14 @@ regenerates it in the same pull request, with the reason stated. ## Format -`.rustfmt.toml` is committed, so let rustfmt own style. CI checks all five invocations. The +`.rustfmt.toml` is committed, so let rustfmt own style. CI checks all four invocations. The workspace is a *virtual* manifest, so `--all` is required or it formats nothing, and `--all` skips -the four excluded crates. `obc fmt` runs all five. +the three excluded crates. `obc fmt` runs all four. ```sh cargo fmt --all # the workspace cargo fmt --manifest-path firmware/obc-fw-nrf54l/Cargo.toml cargo fmt --manifest-path firmware/obc-boot/Cargo.toml -cargo fmt --manifest-path builder/desktop/Cargo.toml cargo fmt --manifest-path firmware/obc-sensor-sim/Cargo.toml ``` diff --git a/firmware/obc-app/src/harness/upload.rs b/firmware/obc-app/src/harness/upload.rs index 429effa430..d3405263f7 100644 --- a/firmware/obc-app/src/harness/upload.rs +++ b/firmware/obc-app/src/harness/upload.rs @@ -480,8 +480,7 @@ fn feed_trip(app: &mut App) { #[test] fn a_trip_upload_collapses_the_route_popup_burst_into_one_trip_card() { - // The desktop app's trip send: each member route commits (its popup replacing the previous), - // The desktop app's trip send: each member route commits, its popup replacing the previous, + // A host's trip send: each member route commits, its popup replacing the previous, // then the trip object lands last, so exactly one card is left standing. let mut app = idle_app(); route_upload(&mut app, 10, false); @@ -596,7 +595,7 @@ fn a_later_route_upload_replaces_the_trip_card_most_recent_wins() { #[test] fn a_trip_replace_is_silent() { - // A replace is a host-side trip edit (the desktop edits by replace-at-same-id, one upload per + // A replace is a host-side trip edit (a host edits by replace-at-same-id, one upload per // click): the rider just made the change, so no card. Only a fresh delivery announces itself. let mut app = idle_app(); feed_trip(&mut app); @@ -605,7 +604,7 @@ fn a_trip_replace_is_silent() { assert!(matches!(app.top_screen(), Screen::Home(_)), "a trip edit raises no popup"); assert!(!app.take_dirty().map, "…and dirties nothing"); - // The desktop reorder sequence: several replace-commits in a row stay completely silent. + // A host's reorder sequence: several replace-commits in a row stay completely silent. for _ in 0..4 { trip_upload(&mut app, 5, true); } diff --git a/firmware/obc-fw-nrf54l/src/usb/mod.rs b/firmware/obc-fw-nrf54l/src/usb/mod.rs index ab917d6905..85e9f6ddae 100644 --- a/firmware/obc-fw-nrf54l/src/usb/mod.rs +++ b/firmware/obc-fw-nrf54l/src/usb/mod.rs @@ -1,5 +1,5 @@ //! The USB device plane: the nRF54LM20's USBHS carrying flat-store frames, so a browser (WebUSB) -//! or the desktop app can push a map, a route or a firmware image to a plugged-in device. The +//! or a native USB host can push a map, a route or a firmware image to a plugged-in device. The //! adapter owns record boundaries, pacing, timeouts and drain; the engine beside the card decides //! what a frame means. //! diff --git a/firmware/tools/dependency_rules.json b/firmware/tools/dependency_rules.json index aebe4ee5a6..d8098e7881 100644 --- a/firmware/tools/dependency_rules.json +++ b/firmware/tools/dependency_rules.json @@ -2,8 +2,7 @@ "schema_version": 1, "standalone_manifests": [ "firmware/obc-fw-nrf54l/Cargo.toml", - "firmware/obc-boot/Cargo.toml", - "builder/desktop/Cargo.toml" + "firmware/obc-boot/Cargo.toml" ], "forbidden_features": [ { @@ -62,7 +61,6 @@ "obc-data", "obc-data-steps", "obc-dem", - "obc-desktop", "obc-draw", "obc-file-source", "obc-fixtures", diff --git a/host/obc-bake/src/bin/obc-pack.rs b/host/obc-bake/src/bin/obc-pack.rs index abb2421ef3..f258d5a8f9 100644 --- a/host/obc-bake/src/bin/obc-pack.rs +++ b/host/obc-bake/src/bin/obc-pack.rs @@ -1,7 +1,7 @@ //! The `obc-pack` CLI: flags in, [`obc_bake::pipeline::pack`] out. //! -//! The pipeline itself lives in the library, because the desktop app links the packer rather than -//! spawning it and the two must not be able to diverge. This file owns the command line and nothing +//! The pipeline itself lives in the library, because an in-process caller links the packer rather +//! than spawning it and the two must not be able to diverge. This file owns the command line and nothing //! else. //! //! Positional CLI: ` `, plus `--bbox W,S,E,N` to crop the sources diff --git a/host/obc-bake/src/lib.rs b/host/obc-bake/src/lib.rs index 8904acaa6c..3238e4eac4 100644 --- a/host/obc-bake/src/lib.rs +++ b/host/obc-bake/src/lib.rs @@ -1,5 +1,5 @@ //! `obc-bake` builds the published cell catalog once, centrally, and uploads it. -//! Website and desktop consumers only select, download, and assemble these cells; +//! The map builder only selects, downloads, and assembles these cells; //! raw OSM processing stays here as maintainer tooling. //! //! A bake takes the Geofabrik regions of `data/regions/` ([`regions`]), the diff --git a/host/obc-bake/src/pipeline.rs b/host/obc-bake/src/pipeline.rs index e3508f6080..e9abf44856 100644 --- a/host/obc-bake/src/pipeline.rs +++ b/host/obc-bake/src/pipeline.rs @@ -1,7 +1,7 @@ //! The end-to-end pack: `.osm.pbf`(s) to `.obcm`, as one function. //! -//! [`pack`] is the only entry point: `main.rs` parses flags and calls it, the desktop app builds the -//! same [`PackOptions`] and calls it, and a parity test packs the same fixture both ways and +//! [`pack`] is the only entry point: `main.rs` parses flags and calls it, an in-process caller builds +//! the same [`PackOptions`] and calls it, and a parity test packs the same fixture both ways and //! compares the bytes, so the two hosts cannot grow different pipelines. //! //! Everything the run wants to say, and the only way to stop it, arrive together in [`Progress`]. diff --git a/host/obc-bake/tests/packer_cases/pipeline.rs b/host/obc-bake/tests/packer_cases/pipeline.rs index 760061f61f..f0abecf20d 100644 --- a/host/obc-bake/tests/packer_cases/pipeline.rs +++ b/host/obc-bake/tests/packer_cases/pipeline.rs @@ -2,8 +2,8 @@ //! code path, that a cancelled run stops and cleans up, and that the phases a host //! shows still line up with the ones the web builder scrapes. //! -//! The byte-identity test is the one that matters: the desktop app links `obc-pack` instead of -//! spawning it, so the two can drift. They run against the same fixture and the same preset and +//! The byte-identity test is the one that matters: an in-process caller links `obc-pack` instead +//! of spawning it, so the two can drift. They run against the same fixture and the same preset and //! their outputs are compared whole, the binary through `CARGO_BIN_EXE_obc-pack`, so it is the real //! executable and the real argument parsing. @@ -96,8 +96,8 @@ fn a_run_reports_its_phases_in_order() { } /// The dev server still scrapes these prefixes off the CLI's stdout -/// (`builder/server/jobs.py`'s `_STAGE_MARKERS`) while the desktop app reads -/// the [`Phase`] beside them. They are the same events, so a renamed stage line +/// (`builder/server/jobs.py`'s `_STAGE_MARKERS`) while an in-process caller +/// reads the [`Phase`] beside them. They are the same events, so a renamed stage line /// must break here rather than silently freeze one host's progress bar. #[test] fn stage_lines_still_match_the_web_builders_markers() { diff --git a/host/obc-data-steps/src/device/catalog.rs b/host/obc-data-steps/src/device/catalog.rs index cff4c1aed0..db644d58d5 100644 --- a/host/obc-data-steps/src/device/catalog.rs +++ b/host/obc-data-steps/src/device/catalog.rs @@ -14,7 +14,7 @@ pub static DEVICE_CATALOG: Layer = Layer { shape: obc_data::engine::Shape::Whole, format: obc_pack::catalog::CATALOG_SCHEMA_VERSION, revision: 2, - readers: &[&crate::readers::MAP_BUILDER, &crate::readers::DESKTOP_APP], + readers: &[&crate::readers::MAP_BUILDER], cache: false, }; diff --git a/host/obc-data-steps/src/readers.rs b/host/obc-data-steps/src/readers.rs index c6e105b8f5..b694dee190 100644 --- a/host/obc-data-steps/src/readers.rs +++ b/host/obc-data-steps/src/readers.rs @@ -24,10 +24,6 @@ pub static MAP_BUILDER: Reader = Reader { name: "map builder", on_new_format: "An old map builder reads no new data: it needs a build that reads the new format.", }; -pub static DESKTOP_APP: Reader = Reader { - name: "desktop app", - on_new_format: "An old desktop app reads no new data: it needs a build that reads the new format.", -}; pub static WEB_PLANNER: Reader = Reader { name: "web planner", on_new_format: "The web planner reads the new data after a deploy of code that reads the new format.", diff --git a/host/obc-data/README.md b/host/obc-data/README.md index f087ef04c7..08a08b70b2 100644 --- a/host/obc-data/README.md +++ b/host/obc-data/README.md @@ -94,8 +94,8 @@ The [page README](../../builder/web/src/components/data/README.md) covers the pa ## Serve `obc data serve` serves `local` on port 8710 of every IPv4 address of the machine. It prints the -command that opens each app on `local`: the web planner, the map builder, the desktop app, the -simulator and the Debug iOS app. It runs the routing, search and downloads services of each +command that opens each app on `local`: the web planner, the map builder, the simulator and the +Debug iOS app. It runs the routing, search and downloads services of each planner release and the tile server of `planner/tiles`. At start it builds `planner-service` with cargo. Prepare Node and the other services once: diff --git a/host/obc-data/src/cli/serve_cli.rs b/host/obc-data/src/cli/serve_cli.rs index fda7adef29..d6c9d6c90f 100644 --- a/host/obc-data/src/cli/serve_cli.rs +++ b/host/obc-data/src/cli/serve_cli.rs @@ -19,7 +19,6 @@ use serde_json::Value; use super::{print_json, Code, Error}; use crate::engine::runs; -use crate::release; use crate::serve::http::{self, Shared}; use crate::serve::services::{self, Origins, Process, Programs}; use crate::serve::{look, Fetched, Follower, Load, Seen, Served, PLANNER}; @@ -66,14 +65,13 @@ pub struct Link { pub fn listening(root: &Path, name: &str, dir: bool) -> Listening { let url = format!("http://127.0.0.1:{PORT}"); let network = dir.then(network_address).flatten().map(|address| format!("http://{address}:{PORT}")); - let (planner, device) = (format!("{url}/{PLANNER}"), format!("{url}/{}", release::POINTERS[0])); + let planner = format!("{url}/{PLANNER}"); let web = root.join("builder/web").display().to_string(); let link = |app: &str, how: String| Link { app: app.into(), how }; let mut links = vec![ link("web planner", format!("cd '{web}' && VITE_PLANNER_CATALOG={planner} npm run dev -- --mode planner, then open /planner.html; once before: npm ci && npm run build:wasm")), link("map builder", format!("VITE_PLANNER_CATALOG={planner} obc site")), - link("desktop app", format!("OBC_CATALOG_URL={device} obc desktop")), - link("simulator", "obc sim MAP.obcm, with a map that the map builder or the desktop app assembles".into()), + link("simulator", "obc sim MAP.obcm, with a map that the map builder assembles".into()), ]; links.extend(network.as_ref().map(|network| { link("iPhone", format!("the Debug app with the launch argument -OBCPlannerCatalog {network}/{PLANNER}")) diff --git a/host/obc-draw/src/land.rs b/host/obc-draw/src/land.rs index 759fcff972..d60fd817ea 100644 --- a/host/obc-draw/src/land.rs +++ b/host/obc-draw/src/land.rs @@ -371,9 +371,8 @@ fn geos_polygon_from_rings(rings: &[Vec<(f64, f64)>]) -> Option { /// Where the unpacked dataset lives: `$OBCM_CACHE_DIR/land`, else `~/.cache/obcm/land`. /// -/// The override and the Windows home variable are both load-bearing. The desktop app documents this -/// directory as the shared cache, so the CLI, the dev server and the app point at one 2.3 GB -/// dataset instead of three, and it finds it through `OBCM_CACHE_DIR`. `HOME` alone is unset on +/// The override and the Windows home variable are both load-bearing. The CLI and the dev server +/// point at one shared 2.3 GB dataset through `OBCM_CACHE_DIR`. `HOME` alone is unset on /// Windows. pub(crate) fn cache_dir() -> Result { if let Some(dir) = std::env::var_os("OBCM_CACHE_DIR") { @@ -675,7 +674,7 @@ mod tests { } /// A cancelled index must not be remembered as a failure: the packer is linked in-process by - /// the desktop app and the bakery, so one stopped build would leave land generation broken for + /// the bakery, so one stopped build would leave land generation broken for /// the life of the process. The only test that touches the process-wide slot. #[test] fn a_cancelled_index_is_not_memoized() { diff --git a/host/obc-map-core/src/progress.rs b/host/obc-map-core/src/progress.rs index d7552e8b55..2057636dbb 100644 --- a/host/obc-map-core/src/progress.rs +++ b/host/obc-map-core/src/progress.rs @@ -1,7 +1,7 @@ //! What a packing run says about itself while it runs, and how it is stopped. //! -//! The narration is a [`Progress`] sink the caller supplies: the CLI's prints the line, and the -//! desktop app's forwards `(phase, line)` to the webview. +//! The narration is a [`Progress`] sink the caller supplies: the CLI's prints the line, and an +//! in-process caller's can forward `(phase, line)` to its UI. //! //! Two rules keep the two hosts from drifting apart. The phase vocabulary is [`Phase`] and it is //! closed, because the build UI derives a percentage from a phase's index, so a phase is a value diff --git a/pyproject.toml b/pyproject.toml index a8ec4a860c..e043d28e7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -96,13 +96,11 @@ search-training = [ "typer==0.27.2", "typing-extensions==4.16.0", ] -desktop-e2e = ["selenium==4.35.0"] [tool.uv] package = false default-groups = [] conflicts = [ - [{ group = "desktop-e2e" }, { group = "search-training" }], [{ group = "dev" }, { group = "search-runtime" }], [{ group = "dev" }, { group = "search-test" }], [{ group = "dev" }, { group = "search-training" }], diff --git a/specs/flat-store-protocol.md b/specs/flat-store-protocol.md index 4df1baab60..ee4c7770fe 100644 --- a/specs/flat-store-protocol.md +++ b/specs/flat-store-protocol.md @@ -9,7 +9,7 @@ phone, a cable client or the simulator (§3, §4), and its bindings to BLE and U `firmware/obc-fw-nrf54l` (`src/ble/v4.rs`, `src/usb/`); the store seam in `firmware/obc-storage` (`src/flat/seam.rs`); the simulator device `sim/flat-device`; the clients: the companion app (`OBCProtocolV4` in `companion-ios/Packages/OBCKit`), the web builder (`builder/web/src/lib/usb/`) - and the desktop app (`builder/usb`). + and the card-format command (`builder/usb`). - Readers: the same crates. - Test vectors: §3.11, and [`vectors/flat-store-v4/`](vectors/flat-store-v4/manifest.json), produced by `firmware/obc-link/src/flat/vectors.rs`. @@ -604,8 +604,8 @@ invalidated first, so the running in-memory store must not continue serving requ reboots after that response. A preflight refusal (busy, stale identity, malformed request) does not change the card and does not reboot. -The empty store contains no map. Boot must still enumerate USB in that state so the web or desktop -client can upload the first map; showing a no-map fault on the display must not take the recovery +The empty store contains no map. Boot must still enumerate USB in that state so a USB client can +upload the first map; showing a no-map fault on the display must not take the recovery transport down. ### 3.11 Vectors diff --git a/specs/obca-assembly.md b/specs/obca-assembly.md index 2d165c58a6..44b569e936 100644 --- a/specs/obca-assembly.md +++ b/specs/obca-assembly.md @@ -596,7 +596,7 @@ one order. The two skins may change the other seven bytes of each record and the and nothing else (§4.7). The hosted catalog has **exactly one** schema: the 14-LOD bikepacking ladder. Hosted "presets" are -therefore skins. Custom schemas are local bakes in the desktop app. +therefore skins. Custom schemas are local bakes on the maintainer dev server. ### 6.3 Lockstep and the bake guard diff --git a/specs/obcc-catalog.md b/specs/obcc-catalog.md index 4203e7d855..876c788f3c 100644 --- a/specs/obcc-catalog.md +++ b/specs/obcc-catalog.md @@ -1,13 +1,13 @@ # OBCC catalog manifest -The JSON contract between the central cell bakery and map-building consumers. The website and -desktop app read the same catalog, select the same [OBCA](obca-assembly.md) cells, and feed them to -the same assembler. The device does not read OBCC. +The JSON contract between the central cell bakery and map-building consumers. The website and the +maintainer dev server read the same catalog, select the same [OBCA](obca-assembly.md) cells, and +feed them to the same assembler. The device does not read OBCC. - Version: `"schema_version": 3`. Consumers MUST reject any other value before interpreting the rest of the document. - Writers: `host/obc-pack` (`obc-pack catalog`), run by `obc-bake`. -- Readers: the website and the desktop app (`builder/web/src/lib/catalog/`). +- Readers: the map builder (`builder/web/src/lib/catalog/`). - Code authority: [`host/obc-pack/src/catalog.rs`](../host/obc-pack/src/catalog.rs). Its checked-in JSON Schema and worked examples: [`catalog.schema.json`](../host/obc-pack/schema/catalog.schema.json), @@ -327,9 +327,8 @@ fetch or graft an object for it. `cell_count` continues to count downloadable ar ## 9. URLs and integrity -Object URLs are either absolute HTTP(S) URLs or root-relative paths. A desktop consumer MUST -restrict all satellite and cell requests to the configured catalog origin; it MUST NOT follow the -catalog to an unrelated origin. Plain HTTP is permitted only for loopback development. +Object URLs are either absolute HTTP(S) URLs or root-relative paths. Plain HTTP is permitted only +for loopback development. A pinned URL MUST end in `..` or `/objects/`. The digest MUST be the pin's exact lowercase SHA-256. The URL MUST NOT have a query or fragment. Producers MUST NOT serve @@ -397,8 +396,8 @@ identities, and the selected skin are passed to the OBCA assembler. Island pruni assembly, seams unify only exact serialized coordinates, and the resulting mounted map follows [obca-assembly.md](obca-assembly.md) §4. -The website and desktop app MUST use the same selection arithmetic, verified cell bytes, skin, and -assembler. Host-specific file saving MUST NOT alter the assembled bytes. +Every host of the map builder MUST use the same selection arithmetic, verified cell bytes, skin, +and assembler. Host-specific file saving MUST NOT alter the assembled bytes. A consumer MAY stream assembler output directly to a connected device instead of first saving it, and MUST verify the emitted file's announced length before transfer. A streaming consumer has no diff --git a/tools/fixture_catalog.py b/tools/fixture_catalog.py index 4978837240..28900a2152 100644 --- a/tools/fixture_catalog.py +++ b/tools/fixture_catalog.py @@ -1,10 +1,8 @@ #!/usr/bin/env python3 -"""Digest-pinned catalog fixtures on loopback, for the two journeys that drive a real catalog UI. +"""A digest-pinned catalog fixture on loopback, for the builder browser journey. -Two document sets, one server. `schema_examples()` is the desktop launch smoke's catalog and -publishes no cell bytes, because that journey stops at region selection. `web_assemble()` is the -builder browser journey's catalog, where every artifact is real, so a region download from it -assembles the checked-in cells into the checked-in map. +`web_assemble()` is the journey's catalog, where every artifact is real, so a region download +from it assembles the checked-in cells into the checked-in map. Every `bytes`, `sha256` and `url` is computed from the bytes this module serves, never copied from a document. @@ -26,7 +24,6 @@ from urllib.parse import urlsplit ROOT = Path(__file__).resolve().parents[1] -SCHEMA_EXAMPLES = ROOT / "host/obc-pack/schema" ASSEMBLE_FIXTURE = ROOT / "builder/wasm/tests/fixture" CONTENT_TYPES = { @@ -63,39 +60,6 @@ def _document(objects: dict[str, bytes], path: str, document: object) -> dict: return pin(objects, path, json.dumps(document).encode()) -# The desktop launch smoke's catalog. - - -def schema_examples() -> dict[str, bytes]: - """Keep the producer's fine-band example; make the other bands empty.""" - - catalog = json.loads((SCHEMA_EXAMPLES / "catalog.example.json").read_text()) - fine = json.loads((SCHEMA_EXAMPLES / "cell-index.example.json").read_text()) - region_cells = json.loads((SCHEMA_EXAMPLES / "region-cells.example.json").read_text()) - objects: dict[str, bytes] = {} - - catalog.pop("terrain", None) - for ref in catalog["cell_index"]: - doc = fine if ref["band"] == "fine" else { - "schema_version": 3, "schema_sha256": catalog["schema"]["sha256"], - "band": ref["band"], "cells": [], "known_empty": [], - } - ref.update(_document(objects, f"/{ref['band']}.json", doc)) - ref.update(cell_count=len(doc["cells"]), known_empty_count=len(doc["known_empty"])) - region_cells["cells"] = {"fine": region_cells["cells"]["fine"]} - region_cells.pop("terrain", None) - region = catalog["regions"][0] - region.pop("terrain", None) - region.update(bytes=sum(cell["bytes"] for cell in fine["cells"]), - bytes_by_band={"fine": sum(cell["bytes"] for cell in fine["cells"])}, cell_count={"fine": 3}, - partial_cell_count_by_band={"fine": 0}) - pinned = _document(objects, "/region.json", region_cells) - region.update({f"cells_{key}": value for key, value in pinned.items()}) - catalog["regions"] = [region] - objects["/catalog.json"] = json.dumps(catalog).encode() - return objects - - # The builder browser journey's catalog. # # The bridge fixture's own cut numbers its feature types in config order. A hosted catalog names the @@ -265,7 +229,7 @@ def color(value: int | str) -> int: return objects -CATALOGS = {"schema-examples": schema_examples, "web-assemble": web_assemble} +CATALOGS = {"web-assemble": web_assemble} diff --git a/tools/install-geos.sh b/tools/install-geos.sh index 6cf56bb3e8..2df4a8dae9 100755 --- a/tools/install-geos.sh +++ b/tools/install-geos.sh @@ -3,10 +3,6 @@ # workspace build (geos-sys needs ≥3.14, newer than distro packages). Writes the shell # shim ~/.obc-geos-env.sh that the `obc` tasks source. Idempotent. Needs cmake + a C++ # compiler + make. Called by `obc doctor --install`; safe to run standalone. -# -# NOT needed for the desktop app: obc-desktop builds its own GEOS in, statically -# (#907, its README). This script is for the workspace — the CLI packer, the sim, and -# CI's host jobs — where linking the system library is what keeps builds fast. set -euo pipefail VER="${GEOS_VER:-3.14.1}" diff --git a/tools/justfile b/tools/justfile index 30d9a10ce4..694129c3db 100644 --- a/tools/justfile +++ b/tools/justfile @@ -472,48 +472,6 @@ web *args: _say "building the maintainer frontend…"; ( cd builder/web && _run npm run build ) _run uv run --locked --group builder python -m builder.server "$@" -# Run the desktop app (Tauri + the shared published-cell frontend). The Rust side -# embeds the built frontend. Opts: dev (live reload against Vite), build (compile -# only, don't open the window). -# obc desktop obc desktop dev obc desktop build -# The desktop app consumes published cells and no longer links the packer or GEOS. -# `dev` drops `custom-protocol`, the feature that embeds the frontend, so the window -# follows Vite instead. -[doc("Build & run the desktop app. Opts: dev (live-reload) build (compile only)")] -[group('run')] -desktop *args: - #!/usr/bin/env bash - set -euo pipefail - source "{{lib}}"; obc_init - mode=run - for o in "$@"; do case "$o" in - dev) mode=dev ;; - build|build-only) mode=build ;; - *) _err "unknown desktop option: '$o' (want: dev build)"; exit 1 ;; - esac; done - fe="$OBC_ROOT/builder/web" - [[ -d "$fe/node_modules" ]] || { _say "installing frontend deps…"; ( cd "$fe" && _run npm ci ); } - # The app imports the shared WASM core. Generated bindings are gitignored; - # existence cannot prove that any bridge matches its Rust source, so always - # rebuild — warm wasm-pack builds are incremental. - _say "refreshing the wasm bridges…"; ( cd "$fe" && _run npm run build:wasm ) - if [[ "$mode" == dev ]]; then - # `custom-protocol` is a default feature here, which is what makes plain - # `cargo run` embed dist/desktop; opt out of it and the window follows Vite. - _say "starting Vite (desktop mode) on :5173 — leave it running, then this window follows it" - ( cd "$fe" && npm run dev -- --mode desktop & ) - cd "$OBC_ROOT/builder/desktop"; _run cargo run --no-default-features - else - # vite/esbuild strips types without checking them; svelte-check is what - # fails loudly when the app drifts from a bridge's generated bindings. - _say "type-checking the frontend…"; ( cd "$fe" && _run npm run check ) - _say "building the desktop frontend bundle…" - ( cd "$fe" && _run npm run build:desktop ) - cd "$OBC_ROOT/builder/desktop" - [[ "$mode" == build ]] && { _run cargo build --release; _say "built: $PWD/target/release/obc-desktop"; exit 0; } - _run cargo run --release - fi - [doc("Pack the iOS host as target/OBCHost.xcframework, in release. Args: [--sim-only|--mac-only]")] [group('ios')] ios-host *args: @@ -710,7 +668,6 @@ fmt: _run cargo fmt --manifest-path firmware/obc-fw-nrf54l/Cargo.toml _run cargo fmt --manifest-path firmware/obc-boot/Cargo.toml _run cargo fmt --manifest-path firmware/obc-sensor-sim/Cargo.toml - _run cargo fmt --manifest-path builder/desktop/Cargo.toml [doc("Regenerate THIRD-PARTY.md (the licence texts shipped binaries owe). Args: (none) | --check.")] [group('build')] @@ -762,7 +719,6 @@ check *args: step "fmt (board crate)" cargo fmt --check --manifest-path firmware/obc-fw-nrf54l/Cargo.toml step "fmt (bootloader)" cargo fmt --check --manifest-path firmware/obc-boot/Cargo.toml step "fmt (sensor mock)" cargo fmt --check --manifest-path firmware/obc-sensor-sim/Cargo.toml - step "fmt (desktop app)" cargo fmt --check --manifest-path builder/desktop/Cargo.toml fi want clippy && step "clippy (workspace, all-targets/features)" \ cargo clippy --workspace --all-targets --all-features --locked -- -D warnings @@ -809,7 +765,7 @@ check *args: step "wasm bridges" npm run build:wasm step "frontend svelte-check" npm run check step "frontend vitest" npm test - step "frontend builds (dev + web + desktop)" npm run build:all + step "frontend builds (dev + web)" npm run build:all popd >/dev/null else _warn "skip frontend — npm not installed"; SKIPPED+=("frontend"); fi fi @@ -819,7 +775,6 @@ check *args: step "deny (board crate)" cargo deny --manifest-path "$OBC_ROOT/firmware/obc-fw-nrf54l/Cargo.toml" --all-features --config "$OBC_ROOT/tools/licenses/deny.toml" check step "deny (bootloader)" cargo deny --manifest-path "$OBC_ROOT/firmware/obc-boot/Cargo.toml" --all-features --config "$OBC_ROOT/tools/licenses/deny.toml" check step "deny (sensor sim)" cargo deny --manifest-path "$OBC_ROOT/firmware/obc-sensor-sim/Cargo.toml" --all-features --config "$OBC_ROOT/tools/licenses/deny.toml" check - step "deny (desktop app)" cargo deny --manifest-path "$OBC_ROOT/builder/desktop/Cargo.toml" --all-features --config "$OBC_ROOT/tools/licenses/deny.toml" check else _warn "skip deny — cargo-deny not installed (cargo install cargo-deny)"; SKIPPED+=("deny"); fi fi if want wasm; then diff --git a/tools/licenses/THIRD-PARTY.md b/tools/licenses/THIRD-PARTY.md index 7352321d8c..b36df9abc7 100644 --- a/tools/licenses/THIRD-PARTY.md +++ b/tools/licenses/THIRD-PARTY.md @@ -28,13 +28,11 @@ crate, which the `deny` CI job checks. Data steps that call the GPL map tools be separate GPL-3.0-only crate, and an `obc-data` binary that links them is GPL-3.0-only as a whole. -GEOS deserves a line, because deny.toml's note about it predates the current tree: -`geos-src` declares MIT for the *wrapper* while the C++ sources it carries are -**LGPL-2.1**, and that obligation follows whatever links them. Today nothing -distributed does — GEOS is reached only through `obc-pack`, a host tool shipped as -source, and `cargo tree -e normal` finds no `geos` in the desktop app's graph, which -is why no section below carries an LGPL text. Should a packaged artifact ever link it, -the LGPL text and the corresponding source have to travel in that package. +GEOS deserves a line: `geos-src` declares MIT for the *wrapper* while the C++ sources +it carries are **LGPL-2.1**, and that obligation follows whatever links them. Today +nothing distributed does — GEOS is reached only through `obc-pack`, a host tool shipped +as source, which is why no section below carries an LGPL text. Should a packaged artifact +ever link it, the LGPL text and the corresponding source have to travel in that package. ## Device firmware (`UPDATE.BIN`) @@ -3828,6117 +3826,6 @@ authorization of the copyright holder. ``` -## Desktop application - -_the Rust half of the desktop app — its web half ships its own notices beside the bundle._ - -### Apache License 2.0 - -Applies to: `ring 0.17.14` - -```text - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -``` - -### Apache License 2.0 - -Applies to: `dpi 0.1.2`, `tao 0.35.3` - -```text -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -``` - -### Apache License 2.0 - -Applies to: `dunce 1.0.5`, `sync_wrapper 1.0.2` - -```text -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - - (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - - You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - -To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -``` - -### BSD 3-Clause "New" or "Revised" License - -Applies to: `alloc-no-stdlib 2.0.4`, `brotli 8.0.4` - -```text -Copyright (c) 2016 Dropbox, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -``` - -### BSD 3-Clause "New" or "Revised" License - -Applies to: `subtle 2.6.1` - -```text -Copyright (c) 2016-2017 Isis Agora Lovecruft, Henry de Valence. All rights reserved. -Copyright (c) 2016-2024 Isis Agora Lovecruft. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -``` - -### BSD 3-Clause "New" or "Revised" License - -Applies to: `alloc-stdlib 0.2.4` - -```text -Copyright (c) . - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -``` - -### Community Data License Agreement Permissive 2.0 - -Applies to: `webpki-roots 1.0.10` - -```text -# Community Data License Agreement - Permissive - Version 2.0 - -This is the Community Data License Agreement - Permissive, Version -2.0 (the "agreement"). Data Provider(s) and Data Recipient(s) agree -as follows: - -## 1. Provision of the Data - -1.1. A Data Recipient may use, modify, and share the Data made -available by Data Provider(s) under this agreement if that Data -Recipient follows the terms of this agreement. - -1.2. This agreement does not impose any restriction on a Data -Recipient's use, modification, or sharing of any portions of the -Data that are in the public domain or that may be used, modified, -or shared under any other legal exception or limitation. - -## 2. Conditions for Sharing Data - -2.1. A Data Recipient may share Data, with or without modifications, so -long as the Data Recipient makes available the text of this agreement -with the shared Data. - -## 3. No Restrictions on Results - -3.1. This agreement does not impose any restriction or obligations -with respect to the use, modification, or sharing of Results. - -## 4. No Warranty; Limitation of Liability - -4.1. All Data Recipients receive the Data subject to the following -terms: - -THE DATA IS PROVIDED ON AN "AS IS" BASIS, WITHOUT REPRESENTATIONS, -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED -INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -NO DATA PROVIDER SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING -WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE DATA OR RESULTS, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -## 5. Definitions - -5.1. "Data" means the material received by a Data Recipient under -this agreement. - -5.2. "Data Provider" means any person who is the source of Data -provided under this agreement and in reliance on a Data Recipient's -agreement to its terms. - -5.3. "Data Recipient" means any person who receives Data directly -or indirectly from a Data Provider and agrees to the terms of this -agreement. - -5.4. "Results" means any outcome obtained by computational analysis -of Data, including for example machine learning models and models' -insights. - -``` - -### ISC License - -Applies to: `untrusted 0.9.0` - -```text -// Copyright 2015-2016 Brian Smith. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -``` - -### ISC License - -Applies to: `ring 0.17.14` - -```text -Copyright 2015-2025 Brian Smith. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -``` - -### ISC License - -Applies to: `rustls-webpki 0.103.16` - -```text -Except as otherwise noted, this project is licensed under the following -(ISC-style) terms: - -Copyright 2015 Brian Smith. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -The files under third-party/chromium are licensed as described in -third-party/chromium/LICENSE. - -``` - -### MIT License - -Applies to: `uds_windows 1.2.1` - -```text - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE - -``` - -### MIT License - -Applies to: `sha2 0.10.9` - -```text -Copyright (c) 2006-2009 Graydon Hoare -Copyright (c) 2009-2013 Mozilla Foundation -Copyright (c) 2016 Artyom Pavlov - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `brotli 8.0.4` - -```text -Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -``` - -### MIT License - -Applies to: `core-foundation-sys 0.8.7`, `core-foundation 0.10.1`, `core-graphics-types 0.2.0`, `core-graphics 0.25.0`, `string_cache 0.9.0` - -```text -Copyright (c) 2012-2013 Mozilla Foundation - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `hex 0.4.3` - -```text -Copyright (c) 2013-2014 The Rust Project Developers. -Copyright (c) 2015-2020 The rust-hex Developers - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `form_urlencoded 1.2.2` - -```text -Copyright (c) 2013-2016 The rust-url developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `idna 1.1.0`, `percent-encoding 2.3.2`, `url 2.5.8` - -```text -Copyright (c) 2013-2025 The rust-url developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `cfg-if 1.0.4`, `js-sys 0.3.103`, `socket2 0.6.5`, `toml_datetime 0.6.3`, `wasm-bindgen-futures 0.4.76`, `wasm-bindgen-macro-support 0.2.126`, `wasm-bindgen-macro 0.2.126`, `wasm-bindgen-shared 0.2.126`, `wasm-bindgen 0.2.126`, `web-sys 0.3.103` - -```text -Copyright (c) 2014 Alex Crichton - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `mio 1.2.2` - -```text -Copyright (c) 2014 Carl Lerche and other MIO contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -``` - -### MIT License - -Applies to: `errno 0.3.14` - -```text -Copyright (c) 2014 Chris Wong - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `mime 0.3.17` - -```text -Copyright (c) 2014 Sean McArthur - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -``` - -### MIT License - -Applies to: `bitflags 1.3.2`, `bitflags 2.13.1`, `glob 0.3.4`, `log 0.4.33`, `regex-automata 0.4.16`, `regex-syntax 0.8.11`, `regex 1.13.1` - -```text -Copyright (c) 2014 The Rust Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `uuid 1.24.0` - -```text -Copyright (c) 2014 The Rust Project Developers -Copyright (c) 2018 Ashley Mannix, Christopher Armstrong, Dylan DPC, Hunar Roop Kahlon - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `html5ever 0.38.0`, `markup5ever 0.38.0`, `web_atoms 0.2.5` - -```text -Copyright (c) 2014 The html5ever Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `dbus 0.9.12`, `libdbus-sys 0.2.7` - -```text -Copyright (c) 2014-2018 David Henningsson and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -``` - -### MIT License - -Applies to: `flate2 1.1.9` - -```text -Copyright (c) 2014-2026 Alex Crichton - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `hyper 1.11.0` - -```text -Copyright (c) 2014-2026 Sean McArthur - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -``` - -### MIT License - -Applies to: `serde_with 3.21.0`, `serde_with_macros 3.21.0` - -```text -Copyright (c) 2015 - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `plist 1.10.0` - -```text -Copyright (c) 2015 Edward Barnard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -``` - -### MIT License - -Applies to: `new_debug_unreachable 1.0.6` - -```text -Copyright (c) 2015 Jonathan Reem - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `tendril 0.5.1` - -```text -Copyright (c) 2015 Keegan McAllister - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `tempfile 3.27.0` - -```text -Copyright (c) 2015 Steven Allen - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `heck 0.4.1`, `heck 0.5.0`, `unicode-segmentation 1.13.3` - -```text -Copyright (c) 2015 The Rust Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `jni-sys 0.3.1`, `jni-sys 0.4.1` - -```text -Copyright (c) 2015 The rust-jni-sys Developers - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `png 0.17.16`, `png 0.18.1` - -```text -Copyright (c) 2015 nwin - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `winapi 0.3.9` - -```text -Copyright (c) 2015-2018 The winapi-rs Developers - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `httparse 1.10.1` - -```text -Copyright (c) 2015-2025 Sean McArthur - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -``` - -### MIT License - -Applies to: `futures-channel 0.3.33`, `futures-core 0.3.33`, `futures-executor 0.3.33`, `futures-io 0.3.33`, `futures-macro 0.3.33`, `futures-sink 0.3.33`, `futures-task 0.3.33`, `futures-util 0.3.33` - -```text -Copyright (c) 2016 Alex Crichton -Copyright (c) 2017 The Tokio Authors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `hashbrown 0.17.1` - -```text -Copyright (c) 2016 Amanieu d'Antras - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `webkit2gtk-sys 2.0.2` - -```text -Copyright (c) 2016 Boucher, Antoni - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `webkit2gtk 2.0.2` - -```text -Copyright (c) 2016 Boucher, Antoni -Copyright (c) 2017-2021, The Gtk-rs Project Developers. -Copyright (c) 2021, Tauri Programme within The Commons Conservancy - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `rustls 0.23.46` - -```text -Copyright (c) 2016 Joseph Birr-Pixton - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `lock_api 0.4.14`, `parking_lot 0.12.5`, `parking_lot_core 0.9.12` - -```text -Copyright (c) 2016 The Rust Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `indexmap 2.14.0` - -```text -Copyright (c) 2016--2017 - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `equivalent 1.0.2` - -```text -Copyright (c) 2016--2023 - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `scopeguard 1.2.0` - -```text -Copyright (c) 2016-2019 Ulrik Sverdrup "bluss" and scopeguard developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `reqwest 0.13.4` - -```text -Copyright (c) 2016-2026 Sean McArthur - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -``` - -### MIT License - -Applies to: `digest 0.10.7` - -```text -Copyright (c) 2017 Artyom Pavlov - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `fnv 1.0.7` - -```text -Copyright (c) 2017 Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `memoffset 0.9.1` - -```text -Copyright (c) 2017 Gilad Naaman - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -``` - -### MIT License - -Applies to: `enumflags2_derive 0.7.12` - -```text -Copyright (c) 2017 Maik Klein - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `keyboard-types 0.7.0` - -```text -Copyright (c) 2017 Pyfisch - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -``` - -### MIT License - -Applies to: `redox_syscall 0.5.18` - -```text -Copyright (c) 2017 Redox OS Developers - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `stable_deref_trait 1.2.1` - -```text -Copyright (c) 2017 Robert Grosse - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. -``` - -### MIT License - -Applies to: `cookie 0.18.1` - -```text -Copyright (c) 2017 Sergio Benitez -Copyright (c) 2014 Alex Crichton - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `foreign-types-macros 0.2.4`, `foreign-types-shared 0.3.1`, `foreign-types 0.5.0` - -```text -Copyright (c) 2017 The foreign-types Developers - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `http 1.4.2` - -```text -Copyright (c) 2017 http-rs authors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `signal-hook-registry 1.4.8` - -```text -Copyright (c) 2017 tokio-jsonrpc developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `io-kit-sys 0.5.0` - -```text -Copyright (c) 2017-2018 Junji Takakura - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `enumflags2 0.7.12` - -```text -Copyright (c) 2017-2023 Maik Klein, Maja Kądziołka - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `bytes 1.12.1` - -```text -Copyright (c) 2018 Carl Lerche - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `smallvec 1.15.2` - -```text -Copyright (c) 2018 The Servo Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `want 0.3.1` - -```text -Copyright (c) 2018-2019 Sean McArthur - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -``` - -### MIT License - -Applies to: `block-buffer 0.10.4` - -```text -Copyright (c) 2018-2019 The RustCrypto Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `dirs-sys 0.5.0`, `dirs 6.0.0` - -```text -Copyright (c) 2018-2019 dirs-rs contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `try-lock 0.2.5` - -```text -Copyright (c) 2018-2023 Sean McArthur -Copyright (c) 2016 Alex Crichton - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -``` - -### MIT License - -Applies to: `getrandom 0.2.17` - -```text -Copyright (c) 2018-2024 The rust-random Project Developers -Copyright (c) 2014 The Rust Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `getrandom 0.3.4` - -```text -Copyright (c) 2018-2025 The rust-random Project Developers -Copyright (c) 2014 The Rust Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `zeroize 1.9.0` - -```text -Copyright (c) 2018-2026 The RustCrypto Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `getrandom 0.4.3` - -```text -Copyright (c) 2018-2026 The rust-random Project Developers -Copyright (c) 2014 The Rust Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `slab 0.4.12` - -```text -Copyright (c) 2019 Carl Lerche - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `bumpalo 3.20.3` - -```text -Copyright (c) 2019 Nick Fitzgerald - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `mach2 0.5.0` - -```text -Copyright (c) 2019 Nick Fitzgerald, 2021 Yuki Okushi - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `tracing-attributes 0.1.31`, `tracing-core 0.1.36`, `tracing 0.1.44` - -```text -Copyright (c) 2019 Tokio Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `tower-layer 0.3.3`, `tower-service 0.3.3`, `tower 0.5.3` - -```text -Copyright (c) 2019 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `tower-http 0.6.11` - -```text -Copyright (c) 2019-2021 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `http-body-util 0.1.4`, `http-body 1.1.0` - -```text -Copyright (c) 2019-2026 Sean McArthur & Hyper Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `cpufeatures 0.2.17` - -```text -Copyright (c) 2020-2025 The RustCrypto Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `crypto-common 0.1.7` - -```text -Copyright (c) 2021 RustCrypto Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `rustls-pki-types 1.15.1` - -```text -Copyright (c) 2023 Dirkjan Ochtman - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `powerfmt 0.2.0` - -```text -Copyright (c) 2023 Jacob Pratt et al. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `bit-set 0.8.0`, `bit-vec 0.8.0` - -```text -Copyright (c) 2023 The Rust Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `swift-rs 1.0.7` - -```text -Copyright (c) 2023 The swift-rs Developers - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `hyper-util 0.1.20` - -```text -Copyright (c) 2023-2025 Sean McArthur - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -``` - -### MIT License - -Applies to: `deranged 0.5.8` - -```text -Copyright (c) 2024 Jacob Pratt et al. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `zbus 5.18.0`, `zbus_macros 5.18.0`, `zbus_names 4.3.4`, `zvariant 5.13.1`, `zvariant_derive 5.13.1` - -```text -Copyright (c) 2024 Zeeshan Ali Khan & zbus contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `serde_spanned 1.1.1`, `toml 1.1.3+spec-1.1.0`, `toml_datetime 1.1.1+spec-1.1.0`, `toml_edit 0.19.15`, `toml_edit 0.20.2`, `toml_edit 0.25.13+spec-1.1.0`, `toml_parser 1.1.2+spec-1.1.0`, `toml_writer 1.1.2+spec-1.1.0` - -```text -Copyright (c) Individual contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `num-conv 0.2.2` - -```text -Copyright (c) Jacob Pratt - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `time-core 0.1.9`, `time-macros 0.2.32`, `time 0.3.54` - -```text -Copyright (c) Jacob Pratt et al. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `libc 0.2.189` - -```text -Copyright (c) The Rust Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `idna_adapter 1.2.2` - -```text -Copyright (c) The rust-url developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `synstructure 0.13.2` - -```text -Copyright 2016 Nika Layzell - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `ipnet 2.12.0` - -```text -Copyright 2017 Juniper Networks, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `softbuffer 0.4.8` - -```text -Copyright 2022 Kirill Chibisov - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `ureq-proto 0.6.0` - -```text -Copyright 2022 Martin Algesten - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `utf8_iter 1.0.4` - -```text -Copyright Mozilla Foundation - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `field-offset 0.3.6` - -```text -MIT License - -Copyright (c) 2016-2021 Diggory Blake, and other contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `precomputed-hash 0.1.1` - -```text -MIT License - -Copyright (c) 2017 Emilio Cobos Álvarez - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `json-patch 3.0.1` - -```text -MIT License - -Copyright (c) 2017 Ivan Dubrov - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `cfb 0.7.3` - -```text -MIT License - -Copyright (c) 2017 Matthew D. Steele - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `darling 0.23.0`, `darling_core 0.23.0`, `darling_macro 0.23.0` - -```text -MIT License - -Copyright (c) 2017 Ted Driggs - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `ico 0.5.0` - -```text -MIT License - -Copyright (c) 2018 Matthew D. Steele - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `crc32fast 1.5.0` - -```text -MIT License - -Copyright (c) 2018 Sam Rijs, Alex Crichton and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `infer 0.19.0` - -```text -MIT License - -Copyright (c) 2019 Bojan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `bytemuck 1.25.2` - -```text -MIT License - -Copyright (c) 2019 Daniel "Lokathor" Gee. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `schemars 0.8.22`, `schemars_derive 0.8.22` - -```text -MIT License - -Copyright (c) 2019 Graham Esau - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `ureq 3.3.0` - -```text -MIT License - -Copyright (c) 2019 Martin Algesten - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `raw-window-handle 0.6.2` - -```text -MIT License - -Copyright (c) 2019 Osspial - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `tokio-macros 2.7.1` - -```text -MIT License - -Copyright (c) 2019 Yoshua Wuyts -Copyright (c) Tokio Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `proc-macro-error-attr 1.0.4`, `proc-macro-error 1.0.4` - -```text -MIT License - -Copyright (c) 2019-2020 CreepySkeleton - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `embed_plist 1.2.2` - -```text -MIT License - -Copyright (c) 2020 Nikolai Vazquez - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `window-vibrancy 0.6.0` - -```text -MIT License - -Copyright (c) 2020-2022 Tauri Programme within The Commons Conservancy - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `wry 0.55.1` - -```text -MIT License - -Copyright (c) 2020-2023 Ngo Iok Ui & Tauri Programme within The Commons Conservancy - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `serialize-to-javascript-impl 0.1.2`, `serialize-to-javascript 0.1.2` - -```text -MIT License - -Copyright (c) 2021 Chip Reed - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `urlpattern 0.3.0` - -```text -MIT License - -Copyright (c) 2021 the Deno authors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `rfd 0.16.0` - -```text -MIT License - -Copyright (c) 2022 Bartłomiej Maryńczak - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `jsonptr 0.6.3` - -```text -MIT License - -Copyright (c) 2022 Chance Dinkins - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `muda 0.19.3` - -```text -MIT License - -Copyright (c) 2022-2022 Tauri Programme within The Commons Conservancy - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `libredox 0.1.18` - -```text -MIT License - -Copyright (c) 2023 4lDO2 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `dom_query 0.27.0` - -```text -MIT License - -Copyright (c) 2023 Mykola Humanov - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---- - -This project contains portions of code and architectural concepts originally -derived from the "nipper" project (https://github.com/importcjj/nipper), -developed by Chen Jiaju, licensed under the MIT License and the Apache License 2.0 (dual licensed). -``` - -### MIT License - -Applies to: `is-docker 0.2.0`, `is-wsl 0.4.0` - -```text -MIT License - -Copyright (c) 2023 Sean Larkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `block2 0.6.2`, `brotli-decompressor 5.0.3`, `cesu8 1.1.0`, `dispatch2 0.3.1`, `dlopen2 0.8.2`, `dlopen2_derive 0.4.3`, `dpi 0.1.2`, `jni-sys-macros 0.4.1`, `ndk-sys 0.6.0+11769913`, `ndk 0.9.0`, `objc2-app-kit 0.3.2`, `objc2-cloud-kit 0.3.2`, `objc2-core-data 0.3.2`, `objc2-core-foundation 0.3.2`, `objc2-core-graphics 0.3.2`, `objc2-core-image 0.3.2`, `objc2-core-location 0.3.2`, `objc2-core-text 0.3.2`, `objc2-encode 4.1.0`, `objc2-exception-helper 0.1.1`, `objc2-foundation 0.3.2`, `objc2-quartz-core 0.3.2`, `objc2-ui-kit 0.3.2`, `objc2-user-notifications 0.3.2`, `objc2-web-kit 0.3.2`, `objc2 0.6.4`, `r-efi 5.3.0`, `r-efi 6.0.0`, `siphasher 1.0.3`, `tao-macros 0.1.3`, `tauri-codegen 2.6.3`, `tauri-macros 2.6.3`, `tauri-plugin-dialog 2.7.2`, `tauri-plugin-fs 2.5.1`, `tauri-plugin-opener 2.5.4`, `tauri-runtime-wry 2.11.4`, `tauri-runtime 2.11.3`, `tauri-utils 2.9.3`, `tauri 2.11.5`, `unic-char-property 0.9.0`, `unic-char-range 0.9.0`, `unic-common 0.9.0`, `unic-ucd-ident 0.9.0`, `unic-ucd-version 0.9.0`, `webview2-com-macros 0.8.1`, `webview2-com-sys 0.38.2`, `webview2-com 0.38.2`, `winapi-i686-pc-windows-gnu 0.4.0`, `winapi-x86_64-pc-windows-gnu 0.4.0`, `windows-collections 0.2.0`, `windows-core 0.61.2`, `windows-future 0.2.1`, `windows-implement 0.60.2`, `windows-interface 0.59.3`, `windows-link 0.1.3`, `windows-link 0.2.1`, `windows-numerics 0.2.0`, `windows-result 0.3.4`, `windows-strings 0.4.2`, `windows-sys 0.45.0`, `windows-sys 0.52.0`, `windows-sys 0.59.0`, `windows-sys 0.60.2`, `windows-sys 0.61.2`, `windows-targets 0.42.2`, `windows-targets 0.52.6`, `windows-targets 0.53.5`, `windows-threading 0.1.0`, `windows-version 0.1.7`, `windows 0.61.3`, `windows_aarch64_gnullvm 0.42.2`, `windows_aarch64_gnullvm 0.52.6`, `windows_aarch64_gnullvm 0.53.1`, `windows_aarch64_msvc 0.42.2`, `windows_aarch64_msvc 0.52.6`, `windows_aarch64_msvc 0.53.1`, `windows_i686_gnu 0.42.2`, `windows_i686_gnu 0.52.6`, `windows_i686_gnu 0.53.1`, `windows_i686_gnullvm 0.52.6`, `windows_i686_gnullvm 0.53.1`, `windows_i686_msvc 0.42.2`, `windows_i686_msvc 0.52.6`, `windows_i686_msvc 0.53.1`, `windows_x86_64_gnu 0.42.2`, `windows_x86_64_gnu 0.52.6`, `windows_x86_64_gnu 0.53.1`, `windows_x86_64_gnullvm 0.42.2`, `windows_x86_64_gnullvm 0.52.6`, `windows_x86_64_gnullvm 0.53.1`, `windows_x86_64_msvc 0.42.2`, `windows_x86_64_msvc 0.52.6`, `windows_x86_64_msvc 0.53.1` - -```text -MIT License - -Copyright (c) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and -associated documentation files (the "Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO -EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `tokio-util 0.7.19`, `tokio 1.53.3` - -```text -MIT License - -Copyright (c) Tokio Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `simd-adler32 0.3.10` - -```text -MIT License - -Copyright (c) [2021] [Marvin Countryman] - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `miniz_oxide 0.8.9` - -```text -MIT License - -Copyright 2013-2014 RAD Game Tools and Valve Software -Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC -Copyright (c) 2017 Frommi -Copyright (c) 2017-2024 oyvindln - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `fdeflate 0.3.7` - -```text -MIT License - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `ident_case 1.0.1` - -```text -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `async-recursion 1.1.1`, `rustc-hash 2.1.3` - -```text -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. -``` - -### MIT License - -Applies to: `adler2 2.0.1`, `anyhow 1.0.104`, `async-channel 2.5.0`, `async-executor 1.14.1`, `async-io 2.6.0`, `async-lock 3.4.2`, `async-process 2.5.0`, `async-signal 0.2.14`, `async-task 4.7.1`, `async-trait 0.1.91`, `atomic-waker 1.1.2`, `blocking 1.6.2`, `camino 1.2.4`, `cargo-platform 0.1.9`, `cargo_metadata 0.19.2`, `concurrent-queue 2.5.0`, `displaydoc 0.2.6`, `dtoa 1.0.11`, `dyn-clone 1.0.20`, `endi 1.1.1`, `erased-serde 0.4.10`, `event-listener-strategy 0.5.4`, `event-listener 5.4.1`, `fastrand 2.5.0`, `futures-lite 2.6.1`, `hermit-abi 0.5.2`, `itoa 1.0.18`, `linux-raw-sys 0.12.1`, `num_enum 0.7.6`, `num_enum_derive 0.7.6`, `nusb 0.2.5`, `once_cell 1.21.4`, `ordered-stream 0.2.0`, `parking 2.2.1`, `pin-project-lite 0.2.17`, `piper 0.2.5`, `polling 3.11.0`, `proc-macro-crate 1.3.1`, `proc-macro-crate 2.0.2`, `proc-macro-crate 3.5.0`, `proc-macro2 1.0.107`, `quote 1.0.47`, `rustix 1.1.4`, `rustversion 1.0.23`, `semver 1.0.28`, `serde-untagged 0.1.9`, `serde 1.0.229`, `serde_core 1.0.229`, `serde_derive 1.0.229`, `serde_derive_internals 0.29.1`, `serde_json 1.0.151`, `serde_repr 0.1.21`, `servo_arc 0.4.3`, `syn 1.0.109`, `syn 2.0.119`, `syn 3.0.3`, `thiserror-impl 1.0.69`, `thiserror-impl 2.0.19`, `thiserror 1.0.69`, `thiserror 2.0.19`, `typeid 1.0.3`, `unicode-ident 1.0.24`, `utf8-zero 0.8.1`, `wasi 0.11.1+wasi-snapshot-preview1`, `wasip2 1.0.4+wasi-0.2.12`, `wasm-streams 0.5.0`, `wit-bindgen 0.57.1`, `x11-dl 2.21.0`, `x11 2.21.0`, `zmij 1.0.23`, `zvariant_utils 3.5.0` - -```text -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `winnow 0.5.40`, `winnow 1.0.4` - -```text -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `atk-sys 0.18.2`, `atk 0.18.2`, `cairo-rs 0.18.5`, `cairo-sys-rs 0.18.2`, `gdk-pixbuf-sys 0.18.0`, `gdk-pixbuf 0.18.5`, `gdk-sys 0.18.2`, `gdk 0.18.2`, `gdkwayland-sys 0.18.2`, `gdkx11-sys 0.18.2`, `gdkx11 0.18.2`, `gio-sys 0.18.1`, `gio 0.18.4`, `glib-macros 0.18.5`, `glib-sys 0.18.1`, `glib 0.18.5`, `gobject-sys 0.18.0`, `gtk-sys 0.18.2`, `gtk3-macros 0.18.2`, `gtk 0.18.2`, `pango-sys 0.18.0`, `pango 0.18.3` - -```text -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `ctor-proc-macro 0.0.7`, `ctor 0.8.0` - -```text -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -``` - -### MIT License - -Applies to: `javascriptcore-rs-sys 1.1.1`, `soup3-sys 0.5.0`, `soup3 0.5.0` - -```text -The MIT License (MIT) - -Copyright (c) 2013-2017, The Gtk-rs Project Developers. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `javascriptcore-rs 1.1.2` - -```text -The MIT License (MIT) - -Copyright (c) 2013-2021, The Gtk-rs Project Developers. -Copyright (c) 2021, Tauri Programme within The Commons Conservancy. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `typenum 1.20.1` - -```text -The MIT License (MIT) - -Copyright (c) 2014 Paho Lurie-Gregg - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `phf 0.13.1`, `phf_generator 0.13.1`, `phf_macros 0.13.1`, `phf_shared 0.13.1` - -```text -The MIT License (MIT) - -Copyright (c) 2014-2022 Steven Fackler, Yuki Okushi - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `base64 0.21.7`, `base64 0.22.1` - -```text -The MIT License (MIT) - -Copyright (c) 2015 Alice Maz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -``` - -### MIT License - -Applies to: `aho-corasick 1.1.4`, `byteorder 1.5.0`, `memchr 2.8.3`, `walkdir 2.5.0` - -```text -The MIT License (MIT) - -Copyright (c) 2015 Andrew Gallant - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -``` - -### MIT License - -Applies to: `strsim 0.11.1` - -```text -The MIT License (MIT) - -Copyright (c) 2015 Danny Guo -Copyright (c) 2016 Titus Wormer -Copyright (c) 2018 Akash Kurdekar - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `combine 4.6.7` - -```text -The MIT License (MIT) - -Copyright (c) 2015 Markus Westerlind - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -``` - -### MIT License - -Applies to: `derive_more-impl 2.1.1`, `derive_more 2.1.1` - -```text -The MIT License (MIT) - -Copyright (c) 2016 Jelte Fennema - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `jni 0.21.1` - -```text -The MIT License (MIT) - -Copyright (c) 2016 Prevoty, Inc. and jni-rs contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `same-file 1.0.6`, `winapi-util 0.1.11` - -```text -The MIT License (MIT) - -Copyright (c) 2017 Andrew Gallant - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -``` - -### MIT License - -Applies to: `redox_users 0.5.2` - -```text -The MIT License (MIT) - -Copyright (c) 2017 Jose Narvaez - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `crossbeam-channel 0.5.16`, `crossbeam-utils 0.8.22` - -```text -The MIT License (MIT) - -Copyright (c) 2019 The Crossbeam Project Developers - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `async-broadcast 0.7.2` - -```text -The MIT License (MIT) - -Copyright (c) 2020 Yoshua Wuyts - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -``` - -### MIT License - -Applies to: `open 5.4.0` - -```text -The MIT License (MIT) -===================== - -Copyright © `2015` `Sebastian Thiel` - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the “Software”), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -``` - -### MIT License - -Applies to: `generic-array 0.14.7` - -```text -The MIT License (MIT) - -Copyright (c) 2015 Bartłomiej Kamiński - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -``` - -### MIT License - -Applies to: `quick-xml 0.41.0` - -```text -The MIT License (MIT) - -Copyright (c) 2016 Johann Tuffe - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -``` - -### Mozilla Public License 2.0 - -Applies to: `dtoa-short 0.3.5` - -```text -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. - -``` - -### Mozilla Public License 2.0 - -Applies to: `cssparser-macros 0.6.1`, `cssparser 0.36.0` - -```text -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. - -``` - -### Mozilla Public License 2.0 - -Applies to: `option-ext 0.2.0`, `selectors 0.36.1` - -```text -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at https://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. - -``` - -### Unicode License v3 - -Applies to: `unicode-ident 1.0.24` - -```text -UNICODE LICENSE V3 - -COPYRIGHT AND PERMISSION NOTICE - -Copyright © 1991-2023 Unicode, Inc. - -NOTICE TO USER: Carefully read the following legal agreement. BY -DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR -SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE -TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT -DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of data files and any associated documentation (the "Data Files") or -software and any associated documentation (the "Software") to deal in the -Data Files or Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, and/or sell -copies of the Data Files or Software, and to permit persons to whom the -Data Files or Software are furnished to do so, provided that either (a) -this copyright and permission notice appear with all copies of the Data -Files or Software, or (b) this copyright and permission notice appear in -associated Documentation. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF -THIRD PARTY RIGHTS. - -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE -BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA -FILES OR SOFTWARE. - -Except as contained in this notice, the name of a copyright holder shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in these Data Files or Software without prior written -authorization of the copyright holder. - -``` - -### Unicode License v3 - -Applies to: `icu_collections 2.2.0`, `icu_locale_core 2.2.0`, `icu_normalizer 2.2.0`, `icu_normalizer_data 2.2.0`, `icu_properties 2.2.0`, `icu_properties_data 2.2.0`, `icu_provider 2.2.0`, `litemap 0.8.2`, `potential_utf 0.1.5`, `tinystr 0.8.3`, `writeable 0.6.3`, `yoke-derive 0.8.2`, `yoke 0.8.3`, `zerofrom-derive 0.1.7`, `zerofrom 0.1.8`, `zerotrie 0.2.4`, `zerovec-derive 0.11.3`, `zerovec 0.11.6` - -```text -UNICODE LICENSE V3 - -COPYRIGHT AND PERMISSION NOTICE - -Copyright © 2020-2024 Unicode, Inc. - -NOTICE TO USER: Carefully read the following legal agreement. BY -DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR -SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE -TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT -DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of data files and any associated documentation (the "Data Files") or -software and any associated documentation (the "Software") to deal in the -Data Files or Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, and/or sell -copies of the Data Files or Software, and to permit persons to whom the -Data Files or Software are furnished to do so, provided that either (a) -this copyright and permission notice appear with all copies of the Data -Files or Software, or (b) this copyright and permission notice appear in -associated Documentation. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF -THIRD PARTY RIGHTS. - -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE -BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA -FILES OR SOFTWARE. - -Except as contained in this notice, the name of a copyright holder shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in these Data Files or Software without prior written -authorization of the copyright holder. - -SPDX-License-Identifier: Unicode-3.0 - -— - -Portions of ICU4X may have been adapted from ICU4C and/or ICU4J. -ICU 1.8.1 to ICU 57.1 © 1995-2016 International Business Machines Corporation and others. - -``` - -### zlib License - -Applies to: `foldhash 0.2.0` - -```text -Copyright (c) 2024 Orson Peters - -This software is provided 'as-is', without any express or implied warranty. In -no event will the authors be held liable for any damages arising from the use of -this software. - -Permission is granted to anyone to use this software for any purpose, including -commercial applications, and to alter it and redistribute it freely, subject to -the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim - that you wrote the original software. If you use this software in a product, - an acknowledgment in the product documentation would be appreciated but is - not required. - -2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. -``` - ## iOS route library (`planner-service`) _the static library that the iOS companion links for offline routing. The app carries this file. The list has all crates of the library, also the crates that the app link removes._ diff --git a/tools/licenses/deny.toml b/tools/licenses/deny.toml index c3e13a04bc..9a965b37a0 100644 --- a/tools/licenses/deny.toml +++ b/tools/licenses/deny.toml @@ -2,17 +2,14 @@ # standalone obc-fw-nrf54l board crate). Run from the repo root against each lockfile: # cargo deny --all-features --config tools/licenses/deny.toml check # cargo deny --manifest-path firmware/obc-fw-nrf54l/Cargo.toml --all-features --config tools/licenses/deny.toml check -# cargo deny --manifest-path builder/desktop/Cargo.toml --all-features --config tools/licenses/deny.toml check # Checks advisories (RustSec), licenses, banned crates, and dependency sources. # # ONE THING THIS FILE CANNOT SEE, so it is written down here (#907): `geos-src` # declares MIT — that is the licence of the *wrapper crate*, not of the GEOS C++ -# sources it carries, which are **LGPL-2.1**. The desktop app statically links them, -# which is fine (LGPL-2.1 §3 permits GPL-2-or-later, and this project is GPL-3) but -# is not free of obligations: a distributed binary has to come with the licence text -# and the corresponding source. D3 (#908) owns the installers and therefore owns -# putting that in them. Nothing changed about *which* code we link — the dynamic -# build carried the same library — only about it now being inside the artifact. +# sources it carries, which are **LGPL-2.1**. Linking them is fine (LGPL-2.1 §3 +# permits GPL-2-or-later, and this project is GPL-3) but is not free of obligations: +# a distributed binary that links them has to come with the licence text and the +# corresponding source. [graph] # Resolve every feature so feature-gated deps (debug-link, the sim's eframe stack...) are @@ -76,9 +73,9 @@ exceptions = [ { crate = "epaint_default_fonts", allow = ["OFL-1.1", "LicenseRef-UFL-1.0"] }, # Mozilla's CA root store, as data, under the Community Data License Agreement # (permissive — attribution only, no copyleft on anything that uses it). Reached - # through ureq's rustls in the desktop app (#906), which needs a trust store to - # fetch Geofabrik over TLS. Scoped to the crate rather than allowing CDLA - # globally: this is the only place a *data* licence is appropriate. + # through ureq's rustls, which needs a trust store for TLS. Scoped to the crate + # rather than allowing CDLA globally: this is the only place a *data* licence is + # appropriate. { crate = "webpki-roots", allow = ["CDLA-Permissive-2.0"] }, ] diff --git a/tools/licenses/gen-third-party.sh b/tools/licenses/gen-third-party.sh index 9341f4c51f..2f58a76838 100755 --- a/tools/licenses/gen-third-party.sh +++ b/tools/licenses/gen-third-party.sh @@ -41,7 +41,6 @@ fi ARTIFACTS=( "Device firmware (\`UPDATE.BIN\`)|firmware/obc-fw-nrf54l/Cargo.toml|the image the device runs, and the one served from updates.openbikecomputer.com" "Bootloader (\`obc-boot\`)|firmware/obc-boot/Cargo.toml|flashed once at manufacture; it installs the image above" - "Desktop application|builder/desktop/Cargo.toml|the Rust half of the desktop app — its web half ships its own notices beside the bundle" "iOS route library (\`planner-service\`)|planner/service/Cargo.toml|the static library that the iOS companion links for offline routing. The app carries this file. The list has all crates of the library, also the crates that the app link removes|aarch64-apple-ios|--no-default-features" "Linux routing service (\`planner-service\`, \`x86_64-unknown-linux-gnu\`)|planner/service/Cargo.toml|the HTTP executable in the stored routing runtime|x86_64-unknown-linux-gnu" "Linux routing service (\`planner-service\`, \`aarch64-unknown-linux-gnu\`)|planner/service/Cargo.toml|the HTTP executable in the stored routing runtime|aarch64-unknown-linux-gnu" @@ -91,13 +90,11 @@ trap 'rm -f "$tmp"' EXIT echo "separate GPL-3.0-only crate, and an \`obc-data\` binary that links them is GPL-3.0-only as a" echo "whole." echo - echo "GEOS deserves a line, because deny.toml's note about it predates the current tree:" - echo "\`geos-src\` declares MIT for the *wrapper* while the C++ sources it carries are" - echo "**LGPL-2.1**, and that obligation follows whatever links them. Today nothing" - echo "distributed does — GEOS is reached only through \`obc-pack\`, a host tool shipped as" - echo "source, and \`cargo tree -e normal\` finds no \`geos\` in the desktop app's graph, which" - echo "is why no section below carries an LGPL text. Should a packaged artifact ever link it," - echo "the LGPL text and the corresponding source have to travel in that package." + echo "GEOS deserves a line: \`geos-src\` declares MIT for the *wrapper* while the C++ sources" + echo "it carries are **LGPL-2.1**, and that obligation follows whatever links them. Today" + echo "nothing distributed does — GEOS is reached only through \`obc-pack\`, a host tool shipped" + echo "as source, which is why no section below carries an LGPL text. Should a packaged artifact" + echo "ever link it, the LGPL text and the corresponding source have to travel in that package." echo for entry in "${ARTIFACTS[@]}"; do diff --git a/tools/obc.bash b/tools/obc.bash index dcd3ecec31..bc457ee880 100644 --- a/tools/obc.bash +++ b/tools/obc.bash @@ -41,7 +41,7 @@ _obc_tasks() { [[ -f "$justfile" ]] || justfile="$t/justfile" python3 "$t/tasks.py" --justfile "$justfile" --names "${scope[@]}" 2>/dev/null && return fi - echo "fixtures sim board flash flash-boot uart debug rtt pack bake web site desktop test fmt licenses check clean doctor setup" + echo "fixtures sim board flash flash-boot uart debug rtt pack bake web site test fmt licenses check clean doctor setup" } _obc_fixture_ids() { @@ -116,8 +116,6 @@ _obc() { 1) compopt -o filenames 2>/dev/null; _obc_reply < <(compgen -W "$(_obc_presets)" -- "$cur"; compgen -f -X '!*.json' -- "$cur") ;; *) compopt -o filenames 2>/dev/null; _obc_reply < <(compgen -f -- "$cur") ;; esac ;; - desktop) - _obc_reply < <(compgen -W "dev build" -- "$cur") ;; board) (( idx == 0 )) && _obc_reply < <(compgen -W "doctor run download attach reset" -- "$cur") ;; flash-boot) diff --git a/tools/ready.py b/tools/ready.py index 14900c2c60..8271b4eb2f 100644 --- a/tools/ready.py +++ b/tools/ready.py @@ -48,7 +48,6 @@ "cargo clippy --locked --lib --tests -- -D warnings", "cargo clippy --locked --features device --bin obc-sensor-sim --target thumbv8m.main-none-eabihf -- -D warnings", ), - "builder/desktop": ("cargo clippy --release --all-targets --locked -- -D warnings",), } #: Paths that make `obc suites check` necessary, beside the test policy `test_plan` already names. diff --git a/tools/test_plan.py b/tools/test_plan.py index 185816e0a4..da50038f78 100644 --- a/tools/test_plan.py +++ b/tools/test_plan.py @@ -36,7 +36,6 @@ "firmware/obc-fw-nrf54l", "firmware/obc-boot", "firmware/obc-sensor-sim", - "builder/desktop", ) @dataclass(frozen=True) @@ -75,8 +74,6 @@ class Job: "web-browser": Job(needs=("selection", "wasm-bridges")), "verification": Job(needs=("selection",)), "planner-search": Job(needs=("selection",)), - "desktop-frontend": Job(needs=("selection", "wasm-bridges")), - "desktop": Job(needs=("selection", "desktop-frontend"), roots=("builder/desktop",)), } # The job that evaluates the plan. It is never a route for the work it reports. @@ -92,7 +89,7 @@ class Job: "board": ("embedded", "boot"), "deny": ("deny",), "wasm": ("wasm", "wasm-bridges"), - "frontend": ("web", "desktop-frontend"), + "frontend": ("web",), "docs": ("docs",), } @@ -739,7 +736,6 @@ def host_platform() -> str: "wasm": ("sim/web-demo/tests/browser",), "web": ("builder/web",), "web-browser": ("builder/web", "builder/web/tests/browser"), - "desktop-frontend": ("builder/web",), "verification": ("tools/verification",), "planner-search": ("planner/search", "planner/tiles"), } @@ -1009,7 +1005,6 @@ def validate_workflow(root: Path) -> list[str]: "tools/testing/suites.toml", "builder/web/src/lib/example.ts", "companion-ios/Packages/OBCKit/Sources/OBCFormats/example.swift", - "builder/desktop/src/main.rs", "docs/index.md", ) diff --git a/tools/testing/prose-baseline.json b/tools/testing/prose-baseline.json index 84d9b1f847..dc4a08e961 100644 --- a/tools/testing/prose-baseline.json +++ b/tools/testing/prose-baseline.json @@ -2,7 +2,6 @@ ".github/CONTRIBUTING.md": 106, "AGENTS.md": 1152, "README.md": 974, - "builder/desktop/README.md": 580, "builder/tests/corpus/README.md": 115, "builder/wasm/README.md": 66, "builder/web/src/components/data/README.md": 213, diff --git a/tools/testing/suites.toml b/tools/testing/suites.toml index 0bc4739dc5..fc056fdf71 100644 --- a/tools/testing/suites.toml +++ b/tools/testing/suites.toml @@ -184,12 +184,6 @@ name = "obc-boot" command = "cargo build --manifest-path firmware/obc-boot/Cargo.toml --release --locked" platforms = ["linux"] -[[package]] -name = "obc-desktop" -command = "cargo test --manifest-path builder/desktop/Cargo.toml --release --locked" -# A web change reaches the shell only as the bundle that desktop-frontend builds and checks. -triggers = ["planner/search/place-kinds.json"] - # ── Suites no Cargo package owns ──────────────────────────────────────────── [[suite]] @@ -232,8 +226,7 @@ triggers = [ ] # The whole app is the subject, the bridge fixture is the input, and the shared catalog -# generator is what publishes it. The schema examples are not here: this catalog is cut -# from the bridge fixture, and only the desktop smoke reads the examples. +# generator is what publishes it. This catalog is cut from the bridge fixture. [[suite]] id = "web.verification" route = "ordinary" @@ -490,7 +483,7 @@ triggers = [ id = "ci.rust-workspace-tests" route = "ordinary" command = "obc check test" -jobs = ["desktop", "test"] +jobs = ["test"] foundation = true triggers = ["Cargo.toml", "Cargo.lock", "rust-toolchain.toml", "tools/fixtures.py"] @@ -514,7 +507,7 @@ triggers = [".rustfmt.toml"] id = "ci.rust-clippy" route = "ordinary" command = "obc check clippy" -jobs = ["boot", "clippy", "desktop", "embedded"] +jobs = ["boot", "clippy", "embedded"] foundation = true triggers = ["Cargo.toml", "Cargo.lock", "rust-toolchain.toml"] @@ -522,7 +515,7 @@ triggers = ["Cargo.toml", "Cargo.lock", "rust-toolchain.toml"] id = "ci.rust-builds" route = "ordinary" command = "obc check device board wasm" -jobs = ["boot", "builder-python", "desktop", "device", "embedded", "ui-snapshots", "wasm"] +jobs = ["boot", "builder-python", "device", "embedded", "ui-snapshots", "wasm"] foundation = true triggers = ["Cargo.toml", "Cargo.lock", "rust-toolchain.toml", "tools/install-riscv.sh"] @@ -597,7 +590,7 @@ triggers = [ id = "ci.web-build" route = "ordinary" command = "obc check frontend" -jobs = ["desktop-frontend", "web"] +jobs = ["web"] triggers = ["planner/search/place-kinds.json", "docs/assets/theme.css", "docs/assets/fonts/**", "builder/web/package.json", "builder/web/package-lock.json", "builder/web/src/**"] [[suite]] @@ -829,12 +822,6 @@ triggers = [ "fixtures/sources/peak-view/peak-articles-source.json", ] -[[suite]] -id = "manual.desktop-linux-launch" -route = "manual" -command = "xvfb-run -a dbus-run-session -- uv run --locked --group desktop-e2e python builder/desktop/e2e/launch.py" -platforms = ["linux"] - [[suite]] id = "manual.obc-link" route = "manual" diff --git a/tools/tests/test_ci_aggregate.py b/tools/tests/test_ci_aggregate.py index f425831857..ffb196d7ac 100644 --- a/tools/tests/test_ci_aggregate.py +++ b/tools/tests/test_ci_aggregate.py @@ -15,11 +15,11 @@ import test_plan -ALL_JOBS = ("selection", "policy", "test", "wasm-bridges", "web", "desktop-frontend", "desktop") +ALL_JOBS = ("selection", "policy", "test", "wasm-bridges", "web", "bundle", "shell") UPSTREAM = { "web": ("selection", "wasm-bridges"), - "desktop-frontend": ("selection", "wasm-bridges"), - "desktop": ("selection", "desktop-frontend"), + "bundle": ("selection", "wasm-bridges"), + "shell": ("selection", "bundle"), } @@ -122,10 +122,10 @@ def test_a_failed_selection_job_publishes_no_plan(self): aggregate._json_argument(None, "OBC_SELECTION_PLAN") def test_every_routed_job_of_a_selected_suite_must_run(self): - selected = suite("rust.multi", True, ("test", "desktop")) - result = evaluate(plan(selected), needs(desktop="skipped")) + selected = suite("rust.multi", True, ("test", "shell")) + result = evaluate(plan(selected), needs(shell="skipped")) self.assertEqual(result.suites[0].state, "selected but not run") - self.assertIn("desktop", result.suites[0].reason) + self.assertIn("shell", result.suites[0].reason) def test_upstream_failure_is_distinct_from_skipped_required_work(self): job_results = needs(wasm_bridges="failure", web="skipped") @@ -140,26 +140,26 @@ def test_upstream_failure_is_distinct_from_skipped_required_work(self): self.assertEqual(result.suites[0].state, "selected but not run") def test_blocking_producer_is_found_two_hops_up(self): - # wasm-bridges -> desktop-frontend -> desktop: the failure is not a direct `needs` entry. - job_results = needs(wasm_bridges="failure", desktop_frontend="skipped", desktop="skipped") - result = evaluate(plan(suite("desktop.contract", True, ("desktop",))), job_results) + # wasm-bridges -> bundle -> shell: the failure is not a direct `needs` entry. + job_results = needs(wasm_bridges="failure", bundle="skipped", shell="skipped") + result = evaluate(plan(suite("shell.contract", True, ("shell",))), job_results) self.assertEqual(result.suites[0].state, "blocked by an upstream failure") self.assertIn("wasm-bridges", result.suites[0].reason) def test_unknown_terminal_results_fail_and_block_downstream_work(self): for terminal in ("abandoned", "unknown"): with self.subTest(result=terminal): - job_results = needs(wasm_bridges=terminal, desktop_frontend="skipped", desktop="skipped") - result = evaluate(plan(suite("desktop.contract", True, ("desktop",))), job_results) + job_results = needs(wasm_bridges=terminal, bundle="skipped", shell="skipped") + result = evaluate(plan(suite("shell.contract", True, ("shell",))), job_results) self.assertEqual(result.suites[0].state, "blocked by an upstream failure") self.assertIn("wasm-bridges", result.global_failures) self.assertFalse(result.passed) def test_blocked_state_when_a_downstream_job_is_skipped(self): - job_results = needs(desktop_frontend="failure", desktop="skipped") - result = evaluate(plan(suite("desktop.contract", True, ("desktop",))), job_results) + job_results = needs(bundle="failure", shell="skipped") + result = evaluate(plan(suite("shell.contract", True, ("shell",))), job_results) self.assertEqual(result.suites[0].state, "blocked by an upstream failure") - self.assertIn("desktop-frontend", result.global_failures) + self.assertIn("bundle", result.global_failures) def test_always_run_policy_job_must_succeed(self): result = evaluate(plan(suite("ci.policy", True, ("policy",))), needs(policy="skipped")) @@ -176,7 +176,7 @@ def test_summary_lists_every_suite_and_reason(self): def test_upstream_relation_is_the_job_table(self): relation = aggregate.upstream_jobs() self.assertEqual(relation["web"], ("selection", "wasm-bridges")) - self.assertEqual(relation["desktop"], ("selection", "desktop-frontend")) + self.assertEqual(relation["web-browser"], ("selection", "wasm-bridges")) def test_shipped_plan_shape_feeds_the_aggregate(self): """The selector's own JSON is what the gate consumes; no second routing table exists.""" diff --git a/tools/tests/test_ready.py b/tools/tests/test_ready.py index 5413869138..b32eadcafd 100644 --- a/tools/tests/test_ready.py +++ b/tools/tests/test_ready.py @@ -228,7 +228,7 @@ def test_the_free_command_rule_reads_every_executable_a_command_names(self): ("python3 a.py & cargo build --release", False), ("python3 a.py\ncargo build --release", False), ("cd builder/web && npm test", False), - ("xvfb-run -a dbus-run-session -- python3 builder/desktop/e2e/launch.py", False), + ("xvfb-run -a dbus-run-session -- python3 a.py", False), ): self.assertEqual(ready.builds_nothing(command), free, command) diff --git a/tools/tests/test_selection_plan.py b/tools/tests/test_selection_plan.py index 71dfd109fd..6a34335935 100644 --- a/tools/tests/test_selection_plan.py +++ b/tools/tests/test_selection_plan.py @@ -440,7 +440,6 @@ def test_every_package_reaches_the_jobs_that_compile_it(self) -> None: "obc-crc": ["clippy", "fmt", "test"], "obc-fw-nrf54l": ["embedded", "fmt"], "obc-boot": ["boot", "fmt"], - "obc-desktop": ["desktop", "fmt"], "obc-builder-bridge": ["clippy", "fmt", "test", "wasm-bridges"], "obc-web-demo": ["clippy", "fmt", "test", "wasm"], "obc-pack": ["builder-python", "clippy", "fmt", "test"], @@ -466,33 +465,28 @@ def test_selected_job_set_per_change_class(self) -> None: ( "foundational Rust crate", ["firmware/obc-crc/src/lib.rs"], - ["boot", "builder-python", "cairn", "clippy", "desktop", "desktop-frontend", "device", "embedded", "fmt", "ios-app", "ios-release", "ios-unit", "test", "ui-snapshots", "wasm", "wasm-bridges"], + ["boot", "builder-python", "cairn", "clippy", "device", "embedded", "fmt", "ios-app", "ios-release", "ios-unit", "test", "ui-snapshots", "wasm", "wasm-bridges"], ), ( "shared vectors", ["specs/vectors/obcm-v2.json"], ["clippy", "device", "fmt", "ios-unit", "test", "wasm-bridges", "web"], ), - ( - "desktop launch harness", - ["builder/desktop/e2e/launch.py"], - ["cairn", "desktop", "desktop-frontend", "fmt", "wasm-bridges"], - ), ("iOS application", ["companion-ios/OBCCompanion/App.swift"], ["cairn", "ios-app", "ios-release"]), ( "web only", ["builder/web/src/lib/panel.ts"], - ["cairn", "desktop-frontend", "wasm-bridges", "web", "web-browser"], + ["cairn", "wasm-bridges", "web", "web-browser"], ), ( "workflow", [".github/workflows/ci.yml"], - ["boot", "builder-python", "cairn", "clippy", "deny", "desktop", "desktop-frontend", "device", "docs", "embedded", "fmt", "ios-app", "ios-release", "ios-unit", "planner-search", "test", "ui-snapshots", "verification", "wasm", "wasm-bridges", "web", "web-browser"], + ["boot", "builder-python", "cairn", "clippy", "deny", "device", "docs", "embedded", "fmt", "ios-app", "ios-release", "ios-unit", "planner-search", "test", "ui-snapshots", "verification", "wasm", "wasm-bridges", "web", "web-browser"], ), ( "nextest configuration", [".config/nextest.toml"], - ["boot", "builder-python", "cairn", "clippy", "deny", "desktop", "desktop-frontend", "device", "docs", "embedded", "fmt", "planner-search", "test", "ui-snapshots", "verification", "wasm", "wasm-bridges", "web", "web-browser"], + ["boot", "builder-python", "cairn", "clippy", "deny", "device", "docs", "embedded", "fmt", "planner-search", "test", "ui-snapshots", "verification", "wasm", "wasm-bridges", "web", "web-browser"], ), ("web demo crate", ["sim/web-demo/src/lib.rs"], ["cairn", "clippy", "fmt", "test", "wasm"]), ("web demo Trunk target", ["docs/index.html"], ["docs", "wasm", "wasm-bridges"]), @@ -509,7 +503,7 @@ def test_selected_job_set_per_change_class(self) -> None: ( "repository tooling", ["tools/fixtures.py"], - ["cairn", "desktop", "desktop-frontend", "test", "wasm-bridges"], + ["cairn", "test"], ), ] for name, paths, expected in cases: @@ -529,7 +523,7 @@ def test_a_foundation_change_selects_the_whole_relevant_graph(self) -> None: for path in ("Cargo.toml", "Cargo.lock", "rust-toolchain.toml", ".rustfmt.toml", ".cargo/config.toml"): with self.subTest(path=path): self.assertLessEqual( - {"boot", "clippy", "desktop", "device", "embedded", "fmt", "test", "wasm", "wasm-bridges"}, + {"boot", "clippy", "device", "embedded", "fmt", "test", "wasm", "wasm-bridges"}, set(self.jobs_for(path)), ) diff --git a/tools/verification/ops/download_reports.py b/tools/verification/ops/download_reports.py index 946bd359dd..b692f5b29d 100644 --- a/tools/verification/ops/download_reports.py +++ b/tools/verification/ops/download_reports.py @@ -14,7 +14,7 @@ pages = json.loads(subprocess.check_output([ "gh", "api", f"repos/{repo}/actions/runs/{run_id}/artifacts?per_page=100", "--paginate", "--slurp" ])) -pattern = re.compile(r"(?:rust-(?:test|fixtures)|python-.+|web-.+|desktop-tests-.+|ios-tests-coverage)-" + re.escape(attempt)) +pattern = re.compile(r"(?:rust-(?:test|fixtures)|python-.+|web-.+|ios-tests-coverage)-" + re.escape(attempt)) for artifact in (artifact for page in pages for artifact in page["artifacts"]): name = artifact["name"] if not pattern.fullmatch(name): diff --git a/tools/verification/ops/import_results.py b/tools/verification/ops/import_results.py index 8b6876df99..e5d550f50f 100644 --- a/tools/verification/ops/import_results.py +++ b/tools/verification/ops/import_results.py @@ -11,7 +11,7 @@ import uuid import xml.etree.ElementTree as ET -ARTIFACT = re.compile(r"(?:rust-(?:test|fixtures)|python-.+|web-.+|desktop-tests-.+|ios-tests-coverage)-[0-9]+") +ARTIFACT = re.compile(r"(?:rust-(?:test|fixtures)|python-.+|web-.+|ios-tests-coverage)-[0-9]+") ASSETS = {"UPDATE.BIN", "manifest.json", "SHA256SUMS.txt", "obc-boot.elf", "obc-fw-nrf54l.elf"} diff --git a/uv.lock b/uv.lock index eb32644b21..733dd7e670 100644 --- a/uv.lock +++ b/uv.lock @@ -2,9 +2,6 @@ version = 1 revision = 3 requires-python = ">=3.14" conflicts = [[ - { package = "openbikecomputer-tools", group = "desktop-e2e" }, - { package = "openbikecomputer-tools", group = "search-training" }, -], [ { package = "openbikecomputer-tools", group = "dev" }, { package = "openbikecomputer-tools", group = "search-runtime" }, ], [ @@ -54,25 +51,13 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/99/91/8acff4f5e50511b911bbccb72b8628a49c68ce14148cd9f6431094859a90/annotated_types-0.8.0-py3-none-any.whl", hash = "sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0", size = 13427, upload-time = "2026-07-23T20:16:12.938Z" }, ] -[[package]] -name = "anyio" -version = "4.14.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "idna", marker = "extra == 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/61/cc/a381afa6efea9f496eff839d4a6a1aed3bfafc7b3ab4b0d1b243a12573dd/anyio-4.14.2.tar.gz", hash = "sha256:cfa139f3ed1a23ee8f88a145ddb5ac7605b8bbfd8592baacd7ce3d8bb4313c7f", size = 260176, upload-time = "2026-07-12T20:29:07.082Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/da/35/f2287558c17e29fafc8ef3daf819bb9834061cfa43bff8014f7df7f63bdc/anyio-4.14.2-py3-none-any.whl", hash = "sha256:9f505dda5ac9f0c8309b5e8bd445a8c2bf7246f3ce950121e45ea15bc41d1494", size = 125813, upload-time = "2026-07-12T20:29:05.763Z" }, -] - [[package]] name = "anyio" version = "4.15.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "idna" }, - { name = "typing-extensions", version = "4.16.0", source = { registry = "https://pypi.org/simple" }, marker = "(python_full_version < '3.15' and extra != 'group-22-openbikecomputer-tools-desktop-e2e') or (extra == 'group-22-openbikecomputer-tools-desktop-e2e' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, + { name = "typing-extensions", marker = "python_full_version < '3.15' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, ] sdist = { url = "https://files.pythonhosted.org/packages/a9/d2/f4d173e22df740bc37b1db102b386ba719b66e95b0f0d751f556b387e6d2/anyio-4.15.1.tar.gz", hash = "sha256:9f28306018cbd6d329e64a36d58256edff76dd996fe423bc957326e578b82a94", size = 276966, upload-time = "2026-09-05T10:42:39.44Z" } wheels = [ @@ -115,65 +100,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", size = 136983, upload-time = "2026-07-22T03:35:11.276Z" }, ] -[[package]] -name = "cffi" -version = "2.1.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pycparser", marker = "implementation_name != 'PyPy' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test')" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/9e/ef/008a1939e372c06329a3fce4279c02f328488f3526744906eeec3da7ad5f/cffi-2.1.1.tar.gz", hash = "sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be", size = 530807, upload-time = "2026-08-03T21:21:18.939Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d3/7b/d6bbf82b8b96e7391438898c42f5bd96dd02030fd5b64937d248220003e2/cffi-2.1.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:7dbb61fe3a7699468030f71bbe5f8a0e326a151daa91beb11a6fc1f980c55e1c", size = 194064, upload-time = "2026-08-03T21:20:17.148Z" }, - { url = "https://files.pythonhosted.org/packages/94/e6/bcc91b283be94735e268487a054004f0aa19947b6348fa367db53230abc8/cffi-2.1.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:f24fb43132a4c6b4cb4eb029492919b2db645be6808d738f244fd146c03c32cb", size = 196720, upload-time = "2026-08-03T21:20:18.268Z" }, - { url = "https://files.pythonhosted.org/packages/d9/99/c4b0c17cacdc9c3b8f280026286a9826d6a208c0f047591a3c3ce99b91fd/cffi-2.1.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d28630f5854ab07ab1fd4aba756de52326c82e6be15d414b12793f1975048b54", size = 184964, upload-time = "2026-08-03T21:20:19.708Z" }, - { url = "https://files.pythonhosted.org/packages/b3/a9/9db617d05d7367c1ad0ab00b3aa6e6f9281edd689b4ee9ea0e5a84e89c97/cffi-2.1.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:661c298b4821edebead0c91edd2b00374d67ad7c5a1f7a91d4442633b79d6a72", size = 184962, upload-time = "2026-08-03T21:20:20.833Z" }, - { url = "https://files.pythonhosted.org/packages/67/b8/b42132ca113dc567d37684437b46ca1dafc885902b02a110a02d5b511857/cffi-2.1.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:58acb8ab8e295e6c5ea12f888cbb13cf21511ef2a3303a23f4325c29d17fe5c1", size = 222328, upload-time = "2026-08-03T21:20:22.118Z" }, - { url = "https://files.pythonhosted.org/packages/80/10/c5c0cbf0a657aecf59ef511409734230bf556f05a0d6c9eed7aa5c0a0166/cffi-2.1.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:456a61fa52d579ebf9df2e9552ead5129855dbaff6c1e5a9b1bc408809bdc062", size = 209985, upload-time = "2026-08-03T21:20:23.401Z" }, - { url = "https://files.pythonhosted.org/packages/d5/6c/bfa0b87b03b9238148beca990292843c9396ba069b54496596594173de7b/cffi-2.1.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:a4f00aa42f75d6e4595e8866e748cc1705adc0cddfeb2ca86d0d03993d63ba03", size = 208530, upload-time = "2026-08-03T21:20:24.628Z" }, - { url = "https://files.pythonhosted.org/packages/e9/02/4e7d553a7ac4b4238b38b3c1b80d486e9d4436f8d2acbf87a0997fe3f402/cffi-2.1.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b0431303acaea1089ad4b3e9ce4e6518193def1118d4073ca848635ee4ea2e96", size = 221525, upload-time = "2026-08-03T21:20:25.758Z" }, - { url = "https://files.pythonhosted.org/packages/82/1d/a4aaf9babd75acb4d5f223bff71533bee748dd770a382619a798960ee9ba/cffi-2.1.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:64faea20f4e2613363a1a9b9c7dd73058f3ecd00133a511e72ad7c511658f527", size = 225053, upload-time = "2026-08-03T21:20:26.985Z" }, - { url = "https://files.pythonhosted.org/packages/81/10/5dc0e7bdd18e22107054288283380fc97a06ae3f1656a106908d666a3c88/cffi-2.1.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5c58fe613dc5e5336357eff555824a314d8e43282600435c8d1cb6a7a2fedd13", size = 223213, upload-time = "2026-08-03T21:20:28.277Z" }, - { url = "https://files.pythonhosted.org/packages/0b/e9/d0061c364cde06ee43168a0d076ac1da512cbc380d44767b844ba34fe2b6/cffi-2.1.1-cp314-cp314-win32.whl", hash = "sha256:1a18a57b58cfb21fc28d72e876acf10eaed67a1ed96226f92af4df681d571c4c", size = 177682, upload-time = "2026-08-03T21:20:44.288Z" }, - { url = "https://files.pythonhosted.org/packages/a7/06/1c3e01e3ba14c39f6d10bfbac52753b7e22259e38088e5cfe1d704918690/cffi-2.1.1-cp314-cp314-win_amd64.whl", hash = "sha256:3222ba5d678f80a030e6afbcc33dc1ae5cb45facabb61cee2c7016b8432fde48", size = 187949, upload-time = "2026-08-03T21:20:45.623Z" }, - { url = "https://files.pythonhosted.org/packages/87/5b/da4e39efe18eeb89cf580ea9cfc66b6a7c3eadb808fc0cc1d3a295cb5a5d/cffi-2.1.1-cp314-cp314-win_arm64.whl", hash = "sha256:ab36d55f9ed2d067327667c2fea18dda018eb628dd6347aa01dda6cf1f5d3836", size = 182947, upload-time = "2026-08-03T21:20:46.955Z" }, - { url = "https://files.pythonhosted.org/packages/23/59/40338bf421c5accea1d45158170c87006ef1cd371b05c077e76476949728/cffi-2.1.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:7750c6449dff7864bb9bb27ddfb0267756189201a3afc911d82b3caacd70dfc3", size = 188504, upload-time = "2026-08-03T21:20:29.495Z" }, - { url = "https://files.pythonhosted.org/packages/7d/47/5ecf1023850036e674c77ec4de86182d309ae344e39e7cba984b7df5d647/cffi-2.1.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0beceaabe56af686895136a2de78db54ecd8e4046b236b8fd6d6cb61389e9bf2", size = 188259, upload-time = "2026-08-03T21:20:31.291Z" }, - { url = "https://files.pythonhosted.org/packages/2a/9c/92934c3bea9f785b23eba304538c0b4d37a2a96d2431eb3a1bc87a11aa19/cffi-2.1.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:49cbc70e6542d4ccccb936558d1064a8012541e78f821f955cff24e357776c94", size = 223864, upload-time = "2026-08-03T21:20:32.571Z" }, - { url = "https://files.pythonhosted.org/packages/4d/45/ba4c93527bc38616a8bd36488acb69a2212d60486794f0c1f318949bbb76/cffi-2.1.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:e2d65b31f36619cda3999b78b2aa9632e76b78448e7a56fc4240824200e7c4fc", size = 211538, upload-time = "2026-08-03T21:20:33.808Z" }, - { url = "https://files.pythonhosted.org/packages/80/e9/b6ef565e452acb932fb0cb5443f44a78efbd1233e566f02b5a83855e9115/cffi-2.1.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:28907ab9bfb6aa13184cfc17c6b8e1023c5ab6fd7076d8c20a35e59fe04f8f29", size = 210688, upload-time = "2026-08-03T21:20:34.974Z" }, - { url = "https://files.pythonhosted.org/packages/9a/95/eff5f0cee78d2eabc7eebffec40d3fc1876b5f3c95582e018bb4b99601f2/cffi-2.1.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:51b31d1c98274844cfd7838ce00bfc27c7423a4dc00fc0772fc3331c2cc90676", size = 223803, upload-time = "2026-08-03T21:20:36.564Z" }, - { url = "https://files.pythonhosted.org/packages/fa/01/579d39fb8bef00a335a23d83757b44feb24cd6345a2c451b64cb67b9c362/cffi-2.1.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e7cecbaadb83884793e05828cee59b210b24583b9c7425d0ba6a754fe22eb4e", size = 226763, upload-time = "2026-08-03T21:20:37.816Z" }, - { url = "https://files.pythonhosted.org/packages/8d/b0/0b44f47c60b01b57b6e2bbd92343f13a85a1d93bc46ccf6e47e244acd99c/cffi-2.1.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:25792eac27877609e7bb06d42ff88278a6624fff2ba9bbb523c09616b117e80f", size = 225688, upload-time = "2026-08-03T21:20:38.959Z" }, - { url = "https://files.pythonhosted.org/packages/eb/d2/3b7176cb570a1d3e27faf67b72f591af508036e0d8b2be2ef9af9e8c84bb/cffi-2.1.1-cp314-cp314t-win32.whl", hash = "sha256:8ef53b2de9bcb9197d31854256575d59dbac0cba72ac627bb291ef5eceb74be4", size = 182868, upload-time = "2026-08-03T21:20:40.388Z" }, - { url = "https://files.pythonhosted.org/packages/56/78/31f00c1bcd97c9bbf55f1bfdf5bc809a5de8887473e90bb9960dca825e80/cffi-2.1.1-cp314-cp314t-win_amd64.whl", hash = "sha256:616f097f2fe415bc92a247f02e11f634e1f9e9a83d327e3c915c15089c87869e", size = 194104, upload-time = "2026-08-03T21:20:41.725Z" }, - { url = "https://files.pythonhosted.org/packages/7b/1b/58496f2ed0a35de575250c02a43ab3cc2c04d494a88fed31c1cabc0fd176/cffi-2.1.1-cp314-cp314t-win_arm64.whl", hash = "sha256:ad2c86c495b899d862ea0f4b42891b8713a3bd45dd4105c7fd51c2a72f39f3a5", size = 186402, upload-time = "2026-08-03T21:20:43.042Z" }, - { url = "https://files.pythonhosted.org/packages/c1/8f/9ebe220eab48a093d1a5a5e339ab0dc7316eef3bb04d63c42f0251b61f50/cffi-2.1.1-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:dddad92b554513a31f272570678ba307fb9f618f05e3d4a5eacafff9eae03e1d", size = 194043, upload-time = "2026-08-03T21:20:48.179Z" }, - { url = "https://files.pythonhosted.org/packages/ff/69/844bad3ece306c4782c2ecb93597035b6690d48704b803914c199da1e8b3/cffi-2.1.1-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:da0e573f9f97159390c89d9f1a9e41908b66d408cc5b58d08cf3847d844c531b", size = 196737, upload-time = "2026-08-03T21:20:49.457Z" }, - { url = "https://files.pythonhosted.org/packages/1b/8a/af668013284634733f02d683458a0728739c7d6ddb5e14cb0c20832266fe/cffi-2.1.1-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:fb92203a88b3d3053034db775110081c49d28be6551923805e039924093761e4", size = 184933, upload-time = "2026-08-03T21:20:50.639Z" }, - { url = "https://files.pythonhosted.org/packages/0c/75/2f5207ff6d1a613133b23a5203cc0c2a628313b5eb3974d7956ae3c57950/cffi-2.1.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:2ae64be792b8966f2c69538199728b290e34726562896df1e5dc8ffd8d8188e8", size = 185002, upload-time = "2026-08-03T21:20:52.173Z" }, - { url = "https://files.pythonhosted.org/packages/e2/31/9e1313b0a6e30e91b3b3d3fff51ae99c857c07738e3afcce1f7334e1b7ab/cffi-2.1.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:507a24c282e0f42f8ed737cf048572cbf580468da5555764a8331735e9c736b6", size = 222271, upload-time = "2026-08-03T21:20:53.462Z" }, - { url = "https://files.pythonhosted.org/packages/50/e3/f6234a833e6e08c7007003074723c406559eecf9b48dfc97471e5a8eb7a0/cffi-2.1.1-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:246fa40ce8645a614ff682e0b70f37134e460eaf93a775e0cbe3cca585a67a80", size = 209919, upload-time = "2026-08-03T21:20:54.783Z" }, - { url = "https://files.pythonhosted.org/packages/0d/fc/5f74e293fced6edb51af3a46c4ccf6c23c9943774ecb375ddbd522c76add/cffi-2.1.1-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:471cee653ae88de62096552e6d24ccb4a5adb8c8c9f10b5054d0122c15bf2779", size = 208529, upload-time = "2026-08-03T21:20:56.066Z" }, - { url = "https://files.pythonhosted.org/packages/44/16/29e6d01b388bef055ecd6ca8244b3f4d336bd09e92d5d892187b9601084e/cffi-2.1.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:aeae0e330c9f6acd681f647d46cefd30c29f93e3392882e792e82080c9691399", size = 221630, upload-time = "2026-08-03T21:20:57.336Z" }, - { url = "https://files.pythonhosted.org/packages/a4/18/fa7f1f6857d5eb88a4ca99ffcbfb7c387a287ccc154c64a73e86314745d7/cffi-2.1.1-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:42a494cee34437f05546455144f2b5d9ac09b1face62bcfce597d2e521066688", size = 225134, upload-time = "2026-08-03T21:20:58.675Z" }, - { url = "https://files.pythonhosted.org/packages/e0/9f/e8e3dfa04a1b4c241f8c91faacad872b4d4efd051d49764ad4e2fd4b9fea/cffi-2.1.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:cc572dace3f60ef98d7b12ff411d20f5362feb31a0439eab0085bbfd349982d7", size = 223197, upload-time = "2026-08-03T21:20:59.968Z" }, - { url = "https://files.pythonhosted.org/packages/f8/7e/8debeb04f1ab9fe2a6963964cd6f1aaf7192627b83926586a6a4e089c9fa/cffi-2.1.1-cp315-cp315-win32.whl", hash = "sha256:4f42141fc14250de6dde5ee7ea4432be017252d91f19c5ad043c084cea629cac", size = 177683, upload-time = "2026-08-03T21:21:14.901Z" }, - { url = "https://files.pythonhosted.org/packages/e0/31/5158704cc474ab65c1647932e88be78dc0873f47130e253be38bcaf13d01/cffi-2.1.1-cp315-cp315-win_amd64.whl", hash = "sha256:e6e8cff14d6fb0be70a09c0bdc58096f501952d04624ebf867e0e56da2df8960", size = 187897, upload-time = "2026-08-03T21:21:16.108Z" }, - { url = "https://files.pythonhosted.org/packages/cc/4b/b3a2da8570c704ffc0f9762cdc3ec0f02c8573798e0b5cf7f11c82bbb70f/cffi-2.1.1-cp315-cp315-win_arm64.whl", hash = "sha256:27350daa11d4f10c540e6e89dada4c54feb7256ad03e9a4dc075ebad7ba360d1", size = 182935, upload-time = "2026-08-03T21:21:17.271Z" }, - { url = "https://files.pythonhosted.org/packages/d0/ef/5443574510a1207e6f6bc38ba6e1f1de36cb48fef07b2728bb896a21f430/cffi-2.1.1-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:c26608d2222fb1e94487e4a387d85f13eb55d5ed725cb25a0c589ac4ee60e7bc", size = 188464, upload-time = "2026-08-03T21:21:01.163Z" }, - { url = "https://files.pythonhosted.org/packages/7e/ae/a56fa8c4686ad50e148fcbc8d3ae0d03915ff5c30d795058988c24118cef/cffi-2.1.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:4be96343e422f2dfcd12ab5c9f5aebe03f82f737c6bffeca6830b3875cb44aab", size = 188262, upload-time = "2026-08-03T21:21:02.382Z" }, - { url = "https://files.pythonhosted.org/packages/53/b2/6187f46f2912276a3ae284076109cc5c8680482f11f766ccf26db4a86427/cffi-2.1.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:937c0052c05a31ca1daf18de3158eed4dbfcb9cc107adbea227728d647be701e", size = 223779, upload-time = "2026-08-03T21:21:03.553Z" }, - { url = "https://files.pythonhosted.org/packages/8a/f6/c3ad28bd19f77047a03084424fbd4cbe997303267c14423737324be0385d/cffi-2.1.1-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:df423d40ee8654634421812bc3b196da3f9bd7d32929da813f8394c4348a5358", size = 211520, upload-time = "2026-08-03T21:21:04.863Z" }, - { url = "https://files.pythonhosted.org/packages/a0/cd/ccac9013a5bd9fd764de118674ab9c805b5ca10c19270d90ee273f8b2240/cffi-2.1.1-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:a730a083190634c65cca36ba5f489531576ebd79bcd5c8e172130f6453127231", size = 210673, upload-time = "2026-08-03T21:21:06.223Z" }, - { url = "https://files.pythonhosted.org/packages/52/86/2976131c639aead931c5bee5aba67e4b09fbeb8018b6f282f70803f923a7/cffi-2.1.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:363e05fa78e15116c3c32c210ee36884fd6b9afa6d440e47112c3bd511d64cb6", size = 223835, upload-time = "2026-08-03T21:21:07.539Z" }, - { url = "https://files.pythonhosted.org/packages/ac/0c/33a7aeab2f9c76918c52e084beb39c570db3588133412929e8ec06fab90b/cffi-2.1.1-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:770de9db11e84213beec501cfcaa013b019820ca881e03344dea5844f7876d94", size = 226705, upload-time = "2026-08-03T21:21:08.774Z" }, - { url = "https://files.pythonhosted.org/packages/e3/26/2cde30fdde421130bfc18f70395731a6e6b2053c6a1978a5258ff04e72fa/cffi-2.1.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:7da0c5eff80f0197f3b3d1232ec5a682a9325f4ae9016a78f5f5ca35f9ced1f5", size = 225539, upload-time = "2026-08-03T21:21:09.911Z" }, - { url = "https://files.pythonhosted.org/packages/6d/cd/a361394c94b2129d604bb846f624a8e88255a3ee33129c434a00d715e64f/cffi-2.1.1-cp315-cp315t-win32.whl", hash = "sha256:06c72bb76605a4b0cd0aad6930b69d4baf7dd5d806cfc409b824191099700e66", size = 182707, upload-time = "2026-08-03T21:21:11.226Z" }, - { url = "https://files.pythonhosted.org/packages/9b/b5/ba2b299993c26577d529b6ae29841f9e15b9fcf004d65f423f4fcf94ade9/cffi-2.1.1-cp315-cp315t-win_amd64.whl", hash = "sha256:d9c275eaacd24aa73f94ffd6de08fc3f932424d8b6c376f4bed7cde376fe7bc3", size = 193772, upload-time = "2026-08-03T21:21:12.39Z" }, - { url = "https://files.pythonhosted.org/packages/aa/29/35e016098c814cd93de9cd320c66b5bfba14dc6ecedd3cb518fa7c408c69/cffi-2.1.1-cp315-cp315t-win_arm64.whl", hash = "sha256:d18e5ac0f2f03f4f518d3e23db0f0cad7faa1da8620e9c09461d443bbf6e6692", size = 186360, upload-time = "2026-08-03T21:21:13.636Z" }, -] - [[package]] name = "charset-normalizer" version = "3.5.2" @@ -370,10 +296,8 @@ dependencies = [ { name = "opentelemetry-api" }, { name = "pydantic" }, { name = "starlette" }, - { name = "typing-extensions", version = "4.14.1", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, - { name = "typing-extensions", version = "4.16.0", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-search-training' or extra != 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test')" }, - { name = "typing-inspection", version = "0.4.2", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, - { name = "typing-inspection", version = "0.4.4", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-search-training' or extra != 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test')" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, ] sdist = { url = "https://files.pythonhosted.org/packages/56/4f/f7c30a73127e0a8bbffe788369b8359e530b01ae06e2757936fa35bc5e6d/fastapi-0.142.2.tar.gz", hash = "sha256:06366626f2e70576367714d9ab2fe8472e6c8456dba69b399f9f797ab5e92570", size = 466721, upload-time = "2026-09-30T09:51:11.277Z" } wheels = [ @@ -506,8 +430,7 @@ name = "httpx" version = "0.28.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "anyio", version = "4.14.2", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, - { name = "anyio", version = "4.15.1", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-search-training' or extra != 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test')" }, + { name = "anyio" }, { name = "certifi" }, { name = "httpcore" }, { name = "idna" }, @@ -525,13 +448,12 @@ dependencies = [ { name = "click" }, { name = "filelock" }, { name = "fsspec" }, - { name = "hf-xet", marker = "(platform_machine != 'AMD64' and platform_machine != 'aarch64' and platform_machine != 'amd64' and platform_machine != 'arm64' and platform_machine != 'x86_64' and extra == 'group-22-openbikecomputer-tools-desktop-e2e' and extra == 'group-22-openbikecomputer-tools-search-training') or (platform_machine == 'AMD64' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (platform_machine == 'AMD64' and extra == 'group-22-openbikecomputer-tools-search-training') or (platform_machine == 'aarch64' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (platform_machine == 'aarch64' and extra == 'group-22-openbikecomputer-tools-search-training') or (platform_machine == 'amd64' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (platform_machine == 'amd64' and extra == 'group-22-openbikecomputer-tools-search-training') or (platform_machine == 'arm64' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (platform_machine == 'arm64' and extra == 'group-22-openbikecomputer-tools-search-training') or (platform_machine == 'x86_64' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (platform_machine == 'x86_64' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, + { name = "hf-xet", marker = "platform_machine == 'AMD64' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'arm64' or platform_machine == 'x86_64'" }, { name = "httpx" }, { name = "packaging" }, { name = "pyyaml", version = "6.0.3", source = { registry = "https://pypi.org/simple" } }, { name = "tqdm" }, - { name = "typing-extensions", version = "4.14.1", source = { registry = "https://pypi.org/simple" }, marker = "(extra == 'group-22-openbikecomputer-tools-desktop-e2e' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-desktop-e2e' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, - { name = "typing-extensions", version = "4.16.0", source = { registry = "https://pypi.org/simple" }, marker = "(extra == 'group-22-openbikecomputer-tools-desktop-e2e' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra != 'group-22-openbikecomputer-tools-desktop-e2e' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra != 'group-22-openbikecomputer-tools-search-runtime' and extra == 'group-22-openbikecomputer-tools-search-training')" }, + { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/25/2a/484d112c0d8fc5f665d7b65137ac9cdb2953c982391598c3597968a12ee7/huggingface_hub-1.33.0.tar.gz", hash = "sha256:367be21a201db9523eddf8aeac7048f2602c1b308691c97640d5e72ed188007e", size = 1043548, upload-time = "2026-09-24T09:49:29.971Z" } wheels = [ @@ -798,8 +720,7 @@ version = "0.17.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "numpy" }, - { name = "typing-extensions", version = "4.14.1", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, - { name = "typing-extensions", version = "4.16.0", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-search-training' or extra != 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test')" }, + { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/dd/ec/260cdb6304868de6db14eb31064bd2735c0200bcb3331d6b4c9e9be02a03/numcodecs-0.17.0.tar.gz", hash = "sha256:e8db2e337bdafd3bb5f891a2543b53b2b36a509ce9d587af2846db3715b6c8b9", size = 6288352, upload-time = "2026-09-17T18:12:42.262Z" } wheels = [ @@ -1039,7 +960,7 @@ dependencies = [ { name = "ml-dtypes" }, { name = "numpy" }, { name = "protobuf" }, - { name = "typing-extensions", version = "4.16.0", source = { registry = "https://pypi.org/simple" } }, + { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/29/3a/b73bfb8f506a7b5be43eebf71dbdd351c4116f8100e1103a91bfcbcd3502/onnx-1.23.0.tar.gz", hash = "sha256:3f4b7323ea3397c63aa6ff5d43abe16013ffefc0a96cb8a0be6527ff1e1add40", size = 6022619, upload-time = "2026-09-18T19:30:37.511Z" } wheels = [ @@ -1066,7 +987,7 @@ dependencies = [ { name = "numpy" }, { name = "onnx" }, { name = "sympy" }, - { name = "typing-extensions", version = "4.16.0", source = { registry = "https://pypi.org/simple" } }, + { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/d6/c2/61194cec0dbc5622273c0ebd592d37cc1dca0d7f1a744f02edd45ac905a3/onnx_ir-1.0.0.tar.gz", hash = "sha256:9e261f25fde8da9612ae5cb43b3b374d5ff469c04af0363cad588b2bb000b812", size = 163121, upload-time = "2026-08-11T14:49:46.895Z" } wheels = [ @@ -1103,7 +1024,7 @@ dependencies = [ { name = "onnx" }, { name = "onnx-ir" }, { name = "packaging" }, - { name = "typing-extensions", version = "4.16.0", source = { registry = "https://pypi.org/simple" } }, + { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/0a/01/3e3fab8d643ca097ea4aa9e51246643699dfaaa0650589744fe44bc46651/onnxscript-0.7.2.tar.gz", hash = "sha256:2c664f6383d10f332a4d47b2876dcab16dba84909fe703656b19abc281fda165", size = 646719, upload-time = "2026-09-09T17:06:44.567Z" } wheels = [ @@ -1126,9 +1047,6 @@ builder-test = [ { name = "pytest" }, { name = "uvicorn", extra = ["standard"] }, ] -desktop-e2e = [ - { name = "selenium" }, -] dev = [ { name = "pyyaml", version = "6.0.2", source = { registry = "https://pypi.org/simple" } }, { name = "unittest-xml-reporting" }, @@ -1186,7 +1104,7 @@ search-test = [ ] search-training = [ { name = "annotated-doc" }, - { name = "anyio", version = "4.15.1", source = { registry = "https://pypi.org/simple" } }, + { name = "anyio" }, { name = "brotli" }, { name = "certifi" }, { name = "click" }, @@ -1229,7 +1147,7 @@ search-training = [ { name = "tqdm" }, { name = "transformers" }, { name = "typer" }, - { name = "typing-extensions", version = "4.16.0", source = { registry = "https://pypi.org/simple" } }, + { name = "typing-extensions" }, ] terrain-reference = [ { name = "numpy" }, @@ -1266,7 +1184,6 @@ builder-test = [ { name = "pytest", specifier = ">=8.0.0" }, { name = "uvicorn", extras = ["standard"], specifier = ">=0.27.0" }, ] -desktop-e2e = [{ name = "selenium", specifier = "==4.35.0" }] dev = [ { name = "pyyaml", specifier = "==6.0.2" }, { name = "unittest-xml-reporting", specifier = "==4.0.0" }, @@ -1416,8 +1333,7 @@ name = "opentelemetry-api" version = "1.45.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions", version = "4.14.1", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, - { name = "typing-extensions", version = "4.16.0", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-search-training' or extra != 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test')" }, + { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/1f/dc/e12c1fe1ed8a7b7149777127b1a0e12ce5bd5a81d97408bedc2128c260f5/opentelemetry_api-1.45.0.tar.gz", hash = "sha256:711ede81773c8025c2c03dac0450bc89f3d30aea6eabcc815c570d4e35a963f7", size = 72115, upload-time = "2026-09-25T12:32:28.399Z" } wheels = [ @@ -1489,18 +1405,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/77/68/a361417130394327dad254f6e88926ba982c4deccbad0130ded0c68c7a3f/osmium-4.3.2-cp315-cp315t-win_arm64.whl", hash = "sha256:28fd402e3ea8c0c636036314ead4bbe7b1157956a201de22ab283442aa9f0aea", size = 2108040, upload-time = "2026-10-18T19:24:08.418Z" }, ] -[[package]] -name = "outcome" -version = "1.3.0.post0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "attrs" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/98/df/77698abfac98571e65ffeb0c1fba8ffd692ab8458d617a0eed7d9a8d38f2/outcome-1.3.0.post0.tar.gz", hash = "sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8", size = 21060, upload-time = "2023-10-26T04:26:04.361Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/55/8b/5ab7257531a5d830fc8000c476e63c935488d74609b50f9384a643ec0a62/outcome-1.3.0.post0-py2.py3-none-any.whl", hash = "sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b", size = 10692, upload-time = "2023-10-26T04:26:02.532Z" }, -] - [[package]] name = "packaging" version = "26.3" @@ -1615,15 +1519,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/8c/c7/7bb2e321574b10df20cbde462a94e2b71d05f9bbda251ef27d104668306a/psutil-7.2.2-cp37-abi3-win_arm64.whl", hash = "sha256:8c233660f575a5a89e6d4cb65d9f938126312bca76d8fe087b947b3a1aaac9ee", size = 134617, upload-time = "2026-01-28T18:15:36.514Z" }, ] -[[package]] -name = "pycparser" -version = "3.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/1b/7d/92392ff7815c21062bea51aa7b87d45576f649f16458d78b7cf94b9ab2e6/pycparser-3.0.tar.gz", hash = "sha256:600f49d217304a5902ac3c37e1281c9fe94e4d0489de643a9504c5cdfdfc6b29", size = 103492, upload-time = "2026-01-21T14:26:51.89Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/0c/c3/44f3fbbfa403ea2a7c779186dc20772604442dde72947e7d01069cbe98e3/pycparser-3.0-py3-none-any.whl", hash = "sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992", size = 48172, upload-time = "2026-01-21T14:26:50.693Z" }, -] - [[package]] name = "pydantic" version = "2.13.5" @@ -1631,10 +1526,8 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "annotated-types" }, { name = "pydantic-core" }, - { name = "typing-extensions", version = "4.14.1", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, - { name = "typing-extensions", version = "4.16.0", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-search-training' or extra != 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test')" }, - { name = "typing-inspection", version = "0.4.2", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, - { name = "typing-inspection", version = "0.4.4", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-search-training' or extra != 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test')" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, ] sdist = { url = "https://files.pythonhosted.org/packages/53/ef/fc4f868f4e2cee79f863883abffceff107875f569b848507319842d2a681/pydantic-2.13.5.tar.gz", hash = "sha256:51a9c5f7b2f8e636f04c6cada605d9b6a3bf1348fdf945a3d8869b19bba0ee08", size = 845750, upload-time = "2026-08-28T14:04:00.916Z" } wheels = [ @@ -1646,8 +1539,7 @@ name = "pydantic-core" version = "2.46.5" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions", version = "4.14.1", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, - { name = "typing-extensions", version = "4.16.0", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-search-training' or extra != 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test')" }, + { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/af/f9/8a06bea35ef8daf588f707784c973a7046e0034c8d8cfb08828eeffb8b75/pydantic_core-2.46.5.tar.gz", hash = "sha256:10416c15b8839ecc4ef4d0885da76da6fd0f67333a0eb8aff6d93c4b8f2910fc", size = 472262, upload-time = "2026-08-28T10:01:31.677Z" } wheels = [ @@ -1790,21 +1682,12 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/12/14/9c291ad92b565629cf4eacee72cbc8071ca8d93c9d719b47f304b1b2ea76/pyproj-3.8.0-cp315-cp315t-win_arm64.whl", hash = "sha256:bbf8a786ebfa9a904802dfde0e95e1325df8efbb573a19686c1937499a8f04e8", size = 6843958, upload-time = "2026-09-05T20:05:07.527Z" }, ] -[[package]] -name = "pysocks" -version = "1.7.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz", hash = "sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0", size = 284429, upload-time = "2019-09-20T02:07:35.714Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/8d/59/b4572118e098ac8e46e399a1dd0f2d85403ce8bbaad9ec79373ed6badaf9/PySocks-1.7.1-py3-none-any.whl", hash = "sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5", size = 16725, upload-time = "2019-09-20T02:06:22.938Z" }, -] - [[package]] name = "pytest" version = "9.1.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "colorama", marker = "sys_platform == 'win32' or (extra == 'group-22-openbikecomputer-tools-desktop-e2e' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, + { name = "colorama", marker = "sys_platform == 'win32' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, { name = "iniconfig" }, { name = "packaging" }, { name = "pluggy" }, @@ -2080,23 +1963,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/8d/fc/7eedc3510d97878876e32774eebbeb61c43f148a96e915c84229a3e967aa/safetensors-0.8.0-cp310-abi3-win_arm64.whl", hash = "sha256:f7838e5135a406ad3e02efdcb8cf2e5397d368b0154537c4fec682dbc544d452", size = 340500, upload-time = "2026-06-09T07:52:26.745Z" }, ] -[[package]] -name = "selenium" -version = "4.35.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "certifi" }, - { name = "trio" }, - { name = "trio-websocket" }, - { name = "typing-extensions", version = "4.14.1", source = { registry = "https://pypi.org/simple" } }, - { name = "urllib3", extra = ["socks"], marker = "extra == 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, - { name = "websocket-client" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/75/67/9016942b5781843cfea6f5bc1383cea852d9fa08f85f55a0547874525b5c/selenium-4.35.0.tar.gz", hash = "sha256:83937a538afb40ef01e384c1405c0863fa184c26c759d34a1ebbe7b925d3481c", size = 907991, upload-time = "2025-08-12T15:46:40.822Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/17/ef/d0e033e1b3f19a0325ce03863b68d709780908381135fc0f9436dea76a7b/selenium-4.35.0-py3-none-any.whl", hash = "sha256:90bb6c6091fa55805785cf1660fa1e2176220475ccdb466190f654ef8eef6114", size = 9602106, upload-time = "2025-08-12T15:46:38.244Z" }, -] - [[package]] name = "setuptools" version = "84.0.0" @@ -2142,15 +2008,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", size = 9755, upload-time = "2023-10-24T04:13:38.866Z" }, ] -[[package]] -name = "sniffio" -version = "1.3.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc", size = 20372, upload-time = "2024-02-25T23:20:04.057Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235, upload-time = "2024-02-25T23:20:01.196Z" }, -] - [[package]] name = "snowballstemmer" version = "3.1.1" @@ -2160,22 +2017,12 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/4c/07/2ebca9b11fb9be7340a818d8d6f63feaebb146be2c4afbd6061701d6df6e/snowballstemmer-3.1.1-py3-none-any.whl", hash = "sha256:7e207fa178741da09cdee59d3ecec3827ad5f92b1fc5c9ff3755b639f71f5752", size = 104164, upload-time = "2026-06-03T00:56:38.614Z" }, ] -[[package]] -name = "sortedcontainers" -version = "2.4.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz", hash = "sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88", size = 30594, upload-time = "2021-05-16T22:03:42.897Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl", hash = "sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0", size = 29575, upload-time = "2021-05-16T22:03:41.177Z" }, -] - [[package]] name = "starlette" version = "1.7.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "anyio", version = "4.14.2", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, - { name = "anyio", version = "4.15.1", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-search-training' or extra != 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test')" }, + { name = "anyio" }, ] sdist = { url = "https://files.pythonhosted.org/packages/7b/2b/3850dc6bf7ef71b088962eba31dafc6cffd2f96e577ebb0bb316df96da3e/starlette-1.7.0.tar.gz", hash = "sha256:c79f74ea63cff761804fbbfb182f1e0b440c2d07b164d24700c5a1bab5d6ff5d", size = 2736246, upload-time = "2026-09-23T07:30:26.35Z" } wheels = [ @@ -2227,7 +2074,7 @@ version = "2.14.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cuda-bindings", marker = "python_full_version < '3.15' and sys_platform == 'linux'" }, - { name = "cuda-toolkit", extra = ["cublas", "cudart", "cufft", "cufile", "cupti", "curand", "cusolver", "cusparse", "nvjitlink", "nvrtc", "nvtx"], marker = "(sys_platform == 'linux' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-desktop-e2e' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, + { name = "cuda-toolkit", extra = ["cublas", "cudart", "cufft", "cufile", "cupti", "curand", "cusolver", "cusparse", "nvjitlink", "nvrtc", "nvtx"], marker = "(sys_platform == 'linux' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, { name = "filelock" }, { name = "fsspec" }, { name = "jinja2" }, @@ -2239,7 +2086,7 @@ dependencies = [ { name = "setuptools" }, { name = "sympy" }, { name = "triton", marker = "python_full_version < '3.15' and sys_platform == 'linux'" }, - { name = "typing-extensions", version = "4.16.0", source = { registry = "https://pypi.org/simple" } }, + { name = "typing-extensions" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/ee/90/1241e7db5ccc2455f8735bd6b1becfad39916206ad18001c4c0014d139e2/torch-2.14.0-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:860423e970f2ce02c4476e8e2d1350131b1c5c5a5e4912180e78b50b53241efa", size = 127321431, upload-time = "2026-09-02T13:44:38.236Z" }, @@ -2257,7 +2104,7 @@ name = "tqdm" version = "4.70.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "colorama", marker = "(sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-search-training') or (sys_platform != 'win32' and extra == 'group-22-openbikecomputer-tools-desktop-e2e' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/0d/ea/b2a5bd54b28a324dae8211928b2d730b6547500342c7e6c6dea08bd0a485/tqdm-4.70.1.tar.gz", hash = "sha256:cefd0eca11b2a37a3aee776544d4f4ae913f02688135b5556b8788dfa474afc4", size = 171846, upload-time = "2026-09-11T07:25:16.601Z" } wheels = [ @@ -2284,37 +2131,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e8/d0/c502b60d684adbd98a8dc7d5bb866842772b816ac4354e4608be240041ae/transformers-5.17.0-py3-none-any.whl", hash = "sha256:78ec1ce21579b38dfb83950a0658cd119f87212a2fcfdff478096ce9d6c03801", size = 12295140, upload-time = "2026-09-09T15:39:53.746Z" }, ] -[[package]] -name = "trio" -version = "0.30.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "attrs" }, - { name = "cffi", marker = "(implementation_name != 'pypy' and os_name == 'nt') or (implementation_name == 'pypy' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (implementation_name == 'pypy' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (implementation_name == 'pypy' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (implementation_name == 'pypy' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (os_name != 'nt' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (os_name != 'nt' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (os_name != 'nt' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (os_name != 'nt' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test')" }, - { name = "idna" }, - { name = "outcome" }, - { name = "sniffio" }, - { name = "sortedcontainers" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/01/c1/68d582b4d3a1c1f8118e18042464bb12a7c1b75d64d75111b297687041e3/trio-0.30.0.tar.gz", hash = "sha256:0781c857c0c81f8f51e0089929a26b5bb63d57f927728a5586f7e36171f064df", size = 593776, upload-time = "2025-04-21T00:48:19.507Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/69/8e/3f6dfda475ecd940e786defe6df6c500734e686c9cd0a0f8ef6821e9b2f2/trio-0.30.0-py3-none-any.whl", hash = "sha256:3bf4f06b8decf8d3cf00af85f40a89824669e2d033bb32469d34840edcfc22a5", size = 499194, upload-time = "2025-04-21T00:48:17.167Z" }, -] - -[[package]] -name = "trio-websocket" -version = "0.12.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "outcome" }, - { name = "trio" }, - { name = "wsproto" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/d1/3c/8b4358e81f2f2cfe71b66a267f023a91db20a817b9425dd964873796980a/trio_websocket-0.12.2.tar.gz", hash = "sha256:22c72c436f3d1e264d0910a3951934798dcc5b00ae56fc4ee079d46c7cf20fae", size = 33549, upload-time = "2025-02-25T05:16:58.947Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c7/19/eb640a397bba49ba49ef9dbe2e7e5c04202ba045b6ce2ec36e9cadc51e04/trio_websocket-0.12.2-py3-none-any.whl", hash = "sha256:df605665f1db533f4a386c94525870851096a223adcb97f72a07e8b4beba45b6", size = 21221, upload-time = "2025-02-25T05:16:57.545Z" }, -] - [[package]] name = "triton" version = "3.8.0" @@ -2341,15 +2157,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/dc/bf/205d0004930ede8f542fb58f601526fccf4ae7626075ca1e6c4de5d3d652/typer-0.27.2-py3-none-any.whl", hash = "sha256:b3a5fc4342d5fc8fda8fc3010b1cf117e9249aab7fae800c2eff62fd3842d97d", size = 123130, upload-time = "2026-08-28T10:26:53.752Z" }, ] -[[package]] -name = "typing-extensions" -version = "4.14.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/98/5a/da40306b885cc8c09109dc2e1abd358d5684b1425678151cdaed4731c822/typing_extensions-4.14.1.tar.gz", hash = "sha256:38b39f4aeeab64884ce9f74c94263ef78f3c22467c8724005483154c26648d36", size = 107673, upload-time = "2025-07-04T13:28:34.16Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/b5/00/d631e67a838026495268c2f6884f3711a15a9a2a96cd244fdaea53b823fb/typing_extensions-4.14.1-py3-none-any.whl", hash = "sha256:d1e1e3b58374dc93031d6eda2420a48ea44a36c2b4766a4fdeb3710755731d76", size = 43906, upload-time = "2025-07-04T13:28:32.743Z" }, -] - [[package]] name = "typing-extensions" version = "4.16.0" @@ -2359,24 +2166,12 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" }, ] -[[package]] -name = "typing-inspection" -version = "0.4.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "typing-extensions", version = "4.14.1", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949, upload-time = "2025-10-01T02:14:41.687Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" }, -] - [[package]] name = "typing-inspection" version = "0.4.4" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions", version = "4.16.0", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-search-training' or extra != 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test')" }, + { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/a3/26/b09b8010994eccc3c09092e6b34058f36a460eea2d4c3e8b910c695975a0/typing_inspection-0.4.4.tar.gz", hash = "sha256:547274fa6b0a561ccf549cc9524b999a578e737d015d8709d021f9d0d13bea47", size = 76928, upload-time = "2026-08-12T12:37:25.997Z" } wheels = [ @@ -2404,11 +2199,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717, upload-time = "2026-09-15T19:29:34.577Z" }, ] -[package.optional-dependencies] -socks = [ - { name = "pysocks" }, -] - [[package]] name = "uvicorn" version = "0.54.0" @@ -2426,9 +2216,9 @@ wheels = [ standard = [ { name = "httptools" }, { name = "python-dotenv" }, - { name = "pyyaml", version = "6.0.2", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-dev' or extra == 'group-22-openbikecomputer-tools-planner-search' or (extra == 'group-22-openbikecomputer-tools-desktop-e2e' and extra == 'group-22-openbikecomputer-tools-search-runtime' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-desktop-e2e' and extra == 'group-22-openbikecomputer-tools-search-test' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-desktop-e2e' and extra != 'group-22-openbikecomputer-tools-search-runtime' and extra != 'group-22-openbikecomputer-tools-search-test') or (extra != 'group-22-openbikecomputer-tools-search-runtime' and extra != 'group-22-openbikecomputer-tools-search-test' and extra != 'group-22-openbikecomputer-tools-search-training')" }, + { name = "pyyaml", version = "6.0.2", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-dev' or extra == 'group-22-openbikecomputer-tools-planner-search' or (extra != 'group-22-openbikecomputer-tools-search-runtime' and extra != 'group-22-openbikecomputer-tools-search-test' and extra != 'group-22-openbikecomputer-tools-search-training')" }, { name = "pyyaml", version = "6.0.3", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-search-runtime' or extra == 'group-22-openbikecomputer-tools-search-test' or extra == 'group-22-openbikecomputer-tools-search-training'" }, - { name = "uvloop", marker = "(platform_python_implementation != 'PyPy' and sys_platform != 'cygwin' and sys_platform != 'win32') or (platform_python_implementation == 'PyPy' and extra == 'group-22-openbikecomputer-tools-desktop-e2e' and extra == 'group-22-openbikecomputer-tools-search-training') or (platform_python_implementation == 'PyPy' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (platform_python_implementation == 'PyPy' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (platform_python_implementation == 'PyPy' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (platform_python_implementation == 'PyPy' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (platform_python_implementation == 'PyPy' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (platform_python_implementation == 'PyPy' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training') or (sys_platform == 'cygwin' and extra == 'group-22-openbikecomputer-tools-desktop-e2e' and extra == 'group-22-openbikecomputer-tools-search-training') or (sys_platform == 'cygwin' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (sys_platform == 'cygwin' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (sys_platform == 'cygwin' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (sys_platform == 'cygwin' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (sys_platform == 'cygwin' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (sys_platform == 'cygwin' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training') or (sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-desktop-e2e' and extra == 'group-22-openbikecomputer-tools-search-training') or (sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, + { name = "uvloop", marker = "(platform_python_implementation != 'PyPy' and sys_platform != 'cygwin' and sys_platform != 'win32') or (platform_python_implementation == 'PyPy' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (platform_python_implementation == 'PyPy' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (platform_python_implementation == 'PyPy' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (platform_python_implementation == 'PyPy' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (platform_python_implementation == 'PyPy' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (platform_python_implementation == 'PyPy' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training') or (sys_platform == 'cygwin' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (sys_platform == 'cygwin' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (sys_platform == 'cygwin' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (sys_platform == 'cygwin' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (sys_platform == 'cygwin' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (sys_platform == 'cygwin' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training') or (sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (sys_platform == 'win32' and extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, { name = "watchfiles" }, { name = "websockets" }, ] @@ -2470,8 +2260,7 @@ name = "watchfiles" version = "1.3.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "anyio", version = "4.14.2", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-training') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-training')" }, - { name = "anyio", version = "4.15.1", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'group-22-openbikecomputer-tools-search-training' or extra != 'group-22-openbikecomputer-tools-desktop-e2e' or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-dev' and extra == 'group-22-openbikecomputer-tools-search-test') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-runtime') or (extra == 'group-22-openbikecomputer-tools-planner-search' and extra == 'group-22-openbikecomputer-tools-search-test')" }, + { name = "anyio" }, ] sdist = { url = "https://files.pythonhosted.org/packages/b3/68/e6aa0b77d217b31f8f486ec0cdfe5e00e6e38dc0be657e7d85819b9faf0a/watchfiles-1.3.0.tar.gz", hash = "sha256:99aee4a07847c06820765fd7b1b49ceac4f3f711ccb7d104655a33231de1c207", size = 108119, upload-time = "2026-09-21T09:08:55.664Z" } wheels = [ @@ -2505,15 +2294,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/46/dd/41c12ae9745d5d72f709333287679d71cbba68ad7678fed872207bba94f4/watchfiles-1.3.0-cp314-cp314t-win_arm64.whl", hash = "sha256:a5b631db08fd3032db57ec6a92d1777cd60f88803287e4e941a4858c53aab1e0", size = 276924, upload-time = "2026-09-21T09:08:48.976Z" }, ] -[[package]] -name = "websocket-client" -version = "1.8.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e6/30/fba0d96b4b5fbf5948ed3f4681f7da2f9f64512e1d303f94b4cc174c24a5/websocket_client-1.8.0.tar.gz", hash = "sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da", size = 54648, upload-time = "2024-04-23T22:16:16.976Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/5a/84/44687a29792a70e111c5c477230a72c4b957d88d16141199bf9acb7537a3/websocket_client-1.8.0-py3-none-any.whl", hash = "sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526", size = 58826, upload-time = "2024-04-23T22:16:14.422Z" }, -] - [[package]] name = "websockets" version = "17.2" @@ -2603,18 +2383,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/8a/58/835cd51934d6780fa586f275b5d9901eead6d81569b4343b3767cdbaae4c/websockets-17.2-py3-none-any.whl", hash = "sha256:6aa59f0ef92e796b2db6f5f26550c4713c0e4036899fadf02f55e2ed4db0b7ae", size = 211883, upload-time = "2026-10-03T14:56:51.898Z" }, ] -[[package]] -name = "wsproto" -version = "1.3.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "h11" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/c7/79/12135bdf8b9c9367b8701c2c19a14c913c120b882d50b014ca0d38083c2c/wsproto-1.3.2.tar.gz", hash = "sha256:b86885dcf294e15204919950f666e06ffc6c7c114ca900b060d6e16293528294", size = 50116, upload-time = "2025-11-20T18:18:01.871Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/a4/f5/10b68b7b1544245097b2a1b8238f66f2fc6dcaeb24ba5d917f52bd2eed4f/wsproto-1.3.2-py3-none-any.whl", hash = "sha256:61eea322cdf56e8cc904bd3ad7573359a242ba65688716b0710a5eb12beab584", size = 24405, upload-time = "2025-11-20T18:18:00.454Z" }, -] - [[package]] name = "zstandard" version = "0.25.0"