()
| 97 | } |
| 98 | |
| 99 | async function main() { |
| 100 | console.log("Design Tools Prototype Validation"); |
| 101 | console.log(`Output: ${OUTPUT_DIR}`); |
| 102 | console.log(`Briefs: ${briefs.length}`); |
| 103 | console.log(); |
| 104 | |
| 105 | const results: { name: string; path: string | null; }[] = []; |
| 106 | |
| 107 | for (const brief of briefs) { |
| 108 | try { |
| 109 | const resultPath = await generateMockup(brief); |
| 110 | results.push({ name: brief.name, path: resultPath }); |
| 111 | } catch (err) { |
| 112 | console.error("ERROR generating:", brief.name, err); |
| 113 | results.push({ name: brief.name, path: null }); |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | console.log(`\n${"=".repeat(60)}`); |
| 118 | console.log("RESULTS"); |
| 119 | console.log(`${"=".repeat(60)}`); |
| 120 | |
| 121 | const succeeded = results.filter(r => r.path); |
| 122 | const failed = results.filter(r => !r.path); |
| 123 | |
| 124 | console.log(`${succeeded.length}/${results.length} generated successfully`); |
| 125 | |
| 126 | if (failed.length > 0) { |
| 127 | console.log("Failed:", failed.map(f => f.name).join(", ")); |
| 128 | } |
| 129 | |
| 130 | if (succeeded.length > 0) { |
| 131 | console.log(`\nGenerated mockups:`); |
| 132 | for (const r of succeeded) { |
| 133 | console.log(` ${r.path}`); |
| 134 | } |
| 135 | console.log(`\nOpen in Finder: open ${OUTPUT_DIR}`); |
| 136 | } |
| 137 | |
| 138 | if (succeeded.length === 0) { |
| 139 | console.log("\nPROTOTYPE FAILED: No mockups generated. Re-evaluate approach."); |
| 140 | process.exit(1); |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | main().catch(console.error); |
no test coverage detected