test(ci): add exporter heading levels and a11y typography smoke; update MAIN_PLAN

This commit is contained in:
2025-11-14 16:40:45 +09:00
parent aaa624a046
commit a9bbc357e7
92 changed files with 8370 additions and 13 deletions
+24
View File
@@ -0,0 +1,24 @@
import JSZip from 'jszip'
export type BuildZipInput = {
html: string
css: string
js: string
assets?: Record<string, Uint8Array>
}
export async function buildZip(input: BuildZipInput): Promise<Uint8Array> {
const zip = new JSZip()
zip.file('index.html', input.html)
zip.file('styles.css', input.css)
zip.file('app.js', input.js)
if (input.assets) {
for (const [path, bytes] of Object.entries(input.assets)) {
// In Node/Vitest, use Buffer for robust binary handling
const buf = Buffer.from(bytes)
zip.file(path, buf as unknown as Buffer)
}
}
const content = await zip.generateAsync({ type: 'uint8array' })
return content
}