feat(FN-094): add comment line for deployment verification
Some checks failed
Sync dev → Gitea / Mirror dev to Gitea (push) Has been cancelled

- Added a comment line to main.ts for deployment verification purposes
This commit is contained in:
Fusion
2026-05-11 02:07:03 +00:00
parent c72f063a25
commit f4fea1e429
274 changed files with 20712 additions and 6305 deletions

View File

@@ -0,0 +1,69 @@
/**
* EMEX HTTP decode timing test
* Usage: node scripts/test-emex-http.mjs
*/
import { ProxyAgent } from "/home/s/ss/node_modules/.pnpm/undici@7.22.0/node_modules/undici/index.js";
const VIN = "WDD1173431N193569";
const EMEX_BASE_URL = "https://emexdwc.ae";
const UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36";
// Same proxy config as emex.service.ts defaults
const PROXY_HOST = "74.81.81.81";
const PROXY_PORT_START = 10001;
const PROXY_PORT_END = 10099;
const PROXY_USER = "1726bbe361918676d44e";
const PROXY_PASS = "f11c7b6128cc86c6";
const port = Math.floor(Math.random() * (PROXY_PORT_END - PROXY_PORT_START + 1)) + PROXY_PORT_START;
const proxyUri = `http://${PROXY_USER}:${PROXY_PASS}@${PROXY_HOST}:${port}`;
console.log(`VIN : ${VIN}`);
console.log(`Proxy : ${PROXY_HOST}:${port}`);
console.log(`URL : ${EMEX_BASE_URL}/Vehicles.aspx?ft=findByVIN&c=&ssd=&vin=${VIN}`);
console.log("─".repeat(50));
const agent = new ProxyAgent({
uri: proxyUri,
connect: { timeout: 30000 },
requestTls: { timeout: 30000 },
});
const url = `${EMEX_BASE_URL}/Vehicles.aspx?ft=findByVIN&c=&ssd=&vin=${VIN}`;
const t0 = Date.now();
try {
const res = await fetch(url, {
headers: { "User-Agent": UA, Accept: "text/html,application/xhtml+xml" },
signal: AbortSignal.timeout(60000),
dispatcher: agent,
});
const elapsed = Date.now() - t0;
const html = await res.text();
console.log(`HTTP status : ${res.status}`);
console.log(`Süre : ${elapsed} ms`);
console.log(`Response : ${html.length} bytes`);
// Araç listesini parse et
const linkRx = /href="(Vehicle\.aspx\?[^"]+)">([^<]+)<\/a>/g;
const matches = [];
let m;
while ((m = linkRx.exec(html)) !== null) {
matches.push(m[2].trim());
}
if (matches.length > 0) {
console.log(`\nBulunan araçlar (${matches.length}):`);
matches.forEach((v, i) => console.log(` [${i}] ${v}`));
} else {
console.log("\nAraç bulunamadı (boş sonuç).");
// Ham HTML'in ilk 500 karakterini göster
console.log("\nHTML (ilk 500 kar):");
console.log(html.slice(0, 500));
}
} catch (err) {
const elapsed = Date.now() - t0;
console.error(`HATA (${elapsed} ms): ${err.message}`);
}