Split asset budgets into transfer and storage and gate them in check:full
The new dragon illustrations pushed the cold home page to 1,754,467 bytes, over its 1.75 MB budget. The home dragon is re-encoded at quality 88 and the sidebar dragon resized to 268 px, twice its displayed width, at quality 92, with SSIM above 0.994: the home page is back to about 1.71 MB. The 25 MB cap measured the images stored in the repository, which are not downloaded on each visit. The profile now separates transfer budgets (home, Aniimo, CSS gzip at 100 kB pending the CSS split) from storage, which reports images per folder and caps each file at 1 MB. npm run test:assets applies them in check:full on the production build, so a breach blocks delivery. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2f02c761a8
commit
26984bb6c0
8 changed files with 79 additions and 25 deletions
|
|
@ -18,7 +18,7 @@
|
|||
"lint:cards": "eslint server.mjs vite.config.js services/http.js playwright.cards.config.js scripts/backup-nebula-cards.mjs scripts/start-cards-e2e-server.mjs scripts/simulate-expeditions.mjs services/cards tests/nebula-cards.test.mjs tests/nebula-cards-api.test.mjs tests/nebula-cards-daily.test.mjs tests/nebula-cards-expeditions.test.mjs tests/nebula-cards-expedition-balance.test.mjs tests/nebula-cards-expedition-service.test.mjs tests/server-robustness.test.mjs e2e/nebula-cards.spec.js e2e/style-layouts.spec.js website/src/features/cards website/src/components/Shell.jsx website/src/main.jsx website/src/router/RouteContent.jsx",
|
||||
"check": "node --check server.mjs && node --check vite.config.js && npm run lint && npm run lists:index && npm test && npm run build",
|
||||
"check:cards": "node --check server.mjs && node --check vite.config.js && npm run lint:cards && npm run test:cards && npm run test:e2e:cards",
|
||||
"check:full": "npm run check && E2E_PORT=4181 npm run test:e2e && npm run test:e2e:production && npm run test:e2e:cards",
|
||||
"check:full": "npm run check && E2E_PORT=4181 npm run test:e2e && npm run test:e2e:production && npm run test:assets && npm run test:e2e:cards",
|
||||
"test": "node --test",
|
||||
"test:cards": "node --test tests/nebula-cards.test.mjs tests/nebula-cards-api.test.mjs tests/nebula-cards-daily.test.mjs tests/nebula-cards-expeditions.test.mjs tests/nebula-cards-expedition-balance.test.mjs tests/nebula-cards-expedition-service.test.mjs tests/server-robustness.test.mjs && node --test --test-name-pattern=\"site content json is complete\" tests/data-validation.test.mjs",
|
||||
"test:e2e": "playwright test",
|
||||
|
|
@ -26,6 +26,7 @@
|
|||
"test:e2e:cards": "playwright test --config playwright.cards.config.js",
|
||||
"images:convert": "node scripts/convert-public-images.mjs",
|
||||
"profile:assets": "npm run build && node scripts/measure-public-assets.mjs",
|
||||
"test:assets": "node scripts/measure-public-assets.mjs gate",
|
||||
"profile:toolboxes": "npm run build && node scripts/profile-toolbox-loading.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue