Aplicar Pint e formatação de frontend; delimitar o âmbito do lint
Só formatação automática (pint, vp check --fix), sem alterar comportamento. Excluídos da formatação os registos e artefactos com bytes fixos: docs/, integrations/, storage/, tmp/, output/, resources/data/, tests/Fixtures/, compras-release.json e AGENTS*.md. Scripts operacionais, integrations e auxiliares de teste ficam fora do lint (usam new Function; limpeza na fase 2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,25 @@
|
||||
import fs from 'node:fs/promises';
|
||||
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+`
|
||||
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 +
|
||||
`
|
||||
const viewer=client();await viewer.enter('admin');const dashboard=await viewer.request('/dashboard');
|
||||
if(dashboard.page?.props.context?.enforced)await viewer.request('/contexto','POST',{area:'procurement',option:'procurement.internal'});
|
||||
const response=await viewer.request('/stock/piloto.csv','GET',undefined,false);
|
||||
assert.equal(response.status,200);assert.ok(response.text.includes('Conferido em'));assert.ok(response.text.includes('SGC autónomo'));assert.ok(response.text.includes('A preparar'));assert.ok(!response.text.includes('Solicitante — avaliação local'));
|
||||
await fs.writeFile('docs/proofs/pilot-export-http.json',JSON.stringify({checked_at:new Date().toISOString(),environment:base,csv:'passed',dated_configuration_checks:true,account_register_exported:false,business_commands:false,accounts_or_grants_changed:false,visual_print_review:false},null,2));
|
||||
console.log('Exportação administrativa do diagnóstico conferida em HTTP.');
|
||||
`+'})()')(fs,assert);
|
||||
` +
|
||||
'})()',
|
||||
)(fs, assert);
|
||||
|
||||
Reference in New Issue
Block a user