Import the 2026-10-09 source release, Fastify/SQLite backend, restored source assets, and analytics-enabled server build. Replace files from the previous release while retaining the existing repository history. Make builds portable across Windows and Linux, configure local startup, normalize Windows static asset paths, and fix test fixture cleanup and file URL handling. Exclude local environment settings, databases, dependencies, validation output, and TypeScript build cache from version control. Validation: npm ci, static and server builds, 106 arrival tests, and actual local HTTP checks passed. The full suite passed 467 of 470 tests; three tests still require QA fixtures omitted from the supplied release, documented in README-서버실행.md.
35 lines
2.9 KiB
JavaScript
35 lines
2.9 KiB
JavaScript
import assert from 'node:assert/strict';
|
|
import { readFile } from 'node:fs/promises';
|
|
import { createHash } from 'node:crypto';
|
|
|
|
const root = new URL('../', import.meta.url);
|
|
const css = await readFile(new URL('src/style.css', root), 'utf8');
|
|
const html = await readFile(new URL('index.html', root), 'utf8');
|
|
const face = css.match(/@font-face\s*\{([^}]+)\}/)?.[1] ?? '';
|
|
assert.match(face, /font-family:\s*"BM Kkubulim"/, 'the requested font has an explicit local webfont face');
|
|
assert.match(face, /src:\s*url\("\/fonts\/BMKkubulim\.woff"\)\s*format\("woff"\)/);
|
|
assert.match(face, /font-display:\s*swap/, 'text remains available while the font loads');
|
|
assert.match(face, /font-weight:\s*400/);
|
|
assert.match(face, /font-style:\s*normal/);
|
|
assert.match(css, /--font-ui:\s*"BM Kkubulim"[^;]+system-ui,sans-serif/);
|
|
assert.match(css, /:root\s*\{[^}]*font-family:\s*var\(--font-ui\)/);
|
|
assert.match(css, /font-synthesis:\s*none/, 'do not invent a bold or italic font face');
|
|
assert.doesNotMatch(css, /font-weight:\s*(?:[5-9]\d\d|bold|bolder)/, 'only the official regular weight is requested');
|
|
assert.doesNotMatch(css, /"Batang"|"Noto Serif KR"|"Arial Rounded MT Bold"/, 'old theme-specific font families cannot win the cascade');
|
|
assert.match(css, /:root\[data-theme=wood\]\s*\{(?![^}]*font-family)/, 'wood shares the requested font');
|
|
assert.match(css, /\.welcome h1\s*\{[^}]*font-family:\s*inherit/);
|
|
assert.match(css, /output,input\[type=number\],pre,code\s*\{[^}]*font-family:\s*var\(--font-values\)/, 'technical values keep a readable fixed-width face');
|
|
assert.match(css, /strong,b\s*\{[^}]*font-weight:\s*400/);
|
|
assert.match(html, /<link\s+rel="preload"\s+href="\/fonts\/BMKkubulim\.woff"\s+as="font"\s+type="font\/woff"\s+crossorigin>/);
|
|
|
|
const font = await readFile(new URL('public/fonts/BMKkubulim.woff', root));
|
|
assert.equal(font.toString('ascii', 0, 4), 'wOFF', 'bundled asset is a real WOFF font');
|
|
assert.equal(font.readUInt32BE(8), font.length, 'font header length matches the asset');
|
|
assert.equal(createHash('sha256').update(font).digest('hex'), 'dc1e920bfdc5fd3b90189687e3f1ec3335e7a009015bca11d5b2348c4f4257ec', 'bundle the verified lossless official font');
|
|
assert.ok(font.length > 100_000 && font.length < 3_000_000, 'the complete font remains reasonably sized');
|
|
const license = await readFile(new URL('public/licenses/BMKkubulim-OFL.txt', root), 'utf8');
|
|
for (const text of ['Woowa Brothers', 'BMkkubulim', 'SIL OPEN FONT LICENSE', 'PERMISSION & CONDITIONS', 'TERMINATION', 'DISCLAIMER']) assert.ok(license.includes(text), `license includes ${text}`);
|
|
const notices = await readFile(new URL('public/THIRD-PARTY-NOTICES.txt', root), 'utf8');
|
|
assert.match(notices, /licenses\/BMKkubulim-OFL\.txt/);
|
|
console.log('UI font passed: local Kkubulim face/preload, shared themes, real font asset, regular weight, readable numeric fallback and complete license wiring (source checks, no browser layout engine).');
|