Files
vendoo/tools/verify-production-updater-2.2.mjs
Masterluke77andGitHub 40071f718e Vendoo 1.43.0 – Production Update
Manifestbasierter Production-Updater 3.3, Modulnavigation, optionales Produktbild Studio, Listing-Studio-Aktionsleiste sowie plattformübergreifende Windows-/Linux-Release-Gates.
2026-07-10 13:16:21 +02:00

21 lines
2.5 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { existsSync, readFileSync } from 'node:fs';
import { resolve } from 'node:path';
const root=resolve(import.meta.dirname,'..');
const files=['UPDATE_VENDOO.bat','scripts/update-vendoo-gui.ps1','scripts/updater/Vendoo.Updater.Preflight.ps1','scripts/updater/Vendoo.Updater.UI.ps1','scripts/updater/Vendoo.Updater.Host.ps1','scripts/updater/Vendoo.Updater.Worker.ps1','tools/verify-powershell-parser.ps1','tools/verify-powershell-static.mjs','docs/PRODUCTION_UPDATER_2_2.md'];
const failures=[];
for(const f of files) if(!existsSync(resolve(root,f))) failures.push(`Pflichtdatei fehlt: ${f}`);
const read=f=>readFileSync(resolve(root,f),'utf8');
const bat=read(files[0]),preflight=read(files[2]),ui=read(files[3]),host=read(files[4]),worker=read(files[5]),parser=read(files[6]),docs=read(files[8]);
const must=(text,needle,label)=>{if(!text.includes(needle))failures.push(`${label} fehlt: ${needle}`)};
for(const t of ['Vendoo.Updater.Preflight.ps1','PREFLIGHT_EXIT','pause']) must(bat,t,'BAT-Startvertrag');
for(const t of ["$UpdaterVersion = '2.2.0'",'System.Management.Automation.Language.Parser','ParseFile','updater-preflight.log','exit 21']) must(preflight,t,'Preflight');
for(const t of ["$UpdaterVersion = '2.2.0'",'Vendoo.Updater.Host.ps1','Write-InitialStatus','RedirectStandardOutput=$true','RedirectStandardError=$true','Diagnoseordner','Erneut versuchen']) must(ui,t,'UI');
for(const t of ["$UpdaterVersion = '2.2.0'",'PowerShell-Parserprüfung','System.Management.Automation.Language.Parser','ParseFile','Exception.ToString()']) must(host,t,'Worker-Host');
for(const t of ["$UpdaterVersion='2.2.0'",'"${Label}: {0:N1}','"${Title}: sichere Eingabe']) must(worker,t,'Worker-Core');
for(const forbidden of ['"$Label:','"$Title:']) if(worker.includes(forbidden)) failures.push(`Worker enthält verbotene Parser-Regression: ${forbidden}`);
for(const t of ['System.Management.Automation.Language.Parser','ParseFile','Windows-PowerShell-Parser-Gate']) must(parser,t,'Windows-Parser-Gate');
for(const f of files.slice(1,7)){const b=readFileSync(resolve(root,f));if(!(b[0]===0xef&&b[1]===0xbb&&b[2]===0xbf))failures.push(`${f} besitzt keine UTF-8-BOM.`)}
for(const t of ['echter Windows-PowerShell-5.1-Parser','Variablen-Doppelpunkt','GitHub Actions']) must(docs,t,'Dokumentation');
if(failures.length){console.error(`Production-Updater-2.2-Gate fehlgeschlagen (${failures.length})`);for(const f of failures)console.error(`- ${f}`);process.exit(1)}
console.log('OK: Vendoo Production Updater 2.2 PS5.1-Parser-Gate, lokale Preflight-Sperre und Interpolations-Regressionstest.');