()
| 18 | } |
| 19 | |
| 20 | async function main() { |
| 21 | const t: Uint8Array = tokenRaw; |
| 22 | const dcip = createDecipheriv(alg, k, iv).setAuthTag(Buffer.from(at, 'base64')); |
| 23 | const dec = dcip.update(t, undefined, 'utf8') + dcip.final('utf8'); |
| 24 | const {SAUCE_USERNAME, SAUCE_ACCESS_KEY} = JSON.parse(dec) as SauceInfoObject; |
| 25 | // Register the access key as a secret to prevent it from being logged. |
| 26 | setSecret(SAUCE_ACCESS_KEY); |
| 27 | // Set the sauce access key and username as environment variables. |
| 28 | exportVariable('SAUCE_ACCESS_KEY', SAUCE_ACCESS_KEY); |
| 29 | exportVariable('SAUCE_USERNAME', SAUCE_USERNAME); |
| 30 | } |
| 31 | |
| 32 | main().catch((e) => { |
| 33 | console.error(e); |
no test coverage detected