I just spent roughly 15-30min trying to get the pgtyped CLI to recognize my .sql files. :sweat_smile: Ultimately, the issue came down to the fact that the CLI seems to resolve srcDir relative to where the command is executed (instead of being relative to where the configuration file is located). I fixed the problem by using __dirname instead of ./.
The Solution
I think additional documentation would be super helpful here! It's so close! Perhaps we could make a minor modification for clarity:
Directory to scan or watch for query files (relative to where the pgtyped command is executed).
This would've saved me a lot of time. :sweat_smile:
I know it's a small change, but I'm not able to fork and open a PR now. If you think this is a good idea and can't get to it this week, maybe I can try by the weekend? I'm assuming it would be a small change?
The Problem
I just spent roughly 15-30min trying to get the
pgtyped
CLI to recognize my.sql
files. :sweat_smile: Ultimately, the issue came down to the fact that the CLI seems to resolvesrcDir
relative to where the command is executed (instead of being relative to where the configuration file is located). I fixed the problem by using__dirname
instead of./
.The Solution
I think additional documentation would be super helpful here! It's so close! Perhaps we could make a minor modification for clarity:
This would've saved me a lot of time. :sweat_smile:
I know it's a small change, but I'm not able to fork and open a PR now. If you think this is a good idea and can't get to it this week, maybe I can try by the weekend? I'm assuming it would be a small change?