All checks were successful
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 3s
Monorepo Pipeline / 🧹 Lint (push) Successful in 1m19s
Monorepo Pipeline / 🧪 Test (push) Successful in 1m5s
Monorepo Pipeline / 🏗️ Build (push) Successful in 1m26s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Image Processor (push) Has been skipped
Monorepo Pipeline / 🐳 Build Directus (Base) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
63 lines
1.7 KiB
TypeScript
63 lines
1.7 KiB
TypeScript
import { config as dotenvConfig } from "dotenv";
|
|
import * as path from "node:path";
|
|
import * as fs from "node:fs/promises";
|
|
import { EstimationPipeline } from "./pipeline.js";
|
|
|
|
dotenvConfig({ path: path.resolve(process.cwd(), "../../.env") });
|
|
|
|
const briefing = await fs.readFile(
|
|
path.resolve(process.cwd(), "../../data/briefings/etib.txt"),
|
|
"utf8",
|
|
);
|
|
|
|
console.log(`Briefing loaded: ${briefing.length} chars`);
|
|
|
|
const pipeline = new EstimationPipeline(
|
|
{
|
|
openrouterKey: process.env.OPENROUTER_API_KEY || "",
|
|
zyteApiKey: process.env.ZYTE_API_KEY,
|
|
outputDir: path.resolve(process.cwd(), "../../out/estimations"),
|
|
crawlDir: path.resolve(process.cwd(), "../../data/crawls"),
|
|
},
|
|
{
|
|
onStepStart: (id, _name) => console.log(`[CB] Starting: ${id}`),
|
|
onStepComplete: (id) => console.log(`[CB] Done: ${id}`),
|
|
onStepError: (id, err) => console.error(`[CB] Error in ${id}: ${err}`),
|
|
},
|
|
);
|
|
|
|
try {
|
|
const result = await pipeline.run({
|
|
concept: {
|
|
strategy: {
|
|
briefingSummary: briefing,
|
|
projectGoals: [],
|
|
targetAudience: [],
|
|
coreMessage: "",
|
|
designVision: "",
|
|
uniqueValueProposition: "",
|
|
competitorAnalysis: "",
|
|
},
|
|
architecture: {
|
|
sitemap: [],
|
|
recommendedTechStack: [],
|
|
integrations: [],
|
|
websiteTopic: "",
|
|
dataModels: [],
|
|
},
|
|
auditedFacts: {
|
|
companyName: "E-TIB",
|
|
},
|
|
} as any,
|
|
});
|
|
|
|
console.log("\n✨ Pipeline complete!");
|
|
console.log(
|
|
"Validation:",
|
|
result.validationResult?.passed ? "PASSED" : "FAILED",
|
|
);
|
|
} catch (err: any) {
|
|
console.error("\n❌ Pipeline failed:", err.message);
|
|
console.error(err.stack);
|
|
}
|