/** * Finds the project root by walking up from `process.cwd()` looking for `tsconfig.json`. * * In deployed environments, `process.cwd()` may not be the project root * (e.g., `cd .amplify-hosting/compute/default/ && node app.js`). * Walking up to find `tsconfig.json` — which is never copied to deployment directories — * gives us the real project root. * * The result is cached since the project root doesn't change during a process's lifetime. */ export declare function findProjectRoot(): string; /** * Resolves a file path from a stack trace to a correct absolute path. * * When compiled JS is relocated (e.g., postbuild copies `dist/` to a deployment directory), * source-map-resolved paths become incorrect because the relative `sources` entries in * `.map` files resolve against the new location instead of the original project. * * This extracts the `src/`-relative portion and reconstructs the path using the real * project root. * * @param raw - A stack trace entry like "/wrong/path/src/routes/admin.ts:12:15" * @returns The resolved path like "/project/root/src/routes/admin.ts:12:15" */ export declare function resolveFilePath(raw: string): string; /** * Prefixes an absolute path with the WSL network path when running inside WSL. * * Inside WSL, absolute paths like `/home/user/project/...` can't be resolved * from Windows-side tooling (e.g., clickable links in dashboards or VS Code). * The `WSL_DISTRO_NAME` env var is always set inside WSL, and the path format * `//wsl.localhost//...` makes paths accessible from Windows. */ export declare function applyWslPrefix(filePath: string): string; /** @internal Exposed for testing only */ export declare function _resetProjectRootCache(): void; //# sourceMappingURL=path.d.ts.map