diff --git a/.dockerignore b/.dockerignore index a40678d..15bd326 100644 --- a/.dockerignore +++ b/.dockerignore @@ -19,3 +19,4 @@ logo.png waiter_pwa/android waiter_pwa/releases waiter_pwa/tests +terminal/tests diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 77bf43a..558165b 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -26,3 +26,11 @@ services: image: ${REGISTRY}/pos-manager:${VERSION:-latest} ports: - "5174:80" + + terminal: + build: + context: . + dockerfile: terminal/Dockerfile + image: ${REGISTRY}/pos-terminal:${VERSION:-latest} + ports: + - "5175:80" diff --git a/docker-compose.yml b/docker-compose.yml index 091e1f8..8369437 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -53,6 +53,13 @@ services: depends_on: - backend + # Paired screens: KDS, counter POS, customer display (platform v2, phase 3) + terminal: + image: ${REGISTRY}/pos-terminal:${VERSION:-latest} + restart: unless-stopped + depends_on: + - backend + proxy: image: nginx:alpine ports: @@ -60,6 +67,7 @@ services: - "443:443" - "4443:4443" - "8081:8081" # manager over plain HTTP (LAN only) + - "8082:8082" # terminal (paired screens) over plain HTTP (LAN only) - "8443:8443" # native app over TLS with a pinned key (LAN only) volumes: - ./nginx-proxy/nginx.conf:/etc/nginx/conf.d/default.conf:ro @@ -72,6 +80,8 @@ services: condition: service_started manager_dashboard: condition: service_started + terminal: + condition: service_started restart: unless-stopped volumes: diff --git a/docs/README.md b/docs/README.md index c33c836..8c63228 100644 --- a/docs/README.md +++ b/docs/README.md @@ -15,7 +15,8 @@ This folder is its **own git repo**, nested inside the `xenia-pos` parent repo. | `local_backend` | FastAPI + SQLAlchemy + SQLite (`/app/data/pos.db`) | 8000 | only through proxy / inner nginx | `pos-backend` | | `waiter_pwa` | React + Vite + vite-plugin-pwa, axios, zustand, react-query, Dexie (IndexedDB) | 5173 | **`http://`** (80, LAN only) · `https://waiter.` / `https://` (443) | `pos-waiter` | | `manager_dashboard` | React + Vite | 5174 | **`http://:8081`** (LAN only; `http:///manager` redirects there) · `https://manager.` (443) · `https://:4443` | `pos-manager` | -| `proxy` | nginx:alpine | — | 80, 443, 4443, 8081, 8443. See the header of `nginx-proxy/nginx.conf` for the full routing map. Waits for the backend to be healthy | stock | +| `terminal` | React + Vite (platform v2, phase 3): one app for every paired screen (KDS, counter POS, customer display), apps as lazy chunks by the device's `app_key` | 5175 | **`http://:8082`** (LAN only) | `pos-terminal` | +| `proxy` | nginx:alpine | — | 80, 443, 4443, 8081, 8082, 8443. See the header of `nginx-proxy/nginx.conf` for the full routing map. Waits for the backend to be healthy; `terminal` is resolved per request, so the proxy also starts without it | stock | ### Request path in production Phones normally use **plain HTTP by LAN IP** (`http://` → proxy:80 default_server). Only private source IPs are allowed; everything else gets 403. @@ -48,7 +49,8 @@ The manager calls the API **same-origin, with relative paths**. The waiter app r | `nginx-proxy/nginx.conf` | Proxy config used in dev / by hand | | `install.sh` | Site installer. **Writes its own copy of the proxy config.** | | `docker-compose.yml` / `docker-compose.dev.yml` | Prod (pull images) / dev override (build + expose ports) | -| `package.json`, `package-lock.json`, `packages/` | **npm workspace** for the frontends (D-15): `waiter_pwa`, `manager_dashboard` and the shared `packages/{ui,i18n,api,access}` (imported from source, no build step). One lockfile at this root; the apps have none of their own. | +| `package.json`, `package-lock.json`, `packages/` | **npm workspace** for the frontends (D-15): `waiter_pwa`, `manager_dashboard`, `terminal` and the shared `packages/{ui,i18n,api,access}` (imported from source, no build step). One lockfile at this root; the apps have none of their own. | +| `terminal/` | The terminal app (phase 3): `src/apps/registry.js` (which apps a screen runs, lazy chunks), `src/device/storage.js` (device + session tokens), `src/api/client.js` (`X-Xenia-Device` on every request). Lint covers all of `src` | | `packages/ui/` | Shared design tokens, Tailwind preset and base components (CS-16). Visual check: `npm run dev:manager` → `/ui-gallery` | | `packages/api/` | Shared HTTP client (`createApiClient`: session/device headers, `err.xenia` codes, the manager-approval retry) and the live WebSocket client with cursor replay (`createLiveClient`, used by the waiter's `useWebSocket`) (CS-18) | | `packages/access/` | `` (bootstrap → modules, permission keys, venue, language; mounts the approval dialog), `useCan`, `useModule`, ``, `` (CS-18) | @@ -82,7 +84,8 @@ Prices, costs and discounts are copied onto order items and logs when the action **CS-5. The proxy config lives in two places and must stay byte-identical.** `install.sh` writes the heredoc on client sites, and `nginx-proxy/nginx.conf` is the repo copy. Edit both together (global Rule 9) and check with: `sed -n "/<< 'EOF'/,/^EOF/p" install.sh | sed '1d;$d' | diff - nginx-proxy/nginx.conf` -The plain-HTTP servers (80 default_server, 8081) must keep their LAN-only `allow`/`deny` block. +The plain-HTTP servers (80 default_server, 8081, 8082) must keep their LAN-only `allow`/`deny` block (`tests/e2e/stack.mjs` checks 8081 and 8082 from a non-LAN network). +A frontend image's Dockerfile copies **every** workspace's `package.json` before `npm ci` (the lockfile covers them all): a new workspace app adds its line to all of them. **CS-6. Permissions are checked on the backend.** Hiding a button in the UI is not access control. Every new endpoint declares its access with a marker from `core/access/deps.py` (see CS-14). @@ -109,11 +112,12 @@ cd local_backend; uvicorn main:app --reload --port 8000 # Dev: frontends (Vite proxies /api and /api/ws to :8000) cd waiter_pwa; npm run dev # :5173 cd manager_dashboard; npm run dev # :5174 +cd terminal; npm run dev # :5175 (paired screens; pairing from 3.1c) cd waiter_pwa; npm run lint # Build release images (VERSION comes from .env). See the parent's DEPLOYMENT_GUIDE.md. docker compose -f docker-compose.yml -f docker-compose.dev.yml build -docker push registry.bonamin.net/pos-backend: # + pos-waiter, pos-manager +docker push registry.bonamin.net/pos-backend: # + pos-waiter, pos-manager, pos-terminal ``` ## Native Android app (waiter_pwa) @@ -151,7 +155,7 @@ The native plugins (`@capacitor/*`, `@capgo/*`) are pinned to **exact** versions ## Testing Automated tests cover the native-app/LAN work and licensing. See **[tests/e2e/README.md](../tests/e2e/README.md)**. - **Unit (seconds):** `python -m pytest tests -q` in `local_backend/`, `npm test` in `waiter_pwa/`, and `npm test -w <@xenia/ui|@xenia/i18n|@xenia/api|@xenia/access|manager-dashboard>` at the workspace root. -- **End-to-end:** `node run-all.mjs` in `tests/e2e/`. That covers install.sh, licensing with a real cloud, browser modes, and the Android emulator suites. `--no-android` skips the emulator. +- **End-to-end:** `node run-all.mjs` in `tests/e2e/`. That covers install.sh, licensing with a real cloud, browser modes, a compose stack of the release images (`stack.mjs`), and the Android emulator suites. `--no-android` skips the emulator. **CS-11. Tests follow the code.** When you change something a test covers (licensing, LAN IP, TLS, pairing, rediscovery, bundles, install.sh, the proxy config), run its suite and update the test in the same commit. Run `node run-all.mjs` before every release. diff --git a/install.sh b/install.sh index 0a7ca77..522a678 100644 --- a/install.sh +++ b/install.sh @@ -109,6 +109,7 @@ cat > "$SCRIPT_DIR/nginx-proxy/nginx.conf" << 'EOF' # :80 anything else (bare LAN IP) → waiter app over plain HTTP, LAN only # /manager → redirect to :8081 # :8081 → manager dashboard over plain HTTP, LAN only +# :8082 → terminal (paired screens: KDS, POS, customer display), LAN only # :443 waiter.* / manager.* / bare IP → https (needs certs/cert.pem + key.pem) # :4443 → manager over https # :8443 → native app over TLS (backend-managed key, pinned), LAN only @@ -196,6 +197,43 @@ server { } } +server { + listen 8082 default_server; + server_name _; + + # Terminal app for paired screens (KDS, counter POS, customer display; plan step 3.1b). + # LAN only: plain HTTP must never be reachable from the internet, even if the + # client forwards ports on their router. Relies on Docker preserving the real + # client IP (default iptables port publishing on Linux). + allow 10.0.0.0/8; + allow 172.16.0.0/12; + allow 192.168.0.0/16; + allow 127.0.0.0/8; + allow fc00::/7; + allow fe80::/10; + allow ::1; + deny all; + + # Resolved per request (Docker DNS), so the proxy still starts on a stack that has no + # terminal container yet (an older docker-compose.yml): only :8082 fails then (502). + resolver 127.0.0.11 valid=30s ipv6=off; + set $terminal_upstream http://terminal:80; + + location / { + proxy_pass $terminal_upstream; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 3600s; + proxy_send_timeout 3600s; + proxy_buffering off; + } +} + # ── HTTPS ───────────────────────────────────────────────────────────────────── server { @@ -445,6 +483,7 @@ echo "" echo "Done! Services running. From any phone or PC on this network:" echo " Waiter app: http://${HOST_IP_NOW}" echo " Manager app: http://${HOST_IP_NOW}/manager (→ port 8081)" +echo " Screens: http://${HOST_IP_NOW}:8082 (kitchen display, counter POS; pair them under Devices)" echo "" echo "Tip: reserve ${HOST_IP_NOW} for this machine in the router's DHCP settings" echo " so the address never changes." diff --git a/manager_dashboard/Dockerfile b/manager_dashboard/Dockerfile index 4ac8610..6e4bab7 100644 --- a/manager_dashboard/Dockerfile +++ b/manager_dashboard/Dockerfile @@ -13,6 +13,7 @@ COPY packages/api/package.json packages/api/ COPY packages/access/package.json packages/access/ COPY waiter_pwa/package.json waiter_pwa/ COPY manager_dashboard/package.json manager_dashboard/ +COPY terminal/package.json terminal/ RUN npm ci --workspace manager-dashboard --include-workspace-root COPY packages/ packages/ diff --git a/nginx-proxy/nginx.conf b/nginx-proxy/nginx.conf index ee92e2e..bd43e8c 100644 --- a/nginx-proxy/nginx.conf +++ b/nginx-proxy/nginx.conf @@ -6,6 +6,7 @@ # :80 anything else (bare LAN IP) → waiter app over plain HTTP, LAN only # /manager → redirect to :8081 # :8081 → manager dashboard over plain HTTP, LAN only +# :8082 → terminal (paired screens: KDS, POS, customer display), LAN only # :443 waiter.* / manager.* / bare IP → https (needs certs/cert.pem + key.pem) # :4443 → manager over https # :8443 → native app over TLS (backend-managed key, pinned), LAN only @@ -93,6 +94,43 @@ server { } } +server { + listen 8082 default_server; + server_name _; + + # Terminal app for paired screens (KDS, counter POS, customer display; plan step 3.1b). + # LAN only: plain HTTP must never be reachable from the internet, even if the + # client forwards ports on their router. Relies on Docker preserving the real + # client IP (default iptables port publishing on Linux). + allow 10.0.0.0/8; + allow 172.16.0.0/12; + allow 192.168.0.0/16; + allow 127.0.0.0/8; + allow fc00::/7; + allow fe80::/10; + allow ::1; + deny all; + + # Resolved per request (Docker DNS), so the proxy still starts on a stack that has no + # terminal container yet (an older docker-compose.yml): only :8082 fails then (502). + resolver 127.0.0.11 valid=30s ipv6=off; + set $terminal_upstream http://terminal:80; + + location / { + proxy_pass $terminal_upstream; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 3600s; + proxy_send_timeout 3600s; + proxy_buffering off; + } +} + # ── HTTPS ───────────────────────────────────────────────────────────────────── server { diff --git a/package-lock.json b/package-lock.json index 1ac30ef..c52b6b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,8 @@ "workspaces": [ "packages/*", "waiter_pwa", - "manager_dashboard" + "manager_dashboard", + "terminal" ] }, "manager_dashboard": { @@ -46,64 +47,6 @@ "vite": "^8.3.8" } }, - "manager_dashboard/node_modules/@alloc/quick-lru": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", - "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "manager_dashboard/node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "manager_dashboard/node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "manager_dashboard/node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "manager_dashboard/node_modules/@rolldown/pluginutils": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.1.1.tgz", - "integrity": "sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA==", - "dev": true, - "license": "MIT" - }, "manager_dashboard/node_modules/@vitejs/plugin-react": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.3.0.tgz", @@ -134,450 +77,6 @@ } } }, - "manager_dashboard/node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true, - "license": "MIT" - }, - "manager_dashboard/node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "manager_dashboard/node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true, - "license": "MIT" - }, - "manager_dashboard/node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "manager_dashboard/node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "manager_dashboard/node_modules/camelcase-css": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", - "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "manager_dashboard/node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "manager_dashboard/node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "manager_dashboard/node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "manager_dashboard/node_modules/didyoumean": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", - "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", - "dev": true, - "license": "Apache-2.0" - }, - "manager_dashboard/node_modules/dlv": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", - "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", - "dev": true, - "license": "MIT" - }, - "manager_dashboard/node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "manager_dashboard/node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "manager_dashboard/node_modules/fastq": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", - "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "manager_dashboard/node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "manager_dashboard/node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "manager_dashboard/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "manager_dashboard/node_modules/jiti": { - "version": "1.21.7", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", - "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", - "dev": true, - "license": "MIT", - "bin": { - "jiti": "bin/jiti.js" - } - }, - "manager_dashboard/node_modules/lilconfig": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", - "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, - "manager_dashboard/node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true, - "license": "MIT" - }, - "manager_dashboard/node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "manager_dashboard/node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "manager_dashboard/node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "manager_dashboard/node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "manager_dashboard/node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "manager_dashboard/node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "manager_dashboard/node_modules/picomatch": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "manager_dashboard/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "manager_dashboard/node_modules/pirates": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", - "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "manager_dashboard/node_modules/postcss-import": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", - "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.0.0", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "manager_dashboard/node_modules/postcss-js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.1.0.tgz", - "integrity": "sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "camelcase-css": "^2.0.1" - }, - "engines": { - "node": "^12 || ^14 || >= 16" - }, - "peerDependencies": { - "postcss": "^8.4.21" - } - }, - "manager_dashboard/node_modules/postcss-load-config": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", - "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "lilconfig": "^3.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "jiti": ">=1.21.0", - "postcss": ">=8.0.9", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - }, - "postcss": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "manager_dashboard/node_modules/postcss-nested": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", - "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "postcss-selector-parser": "^6.1.1" - }, - "engines": { - "node": ">=12.0" - }, - "peerDependencies": { - "postcss": "^8.2.14" - } - }, "manager_dashboard/node_modules/qrcode.react": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/qrcode.react/-/qrcode.react-4.2.0.tgz", @@ -587,189 +86,19 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, - "manager_dashboard/node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "manager_dashboard/node_modules/read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "pify": "^2.3.0" - } - }, - "manager_dashboard/node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "manager_dashboard/node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "node_modules/@alloc/quick-lru": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.3.0.tgz", + "integrity": "sha512-U4+70Pc5ZS9osnCBCE5Jha/ciHM+Yp+CNMNC/7HvYbNRk1Ldd+f7qO65W5qfhu/TCv+/ozljlXXe9Nj8419DMA==", "dev": true, "license": "MIT", "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "manager_dashboard/node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "manager_dashboard/node_modules/sucrase": { - "version": "3.35.1", - "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", - "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.2", - "commander": "^4.0.0", - "lines-and-columns": "^1.1.6", - "mz": "^2.7.0", - "pirates": "^4.0.1", - "tinyglobby": "^0.2.11", - "ts-interface-checker": "^0.1.9" + "node": ">=10" }, - "bin": { - "sucrase": "bin/sucrase", - "sucrase-node": "bin/sucrase-node" - }, - "engines": { - "node": ">=16 || 14 >=14.17" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "manager_dashboard/node_modules/tailwindcss": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.19.tgz", - "integrity": "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@alloc/quick-lru": "^5.2.0", - "arg": "^5.0.2", - "chokidar": "^3.6.0", - "didyoumean": "^1.2.2", - "dlv": "^1.1.3", - "fast-glob": "^3.3.2", - "glob-parent": "^6.0.2", - "is-glob": "^4.0.3", - "jiti": "^1.21.7", - "lilconfig": "^3.1.3", - "micromatch": "^4.0.8", - "normalize-path": "^3.0.0", - "object-hash": "^3.0.0", - "picocolors": "^1.1.1", - "postcss": "^8.4.47", - "postcss-import": "^15.1.0", - "postcss-js": "^4.0.1", - "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0", - "postcss-nested": "^6.2.0", - "postcss-selector-parser": "^6.1.2", - "resolve": "^1.22.8", - "sucrase": "^3.35.0" - }, - "bin": { - "tailwind": "lib/cli.js", - "tailwindcss": "lib/cli.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "manager_dashboard/node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "manager_dashboard/node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", - "dev": true, - "license": "MIT", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "manager_dashboard/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "manager_dashboard/node_modules/ts-interface-checker": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", - "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", - "dev": true, - "license": "Apache-2.0" - }, "node_modules/@babel/code-frame": { "version": "7.29.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", @@ -2883,6 +2212,44 @@ "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@oxc-project/types": { "version": "0.156.0", "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.156.0.tgz", @@ -3180,6 +2547,12 @@ "node": "^20.19.0 || >=22.12.0" } }, + "node_modules/@rolldown/pluginutils": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.1.1.tgz", + "integrity": "sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA==", + "license": "MIT" + }, "node_modules/@rollup/plugin-babel": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.1.0.tgz", @@ -3946,6 +3319,47 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true, + "license": "MIT" + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -4185,6 +3599,19 @@ "node": ">=0.6" } }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/bplist-creator": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.1.0.tgz", @@ -4220,6 +3647,19 @@ "node": "20 || >=22" } }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/browserslist": { "version": "4.29.5", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.5.tgz", @@ -4326,6 +3766,16 @@ "node": ">=6" } }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/caniuse-lite": { "version": "1.0.30001826", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001826.tgz", @@ -4363,6 +3813,44 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/chownr": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", @@ -4783,6 +4271,20 @@ "integrity": "sha512-wemFiCl3DTCnfzyqepUTX1ugbYbkTrw3aEZOG7YjAOUoEQB5g5PrEywPzk5JpbX/SxqQ9IvjUpxCDIEjoOWEfA==", "license": "Apache-2.0" }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true, + "license": "MIT" + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -5278,6 +4780,36 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "license": "MIT" }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -5307,6 +4839,16 @@ ], "license": "BSD-3-Clause" }, + "node_modules/fastq": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.3.tgz", + "integrity": "sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", @@ -5383,6 +4925,19 @@ "node": ">=10" } }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -6051,6 +5606,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/is-boolean-object": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", @@ -6255,6 +5823,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/is-number-object": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", @@ -6494,6 +6072,16 @@ "node": ">=10" } }, + "node_modules/jiti": { + "version": "1.21.7", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz", + "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==", + "devOptional": true, + "license": "MIT", + "bin": { + "jiti": "bin/jiti.js" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -6881,6 +6469,26 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/lilconfig": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.5.tgz", + "integrity": "sha512-aRAOI9Ia43ygL4o1EOmC/sc/0OFxrm7qcQngiIyWaqVnSnz932ybJ07zyCcgMNGSDP8Yxaf88Xj1zHEXmvQ4SA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -6956,6 +6564,43 @@ "node": ">= 0.4" } }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -7022,6 +6667,18 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/nanoid": { "version": "3.3.20", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", @@ -7082,6 +6739,36 @@ "node": ">=18" } }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/object-inspect": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", @@ -7295,6 +6982,16 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/plist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.1.tgz", @@ -7347,6 +7044,119 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/postcss-import": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.1.0.tgz", + "integrity": "sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/postcss-nested": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", + "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, "node_modules/postcss-selector-parser": { "version": "6.1.6", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.6.tgz", @@ -7432,6 +7242,27 @@ "node": ">=6" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/react": { "version": "19.3.1", "resolved": "https://registry.npmjs.org/react/-/react-19.3.1.tgz", @@ -7573,6 +7404,13 @@ "react-dom": ">=18" } }, + "node_modules/read-cache": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.2.tgz", + "integrity": "sha512-/peqiBB/n07gQGLsWaHho3WfvUyRscw0gYTsEFMhrIe/nWLkYaf5SbKYjGYqtRV3aPwykJgF2VEMo1ac4bnsGA==", + "dev": true, + "license": "MIT" + }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -7588,6 +7426,32 @@ "node": ">= 6" } }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/readdirp/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/recharts": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/recharts/-/recharts-3.10.1.tgz", @@ -7774,6 +7638,17 @@ "node": ">=4" } }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rimraf": { "version": "6.1.4", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.4.tgz", @@ -7828,12 +7703,6 @@ "@rolldown/binding-win32-x64-msvc": "1.2.19" } }, - "node_modules/rolldown/node_modules/@rolldown/pluginutils": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.1.1.tgz", - "integrity": "sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA==", - "license": "MIT" - }, "node_modules/rollup": { "version": "4.68.3", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.68.3.tgz", @@ -7879,6 +7748,30 @@ "fsevents": "~2.3.2" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-array-concat": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.4.tgz", @@ -8422,6 +8315,39 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/sucrase": { + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -8447,6 +8373,44 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tailwindcss": { + "version": "3.4.19", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.19.tgz", + "integrity": "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "arg": "^5.0.2", + "chokidar": "^3.6.0", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.3.2", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.21.7", + "lilconfig": "^3.1.3", + "micromatch": "^4.0.8", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.1.1", + "postcss": "^8.4.47", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0", + "postcss-nested": "^6.2.0", + "postcss-selector-parser": "^6.1.2", + "resolve": "^1.22.8", + "sucrase": "^3.35.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/tar": { "version": "7.5.23", "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.23.tgz", @@ -8501,6 +8465,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/terminal": { + "resolved": "terminal", + "link": true + }, "node_modules/terser": { "version": "5.51.2", "resolved": "https://registry.npmjs.org/terser/-/terser-5.51.2.tgz", @@ -8525,6 +8493,29 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "license": "MIT" }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/through2": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", @@ -8557,6 +8548,19 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", @@ -8567,6 +8571,13 @@ "tree-kill": "cli.js" } }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -9569,6 +9580,62 @@ "react-dom": "^19.0.0" } }, + "terminal": { + "version": "0.0.0", + "dependencies": { + "@xenia/access": "^0.0.0", + "@xenia/api": "^0.0.0", + "@xenia/i18n": "^0.0.0", + "@xenia/ui": "^0.0.0", + "axios": "^1.21.1", + "lucide-react": "^1.73.0", + "react": "^19.3.1", + "react-dom": "^19.3.1", + "react-router-dom": "^7.18.5" + }, + "devDependencies": { + "@eslint/js": "^9.39.5", + "@vitejs/plugin-react": "^6.3.0", + "autoprefixer": "^10.6.2", + "eslint": "^9.39.5", + "eslint-plugin-react-hooks": "^7.1.1", + "eslint-plugin-react-refresh": "^0.5.7", + "globals": "^17.14.0", + "postcss": "^8.5.33", + "tailwindcss": "^3.4.16", + "vite": "^8.3.8" + } + }, + "terminal/node_modules/@vitejs/plugin-react": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.3.0.tgz", + "integrity": "sha512-H9E955aVvD2F4zNHCw4eIZbIfF6xKldlh7MNu+hSU7xwQzh65lI/N+CJWqmfhi0PEjDXIt/H7T7J/4wU63KJiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rolldown/pluginutils": "^1.0.1" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0 || ^0.3.0", + "babel-plugin-react-compiler": "^1.0.0", + "oxc-transform-react": ">=0.152.0 <0.157.0", + "vite": "^8.0.0" + }, + "peerDependenciesMeta": { + "@rolldown/plugin-babel": { + "optional": true + }, + "babel-plugin-react-compiler": { + "optional": true + }, + "oxc-transform-react": { + "optional": true + } + } + }, "waiter_pwa": { "version": "0.0.0", "dependencies": { @@ -9603,13 +9670,6 @@ "vite": "^8.3.8" } }, - "waiter_pwa/node_modules/@rolldown/pluginutils": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.1.1.tgz", - "integrity": "sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA==", - "dev": true, - "license": "MIT" - }, "waiter_pwa/node_modules/@types/offscreencanvas": { "version": "2019.7.3", "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.3.tgz", diff --git a/package.json b/package.json index e49bf83..8c67219 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,15 @@ "workspaces": [ "packages/*", "waiter_pwa", - "manager_dashboard" + "manager_dashboard", + "terminal" ], "scripts": { "dev:waiter": "npm run dev -w waiter_pwa", "dev:manager": "npm run dev -w manager-dashboard", "build:waiter": "npm run build -w waiter_pwa", - "build:manager": "npm run build -w manager-dashboard" + "build:manager": "npm run build -w manager-dashboard", + "dev:terminal": "npm run dev -w terminal", + "build:terminal": "npm run build -w terminal" } } diff --git a/packages/i18n/locales/el/terminal.json b/packages/i18n/locales/el/terminal.json new file mode 100644 index 0000000..2d19afd --- /dev/null +++ b/packages/i18n/locales/el/terminal.json @@ -0,0 +1,11 @@ +{ + "start": { + "title": "Τερματικό Xenia", + "notPaired": "Αυτή η οθόνη δεν έχει συζευχθεί ακόμη με το κατάστημα." + }, + "apps": { + "placeholder": "Αυτή η οθόνη τρέχει: {{app}}. Οι οθόνες της ετοιμάζονται.", + "unknownTitle": "Άγνωστη εφαρμογή", + "unknown": "Αυτή η οθόνη έχει οριστεί να τρέχει «{{app}}», που αυτό το τερματικό δεν έχει ακόμη. Ενημερώστε τον διακομιστή του καταστήματος." + } +} diff --git a/packages/i18n/locales/en/terminal.json b/packages/i18n/locales/en/terminal.json new file mode 100644 index 0000000..75b8f93 --- /dev/null +++ b/packages/i18n/locales/en/terminal.json @@ -0,0 +1,11 @@ +{ + "start": { + "title": "Xenia terminal", + "notPaired": "This screen isn't paired with the venue yet." + }, + "apps": { + "placeholder": "This screen runs {{app}}. Its screens are being built.", + "unknownTitle": "Unknown app", + "unknown": "This screen is set to run \"{{app}}\", which this terminal doesn't have yet. Update the venue server." + } +} diff --git a/packages/i18n/src/resources.js b/packages/i18n/src/resources.js index 7d1d2a8..d4535ff 100644 --- a/packages/i18n/src/resources.js +++ b/packages/i18n/src/resources.js @@ -3,21 +3,23 @@ // Namespaces: common (shared words, component labels), errors (backend error codes, // local_backend/core/errors.py; tests/errors.test.mjs keeps them complete), manager (the manager shell, 2.6), modules (module // names/descriptions/limits for staff; local_backend/tests/test_module_texts.py keeps them complete), -// dev (sample screens). Apps add theirs here as they're converted: waiter, terminal, modules. +// terminal (the terminal app, phase 3), dev (sample screens). The waiter adds its own in phase 4. import elCommon from '../locales/el/common.json' import elDev from '../locales/el/dev.json' import elErrors from '../locales/el/errors.json' import elManager from '../locales/el/manager.json' import elModules from '../locales/el/modules.json' +import elTerminal from '../locales/el/terminal.json' import enCommon from '../locales/en/common.json' import enDev from '../locales/en/dev.json' import enErrors from '../locales/en/errors.json' import enManager from '../locales/en/manager.json' import enModules from '../locales/en/modules.json' +import enTerminal from '../locales/en/terminal.json' -export const NAMESPACES = ['common', 'errors', 'manager', 'modules', 'dev'] +export const NAMESPACES = ['common', 'errors', 'manager', 'modules', 'terminal', 'dev'] export const resources = { - en: { common: enCommon, errors: enErrors, manager: enManager, modules: enModules, dev: enDev }, - el: { common: elCommon, errors: elErrors, manager: elManager, modules: elModules, dev: elDev }, + en: { common: enCommon, errors: enErrors, manager: enManager, modules: enModules, terminal: enTerminal, dev: enDev }, + el: { common: elCommon, errors: elErrors, manager: elManager, modules: elModules, terminal: elTerminal, dev: elDev }, } diff --git a/terminal/Dockerfile b/terminal/Dockerfile new file mode 100644 index 0000000..cb1f965 --- /dev/null +++ b/terminal/Dockerfile @@ -0,0 +1,32 @@ +# Build context: client-services/ (the npm workspace root, APPS_PLATFORM D-15) +# docker build -f terminal/Dockerfile . +FROM node:22-slim AS builder + +WORKDIR /app + +# Manifests first so the install layer is cached until a dependency changes. +# The lockfile covers every workspace, so all their package.json files are needed. +COPY package.json package-lock.json ./ +COPY packages/ui/package.json packages/ui/ +COPY packages/i18n/package.json packages/i18n/ +COPY packages/api/package.json packages/api/ +COPY packages/access/package.json packages/access/ +COPY waiter_pwa/package.json waiter_pwa/ +COPY manager_dashboard/package.json manager_dashboard/ +COPY terminal/package.json terminal/ +RUN npm ci --workspace terminal --include-workspace-root + +COPY packages/ packages/ +COPY terminal/ terminal/ + +WORKDIR /app/terminal +RUN npm run build + +FROM nginx:alpine + +COPY --from=builder /app/terminal/dist /usr/share/nginx/html +COPY terminal/nginx.conf /etc/nginx/conf.d/default.conf + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] diff --git a/terminal/eslint.config.js b/terminal/eslint.config.js new file mode 100644 index 0000000..4da5a91 --- /dev/null +++ b/terminal/eslint.config.js @@ -0,0 +1,35 @@ +// ESLint for the terminal (plan step 3.1b): the same rules as the manager and the waiter. +// All of src is checked (new code). +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import { defineConfig, globalIgnores } from 'eslint/config' + +export default defineConfig([ + globalIgnores(['dist', 'dev-dist']), + { + files: ['**/*.{js,jsx}'], + extends: [ + js.configs.recommended, + reactHooks.configs.flat.recommended, + reactRefresh.configs.vite, + ], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + parserOptions: { + ecmaVersion: 'latest', + ecmaFeatures: { jsx: true }, + sourceType: 'module', + }, + }, + rules: { + 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }], + }, + }, + { + files: ['tests/**/*.mjs', '*.config.js'], + languageOptions: { globals: globals.node }, + }, +]) diff --git a/terminal/index.html b/terminal/index.html new file mode 100644 index 0000000..a3e8043 --- /dev/null +++ b/terminal/index.html @@ -0,0 +1,13 @@ + + + + + + + Xenia terminal + + +
+ + + diff --git a/terminal/nginx.conf b/terminal/nginx.conf new file mode 100644 index 0000000..508bd00 --- /dev/null +++ b/terminal/nginx.conf @@ -0,0 +1,27 @@ +# Terminal image (plan step 3.1b): the static app + /api and /static forwarded to the backend. +# Reached through the proxy on :8082 (LAN only). Same as the manager's image. +server { + listen 80; + + root /usr/share/nginx/html; + index index.html; + + location /api/ { + proxy_pass http://backend:8000; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $http_connection; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_read_timeout 3600; + } + + location /static/ { + proxy_pass http://backend:8000/static/; + proxy_set_header Host $host; + } + + location / { + try_files $uri $uri/ /index.html; + } +} diff --git a/terminal/package.json b/terminal/package.json new file mode 100644 index 0000000..c361f82 --- /dev/null +++ b/terminal/package.json @@ -0,0 +1,37 @@ +{ + "name": "terminal", + "private": true, + "version": "0.0.0", + "type": "module", + "description": "The terminal app (plan phase 3, APPS_PLATFORM D-2, D-8): one web app for every paired screen - kitchen display, counter POS, customer display. Served on :8082 (LAN only).", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "test": "node --test \"tests/*.test.mjs\"", + "lint": "eslint eslint.config.js tests src" + }, + "dependencies": { + "@xenia/access": "^0.0.0", + "@xenia/api": "^0.0.0", + "@xenia/i18n": "^0.0.0", + "@xenia/ui": "^0.0.0", + "axios": "^1.21.1", + "lucide-react": "^1.73.0", + "react": "^19.3.1", + "react-dom": "^19.3.1", + "react-router-dom": "^7.18.5" + }, + "devDependencies": { + "@eslint/js": "^9.39.5", + "@vitejs/plugin-react": "^6.3.0", + "autoprefixer": "^10.6.2", + "eslint": "^9.39.5", + "eslint-plugin-react-hooks": "^7.1.1", + "eslint-plugin-react-refresh": "^0.5.7", + "globals": "^17.14.0", + "postcss": "^8.5.33", + "tailwindcss": "^3.4.16", + "vite": "^8.3.8" + } +} diff --git a/terminal/postcss.config.js b/terminal/postcss.config.js new file mode 100644 index 0000000..be56e0e --- /dev/null +++ b/terminal/postcss.config.js @@ -0,0 +1,3 @@ +export default { + plugins: { tailwindcss: {}, autoprefixer: {} }, +} diff --git a/terminal/src/App.jsx b/terminal/src/App.jsx new file mode 100644 index 0000000..8be8d00 --- /dev/null +++ b/terminal/src/App.jsx @@ -0,0 +1,47 @@ +// The terminal app's root (plan step 3.1b, APPS_PLATFORM D-2, §9): one web app for every +// paired screen, served on :8082 (LAN only). loads the platform bootstrap +// (venue, language, modules) with the screen's session, if any. +// Routes in 3.1b: "/" the start screen, "/app/:appKey" an app by key (its lazy chunk). +// 3.1c replaces them with pairing → sign-in → the device's own app (by GET /api/devices/me). +import { lazy, Suspense, useState } from 'react' +import { BrowserRouter, Route, Routes, useParams } from 'react-router-dom' +import { AccessProvider } from '@xenia/access' +import { createI18n } from '@xenia/i18n' +import { Spinner } from '@xenia/ui' +import client from './api/client' +import AppHost from './apps/AppHost' +import { deviceStore } from './device/storage' +import StartScreen from './screens/StartScreen' + +const i18n = createI18n({ defaultNS: 'terminal' }) + +// Visual check pages for the shared packages, dev builds only (CS-16) +const UiGallery = import.meta.env.DEV ? lazy(() => import('@xenia/ui/gallery')) : null +const I18nSample = import.meta.env.DEV ? lazy(() => import('@xenia/i18n/sample')) : null + +const loading =
+ +function AppRoute() { + const { appKey } = useParams() + return +} + +export default function App() { + const [token] = useState(() => deviceStore.sessionToken()) + return ( + + + {UiGallery && } />} + {I18nSample && } />} + + + } /> + } /> + +
+ } /> + + + ) +} diff --git a/terminal/src/api/client.js b/terminal/src/api/client.js new file mode 100644 index 0000000..048e6dc --- /dev/null +++ b/terminal/src/api/client.js @@ -0,0 +1,30 @@ +import axios from 'axios' +import { createApiClient } from '@xenia/api' +import { deviceStore } from '../device/storage' + +// The shared client (@xenia/api, CS-18). Same origin: the image's nginx (or Vite in dev) +// forwards /api to the backend. Every request carries the screen's device token +// (X-Xenia-Device) and, when someone is signed in, their session token. +// A 401 = the session ended (signed out elsewhere, idle, device reassigned): drop the session +// token; the screen goes back to its sign-in (3.1c). Pairing/sign-in forms pass +// { xenia: { ignoreUnauthorized: true } } for their own 401s. +const listeners = new Set() + +const client = createApiClient({ + axios, + baseURL: '', + getToken: () => deviceStore.sessionToken(), + getDeviceToken: () => deviceStore.deviceToken(), + onUnauthorized: x => { + deviceStore.setSessionToken(null) + listeners.forEach(fn => fn(x)) + }, +}) + +/** Called with err.xenia whenever a request comes back 401 (see above). */ +export function onUnauthorized(fn) { + listeners.add(fn) + return () => listeners.delete(fn) +} + +export default client diff --git a/terminal/src/apps/AppHost.jsx b/terminal/src/apps/AppHost.jsx new file mode 100644 index 0000000..74fc291 --- /dev/null +++ b/terminal/src/apps/AppHost.jsx @@ -0,0 +1,26 @@ +// Runs one app by its key (plan step 3.1b): loads its chunk, shows a spinner meanwhile and a +// clear screen for an app this terminal doesn't have (an older terminal image). +import { lazy, Suspense } from 'react' +import { useTranslation } from '@xenia/i18n' +import { EmptyState, Spinner } from '@xenia/ui' +import { APPS } from './registry' + +// One lazy component per app, made once (React must see the same component every render) +const LAZY = Object.fromEntries(Object.entries(APPS).map(([key, load]) => [key, lazy(load)])) + +export default function AppHost({ appKey }) { + const { t } = useTranslation('terminal') + const App = Object.hasOwn(LAZY, appKey) ? LAZY[appKey] : null + if (!App) { + return ( +
+ +
+ ) + } + return ( + }> + + + ) +} diff --git a/terminal/src/apps/AppPlaceholder.jsx b/terminal/src/apps/AppPlaceholder.jsx new file mode 100644 index 0000000..4dff951 --- /dev/null +++ b/terminal/src/apps/AppPlaceholder.jsx @@ -0,0 +1,14 @@ +// Shown by an app that isn't built yet (3.1b): its name, so a paired screen proves which +// app it runs. Each app replaces it in its own step (3.2 KDS, 3.3 POS, 3.4 customer display). +import { useTranslation } from '@xenia/i18n' +import { EmptyState } from '@xenia/ui' + +export default function AppPlaceholder({ appKey }) { + const { t } = useTranslation('terminal') + const name = t(`modules:${appKey}.name`) + return ( +
+ +
+ ) +} diff --git a/terminal/src/apps/customer-display/CustomerDisplayApp.jsx b/terminal/src/apps/customer-display/CustomerDisplayApp.jsx new file mode 100644 index 0000000..927d7e0 --- /dev/null +++ b/terminal/src/apps/customer-display/CustomerDisplayApp.jsx @@ -0,0 +1,6 @@ +// Placeholder until step 3.4 builds this app (plan phase 3). Lazily loaded (apps/registry.js). +import AppPlaceholder from '../AppPlaceholder' + +export default function CustomerDisplayApp() { + return +} diff --git a/terminal/src/apps/kds/KdsApp.jsx b/terminal/src/apps/kds/KdsApp.jsx new file mode 100644 index 0000000..1342955 --- /dev/null +++ b/terminal/src/apps/kds/KdsApp.jsx @@ -0,0 +1,6 @@ +// Placeholder until step 3.2 builds this app (plan phase 3). Lazily loaded (apps/registry.js). +import AppPlaceholder from '../AppPlaceholder' + +export default function KdsApp() { + return +} diff --git a/terminal/src/apps/pos/PosApp.jsx b/terminal/src/apps/pos/PosApp.jsx new file mode 100644 index 0000000..e97cbe7 --- /dev/null +++ b/terminal/src/apps/pos/PosApp.jsx @@ -0,0 +1,6 @@ +// Placeholder until step 3.3 builds this app (plan phase 3). Lazily loaded (apps/registry.js). +import AppPlaceholder from '../AppPlaceholder' + +export default function PosApp() { + return +} diff --git a/terminal/src/apps/registry.js b/terminal/src/apps/registry.js new file mode 100644 index 0000000..bd467de --- /dev/null +++ b/terminal/src/apps/registry.js @@ -0,0 +1,14 @@ +// The apps a paired screen can run (plan step 3.1b, APPS_PLATFORM D-2): the device's +// app_key (GET /api/devices/me) picks one. Each app is its own lazily loaded chunk, so a +// kitchen screen never downloads the POS. Signage and the menu tablet arrive in phase 5. + +export const APPS = { + kds: () => import('./kds/KdsApp.jsx'), + pos_counter: () => import('./pos/PosApp.jsx'), + customer_display: () => import('./customer-display/CustomerDisplayApp.jsx'), +} + +/** The loader of an app, or null when this terminal version doesn't have it. */ +export function appLoader(appKey) { + return Object.hasOwn(APPS, appKey) ? APPS[appKey] : null +} diff --git a/terminal/src/device/storage.js b/terminal/src/device/storage.js new file mode 100644 index 0000000..146dcc5 --- /dev/null +++ b/terminal/src/device/storage.js @@ -0,0 +1,34 @@ +// Where a terminal keeps what makes it "this screen" (plan step 3.1b; used from 3.1c): +// - the device token, received once when the screen is paired (D-8). Losing it means +// pairing again; it is sent as X-Xenia-Device on every request and in the live +// connection's first frame, never in a URL. +// - the session token of whoever is signed in on the screen (terminal login), if anyone. +// localStorage can throw (private mode, storage off): then nothing is remembered and the +// screen simply asks to pair again after a reload. + +export const DEVICE_KEY = 'xenia_terminal_device' +export const SESSION_KEY = 'xenia_terminal_session' + +function browserStorage() { + try { return globalThis.localStorage ?? null } catch { return null } +} + +export function createDeviceStore(storage = browserStorage()) { + const get = key => { try { return storage?.getItem(key) || null } catch { return null } } + const set = (key, value) => { + try { + if (value) storage?.setItem(key, value) + else storage?.removeItem(key) + } catch { /* not remembered; see above */ } + } + return { + deviceToken: () => get(DEVICE_KEY), + setDeviceToken: token => set(DEVICE_KEY, token), + sessionToken: () => get(SESSION_KEY), + setSessionToken: token => set(SESSION_KEY, token), + /** The device was removed: forget both (back to pairing). */ + forget() { set(SESSION_KEY, null); set(DEVICE_KEY, null) }, + } +} + +export const deviceStore = createDeviceStore() diff --git a/terminal/src/index.css b/terminal/src/index.css new file mode 100644 index 0000000..196caaa --- /dev/null +++ b/terminal/src/index.css @@ -0,0 +1,18 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + html, body, #root { height: 100%; } + body { + margin: 0; + font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; + background: var(--x-surface-2); + color: var(--x-ink); + /* shared screens are touched, not clicked: no text selection or callouts by accident */ + -webkit-user-select: none; + user-select: none; + -webkit-tap-highlight-color: transparent; + } + input, textarea { -webkit-user-select: text; user-select: text; } +} diff --git a/terminal/src/main.jsx b/terminal/src/main.jsx new file mode 100644 index 0000000..e9400ad --- /dev/null +++ b/terminal/src/main.jsx @@ -0,0 +1,15 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' +import App from './App.jsx' +import '@xenia/ui/styles.css' // shared tokens + component styles (.x-*), CS-16 +import './index.css' +import { applyTheme, getStoredTheme } from '@xenia/ui' + +// New code uses the tokens only, so every theme works; a per-screen choice comes with each app. +applyTheme(getStoredTheme()) + +ReactDOM.createRoot(document.getElementById('root')).render( + + + +) diff --git a/terminal/src/screens/StartScreen.jsx b/terminal/src/screens/StartScreen.jsx new file mode 100644 index 0000000..851b41c --- /dev/null +++ b/terminal/src/screens/StartScreen.jsx @@ -0,0 +1,20 @@ +// What a screen shows before it is set up (plan step 3.1b): the venue's name and that it +// isn't paired yet. Step 3.1c turns it into the pairing screen (code + "Pair it in the +// manager under Devices"). +import { MonitorSmartphone } from 'lucide-react' +import { useAccess } from '@xenia/access' +import { useTranslation } from '@xenia/i18n' + +export default function StartScreen() { + const { t } = useTranslation('terminal') + const { venue } = useAccess() + return ( +
+
+
+
+ ) +} diff --git a/terminal/tailwind.config.js b/terminal/tailwind.config.js new file mode 100644 index 0000000..188b76c --- /dev/null +++ b/terminal/tailwind.config.js @@ -0,0 +1,10 @@ +import xenia from '@xenia/ui/tailwind-preset' + +/** @type {import('tailwindcss').Config} */ +export default { + // Shared design tokens only (bg-surface, text-ink-2, rounded-control…), CS-16 + presets: [xenia], + content: ['./index.html', './src/**/*.{js,jsx}'], + theme: { extend: {} }, + plugins: [], +} diff --git a/terminal/tests/terminal.test.mjs b/terminal/tests/terminal.test.mjs new file mode 100644 index 0000000..dff26ad --- /dev/null +++ b/terminal/tests/terminal.test.mjs @@ -0,0 +1,41 @@ +// Pure parts of the terminal shell (plan step 3.1b). +import assert from 'node:assert/strict' +import { test } from 'node:test' +import { APPS, appLoader } from '../src/apps/registry.js' +import { DEVICE_KEY, SESSION_KEY, createDeviceStore } from '../src/device/storage.js' + +test('the apps a screen can run: KDS, counter POS, customer display (signage + menu tablet in phase 5)', () => { + assert.deepEqual(Object.keys(APPS).sort(), ['customer_display', 'kds', 'pos_counter']) + assert.equal(typeof appLoader('kds'), 'function') + assert.equal(appLoader('signage'), null) + assert.equal(appLoader('toString'), null) // never a prototype member +}) + +function memoryStorage() { + const m = new Map() + return { getItem: k => (m.has(k) ? m.get(k) : null), setItem: (k, v) => m.set(k, String(v)), removeItem: k => m.delete(k), m } +} + +test('device store keeps the device and session tokens; forget() clears both', () => { + const s = memoryStorage() + const d = createDeviceStore(s) + assert.equal(d.deviceToken(), null) + d.setDeviceToken('dev-1') + d.setSessionToken('jwt-1') + assert.equal(s.m.get(DEVICE_KEY), 'dev-1') + assert.equal(d.sessionToken(), 'jwt-1') + d.setSessionToken(null) + assert.equal(s.m.has(SESSION_KEY), false) + d.setSessionToken('jwt-2') + d.forget() + assert.equal(d.deviceToken(), null) + assert.equal(d.sessionToken(), null) +}) + +test('device store survives a storage that throws (private mode)', () => { + const broken = { getItem() { throw new Error('denied') }, setItem() { throw new Error('denied') }, removeItem() { throw new Error('denied') } } + const d = createDeviceStore(broken) + d.setDeviceToken('x') + assert.equal(d.deviceToken(), null) + assert.equal(createDeviceStore(null).sessionToken(), null) +}) diff --git a/terminal/vite.config.js b/terminal/vite.config.js new file mode 100644 index 0000000..ed75d46 --- /dev/null +++ b/terminal/vite.config.js @@ -0,0 +1,23 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +const BACKEND = process.env.XENIA_BACKEND || 'http://localhost:8000' + +export default defineConfig({ + plugins: [react()], + // npm workspace (D-15): shared packages are imported from source; one React for all. + resolve: { + dedupe: ['react', 'react-dom'], + }, + server: { + host: '0.0.0.0', + port: 5175, + // Same origin in production (the image's nginx forwards /api); in dev Vite does it. + // XENIA_BACKEND picks another backend (the e2e suites run their own). + proxy: { + '/api/ws': { target: BACKEND.replace(/^http/, 'ws'), ws: true, changeOrigin: true }, + '/api': { target: BACKEND, changeOrigin: true }, + '/static': { target: BACKEND, changeOrigin: true }, + }, + }, +}) diff --git a/tests/e2e/README.md b/tests/e2e/README.md index cb8e13c..ff45f03 100644 --- a/tests/e2e/README.md +++ b/tests/e2e/README.md @@ -22,6 +22,8 @@ npm test -w @xenia/api # live client = the waiter's old WebSoc npm test -w @xenia/access # can(): one key, any/all npm test -w manager-dashboard # platform pages' logic: module states, what stops with a module, device status/usage/limits npm run lint -w manager-dashboard # ESLint (waiter rules) on the manager's v2 code; the file list is the `lint` script +npm test -w terminal # terminal shell: which apps a screen can run, the device/session token store +npm run lint -w terminal # ESLint on all of terminal/src (same rules) ``` **DB tests** (`local_backend/tests/conftest.py`) run the real FastAPI app against a throwaway SQLite database in a temp folder (never your dev or venue DB). Fixtures: `db` (session, rolled back after each test even if the code commits), `client` (TestClient with `get_db` overridden, license check open, no lifespan), `make_user(role=..., perms=...)` (password `password`, PIN `1234`), `login(user)` (auth headers). A test that uses any of them is marked `db` automatically. @@ -43,6 +45,7 @@ Or run one suite at a time: | `python license_e2e.py` | Offline licensing with a real cloud + site process: 400 days offline, tampered file, clock set back, expiry deferred to workday close, renewal, remote lock | Python deps of both backends | ~2 min | | `node ui.mjs` | `@xenia/ui` components on the dev-only gallery (`/ui-gallery`, manager Vite :5185): dialog focus/Escape/backdrop, sheet, toasts, field wiring, switch, InfoTip, PinPad, themes; `@xenia/i18n` on `/i18n-sample` with the browser in New York: venue time, live language switch, el/en money and numbers, price input, translated component labels | Edge | ~40 s | | `node manager.mjs` | Manager on `@xenia/api`/`@xenia/access` (backend :8057 on a demo DB, manager Vite :5186): bootstrap before/after login, wrong password and wrong lock PIN stay on screen, sidebar from keys, KDS module off → "turned off" screen, session ended elsewhere → /login, a waiter's cancel approved by a manager PIN (wrong PIN first) and audited; Apps, Integrations, License, Devices (pairing played through the API, a device setting chosen when pairing and edited, the screen's live connection told of the edit and closed on app change and removal); the approvals log, "Signed in now" + end session, the staff permission editor (give, reset to role, a staff manager can't give what they lack); the notification bell (live, read, read all), sign-in/venue/print settings, log download; the **owner flow** (sign in → turn on KDS → pair a screen → give a chef the kitchen permissions → the chef signs in on that screen) | Edge | ~1 min | +| `node stack.mjs` | The release images + the real `docker-compose.yml` and proxy config on one stack (:19080/:19081/:19082): the terminal on :8082 (app, deep links, assets, `/api`, WebSocket through both nginx hops); :8082 and :8081 refuse a non-LAN address (a second docker network, 100.64.50.0/24) and answer a LAN one; the proxy still starts without a terminal container | Docker | ~3 min (first build longer) | | `node browser.mjs` | Waiter web modes (same-origin, plain HTTP by LAN IP, venue mode), install dialog + drawer entry (Android / iPhone / desktop / no APK) | Docker, Edge | ~2 min | | `node android.mjs basics` | Pairing, wrong address / other venue's QR, login + live WS, back button, restart, two venues, camera permission | Android emulator | ~5 min | | `node android.mjs rediscovery` | Server IP change (logged in / out), server down + manual search, cold start while offline | Android emulator | ~4 min | diff --git a/tests/e2e/lib/proc.mjs b/tests/e2e/lib/proc.mjs index 9adc28a..e3c8bcf 100644 --- a/tests/e2e/lib/proc.mjs +++ b/tests/e2e/lib/proc.mjs @@ -112,7 +112,7 @@ export async function startViteNative({ port = 5180, backendUrl }) { * Isolated docker-compose stack built from this repo (its own project name, * images, data dir and host ports) — never touches a developer's running stack. */ -export function composeStack({ project, version, siteId, http, https, manager, extraEnv = {} }) { +export function composeStack({ project, version, siteId, http, https, manager, terminal, extraEnv = {} }) { const dir = path.join(OUT, project) mkdirSync(path.join(dir, 'data'), { recursive: true }) mkdirSync(path.join(dir, 'fiscal'), { recursive: true }) @@ -138,6 +138,8 @@ export function composeStack({ project, version, siteId, http, https, manager, e ports: !reset [] manager_dashboard: ports: !reset [] + terminal: + ports: !reset [] netinfo: profiles: ["off"] proxy: @@ -145,7 +147,8 @@ export function composeStack({ project, version, siteId, http, https, manager, e - "${http}:80" - "${manager}:8081" - "${https}:8443" -`) +${terminal ? ` - "${terminal}:8082" +` : ''}`) const args = ['compose', '-p', project, '--env-file', envFile, '-f', 'docker-compose.yml', '-f', 'docker-compose.dev.yml', '-f', ports] const compose = (...a) => execFileSync('docker', [...args, ...a], { cwd: CS, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }) return { @@ -159,7 +162,7 @@ export function composeStack({ project, version, siteId, http, https, manager, e }, down() { try { compose('down', '-v') } catch {} - for (const s of ['backend', 'waiter', 'manager']) { + for (const s of ['backend', 'waiter', 'manager', 'terminal']) { try { execFileSync('docker', ['rmi', `e2e/pos-${s}:${version}`], { stdio: 'ignore' }) } catch {} } }, diff --git a/tests/e2e/run-all.mjs b/tests/e2e/run-all.mjs index 92e3ada..0c5e949 100644 --- a/tests/e2e/run-all.mjs +++ b/tests/e2e/run-all.mjs @@ -14,11 +14,14 @@ const suites = [ ['unit: packages/access (node --test)', 'npm', ['test', '--silent', '-w', '@xenia/access'], CS], ['unit: manager_dashboard (node --test)', 'npm', ['test', '--silent', '-w', 'manager-dashboard'], CS], ['lint: manager_dashboard (v2 code)', 'npm', ['run', 'lint', '--silent', '-w', 'manager-dashboard'], CS], + ['unit: terminal (node --test)', 'npm', ['test', '--silent', '-w', 'terminal'], CS], + ['lint: terminal', 'npm', ['run', 'lint', '--silent', '-w', 'terminal'], CS], ['install.sh', 'node', ['install.mjs'], E2E], ['license (cloud + site)', PYTHON, ['license_e2e.py'], E2E], ['browser', 'node', ['browser.mjs'], E2E], ['ui (@xenia/ui + @xenia/i18n)', 'node', ['ui.mjs'], E2E], ['manager (login, bootstrap, approvals)', 'node', ['manager.mjs'], E2E], + ['stack (compose: terminal :8082, LAN only)', 'node', ['stack.mjs'], E2E], ] if (!process.argv.includes('--no-android')) suites.push(['android (emulator)', 'node', ['android.mjs'], E2E]) diff --git a/tests/e2e/stack.mjs b/tests/e2e/stack.mjs new file mode 100644 index 0000000..a9d87ca --- /dev/null +++ b/tests/e2e/stack.mjs @@ -0,0 +1,83 @@ +// Compose-stack suite (plan step 3.1b): the release images built from this repo, started +// with the real docker-compose.yml + proxy config (the one install.sh writes, CS-5), on +// their own project name and ports. Checks what only a real stack can show: +// - the terminal image is served on :8082 (SPA fallback, its assets, /api and the +// WebSocket through both nginx hops) +// - the plain-HTTP ports (:8082, and :8081 as a control) refuse a non-LAN address and +// answer a LAN one (two docker networks: 100.64.50.0/24 is not in the allow list) +// - the proxy still starts when the stack has no terminal container (older compose file) +// node stack.mjs (builds the images: a few minutes the first time, cached after) +import { execFileSync, spawnSync } from 'node:child_process' +import { reporter } from './lib/env.mjs' +import { composeStack, waitHttp } from './lib/proc.mjs' + +const PROJECT = 'xenia-e2e-stack' +const T = 19082 +const WAN = 'xenia-e2e-wan' +const r = reporter('stack: terminal on :8082 (compose)') +const stack = composeStack({ project: PROJECT, version: 'e2es', siteId: 'test-site-1', http: 19080, https: 19443, manager: 19081, terminal: T }) +const docker = (...a) => execFileSync('docker', a, { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }) + +/** HTTP status of url fetched from a throwaway container on `network` (busybox wget). */ +function statusFrom(network, url) { + // busybox wget prints the response headers (-S) on stderr, also for a 200 + const res = spawnSync('docker', ['run', '--rm', '--network', network, 'nginx:alpine', 'wget', '-S', '-O', '/dev/null', '-T', '5', url], + { encoding: 'utf8' }) + return Number(`${res.stdout}${res.stderr}`.match(/HTTP\/1\.\d (\d{3})/)?.[1] || 0) +} + +/** The first frame the backend sends a socket opened through :8082 without credentials. */ +function firstFrame(url) { + return new Promise(resolve => { + const ws = new WebSocket(url) + const done = v => { clearTimeout(t); try { ws.close() } catch { /* closed */ } resolve(v) } + const t = setTimeout(() => done(null), 15_000) + ws.onopen = () => ws.send(JSON.stringify({ cursor: 0 })) + ws.onmessage = e => done(JSON.parse(e.data)) + ws.onerror = () => done(null) + }) +} + +try { + try { docker('network', 'rm', WAN) } catch { /* not there */ } + await stack.up() + + const home = await fetch(`http://127.0.0.1:${T}/`) + const html = await home.text() + r.check('terminal: :8082 serves the terminal app', home.status === 200 && html.includes('Xenia terminal'), `${home.status}`) + const deep = await fetch(`http://127.0.0.1:${T}/app/kds`) + r.check('terminal: deep links fall back to the app (SPA)', deep.status === 200 && (await deep.text()).includes('Xenia terminal')) + const asset = html.match(/src="(\/assets\/[^"]+\.js)"/)?.[1] + const js = asset ? await fetch(`http://127.0.0.1:${T}${asset}`) : null + r.check('terminal: its script loads', js?.status === 200, asset || 'no script tag') + const health = await fetch(`http://127.0.0.1:${T}/api/system/health`) + r.check('terminal: /api reaches the backend through :8082', health.status === 200, `${health.status}`) + const frame = await firstFrame(`ws://127.0.0.1:${T}/api/ws/connect`) + r.check('terminal: the live connection upgrades through both proxies (refused: no credentials)', + frame?.type === 'refused' && frame.data?.code === 'auth.session_ended', JSON.stringify(frame)) + + // LAN vs not: the proxy joins a second network whose addresses aren't private + const proxy = stack.compose('ps', '-q', 'proxy').trim() + docker('network', 'create', '--subnet', '100.64.50.0/24', WAN) + docker('network', 'connect', WAN, proxy) + const wanIp = docker('inspect', '-f', `{{(index .NetworkSettings.Networks "${WAN}").IPAddress}}`, proxy).trim() + const lan = `${PROJECT}_default` + r.check('LAN: :8082 answers a LAN address', statusFrom(lan, 'http://proxy:8082/') === 200) + r.check('not LAN: :8082 refuses (403)', statusFrom(WAN, `http://${wanIp}:8082/`) === 403) + r.check('not LAN: :8081 refuses too (control)', statusFrom(WAN, `http://${wanIp}:8081/`) === 403) + + // An older docker-compose.yml without the terminal service must not take the proxy down + stack.compose('rm', '-sf', 'terminal') + stack.compose('restart', 'proxy') + await waitHttp('http://127.0.0.1:19080/api/system/health', true, 60_000) + const gone = await fetch(`http://127.0.0.1:${T}/`).catch(() => null) + r.check('no terminal container: the proxy still starts, waiter :80 works, :8082 answers 502', + (await fetch('http://127.0.0.1:19080/api/system/health')).status === 200 && gone?.status === 502, `${gone?.status}`) +} catch (e) { + r.check(`stack: ${e.message.split('\n')[0]}`, false) +} finally { + try { docker('network', 'disconnect', '-f', WAN, stack.compose('ps', '-q', 'proxy').trim()) } catch { /* not connected */ } + stack.down() + try { docker('network', 'rm', WAN) } catch { /* gone */ } +} +process.exit(r.done() ? 1 : 0) diff --git a/waiter_pwa/Dockerfile b/waiter_pwa/Dockerfile index cf117bc..68abccb 100644 --- a/waiter_pwa/Dockerfile +++ b/waiter_pwa/Dockerfile @@ -16,6 +16,7 @@ COPY packages/api/package.json packages/api/ COPY packages/access/package.json packages/access/ COPY waiter_pwa/package.json waiter_pwa/ COPY manager_dashboard/package.json manager_dashboard/ +COPY terminal/package.json terminal/ RUN npm ci --workspace waiter_pwa --include-workspace-root COPY packages/ packages/