UNPKG

@eventcatalogtest/studio

Version:

A drag and drop UI for distributed systems that keeps your diagrams where they belong – in your repo

45 lines (36 loc) • 1.61 kB
#!/usr/bin/env node import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; import { existsSync } from 'fs'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const packageRoot = join(__dirname, '..'); console.log('šŸŽØ EventCatalog Studio - CLI Test'); console.log('===================================='); // Test package structure const tests = [ { path: join(packageRoot, 'package.json'), name: 'package.json' }, { path: join(packageRoot, 'bin/cli.js'), name: 'CLI script' }, { path: join(packageRoot, 'app'), name: 'Next.js app directory' }, { path: join(packageRoot, 'components'), name: 'Components directory' }, { path: join(packageRoot, 'next.config.ts'), name: 'Next.js config' }, ]; let allPassed = true; for (const test of tests) { const exists = existsSync(test.path); console.log(`${exists ? 'āœ…' : 'āŒ'} ${test.name}: ${exists ? 'Found' : 'Missing'}`); if (!exists) allPassed = false; } console.log('\n===================================='); console.log(`Overall status: ${allPassed ? 'āœ… PASSED' : 'āŒ FAILED'}`); if (allPassed) { console.log('\nšŸŽ‰ Your EventCatalog Studio package is ready!'); console.log('\nTo test locally:'); console.log(' npm link # Link the package'); console.log(' eventcatalog-studio # Run the CLI'); console.log('\nTo publish:'); console.log(' npm publish # Publish to npm'); console.log('\nTo test after publishing:'); console.log(' npx @eventcatalog/studio # Run via npx'); } process.exit(allPassed ? 0 : 1);