import {readFileSync,writeFileSync} from 'node:fs'; import {renderDunemarkCollection} from '../control-panel/public/cp-v2/dunemark-catalogue.mjs'; import {updatePortalNavigation} from './portal-navigation.mjs'; const web=new URL('../web/',import.meta.url); const exchangeFile=new URL('exchange.html',web); writeFileSync(exchangeFile,readFileSync(exchangeFile,'utf8').replace(/
/g,'')); const manualFile=new URL('manual-data.json',web),chapters=JSON.parse(readFileSync(manualFile,'utf8')); const currency=chapters.find(c=>c.id==='solaris-spice-sales-and-guild-travel'); if(!currency)throw Error('Currency chapter missing'); currency.body=currency.body.replace(/
/g,'').replace(/

[\s\S]*?<\/p>/g,''); currency.body='

View the Dunemark Collection at Imperial Postbank →

'+currency.body; writeFileSync(manualFile,JSON.stringify(chapters)+'\n'); const html='The Dunemark Collection · Imperial Postbank

FEDERAL IMPERIAL RESERVE

The Dunemark Collection

Open at Imperial Postbank →

'+''+renderDunemarkCollection()+''+'
'; writeFileSync(new URL('dunemark-collection.html',web),updatePortalNavigation(html)); console.log('Built Federal Imperial Reserve collection under Postbank; removed Exchange gallery.');