This commit is contained in:
Morten Olsen
2025-08-01 07:52:09 +02:00
parent 5782d59f71
commit a25e0b9ffb
17 changed files with 880 additions and 280 deletions

View File

@@ -7,22 +7,23 @@ import { SecretRequest } from './crds/secrets/secrets.request.ts';
import { PostgresDatabase } from './crds/postgres/postgres.database.ts';
import { AuthentikService } from './services/authentik/authentik.service.ts';
import { AuthentikClient } from './crds/authentik/client/client.ts';
import { Domain } from './crds/domain/domain/domain.ts';
import { DomainEndpoint } from './crds/domain/endpoint/endpoint.ts';
const services = new Services();
//const authentikService = services.get(AuthentikService);
//await authentikService.ready();
const registry = services.get(CustomResourceRegistry);
registry.register(new SecretRequest());
registry.register(new PostgresDatabase());
registry.register(new AuthentikClient());
registry.register(new Domain());
registry.register(new DomainEndpoint());
await registry.install(true);
await registry.watch();
const authentikService = services.get(AuthentikService);
await authentikService.upsertClient({
name: 'foo',
secret: 'foo',
redirectUris: [{ url: 'http://localhost:3000/api/auth/callback', matchingMode: 'strict' }],
});
process.on('uncaughtException', (error) => {
console.log('UNCAUGHT EXCEPTION');
if (error instanceof ApiException) {