mirror of https://github.com/garrytan/gstack.git
refactor: export readOverlay from model-overlay resolver
Needed by the overlay-efficacy eval harness to resolve INHERIT directives without going through generateModelOverlay's full TemplateContext.
This commit is contained in:
parent
656df0e37e
commit
6c6fa69191
|
|
@ -24,7 +24,7 @@ const OVERLAY_DIR = path.resolve(import.meta.dir, '../../model-overlays');
|
||||||
|
|
||||||
const INHERIT_RE = /^\s*\{\{INHERIT:([a-z0-9-]+(?:\.[0-9]+)*)\}\}\s*\n/;
|
const INHERIT_RE = /^\s*\{\{INHERIT:([a-z0-9-]+(?:\.[0-9]+)*)\}\}\s*\n/;
|
||||||
|
|
||||||
function readOverlay(model: string, seen: Set<string> = new Set()): string {
|
export function readOverlay(model: string, seen: Set<string> = new Set()): string {
|
||||||
if (seen.has(model)) return ''; // cycle guard
|
if (seen.has(model)) return ''; // cycle guard
|
||||||
seen.add(model);
|
seen.add(model);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue