MCPcopy Create free account
hub / github.com/angular/dev-infra / main

Function main

github-actions/browserstack/index.ts:20–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18}
19
20async 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 {BROWSER_STACK_USERNAME, BROWSER_STACK_ACCESS_KEY} = JSON.parse(
25 dec,
26 ) as BrowserStackInfoObject;
27 // Register the access key as a secret to prevent it from being logged.
28 setSecret(BROWSER_STACK_ACCESS_KEY);
29 // Set the borwserstack access key and username as environment variables.
30 exportVariable('BROWSER_STACK_ACCESS_KEY', BROWSER_STACK_ACCESS_KEY);
31 exportVariable('BROWSER_STACK_USERNAME', BROWSER_STACK_USERNAME);
32}
33
34main().catch((e) => {
35 console.error(e);

Callers 1

index.tsFile · 0.70

Calls 3

updateMethod · 0.80
setSecretFunction · 0.70
exportVariableFunction · 0.70

Tested by

no test coverage detected