const fs = require('fs') const p = 'C:/Users/ASUS/Documents/deepseek-harness/default-workspace/desktop-pet/src/preload/index.ts' let c = fs.readFileSync(p, 'utf8') function rep(from, to) { if (!c.includes(from)) { console.log('MISS ::', from.slice(0, 60).replace(/\n/g, '\\n')) return } c = c.replace(from, to) } rep( " getProfiles: () => Promise>\n delProfile: (id: string) => Promise>", " getProfiles: () => Promise>\n delProfile: (id: string) => Promise>" ) rep( " createProfile: (name: string) => Promise>\n switchProfile: (id: string) => Promise>", " createProfile: (name: string, skinId: string) => Promise>\n renameProfile: (id: string, name: string) => Promise>\n switchProfile: (id: string) => Promise>\n renameSkin: (id: string, name: string) => Promise>" ) fs.writeFileSync(p, c, 'utf8') console.log('preload types fixed')