feat: create type-safe API object for Headscale

This commit is contained in:
Aarnav Tale
2025-11-04 21:05:22 -05:00
parent 1c0561edb8
commit a68aedc297
27 changed files with 1378 additions and 80 deletions
+6
View File
@@ -6,6 +6,7 @@ import { configureConfig, configureLogger, envVariables } from './config/env';
import { loadIntegration } from './config/integration';
import { loadConfig } from './config/loader';
import { createDbClient } from './db/client.server';
import { createHeadscaleInterface } from './headscale/api';
import { createApiClient } from './headscale/api-client';
import { loadHeadscaleConfig } from './headscale/config-loader';
import { createHeadplaneAgent } from './hp-agent';
@@ -67,6 +68,11 @@ const appLoadContext = {
},
}),
hsApi: await createHeadscaleInterface(
config.headscale.url,
config.headscale.tls_cert_path,
),
client: await createApiClient(
config.headscale.url,
config.headscale.tls_cert_path,