Invoking the CLI with --print doesn't actually print the generated output file to the terminal.
Identified cause
I believe the issue is that Cli.generate is not propagating options.print to the underlying await generator.generate({ ... }) call, meaning the generator is always receiving print: undefined regardless of what was specified on the command line:
Problem description
Invoking the CLI with
--print
doesn't actually print the generated output file to the terminal.Identified cause
I believe the issue is that
Cli.generate
is not propagatingoptions.print
to the underlyingawait generator.generate({ ... })
call, meaning the generator is always receivingprint: undefined
regardless of what was specified on the command line:https://github.com/RobinBlomberg/kysely-codegen/blob/be70e2556d9e80313b693288f9328a113458e290/src/cli/cli.ts#L82-L94
Proposed fix
Assuming that's the case, the fix should be as simple as adding
print: options.print
to the function call above.Upvote & Fund