async function getChromiumInfo()

in dev-tools/dep-info.js [100:110]


async function getChromiumInfo() {
  const { statusCode, body } = await request(CHROMIUM_LICENSE_URL);
  const bodyStr = await body.text();
  if (statusCode !== 200) {
    throw new Error(
      `Failed to fetch chromium license info. status: ${statusCode}, reason: ${bodyStr}`
    );
  }
  const license = Buffer.from(bodyStr, 'base64').toString('utf-8');
  return { name: 'chromium', license };
}