Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't store the user data #9483

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 10 additions & 22 deletions buildtools/check-example.js
Original file line number Diff line number Diff line change
@@ -60,14 +60,9 @@ function fileMock(name, contentType) {
const OSMImage = fileMock('osm.png', 'image/png');
const ASITVDCapabilities = fileMock('asitvd.capabilities.xml', 'text/xml');
const SgxCapabilities = fileMock('sgx.capabilities.xml', 'text/xml');
let browser;
let browserClosed = false;

process.on('unhandledRejection', async (reason, promise) => {
console.log('UnhandledRejection: ', promise, 'reason:', reason);
if (browser && !browserClosed) {
await browser.close();
}
process.exit(2);
});

@@ -88,7 +83,6 @@ function loaded(page, browser) {
console.log(`The page take more than 60s. to load (${(new Date() - start) / 1000}).`);
console.log('Pending requests:');
requestsURL.forEach((request) => console.log(request));
await browser.close();
process.exit(2);
} else {
timeout = undefined;
@@ -105,25 +99,30 @@ function loaded(page, browser) {
.then(
async () => {
console.log(`Screenshot saved at: ${screenshotPath}`);
await browser.close();
process.exit();
},
async (e) => {
console.log(`Screenshot error: ${e}`);
await browser.close();
process.exit(2);
},
);
}, 1000);
} else {
await browser.close();
process.exit();
}
}
}, 500);
}
(async () => {
browser = await puppeteer.launch({
const browser = await puppeteer.launch({
args: ['--no-sandbox', '--disable-web-security', '--single-process'],
headless: true,
// Don't store the user data
userDataDir: '/dev/null',
});
process.on('exit', (code) => {
console.log('Closing browser');
browser.close();
});
const page = await browser.newPage();

@@ -132,13 +131,11 @@ function loaded(page, browser) {
page.on('pageerror', async (e) => {
console.log('Page error');
console.log(e);
await browser.close();
process.exit(2);
});
page.on('dialog', async (e) => {
console.log('Unexpected alert message');
console.log(e);
await browser.close();
process.exit(2);
});
page.on('request', (request) => {
@@ -259,7 +256,6 @@ function loaded(page, browser) {
!url.startsWith('https://maps.googleapis.com/')
) {
console.log(`Request failed on: ${url}`);
await browser.close();
process.exit(2);
}
loaded(page, browser);
@@ -285,21 +281,13 @@ function loaded(page, browser) {
.text()
.includes('Multiple versions of Lit loaded. Loading multiple versions is not recommended.')
) {
await browser.close();
process.exit(2);
}
}
});
await page.goto(page_url).catch(async (error) => {
console.log(`Page load error: ${error}.`);
await browser.close();
process.exit(2);
});
loaded(page, browser);
})().catch(async (error) => {
console.log(`Unexpected error: ${error}.`);
if (browser && !browserClosed) {
await browser.close();
}
process.exit(2);
});
})();

Unchanged files with check annotations Beta

/**
* @typedef {Object} MarkerOptions
* @property {[number, number]} [position]

Check warning on line 64 in api/src/Map.js

GitHub Actions / Continuous integration

Missing JSDoc @Property "position" description
* @property {string} [icon]

Check warning on line 65 in api/src/Map.js

GitHub Actions / Continuous integration

Missing JSDoc @Property "icon" description
*/
/**
* @typedef {Object} MapOptions
* @property {string} div

Check warning on line 70 in api/src/Map.js

GitHub Actions / Continuous integration

Missing JSDoc @Property "div" description
* @property {import('ol/coordinate').Coordinate} center

Check warning on line 71 in api/src/Map.js

GitHub Actions / Continuous integration

Missing JSDoc @Property "center" description
* @property {number} [zoom=10]

Check warning on line 72 in api/src/Map.js

GitHub Actions / Continuous integration

Missing JSDoc @Property "zoom" description
* @property {boolean} [showCoords=true]

Check warning on line 73 in api/src/Map.js

GitHub Actions / Continuous integration

Missing JSDoc @Property "showCoords" description
* @property {boolean} [addMiniMap=false]

Check warning on line 74 in api/src/Map.js

GitHub Actions / Continuous integration

Missing JSDoc @Property "addMiniMap" description
* @property {boolean} [miniMapExpanded=true]

Check warning on line 75 in api/src/Map.js

GitHub Actions / Continuous integration

Missing JSDoc @Property "miniMapExpanded" description
* @property {boolean} [addLayerSwitcher=false]

Check warning on line 76 in api/src/Map.js

GitHub Actions / Continuous integration

Missing JSDoc @Property "addLayerSwitcher" description
* @property {boolean} [searchDiv]

Check warning on line 77 in api/src/Map.js

GitHub Actions / Continuous integration

Missing JSDoc @Property "searchDiv" description
* @property {string[]} [layers]
* @property {string[]} [backgroundLayers]
*/