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:
2026-11-30 23:01:42 +02:00
co-authored by Claude Opus 5.5
parent 9f719695e3
commit ec934455e7
148 changed files with 9455 additions and 2413 deletions
+24 -7
View File
@@ -4,22 +4,36 @@ import { test } from 'node:test';
import { createNativeInertiaClient } from '../../scripts/lib/native-inertia-client.mjs';
test('owned native client drains large closed responses while preserving body headers cookies and manual redirects', async () => {
const payload = { synthetic_only: true, content: 'x'.repeat(2 * 1024 * 1024) };
const payload = {
synthetic_only: true,
content: 'x'.repeat(2 * 1024 * 1024),
};
let cookiesSeen = '';
const server = createServer((request, response) => {
response.setHeader('Connection', 'close');
response.useChunkedEncodingByDefault = false;
if (request.url === '/cookies') {
response.setHeader('Set-Cookie', ['QA_SESSION=first; Path=/', 'QA_CONTEXT=second; Path=/']);
response.setHeader('Set-Cookie', [
'QA_SESSION=first; Path=/',
'QA_CONTEXT=second; Path=/',
]);
}
if (request.url === '/empty') {
response.writeHead(204);
response.end();
return;
}
if (request.url === '/redirect') {
response.writeHead(302, { Location: '/large' });
response.end('Synthetic redirect');
return;
}
if (request.url === '/empty') { response.writeHead(204); response.end(); return; }
if (request.url === '/redirect') { response.writeHead(302, { Location: '/large' }); response.end('Synthetic redirect'); return; }
cookiesSeen = request.headers.cookie ?? '';
response.writeHead(200, { 'Content-Type': 'application/json' });
response.write(JSON.stringify(payload));
response.end();
});
await new Promise(resolve => server.listen(0, '127.0.0.1', resolve));
await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve));
try {
const origin = `http://127.0.0.1:${server.address().port}`;
const client = createNativeInertiaClient(origin, assert.ok);
@@ -44,9 +58,12 @@ test('owned native client drains large closed responses while preserving body he
assert.equal(redirect.status, 302);
assert.equal(redirect.headers.get('Location'), '/large');
assert.equal(await redirect.text(), 'Synthetic redirect');
await assert.rejects(client.request('//example.test/foreign'), /External HTTP destination refused/);
await assert.rejects(
client.request('//example.test/foreign'),
/External HTTP destination refused/,
);
} finally {
server.closeAllConnections();
await new Promise(resolve => server.close(resolve));
await new Promise((resolve) => server.close(resolve));
}
});