async function generateNotice()

in dev-tools/dep-info.js [112:135]


async function generateNotice() {
  const { name: pkgName, dependencies } = getPackageInfo(ROOT_DIR);
  const chromiumInfo = await getChromiumInfo();
  const depInfo = [chromiumInfo, ...(await generateDependencyInfo(Object.keys(dependencies)))];
  let allLicenses = `
${pkgName}
Copyright (c) 2021-present, Elasticsearch BV

`;
  depInfo.forEach(d => {
    if (d.license || d.notice) {
      allLicenses += `
---
This product relies on ${d.name}

${d.license ? d.license : ''}

${d.notice ? d.notice : ''}`;
    }
  });
  writeFileSync(join(ROOT_DIR, './NOTICE.txt'), allLicenses);
  // eslint-disable-next-line no-console
  console.info('NOTICE.txt file is up-to-date');
}