ADR-013 Phase 4: all 13 plugin frontends relocated + staging machinery

This commit is contained in:
2026-07-18 23:56:32 -04:00
parent d0c31d1c97
commit d1592b84c7
66 changed files with 201 additions and 198 deletions

View File

@@ -45,11 +45,11 @@ const childParts = []
const topParts = []
for (const name of chosen) {
const id = 'p_' + name.replace(/[^a-zA-Z0-9]/g, '_')
lines.push(
`import ${id}Default, { toplevel as ${id}Top } from `
+ `'../.plugins-staged/${name}/routes.js'`)
childParts.push(`...(${id}Default || [])`)
topParts.push(`...(${id}Top || [])`)
// Namespace import so a route file without a `toplevel` export is not a
// (strict ESM) build error - the binding is just undefined on the namespace.
lines.push(`import * as ${id} from '../.plugins-staged/${name}/routes.js'`)
childParts.push(`...(${id}.default || [])`)
topParts.push(`...(${id}.toplevel || [])`)
}
lines.push('')
lines.push(`export const stagedChildren = [${childParts.join(', ')}]`)