[fix]: resolve `supervisor.js` via `import.meta.url`
Merged
SE
9mo ago+4+4+0123456789-5-5-0123456789
why
- the
supervisorClientwas unable to find thesupervisor.jsfile after we migrated to esm - the old code preferred
__dirnameoverimport.meta.url, but tsx polyfills__dirnamein esm mode and it can resolve to the wrong directory
what changed
- use
import.meta.urlinstead of__dirname
Summary by cubic
Fixes supervisor script resolution in ESM by using import.meta.url, preventing failures when __dirname is polyfilled by tsx.
- Bug Fixes
- Resolve supervisor.js using import.meta.url instead of __dirname.
- Improve missing-script error message to include the searched directory.