Complete V2 sign-in, permission-aware navigation and retire the V1 shell

This commit is contained in:
Dev 2026-11-13 01:00:19 +01:00
commit 81836613b4

View file

@ -4,7 +4,7 @@ import {existsSync, readFileSync,writeFileSync,copyFileSync} from 'node:fs';
import {SHARED_HEADER,SHARED_HEAD,PORTAL_SCRIPT,PORTAL_CSS,CONTEXT_SCRIPT,CONTEXT_CSS} from './portal-navigation.mjs';
const release=process.argv[2],integrations=process.argv[3];
if(!release||!integrations)throw Error('Provide release and integration directories');
const cp=release+'/control-panel/public/index.html';let html=readFileSync(cp,'utf8');
const cp=release+'/control-panel/public/cp-v2/index.html';let html=readFileSync(cp,'utf8');
html=html.replace(/<header\b[^>]*>[\s\S]*?<\/header>/,SHARED_HEADER);
if(!html.includes('https://www.dunerealms.com/portal-navigation.js'))html=html.replace('</head>',SHARED_HEAD+'</head>');
writeFileSync(cp,html);