fix: commit pre-compiled dist and simplify sync Dockerfile
Server npm proxy silently drops devDependencies, making TypeScript unavailable in Docker. Solution: compile locally and commit dist/. Dockerfile now only needs prod deps + Playwright, both of which install cleanly via the public registry. Also fix TS2688/TS2304 errors: add DOM to tsconfig lib and cast querySelectorAll results to Element inside $$eval callbacks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -107,7 +107,7 @@ async function scrapeMembers(page: Page): Promise<FdiskMember[]> {
|
||||
const cells = Array.from(row.querySelectorAll('td'));
|
||||
const link = row.querySelector('a');
|
||||
return {
|
||||
cells: cells.map(c => c.textContent?.trim() ?? ''),
|
||||
cells: cells.map(c => (c as Element).textContent?.trim() ?? ''),
|
||||
href: link?.href ?? null,
|
||||
onclick: link?.getAttribute('onclick') ?? row.getAttribute('onclick') ?? null,
|
||||
};
|
||||
@@ -117,7 +117,7 @@ async function scrapeMembers(page: Page): Promise<FdiskMember[]> {
|
||||
// Find the header row to determine column positions
|
||||
const headerRow = await page.$eval('table tr:first-child', (row) => {
|
||||
const cells = Array.from(row.querySelectorAll('th, td'));
|
||||
return cells.map(c => c.textContent?.trim().toLowerCase() ?? '');
|
||||
return cells.map(c => (c as Element).textContent?.trim().toLowerCase() ?? '');
|
||||
});
|
||||
|
||||
// Detect column indices from headers
|
||||
@@ -207,7 +207,7 @@ async function scrapeMemberAusbildung(page: Page, member: FdiskMember): Promise<
|
||||
for (const table of tables) {
|
||||
const rows = await table.$$eval('tr', (rows) => {
|
||||
return rows.map(row => ({
|
||||
cells: Array.from(row.querySelectorAll('td, th')).map(c => c.textContent?.trim() ?? ''),
|
||||
cells: Array.from(row.querySelectorAll('td, th')).map(c => (c as Element).textContent?.trim() ?? ''),
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user