commit compras1 3011
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-30 09:33:36 +02:00
parent 96b30368bc
commit 47649bd46c
163 changed files with 9419 additions and 145 deletions
+3 -3
View File
@@ -3,7 +3,7 @@ import assert from 'node:assert/strict';
const source = await fs.readFile('scripts/supplier-evaluation-check.mjs', 'utf8');
const common = source.slice(source.indexOf('const base ='), source.indexOf('const author ='));
await new Function('fs','assert','return (async()=>{' + common + `
await new Function('fs','assert','outputFile','return (async()=>{' + common + `
const rows=[], prints=new Set();
const paths=['/ordens','/recepcoes','/stock','/stock/requisicoes','/equipamentos','/orcamentos','/facturas','/pagamentos','/planeamento','/revisao-compras','/relatorios','/relatorios/medidas-fornecedores','/compras/fornecimento?view=calendar','/compras/fornecimento?view=imports','/compras/acordos/vigencia'];
for(const role of ['admin','procurement','finance','warehouse']){
@@ -25,6 +25,6 @@ await new Function('fs','assert','return (async()=>{' + common + `
}
}
}
await fs.writeFile('docs/proofs/final-review-inventory.json',JSON.stringify({environment:base,scope:'existing authorised records only',rows,print_paths:[...prints],business_commands:false,visual_review:false},null,2));
await fs.writeFile(outputFile,JSON.stringify({environment:base,scope:'existing authorised records only',rows,print_paths:[...prints],business_commands:false,visual_review:false},null,2));
console.log(JSON.stringify({routes_checked:rows.length,print_paths:[...prints],statuses:rows.reduce((a,r)=>(a[r.status]=(a[r.status]??0)+1,a),{})}));
`+'})()')(fs,assert);
`+'})()')(fs,assert,process.argv[2]??'docs/proofs/final-review-inventory.json');