import { fileURLToPath } from"url";
/**
* Calling context should pass in import.meta.url and the function will return
* the equivalent of __dirname in Node/CommonJs.
*/exportfunctiongetDirname(importMetaUrl: string) {
returnfileURLToPath(newURL(".", importMetaUrl));
}