Files
e-tib.com/node_modules/.pnpm/react-email@5.2.10/node_modules/react-email/dev/index.js
Marc Mintel d14122005d Initial commit: E-TIB production hardening & E2E foundation
Former-commit-id: ef04fca3d76375630c05aac117bf586953f3b657
2026-04-28 19:11:38 +02:00

47 lines
853 B
JavaScript

import child_process from 'node:child_process';
import path from 'node:path';
import url from 'node:url';
import { join } from 'shlex';
const filename = url.fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);
const root = path.resolve(dirname, '../src/index.ts');
const tsx = child_process.spawn(
`pnpm tsx ${root} ${join(process.argv.slice(2))}`,
{
cwd: process.cwd(),
shell: true,
stdio: 'inherit',
},
);
tsx.on('close', (code) => {
process.exit(code);
});
process.on('uncaughtExceptionMonitor', () => {
tsx.kill();
});
process.on('exit', (code) => {
tsx.kill(code);
});
process.on('SIGINT', () => {
tsx.kill('SIGINT');
});
process.on('SIGTERM', () => {
tsx.kill('SIGTERM');
});
process.on('SIGUSR1', () => {
tsx.kill('SIGUSR1');
});
process.on('SIGUSR2', () => {
tsx.kill('SIGUSR2');
});