mirror of
https://github.com/rommapp/romm.git
synced 2026-12-06 07:54:18 +01:00
Merge remote-tracking branch 'origin/master' into claude/persist-tab-title-on-query-nav
# Conflicts: # frontend/src/plugins/router.test.ts
This commit is contained in:
81 files changed
+2818
-664
No files matched your search
@@ -0,0 +1,156 @@
|
||||
---
|
||||
name: draft-announcement
|
||||
description: Draft the Discord release announcement for a RomM release, from the release notes plus an interview about community news. Use when asked to "write the Discord announcement for 5.3.0", "draft the announcement post", "announce the beta in Discord", or to refresh an announcement draft. Interviews the user for the things no diff contains (new team members, third-party apps to spotlight, milestones, events, Discord housekeeping), writes in the house voice, and never posts to Discord.
|
||||
argument-hint: "[version to announce, e.g. 5.3.0 | nothing to infer it]"
|
||||
---
|
||||
|
||||
# Drafting a Discord announcement
|
||||
|
||||
The release notes say what shipped. The announcement says why anyone should care,
|
||||
in RomM's voice, in one Discord message. It is a short, warm, slightly unhinged
|
||||
post: a hook, the few features worth naming, the community news, a pointer to the
|
||||
notes, a sign-off.
|
||||
|
||||
Half the content is not in the repository. **Interview the user for it.** Never
|
||||
invent a contributor, an app, a milestone, a link or a handle.
|
||||
|
||||
Write the draft to the session scratchpad and print it. **Never** post to Discord,
|
||||
and never write into the maintainer's announcement archive (see section 1).
|
||||
|
||||
---
|
||||
|
||||
## 1. Read before you write
|
||||
|
||||
`$ARGUMENTS` is the version. If empty, take the newest tag and confirm it.
|
||||
|
||||
The release notes are the feature source.
|
||||
|
||||
```bash
|
||||
TAG=5.3.0
|
||||
gh release view "$TAG" --json body --jq .body # the notes for this release
|
||||
# for a release not yet published, use the draft in the scratchpad
|
||||
```
|
||||
|
||||
Past announcements are the voice source, and a Discord post is not in the repo, so
|
||||
they exist only wherever the maintainer archives them. Ask where that is if you do
|
||||
not already know, and treat it as **read only**: drafts go to the scratchpad.
|
||||
|
||||
Read the **two most recent** before drafting. They set the current voice, and they
|
||||
tell you which third-party apps were already spotlighted. An app highlighted in
|
||||
either one does not get spotlighted again.
|
||||
|
||||
From the notes, pull:
|
||||
|
||||
- the Highlights, as candidate features to name,
|
||||
- every `> [!WARNING]` and `> [!CAUTION]`, which **must** survive into the
|
||||
announcement (`4.1.0` led with the mandatory `config.yml`, `4.0.0` led with the
|
||||
RCE advisory),
|
||||
- a rough PR count and whether the release is mostly fixes, which decides the hook.
|
||||
|
||||
## 2. Interview the user, one step at a time
|
||||
|
||||
The community news is names, URLs and handles that only the user has, so it gets
|
||||
**typed, not picked**. Ask **one question per message** and wait for the answer
|
||||
before asking the next. Never send the whole questionnaire as a numbered list, and
|
||||
never collect the content answers as checkbox options.
|
||||
|
||||
Number every step and say how many there are ("Step 2 of 6"), so the user can see
|
||||
where the interview ends. Each step states exactly which fields you need, and how
|
||||
to skip it. Take "skip", "none" or "n/a" as an answer, move on without arguing, and
|
||||
drop that item from the draft.
|
||||
|
||||
| # | Step | Ask for |
|
||||
| --- | ------------------ | --------------------------------------------------------------------------------------------------------------- |
|
||||
| 1 | Features | print the Highlights you found as a numbered list, ask which get named prose; the rest become bullets |
|
||||
| 2 | App spotlight | name, repo URL, author's handle, one line on what it does. List the apps already spotlighted so nothing repeats |
|
||||
| 3 | Team or role news | handle, what they built or do, what changes now (joined the team, project gone official, new Experts) |
|
||||
| 4 | Milestone or event | what it is, the number or date, and the link |
|
||||
| 5 | Anything else | housekeeping, a call to action, a beta bug-report ask; the exact wording they want |
|
||||
| 6 | Pings and shape | the only genuinely multiple-choice step, so one `AskUserQuestion` call: who gets pinged, and one message or two |
|
||||
|
||||
Ask for a handle as it is written in Discord, since `@Covin` and `@Covin90` are not
|
||||
interchangeable. Never offer a sample answer that could be mistaken for a real one:
|
||||
no invented app names, no placeholder URLs, no guessed star counts.
|
||||
|
||||
If steps 2 through 5 all come back empty, drop the Community news section. Several
|
||||
releases (`4.3.0`, `4.4.0`) have none, and a padded one reads worse than none.
|
||||
|
||||
Skip a step only when the answer is already on the table, and say so rather than
|
||||
silently dropping it: a user who opened with "announce 5.3.0, spotlight `<app>`" has
|
||||
answered step 2 already.
|
||||
|
||||
## 3. The shape
|
||||
|
||||
Always, in this order:
|
||||
|
||||
1. **Hook.** One or two sentences, opening on something _timely_. Check today's
|
||||
date first and use it: the season, a holiday, the month, or a self-aware nod to
|
||||
the last release. `3.6.0` served Thanksgiving turkey, `3.10.0` opened on the
|
||||
summer heat, `3.7.0` on the new year, `4.9.0` on being the last `4.x`, `5.1.0`
|
||||
on arriving sooner than anyone expected. Then `@everyone` (if pinging), the
|
||||
version in backticks, and what the release is _about_. Never open cold with
|
||||
"version X is out". Keep the reference light and skip a holiday that is not
|
||||
widely shared, and do not assert a date you have not checked ("the equinox is
|
||||
today") when "the days are getting shorter" carries the same warmth.
|
||||
2. **Any upgrade warning**, immediately after the hook. Imperative, and what to do,
|
||||
not why.
|
||||
3. **The features**, in one of two shapes:
|
||||
- **Bullet list** for a release carried by a long tail (`5.1.0`, `4.3.0`): one
|
||||
sentence of setup, then five to nine bullets of three to six words each.
|
||||
- **`###` section per feature** for a release with two to five real headliners
|
||||
(`3.10.0`, `4.4.0`, `3.5.0`): a heading and two or three sentences, saying what
|
||||
it does and the one thing needed to use it. Close with an `Other notable
|
||||
features:` bullet list when there is a tail.
|
||||
4. **`## Community news`** (`### Community updates` also appears; match the last
|
||||
one). Team additions first, then app spotlights, then milestones and events, then
|
||||
housekeeping and calls to action.
|
||||
5. **The pointer.** "More details on each of these features, and a complete list of
|
||||
changes, can be found in the [release notes](url)." Link the tag URL.
|
||||
6. **Sign-off.** "See you soon!", optionally with `:mario_here_we_go:`.
|
||||
|
||||
## 4. Voice
|
||||
|
||||
- Second person, present tense, contractions. Talking to friends, not users.
|
||||
- One idea per sentence, and short paragraphs. Nothing here is a manual.
|
||||
- Enthusiasm is earned by specifics, not adjectives. Name the feature, don't call
|
||||
it revolutionary. No claim the release notes do not support.
|
||||
- Emphasis is _italics_ on a single word, sparingly. Bold is for the thing that
|
||||
will break someone's install.
|
||||
- Backticks for versions, env vars, config keys, filenames.
|
||||
- Credit by name every time: the contributor for a feature, the author for an app.
|
||||
- No em-dashes. No AI throat-clearing, no "we're excited to announce" twice in one
|
||||
post, no bullet list of benefits.
|
||||
|
||||
## 5. Discord mechanics
|
||||
|
||||
- **2000 characters**, hard. Past announcements run 1300 to 2100; treat 1800 as the
|
||||
target and count before handing over (`wc -m`).
|
||||
- Over the limit, pick one: split at a section boundary into message 1 (hook plus
|
||||
features) and message 2 (community news plus sign-off), marking the split in the
|
||||
draft; or do what `3.7.0` did and post a three-line teaser pointing at the GitHub
|
||||
notes. Say which you did and why.
|
||||
- `##`, `###`, `**bold**`, `*italics*`, `` `code` ``, `> quote`, `-`/`*` bullets and
|
||||
`[text](url)` all render. Tables, images and HTML do not.
|
||||
- `@everyone` goes in the first sentence or not at all.
|
||||
- Custom emoji only from ones this server is known to have:
|
||||
`:mario_here_we_go:` (the usual sign-off), `:linkEz:`, `:linkLove:`, `:peepoAlert:`,
|
||||
`:snakeSalute:`, `:excuseme:`, `:okay:`, `:linuxNootNoot:`. Anything else renders as
|
||||
literal text, so use plain unicode (🎊 👉 ⚠️ 🔥) instead of guessing a shortcode.
|
||||
- Role pings (`@Expert`, `@Alpha Tester`, `@Beta Tester`) only when the user asked
|
||||
for them, spelled as they gave them.
|
||||
|
||||
## 6. Before handing it over
|
||||
|
||||
- Every feature named appears in the release notes.
|
||||
- The hook opens on something timely, and the reference matches today's date.
|
||||
- Every warning and caution in the notes appears in the announcement.
|
||||
- Every handle, repo URL and number came from the user or from the notes, never
|
||||
from you, and every URL is one you have actually seen.
|
||||
- No app spotlighted in either of the last two announcements.
|
||||
- The release notes link ends in the tag being announced.
|
||||
- Under 2000 characters, or split deliberately.
|
||||
- No em-dashes, no invented emoji shortcodes.
|
||||
|
||||
Write to `<scratchpad>/<tag>-announcement.md`, print it, and say what still needs a
|
||||
human: a screenshot or GIF to attach, a link the user has not given you, a name you
|
||||
could not confirm.
|
||||
@@ -0,0 +1,69 @@
|
||||
# Discord announcement skeletons
|
||||
|
||||
Pick a shape by how many real headliners the release has, drop any section with no
|
||||
content, and stay under 2000 characters. Bare URLs and loose headings inside the
|
||||
skeletons are deliberate: Discord renders them, not GitHub.
|
||||
|
||||
## Bullet shape (a long tail of changes)
|
||||
|
||||
```text
|
||||
@everyone <one or two sentences: the version in backticks, the angle, what this
|
||||
release is about>
|
||||
|
||||
<only if the release notes carry a warning:>
|
||||
⚠️ <what the reader must do before upgrading, imperative, bold the breaking part>
|
||||
|
||||
<A couple of the bigger items are also included, like:>
|
||||
|
||||
- <Feature, three to six words>
|
||||
- <Feature>
|
||||
- <Feature>
|
||||
- <Feature>
|
||||
- <Feature>
|
||||
|
||||
## Community news
|
||||
|
||||
<New team member: who they are, what they built, link, what changes now.>
|
||||
|
||||
<App spotlight: [Name](repo url) by @author, one sentence on what it does and who
|
||||
it is for. Not an app spotlighted in the last two announcements.>
|
||||
|
||||
<Milestone, event, press, or a call to action with the exact wording the user gave.>
|
||||
|
||||
More details on each of these features, and a complete list of changes, can be
|
||||
found in the [release notes](https://github.com/rommapp/romm/releases/tag/X.Y.Z).
|
||||
|
||||
See you soon! :mario_here_we_go:
|
||||
```
|
||||
|
||||
## Section shape (two to five real headliners)
|
||||
|
||||
```text
|
||||
@everyone <hook>
|
||||
|
||||
<only if the release notes carry a warning:>
|
||||
⚠️ <what the reader must do before upgrading, imperative, bold the breaking part>
|
||||
|
||||
### <Feature name>
|
||||
|
||||
<What it does, second person, two or three sentences. Then the one thing needed
|
||||
to use it: the `config.yml` key, the setting, the caveat.>
|
||||
|
||||
### <Feature name>
|
||||
|
||||
<Same.>
|
||||
|
||||
Other notable features:
|
||||
|
||||
- <Feature>
|
||||
- <Feature>
|
||||
|
||||
## Community news
|
||||
|
||||
<As above.>
|
||||
|
||||
More details on each of these features, and a complete list of changes, can be
|
||||
found in the [release notes](https://github.com/rommapp/romm/releases/tag/X.Y.Z).
|
||||
|
||||
See you soon! :mario_here_we_go:
|
||||
```
|
||||
@@ -142,10 +142,11 @@ mypy wanting explicit annotations on `__init__` attributes
|
||||
|
||||
Run from `frontend/`:
|
||||
|
||||
1. `npm run typecheck` — zero errors (`vue-tsc --noEmit`).
|
||||
2. `npm run lint` _(if present)_ / ESLint clean. Trunk also runs ESLint + Prettier in CI.
|
||||
3. `npm run test` — zero failures (Vitest + happy-dom; runs unit tests **and** every `/lib` story's `play()` via `composeStories`).
|
||||
4. `npm run build` — zero failures (CI sanity check).
|
||||
1. `npm run typecheck`: zero errors (`vue-tsc --noEmit`).
|
||||
2. `npm run typecheck:scripts`: zero errors (`tsc -p tsconfig.node.json`, covers `scripts/`).
|
||||
3. `npm run lint` _(if present)_ / ESLint clean. Trunk also runs ESLint + Prettier in CI.
|
||||
4. `npm run test`: zero failures (Vitest + happy-dom; runs unit tests **and** every `/lib` story's `play()` via `composeStories`).
|
||||
5. `npm run build`: zero failures (CI sanity check).
|
||||
|
||||
**If you touched the backend API:** start the backend, run `npm run generate`, then re-`typecheck`.
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="288.99" height="67">
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<rect width="286.99" height="65" x="1" y="1" fill="#5948e9" stroke="#5948e9" stroke-width="2" rx="8" />
|
||||
<g fill="#fff" transform="translate(17, 14) scale(2.2222)">
|
||||
<path d="M15.9961 0H0V5.65188H15.9961V0Z" />
|
||||
<path d="M0 10.953C4.5507 6.83365 11.4453 6.83364 15.9961 10.953V17.9968L15.9929 18L7.99803 9.88536L0.00313606 18L0 17.9968V10.953Z" />
|
||||
</g>
|
||||
<!-- -->
|
||||
<text fill="#fff" font-family="Arial" font-size="21" font-weight="bold">
|
||||
<tspan x="70" y="51">Secured with Aikido</tspan>
|
||||
</text>
|
||||
<text fill="#fff" font-family="Arial" font-size="12" font-weight="bold">
|
||||
<tspan x="70" y="26">OPEN SOURCE SECURITY</tspan>
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 797 B |
@@ -0,0 +1,22 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="288.99" height="67">
|
||||
<defs>
|
||||
<linearGradient id="socket-mark" x1="129.003" y1="266.705" x2="339.962" y2="266.705" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#ff00aa" />
|
||||
<stop offset="1" stop-color="#8c50ff" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g fill="none" fill-rule="evenodd">
|
||||
<!-- The border keeps the card's edge visible against a dark page background. -->
|
||||
<rect width="286.99" height="65" x="1" y="1" fill="#17141f" stroke="#322b44" stroke-width="2" rx="8" />
|
||||
<g transform="translate(17, 14) scale(0.1439) translate(-129.003, -127.75)">
|
||||
<path fill="url(#socket-mark)" d="M331.318 162.22C336.387 164.036 339.728 168.844 339.67 174.232V174.218C339.234 213.565 342.212 269.035 335.516 293.669C324.099 343.097 287.003 385.814 238.955 404.522C236.007 405.67 232.724 405.713 229.761 404.58C178.561 385.088 139.054 336.619 130.964 282.514C130.325 279.101 129.962 275.107 129.54 271.722C129.119 269.457 129.003 259.217 129.003 215.018C129.003 193.39 129.017 181.015 129.076 174C129.119 168.742 132.431 164.05 137.384 162.249C168.104 151.051 196.369 141.014 227.219 129.743C228.192 129.394 229.107 129.06 229.95 128.755C232.681 127.768 235.644 127.753 238.389 128.712C245.273 131.108 255.891 135.059 262.936 137.557C285.129 145.531 308.79 154.145 331.318 162.22Z" />
|
||||
<path fill="#fff" d="M237.451 175.607C239.557 172.159 244.865 173.651 244.865 177.692V241.881C244.865 244.643 247.103 246.881 249.865 246.881H279.891C283.014 246.881 284.932 250.3 283.304 252.965L229.436 341.178C227.331 344.626 222.023 343.134 222.022 339.094V274.904C222.022 272.143 219.784 269.905 217.022 269.905H186.996C183.873 269.904 181.955 266.485 183.583 263.82L237.451 175.607Z" />
|
||||
</g>
|
||||
<text fill="#f7f3ef" font-family="Arial" font-size="21" font-weight="bold">
|
||||
<tspan x="70" y="51">Secured by Socket</tspan>
|
||||
</text>
|
||||
<text fill="#f7f3ef" font-family="Arial" font-size="12" font-weight="bold">
|
||||
<tspan x="70" y="26">SUPPLY CHAIN SECURITY</tspan>
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -57,6 +57,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
|
||||
@@ -112,8 +114,10 @@ jobs:
|
||||
org.opencontainers.image.licenses="AGPLv3"
|
||||
|
||||
- name: Set version
|
||||
env:
|
||||
VERSION: ${{ steps.meta.outputs.version }}
|
||||
run: |
|
||||
sed -i 's/<version>/${{ steps.meta.outputs.version }}/' backend/__version__.py
|
||||
sed -i "s/<version>/$VERSION/" backend/__version__.py
|
||||
|
||||
- name: Build and push slim image by digest
|
||||
id: build-slim
|
||||
@@ -125,6 +129,10 @@ jobs:
|
||||
labels: ${{ steps.meta-slim.outputs.labels }}
|
||||
target: slim-image
|
||||
outputs: type=image,name=${{ env.DIGEST_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||
# Both stages run `apk upgrade` off a fixed base digest, so nothing in
|
||||
# them changes between releases and the cache would serve the package
|
||||
# set of whenever the layer was first built.
|
||||
no-cache-filters: python-runtime,production-stage
|
||||
# Deliberately not seeded from the preview cache: those layers are
|
||||
# built from PR head content and must not reach a release image.
|
||||
cache-from: type=registry,ref=${{ env.CACHE_IMAGE }}:release-${{ matrix.arch }}
|
||||
@@ -144,6 +152,7 @@ jobs:
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
target: full-image
|
||||
outputs: type=image,name=${{ env.DIGEST_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||
no-cache-filters: python-runtime,production-stage
|
||||
cache-from: type=registry,ref=${{ env.CACHE_IMAGE }}:release-${{ matrix.arch }}
|
||||
cache-to: type=registry,ref=${{ env.CACHE_IMAGE }}:release-${{ matrix.arch }},mode=max
|
||||
build-args: |
|
||||
|
||||
@@ -25,9 +25,11 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
|
||||
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
|
||||
|
||||
- name: Install Python
|
||||
run: uv python install
|
||||
|
||||
@@ -22,7 +22,8 @@ on:
|
||||
- uv.lock
|
||||
- .python-version
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
e2e:
|
||||
@@ -61,6 +62,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install mariadb connectors
|
||||
run: |
|
||||
@@ -68,7 +71,7 @@ jobs:
|
||||
sudo apt-get install -y libmariadb3 libmariadb-dev
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
|
||||
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
|
||||
|
||||
- name: Install python
|
||||
run: uv python install
|
||||
@@ -96,6 +99,9 @@ jobs:
|
||||
# assets/ under it), so copy the fixture library out of the repo rather
|
||||
# than scanning it in place.
|
||||
- name: Stage the library fixture
|
||||
env:
|
||||
MARIADB_PORT: ${{ job.services.mariadb.ports['3306'] }}
|
||||
VALKEY_PORT: ${{ job.services.valkey.ports['6379'] }}
|
||||
run: |
|
||||
mkdir -p "$RUNNER_TEMP/romm/resources" "$RUNNER_TEMP/romm/assets"
|
||||
cp -R backend/romm_test/library "$RUNNER_TEMP/romm/library"
|
||||
@@ -103,8 +109,8 @@ jobs:
|
||||
# config.yml declares.
|
||||
cp -R backend/romm_test/config "$RUNNER_TEMP/romm/config"
|
||||
echo "ROMM_BASE_PATH=$RUNNER_TEMP/romm" >> "$GITHUB_ENV"
|
||||
echo "DB_PORT=${{ job.services.mariadb.ports['3306'] }}" >> "$GITHUB_ENV"
|
||||
echo "REDIS_PORT=${{ job.services.valkey.ports['6379'] }}" >> "$GITHUB_ENV"
|
||||
echo "DB_PORT=$MARIADB_PORT" >> "$GITHUB_ENV"
|
||||
echo "REDIS_PORT=$VALKEY_PORT" >> "$GITHUB_ENV"
|
||||
|
||||
# A migration failure is its own red step rather than a confusing server-start failure.
|
||||
- name: Apply migrations
|
||||
|
||||
@@ -16,7 +16,8 @@ on:
|
||||
- "frontend/src/console/**"
|
||||
- "frontend/src/layouts/**"
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check-v1-frozen:
|
||||
@@ -26,6 +27,7 @@ jobs:
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
- name: Fail if v1 UI files changed
|
||||
env:
|
||||
|
||||
@@ -10,7 +10,8 @@ on:
|
||||
paths:
|
||||
- "frontend/**"
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
@@ -18,6 +19,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
@@ -39,6 +42,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
|
||||
@@ -5,7 +5,8 @@ on:
|
||||
paths:
|
||||
- "frontend/src/locales/**/*.json"
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check-translations:
|
||||
@@ -14,9 +15,11 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
|
||||
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
|
||||
|
||||
- name: Install python
|
||||
run: uv python install
|
||||
|
||||
@@ -9,14 +9,12 @@ on:
|
||||
- uv.lock
|
||||
- .python-version
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
migrate-postgres:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
checks: write
|
||||
pull-requests: write
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:18
|
||||
@@ -34,6 +32,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install mariadb connectors
|
||||
run: |
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
sudo apt-get install -y libmariadb3 libmariadb-dev
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
|
||||
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
|
||||
|
||||
- name: Install python
|
||||
run: uv python install
|
||||
@@ -68,9 +68,6 @@ jobs:
|
||||
# migration SQL that a default utf8mb4 server accepts (issue #4350).
|
||||
name: migrate-mariadb (${{ matrix.mariadb }}, ${{ matrix.collation }})
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
checks: write
|
||||
pull-requests: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -91,6 +88,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install mariadb connectors
|
||||
run: |
|
||||
@@ -98,7 +97,7 @@ jobs:
|
||||
sudo apt-get install -y libmariadb3 libmariadb-dev
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
|
||||
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
|
||||
|
||||
- name: Install python
|
||||
run: uv python install
|
||||
|
||||
@@ -22,14 +22,12 @@ on:
|
||||
- Dockerfile
|
||||
- docker/Dockerfile
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
pytest:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
checks: write
|
||||
pull-requests: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -63,6 +61,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install mariadb connectors
|
||||
run: |
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
sudo apt-get install -y libmariadb3 libmariadb-dev 7zip
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
|
||||
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
|
||||
|
||||
- name: Install python
|
||||
run: |
|
||||
@@ -82,12 +82,14 @@ jobs:
|
||||
|
||||
- name: Initiate MariaDB database
|
||||
if: matrix.db == 'mariadb'
|
||||
env:
|
||||
MARIADB_PORT: ${{ job.services.mariadb.ports['3306'] }}
|
||||
run: |
|
||||
# Grant on the `romm_test%` namespace so the test user can create the
|
||||
# per-worker databases (romm_test_gw0, ...) used under pytest-xdist,
|
||||
# without granting it global privileges. The backticks are escaped so
|
||||
# the shell doesn't treat them as command substitution.
|
||||
mysql --host 127.0.0.1 --port ${{ job.services.mariadb.ports['3306'] }} -uroot -ppasswd -e "GRANT ALL PRIVILEGES ON \`romm\_test%\`.* TO 'romm_test'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES;"
|
||||
mysql --host 127.0.0.1 --port "$MARIADB_PORT" -uroot -ppasswd -e "GRANT ALL PRIVILEGES ON \`romm\_test%\`.* TO 'romm_test'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES;"
|
||||
|
||||
- name: Run python tests
|
||||
env:
|
||||
|
||||
@@ -76,6 +76,7 @@ jobs:
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.head_ref }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
|
||||
|
||||
@@ -10,7 +10,8 @@ concurrency:
|
||||
group: ${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
trunk_check:
|
||||
@@ -21,5 +22,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Trunk Check
|
||||
uses: trunk-io/trunk-action@e1234e67a86010d61ddac8d8ebf4b783e2ffd2fa # v2.0.0
|
||||
@@ -10,17 +10,17 @@ on:
|
||||
paths:
|
||||
- "frontend/**"
|
||||
|
||||
permissions: read-all
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
typecheck:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
checks: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
@@ -37,6 +37,10 @@ jobs:
|
||||
run: npm run typecheck
|
||||
working-directory: frontend
|
||||
|
||||
- name: Run scripts typecheck
|
||||
run: npm run typecheck:scripts
|
||||
working-directory: frontend
|
||||
|
||||
- name: Lockfile lint
|
||||
run: |
|
||||
[ -z "$(jq -r '.packages | to_entries[] | select((.key | contains("node_modules")) and (.value.resolved | contains("git+ssh") | not) and (.value | has("resolved") and has("integrity") | not)) | .key' < package-lock.json)" ]
|
||||
|
||||
@@ -8,18 +8,22 @@ on:
|
||||
- cron: "0 6 * * 1"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update-hltb-api-url:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # For create-pull-request to push the branch
|
||||
pull-requests: write # For create-pull-request to open the PR
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
|
||||
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
|
||||
|
||||
- name: Install python
|
||||
run: |
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
[mypy]
|
||||
check_untyped_defs = True
|
||||
disable_error_code = import-untyped
|
||||
exclude = ["tests", "alembic"]
|
||||
# INI configs take a regex here, not a TOML-style list.
|
||||
exclude = (?x)(^|/)alembic/
|
||||
@@ -22,6 +22,7 @@ lint:
|
||||
- oxipng
|
||||
- pyright
|
||||
enabled:
|
||||
- zizmor@1.30.1
|
||||
- grype@0.110.0
|
||||
- pinact@4.0.0
|
||||
- dotenv-linter@4.0.0
|
||||
|
||||
@@ -53,6 +53,7 @@ These live in `.claude/skills/` and carry the detailed rules. Invoke the one tha
|
||||
| `pr-ready` | Before opening a PR - the four passes in order: `security-audit`, `code-review xhigh --fix`, `simplify`, `review-polish`. Not auto-invoked. |
|
||||
| `address-bot-reviews` | After Greptile and Copilot review a PR - triage each finding, fix what holds up, reply with the fix or the reason, and resolve the threads. Not auto-invoked. |
|
||||
| `draft-release-notes` | Drafting the GitHub release notes for a release, stable or alpha/beta, from the diff since the previous stable tag. |
|
||||
| `draft-announcement` | Drafting the Discord announcement for a release, from the release notes plus an interview about community news. Not auto-invoked. |
|
||||
|
||||
---
|
||||
|
||||
@@ -99,6 +100,7 @@ uv run alembic upgrade head # apply migrations
|
||||
npm install # install (Node 24)
|
||||
npm run dev # dev server :3000
|
||||
npm run typecheck # vue-tsc
|
||||
npm run typecheck:scripts # tsc on the Node/Vite tooling in scripts/
|
||||
npm run test # vitest (+ Storybook play() tests)
|
||||
npm run test:e2e # playwright (needs a running app + seeded e2e users)
|
||||
npm run build # production build
|
||||
|
||||
@@ -144,7 +144,7 @@ These companies support us by providing their tools for free:
|
||||
<div align="center">
|
||||
<div dir="auto">
|
||||
<a href="https://www.greptile.com/?utm_source=oss_badge&utm_medium=readme&utm_campaign=greptile_for_open_source" target="_blank" rel="noopener noreferrer"><img src=".github/resources/greptile-badge.svg" alt="Greptile" width="250" height="58"/></a>
|
||||
<a href="https://www.aikido.dev/" target="_blank" rel="noopener noreferrer"><img src=".github/resources/aikido-badge.svg" alt="Aikido" width="250" height="58"/></a>
|
||||
<a href="https://socket.dev/" target="_blank" rel="noopener noreferrer"><img src=".github/resources/socket-badge.svg" alt="Socket" width="250" height="58"/></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -919,7 +919,17 @@ class ConfigManager:
|
||||
f"Invalid config.yml: {config_key}.{key} must be a non-empty string"
|
||||
)
|
||||
sys.exit(3)
|
||||
normalized[str(key).lower()] = value
|
||||
folded = str(key).lower()
|
||||
# One key covers `PSX` and `psx` alike, so a second spelling of the
|
||||
# same folder silently replaces the first.
|
||||
if folded in normalized and normalized[folded] != value:
|
||||
log.warning(
|
||||
f"{config_key}.{key} replaces a case variant of the same "
|
||||
f"folder name: {hl(normalized[folded])} is dropped for "
|
||||
f"{hl(value)}, since folder names are matched "
|
||||
"case-insensitively"
|
||||
)
|
||||
normalized[folded] = value
|
||||
|
||||
return normalized
|
||||
|
||||
@@ -1401,9 +1411,11 @@ class ConfigManager:
|
||||
def add_platform_binding(self, fs_slug: str, slug: str) -> None:
|
||||
fs_slug = fs_slug.lower()
|
||||
platform_bindings = self.config.PLATFORMS_BINDING
|
||||
if fs_slug in platform_bindings:
|
||||
log.warning(f"Binding for {hl(fs_slug)} already exists")
|
||||
bound = platform_bindings.get(fs_slug)
|
||||
if bound == slug:
|
||||
return None
|
||||
if bound:
|
||||
log.info(f"Rebinding {hl(fs_slug)} from {hl(bound)} to {hl(slug)}")
|
||||
|
||||
platform_bindings[fs_slug] = slug
|
||||
self.config.PLATFORMS_BINDING = platform_bindings
|
||||
@@ -1423,9 +1435,11 @@ class ConfigManager:
|
||||
def add_platform_version(self, fs_slug: str, slug: str) -> None:
|
||||
fs_slug = fs_slug.lower()
|
||||
platform_versions = self.config.PLATFORMS_VERSIONS
|
||||
if fs_slug in platform_versions:
|
||||
log.warning(f"Version for {hl(fs_slug)} already exists")
|
||||
parent = platform_versions.get(fs_slug)
|
||||
if parent == slug:
|
||||
return None
|
||||
if parent:
|
||||
log.info(f"Reparenting {hl(fs_slug)} from {hl(parent)} to {hl(slug)}")
|
||||
|
||||
platform_versions[fs_slug] = slug
|
||||
self.config.PLATFORMS_VERSIONS = platform_versions
|
||||
|
||||
@@ -18,6 +18,7 @@ from endpoints.responses.config import ConfigResponse
|
||||
from exceptions.config_exceptions import ConfigNotWritableException
|
||||
from handler.auth.constants import Scope
|
||||
from handler.database import db_rom_handler
|
||||
from handler.filesystem import fs_platform_handler
|
||||
from logger.logger import log
|
||||
from utils.router import APIRouter
|
||||
|
||||
@@ -169,6 +170,19 @@ def get_config(request: Request) -> ConfigResponse:
|
||||
)
|
||||
|
||||
|
||||
async def _reject_ambiguous_folder(fs_slug: str) -> None:
|
||||
"""Refuse a mapping that several folders on disk would share."""
|
||||
ambiguous = await fs_platform_handler.find_ambiguous_folders(fs_slug)
|
||||
if ambiguous:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_409_CONFLICT,
|
||||
detail=(
|
||||
f"Folders {', '.join(ambiguous)} differ only by case and share a "
|
||||
"single mapping. Rename one to map them to different platforms."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@protected_route(router.post, "/system/platforms", [Scope.PLATFORMS_WRITE])
|
||||
async def add_platform_binding(
|
||||
request: Request, payload: PlatformBindingPayload
|
||||
@@ -177,6 +191,7 @@ async def add_platform_binding(
|
||||
|
||||
fs_slug = payload.fs_slug
|
||||
slug = payload.slug
|
||||
await _reject_ambiguous_folder(fs_slug)
|
||||
|
||||
try:
|
||||
cm.add_platform_binding(fs_slug, slug)
|
||||
@@ -208,6 +223,7 @@ async def add_platform_version(
|
||||
|
||||
fs_slug = payload.fs_slug
|
||||
slug = payload.slug
|
||||
await _reject_ambiguous_folder(fs_slug)
|
||||
|
||||
try:
|
||||
cm.add_platform_version(fs_slug, slug)
|
||||
|
||||
@@ -192,10 +192,15 @@ def _swappable_disc_file_ids(rom: Rom) -> set[int]:
|
||||
return {f.id for f in playlist_files(rom.files)}
|
||||
|
||||
|
||||
async def _session_status(platform: str, request: Request) -> dict[str, Any]:
|
||||
"""Whether the caller still holds this platform's session, and if not, why
|
||||
it ended. Read-only, so it is safe to poll."""
|
||||
candidates = containers_for_platform(platform)
|
||||
async def _session_status(
|
||||
platform: str,
|
||||
request: Request,
|
||||
candidates: list[ResolvedContainer] | None = None,
|
||||
) -> dict[str, Any]:
|
||||
"""Whether the caller holds a session among `candidates` (the platform's first
|
||||
pool by default), and if not, why it ended. Read-only, so it is safe to poll."""
|
||||
if candidates is None:
|
||||
candidates = containers_for_platform(platform)
|
||||
if not candidates:
|
||||
raise HTTPException(
|
||||
status_code=404,
|
||||
@@ -648,7 +653,7 @@ async def claim_session(
|
||||
The ROM's filesystem path is derived server-side from its database row -
|
||||
the client only supplies a ROM id, never a path.
|
||||
Returns 404 if the ROM doesn't exist or no container serves its platform.
|
||||
Returns 409 if every container serving the platform is occupied.
|
||||
Returns 409 if every container in the platform's first pool is occupied.
|
||||
Returns 428 if the container's pre-existing memory card needs a decision.
|
||||
"""
|
||||
rom = db_rom_handler.get_rom(req.rom_id)
|
||||
@@ -668,9 +673,8 @@ async def claim_session(
|
||||
detail=f"No streaming container configured for platform '{platform}'",
|
||||
)
|
||||
|
||||
# Pool members are interchangeable on emulator and card sync (enforced by
|
||||
# containers_for_platform), so the pre-claim validation below holds for
|
||||
# whichever one the walk ends up winning.
|
||||
# Pool members are interchangeable (`ResolvedContainer.interchangeable_with`),
|
||||
# so the pre-claim validation below holds for whichever one the walk wins.
|
||||
reference = candidates[0]
|
||||
|
||||
# Validate the resume pick before claiming so a bad state_id cannot
|
||||
@@ -933,7 +937,11 @@ async def save_and_exit_session(
|
||||
|
||||
|
||||
@protected_route(router.post, "/sessions/{platform}/heartbeat", [Scope.ROMS_USER_WRITE])
|
||||
async def heartbeat_session(request: Request, platform: str) -> SessionStatusSchema:
|
||||
async def heartbeat_session(
|
||||
request: Request,
|
||||
platform: str,
|
||||
container_key: str | None = Query(default=None, alias="container", max_length=300),
|
||||
) -> SessionStatusSchema:
|
||||
"""Refresh the session's liveness stamp and report whether it still exists.
|
||||
|
||||
The frontend calls this every ~30s while a session is active. A session
|
||||
@@ -943,28 +951,32 @@ async def heartbeat_session(request: Request, platform: str) -> SessionStatusSch
|
||||
Reports `ended` rather than raising 404 when the caller no longer holds the
|
||||
session, so a force-released player learns why on the poll they are already
|
||||
making rather than watching a dead stream.
|
||||
|
||||
`container` names the claim to refresh, needed for a desktop on a container
|
||||
outside the platform's first pool.
|
||||
"""
|
||||
candidates = containers_for_platform(platform)
|
||||
if not candidates:
|
||||
raise HTTPException(
|
||||
status_code=404,
|
||||
detail=f"No streaming container configured for platform '{platform}'",
|
||||
)
|
||||
found = await access.find_session_for_user(candidates, request.user.id)
|
||||
user_id = request.user.id
|
||||
# A named claim answers for itself: another session the caller holds on the
|
||||
# platform is not the one this client is beating.
|
||||
candidates = (
|
||||
[access.named_container(platform, container_key)]
|
||||
if container_key is not None
|
||||
else containers_for_platform(platform)
|
||||
)
|
||||
found = await access.find_session_for_user(candidates, user_id)
|
||||
if found is None:
|
||||
return SessionStatusSchema(**await _session_status(platform, request))
|
||||
return SessionStatusSchema(
|
||||
**await _session_status(platform, request, candidates)
|
||||
)
|
||||
_, session_key, _ = found
|
||||
|
||||
# Merging rather than writing the copy read above keeps a swap that landed
|
||||
# in between; refusing a draining session keeps a heartbeat from making a
|
||||
# container that is already being torn down look live. Either returns None,
|
||||
# meaning the claim is gone and reporting "active" would leave the client
|
||||
# beating a session it no longer holds.
|
||||
# Merging keeps a swap that landed since the read. Refusing a draining or
|
||||
# re-claimed session returns None, so the client stops beating a dead claim.
|
||||
try:
|
||||
refreshed = await mutate_session(
|
||||
session_key,
|
||||
{"last_seen": datetime.now(timezone.utc).isoformat()},
|
||||
require=lambda s: not s.get("draining"),
|
||||
require=lambda s: not s.get("draining") and s.get("user_id") == user_id,
|
||||
)
|
||||
except StreamingSessionContended:
|
||||
# A key too busy to write is a key that exists, so the session is live
|
||||
@@ -972,7 +984,9 @@ async def heartbeat_session(request: Request, platform: str) -> SessionStatusSch
|
||||
log.warning("heartbeat could not stamp contended session %s", session_key)
|
||||
return SessionStatusSchema(status="active", platform=platform)
|
||||
if refreshed is None:
|
||||
return SessionStatusSchema(**await _session_status(platform, request))
|
||||
return SessionStatusSchema(
|
||||
**await _session_status(platform, request, candidates)
|
||||
)
|
||||
await lifecycle.refresh_session_activity(session_key, refreshed)
|
||||
return SessionStatusSchema(status="active", platform=platform)
|
||||
|
||||
|
||||
@@ -471,19 +471,26 @@ async def update_user(
|
||||
cleaned_data["avatar_path"] = file_location
|
||||
|
||||
if cleaned_data:
|
||||
db_user_handler.update_user(id, cleaned_data)
|
||||
# Sessions are keyed by username, so the old one is what identifies
|
||||
# them once the update has renamed the account.
|
||||
previous_username = db_user.username
|
||||
creds_updated = cleaned_data.get("username") or cleaned_data.get(
|
||||
"hashed_password"
|
||||
)
|
||||
|
||||
await auth_handler.apply_user_update(
|
||||
id,
|
||||
cleaned_data,
|
||||
revoke_sessions_for=previous_username if creds_updated else None,
|
||||
)
|
||||
|
||||
if creds_updated and request.user.id == id:
|
||||
request.session.clear()
|
||||
|
||||
# A role change alters the user's effective permissions; tell their UI.
|
||||
if "role" in cleaned_data:
|
||||
await emit_permissions_changed(id)
|
||||
|
||||
# Log out the current user if username or password changed
|
||||
creds_updated = cleaned_data.get("username") or cleaned_data.get(
|
||||
"hashed_password"
|
||||
)
|
||||
if request.user.id == id and creds_updated:
|
||||
request.session.clear()
|
||||
|
||||
db_user = db_user_handler.get_user(id)
|
||||
if not db_user:
|
||||
msg = f"Username with id {id} not found"
|
||||
|
||||
@@ -9,6 +9,7 @@ from joserfc import jwt
|
||||
from joserfc.errors import BadSignatureError, DecodeError
|
||||
from joserfc.jwk import OctKey
|
||||
from passlib.context import CryptContext
|
||||
from redis.exceptions import RedisError
|
||||
from starlette.requests import HTTPConnection
|
||||
|
||||
from config import (
|
||||
@@ -205,6 +206,43 @@ class AuthHandler:
|
||||
|
||||
return user
|
||||
|
||||
async def apply_user_update(
|
||||
self,
|
||||
user_id: int,
|
||||
data: dict[str, Any],
|
||||
revoke_sessions_for: str | None = None,
|
||||
) -> None:
|
||||
"""
|
||||
Write an update to a user, revoking that account's sessions around it.
|
||||
Args:
|
||||
user_id (int): The user the update applies to.
|
||||
data (dict[str, Any]): The fields to write.
|
||||
revoke_sessions_for (str | None): Username the sessions are keyed by,
|
||||
or None to write without revoking.
|
||||
"""
|
||||
from handler.database import db_user_handler
|
||||
|
||||
if revoke_sessions_for:
|
||||
# Ahead of the write: an unreachable Redis then aborts the change
|
||||
# rather than committing it with the account's sessions left live.
|
||||
await RedisSessionMiddleware.clear_user_sessions(revoke_sessions_for)
|
||||
|
||||
db_user_handler.update_user(user_id, data)
|
||||
|
||||
if revoke_sessions_for:
|
||||
# After it, for a login the old password was still good for. The
|
||||
# write has committed, so a failure here is logged, not raised.
|
||||
try:
|
||||
await RedisSessionMiddleware.clear_user_sessions(revoke_sessions_for)
|
||||
except RedisError, OSError:
|
||||
log.error(
|
||||
"Credentials for '%s' changed, but revoking its sessions "
|
||||
"afterwards failed; a session created during the update may "
|
||||
"still be live",
|
||||
hl(revoke_sessions_for, color=CYAN),
|
||||
exc_info=True,
|
||||
)
|
||||
|
||||
async def set_user_new_password(self, user: Any, new_password: str) -> None:
|
||||
"""
|
||||
Set the new password for the user.
|
||||
@@ -212,12 +250,11 @@ class AuthHandler:
|
||||
user (Any): The user object.
|
||||
new_password (str): The new password to set.
|
||||
"""
|
||||
from handler.database import db_user_handler
|
||||
|
||||
db_user_handler.update_user(
|
||||
user.id, {"hashed_password": self.get_password_hash(new_password)}
|
||||
await self.apply_user_update(
|
||||
user.id,
|
||||
{"hashed_password": self.get_password_hash(new_password)},
|
||||
revoke_sessions_for=user.username,
|
||||
)
|
||||
await RedisSessionMiddleware.clear_user_sessions(user.username)
|
||||
|
||||
def generate_invite_link_token(
|
||||
self, user: Any, role: str, expiration: int | None = None
|
||||
|
||||
@@ -31,10 +31,16 @@ class RedisSessionMiddleware:
|
||||
Clears all active sessions for a given user.
|
||||
"""
|
||||
session_ids = await async_cache.smembers(f"user_sessions:{user_id}")
|
||||
if session_ids:
|
||||
for session_id in session_ids:
|
||||
await async_cache.delete(f"session:{session_id}")
|
||||
await async_cache.delete(f"user_sessions:{user_id}")
|
||||
if not session_ids:
|
||||
return
|
||||
|
||||
# A member arrives as bytes from a client that does not decode, and its
|
||||
# repr in a key name would miss the session and leave it live.
|
||||
keys = [
|
||||
f"session:{sid.decode() if isinstance(sid, bytes) else sid}"
|
||||
for sid in session_ids
|
||||
]
|
||||
await async_cache.delete(*keys, f"user_sessions:{user_id}")
|
||||
|
||||
async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
|
||||
if scope["type"] not in ("http", "websocket"):
|
||||
@@ -66,19 +72,29 @@ class RedisSessionMiddleware:
|
||||
user_id = scope["session"].get("sub")
|
||||
|
||||
if scope["session"]:
|
||||
session_id = scope["session"].pop("session_id", None) or str(
|
||||
uuid.uuid4()
|
||||
) # Retrieve or create session_id
|
||||
existing_id = scope["session"].pop("session_id", None)
|
||||
session_id = existing_id or str(uuid.uuid4())
|
||||
session_data_json = json.dumps(scope["session"])
|
||||
await async_cache.set(
|
||||
f"session:{session_id}", session_data_json, ex=self.max_age
|
||||
# Refreshed only while its record is still there, so a
|
||||
# session revoked mid-request is not written back.
|
||||
stored = await async_cache.set(
|
||||
f"session:{session_id}",
|
||||
session_data_json,
|
||||
ex=self.max_age,
|
||||
xx=existing_id is not None,
|
||||
)
|
||||
|
||||
# Add session_id to user set of sessions
|
||||
if user_id:
|
||||
await async_cache.sadd(f"user_sessions:{user_id}", session_id)
|
||||
if stored:
|
||||
# Add session_id to user set of sessions
|
||||
if user_id:
|
||||
await async_cache.sadd(
|
||||
f"user_sessions:{user_id}", session_id
|
||||
)
|
||||
|
||||
header_value = f"{self.session_cookie}={session_id}; path=/; Max-Age={self.max_age}; {self.security_flags}"
|
||||
else:
|
||||
header_value = f"{self.session_cookie}=null; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT; {self.security_flags}"
|
||||
|
||||
header_value = f"{self.session_cookie}={session_id}; path=/; Max-Age={self.max_age}; {self.security_flags}"
|
||||
headers.append("Set-Cookie", header_value)
|
||||
elif session_id:
|
||||
await async_cache.delete(f"session:{session_id}")
|
||||
|
||||
@@ -2,7 +2,7 @@ import functools
|
||||
from collections.abc import Sequence
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import delete, or_, select, update
|
||||
from sqlalchemy import delete, func, or_, select, update
|
||||
from sqlalchemy.orm import Query, Session, selectinload
|
||||
|
||||
from decorators.database import begin_session
|
||||
@@ -103,7 +103,15 @@ class DBPlatformsHandler(DBBaseHandler):
|
||||
query: Query = None, # type: ignore
|
||||
session: Session = None, # type: ignore
|
||||
) -> Platform | None:
|
||||
return session.scalar(query.filter_by(fs_slug=fs_slug).limit(1))
|
||||
platform = session.scalar(query.filter_by(fs_slug=fs_slug).limit(1))
|
||||
if platform:
|
||||
return platform
|
||||
|
||||
# Folder names are matched case-insensitively everywhere else, so a
|
||||
# folder renamed only in case is the same platform, not a new one.
|
||||
return session.scalar(
|
||||
query.filter(func.lower(Platform.fs_slug) == fs_slug.lower()).limit(1)
|
||||
)
|
||||
|
||||
@begin_session
|
||||
@with_firmware
|
||||
|
||||
@@ -77,3 +77,22 @@ class FSPlatformsHandler(FSHandler):
|
||||
platforms = self._exclude_platforms(platforms)
|
||||
|
||||
return platforms
|
||||
|
||||
async def find_ambiguous_folders(self, fs_slug: str) -> list[str]:
|
||||
"""The folders a single config mapping would cover, when it covers several.
|
||||
|
||||
Folder names key the config case-insensitively, so siblings differing
|
||||
only by case (which only a case-sensitive filesystem allows) share one
|
||||
entry and cannot be mapped apart.
|
||||
|
||||
Args:
|
||||
fs_slug: The folder name a mapping is being written for.
|
||||
|
||||
Returns:
|
||||
The matching folders, sorted, or empty when the name is unambiguous.
|
||||
"""
|
||||
folded = fs_slug.lower()
|
||||
matches = sorted(
|
||||
folder for folder in await self.get_platforms() if folder.lower() == folded
|
||||
)
|
||||
return matches if len(matches) > 1 else []
|
||||
@@ -80,7 +80,11 @@ from models.user import User
|
||||
from utils import emoji
|
||||
from utils.audio_tags import persist_embedded_cover, remove_persisted_cover
|
||||
from utils.filesystem import sanitize_filename
|
||||
from utils.platform_aliases import resolve_fs_slug, resolve_platform_slug
|
||||
from utils.platform_aliases import (
|
||||
resolve_fs_folder,
|
||||
resolve_fs_slug,
|
||||
resolve_platform_slug,
|
||||
)
|
||||
|
||||
LOGGER_MODULE_NAME = {"module_name": "scan"}
|
||||
|
||||
@@ -292,7 +296,11 @@ async def scan_platform(
|
||||
if platform:
|
||||
known_fs_slug = resolve_fs_slug(platform.slug, cnfg)
|
||||
if known_fs_slug:
|
||||
platform_attrs["fs_slug"] = known_fs_slug
|
||||
# `resolve_fs_slug` answers with a lowercased config key, but
|
||||
# every path is built from the folder's own casing.
|
||||
platform_attrs["fs_slug"] = (
|
||||
resolve_fs_folder(known_fs_slug, fs_platforms) or known_fs_slug
|
||||
)
|
||||
|
||||
platform_attrs["slug"] = resolve_platform_slug(fs_slug, cnfg)
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ from handler.streaming.config import (
|
||||
ResolvedContainer,
|
||||
containers_by_key,
|
||||
containers_for_platform,
|
||||
entry_for_platform,
|
||||
)
|
||||
from handler.streaming.session_store import get_live_session
|
||||
from models.rom import Rom
|
||||
@@ -106,30 +107,37 @@ async def find_session_for_user(
|
||||
return None
|
||||
|
||||
|
||||
def named_container(platform: str, container_key: str) -> ResolvedContainer:
|
||||
"""A container serving a platform, found by key so one in a later pool stays
|
||||
reachable. Raises 404 when the key names no such container."""
|
||||
candidate = entry_for_platform(containers_by_key().get(container_key, []), platform)
|
||||
if candidate is None:
|
||||
raise HTTPException(
|
||||
status_code=404,
|
||||
detail=f"No streaming container '{container_key}' for platform '{platform}'",
|
||||
)
|
||||
return candidate
|
||||
|
||||
|
||||
async def resolve_named_container(
|
||||
platform: str, container_key: str
|
||||
) -> tuple[ResolvedContainer, str, dict[str, Any] | None]:
|
||||
"""One named container serving a platform, plus whatever session it holds.
|
||||
"""A named container plus whatever session it holds.
|
||||
|
||||
Returns (container, session_key, session), the session being None when the
|
||||
container is free or draining. Raises 404 when the key names no container
|
||||
serving this platform.
|
||||
container is free or draining.
|
||||
"""
|
||||
for candidate in containers_for_platform(platform):
|
||||
session_key = candidate.key
|
||||
if session_key != container_key:
|
||||
continue
|
||||
return candidate, session_key, await get_live_session(session_key)
|
||||
raise HTTPException(
|
||||
status_code=404,
|
||||
detail=f"No streaming container '{container_key}' for platform '{platform}'",
|
||||
return (
|
||||
named_container(platform, container_key),
|
||||
container_key,
|
||||
await get_live_session(container_key),
|
||||
)
|
||||
|
||||
|
||||
async def resolve_owned_session(
|
||||
platform: str, request: Request
|
||||
) -> tuple[ResolvedContainer, str, dict[str, Any]]:
|
||||
"""Find the caller's session among the platform's containers.
|
||||
"""Find the caller's session in the platform's first pool.
|
||||
|
||||
Returns (container, session_key, session). Raises 404 when the platform has
|
||||
no configured container or nothing is active, 403 when every active session
|
||||
|
||||
@@ -3,12 +3,15 @@
|
||||
The raw YAML is loose: a container may serve one platform or a map of them, and
|
||||
may leave its broker host to be derived. Resolution is memoized until the config
|
||||
changes, so an unusable container is reported once rather than once per lookup.
|
||||
A platform's containers form pools of interchangeable members, and a game claim
|
||||
only walks the first.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import secrets
|
||||
from collections.abc import Iterable, Sequence
|
||||
from dataclasses import dataclass
|
||||
from typing import Any
|
||||
from urllib.parse import urlparse, urlunparse
|
||||
@@ -517,38 +520,63 @@ def resolve_containers() -> tuple[ResolvedContainer, ...]:
|
||||
for row, platform in _platform_entries(dict(entry)):
|
||||
resolved.append(_resolve_one(row, platform, entry.get("label")))
|
||||
|
||||
_warn_about_later_pools(resolved)
|
||||
_cache_fingerprint = fingerprint
|
||||
_cached = tuple(resolved)
|
||||
return _cached
|
||||
|
||||
|
||||
def containers_for_platform(platform: str) -> list[ResolvedContainer]:
|
||||
"""Every container serving a platform, in config order.
|
||||
def _pools(containers: Iterable[ResolvedContainer]) -> list[list[ResolvedContainer]]:
|
||||
"""Group containers into pools of interchangeable members. A pool sits at its
|
||||
first member's config position, and members keep config order."""
|
||||
pools: list[list[ResolvedContainer]] = []
|
||||
for container in containers:
|
||||
pool = next((p for p in pools if p[0].interchangeable_with(container)), None)
|
||||
if pool is None:
|
||||
pools.append([container])
|
||||
else:
|
||||
pool.append(container)
|
||||
return pools
|
||||
|
||||
More than one entry is a pool and the claim takes the first free one, so a
|
||||
container that disagrees with the head on emulator or card sync is not a
|
||||
pool member and is left out.
|
||||
"""
|
||||
lower = platform.lower()
|
||||
candidates: list[ResolvedContainer] = []
|
||||
for container in resolve_containers():
|
||||
if container.platform.lower() != lower:
|
||||
continue
|
||||
if not container.key:
|
||||
# Nothing to dial, so a claim would have nowhere to go. The fleet
|
||||
# view still lists it, which is where the operator sees why.
|
||||
continue
|
||||
if candidates and not candidates[0].interchangeable_with(container):
|
||||
|
||||
def _pools_by_platform(
|
||||
resolved: Iterable[ResolvedContainer],
|
||||
) -> dict[str, list[list[ResolvedContainer]]]:
|
||||
"""Every platform's pools, keyed by the lowercased platform."""
|
||||
by_platform: dict[str, list[ResolvedContainer]] = {}
|
||||
for container in resolved:
|
||||
# Nothing to dial, so a claim would have nowhere to go. The fleet view
|
||||
# still lists it, which is where the operator sees why.
|
||||
if container.key:
|
||||
by_platform.setdefault(container.platform.lower(), []).append(container)
|
||||
return {platform: _pools(members) for platform, members in by_platform.items()}
|
||||
|
||||
|
||||
def _warn_about_later_pools(resolved: Sequence[ResolvedContainer]) -> None:
|
||||
"""Name every container a game claim can never reach, once per config."""
|
||||
for pools in _pools_by_platform(resolved).values():
|
||||
later = [c.key for pool in pools[1:] for c in pool]
|
||||
if later:
|
||||
log.warning(
|
||||
"container for platform '%s' disagrees with the first one on "
|
||||
"emulator, memory card sync or protocol, so it is not a pool "
|
||||
"member, skipping: %s",
|
||||
platform,
|
||||
container.key,
|
||||
"containers for platform '%s' disagree on emulator, memory card "
|
||||
"sync, save picker or protocol, so game claims only use the first "
|
||||
"pool; never claimed for a game: %s",
|
||||
pools[0][0].platform,
|
||||
", ".join(later),
|
||||
)
|
||||
continue
|
||||
candidates.append(container)
|
||||
return candidates
|
||||
|
||||
|
||||
def pools_for_platform(platform: str) -> list[list[ResolvedContainer]]:
|
||||
"""Every container serving a platform, grouped into pools. A container that
|
||||
matches no other is a pool of one."""
|
||||
return _pools_by_platform(resolve_containers()).get(platform.lower(), [])
|
||||
|
||||
|
||||
def containers_for_platform(platform: str) -> list[ResolvedContainer]:
|
||||
"""The platform's first pool, which a game claim walks for the first free
|
||||
container, in config order."""
|
||||
pools = pools_for_platform(platform)
|
||||
return pools[0] if pools else []
|
||||
|
||||
|
||||
def containers_by_key() -> dict[str, list[ResolvedContainer]]:
|
||||
@@ -560,6 +588,14 @@ def containers_by_key() -> dict[str, list[ResolvedContainer]]:
|
||||
return grouped
|
||||
|
||||
|
||||
def entry_for_platform(
|
||||
entries: Sequence[ResolvedContainer], platform: str
|
||||
) -> ResolvedContainer | None:
|
||||
"""The record among one container's entries that serves this platform."""
|
||||
lower = platform.lower()
|
||||
return next((e for e in entries if e.platform.lower() == lower), None)
|
||||
|
||||
|
||||
def container_for_session(
|
||||
grouped: dict[str, list[ResolvedContainer]], container_key: str, platform: Any
|
||||
) -> ResolvedContainer | None:
|
||||
@@ -569,21 +605,14 @@ def container_for_session(
|
||||
entries = grouped.get(container_key)
|
||||
if not entries:
|
||||
return None
|
||||
if isinstance(platform, str):
|
||||
lower = platform.lower()
|
||||
for entry in entries:
|
||||
if entry.platform.lower() == lower:
|
||||
return entry
|
||||
return entries[0]
|
||||
entry = entry_for_platform(entries, platform) if isinstance(platform, str) else None
|
||||
return entry or entries[0]
|
||||
|
||||
|
||||
def configured_emulator(platform: str) -> str:
|
||||
"""The emulator a configured container serves this platform with, if any."""
|
||||
lower = platform.lower()
|
||||
for container in resolve_containers():
|
||||
if container.platform.lower() == lower:
|
||||
return container.emulator
|
||||
return ""
|
||||
entry = entry_for_platform(resolve_containers(), platform)
|
||||
return entry.emulator if entry else ""
|
||||
|
||||
|
||||
def streaming_enabled() -> bool:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import logging
|
||||
import os
|
||||
from contextlib import contextmanager
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
@@ -16,6 +17,22 @@ from config.config_manager import (
|
||||
)
|
||||
|
||||
|
||||
@contextmanager
|
||||
def capture_romm_logs(caplog, level=logging.WARNING):
|
||||
"""Capture the `romm` logger, whose records never reach caplog on their own.
|
||||
|
||||
It sets `propagate = False`, so caplog's handler has to be attached to it
|
||||
directly rather than to the root logger.
|
||||
"""
|
||||
romm_logger = logging.getLogger("romm")
|
||||
romm_logger.addHandler(caplog.handler)
|
||||
try:
|
||||
with caplog.at_level(level, logger="romm"):
|
||||
yield caplog
|
||||
finally:
|
||||
romm_logger.removeHandler(caplog.handler)
|
||||
|
||||
|
||||
def test_config_loader():
|
||||
loader = ConfigManager(
|
||||
os.path.join(Path(__file__).resolve().parent, "fixtures", "config/config.yml")
|
||||
@@ -524,15 +541,8 @@ def test_legacy_streaming_container_logs_deprecation_warning(caplog, tmp_path):
|
||||
" broker_host: http://192.168.1.51:8000\n"
|
||||
" label: PCSX2\n"
|
||||
)
|
||||
# The "romm" logger has propagate=False, so caplog's handler must be
|
||||
# added directly to it rather than relying on root-logger propagation.
|
||||
romm_logger = logging.getLogger("romm")
|
||||
romm_logger.addHandler(caplog.handler)
|
||||
try:
|
||||
with caplog.at_level(logging.WARNING, logger="romm"):
|
||||
loader = ConfigManager(str(config_file))
|
||||
finally:
|
||||
romm_logger.removeHandler(caplog.handler)
|
||||
with capture_romm_logs(caplog):
|
||||
loader = ConfigManager(str(config_file))
|
||||
|
||||
assert loader.config.STREAMING_CONTAINERS
|
||||
assert "deprecated" in caplog.text
|
||||
@@ -552,13 +562,8 @@ def test_webstation_streaming_container_does_not_warn(caplog, tmp_path):
|
||||
" platforms:\n"
|
||||
" ps2: pcsx2\n"
|
||||
)
|
||||
romm_logger = logging.getLogger("romm")
|
||||
romm_logger.addHandler(caplog.handler)
|
||||
try:
|
||||
with caplog.at_level(logging.WARNING, logger="romm"):
|
||||
ConfigManager(str(config_file))
|
||||
finally:
|
||||
romm_logger.removeHandler(caplog.handler)
|
||||
with capture_romm_logs(caplog):
|
||||
ConfigManager(str(config_file))
|
||||
|
||||
assert "deprecated" not in caplog.text
|
||||
|
||||
@@ -630,6 +635,48 @@ def test_platform_binding_lookup_ignores_case(tmp_path):
|
||||
assert loader.config.PLATFORMS_BINDING == {}
|
||||
|
||||
|
||||
def test_case_variant_folder_keys_collapse_with_a_warning(caplog, tmp_path):
|
||||
"""One key covers both, so the dropped mapping must not vanish silently."""
|
||||
with capture_romm_logs(caplog):
|
||||
loader = _write_config(
|
||||
tmp_path, ' platforms:\n PSX: "ps2"\n psx: "psx"\n'
|
||||
)
|
||||
|
||||
assert loader.config.PLATFORMS_BINDING == {"psx": "psx"}
|
||||
assert "case variant" in caplog.text
|
||||
assert "ps2" in caplog.text
|
||||
|
||||
|
||||
def test_identical_case_variant_mappings_do_not_warn(caplog, tmp_path):
|
||||
with capture_romm_logs(caplog):
|
||||
loader = _write_config(
|
||||
tmp_path, ' platforms:\n PSX: "psx"\n psx: "psx"\n'
|
||||
)
|
||||
|
||||
assert loader.config.PLATFORMS_BINDING == {"psx": "psx"}
|
||||
assert "case variant" not in caplog.text
|
||||
|
||||
|
||||
def test_rebinding_a_folder_replaces_the_existing_platform(tmp_path):
|
||||
loader = _write_config(tmp_path, ' platforms:\n GameCube: "ngc"\n')
|
||||
|
||||
loader.add_platform_binding("GameCube", "wii")
|
||||
|
||||
assert loader.config.PLATFORMS_BINDING == {"gamecube": "wii"}
|
||||
reloaded = ConfigManager(loader.config_file)
|
||||
assert reloaded.config.PLATFORMS_BINDING == {"gamecube": "wii"}
|
||||
|
||||
|
||||
def test_reparenting_a_folder_replaces_the_existing_version(tmp_path):
|
||||
loader = _write_config(tmp_path, ' versions:\n NAOMI: "arcade"\n')
|
||||
|
||||
loader.add_platform_version("naomi", "dc")
|
||||
|
||||
assert loader.config.PLATFORMS_VERSIONS == {"naomi": "dc"}
|
||||
reloaded = ConfigManager(loader.config_file)
|
||||
assert reloaded.config.PLATFORMS_VERSIONS == {"naomi": "dc"}
|
||||
|
||||
|
||||
def _write_emulatorjs_config(tmp_path: Path, emulatorjs_block: str) -> ConfigManager:
|
||||
config_file = tmp_path / "config.yml"
|
||||
config_file.write_text(f"emulatorjs:\n{emulatorjs_block}")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from unittest.mock import patch
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
from fastapi import status
|
||||
|
||||
@@ -87,6 +87,46 @@ def test_add_platform_version_payload_shape(client, access_token: str):
|
||||
add_platform_version.assert_called_once_with("n64", "1.0")
|
||||
|
||||
|
||||
def test_mapping_a_folder_with_a_case_variant_sibling_is_rejected(
|
||||
client, access_token: str
|
||||
):
|
||||
"""One config key covers both, so the write would remap the sibling too."""
|
||||
with (
|
||||
patch(
|
||||
"endpoints.configs.fs_platform_handler.find_ambiguous_folders",
|
||||
AsyncMock(return_value=["PSX", "psx"]),
|
||||
),
|
||||
patch.object(cm, "add_platform_binding") as add_platform_binding,
|
||||
):
|
||||
response = client.post(
|
||||
"/api/config/system/platforms",
|
||||
headers={"Authorization": f"Bearer {access_token}"},
|
||||
json={"fs_slug": "PSX", "slug": "ps2"},
|
||||
)
|
||||
|
||||
assert response.status_code == status.HTTP_409_CONFLICT
|
||||
assert "differ only by case" in response.json()["detail"]
|
||||
add_platform_binding.assert_not_called()
|
||||
|
||||
|
||||
def test_mapping_a_folder_whose_name_is_unique_is_allowed(client, access_token: str):
|
||||
with (
|
||||
patch(
|
||||
"endpoints.configs.fs_platform_handler.find_ambiguous_folders",
|
||||
AsyncMock(return_value=[]),
|
||||
),
|
||||
patch.object(cm, "add_platform_binding") as add_platform_binding,
|
||||
):
|
||||
response = client.post(
|
||||
"/api/config/system/platforms",
|
||||
headers={"Authorization": f"Bearer {access_token}"},
|
||||
json={"fs_slug": "Nintendo 64", "slug": "n64"},
|
||||
)
|
||||
|
||||
assert response.status_code == status.HTTP_200_OK
|
||||
add_platform_binding.assert_called_once_with("Nintendo 64", "n64")
|
||||
|
||||
|
||||
def test_add_exclusion_payload_shape(client, access_token: str):
|
||||
with patch.object(cm, "add_exclusion") as add_exclusion:
|
||||
response = client.post(
|
||||
|
||||
@@ -2,6 +2,7 @@ import base64
|
||||
import json
|
||||
from datetime import timedelta
|
||||
from http import HTTPStatus
|
||||
from typing import Any
|
||||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
@@ -260,6 +261,136 @@ def test_delete_user(client, access_token: str, editor_user: User):
|
||||
assert response.status_code == HTTPStatus.OK
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_admin_password_reset_invalidates_the_target_user_sessions(
|
||||
client, access_token: str, editor_user: User
|
||||
):
|
||||
"""The reason the revocation is not scoped to the caller: an admin resetting
|
||||
a compromised account has to end that account's sessions, not their own."""
|
||||
basic_auth = base64.b64encode(
|
||||
f"{editor_user.username}:test_editor_password".encode("ascii")
|
||||
).decode("ascii")
|
||||
response = client.post(
|
||||
"/api/login", headers={"Authorization": f"Basic {basic_auth}"}
|
||||
)
|
||||
assert response.status_code == HTTPStatus.OK
|
||||
target_session = response.cookies.get("romm_session")
|
||||
assert target_session is not None
|
||||
|
||||
target_cookie = {"Cookie": f"romm_session={target_session}"}
|
||||
assert client.get("/api/users/me", headers=target_cookie).status_code == (
|
||||
HTTPStatus.OK
|
||||
)
|
||||
|
||||
client.cookies.clear()
|
||||
|
||||
response = client.put(
|
||||
f"/api/users/{editor_user.id}",
|
||||
data={"password": "reset_by_admin_password"},
|
||||
headers={"Authorization": f"Bearer {access_token}"},
|
||||
)
|
||||
assert response.status_code == HTTPStatus.OK
|
||||
|
||||
response = client.get("/api/users/me", headers=target_cookie)
|
||||
assert response.status_code in (HTTPStatus.UNAUTHORIZED, HTTPStatus.FORBIDDEN)
|
||||
|
||||
# The admin's own credentials still work.
|
||||
response = client.get(
|
||||
"/api/users", headers={"Authorization": f"Bearer {access_token}"}
|
||||
)
|
||||
assert response.status_code == HTTPStatus.OK
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_a_failed_revocation_leaves_the_password_unchanged(
|
||||
client, access_token: str, editor_user: User
|
||||
):
|
||||
"""An unreachable Redis aborts the change instead of committing it."""
|
||||
original_hash = editor_user.hashed_password
|
||||
|
||||
with mock.patch.object(
|
||||
RedisSessionMiddleware,
|
||||
"clear_user_sessions",
|
||||
side_effect=ConnectionError("redis is down"),
|
||||
):
|
||||
with pytest.raises(ConnectionError):
|
||||
client.put(
|
||||
f"/api/users/{editor_user.id}",
|
||||
data={"password": "reset_while_redis_is_down"},
|
||||
headers={"Authorization": f"Bearer {access_token}"},
|
||||
)
|
||||
|
||||
db_user = DBUsersHandler().get_user(editor_user.id)
|
||||
assert db_user is not None
|
||||
assert db_user.hashed_password == original_hash
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_a_failed_post_write_revocation_does_not_fail_the_change(
|
||||
client, access_token: str, editor_user: User
|
||||
):
|
||||
"""The write has committed by the second pass, so its failure is logged."""
|
||||
original_hash = editor_user.hashed_password
|
||||
calls: list[str] = []
|
||||
|
||||
async def revoke_then_fail(user_id: str) -> None:
|
||||
calls.append(user_id)
|
||||
if len(calls) == 2:
|
||||
raise ConnectionError("redis went down mid-update")
|
||||
|
||||
with mock.patch.object(
|
||||
RedisSessionMiddleware, "clear_user_sessions", side_effect=revoke_then_fail
|
||||
):
|
||||
response = client.put(
|
||||
f"/api/users/{editor_user.id}",
|
||||
data={"password": "reset_with_redis_failing_late"},
|
||||
headers={"Authorization": f"Bearer {access_token}"},
|
||||
)
|
||||
|
||||
assert response.status_code == HTTPStatus.OK
|
||||
assert len(calls) == 2
|
||||
|
||||
db_user = DBUsersHandler().get_user(editor_user.id)
|
||||
assert db_user is not None
|
||||
assert db_user.hashed_password != original_hash
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_sessions_are_revoked_on_both_sides_of_the_write(
|
||||
client, access_token: str, editor_user: User
|
||||
):
|
||||
"""The second pass catches a login the old password was still good for."""
|
||||
calls: list[str] = []
|
||||
real_update = DBUsersHandler.update_user
|
||||
|
||||
def record_update(
|
||||
self: DBUsersHandler, id: int, data: dict, *args: Any, **kwargs: Any
|
||||
) -> User:
|
||||
# `set_last_active` writes on every authenticated request; only the
|
||||
# credential write is being ordered here.
|
||||
if "hashed_password" in data:
|
||||
calls.append("write")
|
||||
return real_update(self, id, data, *args, **kwargs)
|
||||
|
||||
async def record_revoke(user_id: str) -> None:
|
||||
calls.append("revoke")
|
||||
|
||||
with (
|
||||
mock.patch.object(DBUsersHandler, "update_user", record_update),
|
||||
mock.patch.object(
|
||||
RedisSessionMiddleware, "clear_user_sessions", side_effect=record_revoke
|
||||
),
|
||||
):
|
||||
response = client.put(
|
||||
f"/api/users/{editor_user.id}",
|
||||
data={"password": "another_reset_password"},
|
||||
headers={"Authorization": f"Bearer {access_token}"},
|
||||
)
|
||||
|
||||
assert response.status_code == HTTPStatus.OK
|
||||
assert calls == ["revoke", "write", "revoke"]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_password_change_invalidates_sessions(client, admin_user: User):
|
||||
# Get the user's session cookie
|
||||
|
||||
@@ -54,6 +54,7 @@ from handler.streaming.config import (
|
||||
ResolvedContainer,
|
||||
_derive_broker_host,
|
||||
emulator_display_label,
|
||||
pools_for_platform,
|
||||
reset_cache,
|
||||
resolve_entry,
|
||||
)
|
||||
@@ -536,7 +537,7 @@ def test_clears_stale_saves_has_no_picker_to_gate_on_a_legacy_container(caplog):
|
||||
assert "clears_stale_saves" in caplog.text
|
||||
|
||||
|
||||
def test_a_container_that_disagrees_on_clearing_saves_is_not_a_pool_member(caplog):
|
||||
def test_a_container_that_disagrees_on_clearing_saves_is_a_pool_of_its_own(caplog):
|
||||
"""The picker is advertised from the head of the pool, so a member that
|
||||
keeps its own newer files would take the pick and silently discard it."""
|
||||
first = {
|
||||
@@ -562,7 +563,7 @@ def test_a_container_that_disagrees_on_clearing_saves_is_not_a_pool_member(caplo
|
||||
finally:
|
||||
romm_logger.removeHandler(caplog.handler)
|
||||
assert [c.clears_stale_saves for c in candidates] == [True]
|
||||
assert "not a pool" in caplog.text
|
||||
assert "never claimed for a game" in caplog.text
|
||||
|
||||
|
||||
def test_legacy_containers_still_pool_under_an_inert_clearing_flag():
|
||||
@@ -1223,6 +1224,22 @@ def test_pool_409s_only_once_every_container_is_held(
|
||||
assert "2 containers" in r3.json()["detail"]["message"]
|
||||
|
||||
|
||||
def test_a_claim_never_lands_in_a_later_pool(
|
||||
client, access_token, viewer_access_token, rom: Rom
|
||||
):
|
||||
"""Only the first pool matches the settings a claim is validated against,
|
||||
so a later pool stays out of reach even when it is the only one free."""
|
||||
later = {**_pool_member(rom, 1), "emulator": "other"}
|
||||
with _streaming(_pool_member(rom, 0), later):
|
||||
r1 = _claim_ok(client, access_token, rom.id)
|
||||
r2 = _claim_ok(client, viewer_access_token, rom.id)
|
||||
assert _session_raw(later) is None
|
||||
assert len(pools_for_platform(rom.platform_slug)) == 2
|
||||
assert r1.status_code == 202
|
||||
assert r1.json()["container"] == _key_of(_pool_member(rom, 0))
|
||||
assert r2.status_code == 409
|
||||
|
||||
|
||||
def test_a_pool_does_not_roll_its_own_holder_onto_a_second_container(
|
||||
client, access_token, rom: Rom
|
||||
):
|
||||
@@ -1405,6 +1422,103 @@ def test_admin_release_rejects_a_container_that_serves_another_platform(
|
||||
assert r.status_code == 404
|
||||
|
||||
|
||||
def _in_a_later_ps2_pool() -> dict:
|
||||
"""A second webstation that disagrees with `_webstation()` on the ps2
|
||||
emulator, so it forms a later ps2 pool."""
|
||||
return _webstation(
|
||||
host="http://192.168.1.11:3000",
|
||||
broker_host="http://192.168.1.11:8000",
|
||||
platforms={"ps2": "play", "ngc": "dolphin"},
|
||||
)
|
||||
|
||||
|
||||
def test_admin_release_ends_a_session_on_a_container_in_a_later_pool(
|
||||
client, access_token
|
||||
):
|
||||
"""A game claim never reaches a later pool, but an admin can still end a
|
||||
session there by naming the container."""
|
||||
later = _in_a_later_ps2_pool()
|
||||
with _streaming(_webstation(), later):
|
||||
key = _key_of(later)
|
||||
assert key not in [c.key for c in streaming.containers_for_platform("ps2")]
|
||||
assert _desktop(client, access_token, key)[0].status_code == 200
|
||||
with patch("handler.streaming.commands.stop", return_value=None):
|
||||
r = client.delete(
|
||||
"/api/streaming/sessions/ps2",
|
||||
params={"container": key},
|
||||
headers=_auth(access_token),
|
||||
)
|
||||
assert r.status_code == 200
|
||||
assert r.json()["status"] == "released"
|
||||
assert _session_raw(later) is None
|
||||
|
||||
|
||||
def test_heartbeat_naming_the_container_refreshes_a_desktop_in_a_later_pool(
|
||||
client, access_token
|
||||
):
|
||||
"""The platform's lookup only walks the first pool, so only the named key
|
||||
keeps this desktop claim fresh."""
|
||||
later = _in_a_later_ps2_pool()
|
||||
with _streaming(_webstation(), later):
|
||||
key = _key_of(later)
|
||||
assert _desktop(client, access_token, key)[0].status_code == 200
|
||||
_age_session_on(later, session_store._STREAMING_SESSION_STALE_SECONDS + 60)
|
||||
r = client.post(
|
||||
"/api/streaming/sessions/ps2/heartbeat",
|
||||
params={"container": key},
|
||||
headers=_auth(access_token),
|
||||
)
|
||||
session = json.loads(_session_raw(later))
|
||||
assert r.status_code == 200
|
||||
assert r.json()["status"] == "active"
|
||||
assert not session_store.session_is_stale(session)
|
||||
|
||||
|
||||
def test_heartbeat_naming_a_released_container_reports_ended(client, access_token):
|
||||
"""A session the caller holds on another of the platform's containers must
|
||||
not answer for the named one."""
|
||||
later = _in_a_later_ps2_pool()
|
||||
with _streaming(_webstation(), later):
|
||||
key = _key_of(later)
|
||||
assert (
|
||||
_desktop(client, access_token, _key_of(_webstation()))[0].status_code == 200
|
||||
)
|
||||
assert _desktop(client, access_token, key)[0].status_code == 200
|
||||
with patch("handler.streaming.commands.stop", return_value=None):
|
||||
released = client.delete(
|
||||
"/api/streaming/sessions/ps2",
|
||||
params={"container": key},
|
||||
headers=_auth(access_token),
|
||||
)
|
||||
assert released.status_code == 200
|
||||
r = client.post(
|
||||
"/api/streaming/sessions/ps2/heartbeat",
|
||||
params={"container": key},
|
||||
headers=_auth(access_token),
|
||||
)
|
||||
assert r.status_code == 200
|
||||
assert r.json()["status"] == "ended"
|
||||
|
||||
|
||||
def test_heartbeat_naming_a_container_leaves_another_users_session_alone(
|
||||
client, access_token, viewer_access_token
|
||||
):
|
||||
later = _in_a_later_ps2_pool()
|
||||
with _streaming(_webstation(), later):
|
||||
key = _key_of(later)
|
||||
assert _desktop(client, access_token, key)[0].status_code == 200
|
||||
_age_session_on(later, session_store._STREAMING_SESSION_STALE_SECONDS + 60)
|
||||
r = client.post(
|
||||
"/api/streaming/sessions/ps2/heartbeat",
|
||||
params={"container": key},
|
||||
headers=_auth(viewer_access_token),
|
||||
)
|
||||
session = json.loads(_session_raw(later))
|
||||
assert r.status_code == 200
|
||||
assert r.json()["status"] == "ended"
|
||||
assert session_store.session_is_stale(session)
|
||||
|
||||
|
||||
def test_status_finds_the_termination_on_whichever_container_held_it(
|
||||
client, access_token, viewer_access_token, rom: Rom
|
||||
):
|
||||
@@ -1445,9 +1559,9 @@ def test_heartbeat_refreshes_the_session_on_the_container_that_holds_it(
|
||||
assert after > before
|
||||
|
||||
|
||||
def test_a_container_that_disagrees_on_the_emulator_is_not_a_pool_member(caplog):
|
||||
def test_a_container_that_disagrees_on_the_emulator_is_a_later_pool(caplog):
|
||||
"""Pool members file states and cards in one place, so an entry naming a
|
||||
different emulator is a separate setup rather than a spare container."""
|
||||
different emulator is a pool of its own rather than a spare container."""
|
||||
first = {
|
||||
"platform": "ps2",
|
||||
"host": "http://192.168.1.10:3000",
|
||||
@@ -1457,16 +1571,35 @@ def test_a_container_that_disagrees_on_the_emulator_is_not_a_pool_member(caplog)
|
||||
second = {**first, "host": "http://192.168.1.11:3000"}
|
||||
second["broker_host"] = "http://192.168.1.11:8000"
|
||||
second["emulator"] = "play"
|
||||
third = {
|
||||
**first,
|
||||
"host": "http://192.168.1.12:3000",
|
||||
"broker_host": "http://192.168.1.12:8000",
|
||||
}
|
||||
romm_logger = logging.getLogger("romm")
|
||||
romm_logger.addHandler(caplog.handler)
|
||||
try:
|
||||
with _streaming(first, second):
|
||||
with _streaming(first, second, third):
|
||||
with caplog.at_level(logging.WARNING, logger="romm"):
|
||||
pools = pools_for_platform("ps2")
|
||||
candidates = streaming.containers_for_platform("ps2")
|
||||
finally:
|
||||
romm_logger.removeHandler(caplog.handler)
|
||||
assert [c.emulator for c in candidates] == ["pcsx2"]
|
||||
assert "not a pool" in caplog.text
|
||||
assert [[c.emulator for c in pool] for pool in pools] == [
|
||||
["pcsx2", "pcsx2"],
|
||||
["play"],
|
||||
]
|
||||
assert candidates == pools[0]
|
||||
# Once per config, not once per lookup.
|
||||
assert caplog.text.count("never claimed for a game") == 1
|
||||
assert _key_of(second) in caplog.text
|
||||
|
||||
|
||||
def test_a_lone_container_is_a_pool_of_one(rom: Rom):
|
||||
member = _pool_member(rom, 0)
|
||||
with _streaming(member):
|
||||
pools = pools_for_platform(rom.platform_slug)
|
||||
assert [[c.key for c in pool] for pool in pools] == [[_key_of(member)]]
|
||||
|
||||
|
||||
def test_webstation_pool_members_at_different_subfolders_are_still_a_pool(caplog):
|
||||
@@ -1498,7 +1631,7 @@ def test_webstation_pool_members_at_different_subfolders_are_still_a_pool(caplog
|
||||
"http://192.168.1.10:8000",
|
||||
"http://192.168.1.11:8000",
|
||||
]
|
||||
assert "not a pool" not in caplog.text
|
||||
assert "never claimed for a game" not in caplog.text
|
||||
|
||||
|
||||
def test_a_proxied_host_disagreeing_with_its_subfolder_cannot_be_claimed(caplog):
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
"""Test suite for RedisSessionMiddleware's Redis-backed session persistence."""
|
||||
|
||||
from starlette.applications import Starlette
|
||||
from starlette.middleware import Middleware
|
||||
from starlette.requests import Request
|
||||
from starlette.responses import JSONResponse
|
||||
from starlette.routing import Route
|
||||
from starlette.testclient import TestClient
|
||||
|
||||
from handler.auth.constants import SESSION_COOKIE_NAME
|
||||
from handler.auth.middleware.redis_session_middleware import RedisSessionMiddleware
|
||||
|
||||
USERNAME = "user_1"
|
||||
|
||||
|
||||
def create_test_app() -> Starlette:
|
||||
async def login(request: Request) -> JSONResponse:
|
||||
request.session["iss"] = "romm:auth"
|
||||
request.session["sub"] = USERNAME
|
||||
return JSONResponse({"ok": True})
|
||||
|
||||
async def revoke(request: Request) -> JSONResponse:
|
||||
"""Revoke the caller's sessions while their own request is in flight."""
|
||||
await RedisSessionMiddleware.clear_user_sessions(USERNAME)
|
||||
return JSONResponse({"ok": True})
|
||||
|
||||
async def whoami(request: Request) -> JSONResponse:
|
||||
return JSONResponse({"sub": request.session.get("sub")})
|
||||
|
||||
return Starlette(
|
||||
routes=[
|
||||
Route("/login", login, methods=["POST"]),
|
||||
Route("/revoke", revoke, methods=["POST"]),
|
||||
Route("/whoami", whoami, methods=["GET"]),
|
||||
],
|
||||
middleware=[
|
||||
Middleware(
|
||||
RedisSessionMiddleware,
|
||||
session_cookie=SESSION_COOKIE_NAME,
|
||||
same_site="strict",
|
||||
https_only=False,
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
class TestRedisSessionMiddleware:
|
||||
def test_session_survives_across_requests(self) -> None:
|
||||
client = TestClient(create_test_app())
|
||||
|
||||
assert client.post("/login").status_code == 200
|
||||
assert client.get("/whoami").json()["sub"] == USERNAME
|
||||
|
||||
def test_revoked_session_is_not_restored_by_an_in_flight_request(self) -> None:
|
||||
"""A session revoked mid-flight must not be written back."""
|
||||
client = TestClient(create_test_app())
|
||||
client.post("/login")
|
||||
|
||||
client.post("/revoke")
|
||||
|
||||
assert client.get("/whoami").json()["sub"] is None
|
||||
|
||||
def test_a_cookie_for_an_unknown_session_gets_a_fresh_id(self) -> None:
|
||||
client = TestClient(create_test_app())
|
||||
client.cookies.set(SESSION_COOKIE_NAME, "not-a-real-session")
|
||||
|
||||
response = client.post("/login")
|
||||
|
||||
assert response.cookies[SESSION_COOKIE_NAME] != "not-a-real-session"
|
||||
@@ -2,6 +2,32 @@ from handler.database import db_platform_handler
|
||||
from models.platform import Platform
|
||||
|
||||
|
||||
def test_lookup_finds_a_folder_renamed_only_in_case():
|
||||
"""A rescan must reuse the row, not add a second platform beside it."""
|
||||
stored = db_platform_handler.add_platform(
|
||||
Platform(name="N64", slug="n64", fs_slug="nintendo 64")
|
||||
)
|
||||
|
||||
found = db_platform_handler.get_platform_by_fs_slug("Nintendo 64")
|
||||
|
||||
assert found is not None
|
||||
assert found.id == stored.id
|
||||
|
||||
|
||||
def test_lookup_returns_the_exactly_named_folder_when_one_exists():
|
||||
"""The exact spelling is tried first, for backends that can tell them apart.
|
||||
|
||||
MariaDB and MySQL match case-insensitively by collation, so only the
|
||||
exactly-named row is asserted here; PostgreSQL additionally distinguishes
|
||||
the sibling.
|
||||
"""
|
||||
exact = db_platform_handler.add_platform(
|
||||
Platform(name="PlayStation", slug="psx", fs_slug="psx")
|
||||
)
|
||||
|
||||
assert db_platform_handler.get_platform_by_fs_slug("psx").id == exact.id
|
||||
|
||||
|
||||
def test_rescan_preserves_user_authored_fields(platform):
|
||||
"""A rescan merges a freshly built Platform over the existing row.
|
||||
|
||||
|
||||
@@ -205,6 +205,24 @@ class TestFSPlatformsHandler:
|
||||
assert "n64" in result
|
||||
assert "psx" not in result
|
||||
|
||||
async def test_find_ambiguous_folders_reports_case_variant_siblings(
|
||||
self, handler: FSPlatformsHandler
|
||||
):
|
||||
"""One config key covers both, so they cannot be mapped apart."""
|
||||
with patch.object(handler, "get_platforms", return_value=["PSX", "n64", "psx"]):
|
||||
assert await handler.find_ambiguous_folders("psx") == ["PSX", "psx"]
|
||||
assert await handler.find_ambiguous_folders("PSX") == ["PSX", "psx"]
|
||||
|
||||
async def test_find_ambiguous_folders_ignores_an_unshared_name(
|
||||
self, handler: FSPlatformsHandler
|
||||
):
|
||||
with patch.object(
|
||||
handler, "get_platforms", return_value=["Nintendo 64", "psx"]
|
||||
):
|
||||
assert await handler.find_ambiguous_folders("Nintendo 64") == []
|
||||
assert await handler.find_ambiguous_folders("nintendo 64") == []
|
||||
assert await handler.find_ambiguous_folders("absent") == []
|
||||
|
||||
async def test_get_platforms_calls_list_directories_with_correct_path(
|
||||
self, handler: FSPlatformsHandler, config
|
||||
):
|
||||
|
||||
@@ -18,6 +18,11 @@ NGINX_UPSTREAM_IDLE_TIMEOUT = 60
|
||||
# pool is off entirely and the timeout invariant stops meaning anything.
|
||||
NGINX_UPSTREAM_KEEPALIVE_SINCE = (1, 29, 7)
|
||||
|
||||
# njs 0.9.7 dropped the "js vm init njs" notice it logged on every start. nginx
|
||||
# 1.30.0 also shipped builds bundling njs 0.9.6, so 1.30.1 is the first release
|
||||
# that never logs it.
|
||||
NJS_QUIET_STARTUP_SINCE = (1, 30, 1)
|
||||
|
||||
REQUIRED_GZIP_TYPES = [
|
||||
"application/wasm", # EmulatorJS, js-dos and FAKE-08 cores
|
||||
"image/svg+xml", # player logos and favicons
|
||||
@@ -47,16 +52,32 @@ def test_compressible_types_are_gzipped(gzip_types: set[str], media_type: str) -
|
||||
assert media_type in gzip_types, f"{media_type} would be served uncompressed"
|
||||
|
||||
|
||||
def test_nginx_defaults_upstream_keepalive_on() -> None:
|
||||
def _format(version: tuple[int, ...]) -> str:
|
||||
return ".".join(str(part) for part in version)
|
||||
|
||||
|
||||
def _nginx_version() -> tuple[int, ...]:
|
||||
match = re.search(r"^ARG NGINX_VERSION=(\S+)", DOCKERFILE.read_text(), re.M)
|
||||
assert match, "docker/Dockerfile is missing an ARG NGINX_VERSION pin"
|
||||
version = tuple(int(part) for part in match.group(1).split("."))
|
||||
return tuple(int(part) for part in match.group(1).split("."))
|
||||
|
||||
|
||||
def test_nginx_defaults_upstream_keepalive_on() -> None:
|
||||
version = _nginx_version()
|
||||
assert version >= NGINX_UPSTREAM_KEEPALIVE_SINCE, (
|
||||
f"nginx {match.group(1)} does not pool upstream connections by default, "
|
||||
f"nginx {_format(version)} does not pool upstream connections by default, "
|
||||
f"so every API request opens a new one"
|
||||
)
|
||||
|
||||
|
||||
def test_nginx_starts_without_the_njs_notice() -> None:
|
||||
version = _nginx_version()
|
||||
assert version >= NJS_QUIET_STARTUP_SINCE, (
|
||||
f"nginx {_format(version)} bundles an njs that logs a 'js vm init njs' "
|
||||
f"notice on every start, because the config imports a VM at the http level"
|
||||
)
|
||||
|
||||
|
||||
def test_gunicorn_outlives_nginx_upstream_idle_timeout() -> None:
|
||||
assert _init_script_keepalive() > NGINX_UPSTREAM_IDLE_TIMEOUT
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ from config.config_manager import Config
|
||||
from utils.platform_aliases import (
|
||||
PLATFORM_FS_ALIASES,
|
||||
PLATFORM_SLUG_FOLDERS,
|
||||
resolve_fs_folder,
|
||||
resolve_fs_slug,
|
||||
resolve_platform_slug,
|
||||
)
|
||||
@@ -85,6 +86,23 @@ def test_slug_reached_by_several_folders_has_no_reverse():
|
||||
assert resolve_fs_slug("my-custom-slug", _config()) is None
|
||||
|
||||
|
||||
def test_resolves_a_config_key_to_the_folder_on_disk():
|
||||
"""Config keys are lowercased; paths need the folder's own casing."""
|
||||
assert resolve_fs_folder("nintendo 64", ["Nintendo 64", "psx"]) == "Nintendo 64"
|
||||
|
||||
|
||||
def test_resolves_a_folder_that_is_not_on_disk_to_nothing():
|
||||
assert resolve_fs_folder("nintendo 64", ["psx"]) is None
|
||||
|
||||
|
||||
def test_two_folders_differing_only_by_case_each_resolve_to_themselves():
|
||||
"""A case-sensitive filesystem allows both; neither may claim the other."""
|
||||
folders = ["PSX", "psx"]
|
||||
|
||||
assert resolve_fs_folder("psx", folders) == "psx"
|
||||
assert resolve_fs_folder("PSX", folders) == "PSX"
|
||||
|
||||
|
||||
def test_reverse_map_agrees_with_alias_table():
|
||||
for slug, fs_slug in PLATFORM_SLUG_FOLDERS.items():
|
||||
assert PLATFORM_FS_ALIASES[fs_slug].value == slug
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Iterable
|
||||
from typing import TYPE_CHECKING, Final
|
||||
|
||||
from utils.platform_slugs import UniversalPlatformSlug as UPS
|
||||
@@ -190,3 +191,23 @@ def resolve_fs_slug(slug: str, config: Config) -> str | None:
|
||||
if bound == slug:
|
||||
return fs_slug
|
||||
return PLATFORM_SLUG_FOLDERS.get(slug)
|
||||
|
||||
|
||||
def resolve_fs_folder(fs_slug: str, fs_platforms: Iterable[str]) -> str | None:
|
||||
"""Resolve a folder name to the one on disk it names, ignoring case.
|
||||
|
||||
Config keys are lowercased, but paths are built from the folder's own
|
||||
casing. An exact match wins, so on a case-sensitive filesystem two folders
|
||||
differing only by case each still resolve to themselves.
|
||||
|
||||
Returns:
|
||||
The folder as it is spelled on disk, or None when none matches.
|
||||
"""
|
||||
folded = fs_slug.lower()
|
||||
fallback: str | None = None
|
||||
for folder in fs_platforms:
|
||||
if folder == fs_slug:
|
||||
return folder
|
||||
if fallback is None and folder.lower() == folded:
|
||||
fallback = folder
|
||||
return fallback
|
||||
+24
-12
@@ -1,4 +1,5 @@
|
||||
# Stages:
|
||||
# - python-runtime: Patch the Python image's libraries before they ship
|
||||
# - frontend-build: Build frontend
|
||||
# - backend-build: Build backend environment
|
||||
# - backend-dev-build: Similar to `backend-build`, but also compiles and installs development dependencies
|
||||
@@ -14,15 +15,15 @@
|
||||
|
||||
|
||||
# ARGUMENT DECLARATIONS
|
||||
ARG ALPINE_VERSION=3.23
|
||||
ARG ALPINE_SHA256=25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659
|
||||
ARG ALPINE_VERSION=3.24
|
||||
ARG ALPINE_SHA256=294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6
|
||||
# Pins the base image tag, so it cannot read ../.python-version; keep the two in sync.
|
||||
ARG PYTHON_VERSION=3.14
|
||||
ARG PYTHON_ALPINE_SHA256=8caa2adfeb414dfe68d8b257f7aea9e205a400521c2b13b2d2e5e731fb8e70e5
|
||||
ARG PYTHON_ALPINE_SHA256=9e9fde4d32eedce0b661d9ab91e826b62dddf28e928c230ec55f1866cac66b01
|
||||
ARG NODE_VERSION=24.16
|
||||
ARG NODE_ALPINE_SHA256=2bdb65ed1dab192432bc31c95f94155ca5ad7fc1392fb7eb7526ab682fa5bf14
|
||||
ARG NGINX_VERSION=1.29.8
|
||||
ARG NGINX_SHA256=5616878291a2eed594aee8db4dade5878cf7edcb475e59193904b198d9b830de
|
||||
ARG NODE_ALPINE_SHA256=21f403ab171f2dc89bad4dd69d7721bfd15f084ccb46cdd225f31f2bc59b5c9a
|
||||
ARG NGINX_VERSION=1.30.5
|
||||
ARG NGINX_SHA256=a5f2157a0302eb0c5e300415effb63a9e70ed1eb9c107283819bf6d149ab607c
|
||||
ARG UV_VERSION=0.12.13
|
||||
ARG UV_SHA256=eb47c391d3a252d9d912270dd2b5e234af5493e92039fedb483f1dd1cb5659ce
|
||||
|
||||
@@ -30,6 +31,15 @@ ARG UV_SHA256=eb47c391d3a252d9d912270dd2b5e234af5493e92039fedb483f1dd1cb5659ce
|
||||
FROM python:${PYTHON_VERSION}-alpine${ALPINE_VERSION}@sha256:${PYTHON_ALPINE_SHA256} AS python-alias
|
||||
|
||||
|
||||
# PATCHED PYTHON RUNTIME
|
||||
# production-stage copies /usr/lib from here over its own, so these libraries
|
||||
# need the same patches, or the stale ones land in the final image. Kept apart
|
||||
# from python-alias so that busting this layer's cache (see `no-cache-filters`
|
||||
# in build.yml) does not also rebuild the venv and the sigil bindings.
|
||||
FROM python-alias AS python-runtime
|
||||
RUN apk upgrade --no-cache
|
||||
|
||||
|
||||
# FRONTEND BUILD
|
||||
# Built on the native build platform: the output (/front/dist) is static JS/CSS,
|
||||
# fully architecture-independent, so there is no need to emulate the target arch.
|
||||
@@ -217,7 +227,9 @@ RUN git clone https://github.com/evanmiller/mod_zip.git && \
|
||||
FROM nginx:${NGINX_VERSION}-alpine${ALPINE_VERSION}@sha256:${NGINX_SHA256} AS production-stage
|
||||
ARG WEBSERVER_FOLDER=/var/www/html
|
||||
|
||||
RUN apk add --no-cache \
|
||||
# Alpine backports security fixes to its repo faster than the base image is
|
||||
# rebuilt, so the digest pin alone leaves known-vulnerable packages in the image.
|
||||
RUN apk upgrade --no-cache && apk add --no-cache \
|
||||
bash \
|
||||
libarchive-tools \
|
||||
libmagic \
|
||||
@@ -234,11 +246,11 @@ RUN apk add --no-cache \
|
||||
# TODO: Replace with a bundled installation of Python using `uv`, when it is supported.
|
||||
# Related issue: https://github.com/astral-sh/uv/issues/7865
|
||||
ARG PYTHON_VERSION
|
||||
COPY --from=python-alias /usr/lib/* /usr/lib/
|
||||
COPY --from=python-alias /usr/local/bin/* /usr/local/bin/
|
||||
COPY --from=python-alias /usr/local/include/python${PYTHON_VERSION} /usr/local/include/python${PYTHON_VERSION}
|
||||
COPY --from=python-alias /usr/local/lib/libpython* /usr/local/lib/
|
||||
COPY --from=python-alias /usr/local/lib/python${PYTHON_VERSION} /usr/local/lib/python${PYTHON_VERSION}
|
||||
COPY --from=python-runtime /usr/lib/* /usr/lib/
|
||||
COPY --from=python-runtime /usr/local/bin/* /usr/local/bin/
|
||||
COPY --from=python-runtime /usr/local/include/python${PYTHON_VERSION} /usr/local/include/python${PYTHON_VERSION}
|
||||
COPY --from=python-runtime /usr/local/lib/libpython* /usr/local/lib/
|
||||
COPY --from=python-runtime /usr/local/lib/python${PYTHON_VERSION} /usr/local/lib/python${PYTHON_VERSION}
|
||||
|
||||
COPY --from=rahasher-build /RALibretro/bin64/RAHasher /usr/bin/RAHasher
|
||||
COPY --from=nginx-build ./nginx/objs/ngx_http_zip_module.so /usr/lib/nginx/modules/
|
||||
|
||||
@@ -123,7 +123,8 @@ frontend/
|
||||
├── index.html # HTML entry point (<div id="app">)
|
||||
├── package.json # Dependencies & scripts
|
||||
├── vite.config.js # Vite build config with plugins
|
||||
├── tsconfig.json # TypeScript configuration
|
||||
├── tsconfig.json # Vue app TypeScript (vue-tsc)
|
||||
├── tsconfig.node.json # Node/Vite tooling TypeScript (tsc -p)
|
||||
├── eslint.config.js # ESLint flat config
|
||||
├── .nvmrc # Node 24
|
||||
│
|
||||
@@ -1099,14 +1100,15 @@ Procedural SVG generation for:
|
||||
|
||||
### Scripts
|
||||
|
||||
| Script | Command | Purpose |
|
||||
| ----------- | ---------------------------- | ----------------------------------- |
|
||||
| `dev` | `vite --host` | Development server |
|
||||
| `build` | `vite build` | Production build |
|
||||
| `preview` | `vite preview` | Preview production build |
|
||||
| `typecheck` | `vue-tsc` | TypeScript validation |
|
||||
| `generate` | `openapi-typescript-codegen` | Generate types from backend OpenAPI |
|
||||
| `lint` | `eslint` | Lint `.vue`, `.js`, `.ts` files |
|
||||
| Script | Command | Purpose |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
|
||||
| `dev` | `vite --host` | Development server |
|
||||
| `build` | `vite build` | Production build |
|
||||
| `preview` | `vite preview` | Preview production build |
|
||||
| `typecheck` | `vue-tsc --noEmit` | App SFCs (`tsconfig.json`) |
|
||||
| `typecheck:scripts` | `tsc --noEmit -p tsconfig.node.json` | Node/Vite tooling in `scripts/` (`tsconfig.node.json`) |
|
||||
| `generate` | `openapi-typescript-codegen` | Generate types from backend OpenAPI |
|
||||
| `lint` | `eslint` | Lint `.vue`, `.js`, `.ts`; import cycles |
|
||||
|
||||
### OpenAPI Code Generation
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# Browser support baseline for the RomM frontend. Matches Tailwind v4's
|
||||
# minimum targets. This is the single source of truth for browser support:
|
||||
# vite.config.js derives Lightning CSS's `build.cssTarget` from it (so the
|
||||
# production build prefixes/down-levels CSS for exactly these browsers), and
|
||||
# any other tooling reads the same file. Expressed as floors, not pinned
|
||||
# versions, and the actual version data comes from caniuse-lite.
|
||||
chrome >= 111
|
||||
edge >= 111
|
||||
firefox >= 128
|
||||
safari >= 16.4
|
||||
ios_saf >= 16.4
|
||||
@@ -1,5 +1,7 @@
|
||||
import eslint from "@eslint/js";
|
||||
import prettierConfig from "eslint-config-prettier/flat";
|
||||
import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
|
||||
import importX from "eslint-plugin-import-x";
|
||||
import vue from "eslint-plugin-vue";
|
||||
import vuea11y from "eslint-plugin-vuejs-accessibility";
|
||||
import globals from "globals";
|
||||
@@ -10,6 +12,21 @@ export default tseslint.config(
|
||||
...tseslint.configs.recommended,
|
||||
...vue.configs["flat/recommended"],
|
||||
...vuea11y.configs["flat/recommended"],
|
||||
importX.flatConfigs.recommended,
|
||||
importX.flatConfigs.typescript,
|
||||
{
|
||||
// Only the cycle rule below earns its keep; the rest of the preset
|
||||
// re-reports what vue-tsc already catches, at a module graph per rule.
|
||||
rules: {
|
||||
"import-x/no-unresolved": "off",
|
||||
"import-x/named": "off",
|
||||
"import-x/namespace": "off",
|
||||
"import-x/default": "off",
|
||||
"import-x/export": "off",
|
||||
"import-x/no-named-as-default": "off",
|
||||
"import-x/no-named-as-default-member": "off",
|
||||
},
|
||||
},
|
||||
// Global ignore (object with only `ignores` = applies everywhere).
|
||||
// Storybook config files live outside `src/` and aren't part of the
|
||||
// app tsconfig, so type-aware linting can't resolve them.
|
||||
@@ -75,6 +92,33 @@ export default tseslint.config(
|
||||
],
|
||||
},
|
||||
},
|
||||
// Import cycles. The resolver has to be the one that reads tsconfig `paths`,
|
||||
// or `@/*` and `@v2/*` go unresolved and the rule silently passes.
|
||||
{
|
||||
files: ["src/**/*.ts", "src/**/*.vue"],
|
||||
settings: {
|
||||
"import-x/resolver-next": [
|
||||
createTypeScriptImportResolver({
|
||||
project: "./tsconfig.json",
|
||||
extensions: [".ts", ".tsx", ".vue", ".js", ".mjs", ".json"],
|
||||
}),
|
||||
],
|
||||
},
|
||||
rules: {
|
||||
// Lazy route components make the router reachable from the views it
|
||||
// renders; that edge is resolved at runtime, so it is not a real cycle.
|
||||
"import-x/no-cycle": [
|
||||
"error",
|
||||
{ maxDepth: 15, allowUnsafeDynamicCyclicDependency: true },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
// Frozen v1: two cycles between the console theme helpers predate the
|
||||
// rule and cannot be refactored under the freeze.
|
||||
files: ["src/console/**"],
|
||||
rules: { "import-x/no-cycle": "off" },
|
||||
},
|
||||
// Keep last: Prettier owns formatting, so this switches off every
|
||||
// stylistic rule the two tools would otherwise fight over.
|
||||
prettierConfig,
|
||||
|
||||
Generated
+549
-1
@@ -52,9 +52,10 @@
|
||||
"@vue/test-utils": "^2.4.9",
|
||||
"@vue/tsconfig": "^0.9.1",
|
||||
"axe-core": "^4.12.1",
|
||||
"browserslist": "^4.28.8",
|
||||
"eslint": "^10.0.3",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-import-resolver-typescript": "^4.4.5",
|
||||
"eslint-plugin-import-x": "^4.17.1",
|
||||
"eslint-plugin-vue": "^10.8.0",
|
||||
"eslint-plugin-vuejs-accessibility": "^2.5.0",
|
||||
"globals": "^16.0.0",
|
||||
@@ -5374,6 +5375,349 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-android-arm-eabi": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.12.2.tgz",
|
||||
"integrity": "sha512-g5T90pqg1bo/7mytQx6F4iBNC0Wsh9cu+z9veDbFjc7HjpesJFWD7QMS0NGStXM075+7dJPPVvBbpZlnrdpi/w==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-android-arm64": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.12.2.tgz",
|
||||
"integrity": "sha512-YGCRZv/9GLhwmz6mYDeTsm/92BAyR28l6c2ReweVW5pWgfsitWLY8upvfRlGdoyD8HjeTHSYJWyZGD4KJA/nFQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-darwin-arm64": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.12.2.tgz",
|
||||
"integrity": "sha512-u9DiNT1auQMO20A9SyTuG3wUgQWB9Z7KjAg0uFuCDR1FsAY8A0CG2S6JpHS1xwm/w1G08bjXZDcyOCjv1WAm2w==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-darwin-x64": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.12.2.tgz",
|
||||
"integrity": "sha512-f7rPLi/T1HVKZu/u6t87lroib16n8vrSzcyxI7lg4BGO9UF26KhQL44sd9eOUgrTYhvRXtWOIZT5PejdPyJfUA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-freebsd-x64": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.12.2.tgz",
|
||||
"integrity": "sha512-BpcOjWCJub6nRZUS2zA20pmLvjtqAtGejETaIyRLiZiQf++cbrjltLA5NN/xaXfqeOBOSlMFbemIl5/S5tljmg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"freebsd"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.12.2.tgz",
|
||||
"integrity": "sha512-vZTDvdSISZjJx66OzJqtsOhzifbqRjbmI1Mnu49fQDwog5GtDI4QidRiEAYbZCRj9C8YZEW+3ZjqsyS9GR4k2A==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-linux-arm-musleabihf": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.12.2.tgz",
|
||||
"integrity": "sha512-BiPI+IrIlwcW4nLLMM21+B1dFPzd55yAVgVGrdgDjNef+ch03GdxrcyaIz8X9SsQirh/kCQ7mviyWlMxdh2D7g==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-linux-arm64-gnu": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.12.2.tgz",
|
||||
"integrity": "sha512-zJc0H99FEPoFfSrNpa91HYfxzfAJCr502oxNK1cfdC9hlaFI43RT+JFCann9JUgZmLzzntChHyn13Sgn9ljHNg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-linux-arm64-musl": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.12.2.tgz",
|
||||
"integrity": "sha512-KQ3Lki6l+Pz1k/eBipN41ES+YUK30beLGb9YqcB1O542cyLCNE6GaxrfcY3T6EezmGGk84wb5XyO9loTM9tkcA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-linux-loong64-gnu": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-gnu/-/resolver-binding-linux-loong64-gnu-1.12.2.tgz",
|
||||
"integrity": "sha512-3SJGEh1DborhG6pyxvhPzCT4bbSIVihsvgJc13P1bHG7KLdNDaF9T3gsTwFc7Jw/5Y5/iWOjkEx7Zy0NvCGX3Q==",
|
||||
"cpu": [
|
||||
"loong64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-linux-loong64-musl": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-musl/-/resolver-binding-linux-loong64-musl-1.12.2.tgz",
|
||||
"integrity": "sha512-jiuG/Obbel7uw1PwHNFfrkiKhLAF6mnyZ6aWlOAVN9WqKm8v0OFGnciJIHu8+CMvXLQ8AD51LPzAoUfT21D5Ew==",
|
||||
"cpu": [
|
||||
"loong64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-linux-ppc64-gnu": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.12.2.tgz",
|
||||
"integrity": "sha512-q7xRvVpmcfeL+LlZg8Pbbo6QaTZwDU5BaGZbwfhkEsXJn3Was8xYfE0RBH266xZt0rM6B7i8xAYIvjthuUIWHg==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-linux-riscv64-gnu": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.12.2.tgz",
|
||||
"integrity": "sha512-0CVdx6lcnT3Q9inOH8tsMIOJ6ImndllMjqJHg8RLVdB7Vq4SfkEXl9mCSsVNuNA4MCYycRicCUxPCabVHJRr6A==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-linux-riscv64-musl": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.12.2.tgz",
|
||||
"integrity": "sha512-iOwlRo9vnp6R6ohHQS11n0NnfdXx/omhkocmIfaPRpQhKZ+3BDMkkdRVh53qjkFkpPddf+FETA28NwGN7l5l+w==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-linux-s390x-gnu": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.12.2.tgz",
|
||||
"integrity": "sha512-HYJtLfXq94q8iZNFT1lknx258wlkkWhZeUXJRqzKBBUJ00CvZ+N33zgbCqimLjsyw5Va6uUxhVa12mI+kaveEw==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-linux-x64-gnu": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.12.2.tgz",
|
||||
"integrity": "sha512-mPsUhunKKDih5O96Y6enDQyHc1SqBPlY1E/SfMWDM3EdJ95Z9CArPeCVwCCqbP45ljvivdEk8Fxn+SIb1rDAJQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-linux-x64-musl": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.12.2.tgz",
|
||||
"integrity": "sha512-azrt6+5ydLd8Vt210AAFis/lZevSfPw93EJRIJG+xPu4WCJ8K0kppCTpMyLPcKT7H15M4Jnt2tMp5bOvCkRC6A==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-openharmony-arm64": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-openharmony-arm64/-/resolver-binding-openharmony-arm64-1.12.2.tgz",
|
||||
"integrity": "sha512-YZ9hP4O0X9PQb8eO980qmLNGH4zT3I9+SZTdt0Pr0YyuGQhYKoOZkV02VzrzyOZJ5xIJ3UFIenKkUkGg8GjgWQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"openharmony"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-wasm32-wasi": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.12.2.tgz",
|
||||
"integrity": "sha512-tYFDIkMxSflfEc/h92ZWNsZlHSwgimbNHSO3PL2JWQHfCuC2q316jMyYU9TIWZsFK2bQwyK5VAdYgn8ygPj69A==",
|
||||
"cpu": [
|
||||
"wasm32"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@emnapi/core": "1.10.0",
|
||||
"@emnapi/runtime": "1.10.0",
|
||||
"@napi-rs/wasm-runtime": "^1.1.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-win32-arm64-msvc": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.12.2.tgz",
|
||||
"integrity": "sha512-qzNyg3xL0VPQmCaUh+N5jSitce6k+uCBfMDesWRnlULOZaqUkaJ0ybdT+UqlAWJoQjuqfIU/0Ptx9bteN4D82g==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-win32-ia32-msvc": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.12.2.tgz",
|
||||
"integrity": "sha512-WD9sY00OfpHVGfsnHZoA8jVT+esS/Bg8z8jzxp5BnDCjjwsuKsPQrzswwpFy4J1AUJbXPRfkpcX0mXrzeXW79g==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/@unrs/resolver-binding-win32-x64-msvc": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.12.2.tgz",
|
||||
"integrity": "sha512-nAB74NfSNKknqQ1RrYj6uz8FcXEomu/MATJZxh/x+BArzN2U3JbOYC0APYzUIGhVY3m5hRxA8VPNdPBoG8txlA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/@vavt/copy2clipboard": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@vavt/copy2clipboard/-/copy2clipboard-1.0.3.tgz",
|
||||
@@ -6615,6 +6959,16 @@
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/comment-parser": {
|
||||
"version": "1.4.9",
|
||||
"resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.9.tgz",
|
||||
"integrity": "sha512-+2AvZKjJaNq9GQljm3tr0utwrig5BL+jgJGvz5rDpGKNIp+ojcRXWUwBbh/sGIi1QCprR6PsKFakub+w1v+4hQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/common-tags": {
|
||||
"version": "1.8.2",
|
||||
"resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz",
|
||||
@@ -7445,6 +7799,103 @@
|
||||
"eslint": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-import-context": {
|
||||
"version": "0.1.9",
|
||||
"resolved": "https://registry.npmjs.org/eslint-import-context/-/eslint-import-context-0.1.9.tgz",
|
||||
"integrity": "sha512-K9Hb+yRaGAGUbwjhFNHvSmmkZs9+zbuoe3kFQ4V1wYjrepUFYM2dZAfNtjbbj3qsPfUfsA68Bx/ICWQMi+C8Eg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"get-tsconfig": "^4.10.1",
|
||||
"stable-hash-x": "^0.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint-import-context"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"unrs-resolver": "^1.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"unrs-resolver": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-import-resolver-typescript": {
|
||||
"version": "4.4.5",
|
||||
"resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-4.4.5.tgz",
|
||||
"integrity": "sha512-nbE5XLph6TLtGYcu/U6e6ZVXyKBhbDWK5cLGk76eJ7NdZpwf1P9EFkpt1Z01mNZNrrilsAYWKH6zUkL4reoXbw==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"debug": "^4.4.1",
|
||||
"eslint-import-context": "^0.1.8",
|
||||
"get-tsconfig": "^4.10.1",
|
||||
"is-bun-module": "^2.0.0",
|
||||
"stable-hash-x": "^0.2.0",
|
||||
"tinyglobby": "^0.2.14",
|
||||
"unrs-resolver": "^1.7.11"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^16.17.0 || >=18.6.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint-import-resolver-typescript"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "*",
|
||||
"eslint-plugin-import": "*",
|
||||
"eslint-plugin-import-x": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"eslint-plugin-import": {
|
||||
"optional": true
|
||||
},
|
||||
"eslint-plugin-import-x": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-import-x": {
|
||||
"version": "4.17.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.17.1.tgz",
|
||||
"integrity": "sha512-4cdstYkKCyjumM2Q9NSI03K8D2a9F4Ssz33K2lv2hQa4KmR9jPLwk3uWGtNvclfqBrPGfGuMBwsGMbe6dMRbfg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "^8.56.0",
|
||||
"comment-parser": "^1.4.1",
|
||||
"debug": "^4.4.1",
|
||||
"eslint-import-context": "^0.1.9",
|
||||
"is-glob": "^4.0.3",
|
||||
"minimatch": "^9.0.3 || ^10.1.2",
|
||||
"semver": "^7.7.2",
|
||||
"stable-hash-x": "^0.2.0",
|
||||
"unrs-resolver": "^1.9.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint-plugin-import-x"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/utils": "^8.56.0",
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"eslint-import-resolver-node": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@typescript-eslint/utils": {
|
||||
"optional": true
|
||||
},
|
||||
"eslint-import-resolver-node": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-vue": {
|
||||
"version": "10.8.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-10.8.0.tgz",
|
||||
@@ -8024,6 +8475,19 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/get-tsconfig": {
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.3.tgz",
|
||||
"integrity": "sha512-++QEw4DIY7WGoukz+/+A/8dGYPT9l9yIadnmSgZ8Rjr3YVSVDipQSO9CdnJo9ePqFqUUqh+wk9uIaoiAwsiPkA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"resolve-pkg-maps": "^1.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz",
|
||||
@@ -8412,6 +8876,16 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-bun-module": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz",
|
||||
"integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"semver": "^7.7.1"
|
||||
}
|
||||
},
|
||||
"node_modules/is-callable": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
|
||||
@@ -9872,6 +10346,22 @@
|
||||
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/napi-postinstall": {
|
||||
"version": "0.3.4",
|
||||
"resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz",
|
||||
"integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"napi-postinstall": "lib/cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/napi-postinstall"
|
||||
}
|
||||
},
|
||||
"node_modules/natural-compare": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
|
||||
@@ -10874,6 +11364,16 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve-pkg-maps": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
|
||||
"integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/rfdc": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
|
||||
@@ -11288,6 +11788,16 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/stable-hash-x": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/stable-hash-x/-/stable-hash-x-0.2.0.tgz",
|
||||
"integrity": "sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/stackback": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",
|
||||
@@ -12087,6 +12597,44 @@
|
||||
"node": ">=18.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/unrs-resolver": {
|
||||
"version": "1.12.2",
|
||||
"resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.12.2.tgz",
|
||||
"integrity": "sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"napi-postinstall": "^0.3.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/unrs-resolver"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@unrs/resolver-binding-android-arm-eabi": "1.12.2",
|
||||
"@unrs/resolver-binding-android-arm64": "1.12.2",
|
||||
"@unrs/resolver-binding-darwin-arm64": "1.12.2",
|
||||
"@unrs/resolver-binding-darwin-x64": "1.12.2",
|
||||
"@unrs/resolver-binding-freebsd-x64": "1.12.2",
|
||||
"@unrs/resolver-binding-linux-arm-gnueabihf": "1.12.2",
|
||||
"@unrs/resolver-binding-linux-arm-musleabihf": "1.12.2",
|
||||
"@unrs/resolver-binding-linux-arm64-gnu": "1.12.2",
|
||||
"@unrs/resolver-binding-linux-arm64-musl": "1.12.2",
|
||||
"@unrs/resolver-binding-linux-loong64-gnu": "1.12.2",
|
||||
"@unrs/resolver-binding-linux-loong64-musl": "1.12.2",
|
||||
"@unrs/resolver-binding-linux-ppc64-gnu": "1.12.2",
|
||||
"@unrs/resolver-binding-linux-riscv64-gnu": "1.12.2",
|
||||
"@unrs/resolver-binding-linux-riscv64-musl": "1.12.2",
|
||||
"@unrs/resolver-binding-linux-s390x-gnu": "1.12.2",
|
||||
"@unrs/resolver-binding-linux-x64-gnu": "1.12.2",
|
||||
"@unrs/resolver-binding-linux-x64-musl": "1.12.2",
|
||||
"@unrs/resolver-binding-openharmony-arm64": "1.12.2",
|
||||
"@unrs/resolver-binding-wasm32-wasi": "1.12.2",
|
||||
"@unrs/resolver-binding-win32-arm64-msvc": "1.12.2",
|
||||
"@unrs/resolver-binding-win32-ia32-msvc": "1.12.2",
|
||||
"@unrs/resolver-binding-win32-x64-msvc": "1.12.2"
|
||||
}
|
||||
},
|
||||
"node_modules/upath": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"typecheck": "vue-tsc --noEmit",
|
||||
"typecheck:scripts": "tsc --noEmit -p tsconfig.node.json",
|
||||
"generate": "openapi --input http://127.0.0.1:3000/openapi.json --output ./src/__generated__ --client axios --useOptions --useUnionTypes --exportServices false --exportSchemas false --exportCore false",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
@@ -81,9 +82,10 @@
|
||||
"@vue/test-utils": "^2.4.9",
|
||||
"@vue/tsconfig": "^0.9.1",
|
||||
"axe-core": "^4.12.1",
|
||||
"browserslist": "^4.28.8",
|
||||
"eslint": "^10.0.3",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-import-resolver-typescript": "^4.4.5",
|
||||
"eslint-plugin-import-x": "^4.17.1",
|
||||
"eslint-plugin-vue": "^10.8.0",
|
||||
"eslint-plugin-vuejs-accessibility": "^2.5.0",
|
||||
"globals": "^16.0.0",
|
||||
|
||||
@@ -175,10 +175,16 @@ const SHARED: Entry[] = [
|
||||
...entriesFor(zIndex, "zIndex", "--r-z-index"),
|
||||
];
|
||||
|
||||
const DARK: Entry[] = entriesFor(colorDark, "colorDark", "--r-color");
|
||||
// Native `color-scheme` rides with the palette so UA-drawn chrome (scrollbars,
|
||||
// form controls, embedded viewers) follows the theme instead of staying light.
|
||||
const DARK: Entry[] = [
|
||||
["color-scheme", "dark"],
|
||||
...entriesFor(colorDark, "colorDark", "--r-color"),
|
||||
];
|
||||
// Light theme: the surface palette, then the brand overrides that re-tune
|
||||
// primary/secondary/accent for the off-white page (deeper for contrast).
|
||||
const LIGHT: Entry[] = [
|
||||
["color-scheme", "light"],
|
||||
...entriesFor(colorLight, "colorLight", "--r-color"),
|
||||
...entriesFor(colorStatusLight, "colorStatusLight", "--r-color"),
|
||||
...entriesFor(colorBrandLight, "colorBrandLight", "--r-color-brand"),
|
||||
|
||||
+3
-6
@@ -36,13 +36,10 @@ const availableFolders = computed(() => {
|
||||
}
|
||||
|
||||
// Exclude folders that are already mapped as either an alias or a variant.
|
||||
const isBound = Object.keys(configStore.config.PLATFORMS_BINDING).includes(
|
||||
folder,
|
||||
return (
|
||||
!configStore.getPlatformBinding(folder) &&
|
||||
!configStore.getPlatformVersion(folder)
|
||||
);
|
||||
const isVersion = Object.keys(
|
||||
configStore.config.PLATFORMS_VERSIONS,
|
||||
).includes(folder);
|
||||
return !isBound && !isVersion;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
/** @deprecated v1 UI; superseded by `v2/components/Settings/FolderMappingsSection.vue`. */
|
||||
import type { Emitter } from "mitt";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, inject, onMounted, ref } from "vue";
|
||||
@@ -39,8 +40,6 @@ const HEADERS = [
|
||||
const mappings = computed<Row[]>(() => {
|
||||
const result: Row[] = [];
|
||||
const folders = heartbeat.value?.FILESYSTEM?.FS_PLATFORMS || [];
|
||||
const bindings = config.value.PLATFORMS_BINDING || {};
|
||||
const versions = config.value.PLATFORMS_VERSIONS || {};
|
||||
const autoSlugByFs: Record<string, string | undefined> = {};
|
||||
|
||||
for (const p of supportedPlatforms.value) {
|
||||
@@ -48,21 +47,32 @@ const mappings = computed<Row[]>(() => {
|
||||
}
|
||||
|
||||
for (const folder of folders) {
|
||||
if (bindings[folder]) {
|
||||
const slug = bindings[folder];
|
||||
const platform = supportedPlatforms.value.find((p) => p.slug === slug);
|
||||
const displayName = platform?.display_name || platform?.name || slug;
|
||||
result.push({ fsSlug: folder, slug, displayName, type: "alias" });
|
||||
const binding = configStore.getPlatformBinding(folder);
|
||||
if (binding) {
|
||||
const platform = supportedPlatforms.value.find((p) => p.slug === binding);
|
||||
const displayName = platform?.display_name || platform?.name || binding;
|
||||
result.push({
|
||||
fsSlug: folder,
|
||||
slug: binding,
|
||||
displayName,
|
||||
type: "alias",
|
||||
});
|
||||
continue;
|
||||
}
|
||||
if (versions[folder]) {
|
||||
const slug = versions[folder];
|
||||
const platform = supportedPlatforms.value.find((p) => p.slug === slug);
|
||||
const displayName = platform?.display_name || platform?.name || slug;
|
||||
result.push({ fsSlug: folder, slug, displayName, type: "variant" });
|
||||
const version = configStore.getPlatformVersion(folder);
|
||||
if (version) {
|
||||
const platform = supportedPlatforms.value.find((p) => p.slug === version);
|
||||
const displayName = platform?.display_name || platform?.name || version;
|
||||
result.push({
|
||||
fsSlug: folder,
|
||||
slug: version,
|
||||
displayName,
|
||||
type: "variant",
|
||||
});
|
||||
continue;
|
||||
}
|
||||
const auto = autoSlugByFs[folder];
|
||||
// Platform slugs are lowercase; the folder on disk may not be.
|
||||
const auto = autoSlugByFs[folder.toLowerCase()];
|
||||
if (auto) {
|
||||
const platform = supportedPlatforms.value.find((p) => p.slug === auto);
|
||||
const displayName = platform?.display_name || platform?.name || auto;
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
export const ROUTES = {
|
||||
SETUP: "setup",
|
||||
LOGIN: "login",
|
||||
RESET_PASSWORD: "reset-password",
|
||||
REGISTER: "register",
|
||||
MAIN: "main",
|
||||
HOME: "home",
|
||||
SEARCH: "search",
|
||||
MUSIC: "music",
|
||||
PLATFORM: "platform",
|
||||
COLLECTION: "collection",
|
||||
VIRTUAL_COLLECTION: "virtual-collection",
|
||||
SMART_COLLECTION: "smart-collection",
|
||||
ROM: "rom",
|
||||
EMULATORJS: "emulatorjs",
|
||||
JSDOS: "jsdos",
|
||||
PICO8: "pico8",
|
||||
RUFFLE: "ruffle",
|
||||
STREAM: "stream",
|
||||
STREAM_DESKTOP: "stream-desktop",
|
||||
SCAN: "scan",
|
||||
UPLOAD: "upload",
|
||||
ACTIVITY: "activity",
|
||||
USER_PROFILE: "user-profile",
|
||||
USER_INTERFACE: "user-interface",
|
||||
LIBRARY_MANAGEMENT: "library-management",
|
||||
SCAN_SETTINGS: "scan-settings",
|
||||
METADATA_SOURCES: "metadata-sources",
|
||||
CLIENT_API_TOKENS: "client-api-tokens",
|
||||
ADMINISTRATION: "administration",
|
||||
SERVER_STATS: "server-stats",
|
||||
LOGS: "logs",
|
||||
PAIR: "pair",
|
||||
PAIR_DEVICE: "pair-device",
|
||||
APRIL_FOOLS: "april-fools",
|
||||
CONSOLE_HOME: "console-home",
|
||||
CONSOLE_PLATFORM: "console-platform",
|
||||
CONSOLE_COLLECTION: "console-collection",
|
||||
CONSOLE_SMART_COLLECTION: "console-smart-collection",
|
||||
CONSOLE_VIRTUAL_COLLECTION: "console-virtual-collection",
|
||||
CONSOLE_ROM: "console-rom",
|
||||
CONSOLE_PLAY: "console-play",
|
||||
PLATFORMS_INDEX: "platforms-index",
|
||||
COLLECTIONS_INDEX: "collections-index",
|
||||
CONTROLLER_DEBUG: "controller-debug",
|
||||
NOT_FOUND: "404",
|
||||
} as const;
|
||||
|
||||
export type RouteName = (typeof ROUTES)[keyof typeof ROUTES];
|
||||
|
||||
const authExemptRoutes = [
|
||||
ROUTES.LOGIN,
|
||||
ROUTES.SETUP,
|
||||
ROUTES.RESET_PASSWORD,
|
||||
ROUTES.REGISTER,
|
||||
ROUTES.PAIR,
|
||||
] as const;
|
||||
|
||||
type AuthExemptRoute = (typeof authExemptRoutes)[number];
|
||||
|
||||
export function isAuthExemptRoute(route: string): route is AuthExemptRoute {
|
||||
return (authExemptRoutes as readonly string[]).includes(route);
|
||||
}
|
||||
@@ -1,8 +1,25 @@
|
||||
import { createPinia, setActivePinia } from "pinia";
|
||||
import { beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { RouteLocationNormalized } from "vue-router";
|
||||
import i18n, { localesReady } from "@/locales";
|
||||
import router, { applyRouteTitle } from "@/plugins/router";
|
||||
import router, { applyRouteTitle, ROUTES } from "@/plugins/router";
|
||||
import storeAuth from "@/stores/auth";
|
||||
import storeRoms, { type DetailedRom } from "@/stores/roms";
|
||||
import type { User } from "@/stores/users";
|
||||
|
||||
const { getRom } = vi.hoisted(() => ({ getRom: vi.fn() }));
|
||||
|
||||
vi.mock("@/services/api/rom", () => ({
|
||||
default: { getRom },
|
||||
}));
|
||||
|
||||
function makeRom(overrides: Partial<DetailedRom> = {}): DetailedRom {
|
||||
return {
|
||||
id: 1,
|
||||
name: "Chrono Trigger",
|
||||
...overrides,
|
||||
} as unknown as DetailedRom;
|
||||
}
|
||||
|
||||
describe("route titles", () => {
|
||||
beforeAll(async () => {
|
||||
@@ -66,3 +83,26 @@ describe("applyRouteTitle", () => {
|
||||
expect(document.title).toBe(i18n.global.t("settings.home"));
|
||||
});
|
||||
});
|
||||
|
||||
describe("the rom route", () => {
|
||||
beforeAll(async () => {
|
||||
setActivePinia(createPinia());
|
||||
await localesReady;
|
||||
});
|
||||
|
||||
// A play page writes saves server-side and then navigates here, so an id
|
||||
// matching the route is not proof the store's copy is current.
|
||||
it("re-reads a rom the store already holds", async () => {
|
||||
const roms = storeRoms();
|
||||
storeAuth().setCurrentUser({ id: 1 } as User);
|
||||
roms.setCurrentRom(makeRom({ id: 9, name: "before the session" }));
|
||||
getRom.mockResolvedValue({
|
||||
data: makeRom({ id: 9, name: "after the session" }),
|
||||
});
|
||||
|
||||
await router.push({ name: ROUTES.ROM, params: { rom: 9 } });
|
||||
|
||||
expect(getRom).toHaveBeenCalledWith({ romId: 9 });
|
||||
expect(roms.currentRom?.name).toBe("after the session");
|
||||
});
|
||||
});
|
||||
@@ -7,6 +7,11 @@ import {
|
||||
type RouteLocationNormalized,
|
||||
} from "vue-router";
|
||||
import i18n, { loadLocale } from "@/locales";
|
||||
import {
|
||||
isAuthExemptRoute,
|
||||
ROUTES,
|
||||
type RouteName,
|
||||
} from "@/plugins/routeNames";
|
||||
import { startViewTransition } from "@/plugins/transition";
|
||||
import romApi from "@/services/api/rom";
|
||||
import storeAuth from "@/stores/auth";
|
||||
@@ -19,58 +24,11 @@ import {
|
||||
v2RouteComponents,
|
||||
} from "@/v2/router/routes";
|
||||
|
||||
export const ROUTES = {
|
||||
SETUP: "setup",
|
||||
LOGIN: "login",
|
||||
RESET_PASSWORD: "reset-password",
|
||||
REGISTER: "register",
|
||||
MAIN: "main",
|
||||
HOME: "home",
|
||||
SEARCH: "search",
|
||||
MUSIC: "music",
|
||||
PLATFORM: "platform",
|
||||
COLLECTION: "collection",
|
||||
VIRTUAL_COLLECTION: "virtual-collection",
|
||||
SMART_COLLECTION: "smart-collection",
|
||||
ROM: "rom",
|
||||
EMULATORJS: "emulatorjs",
|
||||
JSDOS: "jsdos",
|
||||
PICO8: "pico8",
|
||||
RUFFLE: "ruffle",
|
||||
STREAM: "stream",
|
||||
STREAM_DESKTOP: "stream-desktop",
|
||||
SCAN: "scan",
|
||||
UPLOAD: "upload",
|
||||
ACTIVITY: "activity",
|
||||
USER_PROFILE: "user-profile",
|
||||
USER_INTERFACE: "user-interface",
|
||||
LIBRARY_MANAGEMENT: "library-management",
|
||||
SCAN_SETTINGS: "scan-settings",
|
||||
METADATA_SOURCES: "metadata-sources",
|
||||
CLIENT_API_TOKENS: "client-api-tokens",
|
||||
ADMINISTRATION: "administration",
|
||||
SERVER_STATS: "server-stats",
|
||||
LOGS: "logs",
|
||||
PAIR: "pair",
|
||||
PAIR_DEVICE: "pair-device",
|
||||
APRIL_FOOLS: "april-fools",
|
||||
CONSOLE_HOME: "console-home",
|
||||
CONSOLE_PLATFORM: "console-platform",
|
||||
CONSOLE_COLLECTION: "console-collection",
|
||||
CONSOLE_SMART_COLLECTION: "console-smart-collection",
|
||||
CONSOLE_VIRTUAL_COLLECTION: "console-virtual-collection",
|
||||
CONSOLE_ROM: "console-rom",
|
||||
CONSOLE_PLAY: "console-play",
|
||||
// V2-only routes (no v1 equivalent — v1 uses its drawer for these).
|
||||
PLATFORMS_INDEX: "platforms-index",
|
||||
COLLECTIONS_INDEX: "collections-index",
|
||||
CONTROLLER_DEBUG: "controller-debug",
|
||||
NOT_FOUND: "404",
|
||||
} as const;
|
||||
export { isAuthExemptRoute, ROUTES };
|
||||
|
||||
// Resolve the v2 component for a given route name, falling back to the 404
|
||||
// view so every route renders something when the user is on uiVersion=v2.
|
||||
function v2For(routeName: string) {
|
||||
function v2For(routeName: RouteName) {
|
||||
const component = v2RouteComponents[routeName];
|
||||
if (!component && import.meta.env.DEV) {
|
||||
console.warn(`[v2] route "${routeName}" has no v2 component; showing 404`);
|
||||
@@ -246,18 +204,15 @@ const routes = [
|
||||
beforeEnter: (async (to, _from, next) => {
|
||||
const romsStore = storeRoms();
|
||||
|
||||
if (
|
||||
!romsStore.currentRom ||
|
||||
romsStore.currentRom.id !== parseInt(to.params.rom as string)
|
||||
) {
|
||||
try {
|
||||
const data = await romApi.getRom({
|
||||
romId: parseInt(to.params.rom as string),
|
||||
});
|
||||
romsStore.setCurrentRom(data.data);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
// Read the ROM on every entry, a matching id included: a play page
|
||||
// writes saves server-side, then navigates here to hand the tab back.
|
||||
try {
|
||||
const data = await romApi.getRom({
|
||||
romId: parseInt(to.params.rom as string),
|
||||
});
|
||||
romsStore.setCurrentRom(data.data);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
next();
|
||||
}) as NavigationGuardWithThis<undefined>,
|
||||
@@ -618,20 +573,6 @@ const routePermissions: RoutePermissions[] = [
|
||||
{ path: ROUTES.LOGS, requiredScopes: ["logs.read"] },
|
||||
];
|
||||
|
||||
const authExemptRoutes = [
|
||||
ROUTES.LOGIN,
|
||||
ROUTES.SETUP,
|
||||
ROUTES.RESET_PASSWORD,
|
||||
ROUTES.REGISTER,
|
||||
ROUTES.PAIR,
|
||||
] as const;
|
||||
|
||||
type AuthExemptRoute = (typeof authExemptRoutes)[number];
|
||||
|
||||
export function isAuthExemptRoute(route: string): route is AuthExemptRoute {
|
||||
return (authExemptRoutes as readonly string[]).includes(route);
|
||||
}
|
||||
|
||||
function checkRoutePermissions(route: string, user: User | null): boolean {
|
||||
// No checks needed for login and setup pages
|
||||
if (isAuthExemptRoute(route)) {
|
||||
|
||||
@@ -22,7 +22,7 @@ async function addPlatformBindConfig({
|
||||
}
|
||||
|
||||
async function deletePlatformBindConfig({ fsSlug }: { fsSlug: string }) {
|
||||
return api.delete(`/config/system/platforms/${fsSlug}`);
|
||||
return api.delete(`/config/system/platforms/${encodeURIComponent(fsSlug)}`);
|
||||
}
|
||||
|
||||
async function addPlatformVersionConfig({
|
||||
@@ -39,7 +39,7 @@ async function addPlatformVersionConfig({
|
||||
}
|
||||
|
||||
async function deletePlatformVersionConfig({ fsSlug }: { fsSlug: string }) {
|
||||
return api.delete(`/config/system/versions/${fsSlug}`);
|
||||
return api.delete(`/config/system/versions/${encodeURIComponent(fsSlug)}`);
|
||||
}
|
||||
|
||||
async function addExclusion({
|
||||
@@ -65,7 +65,9 @@ async function deleteExclusion({
|
||||
exclusionValue: string;
|
||||
exclusionType: string;
|
||||
}) {
|
||||
return api.delete(`/config/exclude/${exclusionType}/${exclusionValue}`);
|
||||
return api.delete(
|
||||
`/config/exclude/${exclusionType}/${encodeURIComponent(exclusionValue)}`,
|
||||
);
|
||||
}
|
||||
|
||||
async function updateScanSettings(payload: ScanSettingsPayload) {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import axios from "axios";
|
||||
import { default as Cookies } from "js-cookie";
|
||||
import { debounce } from "lodash";
|
||||
import router from "@/plugins/router";
|
||||
import { ROUTES, isAuthExemptRoute } from "@/plugins/router";
|
||||
import { isAuthExemptRoute, ROUTES } from "@/plugins/routeNames";
|
||||
|
||||
const api = axios.create({
|
||||
// This will keep the url query params on refresh
|
||||
@@ -133,6 +132,10 @@ api.interceptors.response.use(
|
||||
const params = new URLSearchParams(search);
|
||||
const fullPath = pathname + search;
|
||||
|
||||
// Loaded lazily: a static import evaluates the router while this module
|
||||
// is still initialising, so `router` reads as undefined.
|
||||
const { default: router } = await import("@/plugins/router");
|
||||
|
||||
// Don't redirect to login if already on an auth-exempt route.
|
||||
// Also resolve the route from the browser URL to handle the case where
|
||||
// the router hasn't been started yet (e.g., during app initialization),
|
||||
|
||||
@@ -23,7 +23,7 @@ import { type CustomLimitOffsetPage_SimpleRomSchema_ as GetRomsResponse } from "
|
||||
import api from "@/services/api";
|
||||
import socket from "@/services/socket";
|
||||
import storeUpload from "@/stores/upload";
|
||||
import { getDownloadPath } from "@/utils";
|
||||
import { getDownloadPath } from "@/utils/downloadPath";
|
||||
import { buildFormInput, type FormInputField } from "@/utils/formData";
|
||||
|
||||
export const romApi = api;
|
||||
|
||||
@@ -151,8 +151,12 @@ async function saveAndExit(platform: string, slot = 0, wait = true) {
|
||||
});
|
||||
}
|
||||
|
||||
async function heartbeatSession(platform: string) {
|
||||
return api.post<SessionStatus>(`/streaming/sessions/${platform}/heartbeat`);
|
||||
async function heartbeatSession(platform: string, container?: string) {
|
||||
return api.post<SessionStatus>(
|
||||
`/streaming/sessions/${platform}/heartbeat`,
|
||||
undefined,
|
||||
{ params: { container } },
|
||||
);
|
||||
}
|
||||
|
||||
async function sessionStatus(platform: string) {
|
||||
|
||||
@@ -8,6 +8,12 @@ import api from "@/services/api";
|
||||
|
||||
export type Config = ConfigResponse;
|
||||
|
||||
// The backend lowercases folder names before writing them to config.yml, so
|
||||
// every read and write of a mapping normalizes the on-disk name the same way.
|
||||
function normalizeFsSlug(fsSlug: string): string {
|
||||
return fsSlug.toLowerCase();
|
||||
}
|
||||
|
||||
const defaultConfig = {
|
||||
CONFIG_FILE_MOUNTED: false,
|
||||
CONFIG_FILE_WRITABLE: false,
|
||||
@@ -66,17 +72,23 @@ export default defineStore("config", {
|
||||
return this.config;
|
||||
}
|
||||
},
|
||||
getPlatformBinding(fsSlug: string): string | undefined {
|
||||
return this.config.PLATFORMS_BINDING[normalizeFsSlug(fsSlug)];
|
||||
},
|
||||
addPlatformBinding(fsSlug: string, slug: string) {
|
||||
this.config.PLATFORMS_BINDING[fsSlug] = slug;
|
||||
this.config.PLATFORMS_BINDING[normalizeFsSlug(fsSlug)] = slug;
|
||||
},
|
||||
removePlatformBinding(fsSlug: string) {
|
||||
delete this.config.PLATFORMS_BINDING[fsSlug];
|
||||
delete this.config.PLATFORMS_BINDING[normalizeFsSlug(fsSlug)];
|
||||
},
|
||||
getPlatformVersion(fsSlug: string): string | undefined {
|
||||
return this.config.PLATFORMS_VERSIONS[normalizeFsSlug(fsSlug)];
|
||||
},
|
||||
addPlatformVersion(fsSlug: string, slug: string) {
|
||||
this.config.PLATFORMS_VERSIONS[fsSlug] = slug;
|
||||
this.config.PLATFORMS_VERSIONS[normalizeFsSlug(fsSlug)] = slug;
|
||||
},
|
||||
removePlatformVersion(fsSlug: string) {
|
||||
delete this.config.PLATFORMS_VERSIONS[fsSlug];
|
||||
delete this.config.PLATFORMS_VERSIONS[normalizeFsSlug(fsSlug)];
|
||||
},
|
||||
addExclusion(exclusionType: ExclusionType, exclusionValue: string) {
|
||||
this.config[exclusionType].push(exclusionValue);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useLocalStorage } from "@vueuse/core";
|
||||
import { defineStore } from "pinia";
|
||||
import { ROUTES } from "@/plugins/router";
|
||||
import { ROUTES } from "@/plugins/routeNames";
|
||||
|
||||
const mainBarCollapsed = useLocalStorage("ui.mainBarCollapsed", false);
|
||||
|
||||
|
||||
@@ -322,11 +322,10 @@ export default defineStore("roms", {
|
||||
this.continuePlayingRoms = this.continuePlayingRoms.map((value) =>
|
||||
value.id === rom.id ? rom : value,
|
||||
);
|
||||
// Keep `currentRom` in sync too — otherwise an optimistic mutation
|
||||
// Keep `currentRom` in sync too, otherwise an optimistic mutation
|
||||
// on a SimpleRom from the gallery (status toggle from a GameCard
|
||||
// badge, favourite, …) leaves the detail view rendering stale
|
||||
// `rom_user` data, since the rom-route `beforeEnter` skips its
|
||||
// refetch when `currentRom.id` already matches. Spread merges the
|
||||
// `rom_user` data until the next route entry. Spread merges the
|
||||
// SimpleRom shape over the cached DetailedRom so detailed-only
|
||||
// fields (metadatum, screenshots, related games, …) survive.
|
||||
if (this.currentRom?.id === rom.id) {
|
||||
|
||||
@@ -302,10 +302,11 @@ export const useStreamingStore = defineStore("streaming", () => {
|
||||
*/
|
||||
async function heartbeatSession(
|
||||
platform: string,
|
||||
container?: string,
|
||||
): Promise<SessionStatus | null> {
|
||||
if (!platform) return null;
|
||||
try {
|
||||
const { data } = await streamingApi.heartbeatSession(platform);
|
||||
const { data } = await streamingApi.heartbeatSession(platform, container);
|
||||
return data;
|
||||
} catch (err) {
|
||||
console.warn("[streaming] Could not heartbeat session:", err);
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { SimpleRom } from "@/stores/roms";
|
||||
import { getDownloadLink, getDownloadPath } from "./downloadPath";
|
||||
import { makeRom } from "./rom.fixtures";
|
||||
|
||||
describe("getDownloadPath", () => {
|
||||
it("uses fs_name for a flat single-file rom", () => {
|
||||
const rom = makeRom({
|
||||
id: 14,
|
||||
fs_name: "Maniac Mansion (1989).adf",
|
||||
has_nested_single_file: false,
|
||||
files: [
|
||||
{ id: 19, file_name: "Maniac Mansion (1989).adf" },
|
||||
] as SimpleRom["files"],
|
||||
});
|
||||
expect(getDownloadPath({ rom })).toBe(
|
||||
"/api/roms/14/content/Maniac%20Mansion%20(1989).adf",
|
||||
);
|
||||
});
|
||||
|
||||
it("uses the file name for a nested single-file rom", () => {
|
||||
const rom = makeRom({
|
||||
id: 21,
|
||||
fs_name: "Art Of Fighting",
|
||||
has_nested_single_file: true,
|
||||
files: [{ id: 26, file_name: "aof.zip" }] as SimpleRom["files"],
|
||||
});
|
||||
expect(getDownloadPath({ rom })).toBe("/api/roms/21/content/aof.zip");
|
||||
});
|
||||
|
||||
it("uses fs_name for an unselected multi-file rom", () => {
|
||||
const rom = makeRom({
|
||||
id: 24,
|
||||
fs_name: "B.A.T.",
|
||||
has_nested_single_file: false,
|
||||
files: [
|
||||
{ id: 29, file_name: "B.A.T. Disk1.adf" },
|
||||
{ id: 30, file_name: "B.A.T. Disk2.adf" },
|
||||
] as SimpleRom["files"],
|
||||
});
|
||||
expect(getDownloadPath({ rom })).toBe("/api/roms/24/content/B.A.T.");
|
||||
});
|
||||
|
||||
it("uses the selected file name (with extension) for a single file", () => {
|
||||
// fs_name is the extensionless folder name here, so the path segment has
|
||||
// to carry the file's real name for the emulator to get the extension.
|
||||
const rom = makeRom({
|
||||
id: 24,
|
||||
fs_name: "B.A.T.",
|
||||
files: [
|
||||
{ id: 29, file_name: "B.A.T. Disk1.adf" },
|
||||
{ id: 30, file_name: "B.A.T. Disk2.adf" },
|
||||
] as SimpleRom["files"],
|
||||
});
|
||||
expect(getDownloadPath({ rom, fileIDs: [29] })).toBe(
|
||||
"/api/roms/24/content/B.A.T.%20Disk1.adf?file_ids=29",
|
||||
);
|
||||
});
|
||||
|
||||
it("falls back to fs_name when multiple files are selected (zip)", () => {
|
||||
const rom = makeRom({
|
||||
id: 24,
|
||||
fs_name: "B.A.T.",
|
||||
files: [
|
||||
{ id: 29, file_name: "B.A.T. Disk1.adf" },
|
||||
{ id: 30, file_name: "B.A.T. Disk2.adf" },
|
||||
] as SimpleRom["files"],
|
||||
});
|
||||
expect(getDownloadPath({ rom, fileIDs: [29, 30] })).toBe(
|
||||
"/api/roms/24/content/B.A.T.?file_ids=29%2C30",
|
||||
);
|
||||
});
|
||||
|
||||
it("falls back to fs_name when the selected file id is unknown", () => {
|
||||
const rom = makeRom({
|
||||
id: 24,
|
||||
fs_name: "B.A.T.",
|
||||
has_nested_single_file: false,
|
||||
files: [],
|
||||
});
|
||||
expect(getDownloadPath({ rom, fileIDs: [999] })).toBe(
|
||||
"/api/roms/24/content/B.A.T.?file_ids=999",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("download URL encoding", () => {
|
||||
const rom = makeRom({
|
||||
id: 24,
|
||||
fs_name: "Game & (USA)",
|
||||
has_nested_single_file: false,
|
||||
files: [
|
||||
{ id: 29, file_name: "Game & (USA) Disk1.adf" },
|
||||
{ id: 30, file_name: "Disk2.adf" },
|
||||
] as SimpleRom["files"],
|
||||
});
|
||||
|
||||
it("encodes a name that would otherwise truncate the URL", () => {
|
||||
// A bare `#` starts the fragment, so an unencoded fs_name loses
|
||||
// everything after it before the request is even sent.
|
||||
const hashRom = makeRom({ id: 7, fs_name: "Game #1 (100%)" });
|
||||
const url = new URL(getDownloadLink({ rom: hashRom }));
|
||||
expect(url.hash).toBe("");
|
||||
expect(decodeURIComponent(url.pathname)).toBe(
|
||||
"/api/roms/7/content/Game #1 (100%)",
|
||||
);
|
||||
});
|
||||
|
||||
it("does not double-encode the selected file name", () => {
|
||||
const url = new URL(getDownloadLink({ rom, fileIDs: [29] }));
|
||||
expect(url.pathname).not.toContain("%25");
|
||||
expect(decodeURIComponent(url.pathname)).toBe(
|
||||
"/api/roms/24/content/Game & (USA) Disk1.adf",
|
||||
);
|
||||
});
|
||||
|
||||
it("leaves file_ids parseable for a multi-file zip link", () => {
|
||||
// The backend splits this on "," and int()s each part, so a re-encoded
|
||||
// comma reaches it as one unparseable value.
|
||||
const url = new URL(getDownloadLink({ rom, fileIDs: [29, 30] }));
|
||||
expect(url.searchParams.get("file_ids")).toBe("29,30");
|
||||
expect(decodeURIComponent(url.pathname)).toBe(
|
||||
"/api/roms/24/content/Game & (USA)",
|
||||
);
|
||||
});
|
||||
|
||||
it("prefixes the path with the origin and nothing else", () => {
|
||||
expect(getDownloadLink({ rom })).toBe(
|
||||
`${window.location.origin}${getDownloadPath({ rom })}`,
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,48 @@
|
||||
import type { SimpleRom } from "@/stores/roms";
|
||||
|
||||
/** Build the `/api` path that serves a ROM's content. */
|
||||
export function getDownloadPath({
|
||||
rom,
|
||||
fileIDs = [],
|
||||
}: {
|
||||
rom: SimpleRom;
|
||||
fileIDs?: number[];
|
||||
}) {
|
||||
const queryParams = new URLSearchParams();
|
||||
if (fileIDs.length > 0) {
|
||||
queryParams.append("file_ids", fileIDs.join(","));
|
||||
}
|
||||
const queryString = queryParams.toString();
|
||||
|
||||
const selectedFile =
|
||||
fileIDs.length === 1
|
||||
? rom.files?.find((f) => f.id === fileIDs[0])
|
||||
: undefined;
|
||||
const nestedFile =
|
||||
fileIDs.length === 0 &&
|
||||
rom.has_nested_single_file &&
|
||||
rom.files?.length === 1
|
||||
? rom.files[0]
|
||||
: undefined;
|
||||
const contentFile = selectedFile ?? nestedFile;
|
||||
// One path segment, so it is encoded here and never again: callers that
|
||||
// prepend an origin must not re-encode. A bare `#` or `%` in a name would
|
||||
// otherwise truncate the URL or survive as a literal in the zip's name.
|
||||
const contentName = encodeURIComponent(
|
||||
contentFile ? contentFile.file_name : rom.fs_name,
|
||||
);
|
||||
|
||||
return `/api/roms/${rom.id}/content/${contentName}${
|
||||
queryString ? `?${queryString}` : ""
|
||||
}`;
|
||||
}
|
||||
|
||||
export function getDownloadLink({
|
||||
rom,
|
||||
fileIDs = [],
|
||||
}: {
|
||||
rom: SimpleRom;
|
||||
fileIDs?: number[];
|
||||
}) {
|
||||
return `${window.location.origin}${getDownloadPath({ rom, fileIDs })}`;
|
||||
}
|
||||
@@ -1,100 +1,13 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { Config } from "@/stores/config";
|
||||
import type { Heartbeat } from "@/stores/heartbeat";
|
||||
import type { SimpleRom } from "@/stores/roms";
|
||||
import {
|
||||
getDownloadPath,
|
||||
isJsDosBundle,
|
||||
isJsDosEmulationSupported,
|
||||
isPico8EmulationSupported,
|
||||
isPico8Rom,
|
||||
} from "./index";
|
||||
|
||||
function makeRom(overrides: Partial<SimpleRom>): SimpleRom {
|
||||
return {
|
||||
id: 1,
|
||||
fs_name: "Game",
|
||||
files: [],
|
||||
...overrides,
|
||||
} as SimpleRom;
|
||||
}
|
||||
|
||||
describe("getDownloadPath", () => {
|
||||
it("uses fs_name for a flat single-file rom", () => {
|
||||
const rom = makeRom({
|
||||
id: 14,
|
||||
fs_name: "Maniac Mansion (1989).adf",
|
||||
has_nested_single_file: false,
|
||||
files: [
|
||||
{ id: 19, file_name: "Maniac Mansion (1989).adf" },
|
||||
] as SimpleRom["files"],
|
||||
});
|
||||
expect(getDownloadPath({ rom })).toBe(
|
||||
"/api/roms/14/content/Maniac Mansion (1989).adf",
|
||||
);
|
||||
});
|
||||
|
||||
it("uses the file name for a nested single-file rom", () => {
|
||||
const rom = makeRom({
|
||||
id: 21,
|
||||
fs_name: "Art Of Fighting",
|
||||
has_nested_single_file: true,
|
||||
files: [{ id: 26, file_name: "aof.zip" }] as SimpleRom["files"],
|
||||
});
|
||||
expect(getDownloadPath({ rom })).toBe("/api/roms/21/content/aof.zip");
|
||||
});
|
||||
|
||||
it("uses fs_name for an unselected multi-file rom", () => {
|
||||
const rom = makeRom({
|
||||
id: 24,
|
||||
fs_name: "B.A.T.",
|
||||
has_nested_single_file: false,
|
||||
files: [
|
||||
{ id: 29, file_name: "B.A.T. Disk1.adf" },
|
||||
{ id: 30, file_name: "B.A.T. Disk2.adf" },
|
||||
] as SimpleRom["files"],
|
||||
});
|
||||
expect(getDownloadPath({ rom })).toBe("/api/roms/24/content/B.A.T.");
|
||||
});
|
||||
|
||||
it("uses the selected file name (with extension) for a single file", () => {
|
||||
// Multi-file rom: fs_name is the folder name with no extension. The URL
|
||||
// path segment must carry the selected file's real name so the emulator
|
||||
// receives a file with the correct extension.
|
||||
const rom = makeRom({
|
||||
id: 24,
|
||||
fs_name: "B.A.T.",
|
||||
files: [
|
||||
{ id: 29, file_name: "B.A.T. Disk1.adf" },
|
||||
{ id: 30, file_name: "B.A.T. Disk2.adf" },
|
||||
] as SimpleRom["files"],
|
||||
});
|
||||
expect(getDownloadPath({ rom, fileIDs: [29] })).toBe(
|
||||
"/api/roms/24/content/B.A.T.%20Disk1.adf?file_ids=29",
|
||||
);
|
||||
});
|
||||
|
||||
it("falls back to fs_name when multiple files are selected (zip)", () => {
|
||||
const rom = makeRom({
|
||||
id: 24,
|
||||
fs_name: "B.A.T.",
|
||||
files: [
|
||||
{ id: 29, file_name: "B.A.T. Disk1.adf" },
|
||||
{ id: 30, file_name: "B.A.T. Disk2.adf" },
|
||||
] as SimpleRom["files"],
|
||||
});
|
||||
expect(getDownloadPath({ rom, fileIDs: [29, 30] })).toBe(
|
||||
"/api/roms/24/content/B.A.T.?file_ids=29%2C30",
|
||||
);
|
||||
});
|
||||
|
||||
it("falls back to fs_name when the selected file id is unknown", () => {
|
||||
const rom = makeRom({ id: 24, fs_name: "B.A.T." });
|
||||
expect(getDownloadPath({ rom, fileIDs: [999] })).toBe(
|
||||
"/api/roms/24/content/B.A.T.?file_ids=999",
|
||||
);
|
||||
});
|
||||
});
|
||||
import { makeRom } from "./rom.fixtures";
|
||||
|
||||
function makeHeartbeat(
|
||||
emulation: Partial<Heartbeat["EMULATION"]> = {},
|
||||
|
||||
@@ -9,6 +9,8 @@ import type { Heartbeat } from "@/stores/heartbeat";
|
||||
import storeNavigation from "@/stores/navigation";
|
||||
import type { DetailedRom, SimpleRom } from "@/stores/roms";
|
||||
|
||||
export { getDownloadLink, getDownloadPath } from "@/utils/downloadPath";
|
||||
|
||||
/**
|
||||
* Views configuration object.
|
||||
*/
|
||||
@@ -107,59 +109,6 @@ export function convertCronExperssion(expression: string) {
|
||||
return convertedExpression;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a download link for ROM content.
|
||||
*
|
||||
* @param rom The ROM object.
|
||||
* @param files Optional array of file names to include in the download.
|
||||
* @returns The download link.
|
||||
*/
|
||||
export function getDownloadPath({
|
||||
rom,
|
||||
fileIDs = [],
|
||||
}: {
|
||||
rom: SimpleRom;
|
||||
fileIDs?: number[];
|
||||
}) {
|
||||
const queryParams = new URLSearchParams();
|
||||
if (fileIDs.length > 0) {
|
||||
queryParams.append("file_ids", fileIDs.join(","));
|
||||
}
|
||||
const queryString = queryParams.toString();
|
||||
|
||||
// If a single file is selected, use its name for the download path
|
||||
const selectedFile =
|
||||
fileIDs.length === 1
|
||||
? rom.files?.find((f) => f.id === fileIDs[0])
|
||||
: undefined;
|
||||
const nestedFile =
|
||||
fileIDs.length === 0 &&
|
||||
rom.has_nested_single_file &&
|
||||
rom.files?.length === 1
|
||||
? rom.files[0]
|
||||
: undefined;
|
||||
const contentFile = selectedFile ?? nestedFile;
|
||||
const contentName = contentFile
|
||||
? encodeURIComponent(contentFile.file_name)
|
||||
: rom.fs_name;
|
||||
|
||||
return `/api/roms/${rom.id}/content/${contentName}${
|
||||
queryString ? `?${queryString}` : ""
|
||||
}`;
|
||||
}
|
||||
|
||||
export function getDownloadLink({
|
||||
rom,
|
||||
fileIDs = [],
|
||||
}: {
|
||||
rom: SimpleRom;
|
||||
fileIDs?: number[];
|
||||
}) {
|
||||
return `${window.location.origin}${encodeURI(
|
||||
getDownloadPath({ rom, fileIDs }),
|
||||
)}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format bytes as human-readable text.
|
||||
*
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import type { SimpleRom } from "@/stores/roms";
|
||||
|
||||
export function makeRom(overrides: Partial<SimpleRom>): SimpleRom {
|
||||
return {
|
||||
id: 1,
|
||||
fs_name: "Game",
|
||||
files: [],
|
||||
...overrides,
|
||||
} as SimpleRom;
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
import { flushPromises, mount } from "@vue/test-utils";
|
||||
import { createPinia, setActivePinia } from "pinia";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import storeAuth from "@/stores/auth";
|
||||
import storeConfig from "@/stores/config";
|
||||
import storeHeartbeat from "@/stores/heartbeat";
|
||||
import FolderMappingsSection from "./FolderMappingsSection.vue";
|
||||
|
||||
const {
|
||||
getSupportedPlatforms,
|
||||
addPlatformBindConfig,
|
||||
deletePlatformBindConfig,
|
||||
addPlatformVersionConfig,
|
||||
deletePlatformVersionConfig,
|
||||
apiGet,
|
||||
} = vi.hoisted(() => ({
|
||||
getSupportedPlatforms: vi.fn(),
|
||||
addPlatformBindConfig: vi.fn(),
|
||||
deletePlatformBindConfig: vi.fn(),
|
||||
addPlatformVersionConfig: vi.fn(),
|
||||
deletePlatformVersionConfig: vi.fn(),
|
||||
apiGet: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock("@/services/api", () => ({ default: { get: apiGet } }));
|
||||
vi.mock("@/services/api/platform", () => ({
|
||||
default: { getSupportedPlatforms },
|
||||
}));
|
||||
vi.mock("@/services/api/config", () => ({
|
||||
default: {
|
||||
addPlatformBindConfig,
|
||||
deletePlatformBindConfig,
|
||||
addPlatformVersionConfig,
|
||||
deletePlatformVersionConfig,
|
||||
},
|
||||
}));
|
||||
|
||||
vi.mock("vue-i18n", () => ({
|
||||
useI18n: () => ({ t: (key: string) => key }),
|
||||
}));
|
||||
|
||||
vi.mock("@/v2/composables/useSnackbar", () => ({
|
||||
useSnackbar: () => ({ success: vi.fn(), error: vi.fn() }),
|
||||
}));
|
||||
vi.mock("@/v2/composables/usePlatformIconCache", () => ({
|
||||
prefetchPlatformIcons: vi.fn(),
|
||||
}));
|
||||
|
||||
const N64 = { id: 1, slug: "n64", name: "Nintendo 64", display_name: "N64" };
|
||||
const PS2 = { id: 2, slug: "ps2", name: "PlayStation 2", display_name: "PS2" };
|
||||
|
||||
interface Row {
|
||||
fsSlug: string;
|
||||
slug?: string;
|
||||
displayName?: string;
|
||||
type: "alias" | "variant" | "auto" | null;
|
||||
}
|
||||
|
||||
// Exposes the built rows and renders the Platform cell the edit actions hang off.
|
||||
const RTableStub = {
|
||||
name: "RTable",
|
||||
props: ["items"],
|
||||
template:
|
||||
'<div><slot v-for="row in items" name="cell.platform" :row="row" /></div>',
|
||||
};
|
||||
|
||||
async function mountWith(folders: string[]) {
|
||||
const heartbeat = storeHeartbeat();
|
||||
heartbeat.value.FILESYSTEM.FS_PLATFORMS = folders;
|
||||
vi.spyOn(heartbeat, "fetchHeartbeat").mockResolvedValue(heartbeat.value);
|
||||
|
||||
const wrapper = mount(FolderMappingsSection, {
|
||||
global: {
|
||||
stubs: {
|
||||
RTable: RTableStub,
|
||||
RBtn: true,
|
||||
RDialog: true,
|
||||
RIcon: true,
|
||||
RTextField: true,
|
||||
PlatformSelect: true,
|
||||
CachedPlatformIcon: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
await flushPromises();
|
||||
|
||||
return {
|
||||
wrapper,
|
||||
rows: wrapper.findComponent(RTableStub).props("items") as Row[],
|
||||
};
|
||||
}
|
||||
|
||||
describe("FolderMappingsSection", () => {
|
||||
beforeEach(() => {
|
||||
setActivePinia(createPinia());
|
||||
getSupportedPlatforms.mockReset();
|
||||
getSupportedPlatforms.mockResolvedValue({ data: [N64, PS2] });
|
||||
addPlatformBindConfig.mockReset().mockResolvedValue(undefined);
|
||||
deletePlatformBindConfig.mockReset().mockResolvedValue(undefined);
|
||||
addPlatformVersionConfig.mockReset().mockResolvedValue(undefined);
|
||||
deletePlatformVersionConfig.mockReset().mockResolvedValue(undefined);
|
||||
// A refetch echoes the config back, so it neither clears nor changes it.
|
||||
apiGet.mockReset();
|
||||
apiGet.mockImplementation(() =>
|
||||
Promise.resolve({ data: { ...storeConfig().config } }),
|
||||
);
|
||||
|
||||
storeAuth().user = { oauth_scopes: ["platforms.write"] } as never;
|
||||
storeConfig().config.CONFIG_FILE_WRITABLE = true;
|
||||
});
|
||||
|
||||
// config.yml stores "Nintendo 64" under the key "nintendo 64".
|
||||
it("shows a binding written for a folder whose name is not lowercase", async () => {
|
||||
storeConfig().config.PLATFORMS_BINDING = { "nintendo 64": "n64" };
|
||||
|
||||
const { rows } = await mountWith(["Nintendo 64"]);
|
||||
|
||||
expect(rows).toEqual([
|
||||
{
|
||||
fsSlug: "Nintendo 64",
|
||||
slug: "n64",
|
||||
displayName: "N64",
|
||||
type: "alias",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("shows a version written for a folder whose name is not lowercase", async () => {
|
||||
storeConfig().config.PLATFORMS_VERSIONS = { "playstation 2": "ps2" };
|
||||
|
||||
const { rows } = await mountWith(["PlayStation 2"]);
|
||||
|
||||
expect(rows[0]).toMatchObject({ slug: "ps2", type: "variant" });
|
||||
});
|
||||
|
||||
it("marks a folder matching a platform slug as auto-detected whatever its case", async () => {
|
||||
const { rows } = await mountWith(["PS2"]);
|
||||
|
||||
expect(rows[0]).toMatchObject({ slug: "ps2", type: "auto" });
|
||||
});
|
||||
|
||||
// A bare add on a folder that already has a binding is a no-op server-side.
|
||||
it("replaces the binding when a mapped folder is pointed at another platform", async () => {
|
||||
storeConfig().config.PLATFORMS_BINDING = { "nintendo 64": "n64" };
|
||||
|
||||
const { wrapper } = await mountWith(["Nintendo 64"]);
|
||||
wrapper
|
||||
.findComponent({ name: "FolderMappingPlatformCell" })
|
||||
.vm.$emit("select", "ps2");
|
||||
await flushPromises();
|
||||
|
||||
expect(deletePlatformBindConfig).toHaveBeenCalledWith({
|
||||
fsSlug: "Nintendo 64",
|
||||
});
|
||||
expect(addPlatformBindConfig).toHaveBeenCalledWith({
|
||||
fsSlug: "Nintendo 64",
|
||||
slug: "ps2",
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -70,36 +70,35 @@ const TYPE_ORDER: Record<NonNullable<RowType> | "none", number> = {
|
||||
const mappings = computed<Row[]>(() => {
|
||||
const rows: Row[] = [];
|
||||
const folders = heartbeat.value?.FILESYSTEM?.FS_PLATFORMS || [];
|
||||
const bindings = config.value.PLATFORMS_BINDING || {};
|
||||
const versions = config.value.PLATFORMS_VERSIONS || {};
|
||||
const autoSlug: Record<string, string | undefined> = {};
|
||||
|
||||
for (const p of supportedPlatforms.value) autoSlug[p.slug] = p.slug;
|
||||
|
||||
for (const folder of folders) {
|
||||
if (bindings[folder]) {
|
||||
const slug = bindings[folder];
|
||||
const platform = supportedPlatforms.value.find((p) => p.slug === slug);
|
||||
const binding = configStore.getPlatformBinding(folder);
|
||||
if (binding) {
|
||||
const platform = supportedPlatforms.value.find((p) => p.slug === binding);
|
||||
rows.push({
|
||||
fsSlug: folder,
|
||||
slug,
|
||||
displayName: platform?.display_name || platform?.name || slug,
|
||||
slug: binding,
|
||||
displayName: platform?.display_name || platform?.name || binding,
|
||||
type: "alias",
|
||||
});
|
||||
continue;
|
||||
}
|
||||
if (versions[folder]) {
|
||||
const slug = versions[folder];
|
||||
const platform = supportedPlatforms.value.find((p) => p.slug === slug);
|
||||
const version = configStore.getPlatformVersion(folder);
|
||||
if (version) {
|
||||
const platform = supportedPlatforms.value.find((p) => p.slug === version);
|
||||
rows.push({
|
||||
fsSlug: folder,
|
||||
slug,
|
||||
displayName: platform?.display_name || platform?.name || slug,
|
||||
slug: version,
|
||||
displayName: platform?.display_name || platform?.name || version,
|
||||
type: "variant",
|
||||
});
|
||||
continue;
|
||||
}
|
||||
const auto = autoSlug[folder];
|
||||
// Platform slugs are lowercase; the folder on disk may not be.
|
||||
const auto = autoSlug[folder.toLowerCase()];
|
||||
if (auto) {
|
||||
const platform = supportedPlatforms.value.find((p) => p.slug === auto);
|
||||
rows.push({
|
||||
|
||||
@@ -109,11 +109,21 @@ async function release(container: AdminStreamingContainer): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
function sessionLabel(container: AdminStreamingContainer): string {
|
||||
function sessionState(container: AdminStreamingContainer): string {
|
||||
const session = container.session;
|
||||
if (!session) return t("settings.streaming-idle");
|
||||
if (session.desktop) return t("settings.streaming-desktop-session");
|
||||
return session.rom_name ?? t("settings.streaming-unknown-game");
|
||||
return [
|
||||
session.desktop
|
||||
? t("settings.streaming-desktop-session")
|
||||
: (session.rom_name ?? t("settings.streaming-unknown-game")),
|
||||
session.claimed_at &&
|
||||
t("settings.streaming-since", {
|
||||
time: formatTimestamp(session.claimed_at, locale.value),
|
||||
}),
|
||||
session.username && t("settings.streaming-by", { user: session.username }),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(" ");
|
||||
}
|
||||
|
||||
onMounted(load);
|
||||
@@ -172,43 +182,33 @@ onMounted(load);
|
||||
{{ t("settings.streaming-unusable") }}
|
||||
</span>
|
||||
<span v-else class="r-v2-streaming__state">
|
||||
{{ sessionLabel(container) }}
|
||||
<template v-if="container.session?.claimed_at">
|
||||
{{
|
||||
t("settings.streaming-since", {
|
||||
time: formatTimestamp(container.session.claimed_at, locale),
|
||||
})
|
||||
}}
|
||||
</template>
|
||||
<template v-if="container.session?.username">
|
||||
{{
|
||||
t("settings.streaming-by", { user: container.session.username })
|
||||
}}
|
||||
</template>
|
||||
{{ sessionState(container) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<RBtn
|
||||
v-if="container.supports_desktop"
|
||||
variant="outlined"
|
||||
density="compact"
|
||||
prepend-icon="mdi-desktop-classic"
|
||||
:disabled="!container.configured || !!container.session"
|
||||
@click="openDesktop(container)"
|
||||
>
|
||||
{{ t("settings.streaming-open-desktop") }}
|
||||
</RBtn>
|
||||
<RBtn
|
||||
variant="text"
|
||||
density="compact"
|
||||
color="error"
|
||||
prepend-icon="mdi-stop"
|
||||
:disabled="!container.session"
|
||||
:loading="releasing === container.container"
|
||||
@click="release(container)"
|
||||
>
|
||||
{{ t("settings.streaming-release") }}
|
||||
</RBtn>
|
||||
<div class="r-v2-streaming__actions">
|
||||
<RBtn
|
||||
v-if="container.supports_desktop"
|
||||
variant="outlined"
|
||||
density="compact"
|
||||
prepend-icon="mdi-desktop-classic"
|
||||
:disabled="!container.configured || !!container.session"
|
||||
@click="openDesktop(container)"
|
||||
>
|
||||
{{ t("settings.streaming-open-desktop") }}
|
||||
</RBtn>
|
||||
<RBtn
|
||||
variant="text"
|
||||
density="compact"
|
||||
color="error"
|
||||
prepend-icon="mdi-stop"
|
||||
:disabled="!container.session"
|
||||
:loading="releasing === container.container"
|
||||
@click="release(container)"
|
||||
>
|
||||
{{ t("settings.streaming-release") }}
|
||||
</RBtn>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</SettingsSection>
|
||||
@@ -221,7 +221,8 @@ onMounted(load);
|
||||
}
|
||||
|
||||
.r-v2-streaming__row {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: auto minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 12px 16px;
|
||||
@@ -233,7 +234,6 @@ onMounted(load);
|
||||
|
||||
.r-v2-streaming__icon {
|
||||
color: var(--r-color-fg-muted);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.r-v2-streaming__icon--busy {
|
||||
color: var(--r-color-brand-primary);
|
||||
@@ -243,8 +243,6 @@ onMounted(load);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.r-v2-streaming__name {
|
||||
@@ -256,11 +254,25 @@ onMounted(load);
|
||||
.r-v2-streaming__state {
|
||||
font-size: var(--r-font-size-xs);
|
||||
color: var(--r-color-fg-muted);
|
||||
}
|
||||
.r-v2-streaming__meta {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.r-v2-streaming__actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
/* On a phone the actions drop under the details instead of squeezing them out. */
|
||||
html[data-bp~="xs"] .r-v2-streaming__actions {
|
||||
grid-column: 2 / -1;
|
||||
}
|
||||
|
||||
.r-v2-streaming__warning {
|
||||
font-size: var(--r-font-size-xs);
|
||||
color: var(--r-color-danger-fg);
|
||||
|
||||
@@ -10,11 +10,8 @@
|
||||
// v2 AppLayout renders the v2 component. Routes without a v2 entry fall
|
||||
// through to `notFoundComponent`, which is correct now that every route the
|
||||
// v2 UI links to is migrated: an unregistered name leads nowhere in v2.
|
||||
//
|
||||
// NOTE: We use string keys instead of importing ROUTES from @/plugins/router
|
||||
// to avoid a circular import (router.ts ↔ v2/router/routes.ts). Keys here
|
||||
// MUST match the string values in the ROUTES constant in plugins/router.ts.
|
||||
import type { Component } from "vue";
|
||||
import { ROUTES, type RouteName } from "@/plugins/routeNames";
|
||||
|
||||
export type V2Route = () => Promise<Component>;
|
||||
|
||||
@@ -23,53 +20,58 @@ export type V2Route = () => Promise<Component>;
|
||||
export const notFoundComponent: V2Route = () =>
|
||||
import("@/v2/views/NotFound.vue");
|
||||
|
||||
export const v2RouteComponents: Partial<Record<string, V2Route>> = {
|
||||
home: () => import("@/v2/views/Home.vue"),
|
||||
activity: () => import("@/v2/views/Activity.vue"),
|
||||
export const v2RouteComponents: Partial<Record<RouteName, V2Route>> = {
|
||||
[ROUTES.HOME]: () => import("@/v2/views/Home.vue"),
|
||||
[ROUTES.ACTIVITY]: () => import("@/v2/views/Activity.vue"),
|
||||
// Wave 1 — Auth flows
|
||||
login: () => import("@/v2/views/Auth/Login.vue"),
|
||||
"reset-password": () => import("@/v2/views/Auth/ResetPassword.vue"),
|
||||
register: () => import("@/v2/views/Auth/Register.vue"),
|
||||
setup: () => import("@/v2/views/Auth/Setup.vue"),
|
||||
[ROUTES.LOGIN]: () => import("@/v2/views/Auth/Login.vue"),
|
||||
[ROUTES.RESET_PASSWORD]: () => import("@/v2/views/Auth/ResetPassword.vue"),
|
||||
[ROUTES.REGISTER]: () => import("@/v2/views/Auth/Register.vue"),
|
||||
[ROUTES.SETUP]: () => import("@/v2/views/Auth/Setup.vue"),
|
||||
// Wave 3 — Gallery
|
||||
platform: () => import("@/v2/views/Gallery/Platform.vue"),
|
||||
search: () => import("@/v2/views/Gallery/Search.vue"),
|
||||
music: () => import("@/v2/views/Jukebox/index.vue"),
|
||||
collection: () => import("@/v2/views/Gallery/Collection.vue"),
|
||||
"virtual-collection": () => import("@/v2/views/Gallery/Collection.vue"),
|
||||
"smart-collection": () => import("@/v2/views/Gallery/Collection.vue"),
|
||||
[ROUTES.PLATFORM]: () => import("@/v2/views/Gallery/Platform.vue"),
|
||||
[ROUTES.SEARCH]: () => import("@/v2/views/Gallery/Search.vue"),
|
||||
[ROUTES.MUSIC]: () => import("@/v2/views/Jukebox/index.vue"),
|
||||
[ROUTES.COLLECTION]: () => import("@/v2/views/Gallery/Collection.vue"),
|
||||
[ROUTES.VIRTUAL_COLLECTION]: () =>
|
||||
import("@/v2/views/Gallery/Collection.vue"),
|
||||
[ROUTES.SMART_COLLECTION]: () => import("@/v2/views/Gallery/Collection.vue"),
|
||||
// Wave 4 — Game details
|
||||
rom: () => import("@/v2/views/GameDetails.vue"),
|
||||
[ROUTES.ROM]: () => import("@/v2/views/GameDetails.vue"),
|
||||
// Wave 5 — Players
|
||||
emulatorjs: () => import("@/v2/views/Player/EmulatorJS.vue"),
|
||||
jsdos: () => import("@/v2/views/Player/JsDos.vue"),
|
||||
pico8: () => import("@/v2/views/Player/Pico8.vue"),
|
||||
ruffle: () => import("@/v2/views/Player/Ruffle.vue"),
|
||||
stream: () => import("@/v2/views/Player/Stream.vue"),
|
||||
"stream-desktop": () => import("@/v2/views/Player/Desktop.vue"),
|
||||
[ROUTES.EMULATORJS]: () => import("@/v2/views/Player/EmulatorJS.vue"),
|
||||
[ROUTES.JSDOS]: () => import("@/v2/views/Player/JsDos.vue"),
|
||||
[ROUTES.PICO8]: () => import("@/v2/views/Player/Pico8.vue"),
|
||||
[ROUTES.RUFFLE]: () => import("@/v2/views/Player/Ruffle.vue"),
|
||||
[ROUTES.STREAM]: () => import("@/v2/views/Player/Stream.vue"),
|
||||
[ROUTES.STREAM_DESKTOP]: () => import("@/v2/views/Player/Desktop.vue"),
|
||||
// Wave 6 — Library Tools (Scan / Upload) + Pair
|
||||
scan: () => import("@/v2/views/Scan.vue"),
|
||||
upload: () => import("@/v2/views/Upload.vue"),
|
||||
[ROUTES.SCAN]: () => import("@/v2/views/Scan.vue"),
|
||||
[ROUTES.UPLOAD]: () => import("@/v2/views/Upload.vue"),
|
||||
// Pair is wired via a top-level PairDispatcher (see plugins/router.ts); no
|
||||
// named-view entry is needed — the dispatcher picks v1 or v2 itself.
|
||||
// Wave 7 — Settings suite
|
||||
"user-profile": () => import("@/v2/views/Settings/UserProfile.vue"),
|
||||
"user-interface": () => import("@/v2/views/Settings/UserInterface.vue"),
|
||||
"library-management": () =>
|
||||
[ROUTES.USER_PROFILE]: () => import("@/v2/views/Settings/UserProfile.vue"),
|
||||
[ROUTES.USER_INTERFACE]: () =>
|
||||
import("@/v2/views/Settings/UserInterface.vue"),
|
||||
[ROUTES.LIBRARY_MANAGEMENT]: () =>
|
||||
import("@/v2/views/Settings/LibraryManagement.vue"),
|
||||
"scan-settings": () => import("@/v2/views/Settings/ScanSettings.vue"),
|
||||
"metadata-sources": () => import("@/v2/views/Settings/MetadataSources.vue"),
|
||||
"client-api-tokens": () => import("@/v2/views/Settings/ClientApiTokens.vue"),
|
||||
administration: () => import("@/v2/views/Settings/Administration.vue"),
|
||||
"server-stats": () => import("@/v2/views/Settings/ServerStats.vue"),
|
||||
logs: () => import("@/v2/views/Settings/Logs.vue"),
|
||||
[ROUTES.SCAN_SETTINGS]: () => import("@/v2/views/Settings/ScanSettings.vue"),
|
||||
[ROUTES.METADATA_SOURCES]: () =>
|
||||
import("@/v2/views/Settings/MetadataSources.vue"),
|
||||
[ROUTES.CLIENT_API_TOKENS]: () =>
|
||||
import("@/v2/views/Settings/ClientApiTokens.vue"),
|
||||
[ROUTES.ADMINISTRATION]: () =>
|
||||
import("@/v2/views/Settings/Administration.vue"),
|
||||
[ROUTES.SERVER_STATS]: () => import("@/v2/views/Settings/ServerStats.vue"),
|
||||
[ROUTES.LOGS]: () => import("@/v2/views/Settings/Logs.vue"),
|
||||
// V2-only index pages (no v1 equivalent — the v1 UI uses its drawer)
|
||||
"platforms-index": () => import("@/v2/views/PlatformsIndex.vue"),
|
||||
"collections-index": () => import("@/v2/views/CollectionsIndex.vue"),
|
||||
[ROUTES.PLATFORMS_INDEX]: () => import("@/v2/views/PlatformsIndex.vue"),
|
||||
[ROUTES.COLLECTIONS_INDEX]: () => import("@/v2/views/CollectionsIndex.vue"),
|
||||
// V2-only dev tool — live gamepad input inspector.
|
||||
"controller-debug": () => import("@/v2/views/ControllerDebug.vue"),
|
||||
[ROUTES.CONTROLLER_DEBUG]: () => import("@/v2/views/ControllerDebug.vue"),
|
||||
// v1-only easter egg: no v2 component links here, so the URL is a dead end.
|
||||
"april-fools": notFoundComponent,
|
||||
[ROUTES.APRIL_FOOLS]: notFoundComponent,
|
||||
};
|
||||
|
||||
export const v2Layouts = {
|
||||
|
||||
@@ -175,6 +175,7 @@ html[data-input="pad"] .r-v2 {
|
||||
|
||||
/* Dark surface palette — translucent white over the near-black base. */
|
||||
.r-v2.r-v2-dark {
|
||||
color-scheme: dark;
|
||||
--r-color-bg: #07070f;
|
||||
--r-color-bg-elevated: rgba(255, 255, 255, 0.045);
|
||||
--r-color-surface: rgba(255, 255, 255, 0.07);
|
||||
@@ -203,6 +204,7 @@ html[data-input="pad"] .r-v2 {
|
||||
|
||||
/* Light surface palette — translucent black over the off-white base. */
|
||||
.r-v2.r-v2-light {
|
||||
color-scheme: light;
|
||||
--r-color-bg: #f5f5fa;
|
||||
--r-color-bg-elevated: rgba(0, 0, 0, 0.025);
|
||||
--r-color-surface: rgba(0, 0, 0, 0.035);
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
import { flushPromises, mount, type VueWrapper } from "@vue/test-utils";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { defineComponent } from "vue";
|
||||
import Desktop from "./Desktop.vue";
|
||||
|
||||
const mocks = vi.hoisted(() => ({
|
||||
claimDesktop: vi.fn(),
|
||||
releaseSession: vi.fn(),
|
||||
releaseSessionKeepalive: vi.fn(),
|
||||
heartbeatSession: vi.fn(),
|
||||
heartbeatTick: null as (() => Promise<void>) | null,
|
||||
routeLeave: null as (() => Promise<boolean> | boolean) | null,
|
||||
}));
|
||||
|
||||
vi.mock("vue-i18n", () => ({
|
||||
useI18n: () => ({ t: (key: string) => key }),
|
||||
}));
|
||||
|
||||
vi.mock("vue-router", () => ({
|
||||
onBeforeRouteLeave: (guard: () => Promise<boolean>) => {
|
||||
mocks.routeLeave = guard;
|
||||
},
|
||||
useRoute: () => ({ query: { container: "WEBSTATION-DEV" } }),
|
||||
useRouter: () => ({ push: vi.fn() }),
|
||||
}));
|
||||
|
||||
vi.mock("@vueuse/core", async (importOriginal) => ({
|
||||
...(await importOriginal<typeof import("@vueuse/core")>()),
|
||||
// The beat is driven by hand; the pagehide listener stays real.
|
||||
useIntervalFn: (tick: () => Promise<void>) => {
|
||||
mocks.heartbeatTick = tick;
|
||||
},
|
||||
}));
|
||||
|
||||
vi.mock("@/plugins/router", () => ({
|
||||
ROUTES: { ADMINISTRATION: "administration" },
|
||||
}));
|
||||
|
||||
vi.mock("@/services/api/streaming", () => ({
|
||||
default: {
|
||||
claimDesktop: mocks.claimDesktop,
|
||||
releaseSession: mocks.releaseSession,
|
||||
releaseSessionKeepalive: mocks.releaseSessionKeepalive,
|
||||
},
|
||||
}));
|
||||
|
||||
vi.mock("@/stores/streaming", () => ({
|
||||
useStreamingStore: () => ({ heartbeatSession: mocks.heartbeatSession }),
|
||||
}));
|
||||
|
||||
vi.mock("@/v2/composables/useConfirm", () => ({
|
||||
useConfirm: () => () => Promise.resolve(true),
|
||||
}));
|
||||
|
||||
vi.mock("@/v2/composables/usePageTitle", () => ({ usePageTitle: vi.fn() }));
|
||||
|
||||
const StreamStageStub = defineComponent({
|
||||
props: { active: { type: Boolean, default: false } },
|
||||
setup(_, { expose }) {
|
||||
expose({
|
||||
leaveFullscreen: () => Promise.resolve(),
|
||||
focusStream: () => {},
|
||||
});
|
||||
return () => null;
|
||||
},
|
||||
});
|
||||
|
||||
// The view listens on window, so a mount left standing would answer the next
|
||||
// test's pagehide too.
|
||||
let mounted: VueWrapper | null = null;
|
||||
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
mounted?.unmount();
|
||||
mounted = null;
|
||||
});
|
||||
|
||||
async function openDesktop(): Promise<VueWrapper> {
|
||||
mocks.claimDesktop.mockResolvedValue({
|
||||
data: { host: "http://webstation-dev:8080", label: "PS2", platform: "ps2" },
|
||||
});
|
||||
mounted = mount(Desktop, {
|
||||
shallow: true,
|
||||
global: { stubs: { StreamStage: StreamStageStub } },
|
||||
});
|
||||
await flushPromises();
|
||||
return mounted;
|
||||
}
|
||||
|
||||
function streamIsLive(wrapper: VueWrapper): boolean | undefined {
|
||||
return wrapper.findComponent(StreamStageStub).props("active");
|
||||
}
|
||||
|
||||
describe("Desktop heartbeats", () => {
|
||||
it("beats for the container it claimed", async () => {
|
||||
// Unnamed, the beat only reaches the platform's first pool.
|
||||
const wrapper = await openDesktop();
|
||||
mocks.heartbeatSession.mockResolvedValue({ status: "active" });
|
||||
|
||||
await mocks.heartbeatTick?.();
|
||||
|
||||
expect(mocks.heartbeatSession).toHaveBeenCalledWith(
|
||||
"ps2",
|
||||
"WEBSTATION-DEV",
|
||||
);
|
||||
expect(streamIsLive(wrapper)).toBe(true);
|
||||
});
|
||||
|
||||
it("stops the stream when the beat reports the session ended", async () => {
|
||||
const wrapper = await openDesktop();
|
||||
mocks.heartbeatSession.mockResolvedValue({ status: "ended" });
|
||||
|
||||
await mocks.heartbeatTick?.();
|
||||
await flushPromises();
|
||||
|
||||
expect(streamIsLive(wrapper)).toBe(false);
|
||||
});
|
||||
|
||||
it("releases nothing once the beat ended the claim", async () => {
|
||||
// The claim is gone, so an exit must not hand back whoever holds the
|
||||
// container next.
|
||||
await openDesktop();
|
||||
mocks.heartbeatSession.mockResolvedValue({ status: "ended" });
|
||||
|
||||
await mocks.heartbeatTick?.();
|
||||
window.dispatchEvent(new Event("pagehide"));
|
||||
|
||||
expect(await mocks.routeLeave?.()).toBe(true);
|
||||
expect(mocks.releaseSessionKeepalive).not.toHaveBeenCalled();
|
||||
expect(mocks.releaseSession).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
@@ -15,6 +15,7 @@ import { useI18n } from "vue-i18n";
|
||||
import { onBeforeRouteLeave, useRoute, useRouter } from "vue-router";
|
||||
import { ROUTES } from "@/plugins/router";
|
||||
import streamingApi from "@/services/api/streaming";
|
||||
import { useStreamingStore } from "@/stores/streaming";
|
||||
import StreamStage from "@/v2/components/Player/StreamStage.vue";
|
||||
import { useConfirm } from "@/v2/composables/useConfirm";
|
||||
import { usePageTitle } from "@/v2/composables/usePageTitle";
|
||||
@@ -23,6 +24,7 @@ const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const confirm = useConfirm();
|
||||
const streamingStore = useStreamingStore();
|
||||
|
||||
const containerKey = computed(() => String(route.query.container ?? ""));
|
||||
|
||||
@@ -95,13 +97,17 @@ async function release(): Promise<boolean> {
|
||||
// stale window, and nothing else here touches the claim.
|
||||
const HEARTBEAT_MS = 30_000;
|
||||
|
||||
useIntervalFn(() => {
|
||||
if (!holdsClaim.value || !platform.value) return;
|
||||
void streamingApi
|
||||
.heartbeatSession(platform.value)
|
||||
.catch((err) =>
|
||||
console.warn("[streaming] Could not heartbeat the desktop session:", err),
|
||||
);
|
||||
useIntervalFn(async () => {
|
||||
if (!holdsClaim.value) return;
|
||||
const status = await streamingStore.heartbeatSession(
|
||||
platform.value,
|
||||
containerKey.value,
|
||||
);
|
||||
// Ended elsewhere: dropping the claim keeps a later exit from releasing
|
||||
// whoever holds the container next.
|
||||
if (status?.status !== "ended") return;
|
||||
holdsClaim.value = false;
|
||||
state.value = "exited";
|
||||
}, HEARTBEAT_MS);
|
||||
|
||||
function backToAdministration(): void {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import path from "node:path";
|
||||
import { createServer, type ViteDevServer } from "vite";
|
||||
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
||||
|
||||
// The dev server is the only place this is observable: CI's e2e run serves a
|
||||
// production build, and vitest.config.ts never loads vite.config.js, so a
|
||||
// dropped `css.transformer` would leave every other check green.
|
||||
describe("dev server CSS", () => {
|
||||
let server: ViteDevServer;
|
||||
|
||||
beforeAll(async () => {
|
||||
server = await createServer({
|
||||
configFile: path.resolve(process.cwd(), "vite.config.js"),
|
||||
server: { middlewareMode: true },
|
||||
logLevel: "error",
|
||||
});
|
||||
}, 60_000);
|
||||
|
||||
afterAll(async () => {
|
||||
await server?.close();
|
||||
});
|
||||
|
||||
it("generates vendor prefixes, not only on the build's minify path", async () => {
|
||||
const result = await server.transformRequest(
|
||||
"/test/fixtures/prefix-probe.css",
|
||||
);
|
||||
expect(result?.code).toMatch(/-webkit-backdrop-filter:\s*blur\(1px\)/);
|
||||
expect(result?.code).toMatch(/[^-]backdrop-filter:\s*blur\(1px\)/);
|
||||
});
|
||||
});
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
/* Probed by test/devCssPrefixing.test.ts. `backdrop-filter` needs a
|
||||
`-webkit-` prefix below Safari 18.4, and the build targets cover it. */
|
||||
.prefix-probe {
|
||||
backdrop-filter: blur(1px);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["scripts/**/*.ts"]
|
||||
}
|
||||
+5
-44
@@ -1,6 +1,5 @@
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import browserslist from "browserslist";
|
||||
import { URL, fileURLToPath } from "node:url";
|
||||
import { defineConfig, loadEnv } from "vite";
|
||||
import mkcert from "vite-plugin-mkcert";
|
||||
@@ -58,43 +57,6 @@ const VUETIFY_COMPONENTS = [
|
||||
"vuetify/components/VWindow",
|
||||
];
|
||||
|
||||
// Maps browserslist browser ids to the esbuild-style ids that Vite's
|
||||
// `build.cssTarget` understands. Engines not listed here (and_chr, samsung,
|
||||
// kaios, ...) share a rendering engine with one of these or track "latest",
|
||||
// so skipping them does not change the emitted prefixes.
|
||||
const BROWSERSLIST_TO_ESBUILD = {
|
||||
chrome: "chrome",
|
||||
edge: "edge",
|
||||
firefox: "firefox",
|
||||
ios_saf: "ios",
|
||||
opera: "opera",
|
||||
safari: "safari",
|
||||
};
|
||||
|
||||
// Translate the shared `.browserslistrc` baseline into Vite's CSS target
|
||||
// format. Vite 8 minifies CSS with Lightning CSS, which auto-prefixes and
|
||||
// down-levels from the standard property based on browser targets, but on the
|
||||
// minify path it only reads `build.cssTarget` (esbuild-style ids), never
|
||||
// `css.lightningcss.targets`. Deriving it here keeps `.browserslistrc` the
|
||||
// single source of truth. Without targets Lightning CSS drops the generated
|
||||
// `-webkit-backdrop-filter`, breaking every glass/blur surface in Safari.
|
||||
function cssTargetsFromBrowserslist() {
|
||||
const lowest = {};
|
||||
for (const entry of browserslist()) {
|
||||
const [id, range] = entry.split(" ");
|
||||
const name = BROWSERSLIST_TO_ESBUILD[id];
|
||||
if (!name) continue;
|
||||
const version = range.split("-")[0]; // "16.4-16.5" -> "16.4"
|
||||
const asNumber = Number.parseFloat(version);
|
||||
if (lowest[name] === undefined || asNumber < lowest[name].asNumber) {
|
||||
lowest[name] = { asNumber, version };
|
||||
}
|
||||
}
|
||||
return Object.entries(lowest).map(
|
||||
([name, { version }]) => `${name}${version}`,
|
||||
);
|
||||
}
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig(({ mode }) => {
|
||||
// Load ENV variables from the parent directory and the current directory.
|
||||
@@ -113,16 +75,10 @@ export default defineConfig(({ mode }) => {
|
||||
include: VUETIFY_COMPONENTS,
|
||||
},
|
||||
build: {
|
||||
target: "esnext",
|
||||
// AudioWorklet.addModule is only dependable with a real URL, and Vite
|
||||
// inlines any asset under 4KB as a data: URI, so keep the worklet out.
|
||||
assetsInlineLimit: (filePath) =>
|
||||
filePath.endsWith("pico8AudioWorklet.js") ? false : undefined,
|
||||
// Browser targets for CSS (prefixing + down-leveling) come from the
|
||||
// shared `.browserslistrc`. Never hand-write a `-webkit-` twin next to a
|
||||
// standard property: Lightning CSS collapses the pair to whichever is
|
||||
// declared last, so let it generate the prefixes from these targets.
|
||||
cssTarget: cssTargetsFromBrowserslist(),
|
||||
},
|
||||
plugins: [
|
||||
tailwindcss(),
|
||||
@@ -157,6 +113,11 @@ export default defineConfig(({ mode }) => {
|
||||
hosts: ["localhost", "127.0.0.1", "romm.dev"],
|
||||
}),
|
||||
],
|
||||
// Prefixes dev too, not just the build's minify path. Never hand-write a
|
||||
// `-webkit-` twin: Lightning CSS keeps only the last of the pair.
|
||||
css: {
|
||||
transformer: "lightningcss",
|
||||
},
|
||||
define: {
|
||||
"process.env": {},
|
||||
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: true,
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ dev = [
|
||||
"ipdb ~= 0.13",
|
||||
"ipykernel ~= 6.29",
|
||||
"memray ~= 1.15",
|
||||
"mypy ~= 1.19",
|
||||
"mypy ~= 2.3.0",
|
||||
"pyinstrument ~= 5.0",
|
||||
"types-colorama ~= 0.4",
|
||||
"types-passlib ~= 1.7",
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["config:recommended", ":semanticCommitTypeAll(chore)"],
|
||||
"description": "Updates wait out a week before Renovate proposes them, so a compromised release has time to be pulled before it reaches a PR here.",
|
||||
"minimumReleaseAge": "7 days",
|
||||
"enabledManagers": ["github-actions", "docker-compose", "custom.regex"],
|
||||
"ignorePaths": ["examples/**"],
|
||||
"packageRules": [
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
version = 1
|
||||
revision = 3
|
||||
requires-python = ">=3.14"
|
||||
resolution-markers = [
|
||||
"python_full_version >= '3.15'",
|
||||
"python_full_version < '3.15'",
|
||||
]
|
||||
|
||||
[options]
|
||||
exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values.
|
||||
@@ -147,6 +151,70 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/7c/3c/0464dcada90d5da0e71018c04a140ad6349558afb30b3051b4264cc5b965/asgiref-3.9.1-py3-none-any.whl", hash = "sha256:f3bba7092a48005b5f5bacd747d36ee4a5a61f4a269a6df590b43144355ebd2c", size = 23790, upload-time = "2025-07-08T09:07:41.548Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ast-serialize"
|
||||
version = "0.11.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/4e/a2/04a9383e7512c91c54b2f34b3ff86dc7d2610506f588c2bda36e952a68f7/ast_serialize-0.11.1.tar.gz", hash = "sha256:cc5db2983805f6be786488aac8c5998d5b71965488d1b18c44d435a2205a5cb4", size = 953785, upload-time = "2026-09-09T16:05:27.851Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/e2/cb/3577c66278e4ea4ff6968aee04327447335ecfc58c76123f68cf7f76d75e/ast_serialize-0.11.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:f7ca1557553fdab313999ad69156de154ff87152cae963698be2e765164bb6c0", size = 897021, upload-time = "2026-09-09T16:03:59.316Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/47/db/9b4eed53ab0bb63653f56ef71062fa91693c8c26b0b648c58d98365c990c/ast_serialize-0.11.1-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8b54e44763a851c336ca137c60a2434511f0d155e0b924ef374bfbc8d8db8927", size = 1235148, upload-time = "2026-09-09T16:04:01.201Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/fd/97/1ebe323015c3cf530f08e88df9929bfd9f5cf8165842bd4b37a7c958565c/ast_serialize-0.11.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:753afabcc4abf295f515ea33185cf997a1990b88a29d3a3336a9acf62ea85950", size = 1216082, upload-time = "2026-09-09T16:04:02.87Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ac/72/0d3a368edc2d1e0e188c0d3f23821f4e20a6a2291b23d9df482a6b11277f/ast_serialize-0.11.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:98b8aba6bb682b9e8859c628382b4881c0600b28056d63c3168c227c449f3284", size = 1282848, upload-time = "2026-09-09T16:04:04.316Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9c/fb/2a546a57d7caa708d739c1747bbdf45cc3aa9dac9407a11d9d67e8a0e255/ast_serialize-0.11.1-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:651a7890558896c3e08089e51ab3b3a43710eab15b72ad861c400bc9a51923ba", size = 1285337, upload-time = "2026-09-09T16:04:05.899Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/bf/16/4ff4179584f8b8bec348787bf721cb7ce3d4c707c7878778065249b59b9a/ast_serialize-0.11.1-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ff8ddc1453bfe7934292409c7b8e9f68b0a6cff4e4c12535e4b4a66fd83aca0c", size = 1554906, upload-time = "2026-09-09T16:04:07.42Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/df/e8/e54a54676ca8965e1ae3cfe065dc26c75158e0b3a3ce35af283da106fbf9/ast_serialize-0.11.1-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:daec16b026c5741950a00c708acdf698c4f17babbe4829dd8232324822e9514f", size = 1301472, upload-time = "2026-09-09T16:04:08.782Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e0/ab/618835a2479868a0d4ac807dd04cf2f89d24afe22c4171538d9779c2772e/ast_serialize-0.11.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9961abcb93bf03652ab09c00862a2396abacd57551c769ad34490a2ae508a61d", size = 1301293, upload-time = "2026-09-09T16:04:10.17Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/61/cb/8acc29a1b279ccdfb30dcbdf099e1d8d34c4ee77be9be751c48061433129/ast_serialize-0.11.1-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:8ca9e48edf246f09fd9bdb64fbd9cd8d18cd2a69ffc24d44891466e17595094f", size = 1307807, upload-time = "2026-09-09T16:04:11.989Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/da/74/bada875132f452cb5c1179e3156df43cee6df6cb51f773220688be3d4bb4/ast_serialize-0.11.1-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6a57e0e025e9dcee48e466b3cf909178e298d238148664e796fc0f60ded5e52e", size = 1356265, upload-time = "2026-09-09T16:04:13.429Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4f/ae/720a8042fc8c1d170f4cc7ed46295ef078f8198ed3476f58210a1e675e0c/ast_serialize-0.11.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:110386eebccf200446d5f4dcc215f80866a5d3d3d054d3ced6ec1bf386cd3f02", size = 1459957, upload-time = "2026-09-09T16:04:14.878Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7d/2c/ce2ff1ffd4d70376073393c154033728c8535c17211b7710fee7b0f04474/ast_serialize-0.11.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:ef3950747f3a588f692cf4d6f2937eedd1a2d5e199f863af29e8ec7da78a4f36", size = 1562369, upload-time = "2026-09-09T16:04:16.563Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/fd/3e/d7a5dd5f609bd0bac45617ce9425e4bd1e369b998c8678edfd70c985408c/ast_serialize-0.11.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:0bc94b81878a3f999fe4cdb606bf00ef7dff6b4f66d0e089b2cf7bfc00d59beb", size = 1556466, upload-time = "2026-09-09T16:04:18.396Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/99/cd/a45179802a8637f2be252163ec4e4948534fa8d88798dd391c9cc54e096e/ast_serialize-0.11.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:341dfc9e6b4e47e5c37e1b7257a77d39f407cf49a371ee90225ab624c2fe8b36", size = 1687190, upload-time = "2026-09-09T16:04:19.965Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/01/eb/ef206d764ec0554368501b8b5268f5468819dc0588815acb0575465643df/ast_serialize-0.11.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:7b524cb1b08e15db0f116075c39ab51674b6d3c8103ec1a59c8ca464be83e28a", size = 1481188, upload-time = "2026-09-09T16:04:21.368Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8b/37/9a724c523af7c8b97a659bf4dc28a8e60f97d0cf4d19be277db4067ca734/ast_serialize-0.11.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5c2358b341aca08bd2e1005713bc480bc06eee9f345b67fcb826829aa7b8d0d3", size = 1500731, upload-time = "2026-09-09T16:04:22.905Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/48/10/890d5fcaf568088de7989e8cdb4ca525f485bd6cb25eea49d45f017500af/ast_serialize-0.11.1-cp314-cp314t-win32.whl", hash = "sha256:b9e61143a5904f46daa0cde74ba60d3b7c0e3e000752ee138e2bc68e126a5803", size = 1119009, upload-time = "2026-09-09T16:04:24.469Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9d/61/2bd32bd16b5e2ee07badc8c32a73c545dc5a9f087ed19c07eee1243d5a1b/ast_serialize-0.11.1-cp314-cp314t-win_amd64.whl", hash = "sha256:31df8649761d5cb6eb0de2209bd4a167c7477c0516147c70c0b2f5bddc7839bb", size = 1155665, upload-time = "2026-09-09T16:04:26.638Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5e/b6/84bb5e1dc418e660524b873c5bac9be2bf13d38676c96feef4cd4e7d03f3/ast_serialize-0.11.1-cp314-cp314t-win_arm64.whl", hash = "sha256:2f8f33e416a4c7aad12ad757e895c676e953b4027b80b90718dccea83d45111a", size = 1131854, upload-time = "2026-09-09T16:04:28.099Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8c/dd/16de2c0d23a6b298c735d4e4b56d86fa70476eef98e2c66ceaa65503b62f/ast_serialize-0.11.1-cp315-abi3.abi3t-macosx_10_12_x86_64.whl", hash = "sha256:a015ede631eeb098a23de8ec0cfe11a1dd02159ab7a26bdc7c6bde2befbbc7b4", size = 1235495, upload-time = "2026-09-09T16:04:29.654Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/27/f7/302d2251e6298bbeabc8a1815c9147127031517b305001a02f34fd46b6b5/ast_serialize-0.11.1-cp315-abi3.abi3t-macosx_11_0_arm64.whl", hash = "sha256:57b7d52d1f5c92905cd648bda9efc83cac33097de1e5bb68de8feca9b5f7e87a", size = 1215642, upload-time = "2026-09-09T16:04:31.186Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/93/06/93b6527646613502f364cebfb23783fa6701cdbe90761ee26144f1fa20b9/ast_serialize-0.11.1-cp315-abi3.abi3t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e47b9b028efbc0486263a49f782ad0ae3e879855fe5a2897b59feefb78e1c40c", size = 1283526, upload-time = "2026-09-09T16:04:32.597Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2f/ac/ffb216262c9a582d039d846081b8c3017dc368cbed5a2520deca5cb7f8cb/ast_serialize-0.11.1-cp315-abi3.abi3t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:00adb748034c7b1938ec56925f9f6230ffcd9c56d47355fe32485df29b90b977", size = 1287526, upload-time = "2026-09-09T16:04:34.214Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a2/06/19a4c4837c4d5e73b982938d6da3c9ae10513b61527575b3e1b8396f9298/ast_serialize-0.11.1-cp315-abi3.abi3t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:82359d00ea808c260c327e43955c0190bb7baef152a01ae0b5c74d05387b9552", size = 1558354, upload-time = "2026-09-09T16:04:35.669Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e5/29/2373199907b2d97feed176115308dfb3dd0446566b047009828f266d2d66/ast_serialize-0.11.1-cp315-abi3.abi3t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f35bb9ddeed4008c7d3e272dd1999885d712e1ce623b0a65ba8a8ed1d51c35cf", size = 1302731, upload-time = "2026-09-09T16:04:37.423Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/33/55/ab6805a1457dbe565c84f8d36e2aa4207ef22408adfd01d225823cd07484/ast_serialize-0.11.1-cp315-abi3.abi3t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:74093ed682ba58456f0d4450da7fb62b826fddd97824d44fc4a81ca6e0bf9e23", size = 1301594, upload-time = "2026-09-09T16:04:38.861Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/52/e2/4f54eab2201bb420d39bf61423abcb5d4daffd28e2270e1c5eee2bf3c0f1/ast_serialize-0.11.1-cp315-abi3.abi3t-manylinux_2_31_riscv64.whl", hash = "sha256:4dd7218870c203eff4533cfc04a39f29077d6789b20f5b746e7648fe5762a548", size = 1309355, upload-time = "2026-09-09T16:04:40.543Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/10/07/755dd98664e2374080b72ccb5fea63d9f11b4bec2409a05b2a4ebc97618d/ast_serialize-0.11.1-cp315-abi3.abi3t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1e8d20700766171a8a17f89cf53d7bd9712c509460d28a51f7f98340577b78aa", size = 1356645, upload-time = "2026-09-09T16:04:42.299Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/34/a0/fadbde3e108064236e2679728ce6d8247aefc81bac5fd82505b59cf69172/ast_serialize-0.11.1-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl", hash = "sha256:20b3371c0403099cd55d59f4bcedb6d3994d9db3fa41711c648760a89ef2a575", size = 1459696, upload-time = "2026-09-09T16:04:44.069Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/02/fd/b4f95249bd895368ea8290668e27d1f0a5c4ad888bd72a34c7beb2a500d6/ast_serialize-0.11.1-cp315-abi3.abi3t-musllinux_1_2_armv7l.whl", hash = "sha256:cc1a78b913f8665dda145999b1b4805ad2ef442ecbe3b819512cf7f95e70498a", size = 1562517, upload-time = "2026-09-09T16:04:45.461Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/68/98/6afac594380410710d9d863b9ef41e9c6ca89bd901bda1464ee9e99180a8/ast_serialize-0.11.1-cp315-abi3.abi3t-musllinux_1_2_i686.whl", hash = "sha256:38f7141881e783bccc362d201d7fd7437934216b669b9fef39febc2f63fd2d9b", size = 1556951, upload-time = "2026-09-09T16:04:47.12Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ae/6f/5a81b5cbf1731f4722bc90adf4b4ace7dda69ca29837844147063aeafb22/ast_serialize-0.11.1-cp315-abi3.abi3t-musllinux_1_2_ppc64le.whl", hash = "sha256:13903a3f212ab9e5d05a6c3f2337288f4f8f4c18e6ab3817417ae7a3d46dee14", size = 1691039, upload-time = "2026-09-09T16:04:48.691Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/99/eb/d9b903206cbd6d5143838367d385fa88ec49eaae2cc12f284327c6e0af05/ast_serialize-0.11.1-cp315-abi3.abi3t-musllinux_1_2_riscv64.whl", hash = "sha256:e5a9c53e64732118ae8235d0e57eb90e2333e90ff749a1a7dca6f8bfdfa5200e", size = 1483297, upload-time = "2026-09-09T16:04:50.136Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ed/48/ee13b4079ec67e9b333a87e5bb8eee643ab1b49f7173b3fca71158c6cdf6/ast_serialize-0.11.1-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl", hash = "sha256:aecb606f67f21fd1c0ffba1826470d2ee400e41b23881ad9a1b2157306865b1a", size = 1501686, upload-time = "2026-09-09T16:04:51.734Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/15/67/2175b79e1ee6b042e4bf8ed6871e60cafea7e9cf3fc69e87d7a9d520ae77/ast_serialize-0.11.1-cp315-abi3.abi3t-win32.whl", hash = "sha256:d1ef9c478d8c8ca83499704d13e5ac32c840ed7ca7884aaaf716166aca5a2806", size = 1119522, upload-time = "2026-09-09T16:04:53.248Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f6/c3/8c96aa5f121e9bdda0346b2df3919185eb1ec9a2cce2d20e311b4575ca0b/ast_serialize-0.11.1-cp315-abi3.abi3t-win_amd64.whl", hash = "sha256:27eef0739e0110f5db1ff5dfa38b3dadfcb6f0c31975a2b412f9f2bd72139cea", size = 1157260, upload-time = "2026-09-09T16:04:54.944Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/10/bc/8aa663209e335eca73c9e1006197222b6b8dafa6665e513cdd975aa65496/ast_serialize-0.11.1-cp315-abi3.abi3t-win_arm64.whl", hash = "sha256:f9454960bbf185d33c669ccd5c9b76c96709a4542a95a65e27342c4d10dd8e20", size = 1132060, upload-time = "2026-09-09T16:04:56.501Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/aa/52/185edf155ff422744acfb2869a8adff84b7dc308027852feb97287b8688b/ast_serialize-0.11.1-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:2db9df3bca1431da25946ee8f2c50df01212e34e6029532bc90b92d05fa8d7a0", size = 897219, upload-time = "2026-09-09T16:04:58.217Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7f/a7/e738887429de70350d9e25f84a95efbdd086b79579a811509dee8b02d7d5/ast_serialize-0.11.1-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:7b9a6089f1337838492b217707e9a55d0b9b407fe9169a960fa12282abf2234c", size = 1240585, upload-time = "2026-09-09T16:04:59.616Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a1/f9/46b64fa883f3c8b8cf51629978f16d8a2da3d5c5c02f64add40864907703/ast_serialize-0.11.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:68929da7fb1c7375f69641baac9519d5c41ee441cd09a591ea5dfc83107ffe6f", size = 1228038, upload-time = "2026-09-09T16:05:00.948Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ad/89/fe75c8d0f104a4be11cd0e23acecf129484c9ba06c7130033752d63a78c5/ast_serialize-0.11.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8945557ed3015173dbf8d44184da9621add9162720acbc0ac4832b5a091b4e8a", size = 1292388, upload-time = "2026-09-09T16:05:02.498Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/cb/56/3f21c881900d8254a35195e1e962355b4d570ccd9cc193b0ba08abb81952/ast_serialize-0.11.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b9cbed53bb8992b72e587dd47d0ca71703f5f715420f48ed57587c06c2fcd213", size = 1294413, upload-time = "2026-09-09T16:05:04.212Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f3/b2/8d77be3dad1139158c59e370391f4990ea73f7f102983392272856bd3a63/ast_serialize-0.11.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65c836d1ab7af65e64a1dd73de82572566e838dd27529b1124eac0ac86f35e76", size = 1565921, upload-time = "2026-09-09T16:05:05.753Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/94/2e/0675b5796c897f957fbdac6af0ebeeaa9a63cee866c1c54f1e5136ef5bf6/ast_serialize-0.11.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4ab6df9898600ff45149b86c12bb5aa3359cc71843ad99ad0c924d11392469ab", size = 1312160, upload-time = "2026-09-09T16:05:07.269Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/93/c2/1749fa4efae0dc98aad3c3d29f0178e2609208c3ba34700b4551082e40d5/ast_serialize-0.11.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3eebd3dd25a81839ac7d25b5f3fb3527f6141b35eca29f63d2613fe6254307fd", size = 1312405, upload-time = "2026-09-09T16:05:08.753Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/00/14/2afc9f9d7db551f805b4d5e496946dc3dc2a703d27294ccc200b6ff07a7a/ast_serialize-0.11.1-cp39-abi3-manylinux_2_31_riscv64.whl", hash = "sha256:311333c5f58f55fc04121be2c5adffa42a19e1038a43a2cef862fdf58c45bf4f", size = 1319458, upload-time = "2026-09-09T16:05:10.552Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c7/4a/8b2866d9d6d5d0b037d7bf2b74db6e75a66695c503248632116f24009a8d/ast_serialize-0.11.1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:aa8d0a9f6d02e7626cdf540555bc2f5313eabe803dcca04854fc628ddf4b1058", size = 1365055, upload-time = "2026-09-09T16:05:12.069Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/47/17/73119504574f9b46610ffb718501b254c8adb727d4e43c5babc3c62d4529/ast_serialize-0.11.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:e209a797fdf8680d58d2e969a9ddb25058ea682f6cff59dbabc98d8aef4e0db1", size = 1467771, upload-time = "2026-09-09T16:05:13.458Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/56/f5/776bfb7a856ba0bb9bd373b76a90230fb77b1a10c987810b621ed244d5ba/ast_serialize-0.11.1-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:b391becd31e9889da438d388aac0362e3dfd222affbe45d920580c351486c787", size = 1571459, upload-time = "2026-09-09T16:05:15.15Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c7/43/86a655170ee36a8fdce65a922b7e34040bb319eb4ec251161032343c1fc3/ast_serialize-0.11.1-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:021afb3482d27d1dace9c8999724a13083e96c7ece785e53e418bf5df3b50e0a", size = 1568959, upload-time = "2026-09-09T16:05:16.677Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ed/b1/015a3a156dc9bd46e9c4e4f24a939eb0b87179b1c53c9495ac6f088f13b4/ast_serialize-0.11.1-cp39-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:c1dc60251d93beff32d4147ecd4ccc518b0f022a900093f6f3021c2012416f0f", size = 1698173, upload-time = "2026-09-09T16:05:18.248Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/0e/ea/a988b70980aca3a8a3fb731901dc911fe73a456cebbc225b767bbe5490ff/ast_serialize-0.11.1-cp39-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:b77d6a2267227d68d8221cfca177f8c6d9f68019f3250401d0355d2638db9fb9", size = 1493298, upload-time = "2026-09-09T16:05:19.806Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/de/15/e049b2701ddab9087d7f62448f4c2c1b1463e676baa471345cf3e4a31e1b/ast_serialize-0.11.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:e68ac7d7fd1a5d42a3a6d726d7cc8a7e0c9987934f11c6a5162aa2cf68e81e24", size = 1510213, upload-time = "2026-09-09T16:05:21.402Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/46/a2/23d555eb842d1397dce54fac31851e6f151e03a0ae74db389d9b39718c33/ast_serialize-0.11.1-cp39-abi3-win32.whl", hash = "sha256:ed449d786b9032a7b85fcd6c2f7f54c4cd0e1e1ad254d396805ff922096bf08d", size = 1125239, upload-time = "2026-09-09T16:05:22.796Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1f/4a/251f3fd1b8a5549edaedf8f3ba0b9fb5060e194d3c0ed208b593fccaeff1/ast_serialize-0.11.1-cp39-abi3-win_amd64.whl", hash = "sha256:6b43f5a9b9a8dd20ba3124914e63aa7d7427de761ac849081cda403c2112fda0", size = 1164260, upload-time = "2026-09-09T16:05:24.714Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5e/b5/08e2f643feb9e4d72d42a484949ad51238b18262a01c7036196c201cc330/ast_serialize-0.11.1-cp39-abi3-win_arm64.whl", hash = "sha256:a579ea6f473aab3958a64734194b22fbaec108ec45d994c28d3bd721e1e1da32", size = 1137533, upload-time = "2026-09-09T16:05:26.095Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "asttokens"
|
||||
version = "3.0.0"
|
||||
@@ -984,36 +1052,72 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "librt"
|
||||
version = "0.8.1"
|
||||
version = "0.15.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/56/9c/b4b0c54d84da4a94b37bd44151e46d5e583c9534c7e02250b961b1b6d8a8/librt-0.8.1.tar.gz", hash = "sha256:be46a14693955b3bd96014ccbdb8339ee8c9346fbe11c1b78901b55125f14c73", size = 177471, upload-time = "2026-02-17T16:13:06.101Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/36/9b/356320fbae2ac8467e21c5e73e1389c80468e4998c62cc7d3536cc51b614/librt-0.15.0.tar.gz", hash = "sha256:4e66cbe84437497d951b799d3e1551291b6fb3d643820a7014b3655d57a59162", size = 214338, upload-time = "2026-08-07T10:49:42.663Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/c9/6a/907ef6800f7bca71b525a05f1839b21f708c09043b1c6aa77b6b827b3996/librt-0.8.1-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:6cfa7fe54fd4d1f47130017351a959fe5804bda7a0bc7e07a2cdbc3fdd28d34f", size = 66081, upload-time = "2026-02-17T16:12:12.766Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1b/18/25e991cd5640c9fb0f8d91b18797b29066b792f17bf8493da183bf5caabe/librt-0.8.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:228c2409c079f8c11fb2e5d7b277077f694cb93443eb760e00b3b83cb8b3176c", size = 68309, upload-time = "2026-02-17T16:12:13.756Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a4/36/46820d03f058cfb5a9de5940640ba03165ed8aded69e0733c417bb04df34/librt-0.8.1-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7aae78ab5e3206181780e56912d1b9bb9f90a7249ce12f0e8bf531d0462dd0fc", size = 196804, upload-time = "2026-02-17T16:12:14.818Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/59/18/5dd0d3b87b8ff9c061849fbdb347758d1f724b9a82241aa908e0ec54ccd0/librt-0.8.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:172d57ec04346b047ca6af181e1ea4858086c80bdf455f61994c4aa6fc3f866c", size = 206907, upload-time = "2026-02-17T16:12:16.513Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d1/96/ef04902aad1424fd7299b62d1890e803e6ab4018c3044dca5922319c4b97/librt-0.8.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6b1977c4ea97ce5eb7755a78fae68d87e4102e4aaf54985e8b56806849cc06a3", size = 221217, upload-time = "2026-02-17T16:12:17.906Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6d/ff/7e01f2dda84a8f5d280637a2e5827210a8acca9a567a54507ef1c75b342d/librt-0.8.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:10c42e1f6fd06733ef65ae7bebce2872bcafd8d6e6b0a08fe0a05a23b044fb14", size = 214622, upload-time = "2026-02-17T16:12:19.108Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1e/8c/5b093d08a13946034fed57619742f790faf77058558b14ca36a6e331161e/librt-0.8.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:4c8dfa264b9193c4ee19113c985c95f876fae5e51f731494fc4e0cf594990ba7", size = 221987, upload-time = "2026-02-17T16:12:20.331Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d3/cc/86b0b3b151d40920ad45a94ce0171dec1aebba8a9d72bb3fa00c73ab25dd/librt-0.8.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:01170b6729a438f0dedc4a26ed342e3dc4f02d1000b4b19f980e1877f0c297e6", size = 215132, upload-time = "2026-02-17T16:12:21.54Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/fc/be/8588164a46edf1e69858d952654e216a9a91174688eeefb9efbb38a9c799/librt-0.8.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:7b02679a0d783bdae30d443025b94465d8c3dc512f32f5b5031f93f57ac32071", size = 215195, upload-time = "2026-02-17T16:12:23.073Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f5/f2/0b9279bea735c734d69344ecfe056c1ba211694a72df10f568745c899c76/librt-0.8.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:190b109bb69592a3401fe1ffdea41a2e73370ace2ffdc4a0e8e2b39cdea81b78", size = 237946, upload-time = "2026-02-17T16:12:24.275Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e9/cc/5f2a34fbc8aeb35314a3641f9956fa9051a947424652fad9882be7a97949/librt-0.8.1-cp314-cp314-win32.whl", hash = "sha256:e70a57ecf89a0f64c24e37f38d3fe217a58169d2fe6ed6d70554964042474023", size = 50689, upload-time = "2026-02-17T16:12:25.766Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a0/76/cd4d010ab2147339ca2b93e959c3686e964edc6de66ddacc935c325883d7/librt-0.8.1-cp314-cp314-win_amd64.whl", hash = "sha256:7e2f3edca35664499fbb36e4770650c4bd4a08abc1f4458eab9df4ec56389730", size = 57875, upload-time = "2026-02-17T16:12:27.465Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/84/0f/2143cb3c3ca48bd3379dcd11817163ca50781927c4537345d608b5045998/librt-0.8.1-cp314-cp314-win_arm64.whl", hash = "sha256:0d2f82168e55ddefd27c01c654ce52379c0750ddc31ee86b4b266bcf4d65f2a3", size = 48058, upload-time = "2026-02-17T16:12:28.556Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d2/0e/9b23a87e37baf00311c3efe6b48d6b6c168c29902dfc3f04c338372fd7db/librt-0.8.1-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:2c74a2da57a094bd48d03fa5d196da83d2815678385d2978657499063709abe1", size = 68313, upload-time = "2026-02-17T16:12:29.659Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/db/9a/859c41e5a4f1c84200a7d2b92f586aa27133c8243b6cac9926f6e54d01b9/librt-0.8.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:a355d99c4c0d8e5b770313b8b247411ed40949ca44e33e46a4789b9293a907ee", size = 70994, upload-time = "2026-02-17T16:12:31.516Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4c/28/10605366ee599ed34223ac2bf66404c6fb59399f47108215d16d5ad751a8/librt-0.8.1-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:2eb345e8b33fb748227409c9f1233d4df354d6e54091f0e8fc53acdb2ffedeb7", size = 220770, upload-time = "2026-02-17T16:12:33.294Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/af/8d/16ed8fd452dafae9c48d17a6bc1ee3e818fd40ef718d149a8eff2c9f4ea2/librt-0.8.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9be2f15e53ce4e83cc08adc29b26fb5978db62ef2a366fbdf716c8a6c8901040", size = 235409, upload-time = "2026-02-17T16:12:35.443Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/89/1b/7bdf3e49349c134b25db816e4a3db6b94a47ac69d7d46b1e682c2c4949be/librt-0.8.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:785ae29c1f5c6e7c2cde2c7c0e148147f4503da3abc5d44d482068da5322fd9e", size = 246473, upload-time = "2026-02-17T16:12:36.656Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4e/8a/91fab8e4fd2a24930a17188c7af5380eb27b203d72101c9cc000dbdfd95a/librt-0.8.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1d3a7da44baf692f0c6aeb5b2a09c5e6fc7a703bca9ffa337ddd2e2da53f7732", size = 238866, upload-time = "2026-02-17T16:12:37.849Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b9/e0/c45a098843fc7c07e18a7f8a24ca8496aecbf7bdcd54980c6ca1aaa79a8e/librt-0.8.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5fc48998000cbc39ec0d5311312dda93ecf92b39aaf184c5e817d5d440b29624", size = 250248, upload-time = "2026-02-17T16:12:39.445Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/82/30/07627de23036640c952cce0c1fe78972e77d7d2f8fd54fa5ef4554ff4a56/librt-0.8.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:e96baa6820280077a78244b2e06e416480ed859bbd8e5d641cf5742919d8beb4", size = 240629, upload-time = "2026-02-17T16:12:40.889Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/fb/c1/55bfe1ee3542eba055616f9098eaf6eddb966efb0ca0f44eaa4aba327307/librt-0.8.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:31362dbfe297b23590530007062c32c6f6176f6099646bb2c95ab1b00a57c382", size = 239615, upload-time = "2026-02-17T16:12:42.446Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2b/39/191d3d28abc26c9099b19852e6c99f7f6d400b82fa5a4e80291bd3803e19/librt-0.8.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:cc3656283d11540ab0ea01978378e73e10002145117055e03722417aeab30994", size = 263001, upload-time = "2026-02-17T16:12:43.627Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b9/eb/7697f60fbe7042ab4e88f4ee6af496b7f222fffb0a4e3593ef1f29f81652/librt-0.8.1-cp314-cp314t-win32.whl", hash = "sha256:738f08021b3142c2918c03692608baed43bc51144c29e35807682f8070ee2a3a", size = 51328, upload-time = "2026-02-17T16:12:45.148Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7c/72/34bf2eb7a15414a23e5e70ecb9440c1d3179f393d9349338a91e2781c0fb/librt-0.8.1-cp314-cp314t-win_amd64.whl", hash = "sha256:89815a22daf9c51884fb5dbe4f1ef65ee6a146e0b6a8df05f753e2e4a9359bf4", size = 58722, upload-time = "2026-02-17T16:12:46.85Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b2/c8/d148e041732d631fc76036f8b30fae4e77b027a1e95b7a84bb522481a940/librt-0.8.1-cp314-cp314t-win_arm64.whl", hash = "sha256:bf512a71a23504ed08103a13c941f763db13fb11177beb3d9244c98c29fb4a61", size = 48755, upload-time = "2026-02-17T16:12:47.943Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a8/93/949053fb462eecc4a9a5ee770a81f4b40be7b79538b245545d4aebc6b58b/librt-0.15.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:f5de7feedc56337a088eb15cd9fafa9938367362221d8cc62c642b7f94821993", size = 149833, upload-time = "2026-08-07T10:47:39.86Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/61/ca/8281aa6cd560a3420e4497729f6b704b53be3eeaaef82d5aeadddaf7441f/librt-0.15.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:6c0eb900c0e91f4aebe680845242e614f1864edfd44106380d0752ac29522bf8", size = 154088, upload-time = "2026-08-07T10:47:41.065Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/dd/02/1a1662dceaba6a086360891448d5ce9a7d3555976cae59a31a39d744b9c7/librt-0.15.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e8c9a650a188e38bac005048cbe6342e81407782944d01934540ab75e417df21", size = 494215, upload-time = "2026-08-07T10:47:42.388Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/69/84/99211619dc656370a3740c33d2b0b6d5a3fb1e73689314f6ed477a397dc4/librt-0.15.0-cp314-cp314-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:92bfed8deec93df30286b9fe9e3b1dd17329cc076a192b4ee5ec223841d54953", size = 491173, upload-time = "2026-08-07T10:47:43.683Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d4/aa/5448d0b05f4579b635d3899176817ebf561af0e57bacd425b5b1887264c1/librt-0.15.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ec4b19788f835711a2072f9dbe6b03b3bf32ed1f0fb30cf399bdd59d9f0c33fa", size = 505512, upload-time = "2026-08-07T10:47:45.314Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/95/82/01940e40b83c43a546c4a3c896cf34ca272a9690899d55914e4827b3dcce/librt-0.15.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d4c7bacb70930f3d0a56f4ecf1be474a1f0d941b01dd73b756f3c256d42cb879", size = 523073, upload-time = "2026-08-07T10:47:46.66Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/88/fa/759c0030f3ee371439eb26de34fc745807caf0abb878af7af4b8b7c3dd3d/librt-0.15.0-cp314-cp314-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:3e79f05e4a08b4d880342673312bbc895b56df7765605796f15902eb5367d3ae", size = 515080, upload-time = "2026-08-07T10:47:48.319Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/0b/27/894e072228fcb159703c655da69f8cd10dbed489c36e3df7dd032a2483be/librt-0.15.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:a417149c0cba4d50b61e992e5a15e69eaf96746609b461cc4ed168aeef6b79dd", size = 534164, upload-time = "2026-08-07T10:47:49.875Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/98/a3/0078e91c1f36f8815db17827de15650b9a3fe56c55fbf998c854b34e40d3/librt-0.15.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:da7a94d6a3411f579d72aa3e3bc5fbca7ed4549f3dbd7e5de3aa567333374285", size = 540616, upload-time = "2026-08-07T10:47:51.408Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/86/33/81a29b796dd52a45e9ef7974c7732926e8f10f15b8d2be505665979f896d/librt-0.15.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:856f743ae607f2c1380eccb566c0038a9fb3eabf0fc2be2704d76d9f73557239", size = 545890, upload-time = "2026-08-07T10:47:52.818Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/05/82/8be1baa1350e5d30cfd70ae79d0a6f4dc5862ef47f7bb2808aabc9bb86e5/librt-0.15.0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:779a6e7c894737e5983e7790a9c78c4000c30e23c9aada08081bdbea53b0fa60", size = 523287, upload-time = "2026-08-07T10:47:54.165Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c6/4f/d1be6a01a35c20ef734e0e44113f87d4af756a9354a89dcfbe3b4f8af5e1/librt-0.15.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:96bb17dbe8bab3c0954fbebfc69ed395599de75b6bbc35e3270a878e15d4dd65", size = 565868, upload-time = "2026-08-07T10:47:55.566Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/67/88/649cfa33f5825927b160610f670bdab012a64d627eddb94fa795ea4292fd/librt-0.15.0-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:7220697efaa6e5348fc3d18ee7f8563d4bfecd9872b37ffb915bfc1d08840622", size = 81619, upload-time = "2026-08-07T10:47:56.886Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/22/31/8e88a8d5e48fc8d1a817787fb6811dfff6499acd6c8683dd83934aa6ede0/librt-0.15.0-cp314-cp314-win32.whl", hash = "sha256:f54598964d357b1c5ab77cf5d92f21e598fe0e23cdbe9618480807f81b4eba15", size = 100138, upload-time = "2026-08-07T10:47:58.093Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/80/92/20fd6c4b6a1b1a564b076d55cd3d427d8428217d7638dc25a654cc4791d4/librt-0.15.0-cp314-cp314-win_amd64.whl", hash = "sha256:3ff5893a2c23d886aa9ce786de5ac6ddc74aeeaf90743682b74d920e117d2e28", size = 121258, upload-time = "2026-08-07T10:47:59.564Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/fc/28/6af430b44d9ebb897b865a3c363b6dcace51357be2347cc0f8f869656a86/librt-0.15.0-cp314-cp314-win_arm64.whl", hash = "sha256:3722a099730704c9a3d70c879fc0f51daec25fe5f1555672d97bc595abeafb95", size = 106467, upload-time = "2026-08-07T10:48:01.097Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7e/aa/b42bb798942ced219f6d63b27e07f91237887a8d0bd0921666db79a13790/librt-0.15.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:38c0c7d4b6fc06c3324b3f9162c8391bfc4fd9dde53afe1033ce7edb48d5a714", size = 159523, upload-time = "2026-08-07T10:48:02.442Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/75/03/1b53cd4ef904e73b1d828a5f90143bf94a2967d7cfff0b9ccf93e12aa9b4/librt-0.15.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:8b2fdd7ead3c995c37940a790690660d0ca006c302db26cc51933f6766866fc3", size = 161638, upload-time = "2026-08-07T10:48:03.725Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ac/c4/9f9c9fba097d49e9e694c2b4dc331df31884645ecbc58a93b4b5fc69d2c5/librt-0.15.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2fde98cf1fc4bac144ce23c2c4c017b924ba714509ea9334977b0b27050c837d", size = 701795, upload-time = "2026-08-07T10:48:05.135Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4c/05/0966840bda0380c8ae167b9043c6230202941cc90ea29c48e096964c765e/librt-0.15.0-cp314-cp314t-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:e3b461183c5fa7681b48560f91515f53a953122fb30c71e07abc67d7ddf58c38", size = 682147, upload-time = "2026-08-07T10:48:06.555Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/18/af/1c47ca573c30ea47d195aec26133af522fea1104afaace028d7b32247ea8/librt-0.15.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4bbcc257e3babea20a91715c361b24554ec4e8f51aa578568afc230799fe1a19", size = 696397, upload-time = "2026-08-07T10:48:08.03Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2e/0f/1aed6223d4f9f9d1171a8596ff100ea4c3f7699fea7a4ba657c3e60daa6c/librt-0.15.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b845b8d48088fad0cadc84be4b8fda63203be7e9237b71015b3925443c1f35ab", size = 722542, upload-time = "2026-08-07T10:48:09.569Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c6/22/9e3a929aea456c97d69e6ef3884efea56d4807f97399471cc946baebd8af/librt-0.15.0-cp314-cp314t-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b30e600e8f337b9bd7f39b86d9fdfedc73cc46e3d0f745931a23a234220bb7e2", size = 729709, upload-time = "2026-08-07T10:48:11.129Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e9/1b/c327ef6018e3a9ca0b8e7c5eddeeb331ba8f9b76c24e126d37d0f6d62faf/librt-0.15.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:64b0c8c35aa4c4ed79896359f3e0b285cbe4e610042106500da4811c322cc108", size = 752891, upload-time = "2026-08-07T10:48:12.558Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d7/d1/d5f1ea02c56930087009e39db9b70660a663e76c730b27b925d786718457/librt-0.15.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:0da0d94cb802f32a0524653e7201f2cef72d5f700a5407678f5290483d4fcd08", size = 745301, upload-time = "2026-08-07T10:48:14.55Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d9/3c/5f7c585d15ebb2250c73e7c0ee4e9e47be72c65d520c07ddbcdc62037674/librt-0.15.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:4a6369168d371207339b1e50d4532b06a7121586141f82599505a3f315751d47", size = 747921, upload-time = "2026-08-07T10:48:16.453Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7f/52/1443a446486eba966bcbca1696b472e4f210320ec42f490a47f48fbf0fdc/librt-0.15.0-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:c434e072557ade9cbc642d052c89d031efe47d5c9614523619d0d74a02378e81", size = 727561, upload-time = "2026-08-07T10:48:18.089Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/79/91/2270a9380f11725cf83ce1925a5e32dd1dde2be9bba597f25c10a38644e7/librt-0.15.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:c7eec6a42018bc1d45763b1c162d3d2bf7c3b9a1b0ed30d3e91dcba390efefcc", size = 774417, upload-time = "2026-08-07T10:48:19.611Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9e/3b/f4b1548d4f5b99186737fe27aec238e9823e8d5d23bf4df007c030689dc5/librt-0.15.0-cp314-cp314t-win32.whl", hash = "sha256:6912fa5e635d74529ac7cdb1bdf6ca3af4453da8d1edbe0110ee1cb4ad407ebf", size = 104381, upload-time = "2026-08-07T10:48:21.048Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/80/b6/134afad262def1de04c0843c376d02135f1168af43f22e09a52bd8394727/librt-0.15.0-cp314-cp314t-win_amd64.whl", hash = "sha256:8e11699ed745931c395acd3621b07062e0f840efa6935aad87a64ed0995f0915", size = 127034, upload-time = "2026-08-07T10:48:22.561Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/99/5f/1b6846b20572bd699c9e9ec321a5f781845bee477df2aa2a43b28bc40119/librt-0.15.0-cp314-cp314t-win_arm64.whl", hash = "sha256:5d2a91724463bfed4f573cd7a9fdc856d2e230d0c0e5a61416a93481dccd8605", size = 110827, upload-time = "2026-08-07T10:48:23.804Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c6/44/4de9f4ddadb009a55c7758eb5736d62534a7daaf27bd71bc50e64b606b06/librt-0.15.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:8443e38dcfcfdbcf5add5118c623efd788d65ac2e25756d6251a54a06a4d0aca", size = 149843, upload-time = "2026-08-07T10:48:25.148Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1f/eb/5d9ab71e30119c44094e0275f38b47dd327aea0f843a080396677029d508/librt-0.15.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:6d15a29033c57490cfe2069097c6fc4049e4e65ffbb749be7dc453b7c4c68965", size = 154510, upload-time = "2026-08-07T10:48:26.485Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d0/9c/8505d1b8f5e8c19587bd03f7429993b3e9ce5c06819d856bfb11d919374c/librt-0.15.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d2c05c729b589e734c09578bf5964be48a911765484840d017bbc84f49d4c4ad", size = 497543, upload-time = "2026-08-07T10:48:28.045Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1d/9a/3a8390775cb095765aded027ac9c63e7c8ea74e731498607544c6505de0e/librt-0.15.0-cp315-cp315-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:fa60887537e1d0cd2d9982269d33a709bf54b195cd2b9364fc0a758022af5bd9", size = 480452, upload-time = "2026-08-07T10:48:29.531Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e7/40/258a4a7117ee915d66de5cd9b8ade65a440993161107ce3a686f1859955c/librt-0.15.0-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d8bc24219b24c0af375718942ab75e3544b2763085f40f965be4326734ae8328", size = 507768, upload-time = "2026-08-07T10:48:31.007Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6b/c6/2f4dd296c97a0b85b98894519b279408ec9dd602d4f692b1ea0e25dee670/librt-0.15.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:86a21a7bd3fe3a419512ef424cc1c020f6771d0b29cfddff36d1635a855e63f0", size = 525122, upload-time = "2026-08-07T10:48:32.7Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/49/dd/29eab42be13b2bf0ea8cb227135a45d44693e30a7e8b92871981ff56b82b/librt-0.15.0-cp315-cp315-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:dbab647e88d90b3167b91efe7091e248653688ed4337e4f90907a722c7361bb9", size = 520371, upload-time = "2026-08-07T10:48:34.294Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/91/ed/4bad71adeca8fe208b775c2a35417fa5a2584c8f4791daaf89a89450fea1/librt-0.15.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:d8edcf6f550e918dca779c069b9e156385c60b406f99fc7641f32c52f7193659", size = 537258, upload-time = "2026-08-07T10:48:35.88Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4c/63/59dba6143fdcc7240c54458b629f3250000a61b8945890fc9efd451b19c5/librt-0.15.0-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:8b62076030baa2d8b1501a46bf0e19c27a489aa90671c55665bff7887f7660b0", size = 527432, upload-time = "2026-08-07T10:48:37.466Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ec/21/21a24c6a2327d8362580efebe77286bf47b0f4062ec5ea41766e609d3c7d/librt-0.15.0-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:d00d20d1818e82a07a0ee0aa89a98b17ed7916b92441090b683719cb20a59b6d", size = 548108, upload-time = "2026-08-07T10:48:39.384Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5a/6d/fc68c89a7971418b41f9a873623ff935cb864097544c6a2f8ce491c8ef5d/librt-0.15.0-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:4e6ee93fc3cf848dcbf0cce2eca73d8e7dcd0cc2b6df3a529d57750b30a4c55c", size = 529681, upload-time = "2026-08-07T10:48:41.392Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/65/7e/c2d98766124400d722063a630b0fde38a9fc768705d37eecca15c47dc192/librt-0.15.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:32896a0af72508ea979e0acb4e4c04cbeeae04938167950d535c83c45597167d", size = 567736, upload-time = "2026-08-07T10:48:43.124Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/55/6c/f8c34a95e3a515c6e1c192b89511e7253c89a7760c6b500d57ffdb8d2dc8/librt-0.15.0-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:ec3ba415afaf951f6951b1dd16d3c8e4f540065fc382d7e70b823a79567ca374", size = 81673, upload-time = "2026-08-07T10:48:44.645Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c9/9e/e23fa8e78679ec45728188650b39e8ff476c83b691c96f749217df3b1b7c/librt-0.15.0-cp315-cp315-win32.whl", hash = "sha256:d2813ba2503764f0450680c533d13df7cff9b49df1411062eded5f67db4195b9", size = 100081, upload-time = "2026-08-07T10:48:46.171Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e1/dc/3eb4c5e297343f0620a55532cd7c8d764d3001fa2159212dadf480464827/librt-0.15.0-cp315-cp315-win_amd64.whl", hash = "sha256:b87d67e33afaf265262f2a66db578284b88ee2e6fcd224579cb5c15518677ad8", size = 121228, upload-time = "2026-08-07T10:48:47.631Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/97/70/43abce19f04e49762f8ec834c8fafee13cc40fd6b94a72a24e534febfcd0/librt-0.15.0-cp315-cp315-win_arm64.whl", hash = "sha256:713bd7df21170b982e729e46870f31d6b437bd1a9b4648cffb529bd3c2ec5c4b", size = 106487, upload-time = "2026-08-07T10:48:49.095Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/de/15/83f2deddb9368b8951ec8c9477269b5b9b8bd9bbf15e57402d0f38817dca/librt-0.15.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:3de789c82752730f94782a5ee518baf9c05edf85733aeaf73bb6e518755cdf54", size = 159448, upload-time = "2026-08-07T10:48:50.649Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/06/bf/043097353f9b3c73b583d07f6b8e552795463f4bfc8caf85e42eee50c26a/librt-0.15.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:e0b5deec9a8664eb722c797241970fd4aa1894d25fda36a1ddac0f7407606bd6", size = 161686, upload-time = "2026-08-07T10:48:52.174Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f4/2a/8ae77f9719d42ce71cd708560a3557b38ac3c17a0383e57f87084de45bbe/librt-0.15.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5563302a8359bc2295bb7084d1a8ed1519df96afb30eb2aa4e0bff7b54228988", size = 710668, upload-time = "2026-08-07T10:48:53.782Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/61/34/c0436ea134deb9a0d6da80a396a2739a81cb31e0418f7227239e23140898/librt-0.15.0-cp315-cp315t-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:22d6263b9d39d7bbb286fa791945646e3218f1be2d693e36fb630f1d0e59cd13", size = 679396, upload-time = "2026-08-07T10:48:55.645Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4a/9f/001e0d99aa9250d5cd5715a9081291a20656083459f9019cda15255329e1/librt-0.15.0-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:39ffd14646190c454f0d86e0d256b33f00a87a26ab410e619773b841d0e41416", size = 704313, upload-time = "2026-08-07T10:48:57.46Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2d/53/b34fa9d0ff00f136f4d58ebb4c411ff634baed1eb412bb602a2bc8dcafcb/librt-0.15.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c47318cd3a61401452de11282242937e3e057c4fd3dbaf601e269d0928a06c0a", size = 729847, upload-time = "2026-08-07T10:48:59.231Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/86/ac/fa4d7a424665040e95baf480a6d523446057684b6758624c85338e8a23b2/librt-0.15.0-cp315-cp315t-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a56a1d4f859a82ca5b99fc4b82c9b027b15e3c455c5cd99e7d0719f27bb20b6c", size = 742736, upload-time = "2026-08-07T10:49:01.151Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8a/f1/e17a9bb5de6fb8c3186ed1a7d68d21618b027ac2d3633e03d3b6109c67ae/librt-0.15.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:077471b3182db4e17c36ae91555f36a4d2c00080b267f749bcad34a478a9a302", size = 763454, upload-time = "2026-08-07T10:49:03.039Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1d/ec/ecd02cd30935b931b9cdbfed6ab5a099c51b280b4e7baa274da80978ed27/librt-0.15.0-cp315-cp315t-musllinux_1_2_i686.whl", hash = "sha256:411ca4d1b905b860ceba7570dd6717a71dedaddcc4b0f77ece710aa41ee11f8d", size = 743296, upload-time = "2026-08-07T10:49:04.941Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e6/b5/b3c2b8353ce820a4854f78d19321344242f89fa71c975b71132ba9bf242a/librt-0.15.0-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:1256589e0b0adb31751d685a68bce29d73407ddf4ef05d4188f49d5dcf9566d9", size = 756217, upload-time = "2026-08-07T10:49:06.825Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/3c/52/6cc22542ba59146b05cca2a656f9ff8bb67e38e63d12c3b0cc183d837bf1/librt-0.15.0-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:f42b74a53e5f26a0ba0007411a7455b66c67ce4022a39cc1f56fc4efd65bcbab", size = 741934, upload-time = "2026-08-07T10:49:08.839Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/40/32/a04b72b1aa86e3be23b2ecff8c1aad2dcc955bd3956d6d26e7e34267e57a/librt-0.15.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:291bf73caf78b9e88d6fae9bfd693207ff7d832e2fdbe2cf8e746bc13f5f892b", size = 783763, upload-time = "2026-08-07T10:49:10.661Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6c/f0/89eb11dffbe9279ff37144dec786927314502ae0b114f1449dc78c458aab/librt-0.15.0-cp315-cp315t-win32.whl", hash = "sha256:c16d15ee371643ab48dc8248a3e680ebbeca573a13af2c3dd0c985b142d77162", size = 104313, upload-time = "2026-08-07T10:49:12.305Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6d/4a/1f1978c200f563beda63c36adff2d65bbecb81e365e8e69e572f5f70fbc6/librt-0.15.0-cp315-cp315t-win_amd64.whl", hash = "sha256:dbd605739f228912dc49027cb764456b9757750bdc2b6b7773164db7096c6fd1", size = 126889, upload-time = "2026-08-07T10:49:13.881Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/38/a6/800800bfed7b1fb10fc3f3d557785c3854e80d3f7a9800d784b176a1fc2d/librt-0.15.0-cp315-cp315t-win_arm64.whl", hash = "sha256:84d244b00604d17df3fc7736c327892d6bba66181254aa4087be807b6c342bdc", size = 110700, upload-time = "2026-08-07T10:49:15.499Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1213,23 +1317,44 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "mypy"
|
||||
version = "1.19.1"
|
||||
version = "2.3.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "ast-serialize" },
|
||||
{ name = "librt", marker = "platform_python_implementation != 'PyPy'" },
|
||||
{ name = "mypy-extensions" },
|
||||
{ name = "pathspec" },
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/f5/db/4efed9504bc01309ab9c2da7e352cc223569f05478012b5d9ece38fd44d2/mypy-1.19.1.tar.gz", hash = "sha256:19d88bb05303fe63f71dd2c6270daca27cb9401c4ca8255fe50d1d920e0eb9ba", size = 3582404, upload-time = "2025-12-15T05:03:48.42Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/82/6a/878cc1097d4035f82bd516658d0c528d2a9955bc7b363afcbd0b07fea11b/mypy-2.3.1.tar.gz", hash = "sha256:47c1b1207258513a9d93495f69c8be9de73916186f0e52703e8c461b7a623419", size = 3992554, upload-time = "2026-08-15T03:03:38.549Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/de/eb/b83e75f4c820c4247a58580ef86fcd35165028f191e7e1ba57128c52782d/mypy-1.19.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:06e6170bd5836770e8104c8fdd58e5e725cfeb309f0a6c681a811f557e97eac1", size = 13199744, upload-time = "2025-12-15T05:03:30.823Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/94/28/52785ab7bfa165f87fcbb61547a93f98bb20e7f82f90f165a1f69bce7b3d/mypy-1.19.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:804bd67b8054a85447c8954215a906d6eff9cabeabe493fb6334b24f4bfff718", size = 12215815, upload-time = "2025-12-15T05:02:42.323Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/0a/c6/bdd60774a0dbfb05122e3e925f2e9e846c009e479dcec4821dad881f5b52/mypy-1.19.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:21761006a7f497cb0d4de3d8ef4ca70532256688b0523eee02baf9eec895e27b", size = 12740047, upload-time = "2025-12-15T05:03:33.168Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/32/2a/66ba933fe6c76bd40d1fe916a83f04fed253152f451a877520b3c4a5e41e/mypy-1.19.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:28902ee51f12e0f19e1e16fbe2f8f06b6637f482c459dd393efddd0ec7f82045", size = 13601998, upload-time = "2025-12-15T05:03:13.056Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e3/da/5055c63e377c5c2418760411fd6a63ee2b96cf95397259038756c042574f/mypy-1.19.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:481daf36a4c443332e2ae9c137dfee878fcea781a2e3f895d54bd3002a900957", size = 13807476, upload-time = "2025-12-15T05:03:17.977Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/cd/09/4ebd873390a063176f06b0dbf1f7783dd87bd120eae7727fa4ae4179b685/mypy-1.19.1-cp314-cp314-win_amd64.whl", hash = "sha256:8bb5c6f6d043655e055be9b542aa5f3bdd30e4f3589163e85f93f3640060509f", size = 10281872, upload-time = "2025-12-15T05:03:05.549Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8d/f4/4ce9a05ce5ded1de3ec1c1d96cf9f9504a04e54ce0ed55cfa38619a32b8d/mypy-1.19.1-py3-none-any.whl", hash = "sha256:f1235f5ea01b7db5468d53ece6aaddf1ad0b88d9e7462b86ef96fe04995d7247", size = 2471239, upload-time = "2025-12-15T05:03:07.248Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/be/c4/42a49d44aeff804edf1b19acce0b49e8bd1a9c57dee9605dd8d980aa43d7/mypy-2.3.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:192abaedf75da1bc0b1cef104927e70ec49c1ef0031cc4825c7ee10a438ed24d", size = 13986778, upload-time = "2026-08-15T03:01:33.69Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/45/13/9331fd2dfed7194d66c5304072894a8be3e51e9deda6863c1eceaa35a43d/mypy-2.3.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bf678dffd16efcda2c15cbd30e9ecc0081388e29ea23687a88e686ed92638dc3", size = 14188467, upload-time = "2026-08-15T03:02:40.554Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/78/f7/f4a34edab45667c5465855dc585a20e87978ffa8aee711445b7239d120c6/mypy-2.3.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e036f06b41630f4c8a1d48f9ac6aa26acc65f8be089973f5519da643318f03f", size = 15225538, upload-time = "2026-08-15T03:03:09.761Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/40/05/534b3590757bd05794f73e07f6666c2a77b8597ffed795c94ce570096aa0/mypy-2.3.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:71af9c8a894e862b58e92abb08e53b05a384a1e5e5d6dc7cda59126211a53d82", size = 15480805, upload-time = "2026-08-15T03:01:41.134Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/55/da/bdfba852e2562f599624af5bb7d29e36b0b4f526f2b8bac85efe0dd1803d/mypy-2.3.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:3c80cd23d85368bdd9f37d5231dfd97d35bcbf5bf41af96ef3a9b078ad1957f9", size = 7761712, upload-time = "2026-08-15T03:02:36.008Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/98/31/60fc64a74cdba4f2a5d642d32317993e479163e1ac7d91b695e5d15e2264/mypy-2.3.1-cp314-cp314-win_amd64.whl", hash = "sha256:4956f34d145e145562a0a0bf367f642bbc85c04ec2baf47ae015947c3169a85d", size = 11423968, upload-time = "2026-08-15T03:02:06.931Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a9/23/eb5950b24cd26ba3b78f87707a275568d633c77dae8e61c9661be6055ca6/mypy-2.3.1-cp314-cp314-win_arm64.whl", hash = "sha256:cfb12e360242d23d91f5e978d94f58ea66acf5804c4fb6f2f794a20d4cb1b595", size = 10399323, upload-time = "2026-08-15T03:02:33.671Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/82/c7/f80f4e46c0b9a00eb5f78a79d49dda8bdf56a5230f7257fb33e76be04da7/mypy-2.3.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e5f1c50bb05b64e2026b52867e8d21106f01313c744a2c4ecc34c90d12e8d6e2", size = 15121308, upload-time = "2026-08-15T03:01:46.053Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5d/74/9b04f17c7074cc5188f02fb63a2ca1d43fedf479e84fe3091c39061a1d7f/mypy-2.3.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:667196b352f4cf304ded4c10f90cfc179263a1acfb3cdcfa984bdfd340d498bc", size = 15536590, upload-time = "2026-08-15T03:01:35.941Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/26/04/c837ef6208e567774e2ed1f863f8ba6ec4817b1b6dd426315e5d559b6ec9/mypy-2.3.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b9c53e395c12cad2c6d4b67d5da7c6057638a132d85c08b73646b18f802a0045", size = 16791074, upload-time = "2026-08-15T03:01:31.073Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/37/68/48730230afa45192d5bd429a6a2ff24a6f8dedda90fdf2b221792b54518f/mypy-2.3.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:18162b128c3f9c703cd35f5537446900b0d21a2549aa7a95d21380d2ef643fb0", size = 17069183, upload-time = "2026-08-15T03:02:28.566Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1c/ea/ca23fc9c20eeda09a15c9cbcf50015d0e73f409f6ead059e42aa69a608ff/mypy-2.3.1-cp314-cp314t-win_amd64.whl", hash = "sha256:30c0477d4aab7b7f39c8397dc877f2c96b9fe5588ec379f372c56eb63d599f63", size = 12154679, upload-time = "2026-08-15T03:02:04.809Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/3b/67/8d982126034990869466f73b8db80dcb2234a7ac39b4dad093e047a79835/mypy-2.3.1-cp314-cp314t-win_arm64.whl", hash = "sha256:6941ab3619377bc3f32ca02876b07d27f216f5201604b664d3937ea0fdd23bb4", size = 10969159, upload-time = "2026-08-15T03:02:38.152Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ee/f7/41e7f2d8117fbc7a7587286162ffe2f688984b69c46ed63cf5f2e4fc3bae/mypy-2.3.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:6f041a6de52c9217ca125e78ba0a335cb7fd98a1c0580978e49ab2b126f70b57", size = 13990694, upload-time = "2026-08-15T03:03:21.919Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/06/85/8f665811a0c8f3bf6fa1d9acd665ec2d97a2bcc453ae68dcd92340941cd6/mypy-2.3.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5159ae60f5dbc3a498af5ba8365505808ac8031bc63f9e00304ad545d40bdd9b", size = 14203518, upload-time = "2026-08-15T03:01:48.455Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2d/82/91b866c8546b120bff83b73a439d90d2d63ef3aff113599e6b8e4d566848/mypy-2.3.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:47a8a7a0a7f6f6e63995c0ac36fa0c07b127413fdc81f0439b7f3dccafd33561", size = 15220224, upload-time = "2026-08-15T03:01:23.577Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c8/78/c226c99208ee40de7c768369fa533f933afa003dfdc606ff021450724e91/mypy-2.3.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:2329c0501293d4e1f33bc15d04d6304d65a1cdda967ee93a05c1e681a3923133", size = 15501512, upload-time = "2026-08-15T03:02:09.453Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a9/e7/7cfb3f106c393979f4cc37ad6c0586044d50401e3c35b0c003e4f3ba6bc9/mypy-2.3.1-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:bb26deed807bdb0457cf3e3f1cd7c4a1cf9d66864eaf1b4a61e06805d4c6b1f9", size = 7761913, upload-time = "2026-08-15T03:01:55.65Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/99/3c/52affefa273b97939a1f474ae4a349c8718635c15b941112dfab4291b0c1/mypy-2.3.1-cp315-cp315-win_amd64.whl", hash = "sha256:375d7013876a8233b2d05be185bfa09f689696cd999ce8b1cfe6acac5c80e8a3", size = 11422533, upload-time = "2026-08-15T03:03:24.101Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2a/b7/75643e70c72a5b346d8a9b1543c967ea8824df2ee3fb7ccba652c272b7bb/mypy-2.3.1-cp315-cp315-win_arm64.whl", hash = "sha256:586b3612214cceabb3c0f588c97e7d1e535393f06a60e912e994f6b3ace97523", size = 10397931, upload-time = "2026-08-15T03:02:55.265Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/10/ce/53be21f2d4adfcd26f63f1184a13ed797015ab463853f117e2e11e4d726f/mypy-2.3.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:ef0c6335cda9d807f8193d8ff6204a72bc909fa9882aacbca14f43cdb7188306", size = 15118669, upload-time = "2026-08-15T03:02:51.479Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/62/43/20de757cd42989d291a17fad607742c4c74e875ce5cea00e5a5225020ac1/mypy-2.3.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e598c8c66401d26b150872154a286e6d484cf2789c3bb28a7556806298423021", size = 15545627, upload-time = "2026-08-15T03:03:05.132Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7e/fc/092bdf77ad280eaf501422f0f3b966012b528076cc13e41a774861c907d1/mypy-2.3.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:eda22fd4efa9dcd39331d1dede9b5b8b8a7fd69af07592e778433da98610d29e", size = 16764157, upload-time = "2026-08-15T03:02:23.958Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/94/5c/c94c4d62d909b07f552d0d9356d7acc943825558e602a64822ffa2231536/mypy-2.3.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:2a0ba2e57847849fb0d1fcdabb32786d223095ed8bc121dfe322bcdb3d9c46bc", size = 17073258, upload-time = "2026-08-15T03:02:14.573Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c0/f7/511a88b89e478053c02d22039bb8f3ce4183efe8fd7a4f0a5910a8bb0a32/mypy-2.3.1-cp315-cp315t-win_amd64.whl", hash = "sha256:3f7e865dd51f235f60a2dbcd8728a1c095f5ca28f095d48a725b84cd935735c4", size = 12135505, upload-time = "2026-08-15T03:02:16.714Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/71/bf/02573b56964ecb0f7c644f915f53c325ae15c3faec521c5adf11599a32df/mypy-2.3.1-cp315-cp315t-win_arm64.whl", hash = "sha256:8ad80807dc3ab8ea978b1b2b6e4a657194ace1d4ef03e0e731aff1abd517da29", size = 10962647, upload-time = "2026-08-15T03:01:43.712Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8e/41/9675c7a1e78edecfba0b79e587a52594c56e189368261dc7b3a7fffb9527/mypy-2.3.1-py3-none-any.whl", hash = "sha256:6ed5c7e3419083268e5c9258bd1c1ef91af44a9e89374dbcaf37b775716e72eb", size = 2754338, upload-time = "2026-08-15T03:02:53.4Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1543,11 +1668,11 @@ bcrypt = [
|
||||
|
||||
[[package]]
|
||||
name = "pathspec"
|
||||
version = "0.12.1"
|
||||
version = "1.1.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712", size = 51043, upload-time = "2023-12-10T22:30:45Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/5a/82/42f767fc1c1143d6fd36efb827202a2d997a375e160a71eb2888a925aac1/pathspec-1.1.1.tar.gz", hash = "sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a", size = 135180, upload-time = "2026-04-27T01:46:08.907Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", size = 31191, upload-time = "2023-12-10T22:30:43.14Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f1/d9/7fb5aa316bc299258e68c73ba3bddbc499654a07f151cba08f6153988714/pathspec-1.1.1-py3-none-any.whl", hash = "sha256:a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189", size = 57328, upload-time = "2026-04-27T01:46:07.06Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2261,7 +2386,7 @@ requires-dist = [
|
||||
{ name = "joserfc", specifier = "~=1.6.8" },
|
||||
{ name = "memray", marker = "extra == 'dev'", specifier = "~=1.15" },
|
||||
{ name = "mutagen", specifier = "~=1.47" },
|
||||
{ name = "mypy", marker = "extra == 'dev'", specifier = "~=1.19" },
|
||||
{ name = "mypy", marker = "extra == 'dev'", specifier = "~=2.3.0" },
|
||||
{ name = "opentelemetry-distro", specifier = "~=0.56" },
|
||||
{ name = "opentelemetry-exporter-otlp", specifier = "~=1.36" },
|
||||
{ name = "opentelemetry-instrumentation-aiohttp-client", specifier = "~=0.56" },
|
||||
|
||||
Reference in new issue
Block a user