()
| 3 | import type { DenoClientOptions } from './types'; |
| 4 | |
| 5 | function getHostName(): string | undefined { |
| 6 | // Deno.permissions.querySync is not available on Deno Deploy |
| 7 | if (!Deno.permissions.querySync) { |
| 8 | return undefined; |
| 9 | } |
| 10 | |
| 11 | const result = Deno.permissions.querySync({ name: 'sys', kind: 'hostname' }); |
| 12 | return result.state === 'granted' ? Deno.hostname() : undefined; |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * The Sentry Deno SDK Client. |