From 7a904167de52722c02584fb581919fb79dd3818f Mon Sep 17 00:00:00 2001 From: Adam DiCarlo Date: Wed, 30 Jul 2025 11:57:38 +0200 Subject: [PATCH] Move examples into the `cli` directory --- .github/workflows/ci.yaml | 2 +- {example => cli/example}/MarioPartyStats.json | 0 {example => cli/example}/additional-properties.yaml | 0 {example => cli/example}/amadeus-airline-lookup.json | 0 {example => cli/example}/amadeus-swagger.json | 0 {example => cli/example}/anyOfEnums.yaml | 0 {example => cli/example}/bimcloud-api.json | 0 {example => cli/example}/binary-response.yaml | 0 .../example}/db-fahrplan-api-specification.yaml | 0 {example => cli/example}/elm.json | 0 {example => cli/example}/get-it-done.json | 0 {example => cli/example}/github-spec.json | 0 {example => cli/example}/nullable-enum.yaml | 0 .../example}/overriding-global-security-override.yaml | 0 {example => cli/example}/overriding-global-security.yaml | 0 {example => cli/example}/patreon.json | 0 {example => cli/example}/realworld-conduit.yaml | 0 {example => cli/example}/recursive-allof-refs.yaml | 0 {example => cli/example}/single-enum.yaml | 0 {example => cli/example}/src/Example.elm | 0 {example => cli/example}/trustmark-trade-check.json | 0 {example => cli/example}/trustmark.json | 0 {example => cli/example}/viaggiatreno.yaml | 0 {src => cli/src}/TestGenScript.elm | 1 + elm.json | 3 ++- package.json | 2 +- review/suppressed/NoUnused.Exports.json | 8 ++++++++ 27 files changed, 13 insertions(+), 3 deletions(-) rename {example => cli/example}/MarioPartyStats.json (100%) rename {example => cli/example}/additional-properties.yaml (100%) rename {example => cli/example}/amadeus-airline-lookup.json (100%) rename {example => cli/example}/amadeus-swagger.json (100%) rename {example => cli/example}/anyOfEnums.yaml (100%) rename {example => cli/example}/bimcloud-api.json (100%) rename {example => cli/example}/binary-response.yaml (100%) rename {example => cli/example}/db-fahrplan-api-specification.yaml (100%) rename {example => cli/example}/elm.json (100%) rename {example => cli/example}/get-it-done.json (100%) rename {example => cli/example}/github-spec.json (100%) rename {example => cli/example}/nullable-enum.yaml (100%) rename {example => cli/example}/overriding-global-security-override.yaml (100%) rename {example => cli/example}/overriding-global-security.yaml (100%) rename {example => cli/example}/patreon.json (100%) rename {example => cli/example}/realworld-conduit.yaml (100%) rename {example => cli/example}/recursive-allof-refs.yaml (100%) rename {example => cli/example}/single-enum.yaml (100%) rename {example => cli/example}/src/Example.elm (100%) rename {example => cli/example}/trustmark-trade-check.json (100%) rename {example => cli/example}/trustmark.json (100%) rename {example => cli/example}/viaggiatreno.yaml (100%) rename {src => cli/src}/TestGenScript.elm (99%) create mode 100644 review/suppressed/NoUnused.Exports.json diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 75772ffa..b0d292f1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -124,7 +124,7 @@ jobs: echo '```diff' > diff.md diff --ignore-all-space --minimal --new-file --recursive \ main/generated \ - branch/generated | dd bs=1024 count=30 >> diff.md || true # We ignore diff exiting with a 1 + branch/cli/generated | dd bs=1024 count=30 >> diff.md || true # We ignore diff exiting with a 1 echo -e '\n```' >> diff.md - name: Post a comment with the diff diff --git a/example/MarioPartyStats.json b/cli/example/MarioPartyStats.json similarity index 100% rename from example/MarioPartyStats.json rename to cli/example/MarioPartyStats.json diff --git a/example/additional-properties.yaml b/cli/example/additional-properties.yaml similarity index 100% rename from example/additional-properties.yaml rename to cli/example/additional-properties.yaml diff --git a/example/amadeus-airline-lookup.json b/cli/example/amadeus-airline-lookup.json similarity index 100% rename from example/amadeus-airline-lookup.json rename to cli/example/amadeus-airline-lookup.json diff --git a/example/amadeus-swagger.json b/cli/example/amadeus-swagger.json similarity index 100% rename from example/amadeus-swagger.json rename to cli/example/amadeus-swagger.json diff --git a/example/anyOfEnums.yaml b/cli/example/anyOfEnums.yaml similarity index 100% rename from example/anyOfEnums.yaml rename to cli/example/anyOfEnums.yaml diff --git a/example/bimcloud-api.json b/cli/example/bimcloud-api.json similarity index 100% rename from example/bimcloud-api.json rename to cli/example/bimcloud-api.json diff --git a/example/binary-response.yaml b/cli/example/binary-response.yaml similarity index 100% rename from example/binary-response.yaml rename to cli/example/binary-response.yaml diff --git a/example/db-fahrplan-api-specification.yaml b/cli/example/db-fahrplan-api-specification.yaml similarity index 100% rename from example/db-fahrplan-api-specification.yaml rename to cli/example/db-fahrplan-api-specification.yaml diff --git a/example/elm.json b/cli/example/elm.json similarity index 100% rename from example/elm.json rename to cli/example/elm.json diff --git a/example/get-it-done.json b/cli/example/get-it-done.json similarity index 100% rename from example/get-it-done.json rename to cli/example/get-it-done.json diff --git a/example/github-spec.json b/cli/example/github-spec.json similarity index 100% rename from example/github-spec.json rename to cli/example/github-spec.json diff --git a/example/nullable-enum.yaml b/cli/example/nullable-enum.yaml similarity index 100% rename from example/nullable-enum.yaml rename to cli/example/nullable-enum.yaml diff --git a/example/overriding-global-security-override.yaml b/cli/example/overriding-global-security-override.yaml similarity index 100% rename from example/overriding-global-security-override.yaml rename to cli/example/overriding-global-security-override.yaml diff --git a/example/overriding-global-security.yaml b/cli/example/overriding-global-security.yaml similarity index 100% rename from example/overriding-global-security.yaml rename to cli/example/overriding-global-security.yaml diff --git a/example/patreon.json b/cli/example/patreon.json similarity index 100% rename from example/patreon.json rename to cli/example/patreon.json diff --git a/example/realworld-conduit.yaml b/cli/example/realworld-conduit.yaml similarity index 100% rename from example/realworld-conduit.yaml rename to cli/example/realworld-conduit.yaml diff --git a/example/recursive-allof-refs.yaml b/cli/example/recursive-allof-refs.yaml similarity index 100% rename from example/recursive-allof-refs.yaml rename to cli/example/recursive-allof-refs.yaml diff --git a/example/single-enum.yaml b/cli/example/single-enum.yaml similarity index 100% rename from example/single-enum.yaml rename to cli/example/single-enum.yaml diff --git a/example/src/Example.elm b/cli/example/src/Example.elm similarity index 100% rename from example/src/Example.elm rename to cli/example/src/Example.elm diff --git a/example/trustmark-trade-check.json b/cli/example/trustmark-trade-check.json similarity index 100% rename from example/trustmark-trade-check.json rename to cli/example/trustmark-trade-check.json diff --git a/example/trustmark.json b/cli/example/trustmark.json similarity index 100% rename from example/trustmark.json rename to cli/example/trustmark.json diff --git a/example/viaggiatreno.yaml b/cli/example/viaggiatreno.yaml similarity index 100% rename from example/viaggiatreno.yaml rename to cli/example/viaggiatreno.yaml diff --git a/src/TestGenScript.elm b/cli/src/TestGenScript.elm similarity index 99% rename from src/TestGenScript.elm rename to cli/src/TestGenScript.elm index 351e8917..4394f051 100644 --- a/src/TestGenScript.elm +++ b/cli/src/TestGenScript.elm @@ -116,4 +116,5 @@ run = , Pages.Script.exec "sh" [ "-c", "cd example && npx --no -- elm make src/Example.elm --output=/dev/null" ] ] + |> BackendTask.inDir "cli" ) diff --git a/elm.json b/elm.json index 6c9c9ab6..32ebe9c6 100644 --- a/elm.json +++ b/elm.json @@ -2,7 +2,8 @@ "type": "application", "source-directories": [ "src", - "codegen" + "codegen", + "cli/src" ], "elm-version": "0.19.1", "dependencies": { diff --git a/package.json b/package.json index aa477679..c4a6b11c 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "review:watch": "elm-review --watch --fix", "format": "elm-format src tests --validate", "test": "elm-test", - "test:gen": "elm-pages run src/TestGenScript.elm", + "test:gen": "elm-pages run cli/src/TestGenScript.elm", "test:watch": "elm-test --watch", "pub": "npm run build && npm publish" }, diff --git a/review/suppressed/NoUnused.Exports.json b/review/suppressed/NoUnused.Exports.json new file mode 100644 index 00000000..437eb4de --- /dev/null +++ b/review/suppressed/NoUnused.Exports.json @@ -0,0 +1,8 @@ +{ + "version": 1, + "automatically created by": "elm-review suppress", + "learn more": "elm-review suppress --help", + "suppressions": [ + { "count": 1, "filePath": "cli/src/TestGenScript.elm" } + ] +}