Skip to content

feat(typeorm): add path resolution and WSL support#12

Closed
veksen wants to merge 4 commits intomasterfrom
veksen/pull-stuttgart-v3
Closed

feat(typeorm): add path resolution and WSL support#12
veksen wants to merge 4 commits intomasterfrom
veksen/pull-stuttgart-v3

Conversation

@veksen
Copy link
Member

@veksen veksen commented Feb 26, 2026

Summary

  • Add project root detection via tsconfig.json for correct path resolution in deployed environments
  • Normalize source-map-resolved file paths so src/ paths point to the real project root
  • Add WSL path prefix support so file links work from Windows-side tooling
  • Bump typeorm version to 0.1.0

Test plan

  • All 14 typeorm path tests pass
  • All 14 mikroorm path tests pass (no regressions from conflict resolution)

🤖 Generated with Claude Code

veksen and others added 4 commits February 26, 2026 20:44
In deployed environments, process.cwd() may not be the project root
(e.g., when the start script does `cd .amplify-hosting/compute/default/
&& node app.js`). This adds findProjectRoot() which walks up from cwd
looking for tsconfig.json to find the real project root.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When compiled JS is relocated (e.g., postbuild copies dist/ to a
deployment directory), source map relative paths resolve to wrong
absolute paths. This extracts the src/-relative portion from the stack
trace path and reconstructs it using the real project root found via
tsconfig.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Inside WSL, absolute paths like /home/user/project/... can't be
resolved from Windows-side tooling (dashboards, VS Code terminal).
This detects the WSL_DISTRO_NAME env var and prefixes resolved paths
with //wsl.localhost/<distro> to make them accessible from Windows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@veksen veksen closed this Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant