JasonShin / sqlx-ts

node.js compile-time SQL validations & type generations
https://jasonshin.github.io/sqlx-ts/
MIT License
181 stars 6 forks source link

Doesn't work on windows #154

Open PeytonHanel opened 3 months ago

PeytonHanel commented 3 months ago

I tried installing it on windows, and there are several problems.

Running npm install -g sqlx-ts gives an error saying unzip is required, which isn't a powershell command. I used gitbash to install it there, and then the command worked in powershell. But when I tried to run it with sqlx-ts . in my project directory, I got this error

PS C:\Users\peyto\pnw-microgreens\crm-app> sqlx-ts.cmd .
thread 'main' panicked at src/ts_generator/sql_parser/expressions/translate_expr.rs:189:59:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Is there a way that you can rewrite the install program to use windows-specific commands such as Expand-Archive which is the equivalent to unzip? I really want to use this library for my project. Thank you.

JasonShin commented 3 months ago

Hi, let me have a think about this. I can potentially just utilise an NPM module for unzipping, which should provide cross platform compatibility