#!/usr/bin/env node
const path = require('path');
const fs = require('fs');

const builtVersion = path.join(__dirname, '../dist/index.cjs');

if (fs.existsSync(builtVersion)) {
    require(builtVersion);
} else {
    console.error('❌ @layerzerolabs/vm-tooling has not been built yet!');
    console.error('');
    console.error('Please run:');
    console.error('  pnpm --filter @layerzerolabs/vm-tooling build');
    console.error('');
    console.error('Or build all packages:');
    console.error('  pnpm build');
    process.exit(1);
}
