use latest version of timline poc

This commit is contained in:
2026-03-02 15:50:38 +01:00
parent de0be12aab
commit abb97d84fb
56 changed files with 1787 additions and 308 deletions

View File

@@ -0,0 +1,20 @@
import { cpSync, readFileSync, writeFileSync } from "node:fs";
import { resolve, dirname } from "node:path";
import { fileURLToPath } from "node:url";
const __dirname = dirname(fileURLToPath(import.meta.url));
const src = resolve(__dirname, "../build/web");
const dest = resolve(__dirname, "../../../apps/web/public/flutter");
cpSync(src, dest, { recursive: true });
console.log(`Copied Flutter build: ${src}${dest}`);
// Extract buildConfig from flutter_bootstrap.js so the React app can fetch it
const bootstrap = readFileSync(resolve(dest, "flutter_bootstrap.js"), "utf-8");
const match = bootstrap.match(/_flutter\.buildConfig\s*=\s*({.*?});/);
if (match) {
writeFileSync(resolve(dest, "build_config.json"), match[1]);
console.log("Extracted build_config.json");
} else {
console.warn("Could not extract buildConfig from flutter_bootstrap.js");
}