chore: add one-time index html repair script

This commit is contained in:
pavlov346346-source 2026-09-11 07:38:22 +03:00
parent 6b8a1a604e
commit 6b422deb6a

View File

@ -0,0 +1,16 @@
import fs from 'node:fs';
const path='public/index.html';
let html=fs.readFileSync(path,'utf8');
const broken='}<style id="sun-composition-v1757">';
const fixed='}</style><style id="sun-composition-v1757">';
if(html.includes(fixed)){
console.log('index.html already fixed');
process.exit(0);
}
if(!html.includes(broken)){
console.error('Expected malformed style boundary not found');
process.exit(2);
}
html=html.replace(broken,fixed);
fs.writeFileSync(path,html);
console.log('Fixed missing </style> before sun-composition-v1757');