diff --git a/app/integration/docker.ts b/app/integration/docker.ts index 729094c..8630d7d 100644 --- a/app/integration/docker.ts +++ b/app/integration/docker.ts @@ -7,6 +7,9 @@ import { HeadscaleError, pull } from '~/utils/headscale' import type { Integration } from '.' +// Integration name +const name = 'Docker' + let url: URL | undefined let container: string | undefined @@ -121,4 +124,4 @@ async function restart() { } } -export default { preflight, sighup, restart } satisfies Integration +export default { name, preflight, sighup, restart } satisfies Integration diff --git a/app/integration/index.ts b/app/integration/index.ts index 4b9e69f..8f3bb8c 100644 --- a/app/integration/index.ts +++ b/app/integration/index.ts @@ -2,6 +2,7 @@ import docker from './docker' import proc from './proc' export interface Integration { + name: string preflight: () => Promise sighup?: () => Promise restart?: () => Promise diff --git a/app/integration/proc.ts b/app/integration/proc.ts index ecc0ec0..2a85126 100644 --- a/app/integration/proc.ts +++ b/app/integration/proc.ts @@ -5,6 +5,9 @@ import { kill } from 'node:process' import type { Integration } from '.' +// Integration name +const name = 'Native Linux (/proc)' + // Check if we have a /proc and if it's readable async function preflight() { if (platform() !== 'linux') { @@ -77,4 +80,4 @@ async function sighup() { } } -export default { preflight, sighup } satisfies Integration +export default { name, preflight, sighup } satisfies Integration diff --git a/app/utils/config/headplane.ts b/app/utils/config/headplane.ts index de31b46..088f972 100644 --- a/app/utils/config/headplane.ts +++ b/app/utils/config/headplane.ts @@ -73,6 +73,13 @@ export async function loadContext(): Promise { oidc: await checkOidc(config), } + console.log('Completed loading the Headplane Context') + console.log('Headscale URL:', headscaleUrl) + console.log('Integration:', context.integration?.name ?? 'None') + console.log('Config:', contextData.read ? `Found ${contextData.write ? '' : '(Read Only)'}` : 'Unavailable') + console.log('ACL:', context.acl.read ? `Found ${context.acl.write ? '' : '(Read Only)'}` : 'Unavailable') + console.log('OIDC:', context.oidc ? 'Configured' : 'Unavailable') + return context } diff --git a/app/utils/config/headscale.ts b/app/utils/config/headscale.ts index 881e4a8..1d0b777 100644 --- a/app/utils/config/headscale.ts +++ b/app/utils/config/headscale.ts @@ -103,7 +103,7 @@ const HeadscaleConfig = z.object({ client_secret: z.string().optional(), client_secret_path: z.string().optional(), scope: z.array(z.string()).default(['openid', 'profile', 'email']), - extra_params: z.record(z.string()).default({}), + extra_params: z.record(z.unknown()).default({}), allowed_domains: z.array(z.string()).optional(), allowed_users: z.array(z.string()).optional(), allowed_groups: z.array(z.string()).optional(),