import { Tree } from '@angular-devkit/schematics'; /** Minimal fake Angular workspace tree — just enough for getWorkspace()/buildDefaultPath() to work. */ export function createWorkspaceTree(): Tree { const tree = Tree.empty(); tree.create( '/angular.json', JSON.stringify( { version: 1, projects: { demo: { root: '', sourceRoot: 'src', prefix: 'app', projectType: 'application', architect: {}, }, }, }, null, 2 ) ); tree.create('/package.json', JSON.stringify({ name: 'demo' }, null, 2)); return tree; }