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:
@@ -2,13 +2,28 @@ import fs from 'node:fs/promises';
|
||||
import assert from 'node:assert/strict';
|
||||
import { spawn } from 'node:child_process';
|
||||
|
||||
const source = await fs.readFile('scripts/supplier-evaluation-check.mjs', 'utf8');
|
||||
const original = source.slice(source.indexOf('const base ='), source.indexOf('const author ='));
|
||||
const common = original.replace(' request,', ` request,
|
||||
cookieHeader: () => [...cookies].map(([k, v]) => k + '=' + v).join('; '),`);
|
||||
const source = await fs.readFile(
|
||||
'scripts/supplier-evaluation-check.mjs',
|
||||
'utf8',
|
||||
);
|
||||
const original = source.slice(
|
||||
source.indexOf('const base ='),
|
||||
source.indexOf('const author ='),
|
||||
);
|
||||
const common = original.replace(
|
||||
' request,',
|
||||
` request,
|
||||
cookieHeader: () => [...cookies].map(([k, v]) => k + '=' + v).join('; '),`,
|
||||
);
|
||||
assert.notEqual(common, original, 'Expected existing QA cookie helper');
|
||||
|
||||
await new Function('fs', 'assert', 'spawn', 'return (async()=>{' + common + `
|
||||
await new Function(
|
||||
'fs',
|
||||
'assert',
|
||||
'spawn',
|
||||
'return (async()=>{' +
|
||||
common +
|
||||
`
|
||||
const viewer = client();
|
||||
await viewer.enter('admin');
|
||||
const dashboard = await viewer.request('/dashboard');
|
||||
@@ -39,4 +54,6 @@ await new Function('fs', 'assert', 'spawn', 'return (async()=>{' + common + `
|
||||
technical_credential_issued: false, visual_review: false
|
||||
}, null, 2));
|
||||
console.log('Cliente HTTP autenticado e receptor descartável conferidos contra a avaliação8005.');
|
||||
` + '})()')(fs, assert, spawn);
|
||||
` +
|
||||
'})()',
|
||||
)(fs, assert, spawn);
|
||||
|
||||
Reference in New Issue
Block a user