From 8982a143e6c9a1222fb93c21b095e8daee6a4dca Mon Sep 17 00:00:00 2001 From: unimatrix Date: Mon, 16 Nov 2026 22:33:58 +0000 Subject: [PATCH] Exclude native-only deed artwork from the public Worker bundle --- website/scripts/build.mjs | 100 +++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/website/scripts/build.mjs b/website/scripts/build.mjs index a412c6d4..2529ec23 100644 --- a/website/scripts/build.mjs +++ b/website/scripts/build.mjs @@ -1,50 +1,50 @@ -import {HOUSE_STYLE_CSS} from './house-style.mjs'; -import {bankRatesPage} from './bank-rates-page.mjs'; -import{withCanonicalMenu,MAIN_MENU}from'./main-menu.mjs'; -import{withMenuBadges}from'./menu-updates.mjs'; -import{updatePortalNavigation}from'./portal-navigation.mjs'; -// Package the authored web and worker sources without rewriting their content. -import {readFileSync,writeFileSync,openSync,writeSync,closeSync,readdirSync,statSync,mkdirSync,existsSync,rmSync,cpSync} from 'node:fs';import path from 'node:path';import {fileURLToPath} from 'node:url'; -const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),'..'),web=path.join(root,'web'),dist=path.join(root,'dist'); -// Fail before packaging if a public menu destination or illustration is missing. -for(const [label,href,icon] of MAIN_MENU){ - const url=new URL(href); - if(url.hostname==='www.dunerealms.com'){ - const relative=url.pathname==='/'?'index.html':decodeURIComponent(url.pathname.slice(1)); - if(!existsSync(path.join(web,relative)))throw Error('Broken public menu link: '+label+' -> '+relative); - } - if(!existsSync(path.join(web,'assets',icon)))throw Error('Missing menu artwork: '+label+' -> '+icon); -} -for(const [page,dependencies] of [['shop.html',['shop-landing.css','shop-embed.js']],['kits.html',['kits.css','kits.js']]]){ - for(const file of dependencies)if(!existsSync(path.join(web,file)))throw Error('Missing '+page+' dependency: '+file); -} -// Menu badges are now published manually through Imperial Bureau. -const homepage=readFileSync(path.join(web,'index.html'),'utf8'); -const legalNotice=homepage.match(/