-
Notifications
You must be signed in to change notification settings - Fork 57
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
refactor: use OpenAPI file path for generator instead of stdin & modernize generator-cli #3214
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3214 +/- ##
=======================================
Coverage 86.89% 86.89%
=======================================
Files 115 115
Lines 8300 8287 -13
Branches 1269 1269
=======================================
- Hits 7212 7201 -11
+ Misses 1074 1072 -2
Partials 14 14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
# Conflicts: # package-lock.json # packages/ts/generator-cli/package.json
# Conflicts: # package-lock.json # packages/ts/generator-cli/package.json
# Conflicts: # package-lock.json # packages/ts/generator-cli/package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a little doubt about packages/ts/generator-cli/test/fixtures/version.snap
packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/GeneratorProcessor.java
Outdated
Show resolved
Hide resolved
# Conflicts: # package-lock.json # packages/ts/generator-cli/package.json
|
This pull request includes significant updates to both the Java and TypeScript codebases, focusing on improving the
GeneratorProcessor
andGeneratorIO
functionalities. The most important changes include the use of direct read of an OpenAPI file instead of copying it to stdin, refactoring the TypeScript generator CLI to use URLs, and updating the test suite to reflect these changes.Java Changes:
packages/java/engine-core/src/main/java/com/vaadin/hilla/engine/GeneratorProcessor.java
)TypeScript Changes:
GeneratorIO Refactoring:
GeneratorIO
to useURL
instead of string paths for file operations. (packages/ts/generator-cli/src/GeneratorIO.ts
) [1] [2]CLI Improvements:
parseArgs
for argument parsing and removedmeow
. (packages/ts/generator-cli/src/index.ts
)processInput
utility function and updated the CLI to accept the input file path to read it directly. (packages/ts/generator-cli/src/index.ts
)Testing Enhancements:
GeneratorIO
and added new tests for the CLI. (packages/ts/generator-cli/test/GeneratorIO.spec.ts
,packages/ts/generator-cli/test/cli.spec.ts
) [1] [2]packages/ts/generator-cli/test/TestPlugin.ts
)