mirror of
https://github.com/jlengrand/Maestro.git
synced 2026-03-10 08:31:19 +00:00
Could you please share the changelog, commit history, or description of what has changed in your project since the last release? This could include:
- Git commit messages
- Pull request descriptions
- A changelog file
- A summary of new features, bug fixes, and improvements
- Any other relevant information about the changes
Once you provide this information, I'll create an exciting CHANGES section with clean, 10-word bullets and relevant emojis for each update! 🚀
50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
#!/usr/bin/env node
|
|
/**
|
|
* Build script for the Maestro CLI using esbuild.
|
|
*
|
|
* Bundles the CLI into a single JavaScript file that can be run with Node.js.
|
|
* Users of this CLI already have Node.js installed (required for Claude Code),
|
|
* so we don't need standalone binaries.
|
|
*/
|
|
|
|
import * as esbuild from 'esbuild';
|
|
import * as fs from 'fs';
|
|
import * as path from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
const rootDir = path.resolve(__dirname, '..');
|
|
|
|
const outfile = path.join(rootDir, 'dist/cli/maestro-cli.js');
|
|
|
|
async function build() {
|
|
console.log('Building CLI with esbuild...');
|
|
|
|
try {
|
|
await esbuild.build({
|
|
entryPoints: [path.join(rootDir, 'src/cli/index.ts')],
|
|
bundle: true,
|
|
platform: 'node',
|
|
target: 'node20',
|
|
outfile,
|
|
format: 'cjs',
|
|
sourcemap: true,
|
|
minify: false, // Keep readable for debugging
|
|
// Note: shebang is already in src/cli/index.ts, no banner needed
|
|
external: [],
|
|
});
|
|
|
|
// Make the output executable
|
|
fs.chmodSync(outfile, 0o755);
|
|
|
|
const stats = fs.statSync(outfile);
|
|
const sizeKB = (stats.size / 1024).toFixed(1);
|
|
console.log(`✓ Built ${outfile} (${sizeKB} KB)`);
|
|
} catch (error) {
|
|
console.error('Build failed:', error);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
build();
|