style: clean up code formatting and remove trailing whitespace

refactor: reorganize imports and fix type imports
This commit is contained in:
Evandro Fonseca Junior committed 2025-11-11 03:08:36 -03:00
1 parent d3704602fd
commit 47c04de6fe
232 files changed
+7140 -4798

No files matched your search

+10 -6
View File
@@ -3,9 +3,9 @@
* Lista completa de servidores oficiais
*/
import { resolve } from "node:path";
// Carregar variáveis de ambiente
import { config } from "dotenv";
import { resolve } from "path";
// Tentar carregar .env.local primeiro, depois .env
config({ path: resolve(process.cwd(), ".env.local") });
@@ -118,7 +118,7 @@ export async function seedServers() {
// Verificar se já existe
const existing = await query<{ server_id: number }>(
"SELECT server_id FROM servers WHERE server_name = $1",
[server.server_name]
[server.server_name],
);
if (existing.rows.length > 0) {
@@ -130,16 +130,21 @@ export async function seedServers() {
await query(
`INSERT INTO servers (server_name, server_type, location, is_active)
VALUES ($1, $2, $3, $4)`,
[server.server_name, server.server_type, server.location, true]
[server.server_name, server.server_type, server.location, true],
);
inserted++;
} catch (error) {
console.error(`❌ Erro ao inserir servidor ${server.server_name}:`, error);
console.error(
`❌ Erro ao inserir servidor ${server.server_name}:`,
error,
);
}
}
console.log(`✅ Seed concluído: ${inserted} servidores inseridos, ${skipped} já existiam\n`);
console.log(
`✅ Seed concluído: ${inserted} servidores inseridos, ${skipped} já existiam\n`,
);
}
// Se executado diretamente
@@ -154,4 +159,3 @@ if (require.main === module) {
process.exit(1);
});
}