A TypeScript bin target can currently be direct-linked when it has a shebang, even if that shebang is node.
This leads to runtime failures like:
ERR_UNKNOWN_FILE_EXTENSION: Unknown file extension ".ts"
for targets such as src/bin/zestman.ts.
Add explicit validation and fail early when all conditions are true:
- target extension is TypeScript-family:
.ts,.tsx,.mts,.cts - target has a shebang
- shebang runtime resolves to
node
Fail with a targeted message that tells the user exactly how to fix it:
- use
#!/usr/bin/env tsx(or equivalent tsx shebang), or - remove shebang and let symlx use launcher inference.
- do not change default hybrid behavior for other targets
- do not change collision/session/cleanup behavior
- do not reintroduce shebang mode toggles
- TS target + node shebang fails before linking
- TS target + tsx shebang still direct-links successfully
- TS target without shebang still uses launcher inference
- JS target + node shebang remains valid direct-link
- tests cover this scenario in bin target validation and command integration