chore: log about context loading

This commit is contained in:
Aarnav Tale
2024-05-30 10:28:37 -04:00
parent dbd9d39da9
commit 868d85bbeb
5 changed files with 17 additions and 3 deletions
+7
View File
@@ -73,6 +73,13 @@ export async function loadContext(): Promise<HeadplaneContext> {
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
}
+1 -1
View File
@@ -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(),