[fix]: resolve `supervisor.js` via `import.meta.url`

Merged
SE
9mo ago
+4-5

why

  • the supervisorClient was unable to find the supervisor.js file after we migrated to esm
  • the old code preferred __dirname over import.meta.url, but tsx polyfills __dirname in esm mode and it can resolve to the wrong directory

what changed

  • use import.meta.url instead 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.