Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

552 B
Raw Blame
/**
 * Runs `resources/js/lib/facebookLinkPreview.ts` over a corpus and prints the
 * results as JSON, so the PHP parity test can diff it against
 * `App\Support\FacebookLinkPreview`.
 */
import fs from 'node:fs';
import { pathToFileURL } from 'node:url';

const [modulePath, corpusPath] = process.argv.slice(2);
const { facebookLinkPreviewUrl } = await import(pathToFileURL(modulePath).href);
const corpus: string[] = JSON.parse(fs.readFileSync(corpusPath, 'utf8'));

console.log(JSON.stringify(corpus.map((entry) => facebookLinkPreviewUrl(entry))));