feat: Phase 0 workspace, spikes, and golden harness
Stand up the monorepo skeleton and land the first Phase 0 artifacts: pairing threat model, plugin catalog, builder detect, 20-prompt golden harness, and synthetic 2GB mirror timing.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import type { SiteExport, SubsetRequest, SubsetResult } from './types.ts';
|
||||
|
||||
const contentTables = new Set(['wp_posts', 'wp_postmeta', 'wp_options']);
|
||||
const secret = /(_key|_secret|smtp_pass)$/;
|
||||
|
||||
export function exportDbSubset(dump: SiteExport, request: SubsetRequest): SubsetResult {
|
||||
const tables = Object.keys(dump.tables).filter((name) => contentTables.has(name));
|
||||
const options = (dump.tables.wp_options ?? [])
|
||||
.map((row) => String(row.option_name ?? ''))
|
||||
.filter((name) => name !== '' && !secret.test(name));
|
||||
|
||||
if (request.playbook === 'content') {
|
||||
return { tables, options };
|
||||
}
|
||||
return { tables, options };
|
||||
}
|
||||
Reference in New Issue
Block a user