mirror of
https://github.com/kuhyx/steam-backlog-enforcer.git
synced 2026-11-29 21:34:01 +01:00
Compare commits
2 Commits
9af0d76b4f
...
405f3f3d94
| Author | SHA1 | Date | |
|---|---|---|---|
| 405f3f3d94 | |||
| eb47067617 |
@ -4,7 +4,6 @@ from __future__ import annotations
|
||||
|
||||
import json
|
||||
import logging
|
||||
import time
|
||||
|
||||
from steam_backlog_enforcer._actions import allowed_app_ids, allowed_games
|
||||
from steam_backlog_enforcer._echo import _echo
|
||||
@ -12,6 +11,7 @@ from steam_backlog_enforcer._enforce_steps import (
|
||||
_enforce_setup,
|
||||
_reinstall_missing_allowed,
|
||||
)
|
||||
from steam_backlog_enforcer._file_wake import open_file_wake
|
||||
|
||||
# Re-exported: five modules and the test suite import get_all_owned_app_ids
|
||||
# from here, so splitting it into _owned_apps_cache stays invisible to them.
|
||||
@ -30,6 +30,7 @@ from steam_backlog_enforcer._total_block import (
|
||||
total_block_needs_cleanup,
|
||||
)
|
||||
from steam_backlog_enforcer._whitelist_locking import lock_enforcement_files
|
||||
from steam_backlog_enforcer._workout_budget import workout_log_path
|
||||
from steam_backlog_enforcer.config import (
|
||||
CONFIG_FILE,
|
||||
Config,
|
||||
@ -222,6 +223,8 @@ def do_enforce(config: Config, state: State, *, demo: bool = False) -> None:
|
||||
# One session for the whole daemon: the audit journal needs to see the
|
||||
# previous tick's record, so it cannot be rebuilt per iteration.
|
||||
session = new_session(demo=demo)
|
||||
# A credited workout wakes the wait, so the budget moves within the tick.
|
||||
wake = open_file_wake([workout_log_path(config)])
|
||||
try:
|
||||
while True:
|
||||
# Reload state from disk so CLI changes (e.g. new game
|
||||
@ -231,7 +234,7 @@ def do_enforce(config: Config, state: State, *, demo: bool = False) -> None:
|
||||
fresh = State.load()
|
||||
except (json.JSONDecodeError, OSError, ValueError) as exc:
|
||||
logger.warning("Failed to reload state: %s", exc)
|
||||
time.sleep(ENFORCE_INTERVAL)
|
||||
wake.wait(ENFORCE_INTERVAL)
|
||||
continue
|
||||
# Every field, not a hand-picked few: the daemon's pick sweep saves
|
||||
# this object, and any field left stale here (cooldowns, pick
|
||||
@ -242,6 +245,6 @@ def do_enforce(config: Config, state: State, *, demo: bool = False) -> None:
|
||||
vars(state).update(vars(fresh))
|
||||
|
||||
_enforce_loop_iteration(config, state, session=session, demo=demo)
|
||||
time.sleep(ENFORCE_INTERVAL)
|
||||
wake.wait(ENFORCE_INTERVAL)
|
||||
except KeyboardInterrupt:
|
||||
_echo("\nEnforcer stopped.")
|
||||
|
||||
168
steam_backlog_enforcer/_file_wake.py
Normal file
168
steam_backlog_enforcer/_file_wake.py
Normal file
@ -0,0 +1,168 @@
|
||||
"""Wake the enforce loop early when a watched file is rewritten.
|
||||
|
||||
The loop ticks every few seconds. A workout credited on the PC should move the
|
||||
gaming budget well inside one tick, so the wait between ticks returns the
|
||||
moment screen-locker rewrites its ``log.json``; without an event it waits the
|
||||
full interval, exactly like the plain sleep it replaces.
|
||||
|
||||
Watches the *directory*, filtered to the file's name, never the file itself:
|
||||
writers replace these files atomically (temp file + rename), which swaps the
|
||||
inode, and a watch on the file dies after the first write.
|
||||
|
||||
inotify through ctypes rather than a dependency -- it is three libc calls. Any
|
||||
failure logs a warning and degrades to a plain sleep: the answer cache's stat
|
||||
stamp still picks the change up on the next tick, so degraded means "within a
|
||||
tick", never "missed".
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import ctypes
|
||||
import logging
|
||||
import os
|
||||
import select
|
||||
import struct
|
||||
import time
|
||||
from typing import TYPE_CHECKING, Final
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Iterable
|
||||
from pathlib import Path
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# <sys/inotify.h>
|
||||
_IN_CLOSE_WRITE: Final = 0x00000008
|
||||
_IN_MOVED_TO: Final = 0x00000080
|
||||
_IN_CREATE: Final = 0x00000100
|
||||
_IN_Q_OVERFLOW: Final = 0x00004000
|
||||
_IN_IGNORED: Final = 0x00008000
|
||||
_IN_ONLYDIR: Final = 0x01000000
|
||||
_WATCH_MASK: Final = _IN_CLOSE_WRITE | _IN_MOVED_TO | _IN_CREATE | _IN_ONLYDIR
|
||||
|
||||
# struct inotify_event { int wd; uint32_t mask, cookie, len; char name[]; }
|
||||
_EVENT_HEADER: Final = struct.Struct("iIII")
|
||||
_READ_SIZE: Final = 64 * 1024
|
||||
|
||||
|
||||
class FileWake:
|
||||
"""An interruptible inter-tick wait. Build once; never per tick.
|
||||
|
||||
A per-tick watcher would leak descriptors and miss every write landing
|
||||
between two ticks, which is the whole window this exists to close.
|
||||
"""
|
||||
|
||||
def __init__(self, fd: int | None, names: dict[int, frozenset[str]]) -> None:
|
||||
"""Wrap an inotify ``fd`` whose watch descriptors map to file names.
|
||||
|
||||
Args:
|
||||
fd: Non-blocking inotify descriptor, or ``None`` for plain sleep.
|
||||
names: Watch descriptor -> the file names that count in that dir.
|
||||
"""
|
||||
self._fd = fd
|
||||
self._names = names
|
||||
self._poll = select.poll()
|
||||
if fd is not None:
|
||||
self._poll.register(fd, select.POLLIN)
|
||||
|
||||
def wait(self, timeout: float) -> bool:
|
||||
"""Sleep up to ``timeout`` seconds, returning early on a watched write.
|
||||
|
||||
Returns:
|
||||
True when a watched file changed, False when the time ran out.
|
||||
"""
|
||||
deadline = time.monotonic() + timeout
|
||||
while (remaining := deadline - time.monotonic()) > 0:
|
||||
if self._fd is None:
|
||||
time.sleep(remaining)
|
||||
return False
|
||||
if self._poll.poll(remaining * 1000) and self._drain():
|
||||
return True
|
||||
return False
|
||||
|
||||
def close(self) -> None:
|
||||
"""Release the inotify descriptor; later waits are plain sleeps."""
|
||||
if self._fd is not None:
|
||||
self._poll.unregister(self._fd)
|
||||
os.close(self._fd)
|
||||
self._fd = None
|
||||
|
||||
def _degrade(self, reason: str) -> None:
|
||||
"""Drop to plain sleep, saying why, once."""
|
||||
logger.warning(
|
||||
"Workout wake-up disabled (%s) -- the budget now updates on the "
|
||||
"next enforce tick instead of instantly.",
|
||||
reason,
|
||||
)
|
||||
self.close()
|
||||
|
||||
def _drain(self) -> bool:
|
||||
"""Read every queued event; whether any of them is a watched file."""
|
||||
try:
|
||||
buf = os.read(self._fd, _READ_SIZE) if self._fd is not None else b""
|
||||
except BlockingIOError:
|
||||
return False
|
||||
except OSError as exc:
|
||||
self._degrade(f"reading inotify events failed: {exc}")
|
||||
return False
|
||||
changed = False
|
||||
offset = 0
|
||||
while offset + _EVENT_HEADER.size <= len(buf):
|
||||
wd, mask, _cookie, length = _EVENT_HEADER.unpack_from(buf, offset)
|
||||
start = offset + _EVENT_HEADER.size
|
||||
name = os.fsdecode(buf[start : start + length].split(b"\0", 1)[0])
|
||||
offset = start + length
|
||||
if mask & _IN_Q_OVERFLOW or name in self._names.get(wd, ()):
|
||||
changed = True
|
||||
elif mask & _IN_IGNORED:
|
||||
self._names.pop(wd, None)
|
||||
if not self._names:
|
||||
self._degrade("the watched directory was removed")
|
||||
return changed
|
||||
return changed
|
||||
|
||||
|
||||
def open_file_wake(paths: Iterable[Path]) -> FileWake:
|
||||
"""Watch the parent directory of each path for writes to that path.
|
||||
|
||||
Args:
|
||||
paths: Files to wake on; their directories must exist.
|
||||
|
||||
Returns:
|
||||
A :class:`FileWake`; a plain-sleep one, warned about, when inotify or
|
||||
every watch could not be set up.
|
||||
"""
|
||||
by_dir: dict[Path, set[str]] = {}
|
||||
for path in paths:
|
||||
by_dir.setdefault(path.parent, set()).add(path.name)
|
||||
try:
|
||||
libc = ctypes.CDLL(None, use_errno=True)
|
||||
libc.inotify_add_watch.argtypes = [
|
||||
ctypes.c_int,
|
||||
ctypes.c_char_p,
|
||||
ctypes.c_uint32,
|
||||
]
|
||||
fd = libc.inotify_init1(os.O_NONBLOCK | os.O_CLOEXEC)
|
||||
except (OSError, AttributeError) as exc:
|
||||
logger.warning("inotify unavailable (%s) -- waking on the tick only.", exc)
|
||||
return FileWake(None, {})
|
||||
if fd < 0:
|
||||
reason = os.strerror(ctypes.get_errno())
|
||||
logger.warning("inotify_init1 failed (%s) -- waking on the tick only.", reason)
|
||||
return FileWake(None, {})
|
||||
names: dict[int, frozenset[str]] = {}
|
||||
for directory, files in by_dir.items():
|
||||
wd = libc.inotify_add_watch(fd, os.fsencode(directory), _WATCH_MASK)
|
||||
if wd < 0:
|
||||
logger.warning(
|
||||
"Cannot watch %s (%s) -- %s changes wake only on the tick.",
|
||||
directory,
|
||||
os.strerror(ctypes.get_errno()),
|
||||
", ".join(sorted(files)),
|
||||
)
|
||||
continue
|
||||
names[wd] = frozenset(files)
|
||||
if not names:
|
||||
os.close(fd)
|
||||
return FileWake(None, {})
|
||||
return FileWake(fd, names)
|
||||
@ -38,7 +38,7 @@ from typing import TYPE_CHECKING
|
||||
|
||||
from steam_backlog_enforcer._bonus_incident import report_leetcode_incident
|
||||
from steam_backlog_enforcer._leetcode_ledger import read_ledger_solved_today
|
||||
from steam_backlog_enforcer._status_api import AnswerCache, get_status
|
||||
from steam_backlog_enforcer._status_api import AnswerCache, file_stamp, get_status
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from steam_backlog_enforcer.config import Config
|
||||
@ -89,18 +89,20 @@ def leetcode_solved_today(config: Config) -> bool | None:
|
||||
incident while an honest "not solved yet" does not.
|
||||
"""
|
||||
url = config.leetcode_status_url
|
||||
cached = _cache.fresh(url)
|
||||
path = Path(config.leetcode_ledger_path).expanduser()
|
||||
# A new credit row rewrites the ledger; its stamp drops the memo at once.
|
||||
stamp = file_stamp(path)
|
||||
cached = _cache.fresh(url, stamp=stamp)
|
||||
if cached is not None:
|
||||
return cached
|
||||
|
||||
path = Path(config.leetcode_ledger_path).expanduser()
|
||||
answer = read_ledger_solved_today(path)
|
||||
if answer is None:
|
||||
answer = _fallback_to_endpoint(url, path)
|
||||
if answer is None:
|
||||
return None
|
||||
|
||||
return _cache.store(url, answer=answer)
|
||||
return _cache.store(url, answer=answer, stamp=stamp)
|
||||
|
||||
|
||||
def _fallback_to_endpoint(url: str, path: Path) -> bool | None:
|
||||
|
||||
@ -30,7 +30,7 @@ from typing import TYPE_CHECKING, Final
|
||||
import earned_time
|
||||
|
||||
from steam_backlog_enforcer._leetcode_ledger import HMAC_KEY_FILE
|
||||
from steam_backlog_enforcer._status_api import AnswerCache
|
||||
from steam_backlog_enforcer._status_api import AnswerCache, file_stamp
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from steam_backlog_enforcer.config import Config
|
||||
@ -59,10 +59,13 @@ def read_ledger_read_today(path: Path) -> bool | None:
|
||||
|
||||
def read_today(config: Config) -> bool | None:
|
||||
"""Today's reading answer, memoised like the other earners."""
|
||||
cached = _cache.fresh(_CACHE_KEY)
|
||||
path = Path(config.book_ledger_path).expanduser()
|
||||
# Stat before reading, so a credit landing mid-read is re-read next tick.
|
||||
stamp = file_stamp(path)
|
||||
cached = _cache.fresh(_CACHE_KEY, stamp=stamp)
|
||||
if cached is not None:
|
||||
return cached
|
||||
answer = read_ledger_read_today(Path(config.book_ledger_path).expanduser())
|
||||
answer = read_ledger_read_today(path)
|
||||
if answer is None:
|
||||
return None
|
||||
return _cache.store(_CACHE_KEY, answer=answer)
|
||||
return _cache.store(_CACHE_KEY, answer=answer, stamp=stamp)
|
||||
|
||||
@ -15,10 +15,16 @@ from __future__ import annotations
|
||||
|
||||
import http.client
|
||||
import json
|
||||
import logging
|
||||
import time
|
||||
from typing import Any, Final
|
||||
from typing import TYPE_CHECKING, Any, Final
|
||||
from urllib.parse import urlsplit
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from pathlib import Path
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Loopback, so a short timeout is generous. The daemon ticks frequently and
|
||||
# must never block on this.
|
||||
_TIMEOUT_SECONDS: Final = 2.0
|
||||
@ -26,9 +32,49 @@ _TIMEOUT_SECONDS: Final = 2.0
|
||||
# A successful answer is reused for this long. The daemon would otherwise make
|
||||
# one HTTP call per tick, and the answer changes at most a few times a day. The
|
||||
# cost is that a workout logged now raises the budget within a minute rather
|
||||
# than instantly -- invisible next to a two-hour swing.
|
||||
# than instantly -- invisible next to a two-hour swing. A caller that knows
|
||||
# which file the answer is derived from also passes its stat stamp, and a
|
||||
# changed stamp drops the answer at once (see :func:`file_stamp`).
|
||||
_CACHE_TTL_SECONDS: Final = 60.0
|
||||
|
||||
# ``(st_ino, st_mtime_ns, st_size)`` of a source file; ``None`` when absent.
|
||||
type Stamp = tuple[int, int, int] | None
|
||||
|
||||
# Last stat error per path, so an unreadable file warns once, not every tick.
|
||||
_stat_errors: dict[Path, str] = {}
|
||||
|
||||
|
||||
def file_stamp(path: Path) -> Stamp:
|
||||
"""Cheap identity of ``path``'s current contents, for cache invalidation.
|
||||
|
||||
The inode is part of it because writers replace these files atomically:
|
||||
a rename within the same mtime tick still changes the inode.
|
||||
|
||||
Returns:
|
||||
The stamp, or ``None`` when the file does not exist -- an ordinary
|
||||
state (no workout log yet, no book registered), compared like any
|
||||
other stamp. Any other stat failure also yields ``None``, warned once
|
||||
per distinct error so a 3 s loop cannot flood the journal.
|
||||
"""
|
||||
try:
|
||||
st = path.stat()
|
||||
except FileNotFoundError:
|
||||
_stat_errors.pop(path, None)
|
||||
return None
|
||||
except OSError as exc:
|
||||
if _stat_errors.get(path) != str(exc):
|
||||
_stat_errors[path] = str(exc)
|
||||
logger.warning(
|
||||
"Cannot stat %s (%s) -- its cached answer now expires only "
|
||||
"on the %ds TTL instead of on change.",
|
||||
path,
|
||||
exc,
|
||||
int(_CACHE_TTL_SECONDS),
|
||||
)
|
||||
return None
|
||||
_stat_errors.pop(path, None)
|
||||
return (st.st_ino, st.st_mtime_ns, st.st_size)
|
||||
|
||||
|
||||
def get_status(url: str) -> dict[str, Any]:
|
||||
"""GET a status endpoint and return its JSON body.
|
||||
@ -64,25 +110,33 @@ class AnswerCache:
|
||||
|
||||
Only *successes* are stored. A failure is retried on the very next tick, so
|
||||
a restarted status server takes effect immediately instead of serving the
|
||||
floor for another minute.
|
||||
floor for another minute. An answer stored with a :data:`Stamp` is also
|
||||
dropped as soon as the caller presents a different one.
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Start empty."""
|
||||
self._entries: dict[str, tuple[float, bool]] = {}
|
||||
self._entries: dict[str, tuple[float, bool, Stamp]] = {}
|
||||
|
||||
def clear(self) -> None:
|
||||
"""Drop every cached answer, forcing the next call to re-ask."""
|
||||
self._entries.clear()
|
||||
|
||||
def fresh(self, url: str) -> bool | None:
|
||||
"""The cached answer for ``url`` if it is still within its TTL."""
|
||||
def fresh(self, url: str, *, stamp: Stamp = None) -> bool | None:
|
||||
"""The cached answer for ``url`` if within its TTL and ``stamp``."""
|
||||
cached = self._entries.get(url)
|
||||
if cached is not None and time.monotonic() - cached[0] < _CACHE_TTL_SECONDS:
|
||||
if cached is None or cached[2] != stamp:
|
||||
return None
|
||||
if time.monotonic() - cached[0] < _CACHE_TTL_SECONDS:
|
||||
return cached[1]
|
||||
return None
|
||||
|
||||
def store(self, url: str, *, answer: bool) -> bool:
|
||||
"""Remember ``answer`` for ``url`` as of now, and hand it back."""
|
||||
self._entries[url] = (time.monotonic(), answer)
|
||||
def store(self, url: str, *, answer: bool, stamp: Stamp = None) -> bool:
|
||||
"""Remember ``answer`` for ``url`` as of now, and hand it back.
|
||||
|
||||
``stamp`` must be taken *before* the answer was fetched: a write that
|
||||
lands mid-fetch then leaves the stored stamp stale, so the next call
|
||||
re-asks instead of trusting a pre-write answer for a whole TTL.
|
||||
"""
|
||||
self._entries[url] = (time.monotonic(), answer, stamp)
|
||||
return answer
|
||||
|
||||
@ -16,9 +16,10 @@ would be indistinguishable from an earned one.
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from steam_backlog_enforcer._status_api import AnswerCache, get_status
|
||||
from steam_backlog_enforcer._status_api import AnswerCache, file_stamp, get_status
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from steam_backlog_enforcer.config import Config
|
||||
@ -33,6 +34,11 @@ def reset_cache() -> None:
|
||||
_cache.clear()
|
||||
|
||||
|
||||
def workout_log_path(config: Config) -> Path:
|
||||
"""screen-locker's ``log.json``, which ``gaming.workout_today`` derives from."""
|
||||
return Path(config.workout_log_path).expanduser()
|
||||
|
||||
|
||||
def _fetch_workout_today(url: str) -> bool:
|
||||
"""Read ``gaming.workout_today`` from the screen-locker status API.
|
||||
|
||||
@ -62,7 +68,10 @@ def workout_logged_today(config: Config) -> bool | None:
|
||||
distinct from ``False`` so the caller can log which one happened.
|
||||
"""
|
||||
url = config.workout_status_url
|
||||
cached = _cache.fresh(url)
|
||||
# Stat before asking: a credited workout rewrites log.json, and the new
|
||||
# stamp re-asks on the very next tick instead of after the cache TTL.
|
||||
stamp = file_stamp(workout_log_path(config))
|
||||
cached = _cache.fresh(url, stamp=stamp)
|
||||
if cached is not None:
|
||||
return cached
|
||||
|
||||
@ -86,4 +95,4 @@ def workout_logged_today(config: Config) -> bool | None:
|
||||
)
|
||||
return None
|
||||
|
||||
return _cache.store(url, answer=answer)
|
||||
return _cache.store(url, answer=answer, stamp=stamp)
|
||||
|
||||
@ -96,6 +96,8 @@ class Config:
|
||||
"""book-guard's signed ledger: the reading hour's only transport."""
|
||||
workout_status_url: str = "http://127.0.0.1:8770/api/status"
|
||||
"""Where to ask whether today has a counted workout. Loopback only."""
|
||||
workout_log_path: str = "~/src/screen-locker/screen_locker/log.json"
|
||||
"""screen-locker's log.json; a change re-asks that URL at once."""
|
||||
leetcode_ledger_path: str = "~/.local/share/leetcode_guard/ledger.json"
|
||||
leetcode_status_url: str = "http://127.0.0.1:8771/api/status"
|
||||
"""LeetCode's transports: ledger first, this loopback URL as fallback."""
|
||||
|
||||
@ -34,10 +34,13 @@ from steam_backlog_enforcer._budget_resolve import BudgetResolution
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Iterator
|
||||
from contextlib import AbstractContextManager
|
||||
from pathlib import Path
|
||||
|
||||
from steam_backlog_enforcer.config import Config
|
||||
|
||||
_RESOLVER = "steam_backlog_enforcer._playtime_state.resolve_budget"
|
||||
_WORKOUT = "steam_backlog_enforcer._workout_budget"
|
||||
_LOOP = "steam_backlog_enforcer._enforce_loop"
|
||||
_MINUTE = 60.0
|
||||
|
||||
|
||||
@ -91,11 +94,23 @@ def fixed_budget(seconds: float) -> AbstractContextManager[object]:
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _no_workout_http() -> Iterator[None]:
|
||||
def _no_workout_http(tmp_path: Path) -> Iterator[None]:
|
||||
"""Stop rules_for from making a real HTTP call to the screen locker.
|
||||
|
||||
Also points screen-locker's ``log.json`` at a tmp path, at both bindings:
|
||||
the cache stamp must not stat the real log, and no test may ever put an
|
||||
inotify watch on the real ``~/src/screen-locker`` directory.
|
||||
|
||||
Args:
|
||||
tmp_path: pytest's temporary directory.
|
||||
|
||||
Yields:
|
||||
None, with the budget resolver stubbed for the whole test.
|
||||
"""
|
||||
with patch(_RESOLVER, side_effect=earned_budget):
|
||||
log = tmp_path / "screen-locker" / "log.json"
|
||||
with (
|
||||
patch(_RESOLVER, side_effect=earned_budget),
|
||||
patch(f"{_WORKOUT}.workout_log_path", return_value=log),
|
||||
patch(f"{_LOOP}.workout_log_path", return_value=log),
|
||||
):
|
||||
yield
|
||||
|
||||
@ -194,7 +194,8 @@ def _no_real_sleep() -> Iterator[None]:
|
||||
patch("steam_backlog_enforcer._steam_client.time.sleep", noop),
|
||||
patch("steam_backlog_enforcer._steam_launch.time.sleep", noop),
|
||||
patch("steam_backlog_enforcer._steam_api_client.time.sleep", noop),
|
||||
patch("steam_backlog_enforcer._enforce_loop.time.sleep", noop),
|
||||
# The loop waits on an inotify wake, not time.sleep: stub its factory.
|
||||
patch("steam_backlog_enforcer._enforce_loop.open_file_wake", noop),
|
||||
):
|
||||
yield
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ class TestDoEnforce:
|
||||
f"{PKG}._enforce_loop_iteration",
|
||||
side_effect=KeyboardInterrupt,
|
||||
) as mock_iter,
|
||||
patch(f"{PKG}.time.sleep"),
|
||||
patch(f"{PKG}.open_file_wake"),
|
||||
):
|
||||
do_enforce(Config(), state)
|
||||
assert any("No game" in str(c) for c in mock_echo.call_args_list)
|
||||
@ -76,7 +76,7 @@ class TestDoEnforce:
|
||||
f"{PKG}._enforce_loop_iteration",
|
||||
side_effect=KeyboardInterrupt,
|
||||
),
|
||||
patch(f"{PKG}.time.sleep"),
|
||||
patch(f"{PKG}.open_file_wake"),
|
||||
):
|
||||
do_enforce(Config(), state)
|
||||
|
||||
@ -95,7 +95,7 @@ class TestDoEnforce:
|
||||
f"{PKG}._enforce_loop_iteration",
|
||||
side_effect=KeyboardInterrupt,
|
||||
),
|
||||
patch(f"{PKG}.time.sleep"),
|
||||
patch(f"{PKG}.open_file_wake"),
|
||||
):
|
||||
do_enforce(config, state)
|
||||
|
||||
@ -119,7 +119,7 @@ class TestDoEnforce:
|
||||
f"{PKG}._enforce_loop_iteration",
|
||||
side_effect=side_effect,
|
||||
),
|
||||
patch(f"{PKG}.time.sleep"),
|
||||
patch(f"{PKG}.open_file_wake"),
|
||||
):
|
||||
do_enforce(config, state)
|
||||
assert call_count == 2
|
||||
@ -147,7 +147,7 @@ class TestDoEnforce:
|
||||
patch(f"{PKG}._echo"),
|
||||
patch.object(State, "load", side_effect=load_side_effect),
|
||||
patch(f"{PKG}._enforce_loop_iteration") as mock_iter,
|
||||
patch(f"{PKG}.time.sleep"),
|
||||
patch(f"{PKG}.open_file_wake"),
|
||||
):
|
||||
do_enforce(config, state)
|
||||
mock_iter.assert_not_called()
|
||||
@ -175,7 +175,7 @@ class TestStateReload:
|
||||
f"{PKG}._enforce_loop_iteration",
|
||||
side_effect=KeyboardInterrupt,
|
||||
),
|
||||
patch(f"{PKG}.time.sleep"),
|
||||
patch(f"{PKG}.open_file_wake"),
|
||||
):
|
||||
do_enforce(Config(), state)
|
||||
assert state.manual_picks == fresh.manual_picks
|
||||
|
||||
@ -17,6 +17,8 @@ if TYPE_CHECKING:
|
||||
from pathlib import Path
|
||||
|
||||
PKG = "steam_backlog_enforcer._enforce_loop"
|
||||
# The owned-ids cache reads its own clock; _enforce_loop no longer imports time.
|
||||
_CLOCK = "steam_backlog_enforcer._owned_apps_cache.time.time"
|
||||
ENFORCE_STEPS_PKG = "steam_backlog_enforcer._enforce_steps"
|
||||
OWNED_APPS_CACHE_PKG = "steam_backlog_enforcer._owned_apps_cache"
|
||||
|
||||
@ -187,7 +189,7 @@ class TestOwnedIdsCacheHelpers:
|
||||
)
|
||||
with (
|
||||
patch(f"{OWNED_APPS_CACHE_PKG}._OWNED_IDS_CACHE_FILE", cache_file),
|
||||
patch(f"{PKG}.time.time", return_value=10_000.0),
|
||||
patch(_CLOCK, return_value=10_000.0),
|
||||
patch(f"{OWNED_APPS_CACHE_PKG}._OWNED_IDS_CACHE_TTL_SECONDS", 60),
|
||||
):
|
||||
assert _load_owned_app_ids_cache("sid") is None
|
||||
@ -200,7 +202,7 @@ class TestOwnedIdsCacheHelpers:
|
||||
)
|
||||
with (
|
||||
patch(f"{OWNED_APPS_CACHE_PKG}._OWNED_IDS_CACHE_FILE", cache_file),
|
||||
patch(f"{PKG}.time.time", return_value=10_010.0),
|
||||
patch(_CLOCK, return_value=10_010.0),
|
||||
patch(f"{OWNED_APPS_CACHE_PKG}._OWNED_IDS_CACHE_TTL_SECONDS", 60),
|
||||
):
|
||||
assert _load_owned_app_ids_cache("sid") is None
|
||||
@ -215,7 +217,7 @@ class TestOwnedIdsCacheHelpers:
|
||||
)
|
||||
with (
|
||||
patch(f"{OWNED_APPS_CACHE_PKG}._OWNED_IDS_CACHE_FILE", cache_file),
|
||||
patch(f"{PKG}.time.time", return_value=10_010.0),
|
||||
patch(_CLOCK, return_value=10_010.0),
|
||||
patch(f"{OWNED_APPS_CACHE_PKG}._OWNED_IDS_CACHE_TTL_SECONDS", 60),
|
||||
):
|
||||
assert _load_owned_app_ids_cache("sid") == [1, 2]
|
||||
@ -224,7 +226,7 @@ class TestOwnedIdsCacheHelpers:
|
||||
cache_file = tmp_path / "owned.json"
|
||||
with (
|
||||
patch(f"{OWNED_APPS_CACHE_PKG}._OWNED_IDS_CACHE_FILE", cache_file),
|
||||
patch(f"{PKG}.time.time", return_value=123.0),
|
||||
patch(_CLOCK, return_value=123.0),
|
||||
patch(f"{OWNED_APPS_CACHE_PKG}._atomic_write") as mock_atomic,
|
||||
):
|
||||
_save_owned_app_ids_cache("sid", [10, 20])
|
||||
|
||||
@ -86,7 +86,7 @@ class TestDoEnforceTotalBlock:
|
||||
f"{PKG}._enforce_loop_iteration",
|
||||
side_effect=KeyboardInterrupt,
|
||||
),
|
||||
patch(f"{PKG}.time.sleep"),
|
||||
patch(f"{PKG}.open_file_wake"),
|
||||
):
|
||||
do_enforce(config, state)
|
||||
mock_setup.assert_not_called()
|
||||
@ -104,7 +104,7 @@ class TestDoEnforceTotalBlock:
|
||||
f"{PKG}._enforce_loop_iteration",
|
||||
side_effect=KeyboardInterrupt,
|
||||
) as mock_iter,
|
||||
patch(f"{PKG}.time.sleep"),
|
||||
patch(f"{PKG}.open_file_wake"),
|
||||
):
|
||||
do_enforce(config, state)
|
||||
mock_iter.assert_called_once()
|
||||
@ -125,7 +125,7 @@ class TestDoEnforceTotalBlock:
|
||||
f"{PKG}._enforce_loop_iteration",
|
||||
side_effect=KeyboardInterrupt,
|
||||
) as mock_iter,
|
||||
patch(f"{PKG}.time.sleep"),
|
||||
patch(f"{PKG}.open_file_wake"),
|
||||
):
|
||||
do_enforce(Config(), state)
|
||||
output = " ".join(str(c) for c in mock_echo.call_args_list)
|
||||
@ -184,7 +184,7 @@ class TestPlaytimeIsEnforcedFirst:
|
||||
f"{PKG}._enforce_loop_iteration",
|
||||
side_effect=KeyboardInterrupt,
|
||||
) as mock_iter,
|
||||
patch(f"{PKG}.time.sleep"),
|
||||
patch(f"{PKG}.open_file_wake"),
|
||||
):
|
||||
do_enforce(Config(), state, demo=True)
|
||||
assert mock_iter.call_args.kwargs["demo"] is True
|
||||
|
||||
249
steam_backlog_enforcer/tests/test_file_wake.py
Normal file
249
steam_backlog_enforcer/tests/test_file_wake.py
Normal file
@ -0,0 +1,249 @@
|
||||
"""Tests for _file_wake: the inotify wait that wakes the enforce loop early.
|
||||
|
||||
The real-kernel tests watch a fresh ``tmp_path`` directory, never the real
|
||||
screen-locker tree. The parsing branches the kernel will not produce on demand
|
||||
(queue overflow, a watch torn down) are fed through a pipe carrying hand-packed
|
||||
``inotify_event`` records, which is byte-for-byte what ``os.read`` returns.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
from typing import TYPE_CHECKING
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from steam_backlog_enforcer import _file_wake
|
||||
from steam_backlog_enforcer._file_wake import FileWake, open_file_wake
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Callable, Iterator
|
||||
from pathlib import Path
|
||||
|
||||
_PKG = "steam_backlog_enforcer._file_wake"
|
||||
# Far above real latency so CI cannot flake; elapsed asserts pin "early".
|
||||
_LONG = 5.0
|
||||
_SHORT = 0.05
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def log(tmp_path: Path) -> Path:
|
||||
"""A ``log.json`` path inside a directory of its own."""
|
||||
directory = tmp_path / "screen_locker"
|
||||
directory.mkdir()
|
||||
return directory / "log.json"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def wake(log: Path) -> Iterator[FileWake]:
|
||||
"""A live watcher on ``log``, closed afterwards."""
|
||||
watcher = open_file_wake([log])
|
||||
yield watcher
|
||||
watcher.close()
|
||||
|
||||
|
||||
def _timed_wait(watcher: FileWake, timeout: float) -> tuple[bool, float]:
|
||||
"""Run ``watcher.wait`` and measure how long it took."""
|
||||
start = time.monotonic()
|
||||
woke = watcher.wait(timeout)
|
||||
return woke, time.monotonic() - start
|
||||
|
||||
|
||||
def _event(wd: int, mask: int, name: bytes = b"") -> bytes:
|
||||
"""Pack one ``struct inotify_event`` with a NUL-padded name."""
|
||||
padded = name + b"\0" * (16 - len(name) % 16) if name else b""
|
||||
return _file_wake._EVENT_HEADER.pack(wd, mask, 0, len(padded)) + padded
|
||||
|
||||
|
||||
type Piped = Callable[[dict[int, frozenset[str]]], tuple[FileWake, int]]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def piped() -> Iterator[Piped]:
|
||||
"""Build FileWakes reading a non-blocking pipe instead of inotify.
|
||||
|
||||
Teardown goes through ``FileWake.close`` (idempotent), never a raw
|
||||
``os.close`` of the read end: a watcher that degraded already closed it,
|
||||
and the number may since belong to some unrelated descriptor.
|
||||
"""
|
||||
made: list[tuple[FileWake, int]] = []
|
||||
|
||||
def make(names: dict[int, frozenset[str]]) -> tuple[FileWake, int]:
|
||||
read_fd, write_fd = os.pipe()
|
||||
os.set_blocking(read_fd, False)
|
||||
made.append((FileWake(read_fd, names), write_fd))
|
||||
return made[-1]
|
||||
|
||||
yield make
|
||||
for watcher, write_fd in made:
|
||||
watcher.close()
|
||||
os.close(write_fd)
|
||||
|
||||
|
||||
class TestRealInotify:
|
||||
"""Against the kernel, in a tmp directory."""
|
||||
|
||||
def test_atomic_rename_wakes(self, log: Path, wake: FileWake) -> None:
|
||||
tmp = log.with_name("log.json.tmp")
|
||||
tmp.write_text("{}")
|
||||
# Drain the temp file's own events: they must not count as a wake.
|
||||
assert wake.wait(_SHORT) is False
|
||||
tmp.replace(log)
|
||||
woke, elapsed = _timed_wait(wake, _LONG)
|
||||
assert woke is True
|
||||
assert elapsed < 1.0
|
||||
|
||||
def test_in_place_write_wakes(self, log: Path, wake: FileWake) -> None:
|
||||
log.write_text("{}")
|
||||
woke, elapsed = _timed_wait(wake, _LONG)
|
||||
assert woke is True
|
||||
assert elapsed < 1.0
|
||||
|
||||
def test_other_file_does_not_wake(self, log: Path, wake: FileWake) -> None:
|
||||
log.with_name("other.json").write_text("{}")
|
||||
woke, elapsed = _timed_wait(wake, _SHORT)
|
||||
assert woke is False
|
||||
assert elapsed >= _SHORT
|
||||
|
||||
def test_times_out_without_events(self, wake: FileWake) -> None:
|
||||
woke, elapsed = _timed_wait(wake, _SHORT)
|
||||
assert woke is False
|
||||
assert elapsed >= _SHORT
|
||||
|
||||
def test_two_files_in_one_directory_share_a_watch(self, log: Path) -> None:
|
||||
other = log.with_name("ledger.json")
|
||||
watcher = open_file_wake([log, other])
|
||||
try:
|
||||
other.write_text("{}")
|
||||
assert watcher.wait(_LONG) is True
|
||||
finally:
|
||||
watcher.close()
|
||||
|
||||
def test_one_missing_directory_keeps_the_other_watch(
|
||||
self, log: Path, tmp_path: Path, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
missing = tmp_path / "gone" / "log.json"
|
||||
with caplog.at_level(logging.WARNING, logger=_PKG):
|
||||
watcher = open_file_wake([missing, log])
|
||||
try:
|
||||
assert "Cannot watch" in caplog.text
|
||||
log.write_text("{}")
|
||||
assert watcher.wait(_LONG) is True
|
||||
finally:
|
||||
watcher.close()
|
||||
|
||||
def test_close_twice_is_harmless(self, wake: FileWake) -> None:
|
||||
wake.close()
|
||||
wake.close()
|
||||
# conftest no-ops time.sleep process-wide, so assert the call instead.
|
||||
with patch(f"{_PKG}.time.sleep") as sleep:
|
||||
assert wake.wait(_SHORT) is False
|
||||
sleep.assert_called_once()
|
||||
|
||||
|
||||
class TestSetupFallback:
|
||||
"""Every setup failure warns and degrades to a plain sleep."""
|
||||
|
||||
def _assert_plain_sleep(self, watcher: FileWake) -> None:
|
||||
with patch(f"{_PKG}.time.sleep") as sleep:
|
||||
assert watcher.wait(_LONG) is False
|
||||
sleep.assert_called_once()
|
||||
assert sleep.call_args.args[0] == pytest.approx(_LONG, abs=0.5)
|
||||
|
||||
def test_unwatchable_directory(
|
||||
self, tmp_path: Path, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
with caplog.at_level(logging.WARNING, logger=_PKG):
|
||||
watcher = open_file_wake([tmp_path / "missing" / "log.json"])
|
||||
assert "Cannot watch" in caplog.text
|
||||
assert "log.json" in caplog.text
|
||||
self._assert_plain_sleep(watcher)
|
||||
|
||||
def test_no_libc(self, log: Path, caplog: pytest.LogCaptureFixture) -> None:
|
||||
with (
|
||||
caplog.at_level(logging.WARNING, logger=_PKG),
|
||||
patch(f"{_PKG}.ctypes.CDLL", side_effect=OSError("no libc")),
|
||||
):
|
||||
watcher = open_file_wake([log])
|
||||
assert "inotify unavailable (no libc)" in caplog.text
|
||||
self._assert_plain_sleep(watcher)
|
||||
|
||||
def test_init_fails(self, log: Path, caplog: pytest.LogCaptureFixture) -> None:
|
||||
libc = MagicMock()
|
||||
libc.inotify_init1.return_value = -1
|
||||
with (
|
||||
caplog.at_level(logging.WARNING, logger=_PKG),
|
||||
patch(f"{_PKG}.ctypes.CDLL", return_value=libc),
|
||||
):
|
||||
watcher = open_file_wake([log])
|
||||
assert "inotify_init1 failed" in caplog.text
|
||||
libc.inotify_add_watch.assert_not_called()
|
||||
self._assert_plain_sleep(watcher)
|
||||
|
||||
|
||||
class TestEventParsing:
|
||||
"""Branches fed through a pipe of hand-packed events."""
|
||||
|
||||
def test_queue_overflow_wakes(self, piped: Piped) -> None:
|
||||
watcher, write_fd = piped({1: frozenset({"log.json"})})
|
||||
# wd -1 with no name: an overflow says nothing about *which* file, so
|
||||
# it must count as "maybe changed" rather than be dropped.
|
||||
os.write(write_fd, _event(-1, _file_wake._IN_Q_OVERFLOW))
|
||||
woke, elapsed = _timed_wait(watcher, _LONG)
|
||||
assert woke is True
|
||||
assert elapsed < 1.0
|
||||
|
||||
def test_unrelated_event_on_unknown_wd_is_ignored(self, piped: Piped) -> None:
|
||||
watcher, write_fd = piped({1: frozenset({"log.json"})})
|
||||
os.write(write_fd, _event(7, _file_wake._IN_CLOSE_WRITE, b"log.json"))
|
||||
assert watcher.wait(_SHORT) is False
|
||||
|
||||
def test_removed_watch_degrades_with_warning(
|
||||
self, piped: Piped, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
watcher, write_fd = piped({1: frozenset({"log.json"})})
|
||||
os.write(write_fd, _event(1, _file_wake._IN_IGNORED))
|
||||
with (
|
||||
caplog.at_level(logging.WARNING, logger=_PKG),
|
||||
patch(f"{_PKG}.time.sleep") as sleep,
|
||||
):
|
||||
assert watcher.wait(_LONG) is False
|
||||
assert "the watched directory was removed" in caplog.text
|
||||
sleep.assert_called_once()
|
||||
|
||||
def test_one_removed_watch_of_two_keeps_watching(
|
||||
self, piped: Piped, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
names = {1: frozenset({"a.json"}), 2: frozenset({"b.json"})}
|
||||
watcher, write_fd = piped(names)
|
||||
os.write(write_fd, _event(1, _file_wake._IN_IGNORED))
|
||||
with caplog.at_level(logging.WARNING, logger=_PKG):
|
||||
assert watcher.wait(_SHORT) is False
|
||||
assert caplog.text == ""
|
||||
os.write(write_fd, _event(2, _file_wake._IN_MOVED_TO, b"b.json"))
|
||||
assert watcher.wait(_LONG) is True
|
||||
|
||||
def test_spurious_readiness_keeps_waiting(self, piped: Piped) -> None:
|
||||
watcher, write_fd = piped({1: frozenset({"log.json"})})
|
||||
os.write(write_fd, b"x")
|
||||
with patch(f"{_PKG}.os.read", side_effect=BlockingIOError):
|
||||
woke, elapsed = _timed_wait(watcher, _SHORT)
|
||||
assert woke is False
|
||||
assert elapsed >= _SHORT
|
||||
|
||||
def test_read_error_degrades_with_warning(
|
||||
self, piped: Piped, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
watcher, write_fd = piped({1: frozenset({"log.json"})})
|
||||
os.write(write_fd, b"x")
|
||||
with (
|
||||
caplog.at_level(logging.WARNING, logger=_PKG),
|
||||
patch(f"{_PKG}.os.read", side_effect=OSError("EIO")),
|
||||
patch(f"{_PKG}.time.sleep") as sleep,
|
||||
):
|
||||
assert watcher.wait(_LONG) is False
|
||||
assert "reading inotify events failed: EIO" in caplog.text
|
||||
sleep.assert_called_once()
|
||||
172
steam_backlog_enforcer/tests/test_status_api_stamp.py
Normal file
172
steam_backlog_enforcer/tests/test_status_api_stamp.py
Normal file
@ -0,0 +1,172 @@
|
||||
"""Tests for stat-stamp invalidation of the earner answer cache.
|
||||
|
||||
A credited workout (or LeetCode / reading credit) rewrites a file the answer
|
||||
is derived from. The stamp makes the very next tick re-ask instead of serving
|
||||
the memoised pre-credit answer for the rest of the 60 s TTL.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from steam_backlog_enforcer import _status_api, _workout_budget
|
||||
from steam_backlog_enforcer._status_api import AnswerCache, file_stamp
|
||||
|
||||
# Bound at import, before conftest swaps the module attribute for a tmp path.
|
||||
from steam_backlog_enforcer._workout_budget import workout_log_path
|
||||
from steam_backlog_enforcer.config import Config
|
||||
|
||||
_API = "steam_backlog_enforcer._status_api"
|
||||
_URL = "http://127.0.0.1:8770/api/status"
|
||||
|
||||
|
||||
def _unstatable(error: OSError) -> MagicMock:
|
||||
"""A path whose ``stat`` fails with ``error`` (hashable, like a Path)."""
|
||||
path = MagicMock(spec=Path)
|
||||
path.stat.side_effect = error
|
||||
return path
|
||||
|
||||
|
||||
class TestFileStamp:
|
||||
"""Identity of a file's contents, or None."""
|
||||
|
||||
def test_missing_file_is_none(self, tmp_path: Path) -> None:
|
||||
assert file_stamp(tmp_path / "absent.json") is None
|
||||
|
||||
def test_same_contents_same_stamp(self, tmp_path: Path) -> None:
|
||||
path = tmp_path / "log.json"
|
||||
path.write_text("{}")
|
||||
assert file_stamp(path) == file_stamp(path)
|
||||
|
||||
def test_atomic_replace_changes_the_stamp(self, tmp_path: Path) -> None:
|
||||
path = tmp_path / "log.json"
|
||||
path.write_text("{}")
|
||||
before = file_stamp(path)
|
||||
tmp = tmp_path / "log.json.tmp"
|
||||
tmp.write_text("{}")
|
||||
tmp.replace(path)
|
||||
# Same size and possibly the same mtime tick: the inode tells them apart.
|
||||
assert file_stamp(path) != before
|
||||
|
||||
def test_in_place_growth_changes_the_stamp(self, tmp_path: Path) -> None:
|
||||
path = tmp_path / "log.json"
|
||||
path.write_text("{}")
|
||||
before = file_stamp(path)
|
||||
path.write_text('{"a": 1}')
|
||||
assert file_stamp(path) != before
|
||||
|
||||
def test_stat_error_warns_once_per_distinct_error(
|
||||
self, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
path = _unstatable(PermissionError("denied"))
|
||||
with caplog.at_level(logging.WARNING, logger=_API):
|
||||
assert file_stamp(path) is None
|
||||
assert file_stamp(path) is None
|
||||
path.stat.side_effect = PermissionError("still denied")
|
||||
assert file_stamp(path) is None
|
||||
warnings = [r for r in caplog.records if "Cannot stat" in r.getMessage()]
|
||||
assert len(warnings) == 2
|
||||
assert "60s TTL" in warnings[0].getMessage()
|
||||
_status_api._stat_errors.pop(path, None)
|
||||
|
||||
def test_recovery_re_arms_the_warning(
|
||||
self, tmp_path: Path, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
path = tmp_path / "log.json"
|
||||
path.write_text("{}")
|
||||
with caplog.at_level(logging.WARNING, logger=_API):
|
||||
with patch.object(Path, "stat", side_effect=PermissionError("x")):
|
||||
assert file_stamp(path) is None
|
||||
assert file_stamp(path) is not None
|
||||
assert path not in _status_api._stat_errors
|
||||
with patch.object(Path, "stat", side_effect=PermissionError("x")):
|
||||
assert file_stamp(path) is None
|
||||
assert caplog.text.count("Cannot stat") == 2
|
||||
_status_api._stat_errors.pop(path, None)
|
||||
|
||||
def test_vanishing_clears_a_recorded_error(self, tmp_path: Path) -> None:
|
||||
path = tmp_path / "log.json"
|
||||
_status_api._stat_errors[path] = "old"
|
||||
assert file_stamp(path) is None
|
||||
assert path not in _status_api._stat_errors
|
||||
|
||||
|
||||
class TestAnswerCacheStamp:
|
||||
"""A stored stamp must match the caller's for the answer to be reused."""
|
||||
|
||||
def test_matching_stamp_hits(self) -> None:
|
||||
cache = AnswerCache()
|
||||
cache.store(_URL, answer=True, stamp=(1, 2, 3))
|
||||
assert cache.fresh(_URL, stamp=(1, 2, 3)) is True
|
||||
|
||||
def test_changed_stamp_misses(self) -> None:
|
||||
cache = AnswerCache()
|
||||
cache.store(_URL, answer=False, stamp=(1, 2, 3))
|
||||
assert cache.fresh(_URL, stamp=(1, 2, 4)) is None
|
||||
|
||||
def test_file_appearing_misses(self) -> None:
|
||||
cache = AnswerCache()
|
||||
cache.store(_URL, answer=False, stamp=None)
|
||||
assert cache.fresh(_URL, stamp=(1, 2, 3)) is None
|
||||
|
||||
def test_unstamped_callers_still_hit(self) -> None:
|
||||
cache = AnswerCache()
|
||||
cache.store(_URL, answer=True)
|
||||
assert cache.fresh(_URL) is True
|
||||
|
||||
def test_entries_carry_the_stamp(self) -> None:
|
||||
cache = AnswerCache()
|
||||
cache.store(_URL, answer=True, stamp=(9, 9, 9))
|
||||
_when, answer, stamp = cache._entries[_URL]
|
||||
assert (answer, stamp) == (True, (9, 9, 9))
|
||||
|
||||
def test_ttl_still_applies_with_a_matching_stamp(self) -> None:
|
||||
cache = AnswerCache()
|
||||
with patch(f"{_API}.time.monotonic", return_value=0.0):
|
||||
cache.store(_URL, answer=True, stamp=(1, 2, 3))
|
||||
with patch(f"{_API}.time.monotonic", return_value=61.0):
|
||||
assert cache.fresh(_URL, stamp=(1, 2, 3)) is None
|
||||
|
||||
|
||||
class TestWorkoutLogPath:
|
||||
"""Where screen-locker's log.json is read from."""
|
||||
|
||||
def test_expands_the_home_directory(self) -> None:
|
||||
config = Config()
|
||||
config.workout_log_path = "~/locker/log.json"
|
||||
assert workout_log_path(config) == Path.home() / "locker" / "log.json"
|
||||
|
||||
def test_default_points_at_screen_locker(self) -> None:
|
||||
expected = Path.home() / "src/screen-locker/screen_locker/log.json"
|
||||
assert workout_log_path(Config()) == expected
|
||||
|
||||
|
||||
class TestWorkoutAnswerFollowsTheLog:
|
||||
"""A rewritten log.json re-asks the locker inside the TTL."""
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _clear_cache(self) -> None:
|
||||
_workout_budget.reset_cache()
|
||||
|
||||
def test_credit_is_seen_on_the_next_call(self) -> None:
|
||||
config = Config()
|
||||
# conftest redirected this to a tmp path; that is the file we rewrite.
|
||||
log = _workout_budget.workout_log_path(config)
|
||||
log.parent.mkdir(parents=True)
|
||||
log.write_text("[]")
|
||||
with patch(
|
||||
f"{_workout_budget.__name__}._fetch_workout_today",
|
||||
side_effect=[False, True],
|
||||
) as fetch:
|
||||
assert _workout_budget.workout_logged_today(config) is False
|
||||
assert _workout_budget.workout_logged_today(config) is False
|
||||
assert fetch.call_count == 1
|
||||
tmp = log.with_name("log.json.tmp")
|
||||
tmp.write_text('[{"credited": true}]')
|
||||
tmp.replace(log)
|
||||
assert _workout_budget.workout_logged_today(config) is True
|
||||
assert fetch.call_count == 2
|
||||
302
web/package-lock.json
generated
302
web/package-lock.json
generated
@ -20,7 +20,7 @@
|
||||
"@types/node": "26.6.4",
|
||||
"@types/react": "19.3.0",
|
||||
"@types/react-dom": "19.3.0",
|
||||
"@vitejs/plugin-react": "6.1.1",
|
||||
"@vitejs/plugin-react": "6.1.2",
|
||||
"@vitest/coverage-v8": "5.0.3",
|
||||
"eslint": "10.12.0",
|
||||
"eslint-plugin-react-hooks": "7.1.1",
|
||||
@ -28,8 +28,8 @@
|
||||
"globals": "17.13.0",
|
||||
"jsdom": "30.1.2",
|
||||
"typescript": "6.0.3",
|
||||
"typescript-eslint": "8.71.0",
|
||||
"vite": "8.3.2",
|
||||
"typescript-eslint": "8.71.1",
|
||||
"vite": "8.3.4",
|
||||
"vitest": "5.0.3"
|
||||
}
|
||||
},
|
||||
@ -817,9 +817,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@oxc-project/types": {
|
||||
"version": "0.151.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.151.0.tgz",
|
||||
"integrity": "sha512-J1yXrIlNDZVzE3ada310xeAw7nH8yCAyLPuUIsjKatFPmfn5bS1oW+cM+QsGOtVWd5nhSpbwZWx/rue+r5Z+PA==",
|
||||
"version": "0.153.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.153.0.tgz",
|
||||
"integrity": "sha512-jSNrRIyvPVLL5E1z/tS5zLAprosGz/FuI1PWwEOz59j3E4TTTzSpqKb/RDGqJhhW0QHYISGXxq582wGx6T11Tw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
@ -827,9 +827,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-android-arm-eabi": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.11.tgz",
|
||||
"integrity": "sha512-A5kXfGKvKWWZE0TtPrfsvT+q4Y5d1QG8gGUzpYjGydM+fARM9MuX90PrXYXe0XbsDVgyxxNzHo6giCj90bsFNw==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.13.tgz",
|
||||
"integrity": "sha512-Vu/NICrgdRvUOeaJZIyB2FP63s6fO/4ud5l8dXmxDx9yDyn+mN0y+gsvsVviSli+T361Aqo0h46EuMoobrwawA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@ -844,9 +844,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-android-arm64": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.11.tgz",
|
||||
"integrity": "sha512-z6cTycz+iJ4PVkuL4HHW4DfTfoeU/2nqYYuSOrTmH7yHK5Y0LCOnA03V4ZNxavyVaU1oOqUgIg2klN/s+USGOA==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.13.tgz",
|
||||
"integrity": "sha512-6LEoIrGy5vvCd2boNnv2soPSUZj/PRvhp8R/t9KlX+mIZxThIE/ZqxrGXxmuNX0FuvQFvLdZr7S4HrYpYBVhEQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@ -861,9 +861,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-darwin-arm64": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.11.tgz",
|
||||
"integrity": "sha512-jShvqNtP6vDC6/A5JOAzbVV+DkgHqhl/ScVCJEbt+TUY6QYz7YnXcrg3sLtFBniro0f/Ld50ZwCWA6f7KYD1nQ==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.13.tgz",
|
||||
"integrity": "sha512-CaJSRzlQ6Q+zkDMVA9OkVxBjVoPRCDEE3v0FSJ9kIQBgRjFApA3Si4ijhbNVUji7ZJt+PfO0e46qy4nPInHUPA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@ -878,9 +878,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-darwin-x64": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.11.tgz",
|
||||
"integrity": "sha512-f2i2xiNWq1Z1l2++q2fuhZRdLAT3aqxD6vRNm1RAxpUoBcdqNB3C0s1Bt+K+PbEx2F5F4gQp6hqKkphCY/xF9w==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.13.tgz",
|
||||
"integrity": "sha512-e4r340I5hxSzJkD3YJBxgzq/rJ3wwxwdLLb2FPt1Zpyem20nrQPT11DDEEkazwxaHumH8wpglsp/Ozgj/wT6mw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@ -895,9 +895,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-freebsd-x64": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.11.tgz",
|
||||
"integrity": "sha512-4Ir5FSOKIAMr4r0kExpt1s3bMgzJU3rA45AYOHtQpls0oNeqcYBKrWMlckrYH4KCfGLfkfn1tN1dmZPMVsdXow==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.13.tgz",
|
||||
"integrity": "sha512-hoBWDZ4/K/mJKVMbsgUd1jfpA2DiOrJ54mpegObU9TBHBBrtX4FLIXJJQRDPZ/2Dn91GvPob+Z2hwKJzf4E5SQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@ -912,9 +912,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm-gnueabihf": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.11.tgz",
|
||||
"integrity": "sha512-/gnRDM+39BROzAN/k1OZjDPnDMcZxB/0EUxKjONO5yVkNEvlsoMDrxGNKgZi/ttFriS2gwlDNzB65pvNbFOXIQ==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.13.tgz",
|
||||
"integrity": "sha512-oF9fZu3vTWnTiVAkDFxU9PJLt1nh20K9RRpuHsR7ZnE2L7XookBbDBVLojCVSLGbvtSlxeUNnjAj6DbNsKyzbg==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@ -929,9 +929,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm64-gnu": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.11.tgz",
|
||||
"integrity": "sha512-PFaK8HwvAHbaKbBcDNQihjMKYvFnA5hiENx/l5tphTDz1E0WFp32l0A7aq7lyUwGsRw/xSrNIy/gIK4thrSCrw==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.13.tgz",
|
||||
"integrity": "sha512-DTpb/+jMiqWMPgphn4ksW1zW+XLJ6dJJ9FMvnIk9I291LhCctMPhMYJrP5t9p6C9qa3KXadDdUEZHBaPh3kNxQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@ -949,9 +949,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm64-musl": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.11.tgz",
|
||||
"integrity": "sha512-AskzJUIKRLPxkruR1wLKewGbOw+EYfU/9lOrBFj4AFrEA8hPpKFnODWNu2WLaNs0QNkEb9QIJufmVZZIL/bJlg==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.13.tgz",
|
||||
"integrity": "sha512-xU+Kvv9N2A3SY35zFh1FWWNjxbadE/BKeqnkXe7vScU4GZsw757BlVmDLITZEq8DPpk6m7uoDYkK7P+x/uU5Ow==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@ -969,9 +969,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-ppc64-gnu": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.11.tgz",
|
||||
"integrity": "sha512-qlUGAheh2yh8afH7QBgx0PrRHN85hKnNd78x8MeMhXivuevgd8vgf6/CstOzmNKY/lLTHvNTrPy98cLnAugzJw==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.13.tgz",
|
||||
"integrity": "sha512-XMk/hnhh25oQ756Lclb1Q11h4ll0xC0Esa5w4Vzp+mAE2S3AGJgeM0SonrIgY8fHhjarb6hcoTuwoFG0VVP2ig==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
@ -989,9 +989,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-s390x-gnu": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.11.tgz",
|
||||
"integrity": "sha512-secpEad+0vCbSfn8upFySkDskv+bGPk3THSDS9Y89yc4rb4kzqHp8Dmyd9BkQW4SnhNXBZCl/6CrO//hZahNJQ==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.13.tgz",
|
||||
"integrity": "sha512-U1BoTHYmlywE2n3HUWjzZ+8EQsKr+OwpxYuDWaubx42tUL8QSL7nOqRz/NVHanibbFP3M1Rxuprz/wNcbMKjqw==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
@ -1009,9 +1009,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-x64-gnu": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.11.tgz",
|
||||
"integrity": "sha512-mOVBT3dPpkWm8XBWPmU4bf+U6dYDLeMo/9ojUmis4N0L5uu10qra5vOyngZ7/PSdoE4G9KvRt4bloRxNjLas7A==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.13.tgz",
|
||||
"integrity": "sha512-J4cm80Pc6wEwV5AZ42o62sIQgDk+Y7R2s646jIwuvO+4V46QB58N4vVuMPWCBaNgursXLpmUWJV//WQAkPvHBQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@ -1029,9 +1029,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-x64-musl": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.11.tgz",
|
||||
"integrity": "sha512-Is78i9A8Ui4SqcxUwFJ9uMmjDn58IbVTjFWYdQestFEgeuEmHMLGNriXnVJKkwG2YiZjw8cP0zCTyDMdDGtOOg==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.13.tgz",
|
||||
"integrity": "sha512-W0euZS40U4V6JkmEnVCIX9mcsL6cbXQ4X8c2w+MMOIjFg68TXUW+u3RT+2e1t1pv9mg/EP3pDtK3POXdQ7Rxyw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@ -1049,9 +1049,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-openharmony-arm64": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.11.tgz",
|
||||
"integrity": "sha512-dUCXneZ87INUMyQ0D+C0HrEBNUPNXHaPmU5GTjyKTJEiussw9Kaj5Ln8UztPe4epV/ffvgNBEadksdYhmW6xJA==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.13.tgz",
|
||||
"integrity": "sha512-do/AF/4n9MRshia3a5aXoy8xM2c6mgfT6D7H/dY6my5z+hfCIR4ab7mk4IRj++nsEQpKy39kd0DQnDq+r692tw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@ -1066,9 +1066,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-win32-arm64-msvc": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.11.tgz",
|
||||
"integrity": "sha512-jByxb6qfd+bH1xUd0qnfFnb17i9sWBPY2tOavJ0l3tdr3OTu+Kvtm8cd/JV5nFt657b1VqGltxg9olOEfofXWw==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.13.tgz",
|
||||
"integrity": "sha512-6FtUf2cJZobutJdxnGYX8z0vtbgqU0b2v8vfBhkXb9wp2MppMFtkunE+IaOntyi01rkIQoPW2GHABtfzsC0BRQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@ -1083,9 +1083,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-win32-x64-msvc": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.11.tgz",
|
||||
"integrity": "sha512-/PzKqzAJ03i19oy2ItPvyvaVjOjBCNnfaJs8yvUdGBKmiESgnrJSQ2awd81QzFbbnAmu7YO9ZnJrDCb9VSJPRA==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.13.tgz",
|
||||
"integrity": "sha512-UKhFaZTeTcbKrb3iU82m17jVcPEAoqDkCN5MBqgPyZSwp/cQmib21crTS0DdH7T1B7wZRWEI89YQAOJMet5yhg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@ -1281,17 +1281,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "8.71.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.71.0.tgz",
|
||||
"integrity": "sha512-pqcS9c1HxZTHt7End4nXqd0s5lJrrFzrgCkKFJrsbUnaL6M3+6oBFZaslg6Gjsl3argl2DDRFROnXARaZ2e4Nw==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.71.1.tgz",
|
||||
"integrity": "sha512-nNlBf6HuotqMgZvSkWD5hNdemiBIxQ2NmrlgfcUIeZRs+BbakjscCQRq/Hb74EFVnFiSWWdL12JruqwBy3ERDw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.12.2",
|
||||
"@typescript-eslint/scope-manager": "8.71.0",
|
||||
"@typescript-eslint/type-utils": "8.71.0",
|
||||
"@typescript-eslint/utils": "8.71.0",
|
||||
"@typescript-eslint/visitor-keys": "8.71.0",
|
||||
"@typescript-eslint/scope-manager": "8.71.1",
|
||||
"@typescript-eslint/type-utils": "8.71.1",
|
||||
"@typescript-eslint/utils": "8.71.1",
|
||||
"@typescript-eslint/visitor-keys": "8.71.1",
|
||||
"ignore": "^7.0.5",
|
||||
"natural-compare": "^1.4.0",
|
||||
"ts-api-utils": "^2.5.0"
|
||||
@ -1304,7 +1304,7 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/parser": "^8.71.0",
|
||||
"@typescript-eslint/parser": "^8.71.1",
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"typescript": ">=4.8.4 <6.1.0"
|
||||
}
|
||||
@ -1320,16 +1320,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "8.71.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.71.0.tgz",
|
||||
"integrity": "sha512-CG4nPk1f2zc8yw4pALqHsFYH2hdo+h1T9daSp21+Hnxi9LOE3GT9hAfTKJCBXVNM2GmYs1eMEP615wPoeOgk3A==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.71.1.tgz",
|
||||
"integrity": "sha512-oM/5sAqz/l1v/zYK1qTOPrn2+JIrBGC1V6uNYucRO5gh6eT9vWJ/RhPbGE59byvZEUQ4VP6XkLBaS5Jti5jpvw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.71.0",
|
||||
"@typescript-eslint/types": "8.71.0",
|
||||
"@typescript-eslint/typescript-estree": "8.71.0",
|
||||
"@typescript-eslint/visitor-keys": "8.71.0",
|
||||
"@typescript-eslint/scope-manager": "8.71.1",
|
||||
"@typescript-eslint/types": "8.71.1",
|
||||
"@typescript-eslint/typescript-estree": "8.71.1",
|
||||
"@typescript-eslint/visitor-keys": "8.71.1",
|
||||
"debug": "^4.4.3"
|
||||
},
|
||||
"engines": {
|
||||
@ -1345,14 +1345,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/project-service": {
|
||||
"version": "8.71.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.71.0.tgz",
|
||||
"integrity": "sha512-aABjw5rjBacYONVPaPiWOCjJu0vEF4a25iQuodlmQYL1trtLZ0X/y+2Vzl3BKI1odM4LnwLE1oUDXYp1wzx1TQ==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.71.1.tgz",
|
||||
"integrity": "sha512-Oijc9RUsohHjncg6iGi7gCtjnEjYt9FWv9u6ygK8uKcHK5eLjLAkqERQ9BaytbpceOFdk6kifPCS/zAZE+A99g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/tsconfig-utils": "^8.71.0",
|
||||
"@typescript-eslint/types": "^8.71.0",
|
||||
"@typescript-eslint/tsconfig-utils": "^8.71.1",
|
||||
"@typescript-eslint/types": "^8.71.1",
|
||||
"debug": "^4.4.3"
|
||||
},
|
||||
"engines": {
|
||||
@ -1367,14 +1367,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.71.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.71.0.tgz",
|
||||
"integrity": "sha512-gWF0BhUcnjZxSpLE8ngS/59n2SB0J3YqRxvX1+2aoRJk9hNtHSLOV+TcarFiOr5ipXm3yc1QrI4c9YZc8zyCxw==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.71.1.tgz",
|
||||
"integrity": "sha512-1YUDZXdTnXLlob03SFHBipdyMBsDVm7zoSz0ytTJ39dk5J1TgsTK03VlR/dLXG/RLLUrPcYbD4rp23BmHxHP0w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.71.0",
|
||||
"@typescript-eslint/visitor-keys": "8.71.0"
|
||||
"@typescript-eslint/types": "8.71.1",
|
||||
"@typescript-eslint/visitor-keys": "8.71.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@ -1385,9 +1385,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/tsconfig-utils": {
|
||||
"version": "8.71.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.71.0.tgz",
|
||||
"integrity": "sha512-Z1UlWHADEK2Mlb9NpWfDeSjqoZ5EyrOv4R3eQpbkzqn/EwaIdOpXXupEA1+0ZIOSJSZZDBHG0BrQyN8zUG6Pwg==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.71.1.tgz",
|
||||
"integrity": "sha512-oTvkml5SxXhgg+WWKhod5qWQICDXtOB+/Hi9VdPKFAANJ2b7YOgMffgvzXuqog7R6A/JtrzRf128dsxummyWhg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@ -1402,15 +1402,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "8.71.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.71.0.tgz",
|
||||
"integrity": "sha512-i8uO1qbdxeKgRnS5sCRt6On3/nfo2d2DwQe3Yvjx543zLy7r8ySqRuPPiIIXAhS03U0v5NfAFx+rUgxFzKKwNw==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.71.1.tgz",
|
||||
"integrity": "sha512-kH3t3jZCYv2PZSBEWPKTariLrCaoF1CLoPitYFBJOhAGEwWnSRAtGEifrfrpBa4K9JlwWNZotgA5w3/wLSk/FQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.71.0",
|
||||
"@typescript-eslint/typescript-estree": "8.71.0",
|
||||
"@typescript-eslint/utils": "8.71.0",
|
||||
"@typescript-eslint/types": "8.71.1",
|
||||
"@typescript-eslint/typescript-estree": "8.71.1",
|
||||
"@typescript-eslint/utils": "8.71.1",
|
||||
"debug": "^4.4.3",
|
||||
"ts-api-utils": "^2.5.0"
|
||||
},
|
||||
@ -1427,9 +1427,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "8.71.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.71.0.tgz",
|
||||
"integrity": "sha512-cJ4OoxPGWvFnBTnSZyaU+qJzGTqPTGJY+gDchj6cRyLRdmIdt4rcsE4twj+zPfrNiWuVi38wijHzShL++Z9atQ==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.71.1.tgz",
|
||||
"integrity": "sha512-ybYnPTUwg3VQQOFEiBPLs8Jxl1ry2vXdn1kVKguomBbvxpetdu3MKTNDqFNUrlG8ylP9MpZosmXMFYlGQHk1oQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@ -1441,16 +1441,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "8.71.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.71.0.tgz",
|
||||
"integrity": "sha512-PEEF4G5sLLWAS5BpPrUvms4ySZkiBQQZM4z+3ReI46axK5Vqr/vXBQatJQIZZOYdGyPUAKTtsrWzpqKuU+3DEw==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.71.1.tgz",
|
||||
"integrity": "sha512-pSKSEK1JJpHs6KiKVtABCE4iJK5d7FLFzDXQNBQ2oRY7LEd3UwOt3TZemTgu9syTIf56dJWlTn/pdmrO9oKUXQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/project-service": "8.71.0",
|
||||
"@typescript-eslint/tsconfig-utils": "8.71.0",
|
||||
"@typescript-eslint/types": "8.71.0",
|
||||
"@typescript-eslint/visitor-keys": "8.71.0",
|
||||
"@typescript-eslint/project-service": "8.71.1",
|
||||
"@typescript-eslint/tsconfig-utils": "8.71.1",
|
||||
"@typescript-eslint/types": "8.71.1",
|
||||
"@typescript-eslint/visitor-keys": "8.71.1",
|
||||
"debug": "^4.4.3",
|
||||
"minimatch": "^10.2.2",
|
||||
"semver": "^7.7.3",
|
||||
@ -1482,16 +1482,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "8.71.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.71.0.tgz",
|
||||
"integrity": "sha512-pKR/tEMVrXZG23UFKUn5BQf3zfmfk7KQceI2cGzywZ5nxM5Eu3hEJU1utjWzydtzBbcJAQhHN8iPCxobHpPcZQ==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.71.1.tgz",
|
||||
"integrity": "sha512-CBjT6gfAz3DW2j9Q4moFnqt208Aq+506sVGXfpRcyAeqn0EpayL0mjdWoCO2t3RC7GewNrFxdeehuEaPg6DMzQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.9.1",
|
||||
"@typescript-eslint/scope-manager": "8.71.0",
|
||||
"@typescript-eslint/types": "8.71.0",
|
||||
"@typescript-eslint/typescript-estree": "8.71.0"
|
||||
"@typescript-eslint/scope-manager": "8.71.1",
|
||||
"@typescript-eslint/types": "8.71.1",
|
||||
"@typescript-eslint/typescript-estree": "8.71.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@ -1506,13 +1506,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "8.71.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.71.0.tgz",
|
||||
"integrity": "sha512-8eQ9R218XORK+KLosnf4bu/QsUXvUyVwTbArg7/0NMB1Pu87OJKvj4nhFblkYE8gQV73mW1dx1ptlPCkwRGa7A==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.71.1.tgz",
|
||||
"integrity": "sha512-0GxiUGqMU0qXJt58cBsiG3DP8lUmBaFo2vChtUX+CT7PnR3v/VGLLrzVP4K9r1lNiZXjHYefMBbPunplr09v6w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.71.0",
|
||||
"@typescript-eslint/types": "8.71.1",
|
||||
"eslint-visitor-keys": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
@ -1524,9 +1524,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vitejs/plugin-react": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.1.1.tgz",
|
||||
"integrity": "sha512-yxLaQV9gkhS8ezJqCM6+ndU7mDY6gqAg75NQ+0IjwEI8IYOmQCgkRwHKVSfWXW076DsqMo0Dk+0FK1U+M5RgFw==",
|
||||
"version": "6.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.1.2.tgz",
|
||||
"integrity": "sha512-fhJNGUdscQa4HkI0xFxwonWyhnVReCPDbXI7FH7jmzpnVCrFQI7PRrhWecO263610vOrs9tr2Y4xcf8uAdFxbw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@ -1538,7 +1538,7 @@
|
||||
"peerDependencies": {
|
||||
"@rolldown/plugin-babel": "^0.1.7 || ^0.2.0",
|
||||
"babel-plugin-react-compiler": "^1.0.0",
|
||||
"oxc-transform-react": "^0.145.0",
|
||||
"oxc-transform-react": "^0.152.0",
|
||||
"vite": "^8.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
@ -2982,9 +2982,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.19",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.19.tgz",
|
||||
"integrity": "sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==",
|
||||
"version": "3.3.20",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz",
|
||||
"integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@ -3135,9 +3135,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.5.28",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz",
|
||||
"integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==",
|
||||
"version": "8.5.29",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.29.tgz",
|
||||
"integrity": "sha512-49cGhUbXj8Qenv0iTMxA1cFBzxXoctpC9Ujd77t1WcbJIr6nF/eI7g/8MgxrYldFRuAXvja7xQRwavoW7kgrxQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@ -3155,9 +3155,9 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.18",
|
||||
"nanoid": "^3.3.19",
|
||||
"picocolors": "^1.1.1",
|
||||
"source-map-js": "^1.2.1"
|
||||
"source-map-js": "^1.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14"
|
||||
@ -3271,13 +3271,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rolldown": {
|
||||
"version": "1.2.11",
|
||||
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.11.tgz",
|
||||
"integrity": "sha512-qpSwIyz0jHQq5qXBTNxFmE6664rJ7O+4TvPFOiOaBSrz8IOHc1koKKSqTM2H6u1UG1+TveuC6vaDHKXFOvb1Kw==",
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.13.tgz",
|
||||
"integrity": "sha512-/5apOkwWxtACcQtZ5WlrAsKS4JwXVThQPJZ3RqIruRY9UG9M8e0VlXN068xum/JRKA4aIUoJ13ghe/kGCvidiQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@oxc-project/types": "=0.151.0",
|
||||
"@oxc-project/types": "=0.153.0",
|
||||
"@rolldown/pluginutils": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
@ -3287,21 +3287,21 @@
|
||||
"node": "^20.19.0 || >=22.12.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rolldown/binding-android-arm-eabi": "1.2.11",
|
||||
"@rolldown/binding-android-arm64": "1.2.11",
|
||||
"@rolldown/binding-darwin-arm64": "1.2.11",
|
||||
"@rolldown/binding-darwin-x64": "1.2.11",
|
||||
"@rolldown/binding-freebsd-x64": "1.2.11",
|
||||
"@rolldown/binding-linux-arm-gnueabihf": "1.2.11",
|
||||
"@rolldown/binding-linux-arm64-gnu": "1.2.11",
|
||||
"@rolldown/binding-linux-arm64-musl": "1.2.11",
|
||||
"@rolldown/binding-linux-ppc64-gnu": "1.2.11",
|
||||
"@rolldown/binding-linux-s390x-gnu": "1.2.11",
|
||||
"@rolldown/binding-linux-x64-gnu": "1.2.11",
|
||||
"@rolldown/binding-linux-x64-musl": "1.2.11",
|
||||
"@rolldown/binding-openharmony-arm64": "1.2.11",
|
||||
"@rolldown/binding-win32-arm64-msvc": "1.2.11",
|
||||
"@rolldown/binding-win32-x64-msvc": "1.2.11"
|
||||
"@rolldown/binding-android-arm-eabi": "1.2.13",
|
||||
"@rolldown/binding-android-arm64": "1.2.13",
|
||||
"@rolldown/binding-darwin-arm64": "1.2.13",
|
||||
"@rolldown/binding-darwin-x64": "1.2.13",
|
||||
"@rolldown/binding-freebsd-x64": "1.2.13",
|
||||
"@rolldown/binding-linux-arm-gnueabihf": "1.2.13",
|
||||
"@rolldown/binding-linux-arm64-gnu": "1.2.13",
|
||||
"@rolldown/binding-linux-arm64-musl": "1.2.13",
|
||||
"@rolldown/binding-linux-ppc64-gnu": "1.2.13",
|
||||
"@rolldown/binding-linux-s390x-gnu": "1.2.13",
|
||||
"@rolldown/binding-linux-x64-gnu": "1.2.13",
|
||||
"@rolldown/binding-linux-x64-musl": "1.2.13",
|
||||
"@rolldown/binding-openharmony-arm64": "1.2.13",
|
||||
"@rolldown/binding-win32-arm64-msvc": "1.2.13",
|
||||
"@rolldown/binding-win32-x64-msvc": "1.2.13"
|
||||
}
|
||||
},
|
||||
"node_modules/saxes": {
|
||||
@ -3357,9 +3357,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz",
|
||||
"integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
@ -3520,16 +3520,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript-eslint": {
|
||||
"version": "8.71.0",
|
||||
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.71.0.tgz",
|
||||
"integrity": "sha512-fBdHYiqQ14RW6mOMXD14Svn82ZsCYAoQSzGRzyEjR59S5A2Krh/l7fGTOQ7iCr8gGy/mHVXtEF7s5fgjEdV0Pw==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.71.1.tgz",
|
||||
"integrity": "sha512-oiNVPC3/NbV1FpaHU07l8O6ynqG9v4PAiW2WvTrAmZdR0f2HI/gE668ElMLCK7Xbsu5k2fK5C4fXNiq05j7/nQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "8.71.0",
|
||||
"@typescript-eslint/parser": "8.71.0",
|
||||
"@typescript-eslint/typescript-estree": "8.71.0",
|
||||
"@typescript-eslint/utils": "8.71.0"
|
||||
"@typescript-eslint/eslint-plugin": "8.71.1",
|
||||
"@typescript-eslint/parser": "8.71.1",
|
||||
"@typescript-eslint/typescript-estree": "8.71.1",
|
||||
"@typescript-eslint/utils": "8.71.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@ -3602,16 +3602,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "8.3.2",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-8.3.2.tgz",
|
||||
"integrity": "sha512-SQr1x6W5vVSbROg7vsyXIaxK9b0G7zsT68acdWWRmnBUsgDieLCRG+Rep9WdZgcposvv/GSnr4GUUBqB3vXq6w==",
|
||||
"version": "8.3.4",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-8.3.4.tgz",
|
||||
"integrity": "sha512-IftLE8phJhdNRIGNEV4JCCvfNScoZQVfcXaN8TQropWGJtOHcu+iAB9pHcuGvmEb/kddw0LBe/jS8ztdC6xdiQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"lightningcss": "^1.33.0",
|
||||
"picomatch": "^4.0.7",
|
||||
"postcss": "^8.5.28",
|
||||
"rolldown": "~1.2.11",
|
||||
"postcss": "^8.5.29",
|
||||
"rolldown": "~1.2.12",
|
||||
"tinyglobby": "^0.2.17"
|
||||
},
|
||||
"bin": {
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
"@types/node": "26.6.4",
|
||||
"@types/react": "19.3.0",
|
||||
"@types/react-dom": "19.3.0",
|
||||
"@vitejs/plugin-react": "6.1.1",
|
||||
"@vitejs/plugin-react": "6.1.2",
|
||||
"@vitest/coverage-v8": "5.0.3",
|
||||
"eslint": "10.12.0",
|
||||
"eslint-plugin-react-hooks": "7.1.1",
|
||||
@ -33,8 +33,8 @@
|
||||
"globals": "17.13.0",
|
||||
"jsdom": "30.1.2",
|
||||
"typescript": "6.0.3",
|
||||
"typescript-eslint": "8.71.0",
|
||||
"vite": "8.3.2",
|
||||
"typescript-eslint": "8.71.1",
|
||||
"vite": "8.3.4",
|
||||
"vitest": "5.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user