Closed dethell closed 3 weeks ago
Latest commit: bc90107e5ba19f64ca0abfb6eab8b2d1df9e014c
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
src/typescript-generator/code-generator.ts | 55 | 60 | 91.67% | ||
src/server/app.ts | 0 | 25 | 0.0% | ||
<!-- | Total: | 88 | 118 | 74.58% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
src/typescript-generator/repository.js | 4 | 94.14% | ||
<!-- | Total: | 4 | --> |
Totals | |
---|---|
Change from base Build 8994262780: | -0.3% |
Covered Lines: | 3089 |
Relevant Lines: | 3594 |
Updates the start script, server files and typescript-generator to add new command-line arguments:
--repl
: Indicates REPL should be started--serve
: Indicates http server should be started--generate
: Indicates types and routes should be generated.--generate-routes
: Only generate the endpoint routes--generate-types
: Only generate the TS components and types--watch
: Starts the source file watcher for watching the OpenApi doc for changes and for watching the route and context implementations for changes (implies--generate
)--watch-routes
: Only watch for changes in the route files (implies--generate-routes
)--watch-types
: Only watch for changes in the types from the OpenApi spec (implies--generate-types
)This PR also adds the shorthand equivalents of the different options so that they can be used in a combined manner, e.g., for only watch + serve + repl:
npx counterfact mySpec.yml output-dir -wsr
These changes allow new use cases such as: