docs: validate member links (#4955)
This commit is contained in:
parent
b7e0b1b393
commit
3b617b3709
|
|
@ -69,7 +69,7 @@ existing authentication state in new browser contexts.
|
||||||
Web apps use cookie-based or token-based authentication, where authenticated
|
Web apps use cookie-based or token-based authentication, where authenticated
|
||||||
state is stored as [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies)
|
state is stored as [cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies)
|
||||||
or in [local storage](https://developer.mozilla.org/en-US/docs/Web/API/Storage).
|
or in [local storage](https://developer.mozilla.org/en-US/docs/Web/API/Storage).
|
||||||
Playwright provides [`method: Browser.storageState`] method that can be used to retrieve storage state from authenticated contexts and then create new contexts with prepopulated state.
|
Playwright provides [`method: BrowserContext.storageState`] method that can be used to retrieve storage state from authenticated contexts and then create new contexts with prepopulated state.
|
||||||
|
|
||||||
Cookies and local storage state can be used across different browsers. They depend
|
Cookies and local storage state can be used across different browsers. They depend
|
||||||
on your application's authentication model: some apps might require both cookies
|
on your application's authentication model: some apps might require both cookies
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { parseApi } = require('./api_parser');
|
const { parseApi } = require('./api_parser');
|
||||||
const missingDocs = require('./missingDocs');
|
const missingDocs = require('./missingDocs');
|
||||||
|
const md = require('../markdown');
|
||||||
|
|
||||||
/** @typedef {import('./documentation').Type} Type */
|
/** @typedef {import('./documentation').Type} Type */
|
||||||
/** @typedef {import('../markdown').MarkdownNode} MarkdownNode */
|
/** @typedef {import('../markdown').MarkdownNode} MarkdownNode */
|
||||||
|
|
@ -64,6 +65,16 @@ async function run() {
|
||||||
writeAssumeNoop(path.join(PROJECT_DIR, 'README.md'), content, dirtyFiles);
|
writeAssumeNoop(path.join(PROJECT_DIR, 'README.md'), content, dirtyFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Validate links
|
||||||
|
{
|
||||||
|
for (const file of fs.readdirSync(path.join(PROJECT_DIR, 'docs', 'src'))) {
|
||||||
|
if (!file.endsWith('.md'))
|
||||||
|
continue;
|
||||||
|
const data = fs.readFileSync(path.join(PROJECT_DIR, 'docs', 'src', file)).toString();
|
||||||
|
documentation.renderLinksInText(md.parse(data));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check for missing docs
|
// Check for missing docs
|
||||||
{
|
{
|
||||||
const srcClient = path.join(PROJECT_DIR, 'src', 'client');
|
const srcClient = path.join(PROJECT_DIR, 'src', 'client');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue