(leaseId: string | undefined)
| 106 | } |
| 107 | |
| 108 | function parseSessionIdFromLeaseId(leaseId: string | undefined): string | null { |
| 109 | if (!leaseId) { |
| 110 | return null |
| 111 | } |
| 112 | |
| 113 | const match = /^session_ingress:([^:]+):/.exec(leaseId) |
| 114 | if (!match) { |
| 115 | return null |
| 116 | } |
| 117 | |
| 118 | return match[1] === 'detached' ? null : match[1] |
| 119 | } |
| 120 | |
| 121 | /** |
| 122 | * Read token via file descriptor, falling back to well-known file. |
no outgoing calls
no test coverage detected