-
Notifications
You must be signed in to change notification settings - Fork 9
Move codegen api to separate package #201
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
Move codegen api to separate package #201
Conversation
codegen/elm.codegen.json
Outdated
| "elm-community/json-extra": "4.3.0", | ||
| "elm/url": "1.0.0", | ||
| "dillonkearns/elm-pages": "10.1.0", | ||
| "dillonkearns/elm-pages": "10.2.2", |
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.
This and similar upgrades were necessary for the example-using-api project to be able to compile.
|
TODO:
|
78c0ac4 to
e80b96a
Compare
| pkgs.elmPackages.elm-review | ||
| pkgs.nodejs-18_x | ||
| pkgs.nodejs_20 |
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.
Upgraded this to match the node version used in CI.
Now CI is using the Nix shell, so this dictates the Node version everywhere.
| ] | ||
| } | ||
| } | ||
| } |
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.
NB: This file moved to the elm-open-api-codegen/ folder
| @@ -0,0 +1,906 @@ | |||
| module OpenApi.BackendTask exposing (withConfig) | |||
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.
This code comes from the old Cli module.
|
|
||
| Cli.Validate.Invalid _ -> | ||
| False | ||
| regexToCheckIfJson mediaType |
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.
Changed these functions to not need the Cli module, since this is now in an Elm package.
| "elm-explorations/test": "2.2.0", | ||
| "miniBill/elm-unicode": "1.1.1" | ||
| }, | ||
| "direct": {}, |
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.
Test suite has moved into the package (elm-open-api-codegen) subfolder
| }, | ||
| "defaultStatus": ["⏳", "S"] | ||
| } | ||
| ] |
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.
this run-pty config is for npm run review:watch
| "wolfadex/elm-ansi": "3.0.0", | ||
| "wolfadex/elm-open-api": "2.0.0" | ||
| "elmcraft/core-extra": "2.2.0", | ||
| "wolfadex/elm-open-api-codegen": "1.0.0", |
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.
This package is not published yet, so this elm.json file cannot work as-is. The TEMP HACK blocks in the CI workflow work around this (with the same method I used to work around it locally).
|
Superceded by #214 |
Sorry... it's a huge PR! But most of the diff is
Genmodules (so, so many)It includes some new scripts, which must be used to test things locally until the new package is published.
After cloning, this series of commands should (in theory) just work:
Slightly tangential changes:
shell.nix, rather than installing duplicates vianpm, to remove the need to keep them in sync (I probably wouldn't have tried it if I'd realized how much work CI would be, lol)shell.nixin CI, as well (this requires quite a bit of boilerplate to make caching work, without using something like devbox directly)test,review,formatbecause the project structure has changed so muchcc @miniBill