feedback5: version 0.2.0 — three stale size / content lines: the README English summary names the 39 summon models the local client provides, DEPLOY §7's comparison with the 0.1.x whole-tree layout re-measured, setup's art-download fallback 270 MB → 460 MB; golden unchanged

- README English summary: the official 3D board, some HUD icons, two enemy models and 39 summon models come from a
  local client; without one the summons show their avatars (as the Chinese 本地客户端素材 line says).
- DEPLOY §7: measured on this tree (cee16a9, both zips built, deleted after): the 0.2.0 full zip 448 534 389 bytes,
  16 031 files; the 0.1.x layout of the same tree (every tracked file plus all of public/assets: the 0.2.0 stage with
  the 602 tracked files it leaves out and the 38 art files nothing lists) 457 108 488 bytes, 16 671 files — about 640
  files, 26 MB unpacked (27 047 047 bytes) and 8 MB of zip less (was ~570 / 25 / 8 from W5U's tree).
- tools/setup.mjs: the download size shown when data/assets.json gives none (missing, unreadable, no stats.bytes) is
  ART_DOWNLOAD_FALLBACK, 460 MB — the 0.2.0 manifest's stats.bytes (463 MB) as README and DEPLOY quote it; the
  manifest's own size is still shown whenever it has one. The header comment says ~460 MB.
- Tests: version 6 / 6, docs-consistency 24 / 24, docs-paths 7 / 7, package 10 / 10, client-static 313 / 313,
  i18n 10 / 10, i18n-data 8 / 8, i18n-packs 12 / 12, i18n-server 5 / 5, doctor 4 / 4, assets 47 / 47,
  asset-network 21 / 21, static-local-art 3 / 3; npm run golden ok; lint 0 errors.
This commit is contained in:
sganggs committed 2026-10-07 06:41:06 +08:00
1 parent 6aeee5ff70
commit 0b306baa49
3 files changed
+7 -4

No files matched your search

+5 -2
View File
@@ -8,7 +8,7 @@
// 2. Dependencies: `npm ci` (falls back to `npm install`) when node_modules is missing or incomplete.
// 3. Client libraries in public/vendor (tools/vendor.mjs) when any is missing.
// 4. Game data (data/*.json, committed) present and parseable.
// 5. Art/audio (tools/fetch-assets.mjs, ~270 MB into public/assets, resumable, mirror fallback) when public/assets
// 5. Art/audio (tools/fetch-assets.mjs, ~460 MB into public/assets, resumable, mirror fallback) when public/assets
// is missing or data/assets.json lists files that are not on disk. A failure is a warning: the game still runs
// with fallback visuals and the next run resumes.
// 6. Optional: official board/UI art from a locally installed Arknights client (Windows native install, CrossOver
@@ -76,6 +76,9 @@ export const nodeMajor = () => Number(process.versions.node.split('.')[0]);
const exists = (p) => { try { fs.accessSync(p); return true; } catch { return false; } };
const readJson = (p) => { try { return JSON.parse(fs.readFileSync(p, 'utf8')); } catch { return null; } };
const mb = (n) => `${(n / 1048576).toFixed(0)} MB`;
/** The art download when data/assets.json gives no size (missing, unreadable or without stats.bytes): the 0.2.0
* manifest's stats.bytes, 463 MB, as README and docs/DEPLOY.md quote it. */
const ART_DOWNLOAD_FALLBACK = '460 MB';
/** Terminal display width (CJK / full-width characters take two columns). */
export const displayWidth = (s) => [...String(s)].reduce((n, ch) => n + (ch.codePointAt(0) >= 0x2e80 ? 2 : 1), 0);
export const padDisplay = (s, w) => s + ' '.repeat(Math.max(0, w - displayWidth(s)));
@@ -429,7 +432,7 @@ async function main() {
let assets = checkAssets();
if (!opts.assets) add(assets.ok ? 'ok' : 'skip', '美术/音频 public/assets', assets.ok ? `${assets.total} 个文件` : '已跳过(--no-assets)');
else if (!assets.ok && deps.ok && !opts.check) {
const what = !assets.present ? `首次下载约 ${assets.bytes ? mb(assets.bytes) : '270 MB'},可随时中断,重新运行会续传`
const what = !assets.present ? `首次下载约 ${assets.bytes ? mb(assets.bytes) : ART_DOWNLOAD_FALLBACK},可随时中断,重新运行会续传`
: `补全缺失的 ${assets.missing} 个文件`;
log(`\n${c.cyan('▶')} 下载美术与音频素材(${what})…`);
const r = run(process.execPath, [path.join(ROOT, 'tools', 'fetch-assets.mjs'), `--asset-source=${opts.source}`]);