chore(keycloak): code cleanup

This commit is contained in:
Masaki Yatsu
2025-10-29 15:33:20 +09:00
parent fd0c359407
commit 82f90f621b
35 changed files with 613 additions and 599 deletions

View File

@@ -23,15 +23,14 @@ async function main() {
invariant(clientId, "KEYCLOAK_CLIENT_ID is required");
try {
// Find the client by clientId
const clients = await kcAdminClient.clients.find({ realm, clientId });
if (clients.length > 0) {
console.log(`Client '${clientId}' exists in realm '${realm}'`);
process.exit(0); // Success - client exists
process.exit(0);
} else {
console.log(`Client '${clientId}' does not exist in realm '${realm}'`);
process.exit(1); // Client doesn't exist
process.exit(1);
}
} catch (error) {
console.error(`Error checking client existence: ${error}`);
@@ -39,4 +38,4 @@ async function main() {
}
}
main().catch(console.error);
main().catch(console.error);