diff --git a/.github/workflows/model-updater.yml b/.github/workflows/model-updater.yml index 8a85dc9d..776e3808 100644 --- a/.github/workflows/model-updater.yml +++ b/.github/workflows/model-updater.yml @@ -35,6 +35,7 @@ jobs: - name: Install Playwright browsers and collect HTTP header orders run: | npx playwright install + npx playwright install webkit npx playwright install chrome npx playwright install msedge xvfb-run --auto-servernum -- node ./packages/header-order-collector/collector.js > ./packages/header-generator/src/data_files/headers_order.json diff --git a/packages/header-order-collector/collector.js b/packages/header-order-collector/collector.js index 06574a86..d1c69e43 100644 --- a/packages/header-order-collector/collector.js +++ b/packages/header-order-collector/collector.js @@ -34,22 +34,26 @@ async function getHeadersFor(launcher, httpVersion) { v2(HTTP2port); const browserTypes = { - // safari: () => playwright.webkit.launch(), + safari: () => playwright.webkit.launch(), chrome: (p) => playwright.chromium.launch(p), firefox: (p) => playwright.firefox.launch(p), - // edge: () => playwright.chromium.launch({ channel: 'msedge' }), + edge: () => playwright.chromium.launch({ channel: 'msedge' }), }; - const x = await Promise.all( - Object.entries(browserTypes) - .map(async ([name, launcher]) => { - return [name, [...await getHeadersFor(launcher, 1), ...await getHeadersFor(launcher, 2)]]; - }) - ); - - console.log(JSON.stringify(Object.fromEntries(x), null, 4)); - - process.exit(0); + try { + const x = await Promise.all( + Object.entries(browserTypes) + .map(async ([name, launcher]) => { + return [name, [...await getHeadersFor(launcher, 1), ...await getHeadersFor(launcher, 2)]]; + }) + ); + console.log(JSON.stringify(Object.fromEntries(x), null, 4)); + process.exit(0); + + } catch (e) { + console.error(e); + process.exit(1); + } } )();