Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support --file flag in cli tool #589

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

cakerug
Copy link

@cakerug cakerug commented Sep 25, 2024

fixes #579

Copy link

vercel bot commented Sep 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
pgtyped ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 4:50pm

@@ -77,14 +77,14 @@ async function main(
const transformTask = async (transform: TransformConfig) => {
if (transform.mode === 'ts-implicit') {
const transformer = new TypedSqlTagTransformer(pool, config, transform);
return transformer.start(isWatchMode);
return transformer.start(isWatchMode, fileOverride);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this and this change actually breaks b/c this transformer doesn't support fileOverride.

Also, we should make the globSync take absolute: true because right now it confusingly matches against the {srcDir}/file/path/filename.sql. And update the --help.

Anyway, since there seems like there isn't really movement on these PRs, going to abandon this and maybe someone can pick it up if things change with the project.

} else {
const transformer = new TypescriptAndSqlTransformer(
pool,
config,
transform,
);
return transformer.start(isWatchMode);
return transformer.start(isWatchMode, fileOverride);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this path works and was what I tested previously

@cakerug cakerug marked this pull request as draft December 16, 2024 18:51
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.

--file flag ignored (possible Windows issue?)
1 participant