mirror of
https://github.com/thedotmack/claude-mem
synced 2026-04-26 01:25:10 +02:00
- Updated shebangs in user-message-hook.js, worker-cli.js, and worker-service.cjs to use Bun instead of Node. - Modified build-hooks.js to generate Bun-compatible shebangs in built scripts. - Enhanced sync-marketplace.cjs to trigger a worker restart after syncing files via an HTTP request. - Improved worker-cli.ts to exit with appropriate status codes after executing commands. - Added build-worker-binary.js to create a Windows executable for the worker service using Bun's compile feature.
27 lines
799 B
JavaScript
Executable File
27 lines
799 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
/**
|
|
* Build Windows executable for claude-mem worker service
|
|
* Uses Bun's compile feature to create a standalone exe
|
|
*/
|
|
|
|
import { execSync } from 'child_process';
|
|
import fs from 'fs';
|
|
|
|
const version = JSON.parse(fs.readFileSync('package.json', 'utf-8')).version;
|
|
const outDir = 'dist/binaries';
|
|
|
|
fs.mkdirSync(outDir, { recursive: true });
|
|
|
|
console.log(`Building Windows exe v${version}...`);
|
|
|
|
try {
|
|
execSync(
|
|
`bun build --compile --minify --target=bun-windows-x64 ./src/services/worker-service.ts --outfile ${outDir}/worker-service-v${version}-win-x64.exe`,
|
|
{ stdio: 'inherit' }
|
|
);
|
|
console.log(`\nBuilt: ${outDir}/worker-service-v${version}-win-x64.exe`);
|
|
} catch (error) {
|
|
console.error('Failed to build Windows binary:', error.message);
|
|
process.exit(1);
|
|
}
|