(contents: string)
| 119 | }) |
| 120 | |
| 121 | async function createApiKeyHelperScript(contents: string): Promise<string> { |
| 122 | const helperPath = join(tempConfigDir, 'api-key-helper.sh') |
| 123 | await writeFile( |
| 124 | helperPath, |
| 125 | `#!/bin/sh\nprintf '%s\\n' '${contents.replaceAll("'", "'\"'\"'")}'\n`, |
| 126 | 'utf8', |
| 127 | ) |
| 128 | await chmod(helperPath, 0o700) |
| 129 | return helperPath |
| 130 | } |
| 131 | |
| 132 | describe('LeaseManager', () => { |
| 133 | it('resolves and caches a local first-party lease for managed auth sessions', async () => { |