eb0f12b8cf
A least-privilege key — PutObject / GetObject and no ListBucket — gets a 403
from HeadBucket, and reading that as "the bucket is missing" turned a working
key into a 503. The bucket may well be there and simply not be the key's
business, so a refusal to look at it is no longer a failure; the PUT that
follows is the honest test.
`scripts/check_storage.py` covers what a smoke test cannot, because these are
the rules whose failure is silent: the format read from the magic bytes rather
than the client's word, the key pattern the read route serves and nothing
outside it, a caption that cannot break out of the Markdown it is written into,
what is actually asked of MinIO on a write, and the refusals — unconfigured
storage, a key we never wrote, an object that is gone. boto3's client is a stub,
so it needs no credentials, no bucket and no network.
`frontend/scripts/check-image.mjs` is the third layer: bytes can be stored and
returned perfectly while the `<img>` draws nothing. It builds its own PNG
fixture, drives the page and measures what the browser did — the picture
decoded, the figure is centred on the column, `{width=50%}` is half the column,
the 图注 prints under the picture, an image inside a sentence stays inline, and
「插入图片」 ends with the picture in the paper. Run with `pnpm check:image`; it
needs Playwright, which stays out of the app's dependencies.
39 lines
955 B
JSON
39 lines
955 B
JSON
{
|
|
"name": "frontend",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "run-p type-check \"build-only {@}\" --",
|
|
"preview": "vite preview",
|
|
"build-only": "vite build",
|
|
"type-check": "vue-tsc --build",
|
|
"check:image": "node scripts/check-image.mjs"
|
|
},
|
|
"dependencies": {
|
|
"@element-plus/icons-vue": "^2.3.2",
|
|
"axios": "^1.20.0",
|
|
"element-plus": "^2.14.5",
|
|
"katex": "^0.18.7",
|
|
"pinia": "^4.0.2",
|
|
"pinia-plugin-persistedstate": "^4.7.1",
|
|
"vue": "^3.5.40",
|
|
"vue-router": "^5.2.0"
|
|
},
|
|
"devDependencies": {
|
|
"@tsconfig/node24": "^24.0.4",
|
|
"@types/node": "^24.13.3",
|
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
"@vue/tsconfig": "^0.9.1",
|
|
"npm-run-all2": "^9.0.2",
|
|
"typescript": "~6.0.0",
|
|
"vite": "^8.1.5",
|
|
"vite-plugin-vue-devtools": "^8.1.5",
|
|
"vue-tsc": "^3.3.7"
|
|
},
|
|
"engines": {
|
|
"node": "^22.18.0 || >=24.12.0"
|
|
}
|
|
}
|