Commit Graph

10 Commits

Author SHA1 Message Date
gnezim 2ae59d2074 Propagate Modern.js publicDir assets through sync + Docker build
The config/public/ directory (fonts, images, leaflet icons, favicons) is
Modern.js's publicDir convention — copied into dist/standalone/public/ at
build time. Two pre-existing gaps caused this to break on the deployed
SSR image and any fresh sync:

- scripts/sync-to-flights-front.sh did not copy config/ to the target
  repo, so the flights-front tree was missing /assets/** entirely.
- Dockerfile.react only copied src/, skipping config/; pnpm
  build:standalone ran without a publicDir source.

Result was that every /assets/** URL served the SSR HTML index with
Content-Type: text/html, producing OTS font-parse errors
(sfntVersion 1008821359 == '<!DT') and silently broken images.

Fix mirrors what was applied ad-hoc in Aeroflot.Flights.Front; this makes
future syncs and Docker builds carry the assets automatically.
2026-04-17 17:18:51 +03:00
gnezim 10dfc8609d Revert API_BASE_URL default: keep same-origin proxy for client-side CORS
Commit e20ef94 set the default to https://flights.test.aeroflot.ru/api,
which broke the browser client (no CORS headers on the test env;
scripts/dev-server.mjs is the only layer that can bypass it).

Keep PROD_ORIGIN pointing at the test env for SEO, but restore
API_BASE_URL default to http://localhost:8080/api with a comment
explaining the proxy chain: dev → Express+curl → flights.test.aeroflot.ru.
Production deployments continue to set API_BASE_URL explicitly.
2026-04-17 15:46:34 +03:00
gnezim e20ef940f8 Default API_BASE_URL and PROD_ORIGIN to the test environment
Previously API_BASE_URL defaulted to http://localhost:8080/api, which
only works inside the dev server proxy. For standalone/SSR runs without
the proxy, the default now points to https://flights.test.aeroflot.ru.

Dev continues to use the same-origin proxy because scripts/dev-server.mjs
explicitly injects API_BASE_URL=http://localhost:8080/api into the
Modern.js child process env, keeping browser fetches CORS/WAF safe.
2026-04-17 15:31:03 +03:00
gnezim dfe32fdee1 Add Makefile and sync script for flights-front deployment repo 2026-04-16 18:17:42 +03:00
gnezim 50f50eeae4 Add visual parity screenshot diff tool and mock appSettings in dev server
Add pixelmatch-based screenshot comparison script that captures Angular
(:4200) and React (:8080) at every route and generates pixel diff images.

Dev server: add mock /api/appSettings endpoint so Angular can bootstrap
when WAF blocks the real API.
2026-04-16 09:03:13 +03:00
gnezim d9bcccc1c5 Fix all e2e failures, sass warnings, and HMR websocket errors
CI / ci (push) Failing after 38s
Deploy / build-and-deploy (push) Failing after 6s
- Restructure OnlineBoardFilter to use radio tabs (flight/departure/
  arrival/route) with dynamic fields matching e2e test expectations
- Fix error page e2e tests to use client-side navigation (SSR renders
  empty outside [lang]/layout) and use specific CSS class locators
- Replace deprecated transparentize() with rgba() in _shadows.scss
- Handle WebSocket upgrades explicitly in dev-server to prevent HMR
  reconnection spam
- Resolve DEP0190 by spawning modern binary directly without shell
- Add tests/e2e-angular to tsconfig excludes
2026-04-16 00:23:10 +03:00
gnezim 20c19d15f4 Add standalone API proxy via curl (bypasses WAF TLS fingerprinting)
CI / ci (push) Failing after 23s
Deploy / build-and-deploy (push) Failing after 5s
Modern.js SSR intercepts all routes before any Express middleware,
so the API proxy runs as a separate Express server on port 8080.
Modern.js runs on 8081. The proxy uses curl subprocesses which go
through the system HTTPS proxy (GOST) with a proper TLS fingerprint
that the Aeroflot WAF accepts.

Usage: node scripts/dev-server.mjs (replaces pnpm dev for full-stack)

Also: remove stray e2e-angular test directory, fix env default to
same-origin /api.
2026-04-15 23:04:24 +03:00
gnezim e7c20c3d2d Fix API integration: proxy via Angular, date format, root redirect
CI / ci (push) Failing after 36s
Deploy / build-and-deploy (push) Failing after 5s
- Point API_BASE_URL to localhost:4200 (Angular's dev proxy) which
  correctly forwards to flights.test.aeroflot.ru with proper headers
- Convert URL date format (yyyyMMdd) to API format (yyyy-MM-ddT00:00:00)
  matching Angular's ApiFormatterService behavior
- Add standalone api-proxy.mjs script for running without Angular
- Root page redirect uses both loader and client-side navigate
- SignalR hub URL points to platform.yc.webzavod.ru/tracker/hub
- Remove broken server/modern-js.server.ts (proxy handled externally)
2026-04-15 22:08:54 +03:00
gnezim 003054460b Add coverage delta check script
CI / ci (push) Failing after 35s
Deploy / build-and-deploy (push) Failing after 6s
2026-04-15 16:33:01 +03:00
gnezim 1b0f15b082 Add bundle-size gate script for CI 2026-04-15 16:20:55 +03:00