chore: replace all node/npm/tsx references with bun across codebase
- Source: setup/service.ts, runners.ts, agent-runner.ts error messages - Scripts: restart-stack.sh, run-migrations.ts → bun - Bootstrap: setup.sh check_node→check_bun, npm install→bun install - Docs: CLAUDE.md, README.md, all SKILL.md files - Tests: service.test.ts, restart-stack.test.ts expectations updated
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Setup CLI entry point.
|
||||
* Usage: npx tsx setup/index.ts --step <name> [args...]
|
||||
* Usage: bun setup/index.ts --step <name> [args...]
|
||||
*/
|
||||
import { logger } from '../src/logger.js';
|
||||
import { emitStatus } from './status.js';
|
||||
@@ -23,7 +23,7 @@ async function main(): Promise<void> {
|
||||
|
||||
if (stepIdx === -1 || !args[stepIdx + 1]) {
|
||||
console.error(
|
||||
`Usage: npx tsx setup/index.ts --step <${Object.keys(STEPS).join('|')}> [args...]`,
|
||||
`Usage: bun setup/index.ts --step <${Object.keys(STEPS).join('|')}> [args...]`,
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ describe('restartStackServices', () => {
|
||||
serviceManager: 'systemd',
|
||||
serviceId: 'codex-main',
|
||||
}),
|
||||
).toThrow('Run `npm run setup -- --step service`');
|
||||
).toThrow('Run `bun run setup -- --step service`');
|
||||
});
|
||||
|
||||
it('does not hide a general start failure behind direct fallback', () => {
|
||||
|
||||
@@ -9,7 +9,7 @@ export const STACK_RESTART_UNIT_NAME = 'ejclaw-stack-restart.service';
|
||||
const UNIT_NOT_FOUND_PATTERN =
|
||||
/(Unit .* not found|Could not find the requested service|not-found)/i;
|
||||
const MANAGED_SERVICE_CALLER_FALLBACK_MESSAGE =
|
||||
'Stack restart unit is not installed yet. Run `npm run setup -- --step service` from an external shell before retrying from a managed EJClaw service.';
|
||||
'Stack restart unit is not installed yet. Run `bun run setup -- --step service` from an external shell before retrying from a managed EJClaw service.';
|
||||
|
||||
interface RestartStackDeps {
|
||||
execFileSyncImpl?: typeof execFileSync;
|
||||
|
||||
@@ -15,7 +15,7 @@ export async function run(_args: string[]): Promise<void> {
|
||||
let buildOk = false;
|
||||
logger.info('Building agent runners');
|
||||
try {
|
||||
execSync('npm run build:runners', {
|
||||
execSync('bun run build:runners', {
|
||||
cwd: projectRoot,
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
});
|
||||
|
||||
@@ -149,13 +149,13 @@ describe('systemd unit generation', () => {
|
||||
|
||||
it('sets correct ExecStart', () => {
|
||||
const unit = generateSystemdUnit(
|
||||
'/usr/bin/node',
|
||||
'/usr/bin/bun',
|
||||
'/srv/ejclaw',
|
||||
'/home/user',
|
||||
false,
|
||||
);
|
||||
expect(unit).toContain(
|
||||
'ExecStart=/usr/bin/node /srv/ejclaw/dist/index.js',
|
||||
'ExecStart=/usr/bin/bun /srv/ejclaw/dist/index.js',
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -207,7 +207,7 @@ describe('service definitions', () => {
|
||||
it('generates a oneshot stack restart unit', () => {
|
||||
const unit = buildStackRestartSystemdUnit(
|
||||
'/srv/ejclaw',
|
||||
'/usr/bin/node',
|
||||
'/usr/bin/bun',
|
||||
'/home/user',
|
||||
);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ export async function run(_args: string[]): Promise<void> {
|
||||
// Build first
|
||||
logger.info('Building TypeScript');
|
||||
try {
|
||||
execSync('npm run build', {
|
||||
execSync('bun run build', {
|
||||
cwd: projectRoot,
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user