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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

}
};

Expand Down