diff --git a/.elm-pages/compiled-ports/custom-backend-task.mjs b/.elm-pages/compiled-ports/custom-backend-task.mjs deleted file mode 100644 index e69de29b..00000000 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 75772ffa..e0f4f05e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,10 +12,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Use Node.js 20 - uses: actions/setup-node@v4 - with: - node-version: 20 + + - uses: DeterminateSystems/determinate-nix-action@v3 # Re-use node_modules between runs until package-lock.json changes. - name: Cache node_modules @@ -26,27 +24,102 @@ jobs: key: node_modules-${{ hashFiles('package-lock.json') }} # Re-use ~/.elm between runs until elm.json or review/elm.json changes. - # The Elm compiler saves downloaded Elm packages to ~/.elm saves - # downloaded tool executables there. + # The Elm compiler saves downloaded Elm packages to ~/.elm - name: Cache ~/.elm uses: actions/cache@v4 with: path: ~/.elm - key: elm-${{ hashFiles('elm.json', 'review/elm.json') }} + key: | + elm-${{ hashFiles( + 'elm.json', + 'review/elm.json', + 'elm-open-api-codegen/elm.json', + 'elm-open-api-codegen/review/elm.json' + )}} + + # Caching based on https://github.com/jetify-com/devbox-install-action/blob/main/action.yml + - name: Workaround nix store cache permission issue + shell: bash + run: | + if [ "$RUNNER_OS" == "macOS" ]; then + gtar_path=$(which gtar) + sudo mv $gtar_path $gtar_path.orig + echo "#!/bin/sh" >> $gtar_path + echo "exec sudo $gtar_path.orig \"\$@\"" >> $gtar_path + sudo chmod +x $gtar_path + elif [ "$RUNNER_OS" == "Linux" ]; then + mkdir -p ~/.cache + mkdir -p ~/.local/bin + echo "#!/bin/sh" >> ~/.local/bin/tar + echo 'exec sudo /usr/bin/tar "$@"' >> ~/.local/bin/tar + sudo chmod +x ~/.local/bin/tar + fi + - name: Mount nix store cache + id: cache-nix-store + uses: actions/cache/restore@v4 + with: + path: | + ~/.cache/devbox + ~/.cache/nix + ~/.local/state/nix + ~/.nix-defexpr + ~/.nix-profile + /nix/store + /nix/var/nix + key: nix-store-${{ hashFiles('shell.nix', 'flake.lock') }} + + - name: Build devShell to populate Nix store + run: nix develop -c echo devShell built + + - name: Save nix store cache + if: steps.cache-nix-store.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: | + ~/.cache/nix + ~/.local/state/nix + ~/.nix-defexpr + ~/.nix-profile + /nix/store + /nix/var/nix + key: nix-store-${{ hashFiles('shell.nix', 'flake.lock') }} + - name: Restore tar command + shell: bash + run: | + if [ "$RUNNER_OS" == "macOS" ]; then + gtar_path=$(which gtar) + sudo mv $gtar_path.orig $gtar_path + elif [ "$RUNNER_OS" == "Linux" ]; then + rm ~/.local/bin/tar + fi + # END of Nix store caching # Install npm packages, unless we restored them from cache. # Since `npm ci` removes the node_modules folder before running it’s # important to skip this step if cache was restored. - name: npm ci if: steps.cache-node_modules.outputs.cache-hit != 'true' - run: npm ci + run: nix develop --command npm ci + + # TEMPORARY UNTIL elm-open-api-codegen IS PUBLISHED + - name: TEMP HACK + run: nix develop --command npm run link-local-package - name: Format - run: npm run format + run: nix develop --command npm run format + - name: Review - run: npm run review + run: nix develop --command npm run review + - name: Test - run: npm run test + run: nix develop --command npm run test + + - name: Build + run: nix develop --command npm run build + + # TEMPORARY UNTIL elm-open-api-codegen IS PUBLISHED + - name: TEMP HACK + run: nix develop --command npm run unlink-local-package diff-generation: permissions: @@ -54,11 +127,6 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - name: Use Node.js 20 - uses: actions/setup-node@v4 - with: - node-version: 20 - - name: Checkout branch uses: actions/checkout@v4 with: @@ -70,6 +138,16 @@ jobs: ref: main path: main + - uses: DeterminateSystems/determinate-nix-action@v3 + + - name: Build devShell (branch) + run: nix develop -c echo devShell built + working-directory: branch + + - name: Build devShell (main) + run: nix develop -c echo devShell built + working-directory: main + # Re-use node_modules between runs until package-lock.json changes. - name: Cache node_modules (branch) id: cache-node_modules-branch @@ -87,13 +165,22 @@ jobs: key: node_modules-${{ hashFiles('main/package-lock.json') }} # Re-use ~/.elm between runs until elm.json or review/elm.json changes. - # The Elm compiler saves downloaded Elm packages to ~/.elm saves - # downloaded tool executables there. + # The Elm compiler saves downloaded Elm packages to ~/.elm. - name: Cache ~/.elm (both) uses: actions/cache@v4 with: path: ~/.elm - key: elm-${{ hashFiles('main/elm.json', 'main/review/elm.json', 'branch/elm.json', 'branch/review/elm.json') }} + key: | + elm-${{ hashFiles( + 'main/elm.json', + 'main/review/elm.json', + 'main/elm-open-api-codegen/elm.json', + 'main/elm-open-api-codegen/review/elm.json', + 'branch/elm.json', + 'branch/review/elm.json', + 'branch/elm-open-api-codegen/elm.json', + 'branch/elm-open-api-codegen/review/elm.json' + )}} # Install npm packages, unless we restored them from cache. # Since `npm ci` removes the node_modules folder before running it’s @@ -101,7 +188,7 @@ jobs: - name: npm ci (branch) if: steps.cache-node_modules-branch.outputs.cache-hit != 'true' working-directory: branch - run: npm ci + run: nix develop --command npm ci # Install npm packages, unless we restored them from cache. # Since `npm ci` removes the node_modules folder before running it’s @@ -109,15 +196,25 @@ jobs: - name: npm ci (main) if: steps.cache-node_modules-main.outputs.cache-hit != 'true' working-directory: main - run: npm ci + run: nix develop --command npm ci + # TEMPORARY UNTIL elm-open-api-codegen IS PUBLISHED + - name: TEMP HACK + run: nix develop --command npm run link-local-package + working-directory: branch + - name: Generate (branch) working-directory: branch - run: npm run test:gen + run: nix develop --command npm run test:gen - name: Generate (main) working-directory: main - run: npm run test:gen || true # We don't want to block on main failing to generate + run: nix develop --command npm run test:gen || true # We don't want to block on main failing to generate + + # TEMPORARY UNTIL elm-open-api-codegen IS PUBLISHED + - name: TEMP HACK + run: nix develop --command npm run unlink-local-package + working-directory: branch - name: Diff the outputs run: | diff --git a/.gitignore b/.gitignore index a0ccf0cb..dc58055d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # Elm +.elm-pages elm-stuff # JavaScript diff --git a/codegen/Gen/ApiRoute.elm b/codegen/Gen/ApiRoute.elm deleted file mode 100644 index 1d2e658b..00000000 --- a/codegen/Gen/ApiRoute.elm +++ /dev/null @@ -1,1366 +0,0 @@ -module Gen.ApiRoute exposing - ( moduleName_, single, preRender, serverRender, preRenderWithFallback, capture - , literal, slash, succeed, withGlobalHeadTags, toJson, getBuildTimeRoutes, getGlobalHeadTagsBackendTask - , annotation_, call_, values_ - ) - -{-| -# Generated bindings for ApiRoute - -@docs moduleName_, single, preRender, serverRender, preRenderWithFallback, capture -@docs literal, slash, succeed, withGlobalHeadTags, toJson, getBuildTimeRoutes -@docs getGlobalHeadTagsBackendTask, annotation_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "ApiRoute" ] - - -{-| Same as [`preRender`](#preRender), but for an ApiRoute that has no dynamic segments. This is just a bit simpler because -since there are no dynamic segments, you don't need to provide a BackendTask with the list of dynamic segments to pre-render because there is only a single possible route. - -single: - ApiRoute.ApiRouteBuilder (BackendTask.BackendTask FatalError.FatalError String) (List String) - -> ApiRoute.ApiRoute ApiRoute.Response --} -single : Elm.Expression -> Elm.Expression -single singleArg_ = - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "single" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.string - ] - , Type.list Type.string - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith [ "ApiRoute" ] "Response" [] ] - ) - ) - } - ) - [ singleArg_ ] - - -{-| Pre-render files for a given route pattern statically at build-time. If you only need to serve a single file, you can use [`single`](#single) instead. - - import ApiRoute - import BackendTask - import BackendTask.Http - import Json.Decode as Decode - import Json.Encode as Encode - - starsApi : ApiRoute ApiRoute.Response - starsApi = - ApiRoute.succeed - (\user repoName -> - BackendTask.Http.getJson - ("https://api.github.com/repos/" ++ user ++ "/" ++ repoName) - (Decode.field "stargazers_count" Decode.int) - |> BackendTask.allowFatal - |> BackendTask.map - (\stars -> - Encode.object - [ ( "repo", Encode.string repoName ) - , ( "stars", Encode.int stars ) - ] - |> Encode.encode 2 - ) - ) - |> ApiRoute.literal "repo" - |> ApiRoute.slash - |> ApiRoute.capture - |> ApiRoute.slash - |> ApiRoute.capture - |> ApiRoute.slash - |> ApiRoute.literal ".json" - |> ApiRoute.preRender - (\route -> - BackendTask.succeed - [ route "dillonkearns" "elm-graphql" - , route "dillonkearns" "elm-pages" - ] - ) - -You can view these files in the dev server at , and when you run `elm-pages build` this will result in the following files being generated: - - - `dist/repo/dillonkearns/elm-graphql.json` - - `dist/repo/dillonkearns/elm-pages.json` - -Note: `dist` is the output folder for `elm-pages build`, so this will be accessible in your hosted site at `/repo/dillonkearns/elm-graphql.json` and `/repo/dillonkearns/elm-pages.json`. - -preRender: - (constructor - -> BackendTask.BackendTask FatalError.FatalError (List (List String))) - -> ApiRoute.ApiRouteBuilder (BackendTask.BackendTask FatalError.FatalError String) constructor - -> ApiRoute.ApiRoute ApiRoute.Response --} -preRender : - (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -preRender preRenderArg_ preRenderArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "preRender" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "constructor" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.list (Type.list Type.string) - ] - ) - , Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.string - ] - , Type.var "constructor" - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith [ "ApiRoute" ] "Response" [] ] - ) - ) - } - ) - [ Elm.functionReduced "preRenderUnpack" preRenderArg_, preRenderArg_0 ] - - -{-| serverRender: - ApiRoute.ApiRouteBuilder (Server.Request.Request - -> BackendTask.BackendTask FatalError.FatalError (Server.Response.Response Basics.Never Basics.Never)) constructor - -> ApiRoute.ApiRoute ApiRoute.Response --} -serverRender : Elm.Expression -> Elm.Expression -serverRender serverRenderArg_ = - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "serverRender" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.function - [ Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.namedWith - [ "Basics" ] - "Never" - [] - , Type.namedWith - [ "Basics" ] - "Never" - [] - ] - ] - ) - , Type.var "constructor" - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith [ "ApiRoute" ] "Response" [] ] - ) - ) - } - ) - [ serverRenderArg_ ] - - -{-| preRenderWithFallback: - (constructor - -> BackendTask.BackendTask FatalError.FatalError (List (List String))) - -> ApiRoute.ApiRouteBuilder (BackendTask.BackendTask FatalError.FatalError (Server.Response.Response Basics.Never Basics.Never)) constructor - -> ApiRoute.ApiRoute ApiRoute.Response --} -preRenderWithFallback : - (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -preRenderWithFallback preRenderWithFallbackArg_ preRenderWithFallbackArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "preRenderWithFallback" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "constructor" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.list (Type.list Type.string) - ] - ) - , Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.namedWith [ "Basics" ] "Never" [] - , Type.namedWith [ "Basics" ] "Never" [] - ] - ] - , Type.var "constructor" - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith [ "ApiRoute" ] "Response" [] ] - ) - ) - } - ) - [ Elm.functionReduced - "preRenderWithFallbackUnpack" - preRenderWithFallbackArg_ - , preRenderWithFallbackArg_0 - ] - - -{-| Captures a dynamic segment from the route. - -capture: - ApiRoute.ApiRouteBuilder (String -> a) constructor - -> ApiRoute.ApiRouteBuilder a (String -> constructor) --} -capture : Elm.Expression -> Elm.Expression -capture captureArg_ = - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "capture" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.function [ Type.string ] (Type.var "a") - , Type.var "constructor" - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a" - , Type.function - [ Type.string ] - (Type.var "constructor") - ] - ) - ) - } - ) - [ captureArg_ ] - - -{-| A literal String segment of a route. - -literal: - String - -> ApiRoute.ApiRouteBuilder a constructor - -> ApiRoute.ApiRouteBuilder a constructor --} -literal : String -> Elm.Expression -> Elm.Expression -literal literalArg_ literalArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "literal" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.var "constructor" ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.var "constructor" ] - ) - ) - } - ) - [ Elm.string literalArg_, literalArg_0 ] - - -{-| A path separator within the route. - -slash: ApiRoute.ApiRouteBuilder a constructor -> ApiRoute.ApiRouteBuilder a constructor --} -slash : Elm.Expression -> Elm.Expression -slash slashArg_ = - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "slash" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.var "constructor" ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.var "constructor" ] - ) - ) - } - ) - [ slashArg_ ] - - -{-| Starts the definition of a route with any captured segments. - -succeed: a -> ApiRoute.ApiRouteBuilder a (List String) --} -succeed : Elm.Expression -> Elm.Expression -succeed succeedArg_ = - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "succeed" - , annotation = - Just - (Type.function - [ Type.var "a" ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.list Type.string ] - ) - ) - } - ) - [ succeedArg_ ] - - -{-| Include head tags on every page's HTML. - -withGlobalHeadTags: - BackendTask.BackendTask FatalError.FatalError (List Head.Tag) - -> ApiRoute.ApiRoute response - -> ApiRoute.ApiRoute response --} -withGlobalHeadTags : Elm.Expression -> Elm.Expression -> Elm.Expression -withGlobalHeadTags withGlobalHeadTagsArg_ withGlobalHeadTagsArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "withGlobalHeadTags" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.list (Type.namedWith [ "Head" ] "Tag" []) - ] - , Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ) - ) - } - ) - [ withGlobalHeadTagsArg_, withGlobalHeadTagsArg_0 ] - - -{-| Turn the route into a pattern in JSON format. For internal uses. - -toJson: ApiRoute.ApiRoute response -> Json.Encode.Value --} -toJson : Elm.Expression -> Elm.Expression -toJson toJsonArg_ = - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "toJson" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ] - (Type.namedWith [ "Json", "Encode" ] "Value" []) - ) - } - ) - [ toJsonArg_ ] - - -{-| For internal use by generated code. Not so useful in user-land. - -getBuildTimeRoutes: - ApiRoute.ApiRoute response - -> BackendTask.BackendTask FatalError.FatalError (List String) --} -getBuildTimeRoutes : Elm.Expression -> Elm.Expression -getBuildTimeRoutes getBuildTimeRoutesArg_ = - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "getBuildTimeRoutes" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.list Type.string - ] - ) - ) - } - ) - [ getBuildTimeRoutesArg_ ] - - -{-| For internal use. - -getGlobalHeadTagsBackendTask: - ApiRoute.ApiRoute response - -> Maybe (BackendTask.BackendTask FatalError.FatalError (List Head.Tag)) --} -getGlobalHeadTagsBackendTask : Elm.Expression -> Elm.Expression -getGlobalHeadTagsBackendTask getGlobalHeadTagsBackendTaskArg_ = - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "getGlobalHeadTagsBackendTask" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ] - (Type.maybe - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.list - (Type.namedWith [ "Head" ] "Tag" []) - ] - ) - ) - ) - } - ) - [ getGlobalHeadTagsBackendTaskArg_ ] - - -annotation_ : - { apiRoute : Type.Annotation -> Type.Annotation - , apiRouteBuilder : Type.Annotation -> Type.Annotation -> Type.Annotation - , response : Type.Annotation - } -annotation_ = - { apiRoute = - \apiRouteArg0 -> - Type.alias - moduleName_ - "ApiRoute" - [ apiRouteArg0 ] - (Type.namedWith - [ "Internal", "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ) - , apiRouteBuilder = - \apiRouteBuilderArg0 apiRouteBuilderArg1 -> - Type.alias - moduleName_ - "ApiRouteBuilder" - [ apiRouteBuilderArg0, apiRouteBuilderArg1 ] - (Type.namedWith - [ "Internal", "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.var "constructor" ] - ) - , response = - Type.alias - moduleName_ - "Response" - [] - (Type.namedWith [ "Json", "Encode" ] "Value" []) - } - - -call_ : - { single : Elm.Expression -> Elm.Expression - , preRender : Elm.Expression -> Elm.Expression -> Elm.Expression - , serverRender : Elm.Expression -> Elm.Expression - , preRenderWithFallback : Elm.Expression -> Elm.Expression -> Elm.Expression - , capture : Elm.Expression -> Elm.Expression - , literal : Elm.Expression -> Elm.Expression -> Elm.Expression - , slash : Elm.Expression -> Elm.Expression - , succeed : Elm.Expression -> Elm.Expression - , withGlobalHeadTags : Elm.Expression -> Elm.Expression -> Elm.Expression - , toJson : Elm.Expression -> Elm.Expression - , getBuildTimeRoutes : Elm.Expression -> Elm.Expression - , getGlobalHeadTagsBackendTask : Elm.Expression -> Elm.Expression - } -call_ = - { single = - \singleArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "single" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.string - ] - , Type.list Type.string - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith - [ "ApiRoute" ] - "Response" - [] - ] - ) - ) - } - ) - [ singleArg_ ] - , preRender = - \preRenderArg_ preRenderArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "preRender" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "constructor" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.list (Type.list Type.string) - ] - ) - , Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.string - ] - , Type.var "constructor" - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith - [ "ApiRoute" ] - "Response" - [] - ] - ) - ) - } - ) - [ preRenderArg_, preRenderArg_0 ] - , serverRender = - \serverRenderArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "serverRender" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.function - [ Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.namedWith - [ "Basics" ] - "Never" - [] - , Type.namedWith - [ "Basics" ] - "Never" - [] - ] - ] - ) - , Type.var "constructor" - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith - [ "ApiRoute" ] - "Response" - [] - ] - ) - ) - } - ) - [ serverRenderArg_ ] - , preRenderWithFallback = - \preRenderWithFallbackArg_ preRenderWithFallbackArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "preRenderWithFallback" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "constructor" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.list (Type.list Type.string) - ] - ) - , Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.namedWith - [ "Basics" ] - "Never" - [] - , Type.namedWith - [ "Basics" ] - "Never" - [] - ] - ] - , Type.var "constructor" - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith - [ "ApiRoute" ] - "Response" - [] - ] - ) - ) - } - ) - [ preRenderWithFallbackArg_, preRenderWithFallbackArg_0 ] - , capture = - \captureArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "capture" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.function - [ Type.string ] - (Type.var "a") - , Type.var "constructor" - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a" - , Type.function - [ Type.string ] - (Type.var "constructor") - ] - ) - ) - } - ) - [ captureArg_ ] - , literal = - \literalArg_ literalArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "literal" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.var "constructor" ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.var "constructor" ] - ) - ) - } - ) - [ literalArg_, literalArg_0 ] - , slash = - \slashArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "slash" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.var "constructor" ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.var "constructor" ] - ) - ) - } - ) - [ slashArg_ ] - , succeed = - \succeedArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "succeed" - , annotation = - Just - (Type.function - [ Type.var "a" ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.list Type.string ] - ) - ) - } - ) - [ succeedArg_ ] - , withGlobalHeadTags = - \withGlobalHeadTagsArg_ withGlobalHeadTagsArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "withGlobalHeadTags" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.list - (Type.namedWith [ "Head" ] "Tag" []) - ] - , Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ) - ) - } - ) - [ withGlobalHeadTagsArg_, withGlobalHeadTagsArg_0 ] - , toJson = - \toJsonArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "toJson" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ] - (Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - ) - ) - } - ) - [ toJsonArg_ ] - , getBuildTimeRoutes = - \getBuildTimeRoutesArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "getBuildTimeRoutes" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.list Type.string - ] - ) - ) - } - ) - [ getBuildTimeRoutesArg_ ] - , getGlobalHeadTagsBackendTask = - \getGlobalHeadTagsBackendTaskArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "ApiRoute" ] - , name = "getGlobalHeadTagsBackendTask" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ] - (Type.maybe - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.list - (Type.namedWith - [ "Head" ] - "Tag" - [] - ) - ] - ) - ) - ) - } - ) - [ getGlobalHeadTagsBackendTaskArg_ ] - } - - -values_ : - { single : Elm.Expression - , preRender : Elm.Expression - , serverRender : Elm.Expression - , preRenderWithFallback : Elm.Expression - , capture : Elm.Expression - , literal : Elm.Expression - , slash : Elm.Expression - , succeed : Elm.Expression - , withGlobalHeadTags : Elm.Expression - , toJson : Elm.Expression - , getBuildTimeRoutes : Elm.Expression - , getGlobalHeadTagsBackendTask : Elm.Expression - } -values_ = - { single = - Elm.value - { importFrom = [ "ApiRoute" ] - , name = "single" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.string - ] - , Type.list Type.string - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith [ "ApiRoute" ] "Response" [] ] - ) - ) - } - , preRender = - Elm.value - { importFrom = [ "ApiRoute" ] - , name = "preRender" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "constructor" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.list (Type.list Type.string) - ] - ) - , Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.string - ] - , Type.var "constructor" - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith [ "ApiRoute" ] "Response" [] ] - ) - ) - } - , serverRender = - Elm.value - { importFrom = [ "ApiRoute" ] - , name = "serverRender" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.function - [ Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.namedWith - [ "Basics" ] - "Never" - [] - , Type.namedWith - [ "Basics" ] - "Never" - [] - ] - ] - ) - , Type.var "constructor" - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith [ "ApiRoute" ] "Response" [] ] - ) - ) - } - , preRenderWithFallback = - Elm.value - { importFrom = [ "ApiRoute" ] - , name = "preRenderWithFallback" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "constructor" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.list (Type.list Type.string) - ] - ) - , Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.namedWith [ "Basics" ] "Never" [] - , Type.namedWith [ "Basics" ] "Never" [] - ] - ] - , Type.var "constructor" - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith [ "ApiRoute" ] "Response" [] ] - ) - ) - } - , capture = - Elm.value - { importFrom = [ "ApiRoute" ] - , name = "capture" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.function [ Type.string ] (Type.var "a") - , Type.var "constructor" - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a" - , Type.function - [ Type.string ] - (Type.var "constructor") - ] - ) - ) - } - , literal = - Elm.value - { importFrom = [ "ApiRoute" ] - , name = "literal" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.var "constructor" ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.var "constructor" ] - ) - ) - } - , slash = - Elm.value - { importFrom = [ "ApiRoute" ] - , name = "slash" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.var "constructor" ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.var "constructor" ] - ) - ) - } - , succeed = - Elm.value - { importFrom = [ "ApiRoute" ] - , name = "succeed" - , annotation = - Just - (Type.function - [ Type.var "a" ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRouteBuilder" - [ Type.var "a", Type.list Type.string ] - ) - ) - } - , withGlobalHeadTags = - Elm.value - { importFrom = [ "ApiRoute" ] - , name = "withGlobalHeadTags" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.list (Type.namedWith [ "Head" ] "Tag" []) - ] - , Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ) - ) - } - , toJson = - Elm.value - { importFrom = [ "ApiRoute" ] - , name = "toJson" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ] - (Type.namedWith [ "Json", "Encode" ] "Value" []) - ) - } - , getBuildTimeRoutes = - Elm.value - { importFrom = [ "ApiRoute" ] - , name = "getBuildTimeRoutes" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.list Type.string - ] - ) - ) - } - , getGlobalHeadTagsBackendTask = - Elm.value - { importFrom = [ "ApiRoute" ] - , name = "getGlobalHeadTagsBackendTask" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.var "response" ] - ] - (Type.maybe - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.list - (Type.namedWith [ "Head" ] "Tag" []) - ] - ) - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/BackendTask/Custom.elm b/codegen/Gen/BackendTask/Custom.elm deleted file mode 100644 index 5df4db8f..00000000 --- a/codegen/Gen/BackendTask/Custom.elm +++ /dev/null @@ -1,401 +0,0 @@ -module Gen.BackendTask.Custom exposing - ( moduleName_, run, timeDecoder, dateDecoder, annotation_, make_ - , caseOf_, call_, values_ - ) - -{-| -# Generated bindings for BackendTask.Custom - -@docs moduleName_, run, timeDecoder, dateDecoder, annotation_, make_ -@docs caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "BackendTask", "Custom" ] - - -{-| run: - String - -> Json.Encode.Value - -> Json.Decode.Decoder b - -> BackendTask.BackendTask { fatal : FatalError.FatalError - , recoverable : BackendTask.Custom.Error - } b --} -run : String -> Elm.Expression -> Elm.Expression -> Elm.Expression -run runArg_ runArg_0 runArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "run" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "b" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Custom" ] - "Error" - [] - ) - ] - , Type.var "b" - ] - ) - ) - } - ) - [ Elm.string runArg_, runArg_0, runArg_1 ] - - -{-| timeDecoder: Json.Decode.Decoder Time.Posix -} -timeDecoder : Elm.Expression -timeDecoder = - Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "timeDecoder" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith [ "Time" ] "Posix" [] ] - ) - } - - -{-| The same as `timeDecoder`, but it converts the decoded `Time.Posix` value into a `Date` with `Date.fromPosix Time.utc`. - -JavaScript `Date` objects don't distinguish between values with only a date vs. values with both a date and a time. So be sure -to use this decoder when you know the semantics represent a date with no associated time (or you're sure you don't care about the time). - -dateDecoder: Json.Decode.Decoder Date.Date --} -dateDecoder : Elm.Expression -dateDecoder = - Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "dateDecoder" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith [ "Date" ] "Date" [] ] - ) - } - - -annotation_ : { error : Type.Annotation } -annotation_ = - { error = Type.namedWith [ "BackendTask", "Custom" ] "Error" [] } - - -make_ : - { error : Elm.Expression - , errorInCustomBackendTaskFile : Elm.Expression - , missingCustomBackendTaskFile : Elm.Expression - , customBackendTaskNotDefined : Elm.Expression -> Elm.Expression - , customBackendTaskException : Elm.Expression -> Elm.Expression - , nonJsonException : Elm.Expression -> Elm.Expression - , exportIsNotFunction : Elm.Expression - , decodeError : Elm.Expression -> Elm.Expression - } -make_ = - { error = - Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "Error" - , annotation = Just (Type.namedWith [] "Error" []) - } - , errorInCustomBackendTaskFile = - Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "ErrorInCustomBackendTaskFile" - , annotation = Just (Type.namedWith [] "Error" []) - } - , missingCustomBackendTaskFile = - Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "MissingCustomBackendTaskFile" - , annotation = Just (Type.namedWith [] "Error" []) - } - , customBackendTaskNotDefined = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "CustomBackendTaskNotDefined" - , annotation = Just (Type.namedWith [] "Error" []) - } - ) - [ ar0 ] - , customBackendTaskException = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "CustomBackendTaskException" - , annotation = Just (Type.namedWith [] "Error" []) - } - ) - [ ar0 ] - , nonJsonException = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "NonJsonException" - , annotation = Just (Type.namedWith [] "Error" []) - } - ) - [ ar0 ] - , exportIsNotFunction = - Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "ExportIsNotFunction" - , annotation = Just (Type.namedWith [] "Error" []) - } - , decodeError = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "DecodeError" - , annotation = Just (Type.namedWith [] "Error" []) - } - ) - [ ar0 ] - } - - -caseOf_ = - { error = - \errorExpression errorTags -> - Elm.Case.custom - errorExpression - (Type.namedWith [ "BackendTask", "Custom" ] "Error" []) - [ Elm.Case.branch - (Elm.Arg.customType "Error" errorTags.error) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "ErrorInCustomBackendTaskFile" - errorTags.errorInCustomBackendTaskFile - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "MissingCustomBackendTaskFile" - errorTags.missingCustomBackendTaskFile - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "CustomBackendTaskNotDefined" - errorTags.customBackendTaskNotDefined |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - (Type.record - [ ( "name" - , Type.string - ) - ] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "CustomBackendTaskException" - errorTags.customBackendTaskException |> Elm.Arg.item - (Elm.Arg.varWith - "jsonDecodeValue" - (Type.namedWith - [ "Json" - , "Decode" - ] - "Value" - [] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "NonJsonException" - errorTags.nonJsonException |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "ExportIsNotFunction" - errorTags.exportIsNotFunction - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "DecodeError" - errorTags.decodeError |> Elm.Arg.item - (Elm.Arg.varWith - "jsonDecodeError" - (Type.namedWith - [ "Json" - , "Decode" - ] - "Error" - [] - ) - ) - ) - Basics.identity - ] - } - - -call_ : - { run : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { run = - \runArg_ runArg_0 runArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "run" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "b" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Custom" ] - "Error" - [] - ) - ] - , Type.var "b" - ] - ) - ) - } - ) - [ runArg_, runArg_0, runArg_1 ] - } - - -values_ : - { run : Elm.Expression - , timeDecoder : Elm.Expression - , dateDecoder : Elm.Expression - } -values_ = - { run = - Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "run" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "b" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Custom" ] - "Error" - [] - ) - ] - , Type.var "b" - ] - ) - ) - } - , timeDecoder = - Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "timeDecoder" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith [ "Time" ] "Posix" [] ] - ) - } - , dateDecoder = - Elm.value - { importFrom = [ "BackendTask", "Custom" ] - , name = "dateDecoder" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith [ "Date" ] "Date" [] ] - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/BackendTask/Do.elm b/codegen/Gen/BackendTask/Do.elm deleted file mode 100644 index 8c7a6f0c..00000000 --- a/codegen/Gen/BackendTask/Do.elm +++ /dev/null @@ -1,1198 +0,0 @@ -module Gen.BackendTask.Do exposing - ( moduleName_, do, allowFatal, noop, exec, command - , glob, log, env, each, failIf, call_, values_ - ) - -{-| -# Generated bindings for BackendTask.Do - -@docs moduleName_, do, allowFatal, noop, exec, command -@docs glob, log, env, each, failIf, call_ -@docs values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "BackendTask", "Do" ] - - -{-| Use any `BackendTask` into a continuation-style task. - - example : BackendTask FatalError () - example = - do - (Script.question "What is your name? ") - <| - \name -> - \() -> - Script.log ("Hello " ++ name ++ "!") - -do: - BackendTask.BackendTask error a - -> (a -> BackendTask.BackendTask error b) - -> BackendTask.BackendTask error b --} -do : Elm.Expression -> (Elm.Expression -> Elm.Expression) -> Elm.Expression -do doArg_ doArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "do" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "a" ] - , Type.function - [ Type.var "a" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - ) - } - ) - [ doArg_, Elm.functionReduced "doUnpack" doArg_0 ] - - -{-| Same as [`do`](#do), but with a shorthand to call `BackendTask.allowFatal` on it. - - import BackendTask exposing (BackendTask) - import FatalError exposing (FatalError) - import BackendTask.File as BackendTask.File - import BackendTask.Do exposing (allowFatal, do) - - example : BackendTask FatalError () - example = - do (BackendTask.File.rawFile "post-1.md" |> BackendTask.allowFatal) <| - \post1 -> - allowFatal (BackendTask.File.rawFile "post-2.md") <| - \post2 -> - Script.log (post1 ++ "\n\n" ++ post2) - -allowFatal: - BackendTask.BackendTask { error | fatal : FatalError.FatalError } data - -> (data -> BackendTask.BackendTask FatalError.FatalError b) - -> BackendTask.BackendTask FatalError.FatalError b --} -allowFatal : - Elm.Expression -> (Elm.Expression -> Elm.Expression) -> Elm.Expression -allowFatal allowFatalArg_ allowFatalArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "allowFatal" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.extensible - "error" - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - ] - , Type.var "data" - ] - , Type.function - [ Type.var "data" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "b" - ] - ) - ) - } - ) - [ allowFatalArg_ - , Elm.functionReduced "allowFatalUnpack" allowFatalArg_0 - ] - - -{-| A `BackendTask` that does nothing. Defined as `BackendTask.succeed ()`. - -It's a useful shorthand for when you want to end a continuation chain. - - example : BackendTask FatalError () - example = - exec "ls" [ "-l" ] <| - \() -> - log "Hello, world!" <| - \() -> - noop - -noop: BackendTask.BackendTask error () --} -noop : Elm.Expression -noop = - Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "noop" - , annotation = - Just - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.unit ] - ) - } - - -{-| A do-style helper for [`Script.exec`](Pages-Script#exec). - -exec: - String - -> List String - -> (() -> BackendTask.BackendTask FatalError.FatalError b) - -> BackendTask.BackendTask FatalError.FatalError b --} -exec : - String - -> List String - -> (Elm.Expression -> Elm.Expression) - -> Elm.Expression -exec execArg_ execArg_0 execArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "exec" - , annotation = - Just - (Type.function - [ Type.string - , Type.list Type.string - , Type.function - [ Type.unit ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "b" - ] - ) - ) - } - ) - [ Elm.string execArg_ - , Elm.list (List.map Elm.string execArg_0) - , Elm.functionReduced "execUnpack" execArg_1 - ] - - -{-| A do-style helper for [`Script.command`](Pages-Script#command). - -command: - String - -> List String - -> (String -> BackendTask.BackendTask FatalError.FatalError b) - -> BackendTask.BackendTask FatalError.FatalError b --} -command : - String - -> List String - -> (Elm.Expression -> Elm.Expression) - -> Elm.Expression -command commandArg_ commandArg_0 commandArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "command" - , annotation = - Just - (Type.function - [ Type.string - , Type.list Type.string - , Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "b" - ] - ) - ) - } - ) - [ Elm.string commandArg_ - , Elm.list (List.map Elm.string commandArg_0) - , Elm.functionReduced "commandUnpack" commandArg_1 - ] - - -{-| A continuation-style helper for [`Glob.fromString`](BackendTask-Glob#fromString). - -In a shell script, you can think of this as a stand-in for globbing files directly within a command. The [`BackendTask.Stream.command`](BackendTask-Stream#command) -which lets you run shell commands sanitizes and escapes all arguments passed, and does not do glob expansion, so this is helpful for translating -a shell script to Elm. - -This example passes a list of matching file paths along to an `rm -f` command. - - example : BackendTask FatalError () - example = - glob "src/**/*.elm" <| - \elmFiles -> - log ("Going to delete " ++ String.fromInt (List.length elmFiles) ++ " Elm files") <| - \() -> - exec "rm" ("-f" :: elmFiles) <| - \() -> - noop - -glob: - String - -> (List String -> BackendTask.BackendTask FatalError.FatalError a) - -> BackendTask.BackendTask FatalError.FatalError a --} -glob : String -> (Elm.Expression -> Elm.Expression) -> Elm.Expression -glob globArg_ globArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "glob" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.list Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "a" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "a" - ] - ) - ) - } - ) - [ Elm.string globArg_, Elm.functionReduced "globUnpack" globArg_0 ] - - -{-| A do-style helper for [`Script.log`](Pages-Script#log). - - example : BackendTask FatalError () - example = - log "Starting script..." <| - \() -> - -- ... - log "Done!" <| - \() -> - noop - -log: - String - -> (() -> BackendTask.BackendTask error b) - -> BackendTask.BackendTask error b --} -log : String -> (Elm.Expression -> Elm.Expression) -> Elm.Expression -log logArg_ logArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "log" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.unit ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - ) - } - ) - [ Elm.string logArg_, Elm.functionReduced "logUnpack" logArg_0 ] - - -{-| A do-style helper for [`Env.expect`](BackendTask-Env#expect). - - example : BackendTask FatalError () - example = - env "API_KEY" <| - \apiKey -> - allowFatal (apiRequest apiKey) <| - \() -> - noop - -env: - String - -> (String -> BackendTask.BackendTask FatalError.FatalError b) - -> BackendTask.BackendTask FatalError.FatalError b --} -env : String -> (Elm.Expression -> Elm.Expression) -> Elm.Expression -env envArg_ envArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "env" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "b" - ] - ) - ) - } - ) - [ Elm.string envArg_, Elm.functionReduced "envUnpack" envArg_0 ] - - -{-| checkCompilationInDir : String -> BackendTask FatalError () - checkCompilationInDir dir = - glob (dir ++ "/**/*.elm") <| - \elmFiles -> - each elmFiles - (\elmFile -> - Shell.sh "elm" [ "make", elmFile, "--output", "/dev/null" ] - |> BackendTask.quiet - ) - <| - \_ -> - noop - -each: - List a - -> (a -> BackendTask.BackendTask error b) - -> (List b -> BackendTask.BackendTask error c) - -> BackendTask.BackendTask error c --} -each : - List Elm.Expression - -> (Elm.Expression -> Elm.Expression) - -> (Elm.Expression -> Elm.Expression) - -> Elm.Expression -each eachArg_ eachArg_0 eachArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "each" - , annotation = - Just - (Type.function - [ Type.list (Type.var "a") - , Type.function - [ Type.var "a" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - , Type.function - [ Type.list (Type.var "b") ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "c" ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "c" ] - ) - ) - } - ) - [ Elm.list eachArg_ - , Elm.functionReduced "eachUnpack" eachArg_0 - , Elm.functionReduced "eachUnpack" eachArg_1 - ] - - -{-| A do-style helper for [`BackendTask.failIf`](BackendTask#failIf). - -failIf: - Bool - -> FatalError.FatalError - -> (() -> BackendTask.BackendTask FatalError.FatalError b) - -> BackendTask.BackendTask FatalError.FatalError b --} -failIf : - Bool - -> Elm.Expression - -> (Elm.Expression -> Elm.Expression) - -> Elm.Expression -failIf failIfArg_ failIfArg_0 failIfArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "failIf" - , annotation = - Just - (Type.function - [ Type.bool - , Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.function - [ Type.unit ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "b" - ] - ) - ) - } - ) - [ Elm.bool failIfArg_ - , failIfArg_0 - , Elm.functionReduced "failIfUnpack" failIfArg_1 - ] - - -call_ : - { do : Elm.Expression -> Elm.Expression -> Elm.Expression - , allowFatal : Elm.Expression -> Elm.Expression -> Elm.Expression - , exec : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , command : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , glob : Elm.Expression -> Elm.Expression -> Elm.Expression - , log : Elm.Expression -> Elm.Expression -> Elm.Expression - , env : Elm.Expression -> Elm.Expression -> Elm.Expression - , each : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , failIf : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { do = - \doArg_ doArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "do" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "a" ] - , Type.function - [ Type.var "a" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - ) - } - ) - [ doArg_, doArg_0 ] - , allowFatal = - \allowFatalArg_ allowFatalArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "allowFatal" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.extensible - "error" - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - ] - , Type.var "data" - ] - , Type.function - [ Type.var "data" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ) - } - ) - [ allowFatalArg_, allowFatalArg_0 ] - , exec = - \execArg_ execArg_0 execArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "exec" - , annotation = - Just - (Type.function - [ Type.string - , Type.list Type.string - , Type.function - [ Type.unit ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ) - } - ) - [ execArg_, execArg_0, execArg_1 ] - , command = - \commandArg_ commandArg_0 commandArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "command" - , annotation = - Just - (Type.function - [ Type.string - , Type.list Type.string - , Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ) - } - ) - [ commandArg_, commandArg_0, commandArg_1 ] - , glob = - \globArg_ globArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "glob" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.list Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "a" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "a" - ] - ) - ) - } - ) - [ globArg_, globArg_0 ] - , log = - \logArg_ logArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "log" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.unit ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - ) - } - ) - [ logArg_, logArg_0 ] - , env = - \envArg_ envArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "env" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ) - } - ) - [ envArg_, envArg_0 ] - , each = - \eachArg_ eachArg_0 eachArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "each" - , annotation = - Just - (Type.function - [ Type.list (Type.var "a") - , Type.function - [ Type.var "a" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - , Type.function - [ Type.list (Type.var "b") ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "c" ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "c" ] - ) - ) - } - ) - [ eachArg_, eachArg_0, eachArg_1 ] - , failIf = - \failIfArg_ failIfArg_0 failIfArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "failIf" - , annotation = - Just - (Type.function - [ Type.bool - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.function - [ Type.unit ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ) - } - ) - [ failIfArg_, failIfArg_0, failIfArg_1 ] - } - - -values_ : - { do : Elm.Expression - , allowFatal : Elm.Expression - , noop : Elm.Expression - , exec : Elm.Expression - , command : Elm.Expression - , glob : Elm.Expression - , log : Elm.Expression - , env : Elm.Expression - , each : Elm.Expression - , failIf : Elm.Expression - } -values_ = - { do = - Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "do" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "a" ] - , Type.function - [ Type.var "a" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - ) - } - , allowFatal = - Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "allowFatal" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.extensible - "error" - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - ] - , Type.var "data" - ] - , Type.function - [ Type.var "data" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "b" - ] - ) - ) - } - , noop = - Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "noop" - , annotation = - Just - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.unit ] - ) - } - , exec = - Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "exec" - , annotation = - Just - (Type.function - [ Type.string - , Type.list Type.string - , Type.function - [ Type.unit ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "b" - ] - ) - ) - } - , command = - Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "command" - , annotation = - Just - (Type.function - [ Type.string - , Type.list Type.string - , Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "b" - ] - ) - ) - } - , glob = - Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "glob" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.list Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "a" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "a" - ] - ) - ) - } - , log = - Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "log" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.unit ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - ) - } - , env = - Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "env" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "b" - ] - ) - ) - } - , each = - Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "each" - , annotation = - Just - (Type.function - [ Type.list (Type.var "a") - , Type.function - [ Type.var "a" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "b" ] - ) - , Type.function - [ Type.list (Type.var "b") ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "c" ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "c" ] - ) - ) - } - , failIf = - Elm.value - { importFrom = [ "BackendTask", "Do" ] - , name = "failIf" - , annotation = - Just - (Type.function - [ Type.bool - , Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.function - [ Type.unit ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "b" - ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "b" - ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/BackendTask/Env.elm b/codegen/Gen/BackendTask/Env.elm deleted file mode 100644 index 1ada4874..00000000 --- a/codegen/Gen/BackendTask/Env.elm +++ /dev/null @@ -1,252 +0,0 @@ -module Gen.BackendTask.Env exposing - ( moduleName_, get, expect, annotation_, make_, caseOf_ - , call_, values_ - ) - -{-| -# Generated bindings for BackendTask.Env - -@docs moduleName_, get, expect, annotation_, make_, caseOf_ -@docs call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "BackendTask", "Env" ] - - -{-| Get an environment variable, or Nothing if there is no environment variable matching that name. This `BackendTask` -will never fail, but instead will return `Nothing` if the environment variable is missing. - -get: String -> BackendTask.BackendTask error (Maybe String) --} -get : String -> Elm.Expression -get getArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Env" ] - , name = "get" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.maybe Type.string ] - ) - ) - } - ) - [ Elm.string getArg_ ] - - -{-| Get an environment variable, or a BackendTask FatalError if there is no environment variable matching that name. - -expect: - String - -> BackendTask.BackendTask { fatal : FatalError.FatalError - , recoverable : BackendTask.Env.Error - } String --} -expect : String -> Elm.Expression -expect expectArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Env" ] - , name = "expect" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Env" ] - "Error" - [] - ) - ] - , Type.string - ] - ) - ) - } - ) - [ Elm.string expectArg_ ] - - -annotation_ : { error : Type.Annotation } -annotation_ = - { error = Type.namedWith [ "BackendTask", "Env" ] "Error" [] } - - -make_ : { missingEnvVariable : Elm.Expression -> Elm.Expression } -make_ = - { missingEnvVariable = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Env" ] - , name = "MissingEnvVariable" - , annotation = Just (Type.namedWith [] "Error" []) - } - ) - [ ar0 ] - } - - -caseOf_ : - { error : - Elm.Expression - -> { missingEnvVariable : Elm.Expression -> Elm.Expression } - -> Elm.Expression - } -caseOf_ = - { error = - \errorExpression errorTags -> - Elm.Case.custom - errorExpression - (Type.namedWith [ "BackendTask", "Env" ] "Error" []) - [ Elm.Case.branch - (Elm.Arg.customType - "MissingEnvVariable" - errorTags.missingEnvVariable |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - ] - } - - -call_ : - { get : Elm.Expression -> Elm.Expression - , expect : Elm.Expression -> Elm.Expression - } -call_ = - { get = - \getArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Env" ] - , name = "get" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.maybe Type.string - ] - ) - ) - } - ) - [ getArg_ ] - , expect = - \expectArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Env" ] - , name = "expect" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Env" ] - "Error" - [] - ) - ] - , Type.string - ] - ) - ) - } - ) - [ expectArg_ ] - } - - -values_ : { get : Elm.Expression, expect : Elm.Expression } -values_ = - { get = - Elm.value - { importFrom = [ "BackendTask", "Env" ] - , name = "get" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.maybe Type.string ] - ) - ) - } - , expect = - Elm.value - { importFrom = [ "BackendTask", "Env" ] - , name = "expect" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Env" ] - "Error" - [] - ) - ] - , Type.string - ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/BackendTask/File.elm b/codegen/Gen/BackendTask/File.elm deleted file mode 100644 index 7d35b195..00000000 --- a/codegen/Gen/BackendTask/File.elm +++ /dev/null @@ -1,981 +0,0 @@ -module Gen.BackendTask.File exposing - ( moduleName_, bodyWithFrontmatter, bodyWithoutFrontmatter, onlyFrontmatter, jsonFile, rawFile - , annotation_, make_, caseOf_, call_, values_ - ) - -{-| -# Generated bindings for BackendTask.File - -@docs moduleName_, bodyWithFrontmatter, bodyWithoutFrontmatter, onlyFrontmatter, jsonFile, rawFile -@docs annotation_, make_, caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "BackendTask", "File" ] - - -{-| import BackendTask exposing (BackendTask) - import BackendTask.File as File - import FatalError exposing (FatalError) - import Json.Decode as Decode exposing (Decoder) - - blogPost : BackendTask FatalError BlogPostMetadata - blogPost = - File.bodyWithFrontmatter blogPostDecoder - "blog/hello-world.md" - |> BackendTask.allowFatal - - type alias BlogPostMetadata = - { body : String - , title : String - , tags : List String - } - - blogPostDecoder : String -> Decoder BlogPostMetadata - blogPostDecoder body = - Decode.map2 (BlogPostMetadata body) - (Decode.field "title" Decode.string) - (Decode.field "tags" tagsDecoder) - - tagsDecoder : Decoder (List String) - tagsDecoder = - Decode.map (String.split " ") - Decode.string - -This will give us a BackendTask that results in the following value: - - value = - { body = "Hey there! This is my first post :)" - , title = "Hello, World!" - , tags = [ "elm" ] - } - -It's common to parse the body with a markdown parser or other format. - - import BackendTask exposing (BackendTask) - import BackendTask.File as File - import FatalError exposing (FatalError) - import Html exposing (Html) - import Json.Decode as Decode - - example : - BackendTask - FatalError - { title : String - , body : List (Html msg) - } - example = - File.bodyWithFrontmatter - (\markdownString -> - Decode.map2 - (\title renderedMarkdown -> - { title = title - , body = renderedMarkdown - } - ) - (Decode.field "title" Decode.string) - (markdownString - |> markdownToView - |> Decode.fromResult - ) - ) - "foo.md" - |> BackendTask.allowFatal - - markdownToView : - String - -> Result String (List (Html msg)) - markdownToView markdownString = - markdownString - |> Markdown.Parser.parse - |> Result.mapError (\_ -> "Markdown error.") - |> Result.andThen - (\blocks -> - Markdown.Renderer.render - Markdown.Renderer.defaultHtmlRenderer - blocks - ) - -bodyWithFrontmatter: - (String -> Json.Decode.Decoder frontmatter) - -> String - -> BackendTask.BackendTask { fatal : FatalError.FatalError - , recoverable : BackendTask.File.FileReadError Json.Decode.Error - } frontmatter --} -bodyWithFrontmatter : - (Elm.Expression -> Elm.Expression) -> String -> Elm.Expression -bodyWithFrontmatter bodyWithFrontmatterArg_ bodyWithFrontmatterArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "bodyWithFrontmatter" - , annotation = - Just - (Type.function - [ Type.function - [ Type.string ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "frontmatter" ] - ) - , Type.string - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.namedWith - [ "Json", "Decode" ] - "Error" - [] - ] - ) - ] - , Type.var "frontmatter" - ] - ) - ) - } - ) - [ Elm.functionReduced - "bodyWithFrontmatterUnpack" - bodyWithFrontmatterArg_ - , Elm.string bodyWithFrontmatterArg_0 - ] - - -{-| Same as `bodyWithFrontmatter` except it doesn't include the frontmatter. - -For example, if you have a file called `blog/hello-world.md` with - -```markdown ---- -title: Hello, World! -tags: elm ---- -Hey there! This is my first post :) -``` - - import BackendTask exposing (BackendTask) - import BackendTask.File as File - import FatalError exposing (FatalError) - - data : BackendTask FatalError String - data = - File.bodyWithoutFrontmatter "blog/hello-world.md" - |> BackendTask.allowFatal - -Then data will yield the value `"Hey there! This is my first post :)"`. - -bodyWithoutFrontmatter: - String - -> BackendTask.BackendTask { fatal : FatalError.FatalError - , recoverable : BackendTask.File.FileReadError decoderError - } String --} -bodyWithoutFrontmatter : String -> Elm.Expression -bodyWithoutFrontmatter bodyWithoutFrontmatterArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "bodyWithoutFrontmatter" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.var "decoderError" ] - ) - ] - , Type.string - ] - ) - ) - } - ) - [ Elm.string bodyWithoutFrontmatterArg_ ] - - -{-| Same as `bodyWithFrontmatter` except it doesn't include the body. - -This is often useful when you're aggregating data, for example getting a listing of blog posts and need to extract -just the metadata. - - import BackendTask exposing (BackendTask) - import BackendTask.File as File - import FatalError exposing (FatalError) - import Json.Decode as Decode exposing (Decoder) - - blogPost : BackendTask FatalError BlogPostMetadata - blogPost = - File.onlyFrontmatter - blogPostDecoder - "blog/hello-world.md" - |> BackendTask.allowFatal - - type alias BlogPostMetadata = - { title : String - , tags : List String - } - - blogPostDecoder : Decoder BlogPostMetadata - blogPostDecoder = - Decode.map2 BlogPostMetadata - (Decode.field "title" Decode.string) - (Decode.field "tags" (Decode.list Decode.string)) - -If you wanted to use this to get this metadata for all blog posts in a folder, you could use -the [`BackendTask`](BackendTask) API along with [`BackendTask.Glob`](BackendTask-Glob). - - import BackendTask exposing (BackendTask) - import BackendTask.File as File - import Decode exposing (Decoder) - - blogPostFiles : BackendTask (List String) - blogPostFiles = - Glob.succeed identity - |> Glob.captureFilePath - |> Glob.match (Glob.literal "content/blog/") - |> Glob.match Glob.wildcard - |> Glob.match (Glob.literal ".md") - |> Glob.toBackendTask - - allMetadata : BackendTask (List BlogPostMetadata) - allMetadata = - blogPostFiles - |> BackendTask.map - (List.map - (File.onlyFrontmatter - blogPostDecoder - ) - ) - |> BackendTask.resolve - -onlyFrontmatter: - Json.Decode.Decoder frontmatter - -> String - -> BackendTask.BackendTask { fatal : FatalError.FatalError - , recoverable : BackendTask.File.FileReadError Json.Decode.Error - } frontmatter --} -onlyFrontmatter : Elm.Expression -> String -> Elm.Expression -onlyFrontmatter onlyFrontmatterArg_ onlyFrontmatterArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "onlyFrontmatter" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "frontmatter" ] - , Type.string - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.namedWith - [ "Json", "Decode" ] - "Error" - [] - ] - ) - ] - , Type.var "frontmatter" - ] - ) - ) - } - ) - [ onlyFrontmatterArg_, Elm.string onlyFrontmatterArg_0 ] - - -{-| Read a file as JSON. - -The Decode will strip off any unused JSON data. - - import BackendTask exposing (BackendTask) - import BackendTask.File as File - import FatalError exposing (FatalError) - import Json.Decode as Decode - - sourceDirectories : BackendTask FatalError (List String) - sourceDirectories = - File.jsonFile - (Decode.field - "source-directories" - (Decode.list Decode.string) - ) - "elm.json" - |> BackendTask.allowFatal - -jsonFile: - Json.Decode.Decoder a - -> String - -> BackendTask.BackendTask { fatal : FatalError.FatalError - , recoverable : BackendTask.File.FileReadError Json.Decode.Error - } a --} -jsonFile : Elm.Expression -> String -> Elm.Expression -jsonFile jsonFileArg_ jsonFileArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "jsonFile" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - , Type.string - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.namedWith - [ "Json", "Decode" ] - "Error" - [] - ] - ) - ] - , Type.var "a" - ] - ) - ) - } - ) - [ jsonFileArg_, Elm.string jsonFileArg_0 ] - - -{-| Get the raw file content. Unlike the frontmatter helpers in this module, this function will not strip off frontmatter if there is any. - -This is the function you want if you are reading in a file directly. For example, if you read in a CSV file, a raw text file, or any other file that doesn't -have frontmatter. - -There's a special function for reading in JSON files, [`jsonFile`](#jsonFile). If you're reading a JSON file then be sure to -use `jsonFile` to get the benefits of the `Decode` here. - -You could read a file called `hello.txt` in your root project directory like this: - - import BackendTask exposing (BackendTask) - import BackendTask.File as File - import FatalError exposing (FatalError) - - elmJsonFile : BackendTask FatalError String - elmJsonFile = - File.rawFile "hello.txt" - |> BackendTask.allowFatal - -rawFile: - String - -> BackendTask.BackendTask { fatal : FatalError.FatalError - , recoverable : BackendTask.File.FileReadError decoderError - } String --} -rawFile : String -> Elm.Expression -rawFile rawFileArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "rawFile" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.var "decoderError" ] - ) - ] - , Type.string - ] - ) - ) - } - ) - [ Elm.string rawFileArg_ ] - - -annotation_ : { fileReadError : Type.Annotation -> Type.Annotation } -annotation_ = - { fileReadError = - \fileReadErrorArg0 -> - Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ fileReadErrorArg0 ] - } - - -make_ : - { fileDoesntExist : Elm.Expression - , fileReadError : Elm.Expression -> Elm.Expression - , decodingError : Elm.Expression -> Elm.Expression - } -make_ = - { fileDoesntExist = - Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "FileDoesntExist" - , annotation = - Just (Type.namedWith [] "FileReadError" [ Type.var "decoding" ]) - } - , fileReadError = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "FileReadError" - , annotation = - Just - (Type.namedWith - [] - "FileReadError" - [ Type.var "decoding" ] - ) - } - ) - [ ar0 ] - , decodingError = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "DecodingError" - , annotation = - Just - (Type.namedWith - [] - "FileReadError" - [ Type.var "decoding" ] - ) - } - ) - [ ar0 ] - } - - -caseOf_ : - { fileReadError : - Elm.Expression - -> { fileDoesntExist : Elm.Expression - , fileReadError : Elm.Expression -> Elm.Expression - , decodingError : Elm.Expression -> Elm.Expression - } - -> Elm.Expression - } -caseOf_ = - { fileReadError = - \fileReadErrorExpression fileReadErrorTags -> - Elm.Case.custom - fileReadErrorExpression - (Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.var "decoding" ] - ) - [ Elm.Case.branch - (Elm.Arg.customType - "FileDoesntExist" - fileReadErrorTags.fileDoesntExist - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "FileReadError" - fileReadErrorTags.fileReadError |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "DecodingError" - fileReadErrorTags.decodingError |> Elm.Arg.item - (Elm.Arg.varWith - "decoding" - (Type.var - "decoding" - ) - ) - ) - Basics.identity - ] - } - - -call_ : - { bodyWithFrontmatter : Elm.Expression -> Elm.Expression -> Elm.Expression - , bodyWithoutFrontmatter : Elm.Expression -> Elm.Expression - , onlyFrontmatter : Elm.Expression -> Elm.Expression -> Elm.Expression - , jsonFile : Elm.Expression -> Elm.Expression -> Elm.Expression - , rawFile : Elm.Expression -> Elm.Expression - } -call_ = - { bodyWithFrontmatter = - \bodyWithFrontmatterArg_ bodyWithFrontmatterArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "bodyWithFrontmatter" - , annotation = - Just - (Type.function - [ Type.function - [ Type.string ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "frontmatter" ] - ) - , Type.string - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.namedWith - [ "Json", "Decode" ] - "Error" - [] - ] - ) - ] - , Type.var "frontmatter" - ] - ) - ) - } - ) - [ bodyWithFrontmatterArg_, bodyWithFrontmatterArg_0 ] - , bodyWithoutFrontmatter = - \bodyWithoutFrontmatterArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "bodyWithoutFrontmatter" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.var "decoderError" ] - ) - ] - , Type.string - ] - ) - ) - } - ) - [ bodyWithoutFrontmatterArg_ ] - , onlyFrontmatter = - \onlyFrontmatterArg_ onlyFrontmatterArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "onlyFrontmatter" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "frontmatter" ] - , Type.string - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.namedWith - [ "Json", "Decode" ] - "Error" - [] - ] - ) - ] - , Type.var "frontmatter" - ] - ) - ) - } - ) - [ onlyFrontmatterArg_, onlyFrontmatterArg_0 ] - , jsonFile = - \jsonFileArg_ jsonFileArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "jsonFile" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - , Type.string - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.namedWith - [ "Json", "Decode" ] - "Error" - [] - ] - ) - ] - , Type.var "a" - ] - ) - ) - } - ) - [ jsonFileArg_, jsonFileArg_0 ] - , rawFile = - \rawFileArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "rawFile" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.var "decoderError" ] - ) - ] - , Type.string - ] - ) - ) - } - ) - [ rawFileArg_ ] - } - - -values_ : - { bodyWithFrontmatter : Elm.Expression - , bodyWithoutFrontmatter : Elm.Expression - , onlyFrontmatter : Elm.Expression - , jsonFile : Elm.Expression - , rawFile : Elm.Expression - } -values_ = - { bodyWithFrontmatter = - Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "bodyWithFrontmatter" - , annotation = - Just - (Type.function - [ Type.function - [ Type.string ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "frontmatter" ] - ) - , Type.string - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.namedWith - [ "Json", "Decode" ] - "Error" - [] - ] - ) - ] - , Type.var "frontmatter" - ] - ) - ) - } - , bodyWithoutFrontmatter = - Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "bodyWithoutFrontmatter" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.var "decoderError" ] - ) - ] - , Type.string - ] - ) - ) - } - , onlyFrontmatter = - Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "onlyFrontmatter" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "frontmatter" ] - , Type.string - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.namedWith - [ "Json", "Decode" ] - "Error" - [] - ] - ) - ] - , Type.var "frontmatter" - ] - ) - ) - } - , jsonFile = - Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "jsonFile" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - , Type.string - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.namedWith - [ "Json", "Decode" ] - "Error" - [] - ] - ) - ] - , Type.var "a" - ] - ) - ) - } - , rawFile = - Elm.value - { importFrom = [ "BackendTask", "File" ] - , name = "rawFile" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "File" ] - "FileReadError" - [ Type.var "decoderError" ] - ) - ] - , Type.string - ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/BackendTask/Glob.elm b/codegen/Gen/BackendTask/Glob.elm deleted file mode 100644 index 3e71274b..00000000 --- a/codegen/Gen/BackendTask/Glob.elm +++ /dev/null @@ -1,2137 +0,0 @@ -module Gen.BackendTask.Glob exposing - ( moduleName_, capture, match, fromString, fromStringWithOptions, captureFilePath - , wildcard, recursiveWildcard, int, digits, captureStats, expectUniqueMatch, expectUniqueMatchFromList - , literal, map, succeed, oneOf, zeroOrMore, atLeastOne, toBackendTask - , toBackendTaskWithOptions, defaultOptions, annotation_, make_, caseOf_, call_, values_ - ) - -{-| -# Generated bindings for BackendTask.Glob - -@docs moduleName_, capture, match, fromString, fromStringWithOptions, captureFilePath -@docs wildcard, recursiveWildcard, int, digits, captureStats, expectUniqueMatch -@docs expectUniqueMatchFromList, literal, map, succeed, oneOf, zeroOrMore -@docs atLeastOne, toBackendTask, toBackendTaskWithOptions, defaultOptions, annotation_, make_ -@docs caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "BackendTask", "Glob" ] - - -{-| Adds on to the glob pattern, and captures it in the resulting Elm match value. That means this both changes which -files will match, and gives you the sub-match as Elm data for each matching file. - -Exactly the same as `match` except it also captures the matched sub-pattern. - - type alias ArchivesArticle = - { year : String - , month : String - , day : String - , slug : String - } - - archives : BackendTask error ArchivesArticle - archives = - Glob.succeed ArchivesArticle - |> Glob.match (Glob.literal "archive/") - |> Glob.capture Glob.int - |> Glob.match (Glob.literal "/") - |> Glob.capture Glob.int - |> Glob.match (Glob.literal "/") - |> Glob.capture Glob.int - |> Glob.match (Glob.literal "/") - |> Glob.capture Glob.wildcard - |> Glob.match (Glob.literal ".md") - |> Glob.toBackendTask - -The file `archive/1977/06/10/apple-2-released.md` will give us this match: - - matches : List error ArchivesArticle - matches = - BackendTask.succeed - [ { year = 1977 - , month = 6 - , day = 10 - , slug = "apple-2-released" - } - ] - -When possible, it's best to grab data and turn it into structured Elm data when you have it. That way, -you don't end up with duplicate validation logic and data normalization, and your code will be more robust. - -If you only care about getting the full matched file paths, you can use `match`. `capture` is very useful because -you can pick apart structured data as you build up your glob pattern. This follows the principle of -[Parse, Don't Validate](https://elm-radio.com/episode/parse-dont-validate/). - -capture: - BackendTask.Glob.Glob a - -> BackendTask.Glob.Glob (a -> value) - -> BackendTask.Glob.Glob value --} -capture : Elm.Expression -> Elm.Expression -> Elm.Expression -capture captureArg_ captureArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "capture" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - , Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.function - [ Type.var "a" ] - (Type.var "value") - ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ) - ) - } - ) - [ captureArg_, captureArg_0 ] - - -{-| Adds on to the glob pattern, but does not capture it in the resulting Elm match value. That means this changes which -files will match, but does not change the Elm data type you get for each matching file. - -Exactly the same as `capture` except it doesn't capture the matched sub-pattern. - -match: - BackendTask.Glob.Glob a - -> BackendTask.Glob.Glob value - -> BackendTask.Glob.Glob value --} -match : Elm.Expression -> Elm.Expression -> Elm.Expression -match matchArg_ matchArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "match" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - , Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ) - ) - } - ) - [ matchArg_, matchArg_0 ] - - -{-| Runs a glob string directly, with `include = FilesAndFolders`. Behavior is similar to using glob patterns in a shell. - -If you need to capture specific parts of the path, you can use `capture` and `match` functions instead. `fromString` -only allows you to capture a list of matching file paths. - -The following glob syntax is supported: - - - `*` matches any number of characters except for `/` - - `**` matches any number of characters including `/` - -For example, if we have the following files: - -```shell -- src/ - - Main.elm - - Ui/ - - Icon.elm -- content/ - - blog/ - - first-post.md - - second-post.md -``` - - import BackendTask.Glob as Glob - - blogPosts : BackendTask error (List String) - blogPosts = - Glob.fromString "content/blog/*.md" - - --> BackendTask.succeed [ "content/blog/first-post.md", "content/blog/second-post.md" ] - elmFiles : BackendTask error (List String) - elmFiles = - Glob.fromString "src/**/*.elm" - - --> BackendTask.succeed [ "src/Main.elm", "src/Ui", "src/Ui/Icon.elm" ] - -fromString: String -> BackendTask.BackendTask error (List String) --} -fromString : String -> Elm.Expression -fromString fromStringArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "fromString" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.list Type.string ] - ) - ) - } - ) - [ Elm.string fromStringArg_ ] - - -{-| Same as [`fromString`](#fromString), but with custom [`Options`](#Options). - -fromStringWithOptions: - BackendTask.Glob.Options - -> String - -> BackendTask.BackendTask error (List String) --} -fromStringWithOptions : Elm.Expression -> String -> Elm.Expression -fromStringWithOptions fromStringWithOptionsArg_ fromStringWithOptionsArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "fromStringWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Options" - [] - , Type.string - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.list Type.string ] - ) - ) - } - ) - [ fromStringWithOptionsArg_, Elm.string fromStringWithOptionsArg_0 ] - - -{-| import BackendTask exposing (BackendTask) - import BackendTask.Glob as Glob - - blogPosts : - BackendTask - error - (List - { filePath : String - , slug : String - } - ) - blogPosts = - Glob.succeed - (\filePath slug -> - { filePath = filePath - , slug = slug - } - ) - |> Glob.captureFilePath - |> Glob.match (Glob.literal "content/blog/") - |> Glob.capture Glob.wildcard - |> Glob.match (Glob.literal ".md") - |> Glob.toBackendTask - -This function does not change which files will or will not match. It just gives you the full matching -file path in your `Glob` pipeline. - -Whenever possible, it's a good idea to use function to make sure you have an accurate file path when you need to read a file. - -captureFilePath: BackendTask.Glob.Glob (String -> value) -> BackendTask.Glob.Glob value --} -captureFilePath : Elm.Expression -> Elm.Expression -captureFilePath captureFilePathArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "captureFilePath" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.function [ Type.string ] (Type.var "value") - ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ) - ) - } - ) - [ captureFilePathArg_ ] - - -{-| Matches anything except for a `/` in a file path. You may be familiar with this syntax from shells like bash -where you can run commands like `rm client/*.js` to remove all `.js` files in the `client` directory. - -Just like a `*` glob pattern in bash, this `Glob.wildcard` function will only match within a path part. If you need to -match 0 or more path parts like, see `recursiveWildcard`. - - import BackendTask exposing (BackendTask) - import BackendTask.Glob as Glob - - type alias BlogPost = - { year : String - , month : String - , day : String - , slug : String - } - - example : BackendTask error (List BlogPost) - example = - Glob.succeed BlogPost - |> Glob.match (Glob.literal "blog/") - |> Glob.capture Glob.wildcard - |> Glob.match (Glob.literal "-") - |> Glob.capture Glob.wildcard - |> Glob.match (Glob.literal "-") - |> Glob.capture Glob.wildcard - |> Glob.match (Glob.literal "/") - |> Glob.capture Glob.wildcard - |> Glob.match (Glob.literal ".md") - |> Glob.toBackendTask - -```shell - -- blog/ - - 2021-05-27/ - - first-post.md -``` - -That will match to: - - results : BackendTask error (List BlogPost) - results = - BackendTask.succeed - [ { year = "2021" - , month = "05" - , day = "27" - , slug = "first-post" - } - ] - -Note that we can "destructure" the date part of this file path in the format `yyyy-mm-dd`. The `wildcard` matches -will match _within_ a path part (think between the slashes of a file path). `recursiveWildcard` can match across path parts. - -wildcard: BackendTask.Glob.Glob String --} -wildcard : Elm.Expression -wildcard = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "wildcard" - , annotation = - Just - (Type.namedWith [ "BackendTask", "Glob" ] "Glob" [ Type.string ] - ) - } - - -{-| Matches any number of characters, including `/`, as long as it's the only thing in a path part. - -In contrast, `wildcard` will never match `/`, so it only matches within a single path part. - -This is the elm-pages equivalent of `**/*.txt` in standard shell syntax: - - import BackendTask exposing (BackendTask) - import BackendTask.Glob as Glob - - example : BackendTask error (List ( List String, String )) - example = - Glob.succeed Tuple.pair - |> Glob.match (Glob.literal "articles/") - |> Glob.capture Glob.recursiveWildcard - |> Glob.match (Glob.literal "/") - |> Glob.capture Glob.wildcard - |> Glob.match (Glob.literal ".txt") - |> Glob.toBackendTask - -With these files: - -```shell -- articles/ - - google-io-2021-recap.txt - - archive/ - - 1977/ - - 06/ - - 10/ - - apple-2-announced.txt -``` - -We would get the following matches: - - matches : BackendTask error (List ( List String, String )) - matches = - BackendTask.succeed - [ ( [ "archive", "1977", "06", "10" ], "apple-2-announced" ) - , ( [], "google-io-2021-recap" ) - ] - -Note that the recursive wildcard conveniently gives us a `List String`, where -each String is a path part with no slashes (like `archive`). - -And also note that it matches 0 path parts into an empty list. - -If we didn't include the `wildcard` after the `recursiveWildcard`, then we would only get -a single level of matches because it is followed by a file extension. - - example : BackendTask error (List String) - example = - Glob.succeed identity - |> Glob.match (Glob.literal "articles/") - |> Glob.capture Glob.recursiveWildcard - |> Glob.match (Glob.literal ".txt") - - matches : BackendTask error (List String) - matches = - BackendTask.succeed - [ "google-io-2021-recap" - ] - -This is usually not what is intended. Using `recursiveWildcard` is usually followed by a `wildcard` for this reason. - -recursiveWildcard: BackendTask.Glob.Glob (List String) --} -recursiveWildcard : Elm.Expression -recursiveWildcard = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "recursiveWildcard" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.list Type.string ] - ) - } - - -{-| Same as [`digits`](#digits), but it safely turns the digits String into an `Int`. - -Leading 0's are ignored. - - import BackendTask exposing (BackendTask) - import BackendTask.Glob as Glob - - slides : BackendTask error (List Int) - slides = - Glob.succeed identity - |> Glob.match (Glob.literal "slide-") - |> Glob.capture Glob.int - |> Glob.match (Glob.literal ".md") - |> Glob.toBackendTask - -With files - -```shell -- slide-no-match.md -- slide-.md -- slide-1.md -- slide-01.md -- slide-2.md -- slide-03.md -- slide-4.md -- slide-05.md -- slide-06.md -- slide-007.md -- slide-08.md -- slide-09.md -- slide-10.md -- slide-11.md -``` - -Yields - - matches : BackendTask error (List Int) - matches = - BackendTask.succeed - [ 1 - , 1 - , 2 - , 3 - , 4 - , 5 - , 6 - , 7 - , 8 - , 9 - , 10 - , 11 - ] - -Note that neither `slide-no-match.md` nor `slide-.md` match. -And both `slide-1.md` and `slide-01.md` match and turn into `1`. - -int: BackendTask.Glob.Glob Int --} -int : Elm.Expression -int = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "int" - , annotation = - Just (Type.namedWith [ "BackendTask", "Glob" ] "Glob" [ Type.int ]) - } - - -{-| This is similar to [`wildcard`](#wildcard), but it will only match 1 or more digits (i.e. `[0-9]+`). - -See [`int`](#int) for a convenience function to get an Int value instead of a String of digits. - -digits: BackendTask.Glob.Glob String --} -digits : Elm.Expression -digits = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "digits" - , annotation = - Just - (Type.namedWith [ "BackendTask", "Glob" ] "Glob" [ Type.string ] - ) - } - - -{-| import BackendTask.Glob as Glob - - recentlyChangedRouteModules : BackendTask error (List ( Time.Posix, List String )) - recentlyChangedRouteModules = - Glob.succeed - (\fileStats directoryName fileName -> - ( fileStats.lastContentChange - , directoryName ++ [ fileName ] - ) - ) - |> Glob.captureStats - |> Glob.match (Glob.literal "app/Route/") - |> Glob.capture Glob.recursiveWildcard - |> Glob.match (Glob.literal "/") - |> Glob.capture Glob.wildcard - |> Glob.match (Glob.literal ".elm") - |> Glob.toBackendTask - |> BackendTask.map - (\entries -> - entries - |> List.sortBy (\( lastChanged, _ ) -> Time.posixToMillis lastChanged) - |> List.reverse - ) - -captureStats: - BackendTask.Glob.Glob (BackendTask.Glob.FileStats -> value) - -> BackendTask.Glob.Glob value --} -captureStats : Elm.Expression -> Elm.Expression -captureStats captureStatsArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "captureStats" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "FileStats" - [] - ] - (Type.var "value") - ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ) - ) - } - ) - [ captureStatsArg_ ] - - -{-| Sometimes you want to make sure there is a unique file matching a particular pattern. -This is a simple helper that will give you a `BackendTask` error if there isn't exactly 1 matching file. -If there is exactly 1, then you successfully get back that single match. - -For example, maybe you can have - - import BackendTask exposing (BackendTask) - import BackendTask.Glob as Glob - - findBlogBySlug : String -> BackendTask FatalError String - findBlogBySlug slug = - Glob.succeed identity - |> Glob.captureFilePath - |> Glob.match (Glob.literal "blog/") - |> Glob.match (Glob.literal slug) - |> Glob.match - (Glob.oneOf - ( ( "", () ) - , [ ( "/index", () ) ] - ) - ) - |> Glob.match (Glob.literal ".md") - |> Glob.expectUniqueMatch - |> BackendTask.allowFatal - -If we used `findBlogBySlug "first-post"` with these files: - -```markdown -- blog/ - - first-post/ - - index.md -``` - -This would give us: - - results : BackendTask FatalError String - results = - BackendTask.succeed "blog/first-post/index.md" - -If we used `findBlogBySlug "first-post"` with these files: - -```markdown -- blog/ - - first-post.md - - first-post/ - - index.md -``` - -Then we will get a `BackendTask` error saying `More than one file matched.` Keep in mind that `BackendTask` failures -in build-time routes will cause a build failure, giving you the opportunity to fix the problem before users see the issue, -so it's ideal to make this kind of assertion rather than having fallback behavior that could silently cover up -issues (like if we had instead ignored the case where there are two or more matching blog post files). - -expectUniqueMatch: - BackendTask.Glob.Glob a - -> BackendTask.BackendTask { fatal : FatalError.FatalError - , recoverable : String - } a --} -expectUniqueMatch : Elm.Expression -> Elm.Expression -expectUniqueMatch expectUniqueMatchArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "expectUniqueMatch" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable", Type.string ) - ] - , Type.var "a" - ] - ) - ) - } - ) - [ expectUniqueMatchArg_ ] - - -{-| expectUniqueMatchFromList: List (BackendTask.Glob.Glob a) -> BackendTask.BackendTask String a -} -expectUniqueMatchFromList : List Elm.Expression -> Elm.Expression -expectUniqueMatchFromList expectUniqueMatchFromListArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "expectUniqueMatchFromList" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.string, Type.var "a" ] - ) - ) - } - ) - [ Elm.list expectUniqueMatchFromListArg_ ] - - -{-| Match a literal part of a path. Can include `/`s. - -Some common uses include - - - The leading part of a pattern, to say "starts with `content/blog/`" - - The ending part of a pattern, to say "ends with `.md`" - - In-between wildcards, to say "these dynamic parts are separated by `/`" - -```elm -import BackendTask exposing (BackendTask) -import BackendTask.Glob as Glob - -blogPosts = - Glob.succeed - (\section slug -> - { section = section, slug = slug } - ) - |> Glob.match (Glob.literal "content/blog/") - |> Glob.capture Glob.wildcard - |> Glob.match (Glob.literal "/") - |> Glob.capture Glob.wildcard - |> Glob.match (Glob.literal ".md") -``` - -literal: String -> BackendTask.Glob.Glob String --} -literal : String -> Elm.Expression -literal literalArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "literal" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.string ] - ) - ) - } - ) - [ Elm.string literalArg_ ] - - -{-| A `Glob` can be mapped. This can be useful for transforming a sub-match in-place. - -For example, if you wanted to take the slugs for a blog post and make sure they are normalized to be all lowercase, you -could use - - import BackendTask exposing (BackendTask) - import BackendTask.Glob as Glob - - blogPostsGlob : BackendTask error (List String) - blogPostsGlob = - Glob.succeed (\slug -> slug) - |> Glob.match (Glob.literal "content/blog/") - |> Glob.capture (Glob.wildcard |> Glob.map String.toLower) - |> Glob.match (Glob.literal ".md") - |> Glob.toBackendTask - -If you want to validate file formats, you can combine that with some `BackendTask` helpers to turn a `Glob (Result String value)` into -a `BackendTask FatalError (List value)`. - -For example, you could take a date and parse it. - - import BackendTask exposing (BackendTask) - import BackendTask.Glob as Glob - - example : BackendTask FatalError (List ( String, String )) - example = - Glob.succeed - (\dateResult slug -> - dateResult - |> Result.map (\okDate -> ( okDate, slug )) - ) - |> Glob.match (Glob.literal "blog/") - |> Glob.capture (Glob.recursiveWildcard |> Glob.map expectDateFormat) - |> Glob.match (Glob.literal "/") - |> Glob.capture Glob.wildcard - |> Glob.match (Glob.literal ".md") - |> Glob.toBackendTask - |> BackendTask.map (List.map BackendTask.fromResult) - |> BackendTask.resolve - - expectDateFormat : List String -> Result FatalError String - expectDateFormat dateParts = - case dateParts of - [ year, month, date ] -> - Ok (String.join "-" [ year, month, date ]) - - _ -> - Err <| FatalError.fromString "Unexpected date format, expected yyyy/mm/dd folder structure." - -map: (a -> b) -> BackendTask.Glob.Glob a -> BackendTask.Glob.Glob b --} -map : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -map mapArg_ mapArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function [ Type.var "a" ] (Type.var "b") - , Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "b" ] - ) - ) - } - ) - [ Elm.functionReduced "mapUnpack" mapArg_, mapArg_0 ] - - -{-| `succeed` is how you start a pipeline for a `Glob`. You will need one argument for each `capture` in your `Glob`. - -succeed: constructor -> BackendTask.Glob.Glob constructor --} -succeed : Elm.Expression -> Elm.Expression -succeed succeedArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "succeed" - , annotation = - Just - (Type.function - [ Type.var "constructor" ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "constructor" ] - ) - ) - } - ) - [ succeedArg_ ] - - -{-| import BackendTask.Glob as Glob - - type Extension - = Json - | Yml - - type alias DataFile = - { name : String - , extension : String - } - - dataFiles : BackendTask error (List DataFile) - dataFiles = - Glob.succeed DataFile - |> Glob.match (Glob.literal "my-data/") - |> Glob.capture Glob.wildcard - |> Glob.match (Glob.literal ".") - |> Glob.capture - (Glob.oneOf - ( ( "yml", Yml ) - , [ ( "json", Json ) - ] - ) - ) - -If we have the following files - -```shell -- my-data/ - - authors.yml - - events.json -``` - -That gives us - - results : BackendTask error (List DataFile) - results = - BackendTask.succeed - [ { name = "authors" - , extension = Yml - } - , { name = "events" - , extension = Json - } - ] - -You could also match an optional file path segment using `oneOf`. - - rootFilesMd : BackendTask error (List String) - rootFilesMd = - Glob.succeed (\slug -> slug) - |> Glob.match (Glob.literal "blog/") - |> Glob.capture Glob.wildcard - |> Glob.match - (Glob.oneOf - ( ( "", () ) - , [ ( "/index", () ) ] - ) - ) - |> Glob.match (Glob.literal ".md") - |> Glob.toBackendTask - -With these files: - -```markdown -- blog/ - - first-post.md - - second-post/ - - index.md -``` - -This would give us: - - results : BackendTask error (List String) - results = - BackendTask.succeed - [ "first-post" - , "second-post" - ] - -oneOf: ( ( String, a ), List ( String, a ) ) -> BackendTask.Glob.Glob a --} -oneOf : Elm.Expression -> Elm.Expression -oneOf oneOfArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "oneOf" - , annotation = - Just - (Type.function - [ Type.tuple - (Type.tuple Type.string (Type.var "a")) - (Type.list (Type.tuple Type.string (Type.var "a")) - ) - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ) - ) - } - ) - [ oneOfArg_ ] - - -{-| zeroOrMore: List String -> BackendTask.Glob.Glob (Maybe String) -} -zeroOrMore : List String -> Elm.Expression -zeroOrMore zeroOrMoreArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "zeroOrMore" - , annotation = - Just - (Type.function - [ Type.list Type.string ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.maybe Type.string ] - ) - ) - } - ) - [ Elm.list (List.map Elm.string zeroOrMoreArg_) ] - - -{-| atLeastOne: ( ( String, a ), List ( String, a ) ) -> BackendTask.Glob.Glob ( a, List a ) -} -atLeastOne : Elm.Expression -> Elm.Expression -atLeastOne atLeastOneArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "atLeastOne" - , annotation = - Just - (Type.function - [ Type.tuple - (Type.tuple Type.string (Type.var "a")) - (Type.list (Type.tuple Type.string (Type.var "a")) - ) - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.tuple - (Type.var "a") - (Type.list (Type.var "a")) - ] - ) - ) - } - ) - [ atLeastOneArg_ ] - - -{-| In order to get match data from your glob, turn it into a `BackendTask` with this function. - -toBackendTask: BackendTask.Glob.Glob a -> BackendTask.BackendTask error (List a) --} -toBackendTask : Elm.Expression -> Elm.Expression -toBackendTask toBackendTaskArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "toBackendTask" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.list (Type.var "a") ] - ) - ) - } - ) - [ toBackendTaskArg_ ] - - -{-| Same as toBackendTask, but lets you set custom glob options. For example, to list folders instead of files, - - import BackendTask.Glob as Glob exposing (OnlyFolders, defaultOptions) - - matchingFiles : Glob a -> BackendTask error (List a) - matchingFiles glob = - glob - |> Glob.toBackendTaskWithOptions { defaultOptions | include = OnlyFolders } - -toBackendTaskWithOptions: - BackendTask.Glob.Options - -> BackendTask.Glob.Glob a - -> BackendTask.BackendTask error (List a) --} -toBackendTaskWithOptions : Elm.Expression -> Elm.Expression -> Elm.Expression -toBackendTaskWithOptions toBackendTaskWithOptionsArg_ toBackendTaskWithOptionsArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "toBackendTaskWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Options" - [] - , Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.list (Type.var "a") ] - ) - ) - } - ) - [ toBackendTaskWithOptionsArg_, toBackendTaskWithOptionsArg_0 ] - - -{-| The default options used in [`toBackendTask`](#toBackendTask). To use a custom set of options, use [`toBackendTaskWithOptions`](#toBackendTaskWithOptions). - -defaultOptions: BackendTask.Glob.Options --} -defaultOptions : Elm.Expression -defaultOptions = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "defaultOptions" - , annotation = - Just (Type.namedWith [ "BackendTask", "Glob" ] "Options" []) - } - - -annotation_ : - { glob : Type.Annotation -> Type.Annotation - , fileStats : Type.Annotation - , options : Type.Annotation - , include : Type.Annotation - } -annotation_ = - { glob = - \globArg0 -> - Type.alias - moduleName_ - "Glob" - [ globArg0 ] - (Type.namedWith - [ "BackendTask", "Internal", "Glob" ] - "Glob" - [ Type.var "a" ] - ) - , fileStats = - Type.alias - moduleName_ - "FileStats" - [] - (Type.record - [ ( "fullPath", Type.string ) - , ( "sizeInBytes", Type.int ) - , ( "lastContentChange", Type.namedWith [ "Time" ] "Posix" [] ) - , ( "lastAccess", Type.namedWith [ "Time" ] "Posix" [] ) - , ( "lastFileChange", Type.namedWith [ "Time" ] "Posix" [] ) - , ( "createdAt", Type.namedWith [ "Time" ] "Posix" [] ) - , ( "isDirectory", Type.bool ) - ] - ) - , options = - Type.alias - moduleName_ - "Options" - [] - (Type.record - [ ( "includeDotFiles", Type.bool ) - , ( "include" - , Type.namedWith [ "BackendTask", "Glob" ] "Include" [] - ) - , ( "followSymbolicLinks", Type.bool ) - , ( "caseSensitiveMatch", Type.bool ) - , ( "gitignore", Type.bool ) - , ( "maxDepth", Type.maybe Type.int ) - ] - ) - , include = Type.namedWith [ "BackendTask", "Glob" ] "Include" [] - } - - -make_ : - { fileStats : - { fullPath : Elm.Expression - , sizeInBytes : Elm.Expression - , lastContentChange : Elm.Expression - , lastAccess : Elm.Expression - , lastFileChange : Elm.Expression - , createdAt : Elm.Expression - , isDirectory : Elm.Expression - } - -> Elm.Expression - , options : - { includeDotFiles : Elm.Expression - , include : Elm.Expression - , followSymbolicLinks : Elm.Expression - , caseSensitiveMatch : Elm.Expression - , gitignore : Elm.Expression - , maxDepth : Elm.Expression - } - -> Elm.Expression - , onlyFiles : Elm.Expression - , onlyFolders : Elm.Expression - , filesAndFolders : Elm.Expression - } -make_ = - { fileStats = - \fileStats_args -> - Elm.withType - (Type.alias - [ "BackendTask", "Glob" ] - "FileStats" - [] - (Type.record - [ ( "fullPath", Type.string ) - , ( "sizeInBytes", Type.int ) - , ( "lastContentChange" - , Type.namedWith [ "Time" ] "Posix" [] - ) - , ( "lastAccess" - , Type.namedWith [ "Time" ] "Posix" [] - ) - , ( "lastFileChange" - , Type.namedWith [ "Time" ] "Posix" [] - ) - , ( "createdAt" - , Type.namedWith [ "Time" ] "Posix" [] - ) - , ( "isDirectory", Type.bool ) - ] - ) - ) - (Elm.record - [ Tuple.pair "fullPath" fileStats_args.fullPath - , Tuple.pair "sizeInBytes" fileStats_args.sizeInBytes - , Tuple.pair - "lastContentChange" - fileStats_args.lastContentChange - , Tuple.pair "lastAccess" fileStats_args.lastAccess - , Tuple.pair "lastFileChange" fileStats_args.lastFileChange - , Tuple.pair "createdAt" fileStats_args.createdAt - , Tuple.pair "isDirectory" fileStats_args.isDirectory - ] - ) - , options = - \options_args -> - Elm.withType - (Type.alias - [ "BackendTask", "Glob" ] - "Options" - [] - (Type.record - [ ( "includeDotFiles", Type.bool ) - , ( "include" - , Type.namedWith - [ "BackendTask", "Glob" ] - "Include" - [] - ) - , ( "followSymbolicLinks", Type.bool ) - , ( "caseSensitiveMatch", Type.bool ) - , ( "gitignore", Type.bool ) - , ( "maxDepth", Type.maybe Type.int ) - ] - ) - ) - (Elm.record - [ Tuple.pair "includeDotFiles" options_args.includeDotFiles - , Tuple.pair "include" options_args.include - , Tuple.pair - "followSymbolicLinks" - options_args.followSymbolicLinks - , Tuple.pair - "caseSensitiveMatch" - options_args.caseSensitiveMatch - , Tuple.pair "gitignore" options_args.gitignore - , Tuple.pair "maxDepth" options_args.maxDepth - ] - ) - , onlyFiles = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "OnlyFiles" - , annotation = Just (Type.namedWith [] "Include" []) - } - , onlyFolders = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "OnlyFolders" - , annotation = Just (Type.namedWith [] "Include" []) - } - , filesAndFolders = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "FilesAndFolders" - , annotation = Just (Type.namedWith [] "Include" []) - } - } - - -caseOf_ : - { include : - Elm.Expression - -> { onlyFiles : Elm.Expression - , onlyFolders : Elm.Expression - , filesAndFolders : Elm.Expression - } - -> Elm.Expression - } -caseOf_ = - { include = - \includeExpression includeTags -> - Elm.Case.custom - includeExpression - (Type.namedWith [ "BackendTask", "Glob" ] "Include" []) - [ Elm.Case.branch - (Elm.Arg.customType "OnlyFiles" includeTags.onlyFiles) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "OnlyFolders" includeTags.onlyFolders) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "FilesAndFolders" - includeTags.filesAndFolders - ) - Basics.identity - ] - } - - -call_ : - { capture : Elm.Expression -> Elm.Expression -> Elm.Expression - , match : Elm.Expression -> Elm.Expression -> Elm.Expression - , fromString : Elm.Expression -> Elm.Expression - , fromStringWithOptions : Elm.Expression -> Elm.Expression -> Elm.Expression - , captureFilePath : Elm.Expression -> Elm.Expression - , captureStats : Elm.Expression -> Elm.Expression - , expectUniqueMatch : Elm.Expression -> Elm.Expression - , expectUniqueMatchFromList : Elm.Expression -> Elm.Expression - , literal : Elm.Expression -> Elm.Expression - , map : Elm.Expression -> Elm.Expression -> Elm.Expression - , succeed : Elm.Expression -> Elm.Expression - , oneOf : Elm.Expression -> Elm.Expression - , zeroOrMore : Elm.Expression -> Elm.Expression - , atLeastOne : Elm.Expression -> Elm.Expression - , toBackendTask : Elm.Expression -> Elm.Expression - , toBackendTaskWithOptions : - Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { capture = - \captureArg_ captureArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "capture" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - , Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.function - [ Type.var "a" ] - (Type.var "value") - ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ) - ) - } - ) - [ captureArg_, captureArg_0 ] - , match = - \matchArg_ matchArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "match" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - , Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ) - ) - } - ) - [ matchArg_, matchArg_0 ] - , fromString = - \fromStringArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "fromString" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.list Type.string - ] - ) - ) - } - ) - [ fromStringArg_ ] - , fromStringWithOptions = - \fromStringWithOptionsArg_ fromStringWithOptionsArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "fromStringWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Options" - [] - , Type.string - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.list Type.string - ] - ) - ) - } - ) - [ fromStringWithOptionsArg_, fromStringWithOptionsArg_0 ] - , captureFilePath = - \captureFilePathArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "captureFilePath" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.function - [ Type.string ] - (Type.var "value") - ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ) - ) - } - ) - [ captureFilePathArg_ ] - , captureStats = - \captureStatsArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "captureStats" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "FileStats" - [] - ] - (Type.var "value") - ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ) - ) - } - ) - [ captureStatsArg_ ] - , expectUniqueMatch = - \expectUniqueMatchArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "expectUniqueMatch" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable", Type.string ) - ] - , Type.var "a" - ] - ) - ) - } - ) - [ expectUniqueMatchArg_ ] - , expectUniqueMatchFromList = - \expectUniqueMatchFromListArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "expectUniqueMatchFromList" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.string, Type.var "a" ] - ) - ) - } - ) - [ expectUniqueMatchFromListArg_ ] - , literal = - \literalArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "literal" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.string ] - ) - ) - } - ) - [ literalArg_ ] - , map = - \mapArg_ mapArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" ] - (Type.var "b") - , Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "b" ] - ) - ) - } - ) - [ mapArg_, mapArg_0 ] - , succeed = - \succeedArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "succeed" - , annotation = - Just - (Type.function - [ Type.var "constructor" ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "constructor" ] - ) - ) - } - ) - [ succeedArg_ ] - , oneOf = - \oneOfArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "oneOf" - , annotation = - Just - (Type.function - [ Type.tuple - (Type.tuple Type.string (Type.var "a")) - (Type.list - (Type.tuple Type.string (Type.var "a")) - ) - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ) - ) - } - ) - [ oneOfArg_ ] - , zeroOrMore = - \zeroOrMoreArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "zeroOrMore" - , annotation = - Just - (Type.function - [ Type.list Type.string ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.maybe Type.string ] - ) - ) - } - ) - [ zeroOrMoreArg_ ] - , atLeastOne = - \atLeastOneArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "atLeastOne" - , annotation = - Just - (Type.function - [ Type.tuple - (Type.tuple Type.string (Type.var "a")) - (Type.list - (Type.tuple Type.string (Type.var "a")) - ) - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.tuple - (Type.var "a") - (Type.list (Type.var "a")) - ] - ) - ) - } - ) - [ atLeastOneArg_ ] - , toBackendTask = - \toBackendTaskArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "toBackendTask" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.list (Type.var "a") - ] - ) - ) - } - ) - [ toBackendTaskArg_ ] - , toBackendTaskWithOptions = - \toBackendTaskWithOptionsArg_ toBackendTaskWithOptionsArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "toBackendTaskWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Options" - [] - , Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.list (Type.var "a") - ] - ) - ) - } - ) - [ toBackendTaskWithOptionsArg_, toBackendTaskWithOptionsArg_0 ] - } - - -values_ : - { capture : Elm.Expression - , match : Elm.Expression - , fromString : Elm.Expression - , fromStringWithOptions : Elm.Expression - , captureFilePath : Elm.Expression - , wildcard : Elm.Expression - , recursiveWildcard : Elm.Expression - , int : Elm.Expression - , digits : Elm.Expression - , captureStats : Elm.Expression - , expectUniqueMatch : Elm.Expression - , expectUniqueMatchFromList : Elm.Expression - , literal : Elm.Expression - , map : Elm.Expression - , succeed : Elm.Expression - , oneOf : Elm.Expression - , zeroOrMore : Elm.Expression - , atLeastOne : Elm.Expression - , toBackendTask : Elm.Expression - , toBackendTaskWithOptions : Elm.Expression - , defaultOptions : Elm.Expression - } -values_ = - { capture = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "capture" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - , Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.function [ Type.var "a" ] (Type.var "value") - ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ) - ) - } - , match = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "match" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - , Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ) - ) - } - , fromString = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "fromString" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.list Type.string ] - ) - ) - } - , fromStringWithOptions = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "fromStringWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith [ "BackendTask", "Glob" ] "Options" [] - , Type.string - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.list Type.string ] - ) - ) - } - , captureFilePath = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "captureFilePath" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.function [ Type.string ] (Type.var "value") - ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ) - ) - } - , wildcard = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "wildcard" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.string ] - ) - } - , recursiveWildcard = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "recursiveWildcard" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.list Type.string ] - ) - } - , int = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "int" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.int ] - ) - } - , digits = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "digits" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.string ] - ) - } - , captureStats = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "captureStats" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "FileStats" - [] - ] - (Type.var "value") - ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "value" ] - ) - ) - } - , expectUniqueMatch = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "expectUniqueMatch" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable", Type.string ) - ] - , Type.var "a" - ] - ) - ) - } - , expectUniqueMatchFromList = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "expectUniqueMatchFromList" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ) - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.string, Type.var "a" ] - ) - ) - } - , literal = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "literal" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.string ] - ) - ) - } - , map = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function [ Type.var "a" ] (Type.var "b") - , Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "b" ] - ) - ) - } - , succeed = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "succeed" - , annotation = - Just - (Type.function - [ Type.var "constructor" ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "constructor" ] - ) - ) - } - , oneOf = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "oneOf" - , annotation = - Just - (Type.function - [ Type.tuple - (Type.tuple Type.string (Type.var "a")) - (Type.list (Type.tuple Type.string (Type.var "a"))) - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ) - ) - } - , zeroOrMore = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "zeroOrMore" - , annotation = - Just - (Type.function - [ Type.list Type.string ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.maybe Type.string ] - ) - ) - } - , atLeastOne = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "atLeastOne" - , annotation = - Just - (Type.function - [ Type.tuple - (Type.tuple Type.string (Type.var "a")) - (Type.list (Type.tuple Type.string (Type.var "a"))) - ] - (Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.tuple - (Type.var "a") - (Type.list (Type.var "a")) - ] - ) - ) - } - , toBackendTask = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "toBackendTask" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.list (Type.var "a") ] - ) - ) - } - , toBackendTaskWithOptions = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "toBackendTaskWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith [ "BackendTask", "Glob" ] "Options" [] - , Type.namedWith - [ "BackendTask", "Glob" ] - "Glob" - [ Type.var "a" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.list (Type.var "a") ] - ) - ) - } - , defaultOptions = - Elm.value - { importFrom = [ "BackendTask", "Glob" ] - , name = "defaultOptions" - , annotation = - Just (Type.namedWith [ "BackendTask", "Glob" ] "Options" []) - } - } \ No newline at end of file diff --git a/codegen/Gen/BackendTask/Random.elm b/codegen/Gen/BackendTask/Random.elm deleted file mode 100644 index c2a93ed8..00000000 --- a/codegen/Gen/BackendTask/Random.elm +++ /dev/null @@ -1,166 +0,0 @@ -module Gen.BackendTask.Random exposing - ( moduleName_, generate, int32, call_, values_ - ) - -{-| -# Generated bindings for BackendTask.Random - -@docs moduleName_, generate, int32, call_, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "BackendTask", "Random" ] - - -{-| Takes an `elm/random` `Random.Generator` and runs it using a randomly generated initial seed. - - type alias Data = - { randomData : ( Int, Float ) - } - - data : BackendTask FatalError Data - data = - BackendTask.map Data - (BackendTask.Random.generate generator) - - generator : Random.Generator ( Int, Float ) - generator = - Random.map2 Tuple.pair (Random.int 0 100) (Random.float 0 100) - -The random initial seed is generated using -to generate a single 32-bit Integer. That 32-bit Integer is then used with `Random.initialSeed` to create an Elm Random.Seed value. -Then that `Seed` used to run the `Generator`. - -Note that this is different than `elm/random`'s `Random.generate`. This difference shouldn't be problematic, and in fact the `BackendTask` -random seed generation is more cryptographically independent because you can't determine the -random seed based solely on the time at which it is run. Each time you call `BackendTask.generate` it uses a newly -generated random seed to run the `Random.Generator` that is passed in. In contrast, `elm/random`'s `Random.generate` -generates an initial seed using `Time.now`, and then continues with that same seed using using [`Random.step`](https://package.elm-lang.org/packages/elm/random/latest/Random#step) -to get new random values after that. You can [see the implementation here](https://github.com/elm/random/blob/c1c9da4d861363cee1c93382d2687880279ed0dd/src/Random.elm#L865-L896). -However, `elm/random` is still not suitable in general for cryptographic uses of random because it uses 32-bits for when it -steps through new seeds while running a single `Random.Generator`. - -generate: Random.Generator value -> BackendTask.BackendTask error value --} -generate : Elm.Expression -> Elm.Expression -generate generateArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Random" ] - , name = "generate" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Random" ] - "Generator" - [ Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - ) - [ generateArg_ ] - - -{-| Gives a random 32-bit Int. This can be useful if you want to do low-level things with a cryptographically sound -random 32-bit integer. - -The value comes from running this code in Node using : - -```js -import * as crypto from "node:crypto"; - -crypto.getRandomValues(new Uint32Array(1))[0] -``` - -int32: BackendTask.BackendTask error Int --} -int32 : Elm.Expression -int32 = - Elm.value - { importFrom = [ "BackendTask", "Random" ] - , name = "int32" - , annotation = - Just - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.int ] - ) - } - - -call_ : { generate : Elm.Expression -> Elm.Expression } -call_ = - { generate = - \generateArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Random" ] - , name = "generate" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Random" ] - "Generator" - [ Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - ) - [ generateArg_ ] - } - - -values_ : { generate : Elm.Expression, int32 : Elm.Expression } -values_ = - { generate = - Elm.value - { importFrom = [ "BackendTask", "Random" ] - , name = "generate" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Random" ] - "Generator" - [ Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - , int32 = - Elm.value - { importFrom = [ "BackendTask", "Random" ] - , name = "int32" - , annotation = - Just - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.int ] - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/BackendTask/Stream.elm b/codegen/Gen/BackendTask/Stream.elm deleted file mode 100644 index 934f0f3d..00000000 --- a/codegen/Gen/BackendTask/Stream.elm +++ /dev/null @@ -1,3163 +0,0 @@ -module Gen.BackendTask.Stream exposing - ( moduleName_, pipe, fileRead, fileWrite, fromString, http - , httpWithInput, stdin, stdout, stderr, read, readJson, readMetadata - , run, command, commandWithOptions, defaultCommandOptions, allowNon0Status, withOutput, withTimeout - , gzip, unzip, customRead, customWrite, customDuplex, customReadWithMeta, customTransformWithMeta - , customWriteWithMeta, annotation_, make_, caseOf_, call_, values_ - ) - -{-| -# Generated bindings for BackendTask.Stream - -@docs moduleName_, pipe, fileRead, fileWrite, fromString, http -@docs httpWithInput, stdin, stdout, stderr, read, readJson -@docs readMetadata, run, command, commandWithOptions, defaultCommandOptions, allowNon0Status -@docs withOutput, withTimeout, gzip, unzip, customRead, customWrite -@docs customDuplex, customReadWithMeta, customTransformWithMeta, customWriteWithMeta, annotation_, make_ -@docs caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "BackendTask", "Stream" ] - - -{-| You can build up a pipeline of streams by using the `pipe` function. - -The stream you are piping to must be writable (`{ write : () }`), -and the stream you are piping from must be readable (`{ read : () }`). - - module HelloWorld exposing (run) - - import BackendTask - import BackendTask.Stream as Stream - import Pages.Script as Script exposing (Script) - - run : Script - run = - Script.withoutCliOptions - (Stream.fromString "Hello, World!" - |> Stream.stdout - |> Stream.run - ) - -pipe: - BackendTask.Stream.Stream errorTo metaTo { read : toReadable, write : () } - -> BackendTask.Stream.Stream errorFrom metaFrom { read : () - , write : fromWriteable - } - -> BackendTask.Stream.Stream errorTo metaTo { read : toReadable - , write : fromWriteable - } --} -pipe : Elm.Expression -> Elm.Expression -> Elm.Expression -pipe pipeArg_ pipeArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "pipe" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "errorTo" - , Type.var "metaTo" - , Type.record - [ ( "read", Type.var "toReadable" ) - , ( "write", Type.unit ) - ] - ] - , Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "errorFrom" - , Type.var "metaFrom" - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.var "fromWriteable" ) - ] - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "errorTo" - , Type.var "metaTo" - , Type.record - [ ( "read", Type.var "toReadable" ) - , ( "write", Type.var "fromWriteable" ) - ] - ] - ) - ) - } - ) - [ pipeArg_, pipeArg_0 ] - - -{-| Open a file's contents as a Stream. - - module ReadFile exposing (run) - - import BackendTask - import BackendTask.Stream as Stream - import Pages.Script as Script exposing (Script) - - run : Script - run = - Script.withoutCliOptions - (Stream.fileRead "elm.json" - |> Stream.readJson (Decode.field "source-directories" (Decode.list Decode.string)) - |> BackendTask.allowFatal - |> BackendTask.andThen - (\{ body } -> - Script.log - ("The source directories are: " - ++ String.join ", " body - ) - ) - ) - -If you want to read a file but don't need to use any of the other Stream functions, you can use [`BackendTask.File.read`](BackendTask-File#rawFile) instead. - -fileRead: String -> BackendTask.Stream.Stream () () { read : (), write : Basics.Never } --} -fileRead : String -> Elm.Expression -fileRead fileReadArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "fileRead" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith [ "Basics" ] "Never" [] - ) - ] - ] - ) - ) - } - ) - [ Elm.string fileReadArg_ ] - - -{-| Write a Stream to a file. - - module WriteFile exposing (run) - - import BackendTask - import BackendTask.Stream as Stream - import Pages.Script as Script exposing (Script) - - run : Script - run = - Script.withoutCliOptions - (Stream.fileRead "logs.txt" - |> Stream.pipe (Stream.command "grep" [ "error" ]) - |> Stream.pipe (Stream.fileWrite "errors.txt") - ) - -fileWrite: String -> BackendTask.Stream.Stream () () { read : Basics.Never, write : () } --} -fileWrite : String -> Elm.Expression -fileWrite fileWriteArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "fileWrite" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read" - , Type.namedWith [ "Basics" ] "Never" [] - ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - ) - [ Elm.string fileWriteArg_ ] - - -{-| A handy way to turn either a hardcoded String, or any other value from Elm into a Stream. - - module HelloWorld exposing (run) - - import BackendTask - import BackendTask.Stream as Stream - import Pages.Script as Script exposing (Script) - - run : Script - run = - Script.withoutCliOptions - (Stream.fromString "Hello, World!" - |> Stream.stdout - |> Stream.run - |> BackendTask.allowFatal - ) - -A more programmatic use of `fromString` to use the result of a previous `BackendTask` to a `Stream`: - - module HelloWorld exposing (run) - - import BackendTask - import BackendTask.Stream as Stream - import Pages.Script as Script exposing (Script) - - run : Script - run = - Script.withoutCliOptions - (Glob.fromString "src/**/*.elm" - |> BackendTask.andThen - (\elmFiles -> - elmFiles - |> String.join ", " - |> Stream.fromString - |> Stream.pipe Stream.stdout - |> Stream.run - ) - ) - -fromString: String -> BackendTask.Stream.Stream () () { read : (), write : Basics.Never } --} -fromString : String -> Elm.Expression -fromString fromStringArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "fromString" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith [ "Basics" ] "Never" [] - ) - ] - ] - ) - ) - } - ) - [ Elm.string fromStringArg_ ] - - -{-| Uses a regular HTTP request body (not a `Stream`). Streams the HTTP response body. - -If you want to pass a stream as the request body, use [`httpWithInput`](#httpWithInput) instead. - -If you don't need to stream the response body, you can use the functions from [`BackendTask.Http`](BackendTask-Http) instead. - -http: - { url : String - , method : String - , headers : List ( String, String ) - , body : BackendTask.Http.Body - , retries : Maybe Int - , timeoutInMs : Maybe Int - } - -> BackendTask.Stream.Stream BackendTask.Http.Error BackendTask.Http.Metadata { read : - () - , write : Basics.Never - } --} -http : - { url : String - , method : String - , headers : List Elm.Expression - , body : Elm.Expression - , retries : Elm.Expression - , timeoutInMs : Elm.Expression - } - -> Elm.Expression -http httpArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "http" - , annotation = - Just - (Type.function - [ Type.record - [ ( "url", Type.string ) - , ( "method", Type.string ) - , ( "headers" - , Type.list (Type.tuple Type.string Type.string) - ) - , ( "body" - , Type.namedWith - [ "BackendTask", "Http" ] - "Body" - [] - ) - , ( "retries", Type.maybe Type.int ) - , ( "timeoutInMs", Type.maybe Type.int ) - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.namedWith - [ "BackendTask", "Http" ] - "Error" - [] - , Type.namedWith - [ "BackendTask", "Http" ] - "Metadata" - [] - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith [ "Basics" ] "Never" [] - ) - ] - ] - ) - ) - } - ) - [ Elm.record - [ Tuple.pair "url" (Elm.string httpArg_.url) - , Tuple.pair "method" (Elm.string httpArg_.method) - , Tuple.pair "headers" (Elm.list httpArg_.headers) - , Tuple.pair "body" httpArg_.body - , Tuple.pair "retries" httpArg_.retries - , Tuple.pair "timeoutInMs" httpArg_.timeoutInMs - ] - ] - - -{-| Streams the data from the input stream as the body of the HTTP request. The HTTP response body becomes the output stream. - -httpWithInput: - { url : String - , method : String - , headers : List ( String, String ) - , retries : Maybe Int - , timeoutInMs : Maybe Int - } - -> BackendTask.Stream.Stream BackendTask.Http.Error BackendTask.Http.Metadata { read : - () - , write : () - } --} -httpWithInput : - { url : String - , method : String - , headers : List Elm.Expression - , retries : Elm.Expression - , timeoutInMs : Elm.Expression - } - -> Elm.Expression -httpWithInput httpWithInputArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "httpWithInput" - , annotation = - Just - (Type.function - [ Type.record - [ ( "url", Type.string ) - , ( "method", Type.string ) - , ( "headers" - , Type.list (Type.tuple Type.string Type.string) - ) - , ( "retries", Type.maybe Type.int ) - , ( "timeoutInMs", Type.maybe Type.int ) - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.namedWith - [ "BackendTask", "Http" ] - "Error" - [] - , Type.namedWith - [ "BackendTask", "Http" ] - "Metadata" - [] - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - ) - [ Elm.record - [ Tuple.pair "url" (Elm.string httpWithInputArg_.url) - , Tuple.pair "method" (Elm.string httpWithInputArg_.method) - , Tuple.pair "headers" (Elm.list httpWithInputArg_.headers) - , Tuple.pair "retries" httpWithInputArg_.retries - , Tuple.pair "timeoutInMs" httpWithInputArg_.timeoutInMs - ] - ] - - -{-| The `stdin` from the process. When you execute an `elm-pages` script, this will be the value that is piped in to it. For example, given this script module: - - module CountLines exposing (run) - - import BackendTask - import BackendTask.Stream as Stream - import Pages.Script as Script exposing (Script) - - run : Script - run = - Script.withoutCliOptions - (Stream.stdin - |> Stream.read - |> BackendTask.allowFatal - |> BackendTask.andThen - (\{ body } -> - body - |> String.lines - |> List.length - |> String.fromInt - |> Script.log - ) - ) - -If you run the script without any stdin, it will wait until stdin is closed. - -```shell -elm-pages run script/src/CountLines.elm -# pressing ctrl-d (or your platform-specific way of closing stdin) will print the number of lines in the input -``` - -Or you can pipe to it and it will read that input: - -```shell -ls | elm-pages run script/src/CountLines.elm -# prints the number of files in the current directory -``` - -stdin: BackendTask.Stream.Stream () () { read : (), write : Basics.Never } --} -stdin : Elm.Expression -stdin = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "stdin" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.namedWith [ "Basics" ] "Never" [] ) - ] - ] - ) - } - - -{-| Streaming through to stdout can be a convenient way to print a pipeline directly without going through to Elm. - - module UnzipFile exposing (run) - - import BackendTask - import BackendTask.Stream as Stream - import Pages.Script as Script exposing (Script) - - run : Script - run = - Script.withoutCliOptions - (Stream.fileRead "data.gzip.txt" - |> Stream.pipe Stream.unzip - |> Stream.pipe Stream.stdout - |> Stream.run - |> BackendTask.allowFatal - ) - -stdout: BackendTask.Stream.Stream () () { read : Basics.Never, write : () } --} -stdout : Elm.Expression -stdout = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "stdout" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.namedWith [ "Basics" ] "Never" [] ) - , ( "write", Type.unit ) - ] - ] - ) - } - - -{-| Similar to [`stdout`](#stdout), but writes to `stderr` instead. - -stderr: BackendTask.Stream.Stream () () { read : Basics.Never, write : () } --} -stderr : Elm.Expression -stderr = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "stderr" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.namedWith [ "Basics" ] "Never" [] ) - , ( "write", Type.unit ) - ] - ] - ) - } - - -{-| Read the body of the `Stream` as text. - -read: - BackendTask.Stream.Stream error metadata { read : (), write : write } - -> BackendTask.BackendTask { fatal : FatalError.FatalError - , recoverable : BackendTask.Stream.Error error String - } { metadata : metadata, body : String } --} -read : Elm.Expression -> Elm.Expression -read readArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "read" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.var "write" ) - ] - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Stream" ] - "Error" - [ Type.var "error", Type.string ] - ) - ] - , Type.record - [ ( "metadata", Type.var "metadata" ) - , ( "body", Type.string ) - ] - ] - ) - ) - } - ) - [ readArg_ ] - - -{-| Read the body of the `Stream` as JSON. - - module ReadJson exposing (run) - - import BackendTask - import BackendTask.Stream as Stream - import Json.Decode as Decode - import Pages.Script as Script exposing (Script) - - run : Script - run = - Script.withoutCliOptions - (Stream.fileRead "data.json" - |> Stream.readJson (Decode.field "name" Decode.string) - |> BackendTask.allowFatal - |> BackendTask.andThen - (\{ body } -> - Script.log ("The name is: " ++ body) - ) - ) - -readJson: - Json.Decode.Decoder value - -> BackendTask.Stream.Stream error metadata { read : (), write : write } - -> BackendTask.BackendTask { fatal : FatalError.FatalError - , recoverable : BackendTask.Stream.Error error value - } { metadata : metadata, body : value } --} -readJson : Elm.Expression -> Elm.Expression -> Elm.Expression -readJson readJsonArg_ readJsonArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "readJson" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "value" ] - , Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.var "write" ) - ] - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Stream" ] - "Error" - [ Type.var "error", Type.var "value" ] - ) - ] - , Type.record - [ ( "metadata", Type.var "metadata" ) - , ( "body", Type.var "value" ) - ] - ] - ) - ) - } - ) - [ readJsonArg_, readJsonArg_0 ] - - -{-| Ignore the body of the `Stream`, while capturing the metadata from the final part of the Stream. - -readMetadata: - BackendTask.Stream.Stream error metadata { read : read, write : write } - -> BackendTask.BackendTask { fatal : FatalError.FatalError - , recoverable : BackendTask.Stream.Error error String - } metadata --} -readMetadata : Elm.Expression -> Elm.Expression -readMetadata readMetadataArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "readMetadata" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.var "read" ) - , ( "write", Type.var "write" ) - ] - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Stream" ] - "Error" - [ Type.var "error", Type.string ] - ) - ] - , Type.var "metadata" - ] - ) - ) - } - ) - [ readMetadataArg_ ] - - -{-| Gives a `BackendTask` to execute the `Stream`, ignoring its body and metadata. - -This is useful if you only want the side-effect from the `Stream` and don't need to programmatically use its -output. For example, if the end result you want is: - - - Printing to the console - - Writing to a file - - Making an HTTP request - -If you need to read the output of the `Stream`, use [`read`](#read), [`readJson`](#readJson), or [`readMetadata`](#readMetadata) instead. - -run: - BackendTask.Stream.Stream error metadata kind - -> BackendTask.BackendTask FatalError.FatalError () --} -run : Elm.Expression -> Elm.Expression -run runArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "run" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.var "kind" - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.unit - ] - ) - ) - } - ) - [ runArg_ ] - - -{-| Run a command (or `child_process`). The command's output becomes the body of the `Stream`. - -command: - String - -> List String - -> BackendTask.Stream.Stream Int () { read : read, write : write } --} -command : String -> List String -> Elm.Expression -command commandArg_ commandArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "command" - , annotation = - Just - (Type.function - [ Type.string, Type.list Type.string ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.int - , Type.unit - , Type.record - [ ( "read", Type.var "read" ) - , ( "write", Type.var "write" ) - ] - ] - ) - ) - } - ) - [ Elm.string commandArg_, Elm.list (List.map Elm.string commandArg_0) ] - - -{-| Pass in custom [`CommandOptions`](#CommandOptions) to configure the behavior of the command. - -For example, `grep` will return a non-zero status code if it doesn't find any matches. To ignore the non-zero status code and proceed with -empty output, you can use `allowNon0Status`. - - module GrepErrors exposing (run) - - import BackendTask - import BackendTask.Stream as Stream - import Pages.Script as Script exposing (Script) - - run : Script - run = - Script.withoutCliOptions - (Stream.fileRead "log.txt" - |> Stream.pipe - (Stream.commandWithOptions - (Stream.defaultCommandOptions |> Stream.allowNon0Status) - "grep" - [ "error" ] - ) - |> Stream.pipe Stream.stdout - |> Stream.run - ) - -commandWithOptions: - BackendTask.Stream.CommandOptions - -> String - -> List String - -> BackendTask.Stream.Stream Int () { read : read, write : write } --} -commandWithOptions : Elm.Expression -> String -> List String -> Elm.Expression -commandWithOptions commandWithOptionsArg_ commandWithOptionsArg_0 commandWithOptionsArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "commandWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - , Type.string - , Type.list Type.string - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.int - , Type.unit - , Type.record - [ ( "read", Type.var "read" ) - , ( "write", Type.var "write" ) - ] - ] - ) - ) - } - ) - [ commandWithOptionsArg_ - , Elm.string commandWithOptionsArg_0 - , Elm.list (List.map Elm.string commandWithOptionsArg_1) - ] - - -{-| The default options that are used for [`command`](#command). Used to build up `CommandOptions` -to pass in to [`commandWithOptions`](#commandWithOptions). - -defaultCommandOptions: BackendTask.Stream.CommandOptions --} -defaultCommandOptions : Elm.Expression -defaultCommandOptions = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "defaultCommandOptions" - , annotation = - Just - (Type.namedWith [ "BackendTask", "Stream" ] "CommandOptions" []) - } - - -{-| By default, the `Stream` will halt with an error if a command returns a non-zero status code. - -With `allowNon0Status`, the stream will continue without an error if the command returns a non-zero status code. - -allowNon0Status: BackendTask.Stream.CommandOptions -> BackendTask.Stream.CommandOptions --} -allowNon0Status : Elm.Expression -> Elm.Expression -allowNon0Status allowNon0StatusArg_ = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "allowNon0Status" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ) - ) - } - ) - [ allowNon0StatusArg_ ] - - -{-| Configure the [`StderrOutput`](#StderrOutput) behavior. - -withOutput: - BackendTask.Stream.StderrOutput - -> BackendTask.Stream.CommandOptions - -> BackendTask.Stream.CommandOptions --} -withOutput : Elm.Expression -> Elm.Expression -> Elm.Expression -withOutput withOutputArg_ withOutputArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "withOutput" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "StderrOutput" - [] - , Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ) - ) - } - ) - [ withOutputArg_, withOutputArg_0 ] - - -{-| By default, commands do not have a timeout. This will set the timeout, in milliseconds, for the given command. If that duration is exceeded, -the `Stream` will fail with an error. - -withTimeout: Int -> BackendTask.Stream.CommandOptions -> BackendTask.Stream.CommandOptions --} -withTimeout : Int -> Elm.Expression -> Elm.Expression -withTimeout withTimeoutArg_ withTimeoutArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "withTimeout" - , annotation = - Just - (Type.function - [ Type.int - , Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ) - ) - } - ) - [ Elm.int withTimeoutArg_, withTimeoutArg_0 ] - - -{-| Transforms the input with gzip compression. - -Under the hood this builds a Stream using Node's [`zlib.createGzip`](https://nodejs.org/api/zlib.html#zlibcreategzipoptions). - -gzip: BackendTask.Stream.Stream () () { read : (), write : () } --} -gzip : Elm.Expression -gzip = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "gzip" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ), ( "write", Type.unit ) ] - ] - ) - } - - -{-| Transforms the input by auto-detecting the header and decompressing either a Gzip- or Deflate-compressed stream. - -Under the hood, this builds a Stream using Node's [`zlib.createUnzip`](https://nodejs.org/api/zlib.html#zlibcreateunzip). - -unzip: BackendTask.Stream.Stream () () { read : (), write : () } --} -unzip : Elm.Expression -unzip = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "unzip" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ), ( "write", Type.unit ) ] - ] - ) - } - - -{-| Calls an async function from your `custom-backend-task` definitions and uses the NodeJS `ReadableStream` it returns. - -customRead: - String - -> Json.Encode.Value - -> BackendTask.Stream.Stream () () { read : (), write : Basics.Never } --} -customRead : String -> Elm.Expression -> Elm.Expression -customRead customReadArg_ customReadArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customRead" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith [ "Basics" ] "Never" [] - ) - ] - ] - ) - ) - } - ) - [ Elm.string customReadArg_, customReadArg_0 ] - - -{-| Calls an async function from your `custom-backend-task` definitions and uses the NodeJS `WritableStream` it returns. - -customWrite: - String - -> Json.Encode.Value - -> BackendTask.Stream.Stream () () { read : Basics.Never, write : () } --} -customWrite : String -> Elm.Expression -> Elm.Expression -customWrite customWriteArg_ customWriteArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customWrite" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read" - , Type.namedWith [ "Basics" ] "Never" [] - ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - ) - [ Elm.string customWriteArg_, customWriteArg_0 ] - - -{-| Calls an async function from your `custom-backend-task` definitions and uses the NodeJS `DuplexStream` it returns. - -customDuplex: - String - -> Json.Encode.Value - -> BackendTask.Stream.Stream () () { read : (), write : () } --} -customDuplex : String -> Elm.Expression -> Elm.Expression -customDuplex customDuplexArg_ customDuplexArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customDuplex" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - ) - [ Elm.string customDuplexArg_, customDuplexArg_0 ] - - -{-| Calls an async function from your `custom-backend-task` definitions and uses the NodeJS `DuplexStream` it returns. - -customReadWithMeta: - String - -> Json.Encode.Value - -> Json.Decode.Decoder (Result.Result { fatal : FatalError.FatalError - , recoverable : error - } metadata) - -> BackendTask.Stream.Stream error metadata { read : (), write : Basics.Never } --} -customReadWithMeta : - String -> Elm.Expression -> Elm.Expression -> Elm.Expression -customReadWithMeta customReadWithMetaArg_ customReadWithMetaArg_0 customReadWithMetaArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customReadWithMeta" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable", Type.var "error" ) - ] - , Type.var "metadata" - ] - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith [ "Basics" ] "Never" [] - ) - ] - ] - ) - ) - } - ) - [ Elm.string customReadWithMetaArg_ - , customReadWithMetaArg_0 - , customReadWithMetaArg_1 - ] - - -{-| Calls an async function from your `custom-backend-task` definitions and uses the NodeJS `DuplexStream` and metadata function it returns. - -customTransformWithMeta: - String - -> Json.Encode.Value - -> Json.Decode.Decoder (Result.Result { fatal : FatalError.FatalError - , recoverable : error - } metadata) - -> BackendTask.Stream.Stream error metadata { read : (), write : () } --} -customTransformWithMeta : - String -> Elm.Expression -> Elm.Expression -> Elm.Expression -customTransformWithMeta customTransformWithMetaArg_ customTransformWithMetaArg_0 customTransformWithMetaArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customTransformWithMeta" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable", Type.var "error" ) - ] - , Type.var "metadata" - ] - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - ) - [ Elm.string customTransformWithMetaArg_ - , customTransformWithMetaArg_0 - , customTransformWithMetaArg_1 - ] - - -{-| Calls an async function from your `custom-backend-task` definitions and uses the NodeJS `WritableStream` and metadata function it returns. - -customWriteWithMeta: - String - -> Json.Encode.Value - -> Json.Decode.Decoder (Result.Result { fatal : FatalError.FatalError - , recoverable : error - } metadata) - -> BackendTask.Stream.Stream error metadata { read : Basics.Never, write : () } --} -customWriteWithMeta : - String -> Elm.Expression -> Elm.Expression -> Elm.Expression -customWriteWithMeta customWriteWithMetaArg_ customWriteWithMetaArg_0 customWriteWithMetaArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customWriteWithMeta" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable", Type.var "error" ) - ] - , Type.var "metadata" - ] - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read" - , Type.namedWith [ "Basics" ] "Never" [] - ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - ) - [ Elm.string customWriteWithMetaArg_ - , customWriteWithMetaArg_0 - , customWriteWithMetaArg_1 - ] - - -annotation_ : - { stream : - Type.Annotation -> Type.Annotation -> Type.Annotation -> Type.Annotation - , error : Type.Annotation -> Type.Annotation -> Type.Annotation - , stderrOutput : Type.Annotation - , commandOptions : Type.Annotation - } -annotation_ = - { stream = - \streamArg0 streamArg1 streamArg2 -> - Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ streamArg0, streamArg1, streamArg2 ] - , error = - \errorArg0 errorArg1 -> - Type.namedWith - [ "BackendTask", "Stream" ] - "Error" - [ errorArg0, errorArg1 ] - , stderrOutput = - Type.namedWith [ "BackendTask", "Stream" ] "StderrOutput" [] - , commandOptions = - Type.namedWith [ "BackendTask", "Stream" ] "CommandOptions" [] - } - - -make_ : - { streamError : Elm.Expression -> Elm.Expression - , customError : Elm.Expression -> Elm.Expression -> Elm.Expression - , printStderr : Elm.Expression - , ignoreStderr : Elm.Expression - , mergeStderrAndStdout : Elm.Expression - , stderrInsteadOfStdout : Elm.Expression - } -make_ = - { streamError = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "StreamError" - , annotation = - Just - (Type.namedWith - [] - "Error" - [ Type.var "error", Type.var "body" ] - ) - } - ) - [ ar0 ] - , customError = - \ar0 ar1 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "CustomError" - , annotation = - Just - (Type.namedWith - [] - "Error" - [ Type.var "error", Type.var "body" ] - ) - } - ) - [ ar0, ar1 ] - , printStderr = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "PrintStderr" - , annotation = Just (Type.namedWith [] "StderrOutput" []) - } - , ignoreStderr = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "IgnoreStderr" - , annotation = Just (Type.namedWith [] "StderrOutput" []) - } - , mergeStderrAndStdout = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "MergeStderrAndStdout" - , annotation = Just (Type.namedWith [] "StderrOutput" []) - } - , stderrInsteadOfStdout = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "StderrInsteadOfStdout" - , annotation = Just (Type.namedWith [] "StderrOutput" []) - } - } - - -caseOf_ = - { error = - \errorExpression errorTags -> - Elm.Case.custom - errorExpression - (Type.namedWith - [ "BackendTask", "Stream" ] - "Error" - [ Type.var "error", Type.var "body" ] - ) - [ Elm.Case.branch - (Elm.Arg.customType - "StreamError" - errorTags.streamError |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "CustomError" - errorTags.customError |> Elm.Arg.item - (Elm.Arg.varWith - "error" - (Type.var "error") - ) |> Elm.Arg.item - (Elm.Arg.varWith - "maybeMaybe" - (Type.maybe - (Type.var - "body" - ) - ) - ) - ) - Basics.identity - ] - , stderrOutput = - \stderrOutputExpression stderrOutputTags -> - Elm.Case.custom - stderrOutputExpression - (Type.namedWith [ "BackendTask", "Stream" ] "StderrOutput" []) - [ Elm.Case.branch - (Elm.Arg.customType - "PrintStderr" - stderrOutputTags.printStderr - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "IgnoreStderr" - stderrOutputTags.ignoreStderr - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "MergeStderrAndStdout" - stderrOutputTags.mergeStderrAndStdout - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "StderrInsteadOfStdout" - stderrOutputTags.stderrInsteadOfStdout - ) - Basics.identity - ] - } - - -call_ : - { pipe : Elm.Expression -> Elm.Expression -> Elm.Expression - , fileRead : Elm.Expression -> Elm.Expression - , fileWrite : Elm.Expression -> Elm.Expression - , fromString : Elm.Expression -> Elm.Expression - , http : Elm.Expression -> Elm.Expression - , httpWithInput : Elm.Expression -> Elm.Expression - , read : Elm.Expression -> Elm.Expression - , readJson : Elm.Expression -> Elm.Expression -> Elm.Expression - , readMetadata : Elm.Expression -> Elm.Expression - , run : Elm.Expression -> Elm.Expression - , command : Elm.Expression -> Elm.Expression -> Elm.Expression - , commandWithOptions : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , allowNon0Status : Elm.Expression -> Elm.Expression - , withOutput : Elm.Expression -> Elm.Expression -> Elm.Expression - , withTimeout : Elm.Expression -> Elm.Expression -> Elm.Expression - , customRead : Elm.Expression -> Elm.Expression -> Elm.Expression - , customWrite : Elm.Expression -> Elm.Expression -> Elm.Expression - , customDuplex : Elm.Expression -> Elm.Expression -> Elm.Expression - , customReadWithMeta : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , customTransformWithMeta : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , customWriteWithMeta : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { pipe = - \pipeArg_ pipeArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "pipe" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "errorTo" - , Type.var "metaTo" - , Type.record - [ ( "read", Type.var "toReadable" ) - , ( "write", Type.unit ) - ] - ] - , Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "errorFrom" - , Type.var "metaFrom" - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.var "fromWriteable" - ) - ] - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "errorTo" - , Type.var "metaTo" - , Type.record - [ ( "read", Type.var "toReadable" ) - , ( "write" - , Type.var "fromWriteable" - ) - ] - ] - ) - ) - } - ) - [ pipeArg_, pipeArg_0 ] - , fileRead = - \fileReadArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "fileRead" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith - [ "Basics" ] - "Never" - [] - ) - ] - ] - ) - ) - } - ) - [ fileReadArg_ ] - , fileWrite = - \fileWriteArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "fileWrite" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read" - , Type.namedWith - [ "Basics" ] - "Never" - [] - ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - ) - [ fileWriteArg_ ] - , fromString = - \fromStringArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "fromString" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith - [ "Basics" ] - "Never" - [] - ) - ] - ] - ) - ) - } - ) - [ fromStringArg_ ] - , http = - \httpArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "http" - , annotation = - Just - (Type.function - [ Type.record - [ ( "url", Type.string ) - , ( "method", Type.string ) - , ( "headers" - , Type.list - (Type.tuple Type.string Type.string) - ) - , ( "body" - , Type.namedWith - [ "BackendTask", "Http" ] - "Body" - [] - ) - , ( "retries", Type.maybe Type.int ) - , ( "timeoutInMs", Type.maybe Type.int ) - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.namedWith - [ "BackendTask", "Http" ] - "Error" - [] - , Type.namedWith - [ "BackendTask", "Http" ] - "Metadata" - [] - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith - [ "Basics" ] - "Never" - [] - ) - ] - ] - ) - ) - } - ) - [ httpArg_ ] - , httpWithInput = - \httpWithInputArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "httpWithInput" - , annotation = - Just - (Type.function - [ Type.record - [ ( "url", Type.string ) - , ( "method", Type.string ) - , ( "headers" - , Type.list - (Type.tuple Type.string Type.string) - ) - , ( "retries", Type.maybe Type.int ) - , ( "timeoutInMs", Type.maybe Type.int ) - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.namedWith - [ "BackendTask", "Http" ] - "Error" - [] - , Type.namedWith - [ "BackendTask", "Http" ] - "Metadata" - [] - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - ) - [ httpWithInputArg_ ] - , read = - \readArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "read" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.var "write" ) - ] - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Stream" ] - "Error" - [ Type.var "error" - , Type.string - ] - ) - ] - , Type.record - [ ( "metadata", Type.var "metadata" ) - , ( "body", Type.string ) - ] - ] - ) - ) - } - ) - [ readArg_ ] - , readJson = - \readJsonArg_ readJsonArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "readJson" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "value" ] - , Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.var "write" ) - ] - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Stream" ] - "Error" - [ Type.var "error" - , Type.var "value" - ] - ) - ] - , Type.record - [ ( "metadata", Type.var "metadata" ) - , ( "body", Type.var "value" ) - ] - ] - ) - ) - } - ) - [ readJsonArg_, readJsonArg_0 ] - , readMetadata = - \readMetadataArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "readMetadata" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.var "read" ) - , ( "write", Type.var "write" ) - ] - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Stream" ] - "Error" - [ Type.var "error" - , Type.string - ] - ) - ] - , Type.var "metadata" - ] - ) - ) - } - ) - [ readMetadataArg_ ] - , run = - \runArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "run" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.var "kind" - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.unit - ] - ) - ) - } - ) - [ runArg_ ] - , command = - \commandArg_ commandArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "command" - , annotation = - Just - (Type.function - [ Type.string, Type.list Type.string ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.int - , Type.unit - , Type.record - [ ( "read", Type.var "read" ) - , ( "write", Type.var "write" ) - ] - ] - ) - ) - } - ) - [ commandArg_, commandArg_0 ] - , commandWithOptions = - \commandWithOptionsArg_ commandWithOptionsArg_0 commandWithOptionsArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "commandWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - , Type.string - , Type.list Type.string - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.int - , Type.unit - , Type.record - [ ( "read", Type.var "read" ) - , ( "write", Type.var "write" ) - ] - ] - ) - ) - } - ) - [ commandWithOptionsArg_ - , commandWithOptionsArg_0 - , commandWithOptionsArg_1 - ] - , allowNon0Status = - \allowNon0StatusArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "allowNon0Status" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ) - ) - } - ) - [ allowNon0StatusArg_ ] - , withOutput = - \withOutputArg_ withOutputArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "withOutput" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "StderrOutput" - [] - , Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ) - ) - } - ) - [ withOutputArg_, withOutputArg_0 ] - , withTimeout = - \withTimeoutArg_ withTimeoutArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "withTimeout" - , annotation = - Just - (Type.function - [ Type.int - , Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ) - ) - } - ) - [ withTimeoutArg_, withTimeoutArg_0 ] - , customRead = - \customReadArg_ customReadArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customRead" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith - [ "Basics" ] - "Never" - [] - ) - ] - ] - ) - ) - } - ) - [ customReadArg_, customReadArg_0 ] - , customWrite = - \customWriteArg_ customWriteArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customWrite" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read" - , Type.namedWith - [ "Basics" ] - "Never" - [] - ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - ) - [ customWriteArg_, customWriteArg_0 ] - , customDuplex = - \customDuplexArg_ customDuplexArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customDuplex" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - ) - [ customDuplexArg_, customDuplexArg_0 ] - , customReadWithMeta = - \customReadWithMetaArg_ customReadWithMetaArg_0 customReadWithMetaArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customReadWithMeta" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.var "error" - ) - ] - , Type.var "metadata" - ] - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith - [ "Basics" ] - "Never" - [] - ) - ] - ] - ) - ) - } - ) - [ customReadWithMetaArg_ - , customReadWithMetaArg_0 - , customReadWithMetaArg_1 - ] - , customTransformWithMeta = - \customTransformWithMetaArg_ customTransformWithMetaArg_0 customTransformWithMetaArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customTransformWithMeta" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.var "error" - ) - ] - , Type.var "metadata" - ] - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - ) - [ customTransformWithMetaArg_ - , customTransformWithMetaArg_0 - , customTransformWithMetaArg_1 - ] - , customWriteWithMeta = - \customWriteWithMetaArg_ customWriteWithMetaArg_0 customWriteWithMetaArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customWriteWithMeta" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.var "error" - ) - ] - , Type.var "metadata" - ] - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read" - , Type.namedWith - [ "Basics" ] - "Never" - [] - ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - ) - [ customWriteWithMetaArg_ - , customWriteWithMetaArg_0 - , customWriteWithMetaArg_1 - ] - } - - -values_ : - { pipe : Elm.Expression - , fileRead : Elm.Expression - , fileWrite : Elm.Expression - , fromString : Elm.Expression - , http : Elm.Expression - , httpWithInput : Elm.Expression - , stdin : Elm.Expression - , stdout : Elm.Expression - , stderr : Elm.Expression - , read : Elm.Expression - , readJson : Elm.Expression - , readMetadata : Elm.Expression - , run : Elm.Expression - , command : Elm.Expression - , commandWithOptions : Elm.Expression - , defaultCommandOptions : Elm.Expression - , allowNon0Status : Elm.Expression - , withOutput : Elm.Expression - , withTimeout : Elm.Expression - , gzip : Elm.Expression - , unzip : Elm.Expression - , customRead : Elm.Expression - , customWrite : Elm.Expression - , customDuplex : Elm.Expression - , customReadWithMeta : Elm.Expression - , customTransformWithMeta : Elm.Expression - , customWriteWithMeta : Elm.Expression - } -values_ = - { pipe = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "pipe" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "errorTo" - , Type.var "metaTo" - , Type.record - [ ( "read", Type.var "toReadable" ) - , ( "write", Type.unit ) - ] - ] - , Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "errorFrom" - , Type.var "metaFrom" - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.var "fromWriteable" ) - ] - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "errorTo" - , Type.var "metaTo" - , Type.record - [ ( "read", Type.var "toReadable" ) - , ( "write", Type.var "fromWriteable" ) - ] - ] - ) - ) - } - , fileRead = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "fileRead" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith [ "Basics" ] "Never" [] - ) - ] - ] - ) - ) - } - , fileWrite = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "fileWrite" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read" - , Type.namedWith [ "Basics" ] "Never" [] - ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - , fromString = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "fromString" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith [ "Basics" ] "Never" [] - ) - ] - ] - ) - ) - } - , http = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "http" - , annotation = - Just - (Type.function - [ Type.record - [ ( "url", Type.string ) - , ( "method", Type.string ) - , ( "headers" - , Type.list (Type.tuple Type.string Type.string) - ) - , ( "body" - , Type.namedWith - [ "BackendTask", "Http" ] - "Body" - [] - ) - , ( "retries", Type.maybe Type.int ) - , ( "timeoutInMs", Type.maybe Type.int ) - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.namedWith - [ "BackendTask", "Http" ] - "Error" - [] - , Type.namedWith - [ "BackendTask", "Http" ] - "Metadata" - [] - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith [ "Basics" ] "Never" [] - ) - ] - ] - ) - ) - } - , httpWithInput = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "httpWithInput" - , annotation = - Just - (Type.function - [ Type.record - [ ( "url", Type.string ) - , ( "method", Type.string ) - , ( "headers" - , Type.list (Type.tuple Type.string Type.string) - ) - , ( "retries", Type.maybe Type.int ) - , ( "timeoutInMs", Type.maybe Type.int ) - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.namedWith - [ "BackendTask", "Http" ] - "Error" - [] - , Type.namedWith - [ "BackendTask", "Http" ] - "Metadata" - [] - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - , stdin = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "stdin" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith [ "Basics" ] "Never" [] - ) - ] - ] - ) - } - , stdout = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "stdout" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read" - , Type.namedWith [ "Basics" ] "Never" [] - ) - , ( "write", Type.unit ) - ] - ] - ) - } - , stderr = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "stderr" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read" - , Type.namedWith [ "Basics" ] "Never" [] - ) - , ( "write", Type.unit ) - ] - ] - ) - } - , read = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "read" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.var "write" ) - ] - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Stream" ] - "Error" - [ Type.var "error", Type.string ] - ) - ] - , Type.record - [ ( "metadata", Type.var "metadata" ) - , ( "body", Type.string ) - ] - ] - ) - ) - } - , readJson = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "readJson" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "value" ] - , Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.var "write" ) - ] - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Stream" ] - "Error" - [ Type.var "error", Type.var "value" ] - ) - ] - , Type.record - [ ( "metadata", Type.var "metadata" ) - , ( "body", Type.var "value" ) - ] - ] - ) - ) - } - , readMetadata = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "readMetadata" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.var "read" ) - , ( "write", Type.var "write" ) - ] - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "BackendTask", "Stream" ] - "Error" - [ Type.var "error", Type.string ] - ) - ] - , Type.var "metadata" - ] - ) - ) - } - , run = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "run" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.var "kind" - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.unit - ] - ) - ) - } - , command = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "command" - , annotation = - Just - (Type.function - [ Type.string, Type.list Type.string ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.int - , Type.unit - , Type.record - [ ( "read", Type.var "read" ) - , ( "write", Type.var "write" ) - ] - ] - ) - ) - } - , commandWithOptions = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "commandWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - , Type.string - , Type.list Type.string - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.int - , Type.unit - , Type.record - [ ( "read", Type.var "read" ) - , ( "write", Type.var "write" ) - ] - ] - ) - ) - } - , defaultCommandOptions = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "defaultCommandOptions" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ) - } - , allowNon0Status = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "allowNon0Status" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ) - ) - } - , withOutput = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "withOutput" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask", "Stream" ] - "StderrOutput" - [] - , Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ) - ) - } - , withTimeout = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "withTimeout" - , annotation = - Just - (Type.function - [ Type.int - , Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "CommandOptions" - [] - ) - ) - } - , gzip = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "gzip" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ), ( "write", Type.unit ) ] - ] - ) - } - , unzip = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "unzip" - , annotation = - Just - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ), ( "write", Type.unit ) ] - ] - ) - } - , customRead = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customRead" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith [ "Basics" ] "Never" [] - ) - ] - ] - ) - ) - } - , customWrite = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customWrite" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read" - , Type.namedWith [ "Basics" ] "Never" [] - ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - , customDuplex = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customDuplex" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.unit - , Type.unit - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - , customReadWithMeta = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customReadWithMeta" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable", Type.var "error" ) - ] - , Type.var "metadata" - ] - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.unit ) - , ( "write" - , Type.namedWith [ "Basics" ] "Never" [] - ) - ] - ] - ) - ) - } - , customTransformWithMeta = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customTransformWithMeta" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable", Type.var "error" ) - ] - , Type.var "metadata" - ] - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read", Type.unit ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - , customWriteWithMeta = - Elm.value - { importFrom = [ "BackendTask", "Stream" ] - , name = "customWriteWithMeta" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable", Type.var "error" ) - ] - , Type.var "metadata" - ] - ] - ] - (Type.namedWith - [ "BackendTask", "Stream" ] - "Stream" - [ Type.var "error" - , Type.var "metadata" - , Type.record - [ ( "read" - , Type.namedWith [ "Basics" ] "Never" [] - ) - , ( "write", Type.unit ) - ] - ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/BackendTask/Time.elm b/codegen/Gen/BackendTask/Time.elm deleted file mode 100644 index ec89104a..00000000 --- a/codegen/Gen/BackendTask/Time.elm +++ /dev/null @@ -1,73 +0,0 @@ -module Gen.BackendTask.Time exposing ( moduleName_, now, values_ ) - -{-| -# Generated bindings for BackendTask.Time - -@docs moduleName_, now, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "BackendTask", "Time" ] - - -{-| Gives a `Time.Posix` of when the `BackendTask` executes. - - type alias Data = - { time : Time.Posix - } - - data : BackendTask FatalError Data - data = - BackendTask.map Data - BackendTask.Time.now - -It's better to use [`Server.Request.requestTime`](Server-Request#requestTime) or `Pages.builtAt` when those are the semantics -you are looking for. `requestTime` gives you a single reliable and consistent time for when the incoming HTTP request was received in -a server-rendered Route or server-rendered API Route. `Pages.builtAt` gives a single reliable and consistent time when the -site was built. - -`BackendTask.Time.now` gives you the time that it happened to execute, which might give you what you need, but be -aware that the time you get is dependent on how BackendTask's are scheduled and executed internally in elm-pages, and -its best to avoid depending on that variation when possible. - -now: BackendTask.BackendTask error Time.Posix --} -now : Elm.Expression -now = - Elm.value - { importFrom = [ "BackendTask", "Time" ] - , name = "now" - , annotation = - Just - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.namedWith [ "Time" ] "Posix" [] ] - ) - } - - -values_ : { now : Elm.Expression } -values_ = - { now = - Elm.value - { importFrom = [ "BackendTask", "Time" ] - , name = "now" - , annotation = - Just - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.namedWith [ "Time" ] "Posix" [] - ] - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Bytes/Encode.elm b/codegen/Gen/Bytes/Encode.elm deleted file mode 100644 index 66e6513b..00000000 --- a/codegen/Gen/Bytes/Encode.elm +++ /dev/null @@ -1,863 +0,0 @@ -module Gen.Bytes.Encode exposing - ( moduleName_, encode, sequence, signedInt8, signedInt16, signedInt32 - , unsignedInt8, unsignedInt16, unsignedInt32, float32, float64, bytes, string - , getStringWidth, annotation_, call_, values_ - ) - -{-| -# Generated bindings for Bytes.Encode - -@docs moduleName_, encode, sequence, signedInt8, signedInt16, signedInt32 -@docs unsignedInt8, unsignedInt16, unsignedInt32, float32, float64, bytes -@docs string, getStringWidth, annotation_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Bytes", "Encode" ] - - -{-| Turn an `Encoder` into `Bytes`. - - encode (unsignedInt8 7) -- <07> - encode (unsignedInt16 BE 7) -- <0007> - encode (unsignedInt16 LE 7) -- <0700> - -The `encode` function is designed to minimize allocation. It figures out the -exact width necessary to fit everything in `Bytes` and then generate that -value directly. This is valuable when you are encoding more elaborate data: - - import Bytes exposing (Endianness(..)) - import Bytes.Encode as Encode - - type alias Person = - { age : Int - , name : String - } - - toEncoder : Person -> Encode.Encoder - toEncoder person = - Encode.sequence - [ Encode.unsignedInt16 BE person.age - , Encode.unsignedInt16 BE (Encode.getStringWidth person.name) - , Encode.string person.name - ] - - -- encode (toEncoder (Person 33 "Tom")) == <00210003546F6D> - -Did you know it was going to be seven bytes? How about when you have a hundred -people to serialize? And when some have Japanese and Norwegian names? Having -this intermediate `Encoder` can help reduce allocation quite a lot! - -encode: Bytes.Encode.Encoder -> Bytes.Bytes --} -encode : Elm.Expression -> Elm.Expression -encode encodeArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "encode" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes", "Encode" ] "Encoder" [] ] - (Type.namedWith [ "Bytes" ] "Bytes" []) - ) - } - ) - [ encodeArg_ ] - - -{-| Put together a bunch of builders. So if you wanted to encode three `Float` -values for the position of a ball in 3D space, you could say: - - import Bytes exposing (Endianness(..)) - import Bytes.Encode as Encode - - type alias Ball = { x : Float, y : Float, z : Float } - - ball : Ball -> Encode.Encoder - ball {x,y,z} = - Encode.sequence - [ Encode.float32 BE x - , Encode.float32 BE y - , Encode.float32 BE z - ] - -sequence: List Bytes.Encode.Encoder -> Bytes.Encode.Encoder --} -sequence : List Elm.Expression -> Elm.Expression -sequence sequenceArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "sequence" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" [] - ) - ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - ) - [ Elm.list sequenceArg_ ] - - -{-| Encode integers from `-128` to `127` in one byte. - -signedInt8: Int -> Bytes.Encode.Encoder --} -signedInt8 : Int -> Elm.Expression -signedInt8 signedInt8Arg_ = - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "signedInt8" - , annotation = - Just - (Type.function - [ Type.int ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - ) - [ Elm.int signedInt8Arg_ ] - - -{-| Encode integers from `-32768` to `32767` in two bytes. - -signedInt16: Bytes.Endianness -> Int -> Bytes.Encode.Encoder --} -signedInt16 : Elm.Expression -> Int -> Elm.Expression -signedInt16 signedInt16Arg_ signedInt16Arg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "signedInt16" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.int - ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - ) - [ signedInt16Arg_, Elm.int signedInt16Arg_0 ] - - -{-| Encode integers from `-2147483648` to `2147483647` in four bytes. - -signedInt32: Bytes.Endianness -> Int -> Bytes.Encode.Encoder --} -signedInt32 : Elm.Expression -> Int -> Elm.Expression -signedInt32 signedInt32Arg_ signedInt32Arg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "signedInt32" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.int - ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - ) - [ signedInt32Arg_, Elm.int signedInt32Arg_0 ] - - -{-| Encode integers from `0` to `255` in one byte. - -unsignedInt8: Int -> Bytes.Encode.Encoder --} -unsignedInt8 : Int -> Elm.Expression -unsignedInt8 unsignedInt8Arg_ = - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "unsignedInt8" - , annotation = - Just - (Type.function - [ Type.int ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - ) - [ Elm.int unsignedInt8Arg_ ] - - -{-| Encode integers from `0` to `65535` in two bytes. - -unsignedInt16: Bytes.Endianness -> Int -> Bytes.Encode.Encoder --} -unsignedInt16 : Elm.Expression -> Int -> Elm.Expression -unsignedInt16 unsignedInt16Arg_ unsignedInt16Arg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "unsignedInt16" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.int - ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - ) - [ unsignedInt16Arg_, Elm.int unsignedInt16Arg_0 ] - - -{-| Encode integers from `0` to `4294967295` in four bytes. - -unsignedInt32: Bytes.Endianness -> Int -> Bytes.Encode.Encoder --} -unsignedInt32 : Elm.Expression -> Int -> Elm.Expression -unsignedInt32 unsignedInt32Arg_ unsignedInt32Arg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "unsignedInt32" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.int - ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - ) - [ unsignedInt32Arg_, Elm.int unsignedInt32Arg_0 ] - - -{-| Encode 32-bit floating point numbers in four bytes. - -float32: Bytes.Endianness -> Float -> Bytes.Encode.Encoder --} -float32 : Elm.Expression -> Float -> Elm.Expression -float32 float32Arg_ float32Arg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "float32" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.float - ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - ) - [ float32Arg_, Elm.float float32Arg_0 ] - - -{-| Encode 64-bit floating point numbers in eight bytes. - -float64: Bytes.Endianness -> Float -> Bytes.Encode.Encoder --} -float64 : Elm.Expression -> Float -> Elm.Expression -float64 float64Arg_ float64Arg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "float64" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.float - ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - ) - [ float64Arg_, Elm.float float64Arg_0 ] - - -{-| Copy bytes directly into the new `Bytes` sequence. This does not record the -width though! You usually want to say something like this: - - import Bytes exposing (Bytes, Endianness(..)) - import Bytes.Encode as Encode - - png : Bytes -> Encode.Encoder - png imageData = - Encode.sequence - [ Encode.unsignedInt32 BE (Bytes.width imageData) - , Encode.bytes imageData - ] - -This allows you to represent the width however is necessary for your protocol. -For example, you can use [Base 128 Varints][pb] for ProtoBuf, -[Variable-Length Integers][sql] for SQLite, or whatever else they dream up. - -[pb]: https://developers.google.com/protocol-buffers/docs/encoding#varints -[sql]: https://www.sqlite.org/src4/doc/trunk/www/varint.wiki - -bytes: Bytes.Bytes -> Bytes.Encode.Encoder --} -bytes : Elm.Expression -> Elm.Expression -bytes bytesArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "bytes" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Bytes" [] ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - ) - [ bytesArg_ ] - - -{-| Encode a `String` as a bunch of UTF-8 bytes. - - encode (string "$20") -- <24 32 30> - encode (string "£20") -- - encode (string "€20") -- - encode (string "bread") -- <62 72 65 61 64> - encode (string "brød") -- <62 72 C3B8 64> - -Some characters take one byte, while others can take up to four. Read more -about [UTF-8](https://en.wikipedia.org/wiki/UTF-8) to learn the details! - -But if you just encode UTF-8 directly, how can you know when you get to the end -of the string when you are decoding? So most protocols have an integer saying -how many bytes follow, like this: - - sizedString : String -> Encoder - sizedString str = - sequence - [ unsignedInt32 BE (getStringWidth str) - , string str - ] - -You can choose whatever representation you want for the width, which is helpful -because many protocols use different integer representations to save space. For -example: - -- ProtoBuf uses [Base 128 Varints](https://developers.google.com/protocol-buffers/docs/encoding#varints) -- SQLite uses [Variable-Length Integers](https://www.sqlite.org/src4/doc/trunk/www/varint.wiki) - -In both cases, small numbers can fit just one byte, saving some space. (The -SQLite encoding has the benefit that the first byte tells you how long the -number is, making it faster to decode.) In both cases, it is sort of tricky -to make negative numbers small. - -string: String -> Bytes.Encode.Encoder --} -string : String -> Elm.Expression -string stringArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "string" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - ) - [ Elm.string stringArg_ ] - - -{-| Get the width of a `String` in UTF-8 bytes. - - getStringWidth "$20" == 3 - getStringWidth "£20" == 4 - getStringWidth "€20" == 5 - getStringWidth "bread" == 5 - getStringWidth "brød" == 5 - -Most protocols need this number to come directly before a chunk of UTF-8 bytes -as a way to know where the string ends! - -Read more about how UTF-8 works [here](https://en.wikipedia.org/wiki/UTF-8). - -getStringWidth: String -> Int --} -getStringWidth : String -> Elm.Expression -getStringWidth getStringWidthArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "getStringWidth" - , annotation = Just (Type.function [ Type.string ] Type.int) - } - ) - [ Elm.string getStringWidthArg_ ] - - -annotation_ : { encoder : Type.Annotation } -annotation_ = - { encoder = Type.namedWith [ "Bytes", "Encode" ] "Encoder" [] } - - -call_ : - { encode : Elm.Expression -> Elm.Expression - , sequence : Elm.Expression -> Elm.Expression - , signedInt8 : Elm.Expression -> Elm.Expression - , signedInt16 : Elm.Expression -> Elm.Expression -> Elm.Expression - , signedInt32 : Elm.Expression -> Elm.Expression -> Elm.Expression - , unsignedInt8 : Elm.Expression -> Elm.Expression - , unsignedInt16 : Elm.Expression -> Elm.Expression -> Elm.Expression - , unsignedInt32 : Elm.Expression -> Elm.Expression -> Elm.Expression - , float32 : Elm.Expression -> Elm.Expression -> Elm.Expression - , float64 : Elm.Expression -> Elm.Expression -> Elm.Expression - , bytes : Elm.Expression -> Elm.Expression - , string : Elm.Expression -> Elm.Expression - , getStringWidth : Elm.Expression -> Elm.Expression - } -call_ = - { encode = - \encodeArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "encode" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Bytes", "Encode" ] - "Encoder" - [] - ] - (Type.namedWith [ "Bytes" ] "Bytes" []) - ) - } - ) - [ encodeArg_ ] - , sequence = - \sequenceArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "sequence" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Bytes", "Encode" ] - "Encoder" - [] - ) - ] - (Type.namedWith - [ "Bytes", "Encode" ] - "Encoder" - [] - ) - ) - } - ) - [ sequenceArg_ ] - , signedInt8 = - \signedInt8Arg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "signedInt8" - , annotation = - Just - (Type.function - [ Type.int ] - (Type.namedWith - [ "Bytes", "Encode" ] - "Encoder" - [] - ) - ) - } - ) - [ signedInt8Arg_ ] - , signedInt16 = - \signedInt16Arg_ signedInt16Arg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "signedInt16" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.int - ] - (Type.namedWith - [ "Bytes", "Encode" ] - "Encoder" - [] - ) - ) - } - ) - [ signedInt16Arg_, signedInt16Arg_0 ] - , signedInt32 = - \signedInt32Arg_ signedInt32Arg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "signedInt32" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.int - ] - (Type.namedWith - [ "Bytes", "Encode" ] - "Encoder" - [] - ) - ) - } - ) - [ signedInt32Arg_, signedInt32Arg_0 ] - , unsignedInt8 = - \unsignedInt8Arg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "unsignedInt8" - , annotation = - Just - (Type.function - [ Type.int ] - (Type.namedWith - [ "Bytes", "Encode" ] - "Encoder" - [] - ) - ) - } - ) - [ unsignedInt8Arg_ ] - , unsignedInt16 = - \unsignedInt16Arg_ unsignedInt16Arg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "unsignedInt16" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.int - ] - (Type.namedWith - [ "Bytes", "Encode" ] - "Encoder" - [] - ) - ) - } - ) - [ unsignedInt16Arg_, unsignedInt16Arg_0 ] - , unsignedInt32 = - \unsignedInt32Arg_ unsignedInt32Arg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "unsignedInt32" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.int - ] - (Type.namedWith - [ "Bytes", "Encode" ] - "Encoder" - [] - ) - ) - } - ) - [ unsignedInt32Arg_, unsignedInt32Arg_0 ] - , float32 = - \float32Arg_ float32Arg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "float32" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.float - ] - (Type.namedWith - [ "Bytes", "Encode" ] - "Encoder" - [] - ) - ) - } - ) - [ float32Arg_, float32Arg_0 ] - , float64 = - \float64Arg_ float64Arg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "float64" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.float - ] - (Type.namedWith - [ "Bytes", "Encode" ] - "Encoder" - [] - ) - ) - } - ) - [ float64Arg_, float64Arg_0 ] - , bytes = - \bytesArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "bytes" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Bytes" [] ] - (Type.namedWith - [ "Bytes", "Encode" ] - "Encoder" - [] - ) - ) - } - ) - [ bytesArg_ ] - , string = - \stringArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "string" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Bytes", "Encode" ] - "Encoder" - [] - ) - ) - } - ) - [ stringArg_ ] - , getStringWidth = - \getStringWidthArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "getStringWidth" - , annotation = - Just (Type.function [ Type.string ] Type.int) - } - ) - [ getStringWidthArg_ ] - } - - -values_ : - { encode : Elm.Expression - , sequence : Elm.Expression - , signedInt8 : Elm.Expression - , signedInt16 : Elm.Expression - , signedInt32 : Elm.Expression - , unsignedInt8 : Elm.Expression - , unsignedInt16 : Elm.Expression - , unsignedInt32 : Elm.Expression - , float32 : Elm.Expression - , float64 : Elm.Expression - , bytes : Elm.Expression - , string : Elm.Expression - , getStringWidth : Elm.Expression - } -values_ = - { encode = - Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "encode" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes", "Encode" ] "Encoder" [] ] - (Type.namedWith [ "Bytes" ] "Bytes" []) - ) - } - , sequence = - Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "sequence" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - , signedInt8 = - Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "signedInt8" - , annotation = - Just - (Type.function - [ Type.int ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - , signedInt16 = - Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "signedInt16" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.int - ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - , signedInt32 = - Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "signedInt32" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.int - ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - , unsignedInt8 = - Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "unsignedInt8" - , annotation = - Just - (Type.function - [ Type.int ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - , unsignedInt16 = - Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "unsignedInt16" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.int - ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - , unsignedInt32 = - Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "unsignedInt32" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.int - ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - , float32 = - Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "float32" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.float - ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - , float64 = - Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "float64" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Endianness" [] - , Type.float - ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - , bytes = - Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "bytes" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Bytes" [] ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - , string = - Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "string" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Bytes", "Encode" ] "Encoder" []) - ) - } - , getStringWidth = - Elm.value - { importFrom = [ "Bytes", "Encode" ] - , name = "getStringWidth" - , annotation = Just (Type.function [ Type.string ] Type.int) - } - } \ No newline at end of file diff --git a/codegen/Gen/Head.elm b/codegen/Gen/Head.elm deleted file mode 100644 index 21f51c49..00000000 --- a/codegen/Gen/Head.elm +++ /dev/null @@ -1,1046 +0,0 @@ -module Gen.Head exposing - ( moduleName_, metaName, metaProperty, metaRedirect, rssLink, sitemapLink - , rootLanguage, manifestLink, nonLoadingNode, structuredData, currentPageFullUrl, urlAttribute, raw - , appleTouchIcon, icon, toJson, canonicalLink, annotation_, call_, values_ - ) - -{-| -# Generated bindings for Head - -@docs moduleName_, metaName, metaProperty, metaRedirect, rssLink, sitemapLink -@docs rootLanguage, manifestLink, nonLoadingNode, structuredData, currentPageFullUrl, urlAttribute -@docs raw, appleTouchIcon, icon, toJson, canonicalLink, annotation_ -@docs call_, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Head" ] - - -{-| Example: - - Head.metaName "twitter:card" (Head.raw "summary_large_image") - -Results in `` - -metaName: String -> Head.AttributeValue -> Head.Tag --} -metaName : String -> Elm.Expression -> Elm.Expression -metaName metaNameArg_ metaNameArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "metaName" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Head" ] "AttributeValue" [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ Elm.string metaNameArg_, metaNameArg_0 ] - - -{-| Example: - - Head.metaProperty "fb:app_id" (Head.raw "123456789") - -Results in `` - -metaProperty: String -> Head.AttributeValue -> Head.Tag --} -metaProperty : String -> Elm.Expression -> Elm.Expression -metaProperty metaPropertyArg_ metaPropertyArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "metaProperty" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Head" ] "AttributeValue" [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ Elm.string metaPropertyArg_, metaPropertyArg_0 ] - - -{-| Example: - - metaRedirect (Raw "0; url=https://google.com") - -Results in `` - -metaRedirect: Head.AttributeValue -> Head.Tag --} -metaRedirect : Elm.Expression -> Elm.Expression -metaRedirect metaRedirectArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "metaRedirect" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Head" ] "AttributeValue" [] ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ metaRedirectArg_ ] - - -{-| Add a link to the site's RSS feed. - -Example: - - rssLink "/feed.xml" - -```html - -``` - -rssLink: String -> Head.Tag --} -rssLink : String -> Elm.Expression -rssLink rssLinkArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "rssLink" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ Elm.string rssLinkArg_ ] - - -{-| Add a link to the site's RSS feed. - -Example: - - sitemapLink "/feed.xml" - -```html - -``` - -sitemapLink: String -> Head.Tag --} -sitemapLink : String -> Elm.Expression -sitemapLink sitemapLinkArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "sitemapLink" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ Elm.string sitemapLinkArg_ ] - - -{-| Set the language for a page. - - - - import Head - import LanguageTag - import LanguageTag.Language - - LanguageTag.Language.de -- sets the page's language to German - |> LanguageTag.build LanguageTag.emptySubtags - |> Head.rootLanguage - -This results pre-rendered HTML with a global lang tag set. - -```html - -... - -``` - -rootLanguage: LanguageTag.LanguageTag -> Head.Tag --} -rootLanguage : Elm.Expression -> Elm.Expression -rootLanguage rootLanguageArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "rootLanguage" - , annotation = - Just - (Type.function - [ Type.namedWith [ "LanguageTag" ] "LanguageTag" [] ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ rootLanguageArg_ ] - - -{-| Let's you link to your manifest.json file, see . - -manifestLink: String -> Head.Tag --} -manifestLink : String -> Elm.Expression -manifestLink manifestLinkArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "manifestLink" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ Elm.string manifestLinkArg_ ] - - -{-| Escape hatch for any head tags that don't have high-level helpers. This lets you build arbitrary head nodes as long as they -are not loading or preloading directives. - -Tags that do loading/pre-loading will not work from this function. `elm-pages` uses ViteJS for loading assets like -script tags, stylesheets, fonts, etc., and allows you to customize which assets to preload and how through the elm-pages.config.mjs file. -See the full discussion of the design in [#339](https://github.com/dillonkearns/elm-pages/discussions/339). - -So for example the following tags would _not_ load if defined through `nonLoadingNode`, and would instead need to be registered through Vite: - - - ` -``` - -To get that data, you would write this in your `elm-pages` head tags: - - import Json.Encode as Encode - - {-| - -} - encodeArticle : - { title : String - , description : String - , author : StructuredDataHelper { authorMemberOf | personOrOrganization : () } authorPossibleFields - , publisher : StructuredDataHelper { publisherMemberOf | personOrOrganization : () } publisherPossibleFields - , url : String - , imageUrl : String - , datePublished : String - , mainEntityOfPage : Encode.Value - } - -> Head.Tag - encodeArticle info = - Encode.object - [ ( "@context", Encode.string "http://schema.org/" ) - , ( "@type", Encode.string "Article" ) - , ( "headline", Encode.string info.title ) - , ( "description", Encode.string info.description ) - , ( "image", Encode.string info.imageUrl ) - , ( "author", encode info.author ) - , ( "publisher", encode info.publisher ) - , ( "url", Encode.string info.url ) - , ( "datePublished", Encode.string info.datePublished ) - , ( "mainEntityOfPage", info.mainEntityOfPage ) - ] - |> Head.structuredData - -Take a look at this [Google Search Gallery](https://developers.google.com/search/docs/guides/search-gallery) -to see some examples of how structured data can be used by search engines to give rich search results. It can help boost -your rankings, get better engagement for your content, and also make your content more accessible. For example, -voice assistant devices can make use of structured data. If you're hosting a conference and want to make the event -date and location easy for attendees to find, this can make that information more accessible. - -For the current version of API, you'll need to make sure that the format is correct and contains the required and recommended -structure. - -Check out for a comprehensive listing of possible data types and fields. And take a look at -Google's [Structured Data Testing Tool](https://search.google.com/structured-data/testing-tool) -too make sure that your structured data is valid and includes the recommended values. - -In the future, `elm-pages` will likely support a typed API, but schema.org is a massive spec, and changes frequently. -And there are multiple sources of information on the possible and recommended structure. So it will take some time -for the right API design to evolve. In the meantime, this allows you to make use of this for SEO purposes. - -structuredData: Json.Encode.Value -> Head.Tag --} -structuredData : Elm.Expression -> Elm.Expression -structuredData structuredDataArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "structuredData" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Json", "Encode" ] "Value" [] ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ structuredDataArg_ ] - - -{-| Create an `AttributeValue` representing the current page's full url. - -currentPageFullUrl: Head.AttributeValue --} -currentPageFullUrl : Elm.Expression -currentPageFullUrl = - Elm.value - { importFrom = [ "Head" ] - , name = "currentPageFullUrl" - , annotation = Just (Type.namedWith [ "Head" ] "AttributeValue" []) - } - - -{-| Create an `AttributeValue` from an `ImagePath`. - -urlAttribute: Pages.Url.Url -> Head.AttributeValue --} -urlAttribute : Elm.Expression -> Elm.Expression -urlAttribute urlAttributeArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "urlAttribute" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Pages", "Url" ] "Url" [] ] - (Type.namedWith [ "Head" ] "AttributeValue" []) - ) - } - ) - [ urlAttributeArg_ ] - - -{-| Create a raw `AttributeValue` (as opposed to some kind of absolute URL). - -raw: String -> Head.AttributeValue --} -raw : String -> Elm.Expression -raw rawArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "raw" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Head" ] "AttributeValue" []) - ) - } - ) - [ Elm.string rawArg_ ] - - -{-| Note: the type must be png. -See . - -If a size is provided, it will be turned into square dimensions as per the recommendations here: - -Images must be png's, and non-transparent images are recommended. Current recommended dimensions are 180px and 192px. - -appleTouchIcon: Maybe Int -> Pages.Url.Url -> Head.Tag --} -appleTouchIcon : Elm.Expression -> Elm.Expression -> Elm.Expression -appleTouchIcon appleTouchIconArg_ appleTouchIconArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "appleTouchIcon" - , annotation = - Just - (Type.function - [ Type.maybe Type.int - , Type.namedWith [ "Pages", "Url" ] "Url" [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ appleTouchIconArg_, appleTouchIconArg_0 ] - - -{-| icon: List ( Int, Int ) -> MimeType.MimeImage -> Pages.Url.Url -> Head.Tag -} -icon : List Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -icon iconArg_ iconArg_0 iconArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "icon" - , annotation = - Just - (Type.function - [ Type.list (Type.tuple Type.int Type.int) - , Type.namedWith [ "MimeType" ] "MimeImage" [] - , Type.namedWith [ "Pages", "Url" ] "Url" [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ Elm.list iconArg_, iconArg_0, iconArg_1 ] - - -{-| Feel free to use this, but in 99% of cases you won't need it. The generated -code will run this for you to generate your `manifest.json` file automatically! - -toJson: String -> String -> Head.Tag -> Json.Encode.Value --} -toJson : String -> String -> Elm.Expression -> Elm.Expression -toJson toJsonArg_ toJsonArg_0 toJsonArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "toJson" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith [ "Head" ] "Tag" [] - ] - (Type.namedWith [ "Json", "Encode" ] "Value" []) - ) - } - ) - [ Elm.string toJsonArg_, Elm.string toJsonArg_0, toJsonArg_1 ] - - -{-| It's recommended that you use the `Seo` module helpers, which will provide this -for you, rather than directly using this. - -Example: - - Head.canonicalLink "https://elm-pages.com" - -canonicalLink: Maybe String -> Head.Tag --} -canonicalLink : Elm.Expression -> Elm.Expression -canonicalLink canonicalLinkArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "canonicalLink" - , annotation = - Just - (Type.function - [ Type.maybe Type.string ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ canonicalLinkArg_ ] - - -annotation_ : { tag : Type.Annotation, attributeValue : Type.Annotation } -annotation_ = - { tag = Type.namedWith [ "Head" ] "Tag" [] - , attributeValue = Type.namedWith [ "Head" ] "AttributeValue" [] - } - - -call_ : - { metaName : Elm.Expression -> Elm.Expression -> Elm.Expression - , metaProperty : Elm.Expression -> Elm.Expression -> Elm.Expression - , metaRedirect : Elm.Expression -> Elm.Expression - , rssLink : Elm.Expression -> Elm.Expression - , sitemapLink : Elm.Expression -> Elm.Expression - , rootLanguage : Elm.Expression -> Elm.Expression - , manifestLink : Elm.Expression -> Elm.Expression - , nonLoadingNode : Elm.Expression -> Elm.Expression -> Elm.Expression - , structuredData : Elm.Expression -> Elm.Expression - , urlAttribute : Elm.Expression -> Elm.Expression - , raw : Elm.Expression -> Elm.Expression - , appleTouchIcon : Elm.Expression -> Elm.Expression -> Elm.Expression - , icon : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , toJson : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , canonicalLink : Elm.Expression -> Elm.Expression - } -call_ = - { metaName = - \metaNameArg_ metaNameArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "metaName" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Head" ] - "AttributeValue" - [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ metaNameArg_, metaNameArg_0 ] - , metaProperty = - \metaPropertyArg_ metaPropertyArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "metaProperty" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Head" ] - "AttributeValue" - [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ metaPropertyArg_, metaPropertyArg_0 ] - , metaRedirect = - \metaRedirectArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "metaRedirect" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Head" ] - "AttributeValue" - [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ metaRedirectArg_ ] - , rssLink = - \rssLinkArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "rssLink" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ rssLinkArg_ ] - , sitemapLink = - \sitemapLinkArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "sitemapLink" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ sitemapLinkArg_ ] - , rootLanguage = - \rootLanguageArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "rootLanguage" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "LanguageTag" ] - "LanguageTag" - [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ rootLanguageArg_ ] - , manifestLink = - \manifestLinkArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "manifestLink" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ manifestLinkArg_ ] - , nonLoadingNode = - \nonLoadingNodeArg_ nonLoadingNodeArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "nonLoadingNode" - , annotation = - Just - (Type.function - [ Type.string - , Type.list - (Type.tuple - Type.string - (Type.namedWith - [ "Head" ] - "AttributeValue" - [] - ) - ) - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ nonLoadingNodeArg_, nonLoadingNodeArg_0 ] - , structuredData = - \structuredDataArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "structuredData" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ structuredDataArg_ ] - , urlAttribute = - \urlAttributeArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "urlAttribute" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Pages", "Url" ] "Url" [] ] - (Type.namedWith [ "Head" ] "AttributeValue" [] - ) - ) - } - ) - [ urlAttributeArg_ ] - , raw = - \rawArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "raw" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Head" ] "AttributeValue" [] - ) - ) - } - ) - [ rawArg_ ] - , appleTouchIcon = - \appleTouchIconArg_ appleTouchIconArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "appleTouchIcon" - , annotation = - Just - (Type.function - [ Type.maybe Type.int - , Type.namedWith [ "Pages", "Url" ] "Url" [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ appleTouchIconArg_, appleTouchIconArg_0 ] - , icon = - \iconArg_ iconArg_0 iconArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "icon" - , annotation = - Just - (Type.function - [ Type.list (Type.tuple Type.int Type.int) - , Type.namedWith [ "MimeType" ] "MimeImage" [] - , Type.namedWith [ "Pages", "Url" ] "Url" [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ iconArg_, iconArg_0, iconArg_1 ] - , toJson = - \toJsonArg_ toJsonArg_0 toJsonArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "toJson" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith [ "Head" ] "Tag" [] - ] - (Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - ) - ) - } - ) - [ toJsonArg_, toJsonArg_0, toJsonArg_1 ] - , canonicalLink = - \canonicalLinkArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Head" ] - , name = "canonicalLink" - , annotation = - Just - (Type.function - [ Type.maybe Type.string ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - ) - [ canonicalLinkArg_ ] - } - - -values_ : - { metaName : Elm.Expression - , metaProperty : Elm.Expression - , metaRedirect : Elm.Expression - , rssLink : Elm.Expression - , sitemapLink : Elm.Expression - , rootLanguage : Elm.Expression - , manifestLink : Elm.Expression - , nonLoadingNode : Elm.Expression - , structuredData : Elm.Expression - , currentPageFullUrl : Elm.Expression - , urlAttribute : Elm.Expression - , raw : Elm.Expression - , appleTouchIcon : Elm.Expression - , icon : Elm.Expression - , toJson : Elm.Expression - , canonicalLink : Elm.Expression - } -values_ = - { metaName = - Elm.value - { importFrom = [ "Head" ] - , name = "metaName" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Head" ] "AttributeValue" [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - , metaProperty = - Elm.value - { importFrom = [ "Head" ] - , name = "metaProperty" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Head" ] "AttributeValue" [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - , metaRedirect = - Elm.value - { importFrom = [ "Head" ] - , name = "metaRedirect" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Head" ] "AttributeValue" [] ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - , rssLink = - Elm.value - { importFrom = [ "Head" ] - , name = "rssLink" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - , sitemapLink = - Elm.value - { importFrom = [ "Head" ] - , name = "sitemapLink" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - , rootLanguage = - Elm.value - { importFrom = [ "Head" ] - , name = "rootLanguage" - , annotation = - Just - (Type.function - [ Type.namedWith [ "LanguageTag" ] "LanguageTag" [] ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - , manifestLink = - Elm.value - { importFrom = [ "Head" ] - , name = "manifestLink" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - , nonLoadingNode = - Elm.value - { importFrom = [ "Head" ] - , name = "nonLoadingNode" - , annotation = - Just - (Type.function - [ Type.string - , Type.list - (Type.tuple - Type.string - (Type.namedWith [ "Head" ] "AttributeValue" []) - ) - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - , structuredData = - Elm.value - { importFrom = [ "Head" ] - , name = "structuredData" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Json", "Encode" ] "Value" [] ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - , currentPageFullUrl = - Elm.value - { importFrom = [ "Head" ] - , name = "currentPageFullUrl" - , annotation = Just (Type.namedWith [ "Head" ] "AttributeValue" []) - } - , urlAttribute = - Elm.value - { importFrom = [ "Head" ] - , name = "urlAttribute" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Pages", "Url" ] "Url" [] ] - (Type.namedWith [ "Head" ] "AttributeValue" []) - ) - } - , raw = - Elm.value - { importFrom = [ "Head" ] - , name = "raw" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Head" ] "AttributeValue" []) - ) - } - , appleTouchIcon = - Elm.value - { importFrom = [ "Head" ] - , name = "appleTouchIcon" - , annotation = - Just - (Type.function - [ Type.maybe Type.int - , Type.namedWith [ "Pages", "Url" ] "Url" [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - , icon = - Elm.value - { importFrom = [ "Head" ] - , name = "icon" - , annotation = - Just - (Type.function - [ Type.list (Type.tuple Type.int Type.int) - , Type.namedWith [ "MimeType" ] "MimeImage" [] - , Type.namedWith [ "Pages", "Url" ] "Url" [] - ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - , toJson = - Elm.value - { importFrom = [ "Head" ] - , name = "toJson" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith [ "Head" ] "Tag" [] - ] - (Type.namedWith [ "Json", "Encode" ] "Value" []) - ) - } - , canonicalLink = - Elm.value - { importFrom = [ "Head" ] - , name = "canonicalLink" - , annotation = - Just - (Type.function - [ Type.maybe Type.string ] - (Type.namedWith [ "Head" ] "Tag" []) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Head/Seo.elm b/codegen/Gen/Head/Seo.elm deleted file mode 100644 index cbe3e71a..00000000 --- a/codegen/Gen/Head/Seo.elm +++ /dev/null @@ -1,1278 +0,0 @@ -module Gen.Head.Seo exposing - ( moduleName_, article, audioPlayer, book, profile, song - , summary, summaryLarge, videoPlayer, website, annotation_, make_, call_ - , values_ - ) - -{-| -# Generated bindings for Head.Seo - -@docs moduleName_, article, audioPlayer, book, profile, song -@docs summary, summaryLarge, videoPlayer, website, annotation_, make_ -@docs call_, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Head", "Seo" ] - - -{-| See - -article: - { tags : List String - , section : Maybe String - , publishedTime : Maybe DateOrDateTime.DateOrDateTime - , modifiedTime : Maybe DateOrDateTime.DateOrDateTime - , expirationTime : Maybe DateOrDateTime.DateOrDateTime - } - -> Head.Seo.Common - -> List Head.Tag --} -article : - { tags : List String - , section : Elm.Expression - , publishedTime : Elm.Expression - , modifiedTime : Elm.Expression - , expirationTime : Elm.Expression - } - -> Elm.Expression - -> Elm.Expression -article articleArg_ articleArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "article" - , annotation = - Just - (Type.function - [ Type.record - [ ( "tags", Type.list Type.string ) - , ( "section", Type.maybe Type.string ) - , ( "publishedTime" - , Type.maybe - (Type.namedWith - [ "DateOrDateTime" ] - "DateOrDateTime" - [] - ) - ) - , ( "modifiedTime" - , Type.maybe - (Type.namedWith - [ "DateOrDateTime" ] - "DateOrDateTime" - [] - ) - ) - , ( "expirationTime" - , Type.maybe - (Type.namedWith - [ "DateOrDateTime" ] - "DateOrDateTime" - [] - ) - ) - ] - , Type.namedWith [ "Head", "Seo" ] "Common" [] - ] - (Type.list (Type.namedWith [ "Head" ] "Tag" [])) - ) - } - ) - [ Elm.record - [ Tuple.pair - "tags" - (Elm.list (List.map Elm.string articleArg_.tags)) - , Tuple.pair "section" articleArg_.section - , Tuple.pair "publishedTime" articleArg_.publishedTime - , Tuple.pair "modifiedTime" articleArg_.modifiedTime - , Tuple.pair "expirationTime" articleArg_.expirationTime - ] - , articleArg_0 - ] - - -{-| Will be displayed as a Player card in twitter -See: - -OpenGraph audio will also be included. -The options will also be used to build up the appropriate OpenGraph `` tags. - -audioPlayer: - { canonicalUrlOverride : Maybe String - , siteName : String - , image : Head.Seo.Image - , description : String - , title : String - , audio : Head.Seo.Audio - , locale : Maybe Head.Seo.Locale - } - -> Head.Seo.Common --} -audioPlayer : - { canonicalUrlOverride : Elm.Expression - , siteName : String - , image : Elm.Expression - , description : String - , title : String - , audio : Elm.Expression - , locale : Elm.Expression - } - -> Elm.Expression -audioPlayer audioPlayerArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "audioPlayer" - , annotation = - Just - (Type.function - [ Type.record - [ ( "canonicalUrlOverride" - , Type.maybe Type.string - ) - , ( "siteName", Type.string ) - , ( "image" - , Type.namedWith [ "Head", "Seo" ] "Image" [] - ) - , ( "description", Type.string ) - , ( "title", Type.string ) - , ( "audio" - , Type.namedWith [ "Head", "Seo" ] "Audio" [] - ) - , ( "locale" - , Type.maybe - (Type.namedWith - [ "Head", "Seo" ] - "Locale" - [] - ) - ) - ] - ] - (Type.namedWith [ "Head", "Seo" ] "Common" []) - ) - } - ) - [ Elm.record - [ Tuple.pair - "canonicalUrlOverride" - audioPlayerArg_.canonicalUrlOverride - , Tuple.pair "siteName" (Elm.string audioPlayerArg_.siteName) - , Tuple.pair "image" audioPlayerArg_.image - , Tuple.pair "description" (Elm.string audioPlayerArg_.description) - , Tuple.pair "title" (Elm.string audioPlayerArg_.title) - , Tuple.pair "audio" audioPlayerArg_.audio - , Tuple.pair "locale" audioPlayerArg_.locale - ] - ] - - -{-| See - -book: - Head.Seo.Common - -> { tags : List String - , isbn : Maybe String - , releaseDate : Maybe DateOrDateTime.DateOrDateTime - } - -> List Head.Tag --} -book : - Elm.Expression - -> { tags : List String - , isbn : Elm.Expression - , releaseDate : Elm.Expression - } - -> Elm.Expression -book bookArg_ bookArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "book" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Head", "Seo" ] "Common" [] - , Type.record - [ ( "tags", Type.list Type.string ) - , ( "isbn", Type.maybe Type.string ) - , ( "releaseDate" - , Type.maybe - (Type.namedWith - [ "DateOrDateTime" ] - "DateOrDateTime" - [] - ) - ) - ] - ] - (Type.list (Type.namedWith [ "Head" ] "Tag" [])) - ) - } - ) - [ bookArg_ - , Elm.record - [ Tuple.pair "tags" (Elm.list (List.map Elm.string bookArg_0.tags)) - , Tuple.pair "isbn" bookArg_0.isbn - , Tuple.pair "releaseDate" bookArg_0.releaseDate - ] - ] - - -{-| See - -profile: - { firstName : String, lastName : String, username : Maybe String } - -> Head.Seo.Common - -> List Head.Tag --} -profile : - { firstName : String, lastName : String, username : Elm.Expression } - -> Elm.Expression - -> Elm.Expression -profile profileArg_ profileArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "profile" - , annotation = - Just - (Type.function - [ Type.record - [ ( "firstName", Type.string ) - , ( "lastName", Type.string ) - , ( "username", Type.maybe Type.string ) - ] - , Type.namedWith [ "Head", "Seo" ] "Common" [] - ] - (Type.list (Type.namedWith [ "Head" ] "Tag" [])) - ) - } - ) - [ Elm.record - [ Tuple.pair "firstName" (Elm.string profileArg_.firstName) - , Tuple.pair "lastName" (Elm.string profileArg_.lastName) - , Tuple.pair "username" profileArg_.username - ] - , profileArg_0 - ] - - -{-| See - -song: - Head.Seo.Common - -> { duration : Maybe Int - , album : Maybe Int - , disc : Maybe Int - , track : Maybe Int - } - -> List Head.Tag --} -song : - Elm.Expression - -> { duration : Elm.Expression - , album : Elm.Expression - , disc : Elm.Expression - , track : Elm.Expression - } - -> Elm.Expression -song songArg_ songArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "song" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Head", "Seo" ] "Common" [] - , Type.record - [ ( "duration", Type.maybe Type.int ) - , ( "album", Type.maybe Type.int ) - , ( "disc", Type.maybe Type.int ) - , ( "track", Type.maybe Type.int ) - ] - ] - (Type.list (Type.namedWith [ "Head" ] "Tag" [])) - ) - } - ) - [ songArg_ - , Elm.record - [ Tuple.pair "duration" songArg_0.duration - , Tuple.pair "album" songArg_0.album - , Tuple.pair "disc" songArg_0.disc - , Tuple.pair "track" songArg_0.track - ] - ] - - -{-| Will be displayed as a large card in twitter -See: - -The options will also be used to build up the appropriate OpenGraph `` tags. - -Note: You cannot include audio or video tags with summaries. -If you want one of those, use `audioPlayer` or `videoPlayer` - -summary: - { canonicalUrlOverride : Maybe String - , siteName : String - , image : Head.Seo.Image - , description : String - , title : String - , locale : Maybe Head.Seo.Locale - } - -> Head.Seo.Common --} -summary : - { canonicalUrlOverride : Elm.Expression - , siteName : String - , image : Elm.Expression - , description : String - , title : String - , locale : Elm.Expression - } - -> Elm.Expression -summary summaryArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "summary" - , annotation = - Just - (Type.function - [ Type.record - [ ( "canonicalUrlOverride" - , Type.maybe Type.string - ) - , ( "siteName", Type.string ) - , ( "image" - , Type.namedWith [ "Head", "Seo" ] "Image" [] - ) - , ( "description", Type.string ) - , ( "title", Type.string ) - , ( "locale" - , Type.maybe - (Type.namedWith - [ "Head", "Seo" ] - "Locale" - [] - ) - ) - ] - ] - (Type.namedWith [ "Head", "Seo" ] "Common" []) - ) - } - ) - [ Elm.record - [ Tuple.pair "canonicalUrlOverride" summaryArg_.canonicalUrlOverride - , Tuple.pair "siteName" (Elm.string summaryArg_.siteName) - , Tuple.pair "image" summaryArg_.image - , Tuple.pair "description" (Elm.string summaryArg_.description) - , Tuple.pair "title" (Elm.string summaryArg_.title) - , Tuple.pair "locale" summaryArg_.locale - ] - ] - - -{-| Will be displayed as a large card in twitter -See: - -The options will also be used to build up the appropriate OpenGraph `` tags. - -Note: You cannot include audio or video tags with summaries. -If you want one of those, use `audioPlayer` or `videoPlayer` - -summaryLarge: - { canonicalUrlOverride : Maybe String - , siteName : String - , image : Head.Seo.Image - , description : String - , title : String - , locale : Maybe Head.Seo.Locale - } - -> Head.Seo.Common --} -summaryLarge : - { canonicalUrlOverride : Elm.Expression - , siteName : String - , image : Elm.Expression - , description : String - , title : String - , locale : Elm.Expression - } - -> Elm.Expression -summaryLarge summaryLargeArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "summaryLarge" - , annotation = - Just - (Type.function - [ Type.record - [ ( "canonicalUrlOverride" - , Type.maybe Type.string - ) - , ( "siteName", Type.string ) - , ( "image" - , Type.namedWith [ "Head", "Seo" ] "Image" [] - ) - , ( "description", Type.string ) - , ( "title", Type.string ) - , ( "locale" - , Type.maybe - (Type.namedWith - [ "Head", "Seo" ] - "Locale" - [] - ) - ) - ] - ] - (Type.namedWith [ "Head", "Seo" ] "Common" []) - ) - } - ) - [ Elm.record - [ Tuple.pair - "canonicalUrlOverride" - summaryLargeArg_.canonicalUrlOverride - , Tuple.pair "siteName" (Elm.string summaryLargeArg_.siteName) - , Tuple.pair "image" summaryLargeArg_.image - , Tuple.pair "description" (Elm.string summaryLargeArg_.description) - , Tuple.pair "title" (Elm.string summaryLargeArg_.title) - , Tuple.pair "locale" summaryLargeArg_.locale - ] - ] - - -{-| Will be displayed as a Player card in twitter -See: - -OpenGraph video will also be included. -The options will also be used to build up the appropriate OpenGraph `` tags. - -videoPlayer: - { canonicalUrlOverride : Maybe String - , siteName : String - , image : Head.Seo.Image - , description : String - , title : String - , video : Head.Seo.Video - , locale : Maybe Head.Seo.Locale - } - -> Head.Seo.Common --} -videoPlayer : - { canonicalUrlOverride : Elm.Expression - , siteName : String - , image : Elm.Expression - , description : String - , title : String - , video : Elm.Expression - , locale : Elm.Expression - } - -> Elm.Expression -videoPlayer videoPlayerArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "videoPlayer" - , annotation = - Just - (Type.function - [ Type.record - [ ( "canonicalUrlOverride" - , Type.maybe Type.string - ) - , ( "siteName", Type.string ) - , ( "image" - , Type.namedWith [ "Head", "Seo" ] "Image" [] - ) - , ( "description", Type.string ) - , ( "title", Type.string ) - , ( "video" - , Type.namedWith [ "Head", "Seo" ] "Video" [] - ) - , ( "locale" - , Type.maybe - (Type.namedWith - [ "Head", "Seo" ] - "Locale" - [] - ) - ) - ] - ] - (Type.namedWith [ "Head", "Seo" ] "Common" []) - ) - } - ) - [ Elm.record - [ Tuple.pair - "canonicalUrlOverride" - videoPlayerArg_.canonicalUrlOverride - , Tuple.pair "siteName" (Elm.string videoPlayerArg_.siteName) - , Tuple.pair "image" videoPlayerArg_.image - , Tuple.pair "description" (Elm.string videoPlayerArg_.description) - , Tuple.pair "title" (Elm.string videoPlayerArg_.title) - , Tuple.pair "video" videoPlayerArg_.video - , Tuple.pair "locale" videoPlayerArg_.locale - ] - ] - - -{-| - -website: Head.Seo.Common -> List Head.Tag --} -website : Elm.Expression -> Elm.Expression -website websiteArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "website" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Head", "Seo" ] "Common" [] ] - (Type.list (Type.namedWith [ "Head" ] "Tag" [])) - ) - } - ) - [ websiteArg_ ] - - -annotation_ : { common : Type.Annotation, image : Type.Annotation } -annotation_ = - { common = - Type.alias - moduleName_ - "Common" - [] - (Type.record - [ ( "title", Type.string ) - , ( "image", Type.namedWith [ "Head", "Seo" ] "Image" [] ) - , ( "canonicalUrlOverride", Type.maybe Type.string ) - , ( "description", Type.string ) - , ( "siteName", Type.string ) - , ( "audio" - , Type.maybe (Type.namedWith [ "Head", "Seo" ] "Audio" []) - ) - , ( "video" - , Type.maybe (Type.namedWith [ "Head", "Seo" ] "Video" []) - ) - , ( "locale" - , Type.maybe (Type.namedWith [ "Head", "Seo" ] "Locale" []) - ) - , ( "alternateLocales" - , Type.list (Type.namedWith [ "Head", "Seo" ] "Locale" []) - ) - , ( "twitterCard" - , Type.namedWith [ "Head", "Twitter" ] "TwitterCard" [] - ) - ] - ) - , image = - Type.alias - moduleName_ - "Image" - [] - (Type.record - [ ( "url", Type.namedWith [ "Pages", "Url" ] "Url" [] ) - , ( "alt", Type.string ) - , ( "dimensions" - , Type.maybe - (Type.record - [ ( "width", Type.int ), ( "height", Type.int ) ] - ) - ) - , ( "mimeType" - , Type.maybe (Type.namedWith [ "MimeType" ] "MimeType" []) - ) - ] - ) - } - - -make_ : - { common : - { title : Elm.Expression - , image : Elm.Expression - , canonicalUrlOverride : Elm.Expression - , description : Elm.Expression - , siteName : Elm.Expression - , audio : Elm.Expression - , video : Elm.Expression - , locale : Elm.Expression - , alternateLocales : Elm.Expression - , twitterCard : Elm.Expression - } - -> Elm.Expression - , image : - { url : Elm.Expression - , alt : Elm.Expression - , dimensions : Elm.Expression - , mimeType : Elm.Expression - } - -> Elm.Expression - } -make_ = - { common = - \common_args -> - Elm.withType - (Type.alias - [ "Head", "Seo" ] - "Common" - [] - (Type.record - [ ( "title", Type.string ) - , ( "image" - , Type.namedWith [ "Head", "Seo" ] "Image" [] - ) - , ( "canonicalUrlOverride", Type.maybe Type.string ) - , ( "description", Type.string ) - , ( "siteName", Type.string ) - , ( "audio" - , Type.maybe - (Type.namedWith [ "Head", "Seo" ] "Audio" []) - ) - , ( "video" - , Type.maybe - (Type.namedWith [ "Head", "Seo" ] "Video" []) - ) - , ( "locale" - , Type.maybe - (Type.namedWith [ "Head", "Seo" ] "Locale" []) - ) - , ( "alternateLocales" - , Type.list - (Type.namedWith [ "Head", "Seo" ] "Locale" []) - ) - , ( "twitterCard" - , Type.namedWith - [ "Head", "Twitter" ] - "TwitterCard" - [] - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "title" common_args.title - , Tuple.pair "image" common_args.image - , Tuple.pair - "canonicalUrlOverride" - common_args.canonicalUrlOverride - , Tuple.pair "description" common_args.description - , Tuple.pair "siteName" common_args.siteName - , Tuple.pair "audio" common_args.audio - , Tuple.pair "video" common_args.video - , Tuple.pair "locale" common_args.locale - , Tuple.pair - "alternateLocales" - common_args.alternateLocales - , Tuple.pair "twitterCard" common_args.twitterCard - ] - ) - , image = - \image_args -> - Elm.withType - (Type.alias - [ "Head", "Seo" ] - "Image" - [] - (Type.record - [ ( "url" - , Type.namedWith [ "Pages", "Url" ] "Url" [] - ) - , ( "alt", Type.string ) - , ( "dimensions" - , Type.maybe - (Type.record - [ ( "width", Type.int ) - , ( "height", Type.int ) - ] - ) - ) - , ( "mimeType" - , Type.maybe - (Type.namedWith [ "MimeType" ] "MimeType" []) - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "url" image_args.url - , Tuple.pair "alt" image_args.alt - , Tuple.pair "dimensions" image_args.dimensions - , Tuple.pair "mimeType" image_args.mimeType - ] - ) - } - - -call_ : - { article : Elm.Expression -> Elm.Expression -> Elm.Expression - , audioPlayer : Elm.Expression -> Elm.Expression - , book : Elm.Expression -> Elm.Expression -> Elm.Expression - , profile : Elm.Expression -> Elm.Expression -> Elm.Expression - , song : Elm.Expression -> Elm.Expression -> Elm.Expression - , summary : Elm.Expression -> Elm.Expression - , summaryLarge : Elm.Expression -> Elm.Expression - , videoPlayer : Elm.Expression -> Elm.Expression - , website : Elm.Expression -> Elm.Expression - } -call_ = - { article = - \articleArg_ articleArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "article" - , annotation = - Just - (Type.function - [ Type.record - [ ( "tags", Type.list Type.string ) - , ( "section", Type.maybe Type.string ) - , ( "publishedTime" - , Type.maybe - (Type.namedWith - [ "DateOrDateTime" ] - "DateOrDateTime" - [] - ) - ) - , ( "modifiedTime" - , Type.maybe - (Type.namedWith - [ "DateOrDateTime" ] - "DateOrDateTime" - [] - ) - ) - , ( "expirationTime" - , Type.maybe - (Type.namedWith - [ "DateOrDateTime" ] - "DateOrDateTime" - [] - ) - ) - ] - , Type.namedWith [ "Head", "Seo" ] "Common" [] - ] - (Type.list - (Type.namedWith [ "Head" ] "Tag" []) - ) - ) - } - ) - [ articleArg_, articleArg_0 ] - , audioPlayer = - \audioPlayerArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "audioPlayer" - , annotation = - Just - (Type.function - [ Type.record - [ ( "canonicalUrlOverride" - , Type.maybe Type.string - ) - , ( "siteName", Type.string ) - , ( "image" - , Type.namedWith - [ "Head", "Seo" ] - "Image" - [] - ) - , ( "description", Type.string ) - , ( "title", Type.string ) - , ( "audio" - , Type.namedWith - [ "Head", "Seo" ] - "Audio" - [] - ) - , ( "locale" - , Type.maybe - (Type.namedWith - [ "Head", "Seo" ] - "Locale" - [] - ) - ) - ] - ] - (Type.namedWith [ "Head", "Seo" ] "Common" []) - ) - } - ) - [ audioPlayerArg_ ] - , book = - \bookArg_ bookArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "book" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Head", "Seo" ] "Common" [] - , Type.record - [ ( "tags", Type.list Type.string ) - , ( "isbn", Type.maybe Type.string ) - , ( "releaseDate" - , Type.maybe - (Type.namedWith - [ "DateOrDateTime" ] - "DateOrDateTime" - [] - ) - ) - ] - ] - (Type.list - (Type.namedWith [ "Head" ] "Tag" []) - ) - ) - } - ) - [ bookArg_, bookArg_0 ] - , profile = - \profileArg_ profileArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "profile" - , annotation = - Just - (Type.function - [ Type.record - [ ( "firstName", Type.string ) - , ( "lastName", Type.string ) - , ( "username", Type.maybe Type.string ) - ] - , Type.namedWith [ "Head", "Seo" ] "Common" [] - ] - (Type.list - (Type.namedWith [ "Head" ] "Tag" []) - ) - ) - } - ) - [ profileArg_, profileArg_0 ] - , song = - \songArg_ songArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "song" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Head", "Seo" ] "Common" [] - , Type.record - [ ( "duration", Type.maybe Type.int ) - , ( "album", Type.maybe Type.int ) - , ( "disc", Type.maybe Type.int ) - , ( "track", Type.maybe Type.int ) - ] - ] - (Type.list - (Type.namedWith [ "Head" ] "Tag" []) - ) - ) - } - ) - [ songArg_, songArg_0 ] - , summary = - \summaryArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "summary" - , annotation = - Just - (Type.function - [ Type.record - [ ( "canonicalUrlOverride" - , Type.maybe Type.string - ) - , ( "siteName", Type.string ) - , ( "image" - , Type.namedWith - [ "Head", "Seo" ] - "Image" - [] - ) - , ( "description", Type.string ) - , ( "title", Type.string ) - , ( "locale" - , Type.maybe - (Type.namedWith - [ "Head", "Seo" ] - "Locale" - [] - ) - ) - ] - ] - (Type.namedWith [ "Head", "Seo" ] "Common" []) - ) - } - ) - [ summaryArg_ ] - , summaryLarge = - \summaryLargeArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "summaryLarge" - , annotation = - Just - (Type.function - [ Type.record - [ ( "canonicalUrlOverride" - , Type.maybe Type.string - ) - , ( "siteName", Type.string ) - , ( "image" - , Type.namedWith - [ "Head", "Seo" ] - "Image" - [] - ) - , ( "description", Type.string ) - , ( "title", Type.string ) - , ( "locale" - , Type.maybe - (Type.namedWith - [ "Head", "Seo" ] - "Locale" - [] - ) - ) - ] - ] - (Type.namedWith [ "Head", "Seo" ] "Common" []) - ) - } - ) - [ summaryLargeArg_ ] - , videoPlayer = - \videoPlayerArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "videoPlayer" - , annotation = - Just - (Type.function - [ Type.record - [ ( "canonicalUrlOverride" - , Type.maybe Type.string - ) - , ( "siteName", Type.string ) - , ( "image" - , Type.namedWith - [ "Head", "Seo" ] - "Image" - [] - ) - , ( "description", Type.string ) - , ( "title", Type.string ) - , ( "video" - , Type.namedWith - [ "Head", "Seo" ] - "Video" - [] - ) - , ( "locale" - , Type.maybe - (Type.namedWith - [ "Head", "Seo" ] - "Locale" - [] - ) - ) - ] - ] - (Type.namedWith [ "Head", "Seo" ] "Common" []) - ) - } - ) - [ videoPlayerArg_ ] - , website = - \websiteArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "website" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Head", "Seo" ] "Common" [] - ] - (Type.list - (Type.namedWith [ "Head" ] "Tag" []) - ) - ) - } - ) - [ websiteArg_ ] - } - - -values_ : - { article : Elm.Expression - , audioPlayer : Elm.Expression - , book : Elm.Expression - , profile : Elm.Expression - , song : Elm.Expression - , summary : Elm.Expression - , summaryLarge : Elm.Expression - , videoPlayer : Elm.Expression - , website : Elm.Expression - } -values_ = - { article = - Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "article" - , annotation = - Just - (Type.function - [ Type.record - [ ( "tags", Type.list Type.string ) - , ( "section", Type.maybe Type.string ) - , ( "publishedTime" - , Type.maybe - (Type.namedWith - [ "DateOrDateTime" ] - "DateOrDateTime" - [] - ) - ) - , ( "modifiedTime" - , Type.maybe - (Type.namedWith - [ "DateOrDateTime" ] - "DateOrDateTime" - [] - ) - ) - , ( "expirationTime" - , Type.maybe - (Type.namedWith - [ "DateOrDateTime" ] - "DateOrDateTime" - [] - ) - ) - ] - , Type.namedWith [ "Head", "Seo" ] "Common" [] - ] - (Type.list (Type.namedWith [ "Head" ] "Tag" [])) - ) - } - , audioPlayer = - Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "audioPlayer" - , annotation = - Just - (Type.function - [ Type.record - [ ( "canonicalUrlOverride" - , Type.maybe Type.string - ) - , ( "siteName", Type.string ) - , ( "image" - , Type.namedWith [ "Head", "Seo" ] "Image" [] - ) - , ( "description", Type.string ) - , ( "title", Type.string ) - , ( "audio" - , Type.namedWith [ "Head", "Seo" ] "Audio" [] - ) - , ( "locale" - , Type.maybe - (Type.namedWith [ "Head", "Seo" ] "Locale" [] - ) - ) - ] - ] - (Type.namedWith [ "Head", "Seo" ] "Common" []) - ) - } - , book = - Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "book" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Head", "Seo" ] "Common" [] - , Type.record - [ ( "tags", Type.list Type.string ) - , ( "isbn", Type.maybe Type.string ) - , ( "releaseDate" - , Type.maybe - (Type.namedWith - [ "DateOrDateTime" ] - "DateOrDateTime" - [] - ) - ) - ] - ] - (Type.list (Type.namedWith [ "Head" ] "Tag" [])) - ) - } - , profile = - Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "profile" - , annotation = - Just - (Type.function - [ Type.record - [ ( "firstName", Type.string ) - , ( "lastName", Type.string ) - , ( "username", Type.maybe Type.string ) - ] - , Type.namedWith [ "Head", "Seo" ] "Common" [] - ] - (Type.list (Type.namedWith [ "Head" ] "Tag" [])) - ) - } - , song = - Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "song" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Head", "Seo" ] "Common" [] - , Type.record - [ ( "duration", Type.maybe Type.int ) - , ( "album", Type.maybe Type.int ) - , ( "disc", Type.maybe Type.int ) - , ( "track", Type.maybe Type.int ) - ] - ] - (Type.list (Type.namedWith [ "Head" ] "Tag" [])) - ) - } - , summary = - Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "summary" - , annotation = - Just - (Type.function - [ Type.record - [ ( "canonicalUrlOverride" - , Type.maybe Type.string - ) - , ( "siteName", Type.string ) - , ( "image" - , Type.namedWith [ "Head", "Seo" ] "Image" [] - ) - , ( "description", Type.string ) - , ( "title", Type.string ) - , ( "locale" - , Type.maybe - (Type.namedWith [ "Head", "Seo" ] "Locale" [] - ) - ) - ] - ] - (Type.namedWith [ "Head", "Seo" ] "Common" []) - ) - } - , summaryLarge = - Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "summaryLarge" - , annotation = - Just - (Type.function - [ Type.record - [ ( "canonicalUrlOverride" - , Type.maybe Type.string - ) - , ( "siteName", Type.string ) - , ( "image" - , Type.namedWith [ "Head", "Seo" ] "Image" [] - ) - , ( "description", Type.string ) - , ( "title", Type.string ) - , ( "locale" - , Type.maybe - (Type.namedWith [ "Head", "Seo" ] "Locale" [] - ) - ) - ] - ] - (Type.namedWith [ "Head", "Seo" ] "Common" []) - ) - } - , videoPlayer = - Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "videoPlayer" - , annotation = - Just - (Type.function - [ Type.record - [ ( "canonicalUrlOverride" - , Type.maybe Type.string - ) - , ( "siteName", Type.string ) - , ( "image" - , Type.namedWith [ "Head", "Seo" ] "Image" [] - ) - , ( "description", Type.string ) - , ( "title", Type.string ) - , ( "video" - , Type.namedWith [ "Head", "Seo" ] "Video" [] - ) - , ( "locale" - , Type.maybe - (Type.namedWith [ "Head", "Seo" ] "Locale" [] - ) - ) - ] - ] - (Type.namedWith [ "Head", "Seo" ] "Common" []) - ) - } - , website = - Elm.value - { importFrom = [ "Head", "Seo" ] - , name = "website" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Head", "Seo" ] "Common" [] ] - (Type.list (Type.namedWith [ "Head" ] "Tag" [])) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Json/Decode/Extra.elm b/codegen/Gen/Json/Decode/Extra.elm deleted file mode 100644 index 026ab4d4..00000000 --- a/codegen/Gen/Json/Decode/Extra.elm +++ /dev/null @@ -1,1679 +0,0 @@ -module Gen.Json.Decode.Extra exposing - ( moduleName_, datetime, url, andMap, when, collection - , sequence, combine, indexedList, keys, set, dict2, withDefault - , optionalField, optionalNullableField, fromMaybe, fromResult, parseInt, parseFloat, doubleEncoded - , call_, values_ - ) - -{-| -# Generated bindings for Json.Decode.Extra - -@docs moduleName_, datetime, url, andMap, when, collection -@docs sequence, combine, indexedList, keys, set, dict2 -@docs withDefault, optionalField, optionalNullableField, fromMaybe, fromResult, parseInt -@docs parseFloat, doubleEncoded, call_, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Json", "Decode", "Extra" ] - - -{-| Decode an ISO-8601 formatted date-time string. - -This always returns a `Time.Posix` value, which is naturally always expressed in -UTC. - - import Json.Decode exposing (..) - import Json.Encode - import Time - - """ "2018-08-26T09:46:00+02:00" """ - |> decodeString datetime - --> Ok (Time.millisToPosix 1535269560000) - - """ "" """ - |> decodeString datetime - --> Err - --> (Failure - --> "Expecting an ISO-8601 formatted date+time string" - --> (Json.Encode.string "") - --> ) - -datetime: Json.Decode.Decoder Time.Posix --} -datetime : Elm.Expression -datetime = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "datetime" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith [ "Time" ] "Posix" [] ] - ) - } - - -{-| Decode a URL - -This always returns a `Url.Url` value. - - import Json.Decode exposing (..) - import Url - - """ "http://foo.bar/quux" """ - |> decodeString url - --> Ok <| Url.Url Url.Http "foo.bar" Nothing "/quux" Nothing Nothing - -url: Json.Decode.Decoder Url.Url --} -url : Elm.Expression -url = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "url" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith [ "Url" ] "Url" [] ] - ) - } - - -{-| Can be helpful when decoding large objects incrementally. - -See [the `andMap` docs](https://github.com/elm-community/json-extra/blob/2.0.0/docs/andMap.md) -for an explanation of how `andMap` works and how to use it. - -andMap: Json.Decode.Decoder a -> Json.Decode.Decoder (a -> b) -> Json.Decode.Decoder b --} -andMap : Elm.Expression -> Elm.Expression -> Elm.Expression -andMap andMapArg_ andMapArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "andMap" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.function [ Type.var "a" ] (Type.var "b") ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "b" ] - ) - ) - } - ) - [ andMapArg_, andMapArg_0 ] - - -{-| Helper for conditionally decoding values based on some discriminator -that needs to pass a certain check. - - import Json.Decode exposing (..) - import Json.Encode - - - is : a -> a -> Bool - is a b = - a == b - - - enabledValue : Decoder Int - enabledValue = - (field "value" int) - |> when (field "enabled" bool) (is True) - - - """ { "enabled": true, "value": 123 } """ - |> decodeString enabledValue - --> Ok 123 - - - input : Json.Decode.Value - input = - Json.Encode.object - [ ( "enabled", Json.Encode.bool False ) - , ( "value", Json.Encode.int 321 ) - ] - - expectedError : Error - expectedError = - Failure "Check failed with input" input - - """ { "enabled": false, "value": 321 } """ - |> decodeString enabledValue - --> Err expectedError - -This can also be used to decode union types that are encoded with a discriminator field: - - type Animal = Cat String | Dog String - - - dog : Decoder Animal - dog = - map Dog (field "name" string) - - - cat : Decoder Animal - cat = - map Cat (field "name" string) - - - animalType : Decoder String - animalType = - field "type" string - - - animal : Decoder Animal - animal = - oneOf - [ when animalType (is "dog") dog - , when animalType (is "cat") cat - ] - - - """ - [ - { "type": "dog", "name": "Dawg" }, - { "type": "cat", "name": "Roxy" } - ] - """ - |> decodeString (list animal) - --> Ok [ Dog "Dawg", Cat "Roxy" ] - -when: - Json.Decode.Decoder a - -> (a -> Bool) - -> Json.Decode.Decoder b - -> Json.Decode.Decoder b --} -when : - Elm.Expression - -> (Elm.Expression -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression -when whenArg_ whenArg_0 whenArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "when" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - , Type.function [ Type.var "a" ] Type.bool - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "b" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "b" ] - ) - ) - } - ) - [ whenArg_, Elm.functionReduced "whenUnpack" whenArg_0, whenArg_1 ] - - -{-| Some JavaScript structures look like arrays, but aren't really. Examples -include `HTMLCollection`, `NodeList` and everything else that has a `length` -property, has values indexed by an integer key between 0 and `length`, but yet -_is not_ a JavaScript Array. - -This decoder can come to the rescue. - - import Json.Decode exposing (..) - - - """ { "length": 3, "0": "foo", "1": "bar", "2": "baz" } """ - |> decodeString (collection string) - --> Ok [ "foo", "bar", "baz" ] - -collection: Json.Decode.Decoder a -> Json.Decode.Decoder (List a) --} -collection : Elm.Expression -> Elm.Expression -collection collectionArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "collection" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.list (Type.var "a") ] - ) - ) - } - ) - [ collectionArg_ ] - - -{-| This function turns a list of decoders into a decoder that returns a list. - -The returned decoder will zip the list of decoders with a list of values, -matching each decoder with exactly one value at the same position. This is most -often useful in cases when you find yourself needing to dynamically generate a -list of decoders based on some data, and decode some other data with this list -of decoders. - -Note that this function, unlike `List.map2`'s behaviour, expects the list of -decoders to have the same length as the list of values in the JSON. - - import Json.Decode exposing (..) - - - decoder : Decoder (List (Maybe String)) - decoder = - sequence - [ map Just string - , succeed Nothing - , map Just string - ] - - - decodeString decoder """ [ "pick me", "ignore me", "and pick me" ] """ - --> Ok [ Just "pick me", Nothing, Just "and pick me" ] - -sequence: List (Json.Decode.Decoder a) -> Json.Decode.Decoder (List a) --} -sequence : List Elm.Expression -> Elm.Expression -sequence sequenceArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "sequence" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.list (Type.var "a") ] - ) - ) - } - ) - [ Elm.list sequenceArg_ ] - - -{-| Helps converting a list of decoders into a decoder for a list of that type. - - import Json.Decode exposing (..) - - - decoders : List (Decoder String) - decoders = - [ field "foo" string - , field "bar" string - , field "another" string - ] - - - """ { "foo": "hello", "another": "!", "bar": "world" } """ - |> decodeString (combine decoders) - --> Ok [ "hello", "world", "!" ] - -combine: List (Json.Decode.Decoder a) -> Json.Decode.Decoder (List a) --} -combine : List Elm.Expression -> Elm.Expression -combine combineArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "combine" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.list (Type.var "a") ] - ) - ) - } - ) - [ Elm.list combineArg_ ] - - -{-| Get access to the current index while decoding a list element. - - import Json.Decode exposing (..) - - - repeatedStringDecoder : Int -> Decoder String - repeatedStringDecoder times = - string |> map (String.repeat times) - - - """ [ "a", "b", "c", "d" ] """ - |> decodeString (indexedList repeatedStringDecoder) - --> Ok [ "", "b", "cc", "ddd" ] - -indexedList: (Int -> Json.Decode.Decoder a) -> Json.Decode.Decoder (List a) --} -indexedList : (Elm.Expression -> Elm.Expression) -> Elm.Expression -indexedList indexedListArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "indexedList" - , annotation = - Just - (Type.function - [ Type.function - [ Type.int ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.list (Type.var "a") ] - ) - ) - } - ) - [ Elm.functionReduced "indexedListUnpack" indexedListArg_ ] - - -{-| Get a list of the keys of a JSON object - - import Json.Decode exposing (..) - - - """ { "alice": 42, "bob": 99 } """ - |> decodeString keys - --> Ok [ "alice", "bob" ] - -keys: Json.Decode.Decoder (List String) --} -keys : Elm.Expression -keys = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "keys" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.list Type.string ] - ) - } - - -{-| Extract a set. - - import Json.Decode exposing (..) - import Set - - - "[ 1, 1, 5, 2 ]" - |> decodeString (set int) - --> Ok <| Set.fromList [ 1, 2, 5 ] - -set: Json.Decode.Decoder comparable -> Json.Decode.Decoder (Set.Set comparable) --} -set : Elm.Expression -> Elm.Expression -set setArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "set" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "comparable" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Set" ] - "Set" - [ Type.var "comparable" ] - ] - ) - ) - } - ) - [ setArg_ ] - - -{-| Extract a dict using separate decoders for keys and values. - - import Json.Decode exposing (..) - import Dict - - - """ { "1": "foo", "2": "bar" } """ - |> decodeString (dict2 int string) - --> Ok <| Dict.fromList [ ( 1, "foo" ), ( 2, "bar" ) ] - -dict2: - Json.Decode.Decoder comparable - -> Json.Decode.Decoder v - -> Json.Decode.Decoder (Dict.Dict comparable v) --} -dict2 : Elm.Expression -> Elm.Expression -> Elm.Expression -dict2 dict2Arg_ dict2Arg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "dict2" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "comparable" ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "v" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.var "comparable", Type.var "v" ] - ] - ) - ) - } - ) - [ dict2Arg_, dict2Arg_0 ] - - -{-| Try running the given decoder; if that fails, then succeed with the given -fallback value. - - import Json.Decode exposing (..) - - - """ { "children": "oops" } """ - |> decodeString (field "children" (list string) |> withDefault []) - --> Ok [] - - - """ null """ - |> decodeString (field "children" (list string) |> withDefault []) - --> Ok [] - - - """ 30 """ - |> decodeString (int |> withDefault 42) - --> Ok 30 - -withDefault: a -> Json.Decode.Decoder a -> Json.Decode.Decoder a --} -withDefault : Elm.Expression -> Elm.Expression -> Elm.Expression -withDefault withDefaultArg_ withDefaultArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "withDefault" - , annotation = - Just - (Type.function - [ Type.var "a" - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ) - } - ) - [ withDefaultArg_, withDefaultArg_0 ] - - -{-| If a field is missing, succeed with `Nothing`. If it is present, decode it -as normal and wrap successes in a `Just`. - -When decoding with -[`maybe`](http://package.elm-lang.org/packages/elm-lang/core/latest/Json-Decode#maybe), -if a field is present but malformed, you get a success and Nothing. -`optionalField` gives you a failed decoding in that case, so you know -you received malformed data. - -Examples: - - import Json.Decode exposing (..) - import Json.Encode - -Let's define a `stuffDecoder` that extracts the `"stuff"` field, if it exists. - - stuffDecoder : Decoder (Maybe String) - stuffDecoder = - optionalField "stuff" string - -If the "stuff" field is missing, decode to Nothing. - - """ { } """ - |> decodeString stuffDecoder - --> Ok Nothing - -If the "stuff" field is present but not a String, fail decoding. - - expectedError : Error - expectedError = - Failure "Expecting a STRING" (Json.Encode.list identity []) - |> Field "stuff" - - """ { "stuff": [] } """ - |> decodeString stuffDecoder - --> Err expectedError - -If the "stuff" field is present and valid, decode to Just String. - - """ { "stuff": "yay!" } """ - |> decodeString stuffDecoder - --> Ok <| Just "yay!" - -optionalField: String -> Json.Decode.Decoder a -> Json.Decode.Decoder (Maybe a) --} -optionalField : String -> Elm.Expression -> Elm.Expression -optionalField optionalFieldArg_ optionalFieldArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "optionalField" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.maybe (Type.var "a") ] - ) - ) - } - ) - [ Elm.string optionalFieldArg_, optionalFieldArg_0 ] - - -{-| A neat combination of `optionalField` and `nullable`. - -What this means is that a decoder like `optionalNullableField "foo" string` will -return `Just "hello"` for `{"foo": "hello"}`, `Nothing` for both `{"foo": null}` -and `{}`, and an error for malformed input like `{"foo": 123}`. - - import Json.Decode exposing (Decoder, Error(..), decodeString, field, string) - import Json.Decode.Extra exposing (optionalNullableField) - import Json.Encode - - myDecoder : Decoder (Maybe String) - myDecoder = - optionalNullableField "foo" string - - - """ {"foo": "hello"} """ - |> decodeString myDecoder - --> Ok (Just "hello") - - - """ {"foo": null} """ - |> decodeString myDecoder - --> Ok Nothing - - - """ {} """ - |> decodeString myDecoder - --> Ok Nothing - - - """ {"foo": 123} """ - |> decodeString myDecoder - |> Result.mapError (\_ -> "expected error") - --> Err "expected error" - -optionalNullableField: String -> Json.Decode.Decoder a -> Json.Decode.Decoder (Maybe a) --} -optionalNullableField : String -> Elm.Expression -> Elm.Expression -optionalNullableField optionalNullableFieldArg_ optionalNullableFieldArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "optionalNullableField" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.maybe (Type.var "a") ] - ) - ) - } - ) - [ Elm.string optionalNullableFieldArg_, optionalNullableFieldArg_0 ] - - -{-| Transform a `Maybe a` into a `Decoder a` - -Sometimes, you'll have a function that produces a `Maybe a` value, that you may -want to use in a decoder. - -Let's say, for example, that we have a function to extract the first letter of a -string, and we want to use that in a decoder so we can extract only the first -letter of that string. - - import Json.Decode exposing (..) - import Json.Encode - - - firstLetter : String -> Maybe Char - firstLetter input = - Maybe.map Tuple.first (String.uncons input) - - - firstLetterDecoder : Decoder Char - firstLetterDecoder = - andThen - (fromMaybe "Empty string not allowed" << firstLetter) - string - - """ "something" """ - |> decodeString firstLetterDecoder - --> Ok 's' - - - """ "" """ - |> decodeString firstLetterDecoder - --> Err (Failure "Empty string not allowed" (Json.Encode.string "")) - -fromMaybe: String -> Maybe a -> Json.Decode.Decoder a --} -fromMaybe : String -> Elm.Expression -> Elm.Expression -fromMaybe fromMaybeArg_ fromMaybeArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "fromMaybe" - , annotation = - Just - (Type.function - [ Type.string, Type.maybe (Type.var "a") ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ) - } - ) - [ Elm.string fromMaybeArg_, fromMaybeArg_0 ] - - -{-| Transform a result into a decoder - -Sometimes it can be useful to use functions that primarily operate on -`Result` in decoders. - - import Json.Decode exposing (..) - import Json.Encode - - - validateString : String -> Result String String - validateString input = - case input of - "" -> - Err "Empty string is not allowed" - _ -> - Ok input - - - """ "something" """ - |> decodeString (string |> andThen (fromResult << validateString)) - --> Ok "something" - - - """ "" """ - |> decodeString (string |> andThen (fromResult << validateString)) - --> Err (Failure "Empty string is not allowed" (Json.Encode.string "")) - -fromResult: Result.Result String a -> Json.Decode.Decoder a --} -fromResult : Elm.Expression -> Elm.Expression -fromResult fromResultArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "fromResult" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.string, Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ) - } - ) - [ fromResultArg_ ] - - -{-| Extract an int using [`String.toInt`](http://package.elm-lang.org/packages/elm-lang/core/latest/String#toInt) - - import Json.Decode exposing (..) - - - """ { "field": "123" } """ - |> decodeString (field "field" parseInt) - --> Ok 123 - -parseInt: Json.Decode.Decoder Int --} -parseInt : Elm.Expression -parseInt = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "parseInt" - , annotation = - Just (Type.namedWith [ "Json", "Decode" ] "Decoder" [ Type.int ]) - } - - -{-| Extract a float using [`String.toFloat`](http://package.elm-lang.org/packages/elm-lang/core/latest/String#toFloat) - - import Json.Decode exposing (..) - - - """ { "field": "50.5" } """ - |> decodeString (field "field" parseFloat) - --> Ok 50.5 - -parseFloat: Json.Decode.Decoder Float --} -parseFloat : Elm.Expression -parseFloat = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "parseFloat" - , annotation = - Just (Type.namedWith [ "Json", "Decode" ] "Decoder" [ Type.float ]) - } - - -{-| Extract a JSON-encoded string field - -"Yo dawg, I heard you like JSON..." - -If someone has put JSON in your JSON (perhaps a JSON log entry, encoded -as a string) this is the function you're looking for. Give it a decoder -and it will return a new decoder that applies your decoder to a string -field and yields the result (or fails if your decoder fails). - - import Json.Decode exposing (..) - - - logEntriesDecoder : Decoder (List String) - logEntriesDecoder = - doubleEncoded (list string) - - - logsDecoder : Decoder (List String) - logsDecoder = - field "logs" logEntriesDecoder - - - """ { "logs": "[\\"log1\\", \\"log2\\"]"} """ - |> decodeString logsDecoder - --> Ok [ "log1", "log2" ] - -doubleEncoded: Json.Decode.Decoder a -> Json.Decode.Decoder a --} -doubleEncoded : Elm.Expression -> Elm.Expression -doubleEncoded doubleEncodedArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "doubleEncoded" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ) - } - ) - [ doubleEncodedArg_ ] - - -call_ : - { andMap : Elm.Expression -> Elm.Expression -> Elm.Expression - , when : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , collection : Elm.Expression -> Elm.Expression - , sequence : Elm.Expression -> Elm.Expression - , combine : Elm.Expression -> Elm.Expression - , indexedList : Elm.Expression -> Elm.Expression - , set : Elm.Expression -> Elm.Expression - , dict2 : Elm.Expression -> Elm.Expression -> Elm.Expression - , withDefault : Elm.Expression -> Elm.Expression -> Elm.Expression - , optionalField : Elm.Expression -> Elm.Expression -> Elm.Expression - , optionalNullableField : Elm.Expression -> Elm.Expression -> Elm.Expression - , fromMaybe : Elm.Expression -> Elm.Expression -> Elm.Expression - , fromResult : Elm.Expression -> Elm.Expression - , doubleEncoded : Elm.Expression -> Elm.Expression - } -call_ = - { andMap = - \andMapArg_ andMapArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "andMap" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.function - [ Type.var "a" ] - (Type.var "b") - ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "b" ] - ) - ) - } - ) - [ andMapArg_, andMapArg_0 ] - , when = - \whenArg_ whenArg_0 whenArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "when" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - , Type.function [ Type.var "a" ] Type.bool - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "b" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "b" ] - ) - ) - } - ) - [ whenArg_, whenArg_0, whenArg_1 ] - , collection = - \collectionArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "collection" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.list (Type.var "a") ] - ) - ) - } - ) - [ collectionArg_ ] - , sequence = - \sequenceArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "sequence" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.list (Type.var "a") ] - ) - ) - } - ) - [ sequenceArg_ ] - , combine = - \combineArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "combine" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.list (Type.var "a") ] - ) - ) - } - ) - [ combineArg_ ] - , indexedList = - \indexedListArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "indexedList" - , annotation = - Just - (Type.function - [ Type.function - [ Type.int ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.list (Type.var "a") ] - ) - ) - } - ) - [ indexedListArg_ ] - , set = - \setArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "set" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "comparable" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Set" ] - "Set" - [ Type.var "comparable" ] - ] - ) - ) - } - ) - [ setArg_ ] - , dict2 = - \dict2Arg_ dict2Arg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "dict2" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "comparable" ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "v" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.var "comparable" - , Type.var "v" - ] - ] - ) - ) - } - ) - [ dict2Arg_, dict2Arg_0 ] - , withDefault = - \withDefaultArg_ withDefaultArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "withDefault" - , annotation = - Just - (Type.function - [ Type.var "a" - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ) - } - ) - [ withDefaultArg_, withDefaultArg_0 ] - , optionalField = - \optionalFieldArg_ optionalFieldArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "optionalField" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.maybe (Type.var "a") ] - ) - ) - } - ) - [ optionalFieldArg_, optionalFieldArg_0 ] - , optionalNullableField = - \optionalNullableFieldArg_ optionalNullableFieldArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "optionalNullableField" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.maybe (Type.var "a") ] - ) - ) - } - ) - [ optionalNullableFieldArg_, optionalNullableFieldArg_0 ] - , fromMaybe = - \fromMaybeArg_ fromMaybeArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "fromMaybe" - , annotation = - Just - (Type.function - [ Type.string, Type.maybe (Type.var "a") ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ) - } - ) - [ fromMaybeArg_, fromMaybeArg_0 ] - , fromResult = - \fromResultArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "fromResult" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.string, Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ) - } - ) - [ fromResultArg_ ] - , doubleEncoded = - \doubleEncodedArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "doubleEncoded" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ) - } - ) - [ doubleEncodedArg_ ] - } - - -values_ : - { datetime : Elm.Expression - , url : Elm.Expression - , andMap : Elm.Expression - , when : Elm.Expression - , collection : Elm.Expression - , sequence : Elm.Expression - , combine : Elm.Expression - , indexedList : Elm.Expression - , keys : Elm.Expression - , set : Elm.Expression - , dict2 : Elm.Expression - , withDefault : Elm.Expression - , optionalField : Elm.Expression - , optionalNullableField : Elm.Expression - , fromMaybe : Elm.Expression - , fromResult : Elm.Expression - , parseInt : Elm.Expression - , parseFloat : Elm.Expression - , doubleEncoded : Elm.Expression - } -values_ = - { datetime = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "datetime" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith [ "Time" ] "Posix" [] ] - ) - } - , url = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "url" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith [ "Url" ] "Url" [] ] - ) - } - , andMap = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "andMap" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.function [ Type.var "a" ] (Type.var "b") ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "b" ] - ) - ) - } - , when = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "when" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - , Type.function [ Type.var "a" ] Type.bool - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "b" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "b" ] - ) - ) - } - , collection = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "collection" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.list (Type.var "a") ] - ) - ) - } - , sequence = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "sequence" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.list (Type.var "a") ] - ) - ) - } - , combine = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "combine" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.list (Type.var "a") ] - ) - ) - } - , indexedList = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "indexedList" - , annotation = - Just - (Type.function - [ Type.function - [ Type.int ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.list (Type.var "a") ] - ) - ) - } - , keys = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "keys" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.list Type.string ] - ) - } - , set = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "set" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "comparable" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Set" ] - "Set" - [ Type.var "comparable" ] - ] - ) - ) - } - , dict2 = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "dict2" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "comparable" ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "v" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.var "comparable", Type.var "v" ] - ] - ) - ) - } - , withDefault = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "withDefault" - , annotation = - Just - (Type.function - [ Type.var "a" - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ) - } - , optionalField = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "optionalField" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.maybe (Type.var "a") ] - ) - ) - } - , optionalNullableField = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "optionalNullableField" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.maybe (Type.var "a") ] - ) - ) - } - , fromMaybe = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "fromMaybe" - , annotation = - Just - (Type.function - [ Type.string, Type.maybe (Type.var "a") ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ) - } - , fromResult = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "fromResult" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.string, Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ) - } - , parseInt = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "parseInt" - , annotation = - Just - (Type.namedWith [ "Json", "Decode" ] "Decoder" [ Type.int ]) - } - , parseFloat = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "parseFloat" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.float ] - ) - } - , doubleEncoded = - Elm.value - { importFrom = [ "Json", "Decode", "Extra" ] - , name = "doubleEncoded" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Json/Encode/Extra.elm b/codegen/Gen/Json/Encode/Extra.elm deleted file mode 100644 index 73a343e3..00000000 --- a/codegen/Gen/Json/Encode/Extra.elm +++ /dev/null @@ -1,104 +0,0 @@ -module Gen.Json.Encode.Extra exposing ( moduleName_, maybe, call_, values_ ) - -{-| -# Generated bindings for Json.Encode.Extra - -@docs moduleName_, maybe, call_, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Json", "Encode", "Extra" ] - - -{-| Encode a Maybe value. If the value is `Nothing` it will be encoded as `null` - - import Json.Encode exposing (..) - - - maybe int (Just 50) - --> int 50 - - - maybe int Nothing - --> null - -maybe: (a -> Json.Encode.Value) -> Maybe a -> Json.Encode.Value --} -maybe : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -maybe maybeArg_ maybeArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Json", "Encode", "Extra" ] - , name = "maybe" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" ] - (Type.namedWith [ "Json", "Encode" ] "Value" []) - , Type.maybe (Type.var "a") - ] - (Type.namedWith [ "Json", "Encode" ] "Value" []) - ) - } - ) - [ Elm.functionReduced "maybeUnpack" maybeArg_, maybeArg_0 ] - - -call_ : { maybe : Elm.Expression -> Elm.Expression -> Elm.Expression } -call_ = - { maybe = - \maybeArg_ maybeArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Json", "Encode", "Extra" ] - , name = "maybe" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" ] - (Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - ) - , Type.maybe (Type.var "a") - ] - (Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - ) - ) - } - ) - [ maybeArg_, maybeArg_0 ] - } - - -values_ : { maybe : Elm.Expression } -values_ = - { maybe = - Elm.value - { importFrom = [ "Json", "Encode", "Extra" ] - , name = "maybe" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" ] - (Type.namedWith [ "Json", "Encode" ] "Value" []) - , Type.maybe (Type.var "a") - ] - (Type.namedWith [ "Json", "Encode" ] "Value" []) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/OpenApi/Common.elm b/codegen/Gen/OpenApi/Common.elm deleted file mode 100644 index e5ab9792..00000000 --- a/codegen/Gen/OpenApi/Common.elm +++ /dev/null @@ -1,1999 +0,0 @@ -module Gen.OpenApi.Common exposing - ( moduleName_, jsonDecodeAndMap, decodeOptionalField, bytesResolverCustomEffect, expectBytesCustomEffect, stringResolverCustomEffect - , expectStringCustomEffect, jsonResolverCustomEffect, expectJsonCustomEffect, bytesResolverCustom, expectBytesCustom, stringResolverCustom, expectStringCustom - , jsonResolverCustom, expectJsonCustom, annotation_, make_, caseOf_, call_, values_ - ) - -{-| -# Generated bindings for OpenApi.Common - -@docs moduleName_, jsonDecodeAndMap, decodeOptionalField, bytesResolverCustomEffect, expectBytesCustomEffect, stringResolverCustomEffect -@docs expectStringCustomEffect, jsonResolverCustomEffect, expectJsonCustomEffect, bytesResolverCustom, expectBytesCustom, stringResolverCustom -@docs expectStringCustom, jsonResolverCustom, expectJsonCustom, annotation_, make_, caseOf_ -@docs call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "OpenApi", "Common" ] - - -{-| {-| Chain JSON decoders, when `Json.Decode.map8` isn't enough. --} - -jsonDecodeAndMap: - Json.Decode.Decoder a - -> Json.Decode.Decoder (a -> value) - -> Json.Decode.Decoder value --} -jsonDecodeAndMap : Elm.Expression -> Elm.Expression -> Elm.Expression -jsonDecodeAndMap jsonDecodeAndMapArg_ jsonDecodeAndMapArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "jsonDecodeAndMap" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.function - [ Type.var "a" ] - (Type.var "value") - ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "value" ] - ) - ) - } - ) - [ jsonDecodeAndMapArg_, jsonDecodeAndMapArg_0 ] - - -{-| {-| Decode an optional field - - decodeString (decodeOptionalField "x" int) "{ "x": 3 }" - --> Ok (Just 3) - - decodeString (decodeOptionalField "x" int) "{ "x": true }" - --> Err ... - - decodeString (decodeOptionalField "x" int) "{ "y": 4 }" - --> Ok Nothing - --} - -decodeOptionalField: String -> Json.Decode.Decoder t -> Json.Decode.Decoder (Maybe t) --} -decodeOptionalField : String -> Elm.Expression -> Elm.Expression -decodeOptionalField decodeOptionalFieldArg_ decodeOptionalFieldArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "decodeOptionalField" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "t" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.maybe (Type.var "t") ] - ) - ) - } - ) - [ Elm.string decodeOptionalFieldArg_, decodeOptionalFieldArg_0 ] - - -{-| bytesResolverCustomEffect: - Dict.Dict String (Json.Decode.Decoder err) - -> Effect.Http.Resolver restrictions (OpenApi.Common.Error err Bytes.Bytes) Bytes.Bytes --} -bytesResolverCustomEffect : Elm.Expression -> Elm.Expression -bytesResolverCustomEffect bytesResolverCustomEffectArg_ = - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "bytesResolverCustomEffect" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Resolver" - [ Type.var "restrictions" - , Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err" - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - ) - ) - } - ) - [ bytesResolverCustomEffectArg_ ] - - -{-| expectBytesCustomEffect: - (Result.Result (OpenApi.Common.Error err Bytes.Bytes) Bytes.Bytes -> msg) - -> Dict.Dict String (Json.Decode.Decoder err) - -> Effect.Http.Expect msg --} -expectBytesCustomEffect : - (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -expectBytesCustomEffect expectBytesCustomEffectArg_ expectBytesCustomEffectArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectBytesCustomEffect" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err" - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Expect" - [ Type.var "msg" ] - ) - ) - } - ) - [ Elm.functionReduced - "expectBytesCustomEffectUnpack" - expectBytesCustomEffectArg_ - , expectBytesCustomEffectArg_0 - ] - - -{-| stringResolverCustomEffect: - Dict.Dict String (Json.Decode.Decoder err) - -> Effect.Http.Resolver restrictions (OpenApi.Common.Error err String) String --} -stringResolverCustomEffect : Elm.Expression -> Elm.Expression -stringResolverCustomEffect stringResolverCustomEffectArg_ = - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "stringResolverCustomEffect" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Resolver" - [ Type.var "restrictions" - , Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.string - ] - ) - ) - } - ) - [ stringResolverCustomEffectArg_ ] - - -{-| expectStringCustomEffect: - (Result.Result (OpenApi.Common.Error err String) String -> msg) - -> Dict.Dict String (Json.Decode.Decoder err) - -> Effect.Http.Expect msg --} -expectStringCustomEffect : - (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -expectStringCustomEffect expectStringCustomEffectArg_ expectStringCustomEffectArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectStringCustomEffect" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.string - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Expect" - [ Type.var "msg" ] - ) - ) - } - ) - [ Elm.functionReduced - "expectStringCustomEffectUnpack" - expectStringCustomEffectArg_ - , expectStringCustomEffectArg_0 - ] - - -{-| jsonResolverCustomEffect: - Dict.Dict String (Json.Decode.Decoder err) - -> Json.Decode.Decoder success - -> Effect.Http.Resolver restrictions (OpenApi.Common.Error err String) success --} -jsonResolverCustomEffect : Elm.Expression -> Elm.Expression -> Elm.Expression -jsonResolverCustomEffect jsonResolverCustomEffectArg_ jsonResolverCustomEffectArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "jsonResolverCustomEffect" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "success" ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Resolver" - [ Type.var "restrictions" - , Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.var "success" - ] - ) - ) - } - ) - [ jsonResolverCustomEffectArg_, jsonResolverCustomEffectArg_0 ] - - -{-| expectJsonCustomEffect: - (Result.Result (OpenApi.Common.Error err String) success -> msg) - -> Dict.Dict String (Json.Decode.Decoder err) - -> Json.Decode.Decoder success - -> Effect.Http.Expect msg --} -expectJsonCustomEffect : - (Elm.Expression -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression -expectJsonCustomEffect expectJsonCustomEffectArg_ expectJsonCustomEffectArg_0 expectJsonCustomEffectArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectJsonCustomEffect" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.var "success" - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "success" ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Expect" - [ Type.var "msg" ] - ) - ) - } - ) - [ Elm.functionReduced - "expectJsonCustomEffectUnpack" - expectJsonCustomEffectArg_ - , expectJsonCustomEffectArg_0 - , expectJsonCustomEffectArg_1 - ] - - -{-| bytesResolverCustom: - Dict.Dict String (Json.Decode.Decoder err) - -> Http.Resolver (OpenApi.Common.Error err Bytes.Bytes) Bytes.Bytes --} -bytesResolverCustom : Elm.Expression -> Elm.Expression -bytesResolverCustom bytesResolverCustomArg_ = - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "bytesResolverCustom" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Http" ] - "Resolver" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err" - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - ) - ) - } - ) - [ bytesResolverCustomArg_ ] - - -{-| expectBytesCustom: - (Result.Result (OpenApi.Common.Error err Bytes.Bytes) Bytes.Bytes -> msg) - -> Dict.Dict String (Json.Decode.Decoder err) - -> Http.Expect msg --} -expectBytesCustom : - (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -expectBytesCustom expectBytesCustomArg_ expectBytesCustomArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectBytesCustom" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err" - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith [ "Http" ] "Expect" [ Type.var "msg" ] - ) - ) - } - ) - [ Elm.functionReduced "expectBytesCustomUnpack" expectBytesCustomArg_ - , expectBytesCustomArg_0 - ] - - -{-| stringResolverCustom: - Dict.Dict String (Json.Decode.Decoder err) - -> Http.Resolver (OpenApi.Common.Error err String) String --} -stringResolverCustom : Elm.Expression -> Elm.Expression -stringResolverCustom stringResolverCustomArg_ = - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "stringResolverCustom" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Http" ] - "Resolver" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.string - ] - ) - ) - } - ) - [ stringResolverCustomArg_ ] - - -{-| expectStringCustom: - (Result.Result (OpenApi.Common.Error err String) String -> msg) - -> Dict.Dict String (Json.Decode.Decoder err) - -> Http.Expect msg --} -expectStringCustom : - (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -expectStringCustom expectStringCustomArg_ expectStringCustomArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectStringCustom" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.string - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith [ "Http" ] "Expect" [ Type.var "msg" ] - ) - ) - } - ) - [ Elm.functionReduced "expectStringCustomUnpack" expectStringCustomArg_ - , expectStringCustomArg_0 - ] - - -{-| jsonResolverCustom: - Dict.Dict String (Json.Decode.Decoder err) - -> Json.Decode.Decoder success - -> Http.Resolver (OpenApi.Common.Error err String) success --} -jsonResolverCustom : Elm.Expression -> Elm.Expression -> Elm.Expression -jsonResolverCustom jsonResolverCustomArg_ jsonResolverCustomArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "jsonResolverCustom" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "success" ] - ] - (Type.namedWith - [ "Http" ] - "Resolver" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.var "success" - ] - ) - ) - } - ) - [ jsonResolverCustomArg_, jsonResolverCustomArg_0 ] - - -{-| expectJsonCustom: - (Result.Result (OpenApi.Common.Error err String) success -> msg) - -> Dict.Dict String (Json.Decode.Decoder err) - -> Json.Decode.Decoder success - -> Http.Expect msg --} -expectJsonCustom : - (Elm.Expression -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression -expectJsonCustom expectJsonCustomArg_ expectJsonCustomArg_0 expectJsonCustomArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectJsonCustom" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.var "success" - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "success" ] - ] - (Type.namedWith [ "Http" ] "Expect" [ Type.var "msg" ] - ) - ) - } - ) - [ Elm.functionReduced "expectJsonCustomUnpack" expectJsonCustomArg_ - , expectJsonCustomArg_0 - , expectJsonCustomArg_1 - ] - - -annotation_ : - { nullable : Type.Annotation -> Type.Annotation - , error : Type.Annotation -> Type.Annotation -> Type.Annotation - } -annotation_ = - { nullable = - \nullableArg0 -> - Type.namedWith [ "OpenApi", "Common" ] "Nullable" [ nullableArg0 ] - , error = - \errorArg0 errorArg1 -> - Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ errorArg0, errorArg1 ] - } - - -make_ : - { null : Elm.Expression - , present : Elm.Expression -> Elm.Expression - , badUrl : Elm.Expression -> Elm.Expression - , timeout : Elm.Expression - , networkError : Elm.Expression - , knownBadStatus : Elm.Expression -> Elm.Expression -> Elm.Expression - , unknownBadStatus : Elm.Expression -> Elm.Expression -> Elm.Expression - , badErrorBody : Elm.Expression -> Elm.Expression -> Elm.Expression - , badBody : Elm.Expression -> Elm.Expression -> Elm.Expression - } -make_ = - { null = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "Null" - , annotation = - Just (Type.namedWith [] "Nullable" [ Type.var "value" ]) - } - , present = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "Present" - , annotation = - Just - (Type.namedWith [] "Nullable" [ Type.var "value" ]) - } - ) - [ ar0 ] - , badUrl = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "BadUrl" - , annotation = - Just - (Type.namedWith - [] - "Error" - [ Type.var "err", Type.var "body" ] - ) - } - ) - [ ar0 ] - , timeout = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "Timeout" - , annotation = - Just - (Type.namedWith - [] - "Error" - [ Type.var "err", Type.var "body" ] - ) - } - , networkError = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "NetworkError" - , annotation = - Just - (Type.namedWith - [] - "Error" - [ Type.var "err", Type.var "body" ] - ) - } - , knownBadStatus = - \ar0 ar1 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "KnownBadStatus" - , annotation = - Just - (Type.namedWith - [] - "Error" - [ Type.var "err", Type.var "body" ] - ) - } - ) - [ ar0, ar1 ] - , unknownBadStatus = - \ar0 ar1 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "UnknownBadStatus" - , annotation = - Just - (Type.namedWith - [] - "Error" - [ Type.var "err", Type.var "body" ] - ) - } - ) - [ ar0, ar1 ] - , badErrorBody = - \ar0 ar1 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "BadErrorBody" - , annotation = - Just - (Type.namedWith - [] - "Error" - [ Type.var "err", Type.var "body" ] - ) - } - ) - [ ar0, ar1 ] - , badBody = - \ar0 ar1 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "BadBody" - , annotation = - Just - (Type.namedWith - [] - "Error" - [ Type.var "err", Type.var "body" ] - ) - } - ) - [ ar0, ar1 ] - } - - -caseOf_ = - { nullable = - \nullableExpression nullableTags -> - Elm.Case.custom - nullableExpression - (Type.namedWith - [ "OpenApi", "Common" ] - "Nullable" - [ Type.var "value" ] - ) - [ Elm.Case.branch - (Elm.Arg.customType "Null" nullableTags.null) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "Present" - nullableTags.present |> Elm.Arg.item - (Elm.Arg.varWith - "value" - (Type.var "value") - ) - ) - Basics.identity - ] - , error = - \errorExpression errorTags -> - Elm.Case.custom - errorExpression - (Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.var "body" ] - ) - [ Elm.Case.branch - (Elm.Arg.customType - "BadUrl" - errorTags.badUrl |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Timeout" errorTags.timeout) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "NetworkError" errorTags.networkError) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "KnownBadStatus" - errorTags.knownBadStatus |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.int - ) |> Elm.Arg.item - (Elm.Arg.varWith - "err" - (Type.var - "err" - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "UnknownBadStatus" - errorTags.unknownBadStatus |> Elm.Arg.item - (Elm.Arg.varWith - "httpMetadata" - (Type.namedWith - [ "Http" - ] - "Metadata" - [] - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "body" - (Type.var - "body" - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "BadErrorBody" - errorTags.badErrorBody |> Elm.Arg.item - (Elm.Arg.varWith - "httpMetadata" - (Type.namedWith - [ "Http" ] - "Metadata" - [] - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "body" - (Type.var - "body" - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "BadBody" - errorTags.badBody |> Elm.Arg.item - (Elm.Arg.varWith - "httpMetadata" - (Type.namedWith - [ "Http" ] - "Metadata" - [] - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "body" - (Type.var - "body" - ) - ) - ) - Basics.identity - ] - } - - -call_ : - { jsonDecodeAndMap : Elm.Expression -> Elm.Expression -> Elm.Expression - , decodeOptionalField : Elm.Expression -> Elm.Expression -> Elm.Expression - , bytesResolverCustomEffect : Elm.Expression -> Elm.Expression - , expectBytesCustomEffect : - Elm.Expression -> Elm.Expression -> Elm.Expression - , stringResolverCustomEffect : Elm.Expression -> Elm.Expression - , expectStringCustomEffect : - Elm.Expression -> Elm.Expression -> Elm.Expression - , jsonResolverCustomEffect : - Elm.Expression -> Elm.Expression -> Elm.Expression - , expectJsonCustomEffect : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , bytesResolverCustom : Elm.Expression -> Elm.Expression - , expectBytesCustom : Elm.Expression -> Elm.Expression -> Elm.Expression - , stringResolverCustom : Elm.Expression -> Elm.Expression - , expectStringCustom : Elm.Expression -> Elm.Expression -> Elm.Expression - , jsonResolverCustom : Elm.Expression -> Elm.Expression -> Elm.Expression - , expectJsonCustom : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { jsonDecodeAndMap = - \jsonDecodeAndMapArg_ jsonDecodeAndMapArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "jsonDecodeAndMap" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.function - [ Type.var "a" ] - (Type.var "value") - ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "value" ] - ) - ) - } - ) - [ jsonDecodeAndMapArg_, jsonDecodeAndMapArg_0 ] - , decodeOptionalField = - \decodeOptionalFieldArg_ decodeOptionalFieldArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "decodeOptionalField" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "t" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.maybe (Type.var "t") ] - ) - ) - } - ) - [ decodeOptionalFieldArg_, decodeOptionalFieldArg_0 ] - , bytesResolverCustomEffect = - \bytesResolverCustomEffectArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "bytesResolverCustomEffect" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Resolver" - [ Type.var "restrictions" - , Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err" - , Type.namedWith - [ "Bytes" ] - "Bytes" - [] - ] - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - ) - ) - } - ) - [ bytesResolverCustomEffectArg_ ] - , expectBytesCustomEffect = - \expectBytesCustomEffectArg_ expectBytesCustomEffectArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectBytesCustomEffect" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err" - , Type.namedWith - [ "Bytes" ] - "Bytes" - [] - ] - , Type.namedWith - [ "Bytes" ] - "Bytes" - [] - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Expect" - [ Type.var "msg" ] - ) - ) - } - ) - [ expectBytesCustomEffectArg_, expectBytesCustomEffectArg_0 ] - , stringResolverCustomEffect = - \stringResolverCustomEffectArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "stringResolverCustomEffect" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Resolver" - [ Type.var "restrictions" - , Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.string - ] - ) - ) - } - ) - [ stringResolverCustomEffectArg_ ] - , expectStringCustomEffect = - \expectStringCustomEffectArg_ expectStringCustomEffectArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectStringCustomEffect" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.string - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Expect" - [ Type.var "msg" ] - ) - ) - } - ) - [ expectStringCustomEffectArg_, expectStringCustomEffectArg_0 ] - , jsonResolverCustomEffect = - \jsonResolverCustomEffectArg_ jsonResolverCustomEffectArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "jsonResolverCustomEffect" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "success" ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Resolver" - [ Type.var "restrictions" - , Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.var "success" - ] - ) - ) - } - ) - [ jsonResolverCustomEffectArg_, jsonResolverCustomEffectArg_0 ] - , expectJsonCustomEffect = - \expectJsonCustomEffectArg_ expectJsonCustomEffectArg_0 expectJsonCustomEffectArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectJsonCustomEffect" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.var "success" - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "success" ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Expect" - [ Type.var "msg" ] - ) - ) - } - ) - [ expectJsonCustomEffectArg_ - , expectJsonCustomEffectArg_0 - , expectJsonCustomEffectArg_1 - ] - , bytesResolverCustom = - \bytesResolverCustomArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "bytesResolverCustom" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Http" ] - "Resolver" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err" - , Type.namedWith - [ "Bytes" ] - "Bytes" - [] - ] - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - ) - ) - } - ) - [ bytesResolverCustomArg_ ] - , expectBytesCustom = - \expectBytesCustomArg_ expectBytesCustomArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectBytesCustom" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err" - , Type.namedWith - [ "Bytes" ] - "Bytes" - [] - ] - , Type.namedWith - [ "Bytes" ] - "Bytes" - [] - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Http" ] - "Expect" - [ Type.var "msg" ] - ) - ) - } - ) - [ expectBytesCustomArg_, expectBytesCustomArg_0 ] - , stringResolverCustom = - \stringResolverCustomArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "stringResolverCustom" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Http" ] - "Resolver" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.string - ] - ) - ) - } - ) - [ stringResolverCustomArg_ ] - , expectStringCustom = - \expectStringCustomArg_ expectStringCustomArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectStringCustom" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.string - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Http" ] - "Expect" - [ Type.var "msg" ] - ) - ) - } - ) - [ expectStringCustomArg_, expectStringCustomArg_0 ] - , jsonResolverCustom = - \jsonResolverCustomArg_ jsonResolverCustomArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "jsonResolverCustom" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "success" ] - ] - (Type.namedWith - [ "Http" ] - "Resolver" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.var "success" - ] - ) - ) - } - ) - [ jsonResolverCustomArg_, jsonResolverCustomArg_0 ] - , expectJsonCustom = - \expectJsonCustomArg_ expectJsonCustomArg_0 expectJsonCustomArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectJsonCustom" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.var "success" - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "success" ] - ] - (Type.namedWith - [ "Http" ] - "Expect" - [ Type.var "msg" ] - ) - ) - } - ) - [ expectJsonCustomArg_ - , expectJsonCustomArg_0 - , expectJsonCustomArg_1 - ] - } - - -values_ : - { jsonDecodeAndMap : Elm.Expression - , decodeOptionalField : Elm.Expression - , bytesResolverCustomEffect : Elm.Expression - , expectBytesCustomEffect : Elm.Expression - , stringResolverCustomEffect : Elm.Expression - , expectStringCustomEffect : Elm.Expression - , jsonResolverCustomEffect : Elm.Expression - , expectJsonCustomEffect : Elm.Expression - , bytesResolverCustom : Elm.Expression - , expectBytesCustom : Elm.Expression - , stringResolverCustom : Elm.Expression - , expectStringCustom : Elm.Expression - , jsonResolverCustom : Elm.Expression - , expectJsonCustom : Elm.Expression - } -values_ = - { jsonDecodeAndMap = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "jsonDecodeAndMap" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "a" ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.function [ Type.var "a" ] (Type.var "value") - ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "value" ] - ) - ) - } - , decodeOptionalField = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "decodeOptionalField" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "t" ] - ] - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.maybe (Type.var "t") ] - ) - ) - } - , bytesResolverCustomEffect = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "bytesResolverCustomEffect" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Resolver" - [ Type.var "restrictions" - , Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err" - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - ) - ) - } - , expectBytesCustomEffect = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectBytesCustomEffect" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err" - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Expect" - [ Type.var "msg" ] - ) - ) - } - , stringResolverCustomEffect = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "stringResolverCustomEffect" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Resolver" - [ Type.var "restrictions" - , Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.string - ] - ) - ) - } - , expectStringCustomEffect = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectStringCustomEffect" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.string - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Expect" - [ Type.var "msg" ] - ) - ) - } - , jsonResolverCustomEffect = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "jsonResolverCustomEffect" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "success" ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Resolver" - [ Type.var "restrictions" - , Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.var "success" - ] - ) - ) - } - , expectJsonCustomEffect = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectJsonCustomEffect" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.var "success" - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "success" ] - ] - (Type.namedWith - [ "Effect", "Http" ] - "Expect" - [ Type.var "msg" ] - ) - ) - } - , bytesResolverCustom = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "bytesResolverCustom" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Http" ] - "Resolver" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err" - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - ) - ) - } - , expectBytesCustom = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectBytesCustom" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err" - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith [ "Http" ] "Expect" [ Type.var "msg" ]) - ) - } - , stringResolverCustom = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "stringResolverCustom" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith - [ "Http" ] - "Resolver" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.string - ] - ) - ) - } - , expectStringCustom = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectStringCustom" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.string - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - ] - (Type.namedWith [ "Http" ] "Expect" [ Type.var "msg" ]) - ) - } - , jsonResolverCustom = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "jsonResolverCustom" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "success" ] - ] - (Type.namedWith - [ "Http" ] - "Resolver" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.var "success" - ] - ) - ) - } - , expectJsonCustom = - Elm.value - { importFrom = [ "OpenApi", "Common" ] - , name = "expectJsonCustom" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "OpenApi", "Common" ] - "Error" - [ Type.var "err", Type.string ] - , Type.var "success" - ] - ] - (Type.var "msg") - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "err" ] - ] - , Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "success" ] - ] - (Type.namedWith [ "Http" ] "Expect" [ Type.var "msg" ]) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/ConcurrentSubmission.elm b/codegen/Gen/Pages/ConcurrentSubmission.elm deleted file mode 100644 index 4ac7c6d6..00000000 --- a/codegen/Gen/Pages/ConcurrentSubmission.elm +++ /dev/null @@ -1,283 +0,0 @@ -module Gen.Pages.ConcurrentSubmission exposing - ( moduleName_, map, annotation_, make_, caseOf_, call_ - , values_ - ) - -{-| -# Generated bindings for Pages.ConcurrentSubmission - -@docs moduleName_, map, annotation_, make_, caseOf_, call_ -@docs values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "ConcurrentSubmission" ] - - -{-| `map` a `ConcurrentSubmission`. Not needed for most high-level cases since this state is managed by the `elm-pages` framework for you. - -map: - (a -> b) - -> Pages.ConcurrentSubmission.ConcurrentSubmission a - -> Pages.ConcurrentSubmission.ConcurrentSubmission b --} -map : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -map mapArg_ mapArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "ConcurrentSubmission" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function [ Type.var "a" ] (Type.var "b") - , Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "ConcurrentSubmission" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "ConcurrentSubmission" - [ Type.var "b" ] - ) - ) - } - ) - [ Elm.functionReduced "mapUnpack" mapArg_, mapArg_0 ] - - -annotation_ : - { concurrentSubmission : Type.Annotation -> Type.Annotation - , status : Type.Annotation -> Type.Annotation - } -annotation_ = - { concurrentSubmission = - \concurrentSubmissionArg0 -> - Type.alias - moduleName_ - "ConcurrentSubmission" - [ concurrentSubmissionArg0 ] - (Type.record - [ ( "status" - , Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "Status" - [ Type.var "actionData" ] - ) - , ( "payload" - , Type.namedWith [ "Pages", "FormData" ] "FormData" [] - ) - , ( "initiatedAt", Type.namedWith [ "Time" ] "Posix" [] ) - ] - ) - , status = - \statusArg0 -> - Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "Status" - [ statusArg0 ] - } - - -make_ : - { concurrentSubmission : - { status : Elm.Expression - , payload : Elm.Expression - , initiatedAt : Elm.Expression - } - -> Elm.Expression - , submitting : Elm.Expression - , reloading : Elm.Expression -> Elm.Expression - , complete : Elm.Expression -> Elm.Expression - } -make_ = - { concurrentSubmission = - \concurrentSubmission_args -> - Elm.withType - (Type.alias - [ "Pages", "ConcurrentSubmission" ] - "ConcurrentSubmission" - [ Type.var "actionData" ] - (Type.record - [ ( "status" - , Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "Status" - [ Type.var "actionData" ] - ) - , ( "payload" - , Type.namedWith - [ "Pages", "FormData" ] - "FormData" - [] - ) - , ( "initiatedAt" - , Type.namedWith [ "Time" ] "Posix" [] - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "status" concurrentSubmission_args.status - , Tuple.pair "payload" concurrentSubmission_args.payload - , Tuple.pair - "initiatedAt" - concurrentSubmission_args.initiatedAt - ] - ) - , submitting = - Elm.value - { importFrom = [ "Pages", "ConcurrentSubmission" ] - , name = "Submitting" - , annotation = - Just (Type.namedWith [] "Status" [ Type.var "actionData" ]) - } - , reloading = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "ConcurrentSubmission" ] - , name = "Reloading" - , annotation = - Just - (Type.namedWith - [] - "Status" - [ Type.var "actionData" ] - ) - } - ) - [ ar0 ] - , complete = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "ConcurrentSubmission" ] - , name = "Complete" - , annotation = - Just - (Type.namedWith - [] - "Status" - [ Type.var "actionData" ] - ) - } - ) - [ ar0 ] - } - - -caseOf_ : - { status : - Elm.Expression - -> { submitting : Elm.Expression - , reloading : Elm.Expression -> Elm.Expression - , complete : Elm.Expression -> Elm.Expression - } - -> Elm.Expression - } -caseOf_ = - { status = - \statusExpression statusTags -> - Elm.Case.custom - statusExpression - (Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "Status" - [ Type.var "actionData" ] - ) - [ Elm.Case.branch - (Elm.Arg.customType "Submitting" statusTags.submitting) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "Reloading" - statusTags.reloading |> Elm.Arg.item - (Elm.Arg.varWith - "actionData" - (Type.var - "actionData" - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "Complete" - statusTags.complete |> Elm.Arg.item - (Elm.Arg.varWith - "actionData" - (Type.var - "actionData" - ) - ) - ) - Basics.identity - ] - } - - -call_ : { map : Elm.Expression -> Elm.Expression -> Elm.Expression } -call_ = - { map = - \mapArg_ mapArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "ConcurrentSubmission" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" ] - (Type.var "b") - , Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "ConcurrentSubmission" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "ConcurrentSubmission" - [ Type.var "b" ] - ) - ) - } - ) - [ mapArg_, mapArg_0 ] - } - - -values_ : { map : Elm.Expression } -values_ = - { map = - Elm.value - { importFrom = [ "Pages", "ConcurrentSubmission" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function [ Type.var "a" ] (Type.var "b") - , Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "ConcurrentSubmission" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "ConcurrentSubmission" - [ Type.var "b" ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Fetcher.elm b/codegen/Gen/Pages/Fetcher.elm deleted file mode 100644 index 8c6df589..00000000 --- a/codegen/Gen/Pages/Fetcher.elm +++ /dev/null @@ -1,375 +0,0 @@ -module Gen.Pages.Fetcher exposing - ( moduleName_, submit, map, annotation_, make_, caseOf_ - , call_, values_ - ) - -{-| -# Generated bindings for Pages.Fetcher - -@docs moduleName_, submit, map, annotation_, make_, caseOf_ -@docs call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Fetcher" ] - - -{-| submit: - Bytes.Decode.Decoder decoded - -> { fields : List ( String, String ), headers : List ( String, String ) } - -> Pages.Fetcher.Fetcher (Result.Result Http.Error decoded) --} -submit : - Elm.Expression - -> { fields : List Elm.Expression, headers : List Elm.Expression } - -> Elm.Expression -submit submitArg_ submitArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Fetcher" ] - , name = "submit" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Bytes", "Decode" ] - "Decoder" - [ Type.var "decoded" ] - , Type.record - [ ( "fields" - , Type.list (Type.tuple Type.string Type.string) - ) - , ( "headers" - , Type.list (Type.tuple Type.string Type.string) - ) - ] - ] - (Type.namedWith - [ "Pages", "Fetcher" ] - "Fetcher" - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith [ "Http" ] "Error" [] - , Type.var "decoded" - ] - ] - ) - ) - } - ) - [ submitArg_ - , Elm.record - [ Tuple.pair "fields" (Elm.list submitArg_0.fields) - , Tuple.pair "headers" (Elm.list submitArg_0.headers) - ] - ] - - -{-| map: (a -> b) -> Pages.Fetcher.Fetcher a -> Pages.Fetcher.Fetcher b -} -map : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -map mapArg_ mapArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Fetcher" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function [ Type.var "a" ] (Type.var "b") - , Type.namedWith - [ "Pages", "Fetcher" ] - "Fetcher" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Pages", "Fetcher" ] - "Fetcher" - [ Type.var "b" ] - ) - ) - } - ) - [ Elm.functionReduced "mapUnpack" mapArg_, mapArg_0 ] - - -annotation_ : - { fetcher : Type.Annotation -> Type.Annotation - , fetcherInfo : Type.Annotation -> Type.Annotation - } -annotation_ = - { fetcher = - \fetcherArg0 -> - Type.namedWith [ "Pages", "Fetcher" ] "Fetcher" [ fetcherArg0 ] - , fetcherInfo = - \fetcherInfoArg0 -> - Type.alias - moduleName_ - "FetcherInfo" - [ fetcherInfoArg0 ] - (Type.record - [ ( "decoder" - , Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith [ "Http" ] "Error" [] - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - ] - (Type.var "decoded") - ) - , ( "fields" - , Type.list (Type.tuple Type.string Type.string) - ) - , ( "headers" - , Type.list (Type.tuple Type.string Type.string) - ) - , ( "url", Type.maybe Type.string ) - ] - ) - } - - -make_ : - { fetcher : Elm.Expression -> Elm.Expression - , fetcherInfo : - { decoder : Elm.Expression - , fields : Elm.Expression - , headers : Elm.Expression - , url : Elm.Expression - } - -> Elm.Expression - } -make_ = - { fetcher = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Fetcher" ] - , name = "Fetcher" - , annotation = - Just - (Type.namedWith [] "Fetcher" [ Type.var "decoded" ] - ) - } - ) - [ ar0 ] - , fetcherInfo = - \fetcherInfo_args -> - Elm.withType - (Type.alias - [ "Pages", "Fetcher" ] - "FetcherInfo" - [ Type.var "decoded" ] - (Type.record - [ ( "decoder" - , Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith [ "Http" ] "Error" [] - , Type.namedWith [ "Bytes" ] "Bytes" [] - ] - ] - (Type.var "decoded") - ) - , ( "fields" - , Type.list (Type.tuple Type.string Type.string) - ) - , ( "headers" - , Type.list (Type.tuple Type.string Type.string) - ) - , ( "url", Type.maybe Type.string ) - ] - ) - ) - (Elm.record - [ Tuple.pair "decoder" fetcherInfo_args.decoder - , Tuple.pair "fields" fetcherInfo_args.fields - , Tuple.pair "headers" fetcherInfo_args.headers - , Tuple.pair "url" fetcherInfo_args.url - ] - ) - } - - -caseOf_ : - { fetcher : - Elm.Expression - -> { fetcher : Elm.Expression -> Elm.Expression } - -> Elm.Expression - } -caseOf_ = - { fetcher = - \fetcherExpression fetcherTags -> - Elm.Case.custom - fetcherExpression - (Type.namedWith - [ "Pages", "Fetcher" ] - "Fetcher" - [ Type.var "decoded" ] - ) - [ Elm.Case.branch - (Elm.Arg.customType - "Fetcher" - fetcherTags.fetcher |> Elm.Arg.item - (Elm.Arg.varWith - "pagesFetcherFetcherInfo" - (Type.namedWith - [ "Pages" - , "Fetcher" - ] - "FetcherInfo" - [ Type.var - "decoded" - ] - ) - ) - ) - Basics.identity - ] - } - - -call_ : - { submit : Elm.Expression -> Elm.Expression -> Elm.Expression - , map : Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { submit = - \submitArg_ submitArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Fetcher" ] - , name = "submit" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Bytes", "Decode" ] - "Decoder" - [ Type.var "decoded" ] - , Type.record - [ ( "fields" - , Type.list - (Type.tuple Type.string Type.string) - ) - , ( "headers" - , Type.list - (Type.tuple Type.string Type.string) - ) - ] - ] - (Type.namedWith - [ "Pages", "Fetcher" ] - "Fetcher" - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "Http" ] - "Error" - [] - , Type.var "decoded" - ] - ] - ) - ) - } - ) - [ submitArg_, submitArg_0 ] - , map = - \mapArg_ mapArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Fetcher" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" ] - (Type.var "b") - , Type.namedWith - [ "Pages", "Fetcher" ] - "Fetcher" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Pages", "Fetcher" ] - "Fetcher" - [ Type.var "b" ] - ) - ) - } - ) - [ mapArg_, mapArg_0 ] - } - - -values_ : { submit : Elm.Expression, map : Elm.Expression } -values_ = - { submit = - Elm.value - { importFrom = [ "Pages", "Fetcher" ] - , name = "submit" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Bytes", "Decode" ] - "Decoder" - [ Type.var "decoded" ] - , Type.record - [ ( "fields" - , Type.list (Type.tuple Type.string Type.string) - ) - , ( "headers" - , Type.list (Type.tuple Type.string Type.string) - ) - ] - ] - (Type.namedWith - [ "Pages", "Fetcher" ] - "Fetcher" - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith [ "Http" ] "Error" [] - , Type.var "decoded" - ] - ] - ) - ) - } - , map = - Elm.value - { importFrom = [ "Pages", "Fetcher" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function [ Type.var "a" ] (Type.var "b") - , Type.namedWith - [ "Pages", "Fetcher" ] - "Fetcher" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Pages", "Fetcher" ] - "Fetcher" - [ Type.var "b" ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Flags.elm b/codegen/Gen/Pages/Flags.elm deleted file mode 100644 index 7b364709..00000000 --- a/codegen/Gen/Pages/Flags.elm +++ /dev/null @@ -1,80 +0,0 @@ -module Gen.Pages.Flags exposing ( moduleName_, annotation_, make_, caseOf_ ) - -{-| -# Generated bindings for Pages.Flags - -@docs moduleName_, annotation_, make_, caseOf_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Flags" ] - - -annotation_ : { flags : Type.Annotation } -annotation_ = - { flags = Type.namedWith [ "Pages", "Flags" ] "Flags" [] } - - -make_ : - { browserFlags : Elm.Expression -> Elm.Expression - , preRenderFlags : Elm.Expression - } -make_ = - { browserFlags = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Flags" ] - , name = "BrowserFlags" - , annotation = Just (Type.namedWith [] "Flags" []) - } - ) - [ ar0 ] - , preRenderFlags = - Elm.value - { importFrom = [ "Pages", "Flags" ] - , name = "PreRenderFlags" - , annotation = Just (Type.namedWith [] "Flags" []) - } - } - - -caseOf_ = - { flags = - \flagsExpression flagsTags -> - Elm.Case.custom - flagsExpression - (Type.namedWith [ "Pages", "Flags" ] "Flags" []) - [ Elm.Case.branch - (Elm.Arg.customType - "BrowserFlags" - flagsTags.browserFlags |> Elm.Arg.item - (Elm.Arg.varWith - "jsonDecodeValue" - (Type.namedWith - [ "Json" - , "Decode" - ] - "Value" - [] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "PreRenderFlags" - flagsTags.preRenderFlags - ) - Basics.identity - ] - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Form.elm b/codegen/Gen/Pages/Form.elm deleted file mode 100644 index bee2445f..00000000 --- a/codegen/Gen/Pages/Form.elm +++ /dev/null @@ -1,1036 +0,0 @@ -module Gen.Pages.Form exposing - ( moduleName_, renderHtml, renderStyledHtml, withConcurrent, annotation_, call_ - , values_ - ) - -{-| -# Generated bindings for Pages.Form - -@docs moduleName_, renderHtml, renderStyledHtml, withConcurrent, annotation_, call_ -@docs values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Form" ] - - -{-| A replacement for `Form.renderHtml` from `dillonkearns/elm-form` that integrates with `elm-pages`. Use this to render your [`Form`](https://package.elm-lang.org/packages/dillonkearns/elm-form/latest/Form) -as `elm/html` `Html`. - -renderHtml: - List (Html.Attribute (PagesMsg.PagesMsg userMsg)) - -> Pages.Form.Options error parsed input userMsg - -> { app - | pageFormState : Form.Model - , navigation : Maybe Pages.Navigation.Navigation - , concurrentSubmissions : - Dict.Dict String (Pages.ConcurrentSubmission.ConcurrentSubmission (Maybe action)) - } - -> Form.Form error { combine : - Form.Validation.Validation error parsed named constraints - , view : - Form.Context error input -> List (Html.Html (PagesMsg.PagesMsg userMsg)) - } parsed input - -> Html.Html (PagesMsg.PagesMsg userMsg) --} -renderHtml : - List Elm.Expression - -> Elm.Expression - -> { app - | pageFormState : Elm.Expression - , navigation : Elm.Expression - , concurrentSubmissions : Elm.Expression - } - -> Elm.Expression - -> Elm.Expression -renderHtml renderHtmlArg_ renderHtmlArg_0 renderHtmlArg_1 renderHtmlArg_2 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Form" ] - , name = "renderHtml" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Html" ] - "Attribute" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - , Type.namedWith - [ "Pages", "Form" ] - "Options" - [ Type.var "error" - , Type.var "parsed" - , Type.var "input" - , Type.var "userMsg" - ] - , Type.extensible - "app" - [ ( "pageFormState" - , Type.namedWith [ "Form" ] "Model" [] - ) - , ( "navigation" - , Type.maybe - (Type.namedWith - [ "Pages", "Navigation" ] - "Navigation" - [] - ) - ) - , ( "concurrentSubmissions" - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "ConcurrentSubmission" - [ Type.maybe (Type.var "action") ] - ] - ) - ] - , Type.namedWith - [ "Form" ] - "Form" - [ Type.var "error" - , Type.record - [ ( "combine" - , Type.namedWith - [ "Form", "Validation" ] - "Validation" - [ Type.var "error" - , Type.var "parsed" - , Type.var "named" - , Type.var "constraints" - ] - ) - , ( "view" - , Type.function - [ Type.namedWith - [ "Form" ] - "Context" - [ Type.var "error" - , Type.var "input" - ] - ] - (Type.list - (Type.namedWith - [ "Html" ] - "Html" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - ) - ) - ] - , Type.var "parsed" - , Type.var "input" - ] - ] - (Type.namedWith - [ "Html" ] - "Html" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - ) - } - ) - [ Elm.list renderHtmlArg_ - , renderHtmlArg_0 - , Elm.record - [ Tuple.pair "pageFormState" renderHtmlArg_1.pageFormState - , Tuple.pair "navigation" renderHtmlArg_1.navigation - , Tuple.pair - "concurrentSubmissions" - renderHtmlArg_1.concurrentSubmissions - ] - , renderHtmlArg_2 - ] - - -{-| A replacement for `Form.renderStyledHtml` from `dillonkearns/elm-form` that integrates with `elm-pages`. Use this to render your [`Form`](https://package.elm-lang.org/packages/dillonkearns/elm-form/latest/Form) -as `rtfeldman/elm-css` `Html.Styled.Html`. - -renderStyledHtml: - List (Html.Styled.Attribute (PagesMsg.PagesMsg userMsg)) - -> Pages.Form.Options error parsed input userMsg - -> { app - | pageFormState : Form.Model - , navigation : Maybe Pages.Navigation.Navigation - , concurrentSubmissions : - Dict.Dict String (Pages.ConcurrentSubmission.ConcurrentSubmission (Maybe action)) - } - -> Form.Form error { combine : - Form.Validation.Validation error parsed named constraints - , view : - Form.Context error input - -> List (Html.Styled.Html (PagesMsg.PagesMsg userMsg)) - } parsed input - -> Html.Styled.Html (PagesMsg.PagesMsg userMsg) --} -renderStyledHtml : - List Elm.Expression - -> Elm.Expression - -> { app - | pageFormState : Elm.Expression - , navigation : Elm.Expression - , concurrentSubmissions : Elm.Expression - } - -> Elm.Expression - -> Elm.Expression -renderStyledHtml renderStyledHtmlArg_ renderStyledHtmlArg_0 renderStyledHtmlArg_1 renderStyledHtmlArg_2 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Form" ] - , name = "renderStyledHtml" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Html", "Styled" ] - "Attribute" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - , Type.namedWith - [ "Pages", "Form" ] - "Options" - [ Type.var "error" - , Type.var "parsed" - , Type.var "input" - , Type.var "userMsg" - ] - , Type.extensible - "app" - [ ( "pageFormState" - , Type.namedWith [ "Form" ] "Model" [] - ) - , ( "navigation" - , Type.maybe - (Type.namedWith - [ "Pages", "Navigation" ] - "Navigation" - [] - ) - ) - , ( "concurrentSubmissions" - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "ConcurrentSubmission" - [ Type.maybe (Type.var "action") ] - ] - ) - ] - , Type.namedWith - [ "Form" ] - "Form" - [ Type.var "error" - , Type.record - [ ( "combine" - , Type.namedWith - [ "Form", "Validation" ] - "Validation" - [ Type.var "error" - , Type.var "parsed" - , Type.var "named" - , Type.var "constraints" - ] - ) - , ( "view" - , Type.function - [ Type.namedWith - [ "Form" ] - "Context" - [ Type.var "error" - , Type.var "input" - ] - ] - (Type.list - (Type.namedWith - [ "Html", "Styled" ] - "Html" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - ) - ) - ] - , Type.var "parsed" - , Type.var "input" - ] - ] - (Type.namedWith - [ "Html", "Styled" ] - "Html" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - ) - } - ) - [ Elm.list renderStyledHtmlArg_ - , renderStyledHtmlArg_0 - , Elm.record - [ Tuple.pair "pageFormState" renderStyledHtmlArg_1.pageFormState - , Tuple.pair "navigation" renderStyledHtmlArg_1.navigation - , Tuple.pair - "concurrentSubmissions" - renderStyledHtmlArg_1.concurrentSubmissions - ] - , renderStyledHtmlArg_2 - ] - - -{-| Instead of using the default submission strategy (tied to the page's navigation state), you can use `withConcurrent`. -`withConcurrent` allows multiple form submissions to be in flight at the same time. It is useful for more dynamic applications. A good rule of thumb -is if you could have multiple pending spinners on the page at the same time, you should use `withConcurrent`. For example, if you have a page with a list of items, -say a Twitter clone. If you click the like button on a Tweet, it won't result in a page navigation. You can click the like button on multiple Tweets at the same time -and they will all submit independently. - -In the case of Twitter, there isn't an indication of a loading spinner on the like button because it is expected that it will succeed. This is an example of a User Experience (UX) pattern -called Optimistic UI. Since it is very likely that liking a Tweet will be successful, the UI will update the UI as if it has immediately succeeded even though the request is still in flight. -If the request fails, the UI will be updated to reflect the failure with an animation to show that something went wrong. - -The `withConcurrent` is a good fit for either of these UX patterns (Optimistic UI or Pending UI, i.e. showing a loading spinner). You can derive either of these -visual states from the `app.concurrentSubmissions` field in your `Route` module. - -You can call `withConcurrent` on your `Form.Options`. Note that while `withConcurrent` will allow multiple form submissions to be in flight at the same time independently, -the ID of the Form will still have a unique submission. For example, if you click submit on a form with the ID `"edit-123"` and then submit it again before the first submission has completed, -the second submission will cancel the first submission. So it is important to use unique IDs for forms that represent unique operations. - - import Form - import Pages.Form - - todoItemView app todo = - deleteItemForm - |> Pages.Form.renderHtml [] - (Form.options ("delete-" ++ todo.id) - |> Form.withInput todo - |> Pages.Form.withConcurrent - ) - app - -withConcurrent: - Pages.Form.Options error parsed input msg - -> Pages.Form.Options error parsed input msg --} -withConcurrent : Elm.Expression -> Elm.Expression -withConcurrent withConcurrentArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Form" ] - , name = "withConcurrent" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Form" ] - "Options" - [ Type.var "error" - , Type.var "parsed" - , Type.var "input" - , Type.var "msg" - ] - ] - (Type.namedWith - [ "Pages", "Form" ] - "Options" - [ Type.var "error" - , Type.var "parsed" - , Type.var "input" - , Type.var "msg" - ] - ) - ) - } - ) - [ withConcurrentArg_ ] - - -annotation_ : - { options : - Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - , formWithServerValidations : - Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - , handler : Type.Annotation -> Type.Annotation -> Type.Annotation - } -annotation_ = - { options = - \optionsArg0 optionsArg1 optionsArg2 optionsArg3 -> - Type.alias - moduleName_ - "Options" - [ optionsArg0, optionsArg1, optionsArg2, optionsArg3 ] - (Type.namedWith - [ "Form" ] - "Options" - [ Type.var "error" - , Type.var "parsed" - , Type.var "input" - , Type.var "msg" - , Type.record [ ( "concurrent", Type.bool ) ] - ] - ) - , formWithServerValidations = - \formWithServerValidationsArg0 formWithServerValidationsArg1 formWithServerValidationsArg2 formWithServerValidationsArg3 -> - Type.alias - moduleName_ - "FormWithServerValidations" - [ formWithServerValidationsArg0 - , formWithServerValidationsArg1 - , formWithServerValidationsArg2 - , formWithServerValidationsArg3 - ] - (Type.namedWith - [ "Form" ] - "Form" - [ Type.var "error" - , Type.record - [ ( "combine" - , Type.namedWith - [ "Form", "Validation" ] - "Validation" - [ Type.var "error" - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.namedWith - [ "Form", "Validation" ] - "Validation" - [ Type.var "error" - , Type.var "combined" - , Type.namedWith - [ "Basics" ] - "Never" - [] - , Type.namedWith - [ "Basics" ] - "Never" - [] - ] - ] - , Type.namedWith [ "Basics" ] "Never" [] - , Type.namedWith [ "Basics" ] "Never" [] - ] - ) - , ( "view" - , Type.function - [ Type.namedWith - [ "Form" ] - "Context" - [ Type.var "error", Type.var "input" ] - ] - (Type.var "view") - ) - ] - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.namedWith - [ "Form", "Validation" ] - "Validation" - [ Type.var "error" - , Type.var "combined" - , Type.namedWith [ "Basics" ] "Never" [] - , Type.namedWith [ "Basics" ] "Never" [] - ] - ] - , Type.var "input" - ] - ) - , handler = - \handlerArg0 handlerArg1 -> - Type.alias - moduleName_ - "Handler" - [ handlerArg0, handlerArg1 ] - (Type.namedWith - [ "Form", "Handler" ] - "Handler" - [ Type.var "error" - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.namedWith - [ "Form", "Validation" ] - "Validation" - [ Type.var "error" - , Type.var "combined" - , Type.namedWith [ "Basics" ] "Never" [] - , Type.namedWith [ "Basics" ] "Never" [] - ] - ] - ] - ) - } - - -call_ : - { renderHtml : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , renderStyledHtml : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , withConcurrent : Elm.Expression -> Elm.Expression - } -call_ = - { renderHtml = - \renderHtmlArg_ renderHtmlArg_0 renderHtmlArg_1 renderHtmlArg_2 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Form" ] - , name = "renderHtml" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Html" ] - "Attribute" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - , Type.namedWith - [ "Pages", "Form" ] - "Options" - [ Type.var "error" - , Type.var "parsed" - , Type.var "input" - , Type.var "userMsg" - ] - , Type.extensible - "app" - [ ( "pageFormState" - , Type.namedWith [ "Form" ] "Model" [] - ) - , ( "navigation" - , Type.maybe - (Type.namedWith - [ "Pages", "Navigation" ] - "Navigation" - [] - ) - ) - , ( "concurrentSubmissions" - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Pages" - , "ConcurrentSubmission" - ] - "ConcurrentSubmission" - [ Type.maybe - (Type.var "action") - ] - ] - ) - ] - , Type.namedWith - [ "Form" ] - "Form" - [ Type.var "error" - , Type.record - [ ( "combine" - , Type.namedWith - [ "Form", "Validation" ] - "Validation" - [ Type.var "error" - , Type.var "parsed" - , Type.var "named" - , Type.var "constraints" - ] - ) - , ( "view" - , Type.function - [ Type.namedWith - [ "Form" ] - "Context" - [ Type.var "error" - , Type.var "input" - ] - ] - (Type.list - (Type.namedWith - [ "Html" ] - "Html" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var - "userMsg" - ] - ] - ) - ) - ) - ] - , Type.var "parsed" - , Type.var "input" - ] - ] - (Type.namedWith - [ "Html" ] - "Html" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - ) - } - ) - [ renderHtmlArg_ - , renderHtmlArg_0 - , renderHtmlArg_1 - , renderHtmlArg_2 - ] - , renderStyledHtml = - \renderStyledHtmlArg_ renderStyledHtmlArg_0 renderStyledHtmlArg_1 renderStyledHtmlArg_2 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Form" ] - , name = "renderStyledHtml" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Html", "Styled" ] - "Attribute" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - , Type.namedWith - [ "Pages", "Form" ] - "Options" - [ Type.var "error" - , Type.var "parsed" - , Type.var "input" - , Type.var "userMsg" - ] - , Type.extensible - "app" - [ ( "pageFormState" - , Type.namedWith [ "Form" ] "Model" [] - ) - , ( "navigation" - , Type.maybe - (Type.namedWith - [ "Pages", "Navigation" ] - "Navigation" - [] - ) - ) - , ( "concurrentSubmissions" - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Pages" - , "ConcurrentSubmission" - ] - "ConcurrentSubmission" - [ Type.maybe - (Type.var "action") - ] - ] - ) - ] - , Type.namedWith - [ "Form" ] - "Form" - [ Type.var "error" - , Type.record - [ ( "combine" - , Type.namedWith - [ "Form", "Validation" ] - "Validation" - [ Type.var "error" - , Type.var "parsed" - , Type.var "named" - , Type.var "constraints" - ] - ) - , ( "view" - , Type.function - [ Type.namedWith - [ "Form" ] - "Context" - [ Type.var "error" - , Type.var "input" - ] - ] - (Type.list - (Type.namedWith - [ "Html" - , "Styled" - ] - "Html" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var - "userMsg" - ] - ] - ) - ) - ) - ] - , Type.var "parsed" - , Type.var "input" - ] - ] - (Type.namedWith - [ "Html", "Styled" ] - "Html" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - ) - } - ) - [ renderStyledHtmlArg_ - , renderStyledHtmlArg_0 - , renderStyledHtmlArg_1 - , renderStyledHtmlArg_2 - ] - , withConcurrent = - \withConcurrentArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Form" ] - , name = "withConcurrent" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Form" ] - "Options" - [ Type.var "error" - , Type.var "parsed" - , Type.var "input" - , Type.var "msg" - ] - ] - (Type.namedWith - [ "Pages", "Form" ] - "Options" - [ Type.var "error" - , Type.var "parsed" - , Type.var "input" - , Type.var "msg" - ] - ) - ) - } - ) - [ withConcurrentArg_ ] - } - - -values_ : - { renderHtml : Elm.Expression - , renderStyledHtml : Elm.Expression - , withConcurrent : Elm.Expression - } -values_ = - { renderHtml = - Elm.value - { importFrom = [ "Pages", "Form" ] - , name = "renderHtml" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Html" ] - "Attribute" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - , Type.namedWith - [ "Pages", "Form" ] - "Options" - [ Type.var "error" - , Type.var "parsed" - , Type.var "input" - , Type.var "userMsg" - ] - , Type.extensible - "app" - [ ( "pageFormState" - , Type.namedWith [ "Form" ] "Model" [] - ) - , ( "navigation" - , Type.maybe - (Type.namedWith - [ "Pages", "Navigation" ] - "Navigation" - [] - ) - ) - , ( "concurrentSubmissions" - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "ConcurrentSubmission" - [ Type.maybe (Type.var "action") ] - ] - ) - ] - , Type.namedWith - [ "Form" ] - "Form" - [ Type.var "error" - , Type.record - [ ( "combine" - , Type.namedWith - [ "Form", "Validation" ] - "Validation" - [ Type.var "error" - , Type.var "parsed" - , Type.var "named" - , Type.var "constraints" - ] - ) - , ( "view" - , Type.function - [ Type.namedWith - [ "Form" ] - "Context" - [ Type.var "error" - , Type.var "input" - ] - ] - (Type.list - (Type.namedWith - [ "Html" ] - "Html" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - ) - ) - ] - , Type.var "parsed" - , Type.var "input" - ] - ] - (Type.namedWith - [ "Html" ] - "Html" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - ) - } - , renderStyledHtml = - Elm.value - { importFrom = [ "Pages", "Form" ] - , name = "renderStyledHtml" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Html", "Styled" ] - "Attribute" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - , Type.namedWith - [ "Pages", "Form" ] - "Options" - [ Type.var "error" - , Type.var "parsed" - , Type.var "input" - , Type.var "userMsg" - ] - , Type.extensible - "app" - [ ( "pageFormState" - , Type.namedWith [ "Form" ] "Model" [] - ) - , ( "navigation" - , Type.maybe - (Type.namedWith - [ "Pages", "Navigation" ] - "Navigation" - [] - ) - ) - , ( "concurrentSubmissions" - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "ConcurrentSubmission" - [ Type.maybe (Type.var "action") ] - ] - ) - ] - , Type.namedWith - [ "Form" ] - "Form" - [ Type.var "error" - , Type.record - [ ( "combine" - , Type.namedWith - [ "Form", "Validation" ] - "Validation" - [ Type.var "error" - , Type.var "parsed" - , Type.var "named" - , Type.var "constraints" - ] - ) - , ( "view" - , Type.function - [ Type.namedWith - [ "Form" ] - "Context" - [ Type.var "error" - , Type.var "input" - ] - ] - (Type.list - (Type.namedWith - [ "Html", "Styled" ] - "Html" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - ) - ) - ] - , Type.var "parsed" - , Type.var "input" - ] - ] - (Type.namedWith - [ "Html", "Styled" ] - "Html" - [ Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ] - ) - ) - } - , withConcurrent = - Elm.value - { importFrom = [ "Pages", "Form" ] - , name = "withConcurrent" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Form" ] - "Options" - [ Type.var "error" - , Type.var "parsed" - , Type.var "input" - , Type.var "msg" - ] - ] - (Type.namedWith - [ "Pages", "Form" ] - "Options" - [ Type.var "error" - , Type.var "parsed" - , Type.var "input" - , Type.var "msg" - ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/FormData.elm b/codegen/Gen/Pages/FormData.elm deleted file mode 100644 index 8b3b6625..00000000 --- a/codegen/Gen/Pages/FormData.elm +++ /dev/null @@ -1,71 +0,0 @@ -module Gen.Pages.FormData exposing ( moduleName_, annotation_, make_ ) - -{-| -# Generated bindings for Pages.FormData - -@docs moduleName_, annotation_, make_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "FormData" ] - - -annotation_ : { formData : Type.Annotation } -annotation_ = - { formData = - Type.alias - moduleName_ - "FormData" - [] - (Type.record - [ ( "fields", Type.list (Type.tuple Type.string Type.string) ) - , ( "method", Type.namedWith [ "Form" ] "Method" [] ) - , ( "action", Type.string ) - , ( "id", Type.maybe Type.string ) - ] - ) - } - - -make_ : - { formData : - { fields : Elm.Expression - , method : Elm.Expression - , action : Elm.Expression - , id : Elm.Expression - } - -> Elm.Expression - } -make_ = - { formData = - \formData_args -> - Elm.withType - (Type.alias - [ "Pages", "FormData" ] - "FormData" - [] - (Type.record - [ ( "fields" - , Type.list (Type.tuple Type.string Type.string) - ) - , ( "method", Type.namedWith [ "Form" ] "Method" [] ) - , ( "action", Type.string ) - , ( "id", Type.maybe Type.string ) - ] - ) - ) - (Elm.record - [ Tuple.pair "fields" formData_args.fields - , Tuple.pair "method" formData_args.method - , Tuple.pair "action" formData_args.action - , Tuple.pair "id" formData_args.id - ] - ) - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Internal/NotFoundReason.elm b/codegen/Gen/Pages/Internal/NotFoundReason.elm deleted file mode 100644 index 55f843eb..00000000 --- a/codegen/Gen/Pages/Internal/NotFoundReason.elm +++ /dev/null @@ -1,410 +0,0 @@ -module Gen.Pages.Internal.NotFoundReason exposing - ( moduleName_, document, annotation_, make_, caseOf_, call_ - , values_ - ) - -{-| -# Generated bindings for Pages.Internal.NotFoundReason - -@docs moduleName_, document, annotation_, make_, caseOf_, call_ -@docs values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Internal", "NotFoundReason" ] - - -{-| document: - List Pages.Internal.RoutePattern.RoutePattern - -> Pages.Internal.NotFoundReason.Payload - -> { title : String, body : List (Html.Html msg) } --} -document : List Elm.Expression -> Elm.Expression -> Elm.Expression -document documentArg_ documentArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "NotFoundReason" ] - , name = "document" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ) - , Type.namedWith - [ "Pages", "Internal", "NotFoundReason" ] - "Payload" - [] - ] - (Type.record - [ ( "title", Type.string ) - , ( "body" - , Type.list - (Type.namedWith - [ "Html" ] - "Html" - [ Type.var "msg" ] - ) - ) - ] - ) - ) - } - ) - [ Elm.list documentArg_, documentArg_0 ] - - -annotation_ : - { moduleContext : Type.Annotation - , notFoundReason : Type.Annotation - , payload : Type.Annotation - , record : Type.Annotation - } -annotation_ = - { moduleContext = - Type.alias - moduleName_ - "ModuleContext" - [] - (Type.record - [ ( "moduleName", Type.list Type.string ) - , ( "routePattern" - , Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ) - , ( "matchedRouteParams" - , Type.namedWith - [ "Pages", "Internal", "NotFoundReason" ] - "Record" - [] - ) - ] - ) - , notFoundReason = - Type.namedWith - [ "Pages", "Internal", "NotFoundReason" ] - "NotFoundReason" - [] - , payload = - Type.alias - moduleName_ - "Payload" - [] - (Type.record - [ ( "path", Type.namedWith [ "UrlPath" ] "UrlPath" [] ) - , ( "reason" - , Type.namedWith - [ "Pages", "Internal", "NotFoundReason" ] - "NotFoundReason" - [] - ) - ] - ) - , record = - Type.alias - moduleName_ - "Record" - [] - (Type.list (Type.tuple Type.string Type.string)) - } - - -make_ : - { moduleContext : - { moduleName : Elm.Expression - , routePattern : Elm.Expression - , matchedRouteParams : Elm.Expression - } - -> Elm.Expression - , noMatchingRoute : Elm.Expression - , notPrerendered : Elm.Expression -> Elm.Expression -> Elm.Expression - , notPrerenderedOrHandledByFallback : - Elm.Expression -> Elm.Expression -> Elm.Expression - , unhandledServerRoute : Elm.Expression -> Elm.Expression - , payload : - { path : Elm.Expression, reason : Elm.Expression } -> Elm.Expression - } -make_ = - { moduleContext = - \moduleContext_args -> - Elm.withType - (Type.alias - [ "Pages", "Internal", "NotFoundReason" ] - "ModuleContext" - [] - (Type.record - [ ( "moduleName", Type.list Type.string ) - , ( "routePattern" - , Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ) - , ( "matchedRouteParams" - , Type.namedWith - [ "Pages", "Internal", "NotFoundReason" ] - "Record" - [] - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "moduleName" moduleContext_args.moduleName - , Tuple.pair "routePattern" moduleContext_args.routePattern - , Tuple.pair - "matchedRouteParams" - moduleContext_args.matchedRouteParams - ] - ) - , noMatchingRoute = - Elm.value - { importFrom = [ "Pages", "Internal", "NotFoundReason" ] - , name = "NoMatchingRoute" - , annotation = Just (Type.namedWith [] "NotFoundReason" []) - } - , notPrerendered = - \ar0 ar1 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "NotFoundReason" ] - , name = "NotPrerendered" - , annotation = Just (Type.namedWith [] "NotFoundReason" []) - } - ) - [ ar0, ar1 ] - , notPrerenderedOrHandledByFallback = - \ar0 ar1 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "NotFoundReason" ] - , name = "NotPrerenderedOrHandledByFallback" - , annotation = Just (Type.namedWith [] "NotFoundReason" []) - } - ) - [ ar0, ar1 ] - , unhandledServerRoute = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "NotFoundReason" ] - , name = "UnhandledServerRoute" - , annotation = Just (Type.namedWith [] "NotFoundReason" []) - } - ) - [ ar0 ] - , payload = - \payload_args -> - Elm.withType - (Type.alias - [ "Pages", "Internal", "NotFoundReason" ] - "Payload" - [] - (Type.record - [ ( "path" - , Type.namedWith [ "UrlPath" ] "UrlPath" [] - ) - , ( "reason" - , Type.namedWith - [ "Pages", "Internal", "NotFoundReason" ] - "NotFoundReason" - [] - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "path" payload_args.path - , Tuple.pair "reason" payload_args.reason - ] - ) - } - - -caseOf_ = - { notFoundReason = - \notFoundReasonExpression notFoundReasonTags -> - Elm.Case.custom - notFoundReasonExpression - (Type.namedWith - [ "Pages", "Internal", "NotFoundReason" ] - "NotFoundReason" - [] - ) - [ Elm.Case.branch - (Elm.Arg.customType - "NoMatchingRoute" - notFoundReasonTags.noMatchingRoute - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "NotPrerendered" - notFoundReasonTags.notPrerendered |> Elm.Arg.item - (Elm.Arg.varWith - "pagesInternalNotFoundReasonModuleContext" - (Type.namedWith - [ "Pages" - , "Internal" - , "NotFoundReason" - ] - "ModuleContext" - [] - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "arg_1" - (Type.list - (Type.namedWith - [ "Pages" - , "Internal" - , "NotFoundReason" - ] - "Record" - [] - ) - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "NotPrerenderedOrHandledByFallback" - notFoundReasonTags.notPrerenderedOrHandledByFallback |> Elm.Arg.item - (Elm.Arg.varWith - "pagesInternalNotFoundReasonModuleContext" - (Type.namedWith - [ "Pages" - , "Internal" - , "NotFoundReason" - ] - "ModuleContext" - [] - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "arg_1" - (Type.list - (Type.namedWith - [ "Pages" - , "Internal" - , "NotFoundReason" - ] - "Record" - [] - ) - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "UnhandledServerRoute" - notFoundReasonTags.unhandledServerRoute |> Elm.Arg.item - (Elm.Arg.varWith - "pagesInternalNotFoundReasonModuleContext" - (Type.namedWith - [ "Pages" - , "Internal" - , "NotFoundReason" - ] - "ModuleContext" - [] - ) - ) - ) - Basics.identity - ] - } - - -call_ : { document : Elm.Expression -> Elm.Expression -> Elm.Expression } -call_ = - { document = - \documentArg_ documentArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "NotFoundReason" ] - , name = "document" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ) - , Type.namedWith - [ "Pages", "Internal", "NotFoundReason" ] - "Payload" - [] - ] - (Type.record - [ ( "title", Type.string ) - , ( "body" - , Type.list - (Type.namedWith - [ "Html" ] - "Html" - [ Type.var "msg" ] - ) - ) - ] - ) - ) - } - ) - [ documentArg_, documentArg_0 ] - } - - -values_ : { document : Elm.Expression } -values_ = - { document = - Elm.value - { importFrom = [ "Pages", "Internal", "NotFoundReason" ] - , name = "document" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ) - , Type.namedWith - [ "Pages", "Internal", "NotFoundReason" ] - "Payload" - [] - ] - (Type.record - [ ( "title", Type.string ) - , ( "body" - , Type.list - (Type.namedWith - [ "Html" ] - "Html" - [ Type.var "msg" ] - ) - ) - ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Internal/Platform.elm b/codegen/Gen/Pages/Internal/Platform.elm deleted file mode 100644 index e5045262..00000000 --- a/codegen/Gen/Pages/Internal/Platform.elm +++ /dev/null @@ -1,2340 +0,0 @@ -module Gen.Pages.Internal.Platform exposing - ( moduleName_, application, init, update, view, annotation_ - , make_, caseOf_, call_, values_ - ) - -{-| -# Generated bindings for Pages.Internal.Platform - -@docs moduleName_, application, init, update, view, annotation_ -@docs make_, caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Internal", "Platform" ] - - -{-| application: - Pages.ProgramConfig.ProgramConfig userMsg userModel route pageData actionData sharedData effect (Pages.Internal.Platform.Msg userMsg pageData actionData sharedData errorPage) errorPage - -> Platform.Program Pages.Internal.Platform.Flags (Pages.Internal.Platform.Model userModel pageData actionData sharedData) (Pages.Internal.Platform.Msg userMsg pageData actionData sharedData errorPage) --} -application : Elm.Expression -> Elm.Expression -application applicationArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "application" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "effect" - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.var "errorPage" - ] - ] - (Type.namedWith - [ "Platform" ] - "Program" - [ Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Flags" - [] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ] - ) - ) - } - ) - [ applicationArg_ ] - - -{-| init: - Pages.ProgramConfig.ProgramConfig userMsg userModel route pageData actionData sharedData userEffect (Pages.Internal.Platform.Msg userMsg pageData actionData sharedData errorPage) errorPage - -> Pages.Internal.Platform.Flags - -> Url.Url - -> Maybe Browser.Navigation.Key - -> ( Pages.Internal.Platform.Model userModel pageData actionData sharedData, Pages.Internal.Platform.Effect userMsg pageData actionData sharedData userEffect errorPage ) --} -init : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression -init initArg_ initArg_0 initArg_1 initArg_2 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "init" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.var "errorPage" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Flags" - [] - , Type.namedWith [ "Url" ] "Url" [] - , Type.maybe - (Type.namedWith - [ "Browser", "Navigation" ] - "Key" - [] - ) - ] - (Type.tuple - (Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - ) - (Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - ) - ) - } - ) - [ initArg_, initArg_0, initArg_1, initArg_2 ] - - -{-| update: - Pages.ProgramConfig.ProgramConfig userMsg userModel route pageData actionData sharedData userEffect (Pages.Internal.Platform.Msg userMsg pageData actionData sharedData errorPage) errorPage - -> Pages.Internal.Platform.Msg userMsg pageData actionData sharedData errorPage - -> Pages.Internal.Platform.Model userModel pageData actionData sharedData - -> ( Pages.Internal.Platform.Model userModel pageData actionData sharedData, Pages.Internal.Platform.Effect userMsg pageData actionData sharedData userEffect errorPage ) --} -update : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -update updateArg_ updateArg_0 updateArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "update" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.var "errorPage" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - ] - (Type.tuple - (Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - ) - (Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - ) - ) - } - ) - [ updateArg_, updateArg_0, updateArg_1 ] - - -{-| view: - Pages.ProgramConfig.ProgramConfig userMsg userModel route pageData actionData sharedData effect (Pages.Internal.Platform.Msg userMsg pageData actionData sharedData errorPage) errorPage - -> Pages.Internal.Platform.Model userModel pageData actionData sharedData - -> Browser.Document (Pages.Internal.Platform.Msg userMsg pageData actionData sharedData errorPage) --} -view : Elm.Expression -> Elm.Expression -> Elm.Expression -view viewArg_ viewArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "view" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "effect" - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.var "errorPage" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - ] - (Type.namedWith - [ "Browser" ] - "Document" - [ Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ] - ) - ) - } - ) - [ viewArg_, viewArg_0 ] - - -annotation_ : - { flags : Type.Annotation - , model : - Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - , msg : - Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - , program : - Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - , effect : - Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - -> Type.Annotation - , requestInfo : Type.Annotation - } -annotation_ = - { flags = - Type.alias - moduleName_ - "Flags" - [] - (Type.namedWith [ "Json", "Decode" ] "Value" []) - , model = - \modelArg0 modelArg1 modelArg2 modelArg3 -> - Type.alias - moduleName_ - "Model" - [ modelArg0, modelArg1, modelArg2, modelArg3 ] - (Type.record - [ ( "key" - , Type.maybe - (Type.namedWith - [ "Browser", "Navigation" ] - "Key" - [] - ) - ) - , ( "url", Type.namedWith [ "Url" ] "Url" [] ) - , ( "currentPath", Type.string ) - , ( "ariaNavigationAnnouncement", Type.string ) - , ( "pageData" - , Type.namedWith - [ "Result" ] - "Result" - [ Type.string - , Type.record - [ ( "userModel", Type.var "userModel" ) - , ( "pageData", Type.var "pageData" ) - , ( "sharedData", Type.var "sharedData" ) - , ( "actionData" - , Type.maybe (Type.var "actionData") - ) - ] - ] - ) - , ( "notFound" - , Type.maybe - (Type.record - [ ( "reason" - , Type.namedWith - [ "Pages" - , "Internal" - , "NotFoundReason" - ] - "NotFoundReason" - [] - ) - , ( "path" - , Type.namedWith [ "UrlPath" ] "UrlPath" [] - ) - ] - ) - ) - , ( "userFlags" - , Type.namedWith [ "Json", "Decode" ] "Value" [] - ) - , ( "transition" - , Type.maybe - (Type.tuple - Type.int - (Type.namedWith - [ "Pages", "Navigation" ] - "Navigation" - [] - ) - ) - ) - , ( "nextTransitionKey", Type.int ) - , ( "inFlightFetchers" - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.tuple - Type.int - (Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "ConcurrentSubmission" - [ Type.var "actionData" ] - ) - ] - ) - , ( "pageFormState", Type.namedWith [ "Form" ] "Model" [] ) - , ( "pendingRedirect", Type.bool ) - , ( "pendingData" - , Type.maybe - (Type.triple - (Type.var "pageData") - (Type.var "sharedData") - (Type.maybe (Type.var "actionData")) - ) - ) - ] - ) - , msg = - \msgArg0 msgArg1 msgArg2 msgArg3 msgArg4 -> - Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ msgArg0, msgArg1, msgArg2, msgArg3, msgArg4 ] - , program = - \programArg0 programArg1 programArg2 programArg3 programArg4 programArg5 -> - Type.alias - moduleName_ - "Program" - [ programArg0 - , programArg1 - , programArg2 - , programArg3 - , programArg4 - , programArg5 - ] - (Type.namedWith - [ "Platform" ] - "Program" - [ Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Flags" - [] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ] - ) - , effect = - \effectArg0 effectArg1 effectArg2 effectArg3 effectArg4 effectArg5 -> - Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Effect" - [ effectArg0 - , effectArg1 - , effectArg2 - , effectArg3 - , effectArg4 - , effectArg5 - ] - , requestInfo = - Type.alias - moduleName_ - "RequestInfo" - [] - (Type.record - [ ( "contentType", Type.string ), ( "body", Type.string ) ] - ) - } - - -make_ : - { model : - { key : Elm.Expression - , url : Elm.Expression - , currentPath : Elm.Expression - , ariaNavigationAnnouncement : Elm.Expression - , pageData : Elm.Expression - , notFound : Elm.Expression - , userFlags : Elm.Expression - , transition : Elm.Expression - , nextTransitionKey : Elm.Expression - , inFlightFetchers : Elm.Expression - , pageFormState : Elm.Expression - , pendingRedirect : Elm.Expression - , pendingData : Elm.Expression - } - -> Elm.Expression - , linkClicked : Elm.Expression -> Elm.Expression - , urlChanged : Elm.Expression -> Elm.Expression - , userMsg : Elm.Expression -> Elm.Expression - , formMsg : Elm.Expression -> Elm.Expression - , updateCacheAndUrlNew : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , fetcherComplete : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , fetcherStarted : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , pageScrollComplete : Elm.Expression - , hotReloadCompleteNew : Elm.Expression -> Elm.Expression - , processFetchResponse : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , scrollToTop : Elm.Expression - , noEffect : Elm.Expression - , browserLoadUrl : Elm.Expression -> Elm.Expression - , browserPushUrl : Elm.Expression -> Elm.Expression - , browserReplaceUrl : Elm.Expression -> Elm.Expression - , fetchPageData : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , submit : Elm.Expression -> Elm.Expression - , submitFetcher : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , batch : Elm.Expression -> Elm.Expression - , userCmd : Elm.Expression -> Elm.Expression - , cancelRequest : Elm.Expression -> Elm.Expression - , runCmd : Elm.Expression -> Elm.Expression - , requestInfo : - { contentType : Elm.Expression, body : Elm.Expression } - -> Elm.Expression - } -make_ = - { model = - \model_args -> - Elm.withType - (Type.alias - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - (Type.record - [ ( "key" - , Type.maybe - (Type.namedWith - [ "Browser", "Navigation" ] - "Key" - [] - ) - ) - , ( "url", Type.namedWith [ "Url" ] "Url" [] ) - , ( "currentPath", Type.string ) - , ( "ariaNavigationAnnouncement", Type.string ) - , ( "pageData" - , Type.namedWith - [ "Result" ] - "Result" - [ Type.string - , Type.record - [ ( "userModel", Type.var "userModel" ) - , ( "pageData", Type.var "pageData" ) - , ( "sharedData", Type.var "sharedData" ) - , ( "actionData" - , Type.maybe (Type.var "actionData") - ) - ] - ] - ) - , ( "notFound" - , Type.maybe - (Type.record - [ ( "reason" - , Type.namedWith - [ "Pages" - , "Internal" - , "NotFoundReason" - ] - "NotFoundReason" - [] - ) - , ( "path" - , Type.namedWith - [ "UrlPath" ] - "UrlPath" - [] - ) - ] - ) - ) - , ( "userFlags" - , Type.namedWith [ "Json", "Decode" ] "Value" [] - ) - , ( "transition" - , Type.maybe - (Type.tuple - Type.int - (Type.namedWith - [ "Pages", "Navigation" ] - "Navigation" - [] - ) - ) - ) - , ( "nextTransitionKey", Type.int ) - , ( "inFlightFetchers" - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.tuple - Type.int - (Type.namedWith - [ "Pages", "ConcurrentSubmission" ] - "ConcurrentSubmission" - [ Type.var "actionData" ] - ) - ] - ) - , ( "pageFormState" - , Type.namedWith [ "Form" ] "Model" [] - ) - , ( "pendingRedirect", Type.bool ) - , ( "pendingData" - , Type.maybe - (Type.triple - (Type.var "pageData") - (Type.var "sharedData") - (Type.maybe (Type.var "actionData")) - ) - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "key" model_args.key - , Tuple.pair "url" model_args.url - , Tuple.pair "currentPath" model_args.currentPath - , Tuple.pair - "ariaNavigationAnnouncement" - model_args.ariaNavigationAnnouncement - , Tuple.pair "pageData" model_args.pageData - , Tuple.pair "notFound" model_args.notFound - , Tuple.pair "userFlags" model_args.userFlags - , Tuple.pair "transition" model_args.transition - , Tuple.pair - "nextTransitionKey" - model_args.nextTransitionKey - , Tuple.pair "inFlightFetchers" model_args.inFlightFetchers - , Tuple.pair "pageFormState" model_args.pageFormState - , Tuple.pair "pendingRedirect" model_args.pendingRedirect - , Tuple.pair "pendingData" model_args.pendingData - ] - ) - , linkClicked = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "LinkClicked" - , annotation = - Just - (Type.namedWith - [] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0 ] - , urlChanged = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "UrlChanged" - , annotation = - Just - (Type.namedWith - [] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0 ] - , userMsg = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "UserMsg" - , annotation = - Just - (Type.namedWith - [] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0 ] - , formMsg = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "FormMsg" - , annotation = - Just - (Type.namedWith - [] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0 ] - , updateCacheAndUrlNew = - \ar0 ar1 ar2 ar3 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "UpdateCacheAndUrlNew" - , annotation = - Just - (Type.namedWith - [] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0, ar1, ar2, ar3 ] - , fetcherComplete = - \ar0 ar1 ar2 ar3 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "FetcherComplete" - , annotation = - Just - (Type.namedWith - [] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0, ar1, ar2, ar3 ] - , fetcherStarted = - \ar0 ar1 ar2 ar3 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "FetcherStarted" - , annotation = - Just - (Type.namedWith - [] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0, ar1, ar2, ar3 ] - , pageScrollComplete = - Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "PageScrollComplete" - , annotation = - Just - (Type.namedWith - [] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ) - } - , hotReloadCompleteNew = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "HotReloadCompleteNew" - , annotation = - Just - (Type.namedWith - [] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0 ] - , processFetchResponse = - \ar0 ar1 ar2 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "ProcessFetchResponse" - , annotation = - Just - (Type.namedWith - [] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0, ar1, ar2 ] - , scrollToTop = - Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "ScrollToTop" - , annotation = - Just - (Type.namedWith - [] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - } - , noEffect = - Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "NoEffect" - , annotation = - Just - (Type.namedWith - [] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - } - , browserLoadUrl = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "BrowserLoadUrl" - , annotation = - Just - (Type.namedWith - [] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0 ] - , browserPushUrl = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "BrowserPushUrl" - , annotation = - Just - (Type.namedWith - [] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0 ] - , browserReplaceUrl = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "BrowserReplaceUrl" - , annotation = - Just - (Type.namedWith - [] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0 ] - , fetchPageData = - \ar0 ar1 ar2 ar3 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "FetchPageData" - , annotation = - Just - (Type.namedWith - [] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0, ar1, ar2, ar3 ] - , submit = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "Submit" - , annotation = - Just - (Type.namedWith - [] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0 ] - , submitFetcher = - \ar0 ar1 ar2 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "SubmitFetcher" - , annotation = - Just - (Type.namedWith - [] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0, ar1, ar2 ] - , batch = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "Batch" - , annotation = - Just - (Type.namedWith - [] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0 ] - , userCmd = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "UserCmd" - , annotation = - Just - (Type.namedWith - [] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0 ] - , cancelRequest = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "CancelRequest" - , annotation = - Just - (Type.namedWith - [] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0 ] - , runCmd = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "RunCmd" - , annotation = - Just - (Type.namedWith - [] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - } - ) - [ ar0 ] - , requestInfo = - \requestInfo_args -> - Elm.withType - (Type.alias - [ "Pages", "Internal", "Platform" ] - "RequestInfo" - [] - (Type.record - [ ( "contentType", Type.string ) - , ( "body", Type.string ) - ] - ) - ) - (Elm.record - [ Tuple.pair "contentType" requestInfo_args.contentType - , Tuple.pair "body" requestInfo_args.body - ] - ) - } - - -caseOf_ = - { msg = - \msgExpression msgTags -> - Elm.Case.custom - msgExpression - (Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ) - [ Elm.Case.branch - (Elm.Arg.customType - "LinkClicked" - msgTags.linkClicked |> Elm.Arg.item - (Elm.Arg.varWith - "browserUrlRequest" - (Type.namedWith - [ "Browser" ] - "UrlRequest" - [] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "UrlChanged" - msgTags.urlChanged |> Elm.Arg.item - (Elm.Arg.varWith - "urlUrl" - (Type.namedWith - [ "Url" ] - "Url" - [] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "UserMsg" - msgTags.userMsg |> Elm.Arg.item - (Elm.Arg.varWith - "pagesMsgPagesMsg" - (Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var - "userMsg" - ] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "FormMsg" - msgTags.formMsg |> Elm.Arg.item - (Elm.Arg.varWith - "formMsg" - (Type.namedWith - [ "Form" ] - "Msg" - [ Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - ] - "Msg" - [ Type.var - "userMsg" - , Type.var - "pageData" - , Type.var - "actionData" - , Type.var - "sharedData" - , Type.var - "errorPage" - ] - ] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "UpdateCacheAndUrlNew" - msgTags.updateCacheAndUrlNew |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.bool - ) |> Elm.Arg.item - (Elm.Arg.varWith - "urlUrl" - (Type.namedWith - [ "Url" - ] - "Url" - [] - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "maybeMaybe" - (Type.maybe - (Type.var - "userMsg" - ) - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "resultResult" - (Type.namedWith - [ "Result" - ] - "Result" - [ Type.namedWith - [ "Http" - ] - "Error" - [] - , Type.tuple - (Type.namedWith - [ "Url" - ] - "Url" - [] - ) - (Type.namedWith - [ "Pages" - , "Internal" - , "ResponseSketch" - ] - "ResponseSketch" - [ Type.var - "pageData" - , Type.var - "actionData" - , Type.var - "sharedData" - ] - ) - ] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "FetcherComplete" - msgTags.fetcherComplete |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.bool - ) |> Elm.Arg.item - (Elm.Arg.varWith - "arg_1" - Type.string - ) |> Elm.Arg.item - (Elm.Arg.varWith - "arg_2" - Type.int - ) |> Elm.Arg.item - (Elm.Arg.varWith - "resultResult" - (Type.namedWith - [ "Result" - ] - "Result" - [ Type.namedWith - [ "Http" - ] - "Error" - [] - , Type.tuple - (Type.maybe - (Type.var - "userMsg" - ) - ) - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - ] - "ActionDataOrRedirect" - [ Type.var - "actionData" - ] - ) - ] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "FetcherStarted" - msgTags.fetcherStarted |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) |> Elm.Arg.item - (Elm.Arg.varWith - "arg_1" - Type.int - ) |> Elm.Arg.item - (Elm.Arg.varWith - "pagesInternalPlatformFormData" - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - ] - "FormData" - [] - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "timePosix" - (Type.namedWith - [ "Time" - ] - "Posix" - [] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "PageScrollComplete" - msgTags.pageScrollComplete - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "HotReloadCompleteNew" - msgTags.hotReloadCompleteNew |> Elm.Arg.item - (Elm.Arg.varWith - "bytesBytes" - (Type.namedWith - [ "Bytes" - ] - "Bytes" - [] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "ProcessFetchResponse" - msgTags.processFetchResponse |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.int - ) |> Elm.Arg.item - (Elm.Arg.varWith - "resultResult" - (Type.namedWith - [ "Result" - ] - "Result" - [ Type.namedWith - [ "Http" - ] - "Error" - [] - , Type.tuple - (Type.namedWith - [ "Url" - ] - "Url" - [] - ) - (Type.namedWith - [ "Pages" - , "Internal" - , "ResponseSketch" - ] - "ResponseSketch" - [ Type.var - "pageData" - , Type.var - "actionData" - , Type.var - "sharedData" - ] - ) - ] - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "arg_2" - (Type.function - [ Type.namedWith - [ "Result" - ] - "Result" - [ Type.namedWith - [ "Http" - ] - "Error" - [] - , Type.tuple - (Type.namedWith - [ "Url" - ] - "Url" - [] - ) - (Type.namedWith - [ "Pages" - , "Internal" - , "ResponseSketch" - ] - "ResponseSketch" - [ Type.var - "pageData" - , Type.var - "actionData" - , Type.var - "sharedData" - ] - ) - ] - ] - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - ] - "Msg" - [ Type.var - "userMsg" - , Type.var - "pageData" - , Type.var - "actionData" - , Type.var - "sharedData" - , Type.var - "errorPage" - ] - ) - ) - ) - ) - Basics.identity - ] - , effect = - \effectExpression effectTags -> - Elm.Case.custom - effectExpression - (Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - [ Elm.Case.branch - (Elm.Arg.customType "ScrollToTop" effectTags.scrollToTop) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "NoEffect" effectTags.noEffect) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "BrowserLoadUrl" - effectTags.browserLoadUrl |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "BrowserPushUrl" - effectTags.browserPushUrl |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "BrowserReplaceUrl" - effectTags.browserReplaceUrl |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "FetchPageData" - effectTags.fetchPageData |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.int - ) |> Elm.Arg.item - (Elm.Arg.varWith - "maybeMaybe" - (Type.maybe - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - ] - "FormData" - [] - ) - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "urlUrl" - (Type.namedWith - [ "Url" - ] - "Url" - [] - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "arg_3" - (Type.function - [ Type.namedWith - [ "Result" - ] - "Result" - [ Type.namedWith - [ "Http" - ] - "Error" - [] - , Type.tuple - (Type.namedWith - [ "Url" - ] - "Url" - [] - ) - (Type.namedWith - [ "Pages" - , "Internal" - , "ResponseSketch" - ] - "ResponseSketch" - [ Type.var - "pageData" - , Type.var - "actionData" - , Type.var - "sharedData" - ] - ) - ] - ] - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - ] - "Msg" - [ Type.var - "userMsg" - , Type.var - "pageData" - , Type.var - "actionData" - , Type.var - "sharedData" - , Type.var - "errorPage" - ] - ) - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "Submit" - effectTags.submit |> Elm.Arg.item - (Elm.Arg.varWith - "pagesInternalPlatformFormData" - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - ] - "FormData" - [] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "SubmitFetcher" - effectTags.submitFetcher |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) |> Elm.Arg.item - (Elm.Arg.varWith - "arg_1" - Type.int - ) |> Elm.Arg.item - (Elm.Arg.varWith - "pagesInternalPlatformFormData" - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - ] - "FormData" - [] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Batch" effectTags.batch |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - (Type.list - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - ] - "Effect" - [ Type.var - "userMsg" - , Type.var - "pageData" - , Type.var - "actionData" - , Type.var - "sharedData" - , Type.var - "userEffect" - , Type.var - "errorPage" - ] - ) - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "UserCmd" - effectTags.userCmd |> Elm.Arg.item - (Elm.Arg.varWith - "userEffect" - (Type.var "userEffect" - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "CancelRequest" - effectTags.cancelRequest |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.int - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "RunCmd" - effectTags.runCmd |> Elm.Arg.item - (Elm.Arg.varWith - "platformCmdCmd" - (Type.namedWith - [] - "Cmd" - [ Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - ] - "Msg" - [ Type.var - "userMsg" - , Type.var - "pageData" - , Type.var - "actionData" - , Type.var - "sharedData" - , Type.var - "errorPage" - ] - ] - ) - ) - ) - Basics.identity - ] - } - - -call_ : - { application : Elm.Expression -> Elm.Expression - , init : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , update : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , view : Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { application = - \applicationArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "application" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "effect" - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.var "errorPage" - ] - ] - (Type.namedWith - [ "Platform" ] - "Program" - [ Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Flags" - [] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ] - ) - ) - } - ) - [ applicationArg_ ] - , init = - \initArg_ initArg_0 initArg_1 initArg_2 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "init" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.var "errorPage" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Flags" - [] - , Type.namedWith [ "Url" ] "Url" [] - , Type.maybe - (Type.namedWith - [ "Browser", "Navigation" ] - "Key" - [] - ) - ] - (Type.tuple - (Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - ) - (Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - ) - ) - } - ) - [ initArg_, initArg_0, initArg_1, initArg_2 ] - , update = - \updateArg_ updateArg_0 updateArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "update" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.var "errorPage" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - ] - (Type.tuple - (Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - ) - (Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - ) - ) - } - ) - [ updateArg_, updateArg_0, updateArg_1 ] - , view = - \viewArg_ viewArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "view" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "effect" - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.var "errorPage" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - ] - (Type.namedWith - [ "Browser" ] - "Document" - [ Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ] - ) - ) - } - ) - [ viewArg_, viewArg_0 ] - } - - -values_ : - { application : Elm.Expression - , init : Elm.Expression - , update : Elm.Expression - , view : Elm.Expression - } -values_ = - { application = - Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "application" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "effect" - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.var "errorPage" - ] - ] - (Type.namedWith - [ "Platform" ] - "Program" - [ Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Flags" - [] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ] - ) - ) - } - , init = - Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "init" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.var "errorPage" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Flags" - [] - , Type.namedWith [ "Url" ] "Url" [] - , Type.maybe - (Type.namedWith - [ "Browser", "Navigation" ] - "Key" - [] - ) - ] - (Type.tuple - (Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - ) - (Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - ) - ) - } - , update = - Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "update" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.var "errorPage" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - ] - (Type.tuple - (Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - ) - (Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Effect" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "userEffect" - , Type.var "errorPage" - ] - ) - ) - ) - } - , view = - Elm.value - { importFrom = [ "Pages", "Internal", "Platform" ] - , name = "view" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "effect" - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - , Type.var "errorPage" - ] - , Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Model" - [ Type.var "userModel" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - ] - ] - (Type.namedWith - [ "Browser" ] - "Document" - [ Type.namedWith - [ "Pages", "Internal", "Platform" ] - "Msg" - [ Type.var "userMsg" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "errorPage" - ] - ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Internal/Platform/Cli.elm b/codegen/Gen/Pages/Internal/Platform/Cli.elm deleted file mode 100644 index ba99f4a6..00000000 --- a/codegen/Gen/Pages/Internal/Platform/Cli.elm +++ /dev/null @@ -1,690 +0,0 @@ -module Gen.Pages.Internal.Platform.Cli exposing - ( moduleName_, cliApplication, init, requestDecoder, update, currentCompatibilityKey - , annotation_, make_, caseOf_, call_, values_ - ) - -{-| -# Generated bindings for Pages.Internal.Platform.Cli - -@docs moduleName_, cliApplication, init, requestDecoder, update, currentCompatibilityKey -@docs annotation_, make_, caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Internal", "Platform", "Cli" ] - - -{-| cliApplication: - Pages.ProgramConfig.ProgramConfig userMsg userModel (Maybe route) pageData actionData sharedData effect mappedMsg errorPage - -> Pages.Internal.Platform.Cli.Program (Maybe route) --} -cliApplication : Elm.Expression -> Elm.Expression -cliApplication cliApplicationArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "cliApplication" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.maybe (Type.var "route") - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "effect" - , Type.var "mappedMsg" - , Type.var "errorPage" - ] - ] - (Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Program" - [ Type.maybe (Type.var "route") ] - ) - ) - } - ) - [ cliApplicationArg_ ] - - -{-| init: - Pages.SiteConfig.SiteConfig - -> RenderRequest.RenderRequest route - -> Pages.ProgramConfig.ProgramConfig userMsg userModel route pageData actionData sharedData effect mappedMsg errorPage - -> Json.Decode.Value - -> ( Pages.Internal.Platform.Cli.Model route, Pages.Internal.Platform.Effect.Effect ) --} -init : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression -init initArg_ initArg_0 initArg_1 initArg_2 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "init" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "SiteConfig" ] - "SiteConfig" - [] - , Type.namedWith - [ "RenderRequest" ] - "RenderRequest" - [ Type.var "route" ] - , Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "effect" - , Type.var "mappedMsg" - , Type.var "errorPage" - ] - , Type.namedWith [ "Json", "Decode" ] "Value" [] - ] - (Type.tuple - (Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Model" - [ Type.var "route" ] - ) - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "Effect" - ] - "Effect" - [] - ) - ) - ) - } - ) - [ initArg_, initArg_0, initArg_1, initArg_2 ] - - -{-| requestDecoder: Json.Decode.Decoder Pages.StaticHttp.Request.Request -} -requestDecoder : Elm.Expression -requestDecoder = - Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "requestDecoder" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Pages", "StaticHttp", "Request" ] - "Request" - [] - ] - ) - } - - -{-| update: - Pages.Internal.Platform.Cli.Msg - -> Pages.Internal.Platform.Cli.Model route - -> ( Pages.Internal.Platform.Cli.Model route, Pages.Internal.Platform.Effect.Effect ) --} -update : Elm.Expression -> Elm.Expression -> Elm.Expression -update updateArg_ updateArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "update" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Msg" - [] - , Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Model" - [ Type.var "route" ] - ] - (Type.tuple - (Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Model" - [ Type.var "route" ] - ) - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "Effect" - ] - "Effect" - [] - ) - ) - ) - } - ) - [ updateArg_, updateArg_0 ] - - -{-| currentCompatibilityKey: Int -} -currentCompatibilityKey : Elm.Expression -currentCompatibilityKey = - Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "currentCompatibilityKey" - , annotation = Just Type.int - } - - -annotation_ : - { flags : Type.Annotation - , model : Type.Annotation -> Type.Annotation - , msg : Type.Annotation - , program : Type.Annotation -> Type.Annotation - } -annotation_ = - { flags = - Type.alias - moduleName_ - "Flags" - [] - (Type.namedWith [ "Json", "Decode" ] "Value" []) - , model = - \modelArg0 -> - Type.alias - moduleName_ - "Model" - [ modelArg0 ] - (Type.record - [ ( "staticResponses" - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.namedWith - [ "Pages", "Internal", "Platform", "Effect" ] - "Effect" - [] - ] - ) - , ( "errors" - , Type.list - (Type.namedWith [ "BuildError" ] "BuildError" []) - ) - , ( "maybeRequestJson" - , Type.namedWith - [ "RenderRequest" ] - "RenderRequest" - [ Type.var "route" ] - ) - , ( "isDevServer", Type.bool ) - ] - ) - , msg = Type.namedWith [ "Pages", "Internal", "Platform", "Cli" ] "Msg" [] - , program = - \programArg0 -> - Type.alias - moduleName_ - "Program" - [ programArg0 ] - (Type.namedWith - [ "Platform" ] - "Program" - [ Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Flags" - [] - , Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Model" - [ Type.var "route" ] - , Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Msg" - [] - ] - ) - } - - -make_ : - { model : - { staticResponses : Elm.Expression - , errors : Elm.Expression - , maybeRequestJson : Elm.Expression - , isDevServer : Elm.Expression - } - -> Elm.Expression - , gotDataBatch : Elm.Expression -> Elm.Expression - , gotBuildError : Elm.Expression -> Elm.Expression - } -make_ = - { model = - \model_args -> - Elm.withType - (Type.alias - [ "Pages", "Internal", "Platform", "Cli" ] - "Model" - [ Type.var "route" ] - (Type.record - [ ( "staticResponses" - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "Effect" - ] - "Effect" - [] - ] - ) - , ( "errors" - , Type.list - (Type.namedWith - [ "BuildError" ] - "BuildError" - [] - ) - ) - , ( "maybeRequestJson" - , Type.namedWith - [ "RenderRequest" ] - "RenderRequest" - [ Type.var "route" ] - ) - , ( "isDevServer", Type.bool ) - ] - ) - ) - (Elm.record - [ Tuple.pair "staticResponses" model_args.staticResponses - , Tuple.pair "errors" model_args.errors - , Tuple.pair "maybeRequestJson" model_args.maybeRequestJson - , Tuple.pair "isDevServer" model_args.isDevServer - ] - ) - , gotDataBatch = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "GotDataBatch" - , annotation = Just (Type.namedWith [] "Msg" []) - } - ) - [ ar0 ] - , gotBuildError = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "GotBuildError" - , annotation = Just (Type.namedWith [] "Msg" []) - } - ) - [ ar0 ] - } - - -caseOf_ = - { msg = - \msgExpression msgTags -> - Elm.Case.custom - msgExpression - (Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Msg" - [] - ) - [ Elm.Case.branch - (Elm.Arg.customType - "GotDataBatch" - msgTags.gotDataBatch |> Elm.Arg.item - (Elm.Arg.varWith - "jsonDecodeValue" - (Type.namedWith - [ "Json" - , "Decode" - ] - "Value" - [] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "GotBuildError" - msgTags.gotBuildError |> Elm.Arg.item - (Elm.Arg.varWith - "buildErrorBuildError" - (Type.namedWith - [ "BuildError" - ] - "BuildError" - [] - ) - ) - ) - Basics.identity - ] - } - - -call_ : - { cliApplication : Elm.Expression -> Elm.Expression - , init : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , update : Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { cliApplication = - \cliApplicationArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "cliApplication" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.maybe (Type.var "route") - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "effect" - , Type.var "mappedMsg" - , Type.var "errorPage" - ] - ] - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "Cli" - ] - "Program" - [ Type.maybe (Type.var "route") ] - ) - ) - } - ) - [ cliApplicationArg_ ] - , init = - \initArg_ initArg_0 initArg_1 initArg_2 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "init" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "SiteConfig" ] - "SiteConfig" - [] - , Type.namedWith - [ "RenderRequest" ] - "RenderRequest" - [ Type.var "route" ] - , Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "effect" - , Type.var "mappedMsg" - , Type.var "errorPage" - ] - , Type.namedWith - [ "Json", "Decode" ] - "Value" - [] - ] - (Type.tuple - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "Cli" - ] - "Model" - [ Type.var "route" ] - ) - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "Effect" - ] - "Effect" - [] - ) - ) - ) - } - ) - [ initArg_, initArg_0, initArg_1, initArg_2 ] - , update = - \updateArg_ updateArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "update" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Msg" - [] - , Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Model" - [ Type.var "route" ] - ] - (Type.tuple - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "Cli" - ] - "Model" - [ Type.var "route" ] - ) - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "Effect" - ] - "Effect" - [] - ) - ) - ) - } - ) - [ updateArg_, updateArg_0 ] - } - - -values_ : - { cliApplication : Elm.Expression - , init : Elm.Expression - , requestDecoder : Elm.Expression - , update : Elm.Expression - , currentCompatibilityKey : Elm.Expression - } -values_ = - { cliApplication = - Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "cliApplication" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.maybe (Type.var "route") - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "effect" - , Type.var "mappedMsg" - , Type.var "errorPage" - ] - ] - (Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Program" - [ Type.maybe (Type.var "route") ] - ) - ) - } - , init = - Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "init" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "SiteConfig" ] - "SiteConfig" - [] - , Type.namedWith - [ "RenderRequest" ] - "RenderRequest" - [ Type.var "route" ] - , Type.namedWith - [ "Pages", "ProgramConfig" ] - "ProgramConfig" - [ Type.var "userMsg" - , Type.var "userModel" - , Type.var "route" - , Type.var "pageData" - , Type.var "actionData" - , Type.var "sharedData" - , Type.var "effect" - , Type.var "mappedMsg" - , Type.var "errorPage" - ] - , Type.namedWith [ "Json", "Decode" ] "Value" [] - ] - (Type.tuple - (Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Model" - [ Type.var "route" ] - ) - (Type.namedWith - [ "Pages", "Internal", "Platform", "Effect" ] - "Effect" - [] - ) - ) - ) - } - , requestDecoder = - Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "requestDecoder" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Pages", "StaticHttp", "Request" ] - "Request" - [] - ] - ) - } - , update = - Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "update" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Msg" - [] - , Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Model" - [ Type.var "route" ] - ] - (Type.tuple - (Type.namedWith - [ "Pages", "Internal", "Platform", "Cli" ] - "Model" - [ Type.var "route" ] - ) - (Type.namedWith - [ "Pages", "Internal", "Platform", "Effect" ] - "Effect" - [] - ) - ) - ) - } - , currentCompatibilityKey = - Elm.value - { importFrom = [ "Pages", "Internal", "Platform", "Cli" ] - , name = "currentCompatibilityKey" - , annotation = Just Type.int - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Internal/Platform/GeneratorApplication.elm b/codegen/Gen/Pages/Internal/Platform/GeneratorApplication.elm deleted file mode 100644 index caf90648..00000000 --- a/codegen/Gen/Pages/Internal/Platform/GeneratorApplication.elm +++ /dev/null @@ -1,701 +0,0 @@ -module Gen.Pages.Internal.Platform.GeneratorApplication exposing - ( moduleName_, init, requestDecoder, update, app, annotation_ - , make_, caseOf_, call_, values_ - ) - -{-| -# Generated bindings for Pages.Internal.Platform.GeneratorApplication - -@docs moduleName_, init, requestDecoder, update, app, annotation_ -@docs make_, caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - - -{-| init: - BackendTask.BackendTask FatalError.FatalError () - -> Cli.Program.FlagsIncludingArgv Pages.Internal.Platform.GeneratorApplication.Flags - -> ( Pages.Internal.Platform.GeneratorApplication.Model, Pages.Internal.Platform.Effect.Effect ) --} -init : Elm.Expression -> Elm.Expression -> Elm.Expression -init initArg_ initArg_0 = - Elm.apply - (Elm.value - { importFrom = - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - , name = "init" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.unit - ] - , Type.namedWith - [ "Cli", "Program" ] - "FlagsIncludingArgv" - [ Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Flags" - [] - ] - ] - (Type.tuple - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Model" - [] - ) - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "Effect" - ] - "Effect" - [] - ) - ) - ) - } - ) - [ initArg_, initArg_0 ] - - -{-| requestDecoder: Json.Decode.Decoder Pages.StaticHttp.Request.Request -} -requestDecoder : Elm.Expression -requestDecoder = - Elm.value - { importFrom = - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - , name = "requestDecoder" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Pages", "StaticHttp", "Request" ] - "Request" - [] - ] - ) - } - - -{-| update: - Pages.Internal.Platform.GeneratorApplication.Msg - -> Pages.Internal.Platform.GeneratorApplication.Model - -> ( Pages.Internal.Platform.GeneratorApplication.Model, Pages.Internal.Platform.Effect.Effect ) --} -update : Elm.Expression -> Elm.Expression -> Elm.Expression -update updateArg_ updateArg_0 = - Elm.apply - (Elm.value - { importFrom = - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - , name = "update" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Msg" - [] - , Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Model" - [] - ] - (Type.tuple - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Model" - [] - ) - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "Effect" - ] - "Effect" - [] - ) - ) - ) - } - ) - [ updateArg_, updateArg_0 ] - - -{-| app: - Pages.GeneratorProgramConfig.GeneratorProgramConfig - -> Pages.Internal.Platform.GeneratorApplication.Program --} -app : Elm.Expression -> Elm.Expression -app appArg_ = - Elm.apply - (Elm.value - { importFrom = - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - , name = "app" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "GeneratorProgramConfig" ] - "GeneratorProgramConfig" - [] - ] - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Program" - [] - ) - ) - } - ) - [ appArg_ ] - - -annotation_ : - { program : Type.Annotation - , flags : Type.Annotation - , model : Type.Annotation - , msg : Type.Annotation - , jsonValue : Type.Annotation - } -annotation_ = - { program = - Type.alias - moduleName_ - "Program" - [] - (Type.namedWith - [ "Cli", "Program" ] - "StatefulProgram" - [ Type.namedWith - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - "Model" - [] - , Type.namedWith - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - "Msg" - [] - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.unit - ] - , Type.namedWith - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - "Flags" - [] - ] - ) - , flags = - Type.alias - moduleName_ - "Flags" - [] - (Type.record [ ( "compatibilityKey", Type.int ) ]) - , model = - Type.alias - moduleName_ - "Model" - [] - (Type.record - [ ( "staticResponses" - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.unit - ] - ) - , ( "errors" - , Type.list (Type.namedWith [ "BuildError" ] "BuildError" []) - ) - ] - ) - , msg = - Type.namedWith - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - "Msg" - [] - , jsonValue = - Type.alias - moduleName_ - "JsonValue" - [] - (Type.namedWith [ "Json", "Decode" ] "Value" []) - } - - -make_ : - { flags : { compatibilityKey : Elm.Expression } -> Elm.Expression - , model : - { staticResponses : Elm.Expression, errors : Elm.Expression } - -> Elm.Expression - , gotDataBatch : Elm.Expression -> Elm.Expression - , gotBuildError : Elm.Expression -> Elm.Expression - } -make_ = - { flags = - \flags_args -> - Elm.withType - (Type.alias - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - "Flags" - [] - (Type.record [ ( "compatibilityKey", Type.int ) ]) - ) - (Elm.record - [ Tuple.pair "compatibilityKey" flags_args.compatibilityKey - ] - ) - , model = - \model_args -> - Elm.withType - (Type.alias - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - "Model" - [] - (Type.record - [ ( "staticResponses" - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.unit - ] - ) - , ( "errors" - , Type.list - (Type.namedWith - [ "BuildError" ] - "BuildError" - [] - ) - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "staticResponses" model_args.staticResponses - , Tuple.pair "errors" model_args.errors - ] - ) - , gotDataBatch = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - , name = "GotDataBatch" - , annotation = Just (Type.namedWith [] "Msg" []) - } - ) - [ ar0 ] - , gotBuildError = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - , name = "GotBuildError" - , annotation = Just (Type.namedWith [] "Msg" []) - } - ) - [ ar0 ] - } - - -caseOf_ = - { msg = - \msgExpression msgTags -> - Elm.Case.custom - msgExpression - (Type.namedWith - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - "Msg" - [] - ) - [ Elm.Case.branch - (Elm.Arg.customType - "GotDataBatch" - msgTags.gotDataBatch |> Elm.Arg.item - (Elm.Arg.varWith - "jsonDecodeValue" - (Type.namedWith - [ "Json" - , "Decode" - ] - "Value" - [] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "GotBuildError" - msgTags.gotBuildError |> Elm.Arg.item - (Elm.Arg.varWith - "buildErrorBuildError" - (Type.namedWith - [ "BuildError" - ] - "BuildError" - [] - ) - ) - ) - Basics.identity - ] - } - - -call_ : - { init : Elm.Expression -> Elm.Expression -> Elm.Expression - , update : Elm.Expression -> Elm.Expression -> Elm.Expression - , app : Elm.Expression -> Elm.Expression - } -call_ = - { init = - \initArg_ initArg_0 -> - Elm.apply - (Elm.value - { importFrom = - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - , name = "init" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.unit - ] - , Type.namedWith - [ "Cli", "Program" ] - "FlagsIncludingArgv" - [ Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Flags" - [] - ] - ] - (Type.tuple - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Model" - [] - ) - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "Effect" - ] - "Effect" - [] - ) - ) - ) - } - ) - [ initArg_, initArg_0 ] - , update = - \updateArg_ updateArg_0 -> - Elm.apply - (Elm.value - { importFrom = - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - , name = "update" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Msg" - [] - , Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Model" - [] - ] - (Type.tuple - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Model" - [] - ) - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "Effect" - ] - "Effect" - [] - ) - ) - ) - } - ) - [ updateArg_, updateArg_0 ] - , app = - \appArg_ -> - Elm.apply - (Elm.value - { importFrom = - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - , name = "app" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "GeneratorProgramConfig" ] - "GeneratorProgramConfig" - [] - ] - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Program" - [] - ) - ) - } - ) - [ appArg_ ] - } - - -values_ : - { init : Elm.Expression - , requestDecoder : Elm.Expression - , update : Elm.Expression - , app : Elm.Expression - } -values_ = - { init = - Elm.value - { importFrom = - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - , name = "init" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.unit - ] - , Type.namedWith - [ "Cli", "Program" ] - "FlagsIncludingArgv" - [ Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Flags" - [] - ] - ] - (Type.tuple - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Model" - [] - ) - (Type.namedWith - [ "Pages", "Internal", "Platform", "Effect" ] - "Effect" - [] - ) - ) - ) - } - , requestDecoder = - Elm.value - { importFrom = - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - , name = "requestDecoder" - , annotation = - Just - (Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.namedWith - [ "Pages", "StaticHttp", "Request" ] - "Request" - [] - ] - ) - } - , update = - Elm.value - { importFrom = - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - , name = "update" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Msg" - [] - , Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Model" - [] - ] - (Type.tuple - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Model" - [] - ) - (Type.namedWith - [ "Pages", "Internal", "Platform", "Effect" ] - "Effect" - [] - ) - ) - ) - } - , app = - Elm.value - { importFrom = - [ "Pages", "Internal", "Platform", "GeneratorApplication" ] - , name = "app" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "GeneratorProgramConfig" ] - "GeneratorProgramConfig" - [] - ] - (Type.namedWith - [ "Pages" - , "Internal" - , "Platform" - , "GeneratorApplication" - ] - "Program" - [] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Internal/ResponseSketch.elm b/codegen/Gen/Pages/Internal/ResponseSketch.elm deleted file mode 100644 index cf2488db..00000000 --- a/codegen/Gen/Pages/Internal/ResponseSketch.elm +++ /dev/null @@ -1,250 +0,0 @@ -module Gen.Pages.Internal.ResponseSketch exposing ( moduleName_, annotation_, make_, caseOf_ ) - -{-| -# Generated bindings for Pages.Internal.ResponseSketch - -@docs moduleName_, annotation_, make_, caseOf_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Internal", "ResponseSketch" ] - - -annotation_ : - { responseSketch : - Type.Annotation -> Type.Annotation -> Type.Annotation -> Type.Annotation - } -annotation_ = - { responseSketch = - \responseSketchArg0 responseSketchArg1 responseSketchArg2 -> - Type.namedWith - [ "Pages", "Internal", "ResponseSketch" ] - "ResponseSketch" - [ responseSketchArg0, responseSketchArg1, responseSketchArg2 ] - } - - -make_ : - { renderPage : Elm.Expression -> Elm.Expression -> Elm.Expression - , hotUpdate : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , redirect : Elm.Expression -> Elm.Expression - , notFound : Elm.Expression -> Elm.Expression - , action : Elm.Expression -> Elm.Expression - } -make_ = - { renderPage = - \ar0 ar1 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "ResponseSketch" ] - , name = "RenderPage" - , annotation = - Just - (Type.namedWith - [] - "ResponseSketch" - [ Type.var "data" - , Type.var "action" - , Type.var "shared" - ] - ) - } - ) - [ ar0, ar1 ] - , hotUpdate = - \ar0 ar1 ar2 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "ResponseSketch" ] - , name = "HotUpdate" - , annotation = - Just - (Type.namedWith - [] - "ResponseSketch" - [ Type.var "data" - , Type.var "action" - , Type.var "shared" - ] - ) - } - ) - [ ar0, ar1, ar2 ] - , redirect = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "ResponseSketch" ] - , name = "Redirect" - , annotation = - Just - (Type.namedWith - [] - "ResponseSketch" - [ Type.var "data" - , Type.var "action" - , Type.var "shared" - ] - ) - } - ) - [ ar0 ] - , notFound = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "ResponseSketch" ] - , name = "NotFound" - , annotation = - Just - (Type.namedWith - [] - "ResponseSketch" - [ Type.var "data" - , Type.var "action" - , Type.var "shared" - ] - ) - } - ) - [ ar0 ] - , action = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "ResponseSketch" ] - , name = "Action" - , annotation = - Just - (Type.namedWith - [] - "ResponseSketch" - [ Type.var "data" - , Type.var "action" - , Type.var "shared" - ] - ) - } - ) - [ ar0 ] - } - - -caseOf_ = - { responseSketch = - \responseSketchExpression responseSketchTags -> - Elm.Case.custom - responseSketchExpression - (Type.namedWith - [ "Pages", "Internal", "ResponseSketch" ] - "ResponseSketch" - [ Type.var "data", Type.var "action", Type.var "shared" ] - ) - [ Elm.Case.branch - (Elm.Arg.customType - "RenderPage" - responseSketchTags.renderPage |> Elm.Arg.item - (Elm.Arg.varWith - "data" - (Type.var - "data" - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "maybeMaybe" - (Type.maybe - (Type.var - "action" - ) - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "HotUpdate" - responseSketchTags.hotUpdate |> Elm.Arg.item - (Elm.Arg.varWith - "data" - (Type.var - "data" - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "shared" - (Type.var - "shared" - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "maybeMaybe" - (Type.maybe - (Type.var - "action" - ) - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "Redirect" - responseSketchTags.redirect |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "NotFound" - responseSketchTags.notFound |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - (Type.record - [ ( "reason" - , Type.namedWith - [ "Pages" - , "Internal" - , "NotFoundReason" - ] - "NotFoundReason" - [] - ) - , ( "path" - , Type.namedWith - [ "UrlPath" - ] - "UrlPath" - [] - ) - ] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "Action" - responseSketchTags.action |> Elm.Arg.item - (Elm.Arg.varWith - "action" - (Type.var - "action" - ) - ) - ) - Basics.identity - ] - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Internal/RoutePattern.elm b/codegen/Gen/Pages/Internal/RoutePattern.elm deleted file mode 100644 index ca453ef9..00000000 --- a/codegen/Gen/Pages/Internal/RoutePattern.elm +++ /dev/null @@ -1,1196 +0,0 @@ -module Gen.Pages.Internal.RoutePattern exposing - ( moduleName_, view, toVariant, routeToBranch, fromModuleName, hasRouteParams - , repeatWithoutOptionalEnding, toModuleName, toRouteParamTypes, toRouteParamsRecord, toVariantName, annotation_, make_ - , caseOf_, call_, values_ - ) - -{-| -# Generated bindings for Pages.Internal.RoutePattern - -@docs moduleName_, view, toVariant, routeToBranch, fromModuleName, hasRouteParams -@docs repeatWithoutOptionalEnding, toModuleName, toRouteParamTypes, toRouteParamsRecord, toVariantName, annotation_ -@docs make_, caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Internal", "RoutePattern" ] - - -{-| view: Pages.Internal.RoutePattern.RoutePattern -> Html.Html msg -} -view : Elm.Expression -> Elm.Expression -view viewArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "view" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.namedWith [ "Html" ] "Html" [ Type.var "msg" ]) - ) - } - ) - [ viewArg_ ] - - -{-| toVariant: Pages.Internal.RoutePattern.RoutePattern -> Elm.Variant -} -toVariant : Elm.Expression -> Elm.Expression -toVariant toVariantArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toVariant" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.namedWith [ "Elm" ] "Variant" []) - ) - } - ) - [ toVariantArg_ ] - - -{-| routeToBranch: - Pages.Internal.RoutePattern.RoutePattern - -> List ( Elm.CodeGen.Pattern, Elm.CodeGen.Expression ) --} -routeToBranch : Elm.Expression -> Elm.Expression -routeToBranch routeToBranchArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "routeToBranch" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.list - (Type.tuple - (Type.namedWith - [ "Elm", "CodeGen" ] - "Pattern" - [] - ) - (Type.namedWith - [ "Elm", "CodeGen" ] - "Expression" - [] - ) - ) - ) - ) - } - ) - [ routeToBranchArg_ ] - - -{-| fromModuleName: List String -> Maybe Pages.Internal.RoutePattern.RoutePattern -} -fromModuleName : List String -> Elm.Expression -fromModuleName fromModuleNameArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "fromModuleName" - , annotation = - Just - (Type.function - [ Type.list Type.string ] - (Type.maybe - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ) - ) - ) - } - ) - [ Elm.list (List.map Elm.string fromModuleNameArg_) ] - - -{-| hasRouteParams: Pages.Internal.RoutePattern.RoutePattern -> Bool -} -hasRouteParams : Elm.Expression -> Elm.Expression -hasRouteParams hasRouteParamsArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "hasRouteParams" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - Type.bool - ) - } - ) - [ hasRouteParamsArg_ ] - - -{-| repeatWithoutOptionalEnding: - List Pages.Internal.RoutePattern.RouteParam - -> Maybe (List Pages.Internal.RoutePattern.RouteParam) --} -repeatWithoutOptionalEnding : List Elm.Expression -> Elm.Expression -repeatWithoutOptionalEnding repeatWithoutOptionalEndingArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "repeatWithoutOptionalEnding" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RouteParam" - [] - ) - ] - (Type.maybe - (Type.list - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RouteParam" - [] - ) - ) - ) - ) - } - ) - [ Elm.list repeatWithoutOptionalEndingArg_ ] - - -{-| toModuleName: Pages.Internal.RoutePattern.RoutePattern -> List String -} -toModuleName : Elm.Expression -> Elm.Expression -toModuleName toModuleNameArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toModuleName" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.list Type.string) - ) - } - ) - [ toModuleNameArg_ ] - - -{-| toRouteParamTypes: - Pages.Internal.RoutePattern.RoutePattern - -> List ( String, Pages.Internal.RoutePattern.Param ) --} -toRouteParamTypes : Elm.Expression -> Elm.Expression -toRouteParamTypes toRouteParamTypesArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toRouteParamTypes" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.list - (Type.tuple - Type.string - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "Param" - [] - ) - ) - ) - ) - } - ) - [ toRouteParamTypesArg_ ] - - -{-| toRouteParamsRecord: - Pages.Internal.RoutePattern.RoutePattern - -> List ( String, Elm.Annotation.Annotation ) --} -toRouteParamsRecord : Elm.Expression -> Elm.Expression -toRouteParamsRecord toRouteParamsRecordArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toRouteParamsRecord" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.list - (Type.tuple - Type.string - (Type.namedWith - [ "Elm", "Annotation" ] - "Annotation" - [] - ) - ) - ) - ) - } - ) - [ toRouteParamsRecordArg_ ] - - -{-| toVariantName: - Pages.Internal.RoutePattern.RoutePattern - -> { variantName : String - , params : List Pages.Internal.RoutePattern.RouteParam - } --} -toVariantName : Elm.Expression -> Elm.Expression -toVariantName toVariantNameArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toVariantName" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.record - [ ( "variantName", Type.string ) - , ( "params" - , Type.list - (Type.namedWith - [ "Pages" - , "Internal" - , "RoutePattern" - ] - "RouteParam" - [] - ) - ) - ] - ) - ) - } - ) - [ toVariantNameArg_ ] - - -annotation_ : - { ending : Type.Annotation - , routePattern : Type.Annotation - , segment : Type.Annotation - , param : Type.Annotation - , routeParam : Type.Annotation - } -annotation_ = - { ending = - Type.namedWith [ "Pages", "Internal", "RoutePattern" ] "Ending" [] - , routePattern = - Type.alias - moduleName_ - "RoutePattern" - [] - (Type.record - [ ( "segments" - , Type.list - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "Segment" - [] - ) - ) - , ( "ending" - , Type.maybe - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "Ending" - [] - ) - ) - ] - ) - , segment = - Type.namedWith [ "Pages", "Internal", "RoutePattern" ] "Segment" [] - , param = Type.namedWith [ "Pages", "Internal", "RoutePattern" ] "Param" [] - , routeParam = - Type.namedWith [ "Pages", "Internal", "RoutePattern" ] "RouteParam" [] - } - - -make_ : - { optional : Elm.Expression -> Elm.Expression - , requiredSplat : Elm.Expression - , optionalSplat : Elm.Expression - , routePattern : - { segments : Elm.Expression, ending : Elm.Expression } -> Elm.Expression - , staticSegment : Elm.Expression -> Elm.Expression - , dynamicSegment : Elm.Expression -> Elm.Expression - , requiredParam : Elm.Expression - , optionalParam : Elm.Expression - , requiredSplatParam : Elm.Expression - , optionalSplatParam : Elm.Expression - , staticParam : Elm.Expression -> Elm.Expression - , dynamicParam : Elm.Expression -> Elm.Expression - , optionalParam2 : Elm.Expression -> Elm.Expression - , requiredSplatParam2 : Elm.Expression - , optionalSplatParam2 : Elm.Expression - } -make_ = - { optional = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "Optional" - , annotation = Just (Type.namedWith [] "Ending" []) - } - ) - [ ar0 ] - , requiredSplat = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "RequiredSplat" - , annotation = Just (Type.namedWith [] "Ending" []) - } - , optionalSplat = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "OptionalSplat" - , annotation = Just (Type.namedWith [] "Ending" []) - } - , routePattern = - \routePattern_args -> - Elm.withType - (Type.alias - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - (Type.record - [ ( "segments" - , Type.list - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "Segment" - [] - ) - ) - , ( "ending" - , Type.maybe - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "Ending" - [] - ) - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "segments" routePattern_args.segments - , Tuple.pair "ending" routePattern_args.ending - ] - ) - , staticSegment = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "StaticSegment" - , annotation = Just (Type.namedWith [] "Segment" []) - } - ) - [ ar0 ] - , dynamicSegment = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "DynamicSegment" - , annotation = Just (Type.namedWith [] "Segment" []) - } - ) - [ ar0 ] - , requiredParam = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "RequiredParam" - , annotation = Just (Type.namedWith [] "Param" []) - } - , optionalParam = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "OptionalParam" - , annotation = Just (Type.namedWith [] "Param" []) - } - , requiredSplatParam = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "RequiredSplatParam" - , annotation = Just (Type.namedWith [] "Param" []) - } - , optionalSplatParam = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "OptionalSplatParam" - , annotation = Just (Type.namedWith [] "Param" []) - } - , staticParam = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "StaticParam" - , annotation = Just (Type.namedWith [] "RouteParam" []) - } - ) - [ ar0 ] - , dynamicParam = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "DynamicParam" - , annotation = Just (Type.namedWith [] "RouteParam" []) - } - ) - [ ar0 ] - , optionalParam2 = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "OptionalParam2" - , annotation = Just (Type.namedWith [] "RouteParam" []) - } - ) - [ ar0 ] - , requiredSplatParam2 = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "RequiredSplatParam2" - , annotation = Just (Type.namedWith [] "RouteParam" []) - } - , optionalSplatParam2 = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "OptionalSplatParam2" - , annotation = Just (Type.namedWith [] "RouteParam" []) - } - } - - -caseOf_ : - { ending : - Elm.Expression - -> { optional : Elm.Expression -> Elm.Expression - , requiredSplat : Elm.Expression - , optionalSplat : Elm.Expression - } - -> Elm.Expression - , segment : - Elm.Expression - -> { staticSegment : Elm.Expression -> Elm.Expression - , dynamicSegment : Elm.Expression -> Elm.Expression - } - -> Elm.Expression - , param : - Elm.Expression - -> { requiredParam : Elm.Expression - , optionalParam : Elm.Expression - , requiredSplatParam : Elm.Expression - , optionalSplatParam : Elm.Expression - } - -> Elm.Expression - , routeParam : - Elm.Expression - -> { staticParam : Elm.Expression -> Elm.Expression - , dynamicParam : Elm.Expression -> Elm.Expression - , optionalParam2 : Elm.Expression -> Elm.Expression - , requiredSplatParam2 : Elm.Expression - , optionalSplatParam2 : Elm.Expression - } - -> Elm.Expression - } -caseOf_ = - { ending = - \endingExpression endingTags -> - Elm.Case.custom - endingExpression - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "Ending" - [] - ) - [ Elm.Case.branch - (Elm.Arg.customType - "Optional" - endingTags.optional |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "RequiredSplat" endingTags.requiredSplat - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "OptionalSplat" endingTags.optionalSplat - ) - Basics.identity - ] - , segment = - \segmentExpression segmentTags -> - Elm.Case.custom - segmentExpression - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "Segment" - [] - ) - [ Elm.Case.branch - (Elm.Arg.customType - "StaticSegment" - segmentTags.staticSegment |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "DynamicSegment" - segmentTags.dynamicSegment |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - ] - , param = - \paramExpression paramTags -> - Elm.Case.custom - paramExpression - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "Param" - [] - ) - [ Elm.Case.branch - (Elm.Arg.customType "RequiredParam" paramTags.requiredParam) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "OptionalParam" paramTags.optionalParam) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "RequiredSplatParam" - paramTags.requiredSplatParam - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "OptionalSplatParam" - paramTags.optionalSplatParam - ) - Basics.identity - ] - , routeParam = - \routeParamExpression routeParamTags -> - Elm.Case.custom - routeParamExpression - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RouteParam" - [] - ) - [ Elm.Case.branch - (Elm.Arg.customType - "StaticParam" - routeParamTags.staticParam |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "DynamicParam" - routeParamTags.dynamicParam |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "OptionalParam2" - routeParamTags.optionalParam2 |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "RequiredSplatParam2" - routeParamTags.requiredSplatParam2 - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "OptionalSplatParam2" - routeParamTags.optionalSplatParam2 - ) - Basics.identity - ] - } - - -call_ : - { view : Elm.Expression -> Elm.Expression - , toVariant : Elm.Expression -> Elm.Expression - , routeToBranch : Elm.Expression -> Elm.Expression - , fromModuleName : Elm.Expression -> Elm.Expression - , hasRouteParams : Elm.Expression -> Elm.Expression - , repeatWithoutOptionalEnding : Elm.Expression -> Elm.Expression - , toModuleName : Elm.Expression -> Elm.Expression - , toRouteParamTypes : Elm.Expression -> Elm.Expression - , toRouteParamsRecord : Elm.Expression -> Elm.Expression - , toVariantName : Elm.Expression -> Elm.Expression - } -call_ = - { view = - \viewArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "view" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.namedWith - [ "Html" ] - "Html" - [ Type.var "msg" ] - ) - ) - } - ) - [ viewArg_ ] - , toVariant = - \toVariantArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toVariant" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.namedWith [ "Elm" ] "Variant" []) - ) - } - ) - [ toVariantArg_ ] - , routeToBranch = - \routeToBranchArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "routeToBranch" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.list - (Type.tuple - (Type.namedWith - [ "Elm", "CodeGen" ] - "Pattern" - [] - ) - (Type.namedWith - [ "Elm", "CodeGen" ] - "Expression" - [] - ) - ) - ) - ) - } - ) - [ routeToBranchArg_ ] - , fromModuleName = - \fromModuleNameArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "fromModuleName" - , annotation = - Just - (Type.function - [ Type.list Type.string ] - (Type.maybe - (Type.namedWith - [ "Pages" - , "Internal" - , "RoutePattern" - ] - "RoutePattern" - [] - ) - ) - ) - } - ) - [ fromModuleNameArg_ ] - , hasRouteParams = - \hasRouteParamsArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "hasRouteParams" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - Type.bool - ) - } - ) - [ hasRouteParamsArg_ ] - , repeatWithoutOptionalEnding = - \repeatWithoutOptionalEndingArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "repeatWithoutOptionalEnding" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RouteParam" - [] - ) - ] - (Type.maybe - (Type.list - (Type.namedWith - [ "Pages" - , "Internal" - , "RoutePattern" - ] - "RouteParam" - [] - ) - ) - ) - ) - } - ) - [ repeatWithoutOptionalEndingArg_ ] - , toModuleName = - \toModuleNameArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toModuleName" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.list Type.string) - ) - } - ) - [ toModuleNameArg_ ] - , toRouteParamTypes = - \toRouteParamTypesArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toRouteParamTypes" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.list - (Type.tuple - Type.string - (Type.namedWith - [ "Pages" - , "Internal" - , "RoutePattern" - ] - "Param" - [] - ) - ) - ) - ) - } - ) - [ toRouteParamTypesArg_ ] - , toRouteParamsRecord = - \toRouteParamsRecordArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toRouteParamsRecord" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.list - (Type.tuple - Type.string - (Type.namedWith - [ "Elm", "Annotation" ] - "Annotation" - [] - ) - ) - ) - ) - } - ) - [ toRouteParamsRecordArg_ ] - , toVariantName = - \toVariantNameArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toVariantName" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.record - [ ( "variantName", Type.string ) - , ( "params" - , Type.list - (Type.namedWith - [ "Pages" - , "Internal" - , "RoutePattern" - ] - "RouteParam" - [] - ) - ) - ] - ) - ) - } - ) - [ toVariantNameArg_ ] - } - - -values_ : - { view : Elm.Expression - , toVariant : Elm.Expression - , routeToBranch : Elm.Expression - , fromModuleName : Elm.Expression - , hasRouteParams : Elm.Expression - , repeatWithoutOptionalEnding : Elm.Expression - , toModuleName : Elm.Expression - , toRouteParamTypes : Elm.Expression - , toRouteParamsRecord : Elm.Expression - , toVariantName : Elm.Expression - } -values_ = - { view = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "view" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.namedWith [ "Html" ] "Html" [ Type.var "msg" ]) - ) - } - , toVariant = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toVariant" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.namedWith [ "Elm" ] "Variant" []) - ) - } - , routeToBranch = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "routeToBranch" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.list - (Type.tuple - (Type.namedWith - [ "Elm", "CodeGen" ] - "Pattern" - [] - ) - (Type.namedWith - [ "Elm", "CodeGen" ] - "Expression" - [] - ) - ) - ) - ) - } - , fromModuleName = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "fromModuleName" - , annotation = - Just - (Type.function - [ Type.list Type.string ] - (Type.maybe - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ) - ) - ) - } - , hasRouteParams = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "hasRouteParams" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - Type.bool - ) - } - , repeatWithoutOptionalEnding = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "repeatWithoutOptionalEnding" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RouteParam" - [] - ) - ] - (Type.maybe - (Type.list - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RouteParam" - [] - ) - ) - ) - ) - } - , toModuleName = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toModuleName" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.list Type.string) - ) - } - , toRouteParamTypes = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toRouteParamTypes" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.list - (Type.tuple - Type.string - (Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "Param" - [] - ) - ) - ) - ) - } - , toRouteParamsRecord = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toRouteParamsRecord" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.list - (Type.tuple - Type.string - (Type.namedWith - [ "Elm", "Annotation" ] - "Annotation" - [] - ) - ) - ) - ) - } - , toVariantName = - Elm.value - { importFrom = [ "Pages", "Internal", "RoutePattern" ] - , name = "toVariantName" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Internal", "RoutePattern" ] - "RoutePattern" - [] - ] - (Type.record - [ ( "variantName", Type.string ) - , ( "params" - , Type.list - (Type.namedWith - [ "Pages" - , "Internal" - , "RoutePattern" - ] - "RouteParam" - [] - ) - ) - ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Internal/Router.elm b/codegen/Gen/Pages/Internal/Router.elm deleted file mode 100644 index 07c43fe6..00000000 --- a/codegen/Gen/Pages/Internal/Router.elm +++ /dev/null @@ -1,340 +0,0 @@ -module Gen.Pages.Internal.Router exposing - ( moduleName_, firstMatch, fromOptionalSplat, maybeToList, nonEmptyToList, toNonEmpty - , annotation_, make_, call_, values_ - ) - -{-| -# Generated bindings for Pages.Internal.Router - -@docs moduleName_, firstMatch, fromOptionalSplat, maybeToList, nonEmptyToList, toNonEmpty -@docs annotation_, make_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Internal", "Router" ] - - -{-| firstMatch: List (Pages.Internal.Router.Matcher route) -> String -> Maybe route -} -firstMatch : List Elm.Expression -> String -> Elm.Expression -firstMatch firstMatchArg_ firstMatchArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "firstMatch" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Pages", "Internal", "Router" ] - "Matcher" - [ Type.var "route" ] - ) - , Type.string - ] - (Type.maybe (Type.var "route")) - ) - } - ) - [ Elm.list firstMatchArg_, Elm.string firstMatchArg_0 ] - - -{-| fromOptionalSplat: Maybe String -> List String -} -fromOptionalSplat : Elm.Expression -> Elm.Expression -fromOptionalSplat fromOptionalSplatArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "fromOptionalSplat" - , annotation = - Just - (Type.function - [ Type.maybe Type.string ] - (Type.list Type.string) - ) - } - ) - [ fromOptionalSplatArg_ ] - - -{-| maybeToList: Maybe String -> List String -} -maybeToList : Elm.Expression -> Elm.Expression -maybeToList maybeToListArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "maybeToList" - , annotation = - Just - (Type.function - [ Type.maybe Type.string ] - (Type.list Type.string) - ) - } - ) - [ maybeToListArg_ ] - - -{-| nonEmptyToList: ( String, List String ) -> List String -} -nonEmptyToList : Elm.Expression -> Elm.Expression -nonEmptyToList nonEmptyToListArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "nonEmptyToList" - , annotation = - Just - (Type.function - [ Type.tuple Type.string (Type.list Type.string) ] - (Type.list Type.string) - ) - } - ) - [ nonEmptyToListArg_ ] - - -{-| toNonEmpty: String -> ( String, List String ) -} -toNonEmpty : String -> Elm.Expression -toNonEmpty toNonEmptyArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "toNonEmpty" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.tuple Type.string (Type.list Type.string)) - ) - } - ) - [ Elm.string toNonEmptyArg_ ] - - -annotation_ : { matcher : Type.Annotation -> Type.Annotation } -annotation_ = - { matcher = - \matcherArg0 -> - Type.alias - moduleName_ - "Matcher" - [ matcherArg0 ] - (Type.record - [ ( "pattern", Type.string ) - , ( "toRoute" - , Type.function - [ Type.list (Type.maybe Type.string) ] - (Type.maybe (Type.var "route")) - ) - ] - ) - } - - -make_ : - { matcher : - { pattern : Elm.Expression, toRoute : Elm.Expression } -> Elm.Expression - } -make_ = - { matcher = - \matcher_args -> - Elm.withType - (Type.alias - [ "Pages", "Internal", "Router" ] - "Matcher" - [ Type.var "route" ] - (Type.record - [ ( "pattern", Type.string ) - , ( "toRoute" - , Type.function - [ Type.list (Type.maybe Type.string) ] - (Type.maybe (Type.var "route")) - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "pattern" matcher_args.pattern - , Tuple.pair "toRoute" matcher_args.toRoute - ] - ) - } - - -call_ : - { firstMatch : Elm.Expression -> Elm.Expression -> Elm.Expression - , fromOptionalSplat : Elm.Expression -> Elm.Expression - , maybeToList : Elm.Expression -> Elm.Expression - , nonEmptyToList : Elm.Expression -> Elm.Expression - , toNonEmpty : Elm.Expression -> Elm.Expression - } -call_ = - { firstMatch = - \firstMatchArg_ firstMatchArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "firstMatch" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Pages", "Internal", "Router" ] - "Matcher" - [ Type.var "route" ] - ) - , Type.string - ] - (Type.maybe (Type.var "route")) - ) - } - ) - [ firstMatchArg_, firstMatchArg_0 ] - , fromOptionalSplat = - \fromOptionalSplatArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "fromOptionalSplat" - , annotation = - Just - (Type.function - [ Type.maybe Type.string ] - (Type.list Type.string) - ) - } - ) - [ fromOptionalSplatArg_ ] - , maybeToList = - \maybeToListArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "maybeToList" - , annotation = - Just - (Type.function - [ Type.maybe Type.string ] - (Type.list Type.string) - ) - } - ) - [ maybeToListArg_ ] - , nonEmptyToList = - \nonEmptyToListArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "nonEmptyToList" - , annotation = - Just - (Type.function - [ Type.tuple - Type.string - (Type.list Type.string) - ] - (Type.list Type.string) - ) - } - ) - [ nonEmptyToListArg_ ] - , toNonEmpty = - \toNonEmptyArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "toNonEmpty" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.tuple - Type.string - (Type.list Type.string) - ) - ) - } - ) - [ toNonEmptyArg_ ] - } - - -values_ : - { firstMatch : Elm.Expression - , fromOptionalSplat : Elm.Expression - , maybeToList : Elm.Expression - , nonEmptyToList : Elm.Expression - , toNonEmpty : Elm.Expression - } -values_ = - { firstMatch = - Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "firstMatch" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Pages", "Internal", "Router" ] - "Matcher" - [ Type.var "route" ] - ) - , Type.string - ] - (Type.maybe (Type.var "route")) - ) - } - , fromOptionalSplat = - Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "fromOptionalSplat" - , annotation = - Just - (Type.function - [ Type.maybe Type.string ] - (Type.list Type.string) - ) - } - , maybeToList = - Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "maybeToList" - , annotation = - Just - (Type.function - [ Type.maybe Type.string ] - (Type.list Type.string) - ) - } - , nonEmptyToList = - Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "nonEmptyToList" - , annotation = - Just - (Type.function - [ Type.tuple Type.string (Type.list Type.string) ] - (Type.list Type.string) - ) - } - , toNonEmpty = - Elm.value - { importFrom = [ "Pages", "Internal", "Router" ] - , name = "toNonEmpty" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.tuple Type.string (Type.list Type.string)) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Manifest.elm b/codegen/Gen/Pages/Manifest.elm deleted file mode 100644 index a893938a..00000000 --- a/codegen/Gen/Pages/Manifest.elm +++ /dev/null @@ -1,1391 +0,0 @@ -module Gen.Pages.Manifest exposing - ( moduleName_, init, withBackgroundColor, withCategories, withDisplayMode, withIarcRatingId - , withLang, withOrientation, withShortName, withThemeColor, withField, generator, toJson - , annotation_, make_, caseOf_, call_, values_ - ) - -{-| -# Generated bindings for Pages.Manifest - -@docs moduleName_, init, withBackgroundColor, withCategories, withDisplayMode, withIarcRatingId -@docs withLang, withOrientation, withShortName, withThemeColor, withField, generator -@docs toJson, annotation_, make_, caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Manifest" ] - - -{-| Setup a minimal Manifest.Config. You can then use the `with...` builder functions to set additional options. - -init: - { description : String - , name : String - , startUrl : UrlPath.UrlPath - , icons : List Pages.Manifest.Icon - } - -> Pages.Manifest.Config --} -init : - { description : String - , name : String - , startUrl : Elm.Expression - , icons : List Elm.Expression - } - -> Elm.Expression -init initArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "init" - , annotation = - Just - (Type.function - [ Type.record - [ ( "description", Type.string ) - , ( "name", Type.string ) - , ( "startUrl" - , Type.namedWith [ "UrlPath" ] "UrlPath" [] - ) - , ( "icons" - , Type.list - (Type.namedWith - [ "Pages", "Manifest" ] - "Icon" - [] - ) - ) - ] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - ) - [ Elm.record - [ Tuple.pair "description" (Elm.string initArg_.description) - , Tuple.pair "name" (Elm.string initArg_.name) - , Tuple.pair "startUrl" initArg_.startUrl - , Tuple.pair "icons" (Elm.list initArg_.icons) - ] - ] - - -{-| Set . - -withBackgroundColor: Color.Color -> Pages.Manifest.Config -> Pages.Manifest.Config --} -withBackgroundColor : Elm.Expression -> Elm.Expression -> Elm.Expression -withBackgroundColor withBackgroundColorArg_ withBackgroundColorArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withBackgroundColor" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Color" ] "Color" [] - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - ) - [ withBackgroundColorArg_, withBackgroundColorArg_0 ] - - -{-| Set . - -withCategories: - List Pages.Manifest.Category.Category - -> Pages.Manifest.Config - -> Pages.Manifest.Config --} -withCategories : List Elm.Expression -> Elm.Expression -> Elm.Expression -withCategories withCategoriesArg_ withCategoriesArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withCategories" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - ) - [ Elm.list withCategoriesArg_, withCategoriesArg_0 ] - - -{-| Set . - -withDisplayMode: Pages.Manifest.DisplayMode -> Pages.Manifest.Config -> Pages.Manifest.Config --} -withDisplayMode : Elm.Expression -> Elm.Expression -> Elm.Expression -withDisplayMode withDisplayModeArg_ withDisplayModeArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withDisplayMode" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Manifest" ] - "DisplayMode" - [] - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - ) - [ withDisplayModeArg_, withDisplayModeArg_0 ] - - -{-| Set . - -withIarcRatingId: String -> Pages.Manifest.Config -> Pages.Manifest.Config --} -withIarcRatingId : String -> Elm.Expression -> Elm.Expression -withIarcRatingId withIarcRatingIdArg_ withIarcRatingIdArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withIarcRatingId" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - ) - [ Elm.string withIarcRatingIdArg_, withIarcRatingIdArg_0 ] - - -{-| Set . - -withLang: LanguageTag.LanguageTag -> Pages.Manifest.Config -> Pages.Manifest.Config --} -withLang : Elm.Expression -> Elm.Expression -> Elm.Expression -withLang withLangArg_ withLangArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withLang" - , annotation = - Just - (Type.function - [ Type.namedWith [ "LanguageTag" ] "LanguageTag" [] - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - ) - [ withLangArg_, withLangArg_0 ] - - -{-| Set . - -withOrientation: Pages.Manifest.Orientation -> Pages.Manifest.Config -> Pages.Manifest.Config --} -withOrientation : Elm.Expression -> Elm.Expression -> Elm.Expression -withOrientation withOrientationArg_ withOrientationArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withOrientation" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Manifest" ] - "Orientation" - [] - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - ) - [ withOrientationArg_, withOrientationArg_0 ] - - -{-| Set . - -withShortName: String -> Pages.Manifest.Config -> Pages.Manifest.Config --} -withShortName : String -> Elm.Expression -> Elm.Expression -withShortName withShortNameArg_ withShortNameArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withShortName" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - ) - [ Elm.string withShortNameArg_, withShortNameArg_0 ] - - -{-| Set . - -withThemeColor: Color.Color -> Pages.Manifest.Config -> Pages.Manifest.Config --} -withThemeColor : Elm.Expression -> Elm.Expression -> Elm.Expression -withThemeColor withThemeColorArg_ withThemeColorArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withThemeColor" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Color" ] "Color" [] - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - ) - [ withThemeColorArg_, withThemeColorArg_0 ] - - -{-| Escape hatch for specifying fields that aren't exposed through this module otherwise. The possible supported properties -in a manifest file can change over time, so see [MDN manifest.json docs](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json) -for a full listing of the current supported properties. - -withField: String -> Json.Encode.Value -> Pages.Manifest.Config -> Pages.Manifest.Config --} -withField : String -> Elm.Expression -> Elm.Expression -> Elm.Expression -withField withFieldArg_ withFieldArg_0 withFieldArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withField" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - ) - [ Elm.string withFieldArg_, withFieldArg_0, withFieldArg_1 ] - - -{-| A generator for `Api.elm` to include a manifest.json. The String argument is the canonical URL of the site. - - module Api exposing (routes) - - import ApiRoute - import Pages.Manifest - - routes : - BackendTask FatalError (List Route) - -> (Maybe { indent : Int, newLines : Bool } -> Html Never -> String) - -> List (ApiRoute.ApiRoute ApiRoute.Response) - routes getStaticRoutes htmlToString = - [ Pages.Manifest.generator - Site.canonicalUrl - Manifest.config - ] - -generator: - String - -> BackendTask.BackendTask FatalError.FatalError Pages.Manifest.Config - -> ApiRoute.ApiRoute ApiRoute.Response --} -generator : String -> Elm.Expression -> Elm.Expression -generator generatorArg_ generatorArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "generator" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith [ "ApiRoute" ] "Response" [] ] - ) - ) - } - ) - [ Elm.string generatorArg_, generatorArg_0 ] - - -{-| Feel free to use this, but in 99% of cases you won't need it. The generated -code will run this for you to generate your `manifest.json` file automatically! - -toJson: String -> Pages.Manifest.Config -> Json.Encode.Value --} -toJson : String -> Elm.Expression -> Elm.Expression -toJson toJsonArg_ toJsonArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "toJson" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Json", "Encode" ] "Value" []) - ) - } - ) - [ Elm.string toJsonArg_, toJsonArg_0 ] - - -annotation_ : - { config : Type.Annotation - , icon : Type.Annotation - , displayMode : Type.Annotation - , orientation : Type.Annotation - , iconPurpose : Type.Annotation - } -annotation_ = - { config = - Type.alias - moduleName_ - "Config" - [] - (Type.record - [ ( "backgroundColor" - , Type.maybe (Type.namedWith [ "Color" ] "Color" []) - ) - , ( "categories" - , Type.list - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - ) - , ( "displayMode" - , Type.namedWith [ "Pages", "Manifest" ] "DisplayMode" [] - ) - , ( "orientation" - , Type.namedWith [ "Pages", "Manifest" ] "Orientation" [] - ) - , ( "description", Type.string ) - , ( "iarcRatingId", Type.maybe Type.string ) - , ( "name", Type.string ) - , ( "themeColor" - , Type.maybe (Type.namedWith [ "Color" ] "Color" []) - ) - , ( "startUrl", Type.namedWith [ "UrlPath" ] "UrlPath" [] ) - , ( "shortName", Type.maybe Type.string ) - , ( "icons" - , Type.list - (Type.namedWith [ "Pages", "Manifest" ] "Icon" []) - ) - , ( "lang", Type.namedWith [ "LanguageTag" ] "LanguageTag" [] ) - , ( "otherFields" - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - ] - ) - ] - ) - , icon = - Type.alias - moduleName_ - "Icon" - [] - (Type.record - [ ( "src", Type.namedWith [ "Pages", "Url" ] "Url" [] ) - , ( "sizes", Type.list (Type.tuple Type.int Type.int) ) - , ( "mimeType" - , Type.maybe (Type.namedWith [ "MimeType" ] "MimeImage" []) - ) - , ( "purposes" - , Type.list - (Type.namedWith - [ "Pages", "Manifest" ] - "IconPurpose" - [] - ) - ) - ] - ) - , displayMode = Type.namedWith [ "Pages", "Manifest" ] "DisplayMode" [] - , orientation = Type.namedWith [ "Pages", "Manifest" ] "Orientation" [] - , iconPurpose = Type.namedWith [ "Pages", "Manifest" ] "IconPurpose" [] - } - - -make_ : - { config : - { backgroundColor : Elm.Expression - , categories : Elm.Expression - , displayMode : Elm.Expression - , orientation : Elm.Expression - , description : Elm.Expression - , iarcRatingId : Elm.Expression - , name : Elm.Expression - , themeColor : Elm.Expression - , startUrl : Elm.Expression - , shortName : Elm.Expression - , icons : Elm.Expression - , lang : Elm.Expression - , otherFields : Elm.Expression - } - -> Elm.Expression - , icon : - { src : Elm.Expression - , sizes : Elm.Expression - , mimeType : Elm.Expression - , purposes : Elm.Expression - } - -> Elm.Expression - , fullscreen : Elm.Expression - , standalone : Elm.Expression - , minimalUi : Elm.Expression - , browser : Elm.Expression - , any : Elm.Expression - , natural : Elm.Expression - , landscape : Elm.Expression - , landscapePrimary : Elm.Expression - , landscapeSecondary : Elm.Expression - , portrait : Elm.Expression - , portraitPrimary : Elm.Expression - , portraitSecondary : Elm.Expression - , iconPurposeMonochrome : Elm.Expression - , iconPurposeMaskable : Elm.Expression - , iconPurposeAny : Elm.Expression - } -make_ = - { config = - \config_args -> - Elm.withType - (Type.alias - [ "Pages", "Manifest" ] - "Config" - [] - (Type.record - [ ( "backgroundColor" - , Type.maybe (Type.namedWith [ "Color" ] "Color" []) - ) - , ( "categories" - , Type.list - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - ) - , ( "displayMode" - , Type.namedWith - [ "Pages", "Manifest" ] - "DisplayMode" - [] - ) - , ( "orientation" - , Type.namedWith - [ "Pages", "Manifest" ] - "Orientation" - [] - ) - , ( "description", Type.string ) - , ( "iarcRatingId", Type.maybe Type.string ) - , ( "name", Type.string ) - , ( "themeColor" - , Type.maybe (Type.namedWith [ "Color" ] "Color" []) - ) - , ( "startUrl" - , Type.namedWith [ "UrlPath" ] "UrlPath" [] - ) - , ( "shortName", Type.maybe Type.string ) - , ( "icons" - , Type.list - (Type.namedWith - [ "Pages", "Manifest" ] - "Icon" - [] - ) - ) - , ( "lang" - , Type.namedWith [ "LanguageTag" ] "LanguageTag" [] - ) - , ( "otherFields" - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string - , Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - ] - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "backgroundColor" config_args.backgroundColor - , Tuple.pair "categories" config_args.categories - , Tuple.pair "displayMode" config_args.displayMode - , Tuple.pair "orientation" config_args.orientation - , Tuple.pair "description" config_args.description - , Tuple.pair "iarcRatingId" config_args.iarcRatingId - , Tuple.pair "name" config_args.name - , Tuple.pair "themeColor" config_args.themeColor - , Tuple.pair "startUrl" config_args.startUrl - , Tuple.pair "shortName" config_args.shortName - , Tuple.pair "icons" config_args.icons - , Tuple.pair "lang" config_args.lang - , Tuple.pair "otherFields" config_args.otherFields - ] - ) - , icon = - \icon_args -> - Elm.withType - (Type.alias - [ "Pages", "Manifest" ] - "Icon" - [] - (Type.record - [ ( "src" - , Type.namedWith [ "Pages", "Url" ] "Url" [] - ) - , ( "sizes" - , Type.list (Type.tuple Type.int Type.int) - ) - , ( "mimeType" - , Type.maybe - (Type.namedWith [ "MimeType" ] "MimeImage" []) - ) - , ( "purposes" - , Type.list - (Type.namedWith - [ "Pages", "Manifest" ] - "IconPurpose" - [] - ) - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "src" icon_args.src - , Tuple.pair "sizes" icon_args.sizes - , Tuple.pair "mimeType" icon_args.mimeType - , Tuple.pair "purposes" icon_args.purposes - ] - ) - , fullscreen = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "Fullscreen" - , annotation = Just (Type.namedWith [] "DisplayMode" []) - } - , standalone = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "Standalone" - , annotation = Just (Type.namedWith [] "DisplayMode" []) - } - , minimalUi = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "MinimalUi" - , annotation = Just (Type.namedWith [] "DisplayMode" []) - } - , browser = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "Browser" - , annotation = Just (Type.namedWith [] "DisplayMode" []) - } - , any = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "Any" - , annotation = Just (Type.namedWith [] "Orientation" []) - } - , natural = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "Natural" - , annotation = Just (Type.namedWith [] "Orientation" []) - } - , landscape = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "Landscape" - , annotation = Just (Type.namedWith [] "Orientation" []) - } - , landscapePrimary = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "LandscapePrimary" - , annotation = Just (Type.namedWith [] "Orientation" []) - } - , landscapeSecondary = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "LandscapeSecondary" - , annotation = Just (Type.namedWith [] "Orientation" []) - } - , portrait = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "Portrait" - , annotation = Just (Type.namedWith [] "Orientation" []) - } - , portraitPrimary = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "PortraitPrimary" - , annotation = Just (Type.namedWith [] "Orientation" []) - } - , portraitSecondary = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "PortraitSecondary" - , annotation = Just (Type.namedWith [] "Orientation" []) - } - , iconPurposeMonochrome = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "IconPurposeMonochrome" - , annotation = Just (Type.namedWith [] "IconPurpose" []) - } - , iconPurposeMaskable = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "IconPurposeMaskable" - , annotation = Just (Type.namedWith [] "IconPurpose" []) - } - , iconPurposeAny = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "IconPurposeAny" - , annotation = Just (Type.namedWith [] "IconPurpose" []) - } - } - - -caseOf_ : - { displayMode : - Elm.Expression - -> { fullscreen : Elm.Expression - , standalone : Elm.Expression - , minimalUi : Elm.Expression - , browser : Elm.Expression - } - -> Elm.Expression - , orientation : - Elm.Expression - -> { any : Elm.Expression - , natural : Elm.Expression - , landscape : Elm.Expression - , landscapePrimary : Elm.Expression - , landscapeSecondary : Elm.Expression - , portrait : Elm.Expression - , portraitPrimary : Elm.Expression - , portraitSecondary : Elm.Expression - } - -> Elm.Expression - , iconPurpose : - Elm.Expression - -> { iconPurposeMonochrome : Elm.Expression - , iconPurposeMaskable : Elm.Expression - , iconPurposeAny : Elm.Expression - } - -> Elm.Expression - } -caseOf_ = - { displayMode = - \displayModeExpression displayModeTags -> - Elm.Case.custom - displayModeExpression - (Type.namedWith [ "Pages", "Manifest" ] "DisplayMode" []) - [ Elm.Case.branch - (Elm.Arg.customType "Fullscreen" displayModeTags.fullscreen) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Standalone" displayModeTags.standalone) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "MinimalUi" displayModeTags.minimalUi) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Browser" displayModeTags.browser) - Basics.identity - ] - , orientation = - \orientationExpression orientationTags -> - Elm.Case.custom - orientationExpression - (Type.namedWith [ "Pages", "Manifest" ] "Orientation" []) - [ Elm.Case.branch - (Elm.Arg.customType "Any" orientationTags.any) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Natural" orientationTags.natural) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Landscape" orientationTags.landscape) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "LandscapePrimary" - orientationTags.landscapePrimary - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "LandscapeSecondary" - orientationTags.landscapeSecondary - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Portrait" orientationTags.portrait) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "PortraitPrimary" - orientationTags.portraitPrimary - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "PortraitSecondary" - orientationTags.portraitSecondary - ) - Basics.identity - ] - , iconPurpose = - \iconPurposeExpression iconPurposeTags -> - Elm.Case.custom - iconPurposeExpression - (Type.namedWith [ "Pages", "Manifest" ] "IconPurpose" []) - [ Elm.Case.branch - (Elm.Arg.customType - "IconPurposeMonochrome" - iconPurposeTags.iconPurposeMonochrome - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "IconPurposeMaskable" - iconPurposeTags.iconPurposeMaskable - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "IconPurposeAny" - iconPurposeTags.iconPurposeAny - ) - Basics.identity - ] - } - - -call_ : - { init : Elm.Expression -> Elm.Expression - , withBackgroundColor : Elm.Expression -> Elm.Expression -> Elm.Expression - , withCategories : Elm.Expression -> Elm.Expression -> Elm.Expression - , withDisplayMode : Elm.Expression -> Elm.Expression -> Elm.Expression - , withIarcRatingId : Elm.Expression -> Elm.Expression -> Elm.Expression - , withLang : Elm.Expression -> Elm.Expression -> Elm.Expression - , withOrientation : Elm.Expression -> Elm.Expression -> Elm.Expression - , withShortName : Elm.Expression -> Elm.Expression -> Elm.Expression - , withThemeColor : Elm.Expression -> Elm.Expression -> Elm.Expression - , withField : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , generator : Elm.Expression -> Elm.Expression -> Elm.Expression - , toJson : Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { init = - \initArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "init" - , annotation = - Just - (Type.function - [ Type.record - [ ( "description", Type.string ) - , ( "name", Type.string ) - , ( "startUrl" - , Type.namedWith - [ "UrlPath" ] - "UrlPath" - [] - ) - , ( "icons" - , Type.list - (Type.namedWith - [ "Pages", "Manifest" ] - "Icon" - [] - ) - ) - ] - ] - (Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ) - ) - } - ) - [ initArg_ ] - , withBackgroundColor = - \withBackgroundColorArg_ withBackgroundColorArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withBackgroundColor" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Color" ] "Color" [] - , Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ] - (Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ) - ) - } - ) - [ withBackgroundColorArg_, withBackgroundColorArg_0 ] - , withCategories = - \withCategoriesArg_ withCategoriesArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withCategories" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - , Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ] - (Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ) - ) - } - ) - [ withCategoriesArg_, withCategoriesArg_0 ] - , withDisplayMode = - \withDisplayModeArg_ withDisplayModeArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withDisplayMode" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Manifest" ] - "DisplayMode" - [] - , Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ] - (Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ) - ) - } - ) - [ withDisplayModeArg_, withDisplayModeArg_0 ] - , withIarcRatingId = - \withIarcRatingIdArg_ withIarcRatingIdArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withIarcRatingId" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ] - (Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ) - ) - } - ) - [ withIarcRatingIdArg_, withIarcRatingIdArg_0 ] - , withLang = - \withLangArg_ withLangArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withLang" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "LanguageTag" ] - "LanguageTag" - [] - , Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ] - (Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ) - ) - } - ) - [ withLangArg_, withLangArg_0 ] - , withOrientation = - \withOrientationArg_ withOrientationArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withOrientation" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Manifest" ] - "Orientation" - [] - , Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ] - (Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ) - ) - } - ) - [ withOrientationArg_, withOrientationArg_0 ] - , withShortName = - \withShortNameArg_ withShortNameArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withShortName" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ] - (Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ) - ) - } - ) - [ withShortNameArg_, withShortNameArg_0 ] - , withThemeColor = - \withThemeColorArg_ withThemeColorArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withThemeColor" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Color" ] "Color" [] - , Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ] - (Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ) - ) - } - ) - [ withThemeColorArg_, withThemeColorArg_0 ] - , withField = - \withFieldArg_ withFieldArg_0 withFieldArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withField" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - , Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ] - (Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ) - ) - } - ) - [ withFieldArg_, withFieldArg_0, withFieldArg_1 ] - , generator = - \generatorArg_ generatorArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "generator" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith - [ "ApiRoute" ] - "Response" - [] - ] - ) - ) - } - ) - [ generatorArg_, generatorArg_0 ] - , toJson = - \toJsonArg_ toJsonArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "toJson" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ] - (Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - ) - ) - } - ) - [ toJsonArg_, toJsonArg_0 ] - } - - -values_ : - { init : Elm.Expression - , withBackgroundColor : Elm.Expression - , withCategories : Elm.Expression - , withDisplayMode : Elm.Expression - , withIarcRatingId : Elm.Expression - , withLang : Elm.Expression - , withOrientation : Elm.Expression - , withShortName : Elm.Expression - , withThemeColor : Elm.Expression - , withField : Elm.Expression - , generator : Elm.Expression - , toJson : Elm.Expression - } -values_ = - { init = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "init" - , annotation = - Just - (Type.function - [ Type.record - [ ( "description", Type.string ) - , ( "name", Type.string ) - , ( "startUrl" - , Type.namedWith [ "UrlPath" ] "UrlPath" [] - ) - , ( "icons" - , Type.list - (Type.namedWith - [ "Pages", "Manifest" ] - "Icon" - [] - ) - ) - ] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - , withBackgroundColor = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withBackgroundColor" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Color" ] "Color" [] - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - , withCategories = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withCategories" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - , withDisplayMode = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withDisplayMode" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Manifest" ] - "DisplayMode" - [] - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - , withIarcRatingId = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withIarcRatingId" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - , withLang = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withLang" - , annotation = - Just - (Type.function - [ Type.namedWith [ "LanguageTag" ] "LanguageTag" [] - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - , withOrientation = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withOrientation" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Manifest" ] - "Orientation" - [] - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - , withShortName = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withShortName" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - , withThemeColor = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withThemeColor" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Color" ] "Color" [] - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - , withField = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "withField" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Json", "Encode" ] "Value" [] - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Pages", "Manifest" ] "Config" []) - ) - } - , generator = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "generator" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.namedWith - [ "Pages", "Manifest" ] - "Config" - [] - ] - ] - (Type.namedWith - [ "ApiRoute" ] - "ApiRoute" - [ Type.namedWith [ "ApiRoute" ] "Response" [] ] - ) - ) - } - , toJson = - Elm.value - { importFrom = [ "Pages", "Manifest" ] - , name = "toJson" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Pages", "Manifest" ] "Config" [] - ] - (Type.namedWith [ "Json", "Encode" ] "Value" []) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Manifest/Category.elm b/codegen/Gen/Pages/Manifest/Category.elm deleted file mode 100644 index d67f57cd..00000000 --- a/codegen/Gen/Pages/Manifest/Category.elm +++ /dev/null @@ -1,1068 +0,0 @@ -module Gen.Pages.Manifest.Category exposing - ( moduleName_, toString, books, business, education, entertainment - , finance, fitness, food, games, government, health, kids - , lifestyle, magazines, medical, music, navigation, news, personalization - , photo, politics, productivity, security, shopping, social, sports - , travel, utilities, weather, custom, annotation_, call_, values_ - ) - -{-| -# Generated bindings for Pages.Manifest.Category - -@docs moduleName_, toString, books, business, education, entertainment -@docs finance, fitness, food, games, government, health -@docs kids, lifestyle, magazines, medical, music, navigation -@docs news, personalization, photo, politics, productivity, security -@docs shopping, social, sports, travel, utilities, weather -@docs custom, annotation_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Manifest", "Category" ] - - -{-| Turn a category into its official String representation, as seen -here: . - -toString: Pages.Manifest.Category.Category -> String --} -toString : Elm.Expression -> Elm.Expression -toString toStringArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "toString" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ] - Type.string - ) - } - ) - [ toStringArg_ ] - - -{-| Creates the described category. - -books: Pages.Manifest.Category.Category --} -books : Elm.Expression -books = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "books" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -business: Pages.Manifest.Category.Category --} -business : Elm.Expression -business = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "business" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -education: Pages.Manifest.Category.Category --} -education : Elm.Expression -education = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "education" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -entertainment: Pages.Manifest.Category.Category --} -entertainment : Elm.Expression -entertainment = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "entertainment" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -finance: Pages.Manifest.Category.Category --} -finance : Elm.Expression -finance = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "finance" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -fitness: Pages.Manifest.Category.Category --} -fitness : Elm.Expression -fitness = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "fitness" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -food: Pages.Manifest.Category.Category --} -food : Elm.Expression -food = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "food" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -games: Pages.Manifest.Category.Category --} -games : Elm.Expression -games = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "games" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -government: Pages.Manifest.Category.Category --} -government : Elm.Expression -government = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "government" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -health: Pages.Manifest.Category.Category --} -health : Elm.Expression -health = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "health" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -kids: Pages.Manifest.Category.Category --} -kids : Elm.Expression -kids = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "kids" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -lifestyle: Pages.Manifest.Category.Category --} -lifestyle : Elm.Expression -lifestyle = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "lifestyle" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -magazines: Pages.Manifest.Category.Category --} -magazines : Elm.Expression -magazines = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "magazines" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -medical: Pages.Manifest.Category.Category --} -medical : Elm.Expression -medical = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "medical" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -music: Pages.Manifest.Category.Category --} -music : Elm.Expression -music = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "music" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -navigation: Pages.Manifest.Category.Category --} -navigation : Elm.Expression -navigation = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "navigation" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -news: Pages.Manifest.Category.Category --} -news : Elm.Expression -news = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "news" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -personalization: Pages.Manifest.Category.Category --} -personalization : Elm.Expression -personalization = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "personalization" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -photo: Pages.Manifest.Category.Category --} -photo : Elm.Expression -photo = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "photo" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -politics: Pages.Manifest.Category.Category --} -politics : Elm.Expression -politics = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "politics" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -productivity: Pages.Manifest.Category.Category --} -productivity : Elm.Expression -productivity = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "productivity" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -security: Pages.Manifest.Category.Category --} -security : Elm.Expression -security = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "security" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -shopping: Pages.Manifest.Category.Category --} -shopping : Elm.Expression -shopping = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "shopping" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -social: Pages.Manifest.Category.Category --} -social : Elm.Expression -social = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "social" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -sports: Pages.Manifest.Category.Category --} -sports : Elm.Expression -sports = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "sports" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -travel: Pages.Manifest.Category.Category --} -travel : Elm.Expression -travel = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "travel" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -utilities: Pages.Manifest.Category.Category --} -utilities : Elm.Expression -utilities = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "utilities" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| Creates the described category. - -weather: Pages.Manifest.Category.Category --} -weather : Elm.Expression -weather = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "weather" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - - -{-| It's best to use the pre-defined categories to ensure that clients (Android, iOS, -Chrome, Windows app store, etc.) are aware of it and can handle it appropriately. -But, if you're confident about using a custom one, you can do so with `Pages.Manifest.custom`. - -custom: String -> Pages.Manifest.Category.Category --} -custom : String -> Elm.Expression -custom customArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "custom" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - ) - } - ) - [ Elm.string customArg_ ] - - -annotation_ : { category : Type.Annotation } -annotation_ = - { category = - Type.namedWith [ "Pages", "Manifest", "Category" ] "Category" [] - } - - -call_ : - { toString : Elm.Expression -> Elm.Expression - , custom : Elm.Expression -> Elm.Expression - } -call_ = - { toString = - \toStringArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "toString" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ] - Type.string - ) - } - ) - [ toStringArg_ ] - , custom = - \customArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "custom" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - ) - } - ) - [ customArg_ ] - } - - -values_ : - { toString : Elm.Expression - , books : Elm.Expression - , business : Elm.Expression - , education : Elm.Expression - , entertainment : Elm.Expression - , finance : Elm.Expression - , fitness : Elm.Expression - , food : Elm.Expression - , games : Elm.Expression - , government : Elm.Expression - , health : Elm.Expression - , kids : Elm.Expression - , lifestyle : Elm.Expression - , magazines : Elm.Expression - , medical : Elm.Expression - , music : Elm.Expression - , navigation : Elm.Expression - , news : Elm.Expression - , personalization : Elm.Expression - , photo : Elm.Expression - , politics : Elm.Expression - , productivity : Elm.Expression - , security : Elm.Expression - , shopping : Elm.Expression - , social : Elm.Expression - , sports : Elm.Expression - , travel : Elm.Expression - , utilities : Elm.Expression - , weather : Elm.Expression - , custom : Elm.Expression - } -values_ = - { toString = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "toString" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ] - Type.string - ) - } - , books = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "books" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , business = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "business" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , education = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "education" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , entertainment = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "entertainment" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , finance = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "finance" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , fitness = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "fitness" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , food = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "food" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , games = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "games" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , government = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "government" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , health = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "health" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , kids = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "kids" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , lifestyle = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "lifestyle" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , magazines = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "magazines" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , medical = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "medical" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , music = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "music" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , navigation = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "navigation" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , news = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "news" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , personalization = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "personalization" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , photo = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "photo" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , politics = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "politics" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , productivity = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "productivity" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , security = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "security" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , shopping = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "shopping" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , social = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "social" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , sports = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "sports" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , travel = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "travel" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , utilities = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "utilities" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , weather = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "weather" - , annotation = - Just - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - } - , custom = - Elm.value - { importFrom = [ "Pages", "Manifest", "Category" ] - , name = "custom" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Pages", "Manifest", "Category" ] - "Category" - [] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Navigation.elm b/codegen/Gen/Pages/Navigation.elm deleted file mode 100644 index 3828e233..00000000 --- a/codegen/Gen/Pages/Navigation.elm +++ /dev/null @@ -1,194 +0,0 @@ -module Gen.Pages.Navigation exposing ( moduleName_, annotation_, make_, caseOf_ ) - -{-| -# Generated bindings for Pages.Navigation - -@docs moduleName_, annotation_, make_, caseOf_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Navigation" ] - - -annotation_ : { navigation : Type.Annotation, loadingState : Type.Annotation } -annotation_ = - { navigation = Type.namedWith [ "Pages", "Navigation" ] "Navigation" [] - , loadingState = Type.namedWith [ "Pages", "Navigation" ] "LoadingState" [] - } - - -make_ : - { submitting : Elm.Expression -> Elm.Expression - , loadAfterSubmit : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , loading : Elm.Expression -> Elm.Expression -> Elm.Expression - , redirecting : Elm.Expression - , load : Elm.Expression - , actionRedirect : Elm.Expression - } -make_ = - { submitting = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Navigation" ] - , name = "Submitting" - , annotation = Just (Type.namedWith [] "Navigation" []) - } - ) - [ ar0 ] - , loadAfterSubmit = - \ar0 ar1 ar2 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Navigation" ] - , name = "LoadAfterSubmit" - , annotation = Just (Type.namedWith [] "Navigation" []) - } - ) - [ ar0, ar1, ar2 ] - , loading = - \ar0 ar1 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Navigation" ] - , name = "Loading" - , annotation = Just (Type.namedWith [] "Navigation" []) - } - ) - [ ar0, ar1 ] - , redirecting = - Elm.value - { importFrom = [ "Pages", "Navigation" ] - , name = "Redirecting" - , annotation = Just (Type.namedWith [] "LoadingState" []) - } - , load = - Elm.value - { importFrom = [ "Pages", "Navigation" ] - , name = "Load" - , annotation = Just (Type.namedWith [] "LoadingState" []) - } - , actionRedirect = - Elm.value - { importFrom = [ "Pages", "Navigation" ] - , name = "ActionRedirect" - , annotation = Just (Type.namedWith [] "LoadingState" []) - } - } - - -caseOf_ = - { navigation = - \navigationExpression navigationTags -> - Elm.Case.custom - navigationExpression - (Type.namedWith [ "Pages", "Navigation" ] "Navigation" []) - [ Elm.Case.branch - (Elm.Arg.customType - "Submitting" - navigationTags.submitting |> Elm.Arg.item - (Elm.Arg.varWith - "pagesFormDataFormData" - (Type.namedWith - [ "Pages" - , "FormData" - ] - "FormData" - [] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "LoadAfterSubmit" - navigationTags.loadAfterSubmit |> Elm.Arg.item - (Elm.Arg.varWith - "pagesFormDataFormData" - (Type.namedWith - [ "Pages" - , "FormData" - ] - "FormData" - [] - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "urlPathUrlPath" - (Type.namedWith - [ "UrlPath" - ] - "UrlPath" - [] - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "pagesNavigationLoadingState" - (Type.namedWith - [ "Pages" - , "Navigation" - ] - "LoadingState" - [] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "Loading" - navigationTags.loading |> Elm.Arg.item - (Elm.Arg.varWith - "urlPathUrlPath" - (Type.namedWith - [ "UrlPath" - ] - "UrlPath" - [] - ) - ) |> Elm.Arg.item - (Elm.Arg.varWith - "pagesNavigationLoadingState" - (Type.namedWith - [ "Pages" - , "Navigation" - ] - "LoadingState" - [] - ) - ) - ) - Basics.identity - ] - , loadingState = - \loadingStateExpression loadingStateTags -> - Elm.Case.custom - loadingStateExpression - (Type.namedWith [ "Pages", "Navigation" ] "LoadingState" []) - [ Elm.Case.branch - (Elm.Arg.customType - "Redirecting" - loadingStateTags.redirecting - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Load" loadingStateTags.load) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "ActionRedirect" - loadingStateTags.actionRedirect - ) - Basics.identity - ] - } \ No newline at end of file diff --git a/codegen/Gen/Pages/PageUrl.elm b/codegen/Gen/Pages/PageUrl.elm deleted file mode 100644 index 56107042..00000000 --- a/codegen/Gen/Pages/PageUrl.elm +++ /dev/null @@ -1,212 +0,0 @@ -module Gen.Pages.PageUrl exposing - ( moduleName_, toUrl, parseQueryParams, annotation_, make_, call_ - , values_ - ) - -{-| -# Generated bindings for Pages.PageUrl - -@docs moduleName_, toUrl, parseQueryParams, annotation_, make_, call_ -@docs values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "PageUrl" ] - - -{-| toUrl: Pages.PageUrl.PageUrl -> Url.Url -} -toUrl : Elm.Expression -> Elm.Expression -toUrl toUrlArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "PageUrl" ] - , name = "toUrl" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Pages", "PageUrl" ] "PageUrl" [] ] - (Type.namedWith [ "Url" ] "Url" []) - ) - } - ) - [ toUrlArg_ ] - - -{-| parseQueryParams: String -> Dict.Dict String (List String) -} -parseQueryParams : String -> Elm.Expression -parseQueryParams parseQueryParamsArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "PageUrl" ] - , name = "parseQueryParams" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.list Type.string ] - ) - ) - } - ) - [ Elm.string parseQueryParamsArg_ ] - - -annotation_ : { pageUrl : Type.Annotation } -annotation_ = - { pageUrl = - Type.alias - moduleName_ - "PageUrl" - [] - (Type.record - [ ( "protocol", Type.namedWith [ "Url" ] "Protocol" [] ) - , ( "host", Type.string ) - , ( "port_", Type.maybe Type.int ) - , ( "path", Type.namedWith [ "UrlPath" ] "UrlPath" [] ) - , ( "query" - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.list Type.string ] - ) - , ( "fragment", Type.maybe Type.string ) - ] - ) - } - - -make_ : - { pageUrl : - { protocol : Elm.Expression - , host : Elm.Expression - , port_ : Elm.Expression - , path : Elm.Expression - , query : Elm.Expression - , fragment : Elm.Expression - } - -> Elm.Expression - } -make_ = - { pageUrl = - \pageUrl_args -> - Elm.withType - (Type.alias - [ "Pages", "PageUrl" ] - "PageUrl" - [] - (Type.record - [ ( "protocol" - , Type.namedWith [ "Url" ] "Protocol" [] - ) - , ( "host", Type.string ) - , ( "port_", Type.maybe Type.int ) - , ( "path" - , Type.namedWith [ "UrlPath" ] "UrlPath" [] - ) - , ( "query" - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.list Type.string ] - ) - , ( "fragment", Type.maybe Type.string ) - ] - ) - ) - (Elm.record - [ Tuple.pair "protocol" pageUrl_args.protocol - , Tuple.pair "host" pageUrl_args.host - , Tuple.pair "port_" pageUrl_args.port_ - , Tuple.pair "path" pageUrl_args.path - , Tuple.pair "query" pageUrl_args.query - , Tuple.pair "fragment" pageUrl_args.fragment - ] - ) - } - - -call_ : - { toUrl : Elm.Expression -> Elm.Expression - , parseQueryParams : Elm.Expression -> Elm.Expression - } -call_ = - { toUrl = - \toUrlArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "PageUrl" ] - , name = "toUrl" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "PageUrl" ] - "PageUrl" - [] - ] - (Type.namedWith [ "Url" ] "Url" []) - ) - } - ) - [ toUrlArg_ ] - , parseQueryParams = - \parseQueryParamsArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "PageUrl" ] - , name = "parseQueryParams" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.list Type.string ] - ) - ) - } - ) - [ parseQueryParamsArg_ ] - } - - -values_ : { toUrl : Elm.Expression, parseQueryParams : Elm.Expression } -values_ = - { toUrl = - Elm.value - { importFrom = [ "Pages", "PageUrl" ] - , name = "toUrl" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Pages", "PageUrl" ] "PageUrl" [] ] - (Type.namedWith [ "Url" ] "Url" []) - ) - } - , parseQueryParams = - Elm.value - { importFrom = [ "Pages", "PageUrl" ] - , name = "parseQueryParams" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.list Type.string ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Script.elm b/codegen/Gen/Pages/Script.elm deleted file mode 100644 index 598b6eff..00000000 --- a/codegen/Gen/Pages/Script.elm +++ /dev/null @@ -1,1063 +0,0 @@ -module Gen.Pages.Script exposing - ( moduleName_, withCliOptions, withoutCliOptions, writeFile, command, exec - , log, sleep, doThen, which, expectWhich, question, annotation_ - , make_, caseOf_, call_, values_ - ) - -{-| -# Generated bindings for Pages.Script - -@docs moduleName_, withCliOptions, withoutCliOptions, writeFile, command, exec -@docs log, sleep, doThen, which, expectWhich, question -@docs annotation_, make_, caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Script" ] - - -{-| Same as [`withoutCliOptions`](#withoutCliOptions), but allows you to define a CLI Options Parser so the user can -pass in additional options for the script. - -Uses . - -Read more at . - -withCliOptions: - Cli.Program.Config cliOptions - -> (cliOptions -> BackendTask.BackendTask FatalError.FatalError ()) - -> Pages.Script.Script --} -withCliOptions : - Elm.Expression -> (Elm.Expression -> Elm.Expression) -> Elm.Expression -withCliOptions withCliOptionsArg_ withCliOptionsArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "withCliOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Cli", "Program" ] - "Config" - [ Type.var "cliOptions" ] - , Type.function - [ Type.var "cliOptions" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.unit - ] - ) - ] - (Type.namedWith [ "Pages", "Script" ] "Script" []) - ) - } - ) - [ withCliOptionsArg_ - , Elm.functionReduced "withCliOptionsUnpack" withCliOptionsArg_0 - ] - - -{-| Define a simple Script (no CLI Options). - - module MyScript exposing (run) - - import BackendTask - import Pages.Script as Script - - run = - Script.withoutCliOptions - (Script.log "Hello!" - |> BackendTask.allowFatal - ) - -withoutCliOptions: BackendTask.BackendTask FatalError.FatalError () -> Pages.Script.Script --} -withoutCliOptions : Elm.Expression -> Elm.Expression -withoutCliOptions withoutCliOptionsArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "withoutCliOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.unit - ] - ] - (Type.namedWith [ "Pages", "Script" ] "Script" []) - ) - } - ) - [ withoutCliOptionsArg_ ] - - -{-| Write a file to the file system. - -File paths are relative to the root of your `elm-pages` project (next to the `elm.json` file and `src/` directory), or you can pass in absolute paths beginning with a `/`. - - module MyScript exposing (run) - - import BackendTask - import Pages.Script as Script - - run = - Script.withoutCliOptions - (Script.writeFile - { path = "hello.json" - , body = """{ "message": "Hello, World!" }""" - } - |> BackendTask.allowFatal - ) - -writeFile: - { path : String, body : String } - -> BackendTask.BackendTask { fatal : FatalError.FatalError - , recoverable : Pages.Script.Error - } () --} -writeFile : { path : String, body : String } -> Elm.Expression -writeFile writeFileArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "writeFile" - , annotation = - Just - (Type.function - [ Type.record - [ ( "path", Type.string ) - , ( "body", Type.string ) - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "Pages", "Script" ] - "Error" - [] - ) - ] - , Type.unit - ] - ) - ) - } - ) - [ Elm.record - [ Tuple.pair "path" (Elm.string writeFileArg_.path) - , Tuple.pair "body" (Elm.string writeFileArg_.body) - ] - ] - - -{-| Run a single command and return stderr and stdout combined as a single String. - -If you want to do more advanced things like piping together multiple commands in a pipeline, or piping in a file to a command, etc., see the [`Stream`](BackendTask-Stream) module. - - module MyScript exposing (run) - - import BackendTask - import Pages.Script as Script exposing (Script) - - run : Script - run = - Script.withoutCliOptions - (Script.command "ls" [] - |> BackendTask.andThen - (\files -> - Script.log ("Files: " ++ files) - ) - ) - -command: String -> List String -> BackendTask.BackendTask FatalError.FatalError String --} -command : String -> List String -> Elm.Expression -command commandArg_ commandArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "command" - , annotation = - Just - (Type.function - [ Type.string, Type.list Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.string - ] - ) - ) - } - ) - [ Elm.string commandArg_, Elm.list (List.map Elm.string commandArg_0) ] - - -{-| Like [`command`](#command), but prints stderr and stdout to the console as the command runs instead of capturing them. - - module MyScript exposing (run) - - import BackendTask - import Pages.Script as Script exposing (Script) - - run : Script - run = - Script.withoutCliOptions - (Script.exec "ls" []) - -exec: String -> List String -> BackendTask.BackendTask FatalError.FatalError () --} -exec : String -> List String -> Elm.Expression -exec execArg_ execArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "exec" - , annotation = - Just - (Type.function - [ Type.string, Type.list Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.unit - ] - ) - ) - } - ) - [ Elm.string execArg_, Elm.list (List.map Elm.string execArg_0) ] - - -{-| Log to stdout. - - module MyScript exposing (run) - - import BackendTask - import Pages.Script as Script - - run = - Script.withoutCliOptions - (Script.log "Hello!" - |> BackendTask.allowFatal - ) - -log: String -> BackendTask.BackendTask error () --} -log : String -> Elm.Expression -log logArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "log" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.unit ] - ) - ) - } - ) - [ Elm.string logArg_ ] - - -{-| Sleep for a number of milliseconds. - - module MyScript exposing (run) - - import BackendTask - import Pages.Script as Script - - run = - Script.withoutCliOptions - (Script.log "Hello..." - |> Script.doThen - (Script.sleep 1000) - |> Script.doThen - (Script.log "World!") - ) - -sleep: Int -> BackendTask.BackendTask error () --} -sleep : Int -> Elm.Expression -sleep sleepArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "sleep" - , annotation = - Just - (Type.function - [ Type.int ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.unit ] - ) - ) - } - ) - [ Elm.int sleepArg_ ] - - -{-| Run a command with no output, then run another command. - - module MyScript exposing (run) - - import BackendTask - import Pages.Script as Script - - run = - Script.withoutCliOptions - (Script.log "Hello!" - |> Script.doThen - (Script.log "World!") - ) - -doThen: - BackendTask.BackendTask error value - -> BackendTask.BackendTask error () - -> BackendTask.BackendTask error value --} -doThen : Elm.Expression -> Elm.Expression -> Elm.Expression -doThen doThenArg_ doThenArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "doThen" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.unit ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - ) - [ doThenArg_, doThenArg_0 ] - - -{-| Same as [`expectWhich`](#expectWhich), but returns `Nothing` if the command is not found instead of failing with a [`FatalError`](FatalError). - -which: String -> BackendTask.BackendTask error (Maybe String) --} -which : String -> Elm.Expression -which whichArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "which" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.maybe Type.string ] - ) - ) - } - ) - [ Elm.string whichArg_ ] - - -{-| Check if a command is available on the system. If it is, return the full path to the command, otherwise fail with a [`FatalError`](FatalError). - - module MyScript exposing (run) - - import BackendTask - import Pages.Script as Script - - run : Script - run = - Script.withoutCliOptions - (Script.expectWhich "elm-review" - |> BackendTask.andThen - (\path -> - Script.log ("The path to `elm-review` is: " ++ path) - ) - ) - -If you run it with a command that is not available, you will see an error like this: - - Script.expectWhich "hype-script" - -```shell --- COMMAND NOT FOUND --------------- -I expected to find `hype-script`, but it was not on your PATH. Make sure it is installed and included in your PATH. -``` - -expectWhich: String -> BackendTask.BackendTask FatalError.FatalError String --} -expectWhich : String -> Elm.Expression -expectWhich expectWhichArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "expectWhich" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.string - ] - ) - ) - } - ) - [ Elm.string expectWhichArg_ ] - - -{-| module QuestionDemo exposing (run) - - import BackendTask - - run : Script - run = - Script.withoutCliOptions - (Script.question "What is your name? " - |> BackendTask.andThen - (\name -> - Script.log ("Hello, " ++ name ++ "!") - ) - ) - -question: String -> BackendTask.BackendTask error String --} -question : String -> Elm.Expression -question questionArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "question" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.string ] - ) - ) - } - ) - [ Elm.string questionArg_ ] - - -annotation_ : { script : Type.Annotation, error : Type.Annotation } -annotation_ = - { script = - Type.alias - moduleName_ - "Script" - [] - (Type.namedWith [ "Pages", "Internal", "Script" ] "Script" []) - , error = Type.namedWith [ "Pages", "Script" ] "Error" [] - } - - -make_ : { fileWriteError : Elm.Expression } -make_ = - { fileWriteError = - Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "FileWriteError" - , annotation = Just (Type.namedWith [] "Error" []) - } - } - - -caseOf_ : - { error : - Elm.Expression -> { fileWriteError : Elm.Expression } -> Elm.Expression - } -caseOf_ = - { error = - \errorExpression errorTags -> - Elm.Case.custom - errorExpression - (Type.namedWith [ "Pages", "Script" ] "Error" []) - [ Elm.Case.branch - (Elm.Arg.customType - "FileWriteError" - errorTags.fileWriteError - ) - Basics.identity - ] - } - - -call_ : - { withCliOptions : Elm.Expression -> Elm.Expression -> Elm.Expression - , withoutCliOptions : Elm.Expression -> Elm.Expression - , writeFile : Elm.Expression -> Elm.Expression - , command : Elm.Expression -> Elm.Expression -> Elm.Expression - , exec : Elm.Expression -> Elm.Expression -> Elm.Expression - , log : Elm.Expression -> Elm.Expression - , sleep : Elm.Expression -> Elm.Expression - , doThen : Elm.Expression -> Elm.Expression -> Elm.Expression - , which : Elm.Expression -> Elm.Expression - , expectWhich : Elm.Expression -> Elm.Expression - , question : Elm.Expression -> Elm.Expression - } -call_ = - { withCliOptions = - \withCliOptionsArg_ withCliOptionsArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "withCliOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Cli", "Program" ] - "Config" - [ Type.var "cliOptions" ] - , Type.function - [ Type.var "cliOptions" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.unit - ] - ) - ] - (Type.namedWith - [ "Pages", "Script" ] - "Script" - [] - ) - ) - } - ) - [ withCliOptionsArg_, withCliOptionsArg_0 ] - , withoutCliOptions = - \withoutCliOptionsArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "withoutCliOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.unit - ] - ] - (Type.namedWith - [ "Pages", "Script" ] - "Script" - [] - ) - ) - } - ) - [ withoutCliOptionsArg_ ] - , writeFile = - \writeFileArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "writeFile" - , annotation = - Just - (Type.function - [ Type.record - [ ( "path", Type.string ) - , ( "body", Type.string ) - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "Pages", "Script" ] - "Error" - [] - ) - ] - , Type.unit - ] - ) - ) - } - ) - [ writeFileArg_ ] - , command = - \commandArg_ commandArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "command" - , annotation = - Just - (Type.function - [ Type.string, Type.list Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.string - ] - ) - ) - } - ) - [ commandArg_, commandArg_0 ] - , exec = - \execArg_ execArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "exec" - , annotation = - Just - (Type.function - [ Type.string, Type.list Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.unit - ] - ) - ) - } - ) - [ execArg_, execArg_0 ] - , log = - \logArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "log" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.unit ] - ) - ) - } - ) - [ logArg_ ] - , sleep = - \sleepArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "sleep" - , annotation = - Just - (Type.function - [ Type.int ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.unit ] - ) - ) - } - ) - [ sleepArg_ ] - , doThen = - \doThenArg_ doThenArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "doThen" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.unit ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - ) - [ doThenArg_, doThenArg_0 ] - , which = - \whichArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "which" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.maybe Type.string - ] - ) - ) - } - ) - [ whichArg_ ] - , expectWhich = - \expectWhichArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "expectWhich" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.string - ] - ) - ) - } - ) - [ expectWhichArg_ ] - , question = - \questionArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "question" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.string ] - ) - ) - } - ) - [ questionArg_ ] - } - - -values_ : - { withCliOptions : Elm.Expression - , withoutCliOptions : Elm.Expression - , writeFile : Elm.Expression - , command : Elm.Expression - , exec : Elm.Expression - , log : Elm.Expression - , sleep : Elm.Expression - , doThen : Elm.Expression - , which : Elm.Expression - , expectWhich : Elm.Expression - , question : Elm.Expression - } -values_ = - { withCliOptions = - Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "withCliOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Cli", "Program" ] - "Config" - [ Type.var "cliOptions" ] - , Type.function - [ Type.var "cliOptions" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.unit - ] - ) - ] - (Type.namedWith [ "Pages", "Script" ] "Script" []) - ) - } - , withoutCliOptions = - Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "withoutCliOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.unit - ] - ] - (Type.namedWith [ "Pages", "Script" ] "Script" []) - ) - } - , writeFile = - Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "writeFile" - , annotation = - Just - (Type.function - [ Type.record - [ ( "path", Type.string ) - , ( "body", Type.string ) - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.record - [ ( "fatal" - , Type.namedWith - [ "FatalError" ] - "FatalError" - [] - ) - , ( "recoverable" - , Type.namedWith - [ "Pages", "Script" ] - "Error" - [] - ) - ] - , Type.unit - ] - ) - ) - } - , command = - Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "command" - , annotation = - Just - (Type.function - [ Type.string, Type.list Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.string - ] - ) - ) - } - , exec = - Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "exec" - , annotation = - Just - (Type.function - [ Type.string, Type.list Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.unit - ] - ) - ) - } - , log = - Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "log" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.unit ] - ) - ) - } - , sleep = - Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "sleep" - , annotation = - Just - (Type.function - [ Type.int ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.unit ] - ) - ) - } - , doThen = - Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "doThen" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.unit ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - , which = - Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "which" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.maybe Type.string ] - ) - ) - } - , expectWhich = - Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "expectWhich" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.string - ] - ) - ) - } - , question = - Elm.value - { importFrom = [ "Pages", "Script" ] - , name = "question" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.string ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Script/Spinner.elm b/codegen/Gen/Pages/Script/Spinner.elm deleted file mode 100644 index 98877f11..00000000 --- a/codegen/Gen/Pages/Script/Spinner.elm +++ /dev/null @@ -1,1230 +0,0 @@ -module Gen.Pages.Script.Spinner exposing - ( moduleName_, steps, withStep, withStepWithOptions, runSteps, options - , withOnCompletion, runTask, runTaskWithOptions, showStep, runSpinnerWithTask, annotation_, make_ - , caseOf_, call_, values_ - ) - -{-| -# Generated bindings for Pages.Script.Spinner - -@docs moduleName_, steps, withStep, withStepWithOptions, runSteps, options -@docs withOnCompletion, runTask, runTaskWithOptions, showStep, runSpinnerWithTask, annotation_ -@docs make_, caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Script", "Spinner" ] - - -{-| Initialize an empty series of `Steps`. - -steps: Pages.Script.Spinner.Steps FatalError.FatalError () --} -steps : Elm.Expression -steps = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "steps" - , annotation = - Just - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.unit - ] - ) - } - - -{-| Add a `Step`. See [`withStepWithOptions`](#withStepWithOptions) to configure the step's spinner. - -withStep: - String - -> (oldValue -> BackendTask.BackendTask FatalError.FatalError newValue) - -> Pages.Script.Spinner.Steps FatalError.FatalError oldValue - -> Pages.Script.Spinner.Steps FatalError.FatalError newValue --} -withStep : - String - -> (Elm.Expression -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression -withStep withStepArg_ withStepArg_0 withStepArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "withStep" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.var "oldValue" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "newValue" - ] - ) - , Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "oldValue" - ] - ] - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "newValue" - ] - ) - ) - } - ) - [ Elm.string withStepArg_ - , Elm.functionReduced "withStepUnpack" withStepArg_0 - , withStepArg_1 - ] - - -{-| Add a step with custom [`Options`](#Options). - -withStepWithOptions: - Pages.Script.Spinner.Options FatalError.FatalError newValue - -> (oldValue -> BackendTask.BackendTask FatalError.FatalError newValue) - -> Pages.Script.Spinner.Steps FatalError.FatalError oldValue - -> Pages.Script.Spinner.Steps FatalError.FatalError newValue --} -withStepWithOptions : - Elm.Expression - -> (Elm.Expression -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression -withStepWithOptions withStepWithOptionsArg_ withStepWithOptionsArg_0 withStepWithOptionsArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "withStepWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "newValue" - ] - , Type.function - [ Type.var "oldValue" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "newValue" - ] - ) - , Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "oldValue" - ] - ] - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "newValue" - ] - ) - ) - } - ) - [ withStepWithOptionsArg_ - , Elm.functionReduced - "withStepWithOptionsUnpack" - withStepWithOptionsArg_0 - , withStepWithOptionsArg_1 - ] - - -{-| Perform the `Steps` in sequence. - -runSteps: - Pages.Script.Spinner.Steps FatalError.FatalError value - -> BackendTask.BackendTask FatalError.FatalError value --} -runSteps : Elm.Expression -> Elm.Expression -runSteps runStepsArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "runSteps" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "value" - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "value" - ] - ) - ) - } - ) - [ runStepsArg_ ] - - -{-| The default options for a spinner. The spinner `text` is a required argument and will be displayed as the step name. - - import Pages.Script.Spinner as Spinner - - example = - Spinner.options "Compile Main.elm" - -options: String -> Pages.Script.Spinner.Options error value --} -options : String -> Elm.Expression -options optionsArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "options" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - ) - ) - } - ) - [ Elm.string optionsArg_ ] - - -{-| Set the completion icon and text based on the result of the task. - - import Pages.Script.Spinner as Spinner - - example = - Spinner.options "Fetching data" - |> Spinner.withOnCompletion - (\result -> - case result of - Ok _ -> - ( Spinner.Succeed, "Fetched data!" ) - - Err _ -> - ( Spinner.Fail - , Just "Could not fetch data." - ) - ) - -withOnCompletion: - (Result.Result error value - -> ( Pages.Script.Spinner.CompletionIcon, Maybe String )) - -> Pages.Script.Spinner.Options error value - -> Pages.Script.Spinner.Options error value --} -withOnCompletion : - (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -withOnCompletion withOnCompletionArg_ withOnCompletionArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "withOnCompletion" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.var "error", Type.var "value" ] - ] - (Type.tuple - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "CompletionIcon" - [] - ) - (Type.maybe Type.string) - ) - , Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - ) - ) - } - ) - [ Elm.functionReduced "withOnCompletionUnpack" withOnCompletionArg_ - , withOnCompletionArg_0 - ] - - -{-| Run a `BackendTask` with a spinner. The spinner will show a success icon if the task succeeds, and a failure icon if the task fails. - -It's often easier to use [`steps`](#steps) when possible. - - module SequentialSteps exposing (run) - - import Pages.Script as Script exposing (Script, doThen, sleep) - import Pages.Script.Spinner as Spinner - - - run : Script - run = - Script.withoutCliOptions - (sleep 3000 - |> Spinner.runTask "Step 1..." - |> doThen - (sleep 3000 - |> Spinner.runTask "Step 2..." - |> doThen - (sleep 3000 - |> Spinner.runTask "Step 3..." - ) - ) - ) - -runTask: - String - -> BackendTask.BackendTask error value - -> BackendTask.BackendTask error value --} -runTask : String -> Elm.Expression -> Elm.Expression -runTask runTaskArg_ runTaskArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "runTask" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - ) - [ Elm.string runTaskArg_, runTaskArg_0 ] - - -{-| runTaskWithOptions: - Pages.Script.Spinner.Options error value - -> BackendTask.BackendTask error value - -> BackendTask.BackendTask error value --} -runTaskWithOptions : Elm.Expression -> Elm.Expression -> Elm.Expression -runTaskWithOptions runTaskWithOptionsArg_ runTaskWithOptionsArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "runTaskWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - ) - [ runTaskWithOptionsArg_, runTaskWithOptionsArg_0 ] - - -{-| `showStep` gives you a `Spinner` reference which you can use to start the spinner later with `runSpinnerWithTask`. - -Most use cases can be achieved more easily using more high-level helpers, like [`runTask`](#runTask) or [`steps`](#steps). -`showStep` can be useful if you have more dynamic steps that you want to reveal over time. - - module ShowStepDemo exposing (run) - - import BackendTask exposing (BackendTask) - import Pages.Script as Script exposing (Script, doThen, sleep) - import Pages.Script.Spinner as Spinner - - run : Script - run = - Script.withoutCliOptions - (BackendTask.succeed - (\spinner1 spinner2 spinner3 -> - sleep 3000 - |> Spinner.runSpinnerWithTask spinner1 - |> doThen - (sleep 3000 - |> Spinner.runSpinnerWithTask spinner2 - |> doThen - (sleep 3000 - |> Spinner.runSpinnerWithTask spinner3 - ) - ) - ) - |> BackendTask.andMap - (Spinner.options "Step 1" |> Spinner.showStep) - |> BackendTask.andMap - (Spinner.options "Step 2" |> Spinner.showStep) - |> BackendTask.andMap - (Spinner.options "Step 3" |> Spinner.showStep) - |> BackendTask.andThen identity - ) - -showStep: - Pages.Script.Spinner.Options error value - -> BackendTask.BackendTask error (Pages.Script.Spinner.Spinner error value) --} -showStep : Elm.Expression -> Elm.Expression -showStep showStepArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "showStep" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Spinner" - [ Type.var "error", Type.var "value" ] - ] - ) - ) - } - ) - [ showStepArg_ ] - - -{-| After calling `showStep` to get a reference to a `Spinner`, use `runSpinnerWithTask` to run a `BackendTask` and show a failure or success -completion status once it is done. - -runSpinnerWithTask: - Pages.Script.Spinner.Spinner error value - -> BackendTask.BackendTask error value - -> BackendTask.BackendTask error value --} -runSpinnerWithTask : Elm.Expression -> Elm.Expression -> Elm.Expression -runSpinnerWithTask runSpinnerWithTaskArg_ runSpinnerWithTaskArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "runSpinnerWithTask" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Spinner" - [ Type.var "error", Type.var "value" ] - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - ) - [ runSpinnerWithTaskArg_, runSpinnerWithTaskArg_0 ] - - -annotation_ : - { steps : Type.Annotation -> Type.Annotation -> Type.Annotation - , options : Type.Annotation -> Type.Annotation -> Type.Annotation - , completionIcon : Type.Annotation - , spinner : Type.Annotation -> Type.Annotation -> Type.Annotation - } -annotation_ = - { steps = - \stepsArg0 stepsArg1 -> - Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ stepsArg0, stepsArg1 ] - , options = - \optionsArg0 optionsArg1 -> - Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ optionsArg0, optionsArg1 ] - , completionIcon = - Type.namedWith [ "Pages", "Script", "Spinner" ] "CompletionIcon" [] - , spinner = - \spinnerArg0 spinnerArg1 -> - Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Spinner" - [ spinnerArg0, spinnerArg1 ] - } - - -make_ : - { steps : Elm.Expression -> Elm.Expression - , succeed : Elm.Expression - , fail : Elm.Expression - , warn : Elm.Expression - , info : Elm.Expression - } -make_ = - { steps = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "Steps" - , annotation = - Just - (Type.namedWith - [] - "Steps" - [ Type.var "error", Type.var "value" ] - ) - } - ) - [ ar0 ] - , succeed = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "Succeed" - , annotation = Just (Type.namedWith [] "CompletionIcon" []) - } - , fail = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "Fail" - , annotation = Just (Type.namedWith [] "CompletionIcon" []) - } - , warn = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "Warn" - , annotation = Just (Type.namedWith [] "CompletionIcon" []) - } - , info = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "Info" - , annotation = Just (Type.namedWith [] "CompletionIcon" []) - } - } - - -caseOf_ : - { steps : - Elm.Expression - -> { steps : Elm.Expression -> Elm.Expression } - -> Elm.Expression - , completionIcon : - Elm.Expression - -> { succeed : Elm.Expression - , fail : Elm.Expression - , warn : Elm.Expression - , info : Elm.Expression - } - -> Elm.Expression - } -caseOf_ = - { steps = - \stepsExpression stepsTags -> - Elm.Case.custom - stepsExpression - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.var "error", Type.var "value" ] - ) - [ Elm.Case.branch - (Elm.Arg.customType "Steps" stepsTags.steps |> Elm.Arg.item - (Elm.Arg.varWith - "backendTaskBackendTask" - (Type.namedWith - [ "BackendTask" - ] - "BackendTask" - [ Type.var - "error" - , Type.var - "value" - ] - ) - ) - ) - Basics.identity - ] - , completionIcon = - \completionIconExpression completionIconTags -> - Elm.Case.custom - completionIconExpression - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "CompletionIcon" - [] - ) - [ Elm.Case.branch - (Elm.Arg.customType "Succeed" completionIconTags.succeed) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Fail" completionIconTags.fail) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Warn" completionIconTags.warn) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Info" completionIconTags.info) - Basics.identity - ] - } - - -call_ : - { withStep : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , withStepWithOptions : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , runSteps : Elm.Expression -> Elm.Expression - , options : Elm.Expression -> Elm.Expression - , withOnCompletion : Elm.Expression -> Elm.Expression -> Elm.Expression - , runTask : Elm.Expression -> Elm.Expression -> Elm.Expression - , runTaskWithOptions : Elm.Expression -> Elm.Expression -> Elm.Expression - , showStep : Elm.Expression -> Elm.Expression - , runSpinnerWithTask : Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { withStep = - \withStepArg_ withStepArg_0 withStepArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "withStep" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.var "oldValue" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "newValue" - ] - ) - , Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "oldValue" - ] - ] - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "newValue" - ] - ) - ) - } - ) - [ withStepArg_, withStepArg_0, withStepArg_1 ] - , withStepWithOptions = - \withStepWithOptionsArg_ withStepWithOptionsArg_0 withStepWithOptionsArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "withStepWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "newValue" - ] - , Type.function - [ Type.var "oldValue" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "newValue" - ] - ) - , Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "oldValue" - ] - ] - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "newValue" - ] - ) - ) - } - ) - [ withStepWithOptionsArg_ - , withStepWithOptionsArg_0 - , withStepWithOptionsArg_1 - ] - , runSteps = - \runStepsArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "runSteps" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "value" - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "value" - ] - ) - ) - } - ) - [ runStepsArg_ ] - , options = - \optionsArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "options" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - ) - ) - } - ) - [ optionsArg_ ] - , withOnCompletion = - \withOnCompletionArg_ withOnCompletionArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "withOnCompletion" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.var "error" - , Type.var "value" - ] - ] - (Type.tuple - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "CompletionIcon" - [] - ) - (Type.maybe Type.string) - ) - , Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - ) - ) - } - ) - [ withOnCompletionArg_, withOnCompletionArg_0 ] - , runTask = - \runTaskArg_ runTaskArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "runTask" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - ) - [ runTaskArg_, runTaskArg_0 ] - , runTaskWithOptions = - \runTaskWithOptionsArg_ runTaskWithOptionsArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "runTaskWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - ) - [ runTaskWithOptionsArg_, runTaskWithOptionsArg_0 ] - , showStep = - \showStepArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "showStep" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Spinner" - [ Type.var "error" - , Type.var "value" - ] - ] - ) - ) - } - ) - [ showStepArg_ ] - , runSpinnerWithTask = - \runSpinnerWithTaskArg_ runSpinnerWithTaskArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "runSpinnerWithTask" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Spinner" - [ Type.var "error", Type.var "value" ] - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - ) - [ runSpinnerWithTaskArg_, runSpinnerWithTaskArg_0 ] - } - - -values_ : - { steps : Elm.Expression - , withStep : Elm.Expression - , withStepWithOptions : Elm.Expression - , runSteps : Elm.Expression - , options : Elm.Expression - , withOnCompletion : Elm.Expression - , runTask : Elm.Expression - , runTaskWithOptions : Elm.Expression - , showStep : Elm.Expression - , runSpinnerWithTask : Elm.Expression - } -values_ = - { steps = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "steps" - , annotation = - Just - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.unit - ] - ) - } - , withStep = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "withStep" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.var "oldValue" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "newValue" - ] - ) - , Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "oldValue" - ] - ] - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "newValue" - ] - ) - ) - } - , withStepWithOptions = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "withStepWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "newValue" - ] - , Type.function - [ Type.var "oldValue" ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.var "newValue" - ] - ) - , Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "oldValue" - ] - ] - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "newValue" - ] - ) - ) - } - , runSteps = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "runSteps" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Steps" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "value" - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith [ "FatalError" ] "FatalError" [] - , Type.var "value" - ] - ) - ) - } - , options = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "options" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - ) - ) - } - , withOnCompletion = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "withOnCompletion" - , annotation = - Just - (Type.function - [ Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.var "error", Type.var "value" ] - ] - (Type.tuple - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "CompletionIcon" - [] - ) - (Type.maybe Type.string) - ) - , Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - ) - ) - } - , runTask = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "runTask" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - , runTaskWithOptions = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "runTaskWithOptions" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - , showStep = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "showStep" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Options" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Spinner" - [ Type.var "error", Type.var "value" ] - ] - ) - ) - } - , runSpinnerWithTask = - Elm.value - { importFrom = [ "Pages", "Script", "Spinner" ] - , name = "runSpinnerWithTask" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Script", "Spinner" ] - "Spinner" - [ Type.var "error", Type.var "value" ] - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.var "value" ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Pages/Url.elm b/codegen/Gen/Pages/Url.elm deleted file mode 100644 index afb27878..00000000 --- a/codegen/Gen/Pages/Url.elm +++ /dev/null @@ -1,228 +0,0 @@ -module Gen.Pages.Url exposing - ( moduleName_, external, fromPath, toAbsoluteUrl, toString, annotation_ - , call_, values_ - ) - -{-| -# Generated bindings for Pages.Url - -@docs moduleName_, external, fromPath, toAbsoluteUrl, toString, annotation_ -@docs call_, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Pages", "Url" ] - - -{-| external: String -> Pages.Url.Url -} -external : String -> Elm.Expression -external externalArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Url" ] - , name = "external" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Pages", "Url" ] "Url" []) - ) - } - ) - [ Elm.string externalArg_ ] - - -{-| fromPath: UrlPath.UrlPath -> Pages.Url.Url -} -fromPath : Elm.Expression -> Elm.Expression -fromPath fromPathArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Url" ] - , name = "fromPath" - , annotation = - Just - (Type.function - [ Type.namedWith [ "UrlPath" ] "UrlPath" [] ] - (Type.namedWith [ "Pages", "Url" ] "Url" []) - ) - } - ) - [ fromPathArg_ ] - - -{-| toAbsoluteUrl: String -> Pages.Url.Url -> String -} -toAbsoluteUrl : String -> Elm.Expression -> Elm.Expression -toAbsoluteUrl toAbsoluteUrlArg_ toAbsoluteUrlArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Url" ] - , name = "toAbsoluteUrl" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Pages", "Url" ] "Url" [] - ] - Type.string - ) - } - ) - [ Elm.string toAbsoluteUrlArg_, toAbsoluteUrlArg_0 ] - - -{-| toString: Pages.Url.Url -> String -} -toString : Elm.Expression -> Elm.Expression -toString toStringArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Url" ] - , name = "toString" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Pages", "Url" ] "Url" [] ] - Type.string - ) - } - ) - [ toStringArg_ ] - - -annotation_ : { url : Type.Annotation } -annotation_ = - { url = Type.namedWith [ "Pages", "Url" ] "Url" [] } - - -call_ : - { external : Elm.Expression -> Elm.Expression - , fromPath : Elm.Expression -> Elm.Expression - , toAbsoluteUrl : Elm.Expression -> Elm.Expression -> Elm.Expression - , toString : Elm.Expression -> Elm.Expression - } -call_ = - { external = - \externalArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Url" ] - , name = "external" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Pages", "Url" ] "Url" []) - ) - } - ) - [ externalArg_ ] - , fromPath = - \fromPathArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Url" ] - , name = "fromPath" - , annotation = - Just - (Type.function - [ Type.namedWith [ "UrlPath" ] "UrlPath" [] ] - (Type.namedWith [ "Pages", "Url" ] "Url" []) - ) - } - ) - [ fromPathArg_ ] - , toAbsoluteUrl = - \toAbsoluteUrlArg_ toAbsoluteUrlArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Url" ] - , name = "toAbsoluteUrl" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Pages", "Url" ] "Url" [] - ] - Type.string - ) - } - ) - [ toAbsoluteUrlArg_, toAbsoluteUrlArg_0 ] - , toString = - \toStringArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Pages", "Url" ] - , name = "toString" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Pages", "Url" ] "Url" [] ] - Type.string - ) - } - ) - [ toStringArg_ ] - } - - -values_ : - { external : Elm.Expression - , fromPath : Elm.Expression - , toAbsoluteUrl : Elm.Expression - , toString : Elm.Expression - } -values_ = - { external = - Elm.value - { importFrom = [ "Pages", "Url" ] - , name = "external" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Pages", "Url" ] "Url" []) - ) - } - , fromPath = - Elm.value - { importFrom = [ "Pages", "Url" ] - , name = "fromPath" - , annotation = - Just - (Type.function - [ Type.namedWith [ "UrlPath" ] "UrlPath" [] ] - (Type.namedWith [ "Pages", "Url" ] "Url" []) - ) - } - , toAbsoluteUrl = - Elm.value - { importFrom = [ "Pages", "Url" ] - , name = "toAbsoluteUrl" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Pages", "Url" ] "Url" [] - ] - Type.string - ) - } - , toString = - Elm.value - { importFrom = [ "Pages", "Url" ] - , name = "toString" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Pages", "Url" ] "Url" [] ] - Type.string - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/PagesMsg.elm b/codegen/Gen/PagesMsg.elm deleted file mode 100644 index 0f7dea25..00000000 --- a/codegen/Gen/PagesMsg.elm +++ /dev/null @@ -1,250 +0,0 @@ -module Gen.PagesMsg exposing - ( moduleName_, fromMsg, map, noOp, annotation_, call_ - , values_ - ) - -{-| -# Generated bindings for PagesMsg - -@docs moduleName_, fromMsg, map, noOp, annotation_, call_ -@docs values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "PagesMsg" ] - - -{-| import Form - import Pages.Form - import PagesMsg exposing (PagesMsg) - - type Msg - = ToggleMenu - - view : - Maybe PageUrl - -> Shared.Model - -> Model - -> App Data ActionData RouteParams - -> View (PagesMsg Msg) - view maybeUrl sharedModel model app = - { title = "My Page" - , view = - [ button - -- we need to wrap our Route module's `Msg` here so we have a `PagesMsg Msg` - [ onClick (PagesMsg.fromMsg ToggleMenu) ] - [] - - -- `Pages.Form.renderHtml` gives us `Html (PagesMsg msg)`, so we don't need to wrap its Msg type - , logoutForm - |> Pages.Form.renderHtml [] - Pages.Form.Serial - (Form.options "logout" - |> Form.withOnSubmit (\_ -> NewItemSubmitted) - ) - app - ] - } - -fromMsg: userMsg -> PagesMsg.PagesMsg userMsg --} -fromMsg : Elm.Expression -> Elm.Expression -fromMsg fromMsgArg_ = - Elm.apply - (Elm.value - { importFrom = [ "PagesMsg" ] - , name = "fromMsg" - , annotation = - Just - (Type.function - [ Type.var "userMsg" ] - (Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ) - ) - } - ) - [ fromMsgArg_ ] - - -{-| map: (a -> b) -> PagesMsg.PagesMsg a -> PagesMsg.PagesMsg b -} -map : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -map mapArg_ mapArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "PagesMsg" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function [ Type.var "a" ] (Type.var "b") - , Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "a" ] - ] - (Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "b" ] - ) - ) - } - ) - [ Elm.functionReduced "mapUnpack" mapArg_, mapArg_0 ] - - -{-| A Msg that is handled by the elm-pages framework and does nothing. Helpful for when you don't want to register a callback. - - import Browser.Dom as Dom - import PagesMsg exposing (PagesMsg) - import Task - - resetViewport : Cmd (PagesMsg msg) - resetViewport = - Dom.setViewport 0 0 - |> Task.perform (\() -> PagesMsg.noOp) - -noOp: PagesMsg.PagesMsg userMsg --} -noOp : Elm.Expression -noOp = - Elm.value - { importFrom = [ "PagesMsg" ] - , name = "noOp" - , annotation = - Just - (Type.namedWith [ "PagesMsg" ] "PagesMsg" [ Type.var "userMsg" ] - ) - } - - -annotation_ : { pagesMsg : Type.Annotation -> Type.Annotation } -annotation_ = - { pagesMsg = - \pagesMsgArg0 -> - Type.alias - moduleName_ - "PagesMsg" - [ pagesMsgArg0 ] - (Type.namedWith - [ "Pages", "Internal", "Msg" ] - "Msg" - [ Type.var "userMsg" ] - ) - } - - -call_ : - { fromMsg : Elm.Expression -> Elm.Expression - , map : Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { fromMsg = - \fromMsgArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "PagesMsg" ] - , name = "fromMsg" - , annotation = - Just - (Type.function - [ Type.var "userMsg" ] - (Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ) - ) - } - ) - [ fromMsgArg_ ] - , map = - \mapArg_ mapArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "PagesMsg" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" ] - (Type.var "b") - , Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "a" ] - ] - (Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "b" ] - ) - ) - } - ) - [ mapArg_, mapArg_0 ] - } - - -values_ : - { fromMsg : Elm.Expression, map : Elm.Expression, noOp : Elm.Expression } -values_ = - { fromMsg = - Elm.value - { importFrom = [ "PagesMsg" ] - , name = "fromMsg" - , annotation = - Just - (Type.function - [ Type.var "userMsg" ] - (Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ) - ) - } - , map = - Elm.value - { importFrom = [ "PagesMsg" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function [ Type.var "a" ] (Type.var "b") - , Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "a" ] - ] - (Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "b" ] - ) - ) - } - , noOp = - Elm.value - { importFrom = [ "PagesMsg" ] - , name = "noOp" - , annotation = - Just - (Type.namedWith - [ "PagesMsg" ] - "PagesMsg" - [ Type.var "userMsg" ] - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Parser.elm b/codegen/Gen/Parser.elm deleted file mode 100644 index 742e4994..00000000 --- a/codegen/Gen/Parser.elm +++ /dev/null @@ -1,3210 +0,0 @@ -module Gen.Parser exposing - ( moduleName_, run, int, float, number, symbol - , keyword, variable, end, succeed, lazy, andThen, problem - , oneOf, map, backtrackable, commit, token, sequence, loop - , spaces, lineComment, multiComment, getChompedString, chompIf, chompWhile, chompUntil - , chompUntilEndOr, mapChompedString, deadEndsToString, withIndent, getIndent, getPosition, getRow - , getCol, getOffset, getSource, annotation_, make_, caseOf_, call_ - , values_ - ) - -{-| -# Generated bindings for Parser - -@docs moduleName_, run, int, float, number, symbol -@docs keyword, variable, end, succeed, lazy, andThen -@docs problem, oneOf, map, backtrackable, commit, token -@docs sequence, loop, spaces, lineComment, multiComment, getChompedString -@docs chompIf, chompWhile, chompUntil, chompUntilEndOr, mapChompedString, deadEndsToString -@docs withIndent, getIndent, getPosition, getRow, getCol, getOffset -@docs getSource, annotation_, make_, caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Parser" ] - - -{-| Try a parser. Here are some examples using the [`keyword`](#keyword) -parser: - - run (keyword "true") "true" == Ok () - run (keyword "true") "True" == Err ... - run (keyword "true") "false" == Err ... - run (keyword "true") "true!" == Ok () - -Notice the last case! A `Parser` will chomp as much as possible and not worry -about the rest. Use the [`end`](#end) parser to ensure you made it to the end -of the string! - -run: Parser.Parser a -> String -> Result.Result (List Parser.DeadEnd) a --} -run : Elm.Expression -> String -> Elm.Expression -run runArg_ runArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "run" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - , Type.string - ] - (Type.namedWith - [ "Result" ] - "Result" - [ Type.list - (Type.namedWith [ "Parser" ] "DeadEnd" []) - , Type.var "a" - ] - ) - ) - } - ) - [ runArg_, Elm.string runArg_0 ] - - -{-| Parse integers. - - run int "1" == Ok 1 - run int "1234" == Ok 1234 - - run int "-789" == Err ... - run int "0123" == Err ... - run int "1.34" == Err ... - run int "1e31" == Err ... - run int "123a" == Err ... - run int "0x1A" == Err ... - -If you want to handle a leading `+` or `-` you should do it with a custom -parser like this: - - myInt : Parser Int - myInt = - oneOf - [ succeed negate - |. symbol "-" - |= int - , int - ] - -**Note:** If you want a parser for both `Int` and `Float` literals, check out -[`number`](#number) below. It will be faster than using `oneOf` to combining -`int` and `float` yourself. - -int: Parser.Parser Int --} -int : Elm.Expression -int = - Elm.value - { importFrom = [ "Parser" ] - , name = "int" - , annotation = Just (Type.namedWith [ "Parser" ] "Parser" [ Type.int ]) - } - - -{-| Parse floats. - - run float "123" == Ok 123 - run float "3.1415" == Ok 3.1415 - run float "0.1234" == Ok 0.1234 - run float ".1234" == Ok 0.1234 - run float "1e-42" == Ok 1e-42 - run float "6.022e23" == Ok 6.022e23 - run float "6.022E23" == Ok 6.022e23 - run float "6.022e+23" == Ok 6.022e23 - -If you want to disable literals like `.123` (like in Elm) you could write -something like this: - - elmFloat : Parser Float - elmFloat = - oneOf - [ symbol "." - |. problem "floating point numbers must start with a digit, like 0.25" - , float - ] - -**Note:** If you want a parser for both `Int` and `Float` literals, check out -[`number`](#number) below. It will be faster than using `oneOf` to combining -`int` and `float` yourself. - -float: Parser.Parser Float --} -float : Elm.Expression -float = - Elm.value - { importFrom = [ "Parser" ] - , name = "float" - , annotation = - Just (Type.namedWith [ "Parser" ] "Parser" [ Type.float ]) - } - - -{-| Parse a bunch of different kinds of numbers without backtracking. A parser -for Elm would need to handle integers, floats, and hexadecimal like this: - - type Expr - = Variable String - | Int Int - | Float Float - | Apply Expr Expr - - elmNumber : Parser Expr - elmNumber = - number - { int = Just Int - , hex = Just Int -- 0x001A is allowed - , octal = Nothing -- 0o0731 is not - , binary = Nothing -- 0b1101 is not - , float = Just Float - } - -If you wanted to implement the [`float`](#float) parser, it would be like this: - - float : Parser Float - float = - number - { int = Just toFloat - , hex = Nothing - , octal = Nothing - , binary = Nothing - , float = Just identity - } - -Notice that it actually is processing `int` results! This is because `123` -looks like an integer to me, but maybe it looks like a float to you. If you had -`int = Nothing`, floats would need a decimal like `1.0` in every case. If you -like explicitness, that may actually be preferable! - -**Note:** This function does not check for weird trailing characters in the -current implementation, so parsing `123abc` can succeed up to `123` and then -move on. This is helpful for people who want to parse things like `40px` or -`3m`, but it requires a bit of extra code to rule out trailing characters in -other cases. - -number: - { int : Maybe (Int -> a) - , hex : Maybe (Int -> a) - , octal : Maybe (Int -> a) - , binary : Maybe (Int -> a) - , float : Maybe (Float -> a) - } - -> Parser.Parser a --} -number : - { int : Elm.Expression - , hex : Elm.Expression - , octal : Elm.Expression - , binary : Elm.Expression - , float : Elm.Expression - } - -> Elm.Expression -number numberArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "number" - , annotation = - Just - (Type.function - [ Type.record - [ ( "int" - , Type.maybe - (Type.function [ Type.int ] (Type.var "a")) - ) - , ( "hex" - , Type.maybe - (Type.function [ Type.int ] (Type.var "a")) - ) - , ( "octal" - , Type.maybe - (Type.function [ Type.int ] (Type.var "a")) - ) - , ( "binary" - , Type.maybe - (Type.function [ Type.int ] (Type.var "a")) - ) - , ( "float" - , Type.maybe - (Type.function [ Type.float ] (Type.var "a") - ) - ) - ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ) - ) - } - ) - [ Elm.record - [ Tuple.pair "int" numberArg_.int - , Tuple.pair "hex" numberArg_.hex - , Tuple.pair "octal" numberArg_.octal - , Tuple.pair "binary" numberArg_.binary - , Tuple.pair "float" numberArg_.float - ] - ] - - -{-| Parse symbols like `(` and `,`. - - run (symbol "[") "[" == Ok () - run (symbol "[") "4" == Err ... (ExpectingSymbol "[") ... - -**Note:** This is good for stuff like brackets and semicolons, but it probably -should not be used for binary operators like `+` and `-` because you can find -yourself in weird situations. For example, is `3--4` a typo? Or is it `3 - -4`? -I have had better luck with `chompWhile isSymbol` and sorting out which -operator it is afterwards. - -symbol: String -> Parser.Parser () --} -symbol : String -> Elm.Expression -symbol symbolArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "symbol" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - ) - [ Elm.string symbolArg_ ] - - -{-| Parse keywords like `let`, `case`, and `type`. - - run (keyword "let") "let" == Ok () - run (keyword "let") "var" == Err ... (ExpectingKeyword "let") ... - run (keyword "let") "letters" == Err ... (ExpectingKeyword "let") ... - -**Note:** Notice the third case there! `keyword` actually looks ahead one -character to make sure it is not a letter, number, or underscore. The goal is -to help with parsers like this: - - succeed identity - |. keyword "let" - |. spaces - |= elmVar - |. spaces - |. symbol "=" - -The trouble is that `spaces` may chomp zero characters (to handle expressions -like `[1,2]` and `[ 1 , 2 ]`) and in this case, it would mean `letters` could -be parsed as `let ters` and then wonder where the equals sign is! Check out the -[`token`](#token) docs if you need to customize this! - -keyword: String -> Parser.Parser () --} -keyword : String -> Elm.Expression -keyword keywordArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "keyword" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - ) - [ Elm.string keywordArg_ ] - - -{-| Create a parser for variables. If we wanted to parse type variables in Elm, -we could try something like this: - - import Char - import Parser exposing (..) - import Set - - typeVar : Parser String - typeVar = - variable - { start = Char.isLower - , inner = \c -> Char.isAlphaNum c || c == '_' - , reserved = Set.fromList [ "let", "in", "case", "of" ] - } - -This is saying it _must_ start with a lower-case character. After that, -characters can be letters, numbers, or underscores. It is also saying that if -you run into any of these reserved names, it is definitely not a variable. - -variable: - { start : Char.Char -> Bool - , inner : Char.Char -> Bool - , reserved : Set.Set String - } - -> Parser.Parser String --} -variable : - { start : Elm.Expression -> Elm.Expression - , inner : Elm.Expression -> Elm.Expression - , reserved : Elm.Expression - } - -> Elm.Expression -variable variableArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "variable" - , annotation = - Just - (Type.function - [ Type.record - [ ( "start" - , Type.function [ Type.char ] Type.bool - ) - , ( "inner" - , Type.function [ Type.char ] Type.bool - ) - , ( "reserved" - , Type.namedWith [ "Set" ] "Set" [ Type.string ] - ) - ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.string ]) - ) - } - ) - [ Elm.record - [ Tuple.pair - "start" - (Elm.functionReduced "variableUnpack" variableArg_.start) - , Tuple.pair - "inner" - (Elm.functionReduced "variableUnpack" variableArg_.inner) - , Tuple.pair "reserved" variableArg_.reserved - ] - ] - - -{-| Check if you have reached the end of the string you are parsing. - - justAnInt : Parser Int - justAnInt = - succeed identity - |= int - |. end - - -- run justAnInt "90210" == Ok 90210 - -- run justAnInt "1 + 2" == Err ... - -- run int "1 + 2" == Ok 1 - -Parsers can succeed without parsing the whole string. Ending your parser -with `end` guarantees that you have successfully parsed the whole string. - -end: Parser.Parser () --} -end : Elm.Expression -end = - Elm.value - { importFrom = [ "Parser" ] - , name = "end" - , annotation = Just (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - } - - -{-| A parser that succeeds without chomping any characters. - - run (succeed 90210 ) "mississippi" == Ok 90210 - run (succeed 3.141 ) "mississippi" == Ok 3.141 - run (succeed () ) "mississippi" == Ok () - run (succeed Nothing) "mississippi" == Ok Nothing - -Seems weird on its own, but it is very useful in combination with other -functions. The docs for [`(|=)`](#|=) and [`andThen`](#andThen) have some neat -examples. - -succeed: a -> Parser.Parser a --} -succeed : Elm.Expression -> Elm.Expression -succeed succeedArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "succeed" - , annotation = - Just - (Type.function - [ Type.var "a" ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ) - ) - } - ) - [ succeedArg_ ] - - -{-| Helper to define recursive parsers. Say we want a parser for simple -boolean expressions: - - true - false - (true || false) - (true || (true || false)) - -Notice that a boolean expression might contain *other* boolean expressions. -That means we will want to define our parser in terms of itself: - - type Boolean - = MyTrue - | MyFalse - | MyOr Boolean Boolean - - boolean : Parser Boolean - boolean = - oneOf - [ succeed MyTrue - |. keyword "true" - , succeed MyFalse - |. keyword "false" - , succeed MyOr - |. symbol "(" - |. spaces - |= lazy (\_ -> boolean) - |. spaces - |. symbol "||" - |. spaces - |= lazy (\_ -> boolean) - |. spaces - |. symbol ")" - ] - -**Notice that `boolean` uses `boolean` in its definition!** In Elm, you can -only define a value in terms of itself it is behind a function call. So -`lazy` helps us define these self-referential parsers. (`andThen` can be used -for this as well!) - -lazy: (() -> Parser.Parser a) -> Parser.Parser a --} -lazy : (Elm.Expression -> Elm.Expression) -> Elm.Expression -lazy lazyArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "lazy" - , annotation = - Just - (Type.function - [ Type.function - [ Type.unit ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ) - ) - } - ) - [ Elm.functionReduced "lazyUnpack" lazyArg_ ] - - -{-| Parse one thing `andThen` parse another thing. This is useful when you want -to check on what you just parsed. For example, maybe you want U.S. zip codes -and `int` is not suitable because it does not allow leading zeros. You could -say: - - zipCode : Parser String - zipCode = - getChompedString (chompWhile Char.isDigit) - |> andThen checkZipCode - - checkZipCode : String -> Parser String - checkZipCode code = - if String.length code == 5 then - succeed code - else - problem "a U.S. zip code has exactly 5 digits" - -First we chomp digits `andThen` we check if it is a valid U.S. zip code. We -`succeed` if it has exactly five digits and report a `problem` if not. - -Check out [`examples/DoubleQuoteString.elm`](https://github.com/elm/parser/blob/master/examples/DoubleQuoteString.elm) -for another example, this time using `andThen` to verify unicode code points. - -**Note:** If you are using `andThen` recursively and blowing the stack, check -out the [`loop`](#loop) function to limit stack usage. - -andThen: (a -> Parser.Parser b) -> Parser.Parser a -> Parser.Parser b --} -andThen : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -andThen andThenArg_ andThenArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "andThen" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "b" ] - ) - , Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "b" ] - ) - ) - } - ) - [ Elm.functionReduced "andThenUnpack" andThenArg_, andThenArg_0 ] - - -{-| Indicate that a parser has reached a dead end. "Everything was going fine -until I ran into this problem." Check out the [`andThen`](#andThen) docs to see -an example usage. - -problem: String -> Parser.Parser a --} -problem : String -> Elm.Expression -problem problemArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "problem" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ) - ) - } - ) - [ Elm.string problemArg_ ] - - -{-| If you are parsing JSON, the values can be strings, floats, booleans, -arrays, objects, or null. You need a way to pick `oneOf` them! Here is a -sample of what that code might look like: - - type Json - = Number Float - | Boolean Bool - | Null - - json : Parser Json - json = - oneOf - [ map Number float - , map (\_ -> Boolean True) (keyword "true") - , map (\_ -> Boolean False) (keyword "false") - , map (\_ -> Null) keyword "null" - ] - -This parser will keep trying parsers until `oneOf` them starts chomping -characters. Once a path is chosen, it does not come back and try the others. - -**Note:** I highly recommend reading [this document][semantics] to learn how -`oneOf` and `backtrackable` interact. It is subtle and important! - -[semantics]: https://github.com/elm/parser/blob/master/semantics.md - -oneOf: List (Parser.Parser a) -> Parser.Parser a --} -oneOf : List Elm.Expression -> Elm.Expression -oneOf oneOfArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "oneOf" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ) - ) - } - ) - [ Elm.list oneOfArg_ ] - - -{-| Transform the result of a parser. Maybe you have a value that is -an integer or `null`: - - nullOrInt : Parser (Maybe Int) - nullOrInt = - oneOf - [ map Just int - , map (\_ -> Nothing) (keyword "null") - ] - - -- run nullOrInt "0" == Ok (Just 0) - -- run nullOrInt "13" == Ok (Just 13) - -- run nullOrInt "null" == Ok Nothing - -- run nullOrInt "zero" == Err ... - -map: (a -> b) -> Parser.Parser a -> Parser.Parser b --} -map : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -map mapArg_ mapArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function [ Type.var "a" ] (Type.var "b") - , Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "b" ] - ) - ) - } - ) - [ Elm.functionReduced "mapUnpack" mapArg_, mapArg_0 ] - - -{-| It is quite tricky to use `backtrackable` well! It can be very useful, but -also can degrade performance and error message quality. - -Read [this document](https://github.com/elm/parser/blob/master/semantics.md) -to learn how `oneOf`, `backtrackable`, and `commit` work and interact with -each other. It is subtle and important! - -backtrackable: Parser.Parser a -> Parser.Parser a --} -backtrackable : Elm.Expression -> Elm.Expression -backtrackable backtrackableArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "backtrackable" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ) - ) - } - ) - [ backtrackableArg_ ] - - -{-| `commit` is almost always paired with `backtrackable` in some way, and it -is tricky to use well. - -Read [this document](https://github.com/elm/parser/blob/master/semantics.md) -to learn how `oneOf`, `backtrackable`, and `commit` work and interact with -each other. It is subtle and important! - -commit: a -> Parser.Parser a --} -commit : Elm.Expression -> Elm.Expression -commit commitArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "commit" - , annotation = - Just - (Type.function - [ Type.var "a" ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ) - ) - } - ) - [ commitArg_ ] - - -{-| Parse exactly the given string, without any regard to what comes next. - -A potential pitfall when parsing keywords is getting tricked by variables that -start with a keyword, like `let` in `letters` or `import` in `important`. This -is especially likely if you have a whitespace parser that can consume zero -charcters. So the [`keyword`](#keyword) parser is defined with `token` and a -trick to peek ahead a bit: - - keyword : String -> Parser () - keyword kwd = - succeed identity - |. backtrackable (token kwd) - |= oneOf - [ map (\_ -> True) (backtrackable (chompIf isVarChar)) - , succeed False - ] - |> andThen (checkEnding kwd) - - checkEnding : String -> Bool -> Parser () - checkEnding kwd isBadEnding = - if isBadEnding then - problem ("expecting the `" ++ kwd ++ "` keyword") - else - commit () - - isVarChar : Char -> Bool - isVarChar char = - Char.isAlphaNum char || char == '_' - -This definition is specially designed so that (1) if you really see `let` you -commit to that path and (2) if you see `letters` instead you can backtrack and -try other options. If I had just put a `backtrackable` around the whole thing -you would not get (1) anymore. - -token: String -> Parser.Parser () --} -token : String -> Elm.Expression -token tokenArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "token" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - ) - [ Elm.string tokenArg_ ] - - -{-| Handle things like lists and records, but you can customize the details -however you need. Say you want to parse C-style code blocks: - - import Parser exposing (Parser, Trailing(..)) - - block : Parser (List Stmt) - block = - Parser.sequence - { start = "{" - , separator = ";" - , end = "}" - , spaces = spaces - , item = statement - , trailing = Mandatory -- demand a trailing semi-colon - } - - -- statement : Parser Stmt - -**Note:** If you need something more custom, do not be afraid to check -out the implementation and customize it for your case. It is better to -get nice error messages with a lower-level implementation than to try -to hack high-level parsers to do things they are not made for. - -sequence: - { start : String - , separator : String - , end : String - , spaces : Parser.Parser () - , item : Parser.Parser a - , trailing : Parser.Trailing - } - -> Parser.Parser (List a) --} -sequence : - { start : String - , separator : String - , end : String - , spaces : Elm.Expression - , item : Elm.Expression - , trailing : Elm.Expression - } - -> Elm.Expression -sequence sequenceArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "sequence" - , annotation = - Just - (Type.function - [ Type.record - [ ( "start", Type.string ) - , ( "separator", Type.string ) - , ( "end", Type.string ) - , ( "spaces" - , Type.namedWith - [ "Parser" ] - "Parser" - [ Type.unit ] - ) - , ( "item" - , Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - , ( "trailing" - , Type.namedWith [ "Parser" ] "Trailing" [] - ) - ] - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.list (Type.var "a") ] - ) - ) - } - ) - [ Elm.record - [ Tuple.pair "start" (Elm.string sequenceArg_.start) - , Tuple.pair "separator" (Elm.string sequenceArg_.separator) - , Tuple.pair "end" (Elm.string sequenceArg_.end) - , Tuple.pair "spaces" sequenceArg_.spaces - , Tuple.pair "item" sequenceArg_.item - , Tuple.pair "trailing" sequenceArg_.trailing - ] - ] - - -{-| A parser that can loop indefinitely. This can be helpful when parsing -repeated structures, like a bunch of statements: - - statements : Parser (List Stmt) - statements = - loop [] statementsHelp - - statementsHelp : List Stmt -> Parser (Step (List Stmt) (List Stmt)) - statementsHelp revStmts = - oneOf - [ succeed (\stmt -> Loop (stmt :: revStmts)) - |= statement - |. spaces - |. symbol ";" - |. spaces - , succeed () - |> map (\_ -> Done (List.reverse revStmts)) - ] - - -- statement : Parser Stmt - -Notice that the statements are tracked in reverse as we `Loop`, and we reorder -them only once we are `Done`. This is a very common pattern with `loop`! - -Check out [`examples/DoubleQuoteString.elm`](https://github.com/elm/parser/blob/master/examples/DoubleQuoteString.elm) -for another example. - -**IMPORTANT NOTE:** Parsers like `succeed ()` and `chompWhile Char.isAlpha` can -succeed without consuming any characters. So in some cases you may want to use -[`getOffset`](#getOffset) to ensure that each step actually consumed characters. -Otherwise you could end up in an infinite loop! - -**Note:** Anything you can write with `loop`, you can also write as a parser -that chomps some characters `andThen` calls itself with new arguments. The -problem with calling `andThen` recursively is that it grows the stack, so you -cannot do it indefinitely. So `loop` is important because enables tail-call -elimination, allowing you to parse however many repeats you want. - -loop: state -> (state -> Parser.Parser (Parser.Step state a)) -> Parser.Parser a --} -loop : Elm.Expression -> (Elm.Expression -> Elm.Expression) -> Elm.Expression -loop loopArg_ loopArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "loop" - , annotation = - Just - (Type.function - [ Type.var "state" - , Type.function - [ Type.var "state" ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.namedWith - [ "Parser" ] - "Step" - [ Type.var "state", Type.var "a" ] - ] - ) - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ) - ) - } - ) - [ loopArg_, Elm.functionReduced "loopUnpack" loopArg_0 ] - - -{-| Parse zero or more `' '`, `'\n'`, and `'\r'` characters. - -The implementation is pretty simple: - - spaces : Parser () - spaces = - chompWhile (\c -> c == ' ' || c == '\n' || c == '\r') - -So if you need something different (like tabs) just define an alternative with -the necessary tweaks! Check out [`lineComment`](#lineComment) and -[`multiComment`](#multiComment) for more complex situations. - -spaces: Parser.Parser () --} -spaces : Elm.Expression -spaces = - Elm.value - { importFrom = [ "Parser" ] - , name = "spaces" - , annotation = Just (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - } - - -{-| Parse single-line comments: - - elm : Parser () - elm = - lineComment "--" - - js : Parser () - js = - lineComment "//" - - python : Parser () - python = - lineComment "#" - -This parser is defined like this: - - lineComment : String -> Parser () - lineComment str = - symbol str - |. chompUntilEndOr "\n" - -So it will consume the remainder of the line. If the file ends before you see -a newline, that is fine too. - -lineComment: String -> Parser.Parser () --} -lineComment : String -> Elm.Expression -lineComment lineCommentArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "lineComment" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - ) - [ Elm.string lineCommentArg_ ] - - -{-| Parse multi-line comments. So if you wanted to parse Elm whitespace or -JS whitespace, you could say: - - elm : Parser () - elm = - loop 0 <| ifProgress <| - oneOf - [ lineComment "--" - , multiComment "{-" "-}" Nestable - , spaces - ] - - js : Parser () - js = - loop 0 <| ifProgress <| - oneOf - [ lineComment "//" - , multiComment "/*" "*/" NotNestable - , chompWhile (\c -> c == ' ' || c == '\n' || c == '\r' || c == '\t') - ] - - ifProgress : Parser a -> Int -> Parser (Step Int ()) - ifProgress parser offset = - succeed identity - |. parser - |= getOffset - |> map (\newOffset -> if offset == newOffset then Done () else Loop newOffset) - -**Note:** The fact that `spaces` comes last in the definition of `elm` is very -important! It can succeed without consuming any characters, so if it were the -first option, it would always succeed and bypass the others! (Same is true of -`chompWhile` in `js`.) This possibility of success without consumption is also -why wee need the `ifProgress` helper. It detects if there is no more whitespace -to consume. - -multiComment: String -> String -> Parser.Nestable -> Parser.Parser () --} -multiComment : String -> String -> Elm.Expression -> Elm.Expression -multiComment multiCommentArg_ multiCommentArg_0 multiCommentArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "multiComment" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith [ "Parser" ] "Nestable" [] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - ) - [ Elm.string multiCommentArg_ - , Elm.string multiCommentArg_0 - , multiCommentArg_1 - ] - - -{-| Sometimes parsers like `int` or `variable` cannot do exactly what you -need. The "chomping" family of functions is meant for that case! Maybe you -need to parse [valid PHP variables][php] like `$x` and `$txt`: - - php : Parser String - php = - getChompedString <| - succeed () - |. chompIf (\c -> c == '$') - |. chompIf (\c -> Char.isAlpha c || c == '_') - |. chompWhile (\c -> Char.isAlphaNum c || c == '_') - -The idea is that you create a bunch of chompers that validate the underlying -characters. Then `getChompedString` extracts the underlying `String` efficiently. - -**Note:** Maybe it is helpful to see how you can use [`getOffset`](#getOffset) -and [`getSource`](#getSource) to implement this function: - - getChompedString : Parser a -> Parser String - getChompedString parser = - succeed String.slice - |= getOffset - |. parser - |= getOffset - |= getSource - -[php]: https://www.w3schools.com/php/php_variables.asp - -getChompedString: Parser.Parser a -> Parser.Parser String --} -getChompedString : Elm.Expression -> Elm.Expression -getChompedString getChompedStringArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "getChompedString" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.string ]) - ) - } - ) - [ getChompedStringArg_ ] - - -{-| Chomp one character if it passes the test. - - chompUpper : Parser () - chompUpper = - chompIf Char.isUpper - -So this can chomp a character like `T` and produces a `()` value. - -chompIf: (Char.Char -> Bool) -> Parser.Parser () --} -chompIf : (Elm.Expression -> Elm.Expression) -> Elm.Expression -chompIf chompIfArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "chompIf" - , annotation = - Just - (Type.function - [ Type.function [ Type.char ] Type.bool ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - ) - [ Elm.functionReduced "chompIfUnpack" chompIfArg_ ] - - -{-| Chomp zero or more characters if they pass the test. This is commonly -useful for chomping whitespace or variable names: - - whitespace : Parser () - whitespace = - chompWhile (\c -> c == ' ' || c == '\t' || c == '\n' || c == '\r') - - elmVar : Parser String - elmVar = - getChompedString <| - succeed () - |. chompIf Char.isLower - |. chompWhile (\c -> Char.isAlphaNum c || c == '_') - -**Note:** a `chompWhile` parser always succeeds! This can lead to tricky -situations, especially if you define your whitespace with it. In that case, -you could accidentally interpret `letx` as the keyword `let` followed by -"spaces" followed by the variable `x`. This is why the `keyword` and `number` -parsers peek ahead, making sure they are not followed by anything unexpected. - -chompWhile: (Char.Char -> Bool) -> Parser.Parser () --} -chompWhile : (Elm.Expression -> Elm.Expression) -> Elm.Expression -chompWhile chompWhileArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "chompWhile" - , annotation = - Just - (Type.function - [ Type.function [ Type.char ] Type.bool ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - ) - [ Elm.functionReduced "chompWhileUnpack" chompWhileArg_ ] - - -{-| Chomp until you see a certain string. You could define C-style multi-line -comments like this: - - comment : Parser () - comment = - symbol "/*" - |. chompUntil "*/" - -I recommend using [`multiComment`](#multiComment) for this particular scenario -though. It can be trickier than it looks! - -chompUntil: String -> Parser.Parser () --} -chompUntil : String -> Elm.Expression -chompUntil chompUntilArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "chompUntil" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - ) - [ Elm.string chompUntilArg_ ] - - -{-| Chomp until you see a certain string or until you run out of characters to -chomp! You could define single-line comments like this: - - elm : Parser () - elm = - symbol "--" - |. chompUntilEndOr "\n" - -A file may end with a single-line comment, so the file can end before you see -a newline. Tricky! - -I recommend just using [`lineComment`](#lineComment) for this particular -scenario. - -chompUntilEndOr: String -> Parser.Parser () --} -chompUntilEndOr : String -> Elm.Expression -chompUntilEndOr chompUntilEndOrArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "chompUntilEndOr" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - ) - [ Elm.string chompUntilEndOrArg_ ] - - -{-| This works just like [`getChompedString`](#getChompedString) but gives -a bit more flexibility. For example, maybe you want to parse Elm doc comments -and get (1) the full comment and (2) all of the names listed in the docs. - -You could implement `mapChompedString` like this: - - mapChompedString : (String -> a -> b) -> Parser a -> Parser String - mapChompedString func parser = - succeed (\start value end src -> func (String.slice start end src) value) - |= getOffset - |= parser - |= getOffset - |= getSource - -mapChompedString: (String -> a -> b) -> Parser.Parser a -> Parser.Parser b --} -mapChompedString : - (Elm.Expression -> Elm.Expression -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression -mapChompedString mapChompedStringArg_ mapChompedStringArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "mapChompedString" - , annotation = - Just - (Type.function - [ Type.function - [ Type.string, Type.var "a" ] - (Type.var "b") - , Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "b" ] - ) - ) - } - ) - [ Elm.functionReduced - "mapChompedStringUnpack" - (\functionReducedUnpack -> - Elm.functionReduced - "unpack" - (mapChompedStringArg_ functionReducedUnpack) - ) - , mapChompedStringArg_0 - ] - - -{-| Turn all the `DeadEnd` data into a string that is easier for people to -read. - -**Note:** This is just a baseline of quality. It cannot do anything with colors. -It is not interactivite. It just turns the raw data into strings. I really hope -folks will check out the source code for some inspiration on how to turn errors -into `Html` with nice colors and interaction! The `Parser.Advanced` module lets -you work with context as well, which really unlocks another level of quality! -The "context" technique is how the Elm compiler can say "I think I am parsing a -list, so I was expecting a closing `]` here." Telling users what the parser -_thinks_ is happening can be really helpful! - -deadEndsToString: List Parser.DeadEnd -> String --} -deadEndsToString : List Elm.Expression -> Elm.Expression -deadEndsToString deadEndsToStringArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "deadEndsToString" - , annotation = - Just - (Type.function - [ Type.list (Type.namedWith [ "Parser" ] "DeadEnd" []) - ] - Type.string - ) - } - ) - [ Elm.list deadEndsToStringArg_ ] - - -{-| Some languages are indentation sensitive. Python cares about tabs. Elm -cares about spaces sometimes. `withIndent` and `getIndent` allow you to manage -"indentation state" yourself, however is necessary in your scenario. - -withIndent: Int -> Parser.Parser a -> Parser.Parser a --} -withIndent : Int -> Elm.Expression -> Elm.Expression -withIndent withIndentArg_ withIndentArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "withIndent" - , annotation = - Just - (Type.function - [ Type.int - , Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ) - ) - } - ) - [ Elm.int withIndentArg_, withIndentArg_0 ] - - -{-| When someone said `withIndent` earlier, what number did they put in there? - -- `getIndent` results in `0`, the default value -- `withIndent 4 getIndent` results in `4` - -So you are just asking about things you said earlier. These numbers do not leak -out of `withIndent`, so say we have: - - succeed Tuple.pair - |= withIndent 4 getIndent - |= getIndent - -Assuming there are no `withIndent` above this, you would get `(4,0)` from this. - -getIndent: Parser.Parser Int --} -getIndent : Elm.Expression -getIndent = - Elm.value - { importFrom = [ "Parser" ] - , name = "getIndent" - , annotation = Just (Type.namedWith [ "Parser" ] "Parser" [ Type.int ]) - } - - -{-| Code editors treat code like a grid, with rows and columns. The start is -`row=1` and `col=1`. As you chomp characters, the `col` increments. When you -run into a `\n` character, the `row` increments and `col` goes back to `1`. - -In the Elm compiler, I track the start and end position of every expression -like this: - - type alias Located a = - { start : (Int, Int) - , value : a - , end : (Int, Int) - } - - located : Parser a -> Parser (Located a) - located parser = - succeed Located - |= getPosition - |= parser - |= getPosition - -So if there is a problem during type inference, I use this saved position -information to underline the exact problem! - -**Note:** Tabs count as one character, so if you are parsing something like -Python, I recommend sorting that out *after* parsing. So if I wanted the `^^^^` -underline like in Elm, I would find the `row` in the source code and do -something like this: - - makeUnderline : String -> Int -> Int -> String - makeUnderline row minCol maxCol = - String.toList row - |> List.indexedMap (toUnderlineChar minCol maxCol) - |> String.fromList - - toUnderlineChar : Int -> Int -> Int -> Char -> Char - toUnderlineChar minCol maxCol col char = - if minCol <= col && col <= maxCol then - '^' - else if char == '\t' then - '\t' - else - ' ' - -So it would preserve any tabs from the source line. There are tons of other -ways to do this though. The point is just that you handle the tabs after -parsing but before anyone looks at the numbers in a context where tabs may -equal 2, 4, or 8. - -getPosition: Parser.Parser ( Int, Int ) --} -getPosition : Elm.Expression -getPosition = - Elm.value - { importFrom = [ "Parser" ] - , name = "getPosition" - , annotation = - Just - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.tuple Type.int Type.int ] - ) - } - - -{-| This is a more efficient version of `map Tuple.first getPosition`. Maybe -you just want to track the line number for some reason? This lets you do that. - -See [`getPosition`](#getPosition) for an explanation of rows and columns. - -getRow: Parser.Parser Int --} -getRow : Elm.Expression -getRow = - Elm.value - { importFrom = [ "Parser" ] - , name = "getRow" - , annotation = Just (Type.namedWith [ "Parser" ] "Parser" [ Type.int ]) - } - - -{-| This is a more efficient version of `map Tuple.second getPosition`. This -can be useful in combination with [`withIndent`](#withIndent) and -[`getIndent`](#getIndent), like this: - - checkIndent : Parser () - checkIndent = - succeed (\indent column -> indent <= column) - |= getIndent - |= getCol - |> andThen checkIndentHelp - - checkIndentHelp : Bool -> Parser () - checkIndentHelp isIndented = - if isIndented then - succeed () - else - problem "expecting more spaces" - -So the `checkIndent` parser only succeeds when you are "deeper" than the -current indent level. You could use this to parse Elm-style `let` expressions. - -getCol: Parser.Parser Int --} -getCol : Elm.Expression -getCol = - Elm.value - { importFrom = [ "Parser" ] - , name = "getCol" - , annotation = Just (Type.namedWith [ "Parser" ] "Parser" [ Type.int ]) - } - - -{-| Editors think of code as a grid, but behind the scenes it is just a flat -array of UTF-16 characters. `getOffset` tells you your index in that flat -array. So if you chomp `"\n\n\n\n"` you are on row 5, column 1, and offset 4. - -**Note:** JavaScript uses a somewhat odd version of UTF-16 strings, so a single -character may take two slots. So in JavaScript, `'abc'.length === 3` but -`'🙈🙉🙊'.length === 6`. Try it out! And since Elm runs in JavaScript, the offset -moves by those rules. - -getOffset: Parser.Parser Int --} -getOffset : Elm.Expression -getOffset = - Elm.value - { importFrom = [ "Parser" ] - , name = "getOffset" - , annotation = Just (Type.namedWith [ "Parser" ] "Parser" [ Type.int ]) - } - - -{-| Get the full string that is being parsed. You could use this to define -`getChompedString` or `mapChompedString` if you wanted: - - getChompedString : Parser a -> Parser String - getChompedString parser = - succeed String.slice - |= getOffset - |. parser - |= getOffset - |= getSource - -getSource: Parser.Parser String --} -getSource : Elm.Expression -getSource = - Elm.value - { importFrom = [ "Parser" ] - , name = "getSource" - , annotation = - Just (Type.namedWith [ "Parser" ] "Parser" [ Type.string ]) - } - - -annotation_ : - { parser : Type.Annotation -> Type.Annotation - , trailing : Type.Annotation - , step : Type.Annotation -> Type.Annotation -> Type.Annotation - , nestable : Type.Annotation - , deadEnd : Type.Annotation - , problem : Type.Annotation - } -annotation_ = - { parser = - \parserArg0 -> - Type.alias - moduleName_ - "Parser" - [ parserArg0 ] - (Type.namedWith - [ "Parser", "Advanced" ] - "Parser" - [ Type.namedWith [ "Basics" ] "Never" [] - , Type.namedWith [ "Parser" ] "Problem" [] - , Type.var "a" - ] - ) - , trailing = Type.namedWith [ "Parser" ] "Trailing" [] - , step = - \stepArg0 stepArg1 -> - Type.namedWith [ "Parser" ] "Step" [ stepArg0, stepArg1 ] - , nestable = Type.namedWith [ "Parser" ] "Nestable" [] - , deadEnd = - Type.alias - moduleName_ - "DeadEnd" - [] - (Type.record - [ ( "row", Type.int ) - , ( "col", Type.int ) - , ( "problem", Type.namedWith [ "Parser" ] "Problem" [] ) - ] - ) - , problem = Type.namedWith [ "Parser" ] "Problem" [] - } - - -make_ : - { forbidden : Elm.Expression - , optional : Elm.Expression - , mandatory : Elm.Expression - , loop : Elm.Expression -> Elm.Expression - , done : Elm.Expression -> Elm.Expression - , notNestable : Elm.Expression - , nestable : Elm.Expression - , deadEnd : - { row : Elm.Expression, col : Elm.Expression, problem : Elm.Expression } - -> Elm.Expression - , expecting : Elm.Expression -> Elm.Expression - , expectingInt : Elm.Expression - , expectingHex : Elm.Expression - , expectingOctal : Elm.Expression - , expectingBinary : Elm.Expression - , expectingFloat : Elm.Expression - , expectingNumber : Elm.Expression - , expectingVariable : Elm.Expression - , expectingSymbol : Elm.Expression -> Elm.Expression - , expectingKeyword : Elm.Expression -> Elm.Expression - , expectingEnd : Elm.Expression - , unexpectedChar : Elm.Expression - , problem : Elm.Expression -> Elm.Expression - , badRepeat : Elm.Expression - } -make_ = - { forbidden = - Elm.value - { importFrom = [ "Parser" ] - , name = "Forbidden" - , annotation = Just (Type.namedWith [] "Trailing" []) - } - , optional = - Elm.value - { importFrom = [ "Parser" ] - , name = "Optional" - , annotation = Just (Type.namedWith [] "Trailing" []) - } - , mandatory = - Elm.value - { importFrom = [ "Parser" ] - , name = "Mandatory" - , annotation = Just (Type.namedWith [] "Trailing" []) - } - , loop = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "Loop" - , annotation = - Just - (Type.namedWith - [] - "Step" - [ Type.var "state", Type.var "a" ] - ) - } - ) - [ ar0 ] - , done = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "Done" - , annotation = - Just - (Type.namedWith - [] - "Step" - [ Type.var "state", Type.var "a" ] - ) - } - ) - [ ar0 ] - , notNestable = - Elm.value - { importFrom = [ "Parser" ] - , name = "NotNestable" - , annotation = Just (Type.namedWith [] "Nestable" []) - } - , nestable = - Elm.value - { importFrom = [ "Parser" ] - , name = "Nestable" - , annotation = Just (Type.namedWith [] "Nestable" []) - } - , deadEnd = - \deadEnd_args -> - Elm.withType - (Type.alias - [ "Parser" ] - "DeadEnd" - [] - (Type.record - [ ( "row", Type.int ) - , ( "col", Type.int ) - , ( "problem" - , Type.namedWith [ "Parser" ] "Problem" [] - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "row" deadEnd_args.row - , Tuple.pair "col" deadEnd_args.col - , Tuple.pair "problem" deadEnd_args.problem - ] - ) - , expecting = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "Expecting" - , annotation = Just (Type.namedWith [] "Problem" []) - } - ) - [ ar0 ] - , expectingInt = - Elm.value - { importFrom = [ "Parser" ] - , name = "ExpectingInt" - , annotation = Just (Type.namedWith [] "Problem" []) - } - , expectingHex = - Elm.value - { importFrom = [ "Parser" ] - , name = "ExpectingHex" - , annotation = Just (Type.namedWith [] "Problem" []) - } - , expectingOctal = - Elm.value - { importFrom = [ "Parser" ] - , name = "ExpectingOctal" - , annotation = Just (Type.namedWith [] "Problem" []) - } - , expectingBinary = - Elm.value - { importFrom = [ "Parser" ] - , name = "ExpectingBinary" - , annotation = Just (Type.namedWith [] "Problem" []) - } - , expectingFloat = - Elm.value - { importFrom = [ "Parser" ] - , name = "ExpectingFloat" - , annotation = Just (Type.namedWith [] "Problem" []) - } - , expectingNumber = - Elm.value - { importFrom = [ "Parser" ] - , name = "ExpectingNumber" - , annotation = Just (Type.namedWith [] "Problem" []) - } - , expectingVariable = - Elm.value - { importFrom = [ "Parser" ] - , name = "ExpectingVariable" - , annotation = Just (Type.namedWith [] "Problem" []) - } - , expectingSymbol = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "ExpectingSymbol" - , annotation = Just (Type.namedWith [] "Problem" []) - } - ) - [ ar0 ] - , expectingKeyword = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "ExpectingKeyword" - , annotation = Just (Type.namedWith [] "Problem" []) - } - ) - [ ar0 ] - , expectingEnd = - Elm.value - { importFrom = [ "Parser" ] - , name = "ExpectingEnd" - , annotation = Just (Type.namedWith [] "Problem" []) - } - , unexpectedChar = - Elm.value - { importFrom = [ "Parser" ] - , name = "UnexpectedChar" - , annotation = Just (Type.namedWith [] "Problem" []) - } - , problem = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "Problem" - , annotation = Just (Type.namedWith [] "Problem" []) - } - ) - [ ar0 ] - , badRepeat = - Elm.value - { importFrom = [ "Parser" ] - , name = "BadRepeat" - , annotation = Just (Type.namedWith [] "Problem" []) - } - } - - -caseOf_ : - { trailing : - Elm.Expression - -> { forbidden : Elm.Expression - , optional : Elm.Expression - , mandatory : Elm.Expression - } - -> Elm.Expression - , step : - Elm.Expression - -> { loop : Elm.Expression -> Elm.Expression - , done : Elm.Expression -> Elm.Expression - } - -> Elm.Expression - , nestable : - Elm.Expression - -> { notNestable : Elm.Expression, nestable : Elm.Expression } - -> Elm.Expression - , problem : - Elm.Expression - -> { expecting : Elm.Expression -> Elm.Expression - , expectingInt : Elm.Expression - , expectingHex : Elm.Expression - , expectingOctal : Elm.Expression - , expectingBinary : Elm.Expression - , expectingFloat : Elm.Expression - , expectingNumber : Elm.Expression - , expectingVariable : Elm.Expression - , expectingSymbol : Elm.Expression -> Elm.Expression - , expectingKeyword : Elm.Expression -> Elm.Expression - , expectingEnd : Elm.Expression - , unexpectedChar : Elm.Expression - , problem : Elm.Expression -> Elm.Expression - , badRepeat : Elm.Expression - } - -> Elm.Expression - } -caseOf_ = - { trailing = - \trailingExpression trailingTags -> - Elm.Case.custom - trailingExpression - (Type.namedWith [ "Parser" ] "Trailing" []) - [ Elm.Case.branch - (Elm.Arg.customType "Forbidden" trailingTags.forbidden) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Optional" trailingTags.optional) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Mandatory" trailingTags.mandatory) - Basics.identity - ] - , step = - \stepExpression stepTags -> - Elm.Case.custom - stepExpression - (Type.namedWith - [ "Parser" ] - "Step" - [ Type.var "state", Type.var "a" ] - ) - [ Elm.Case.branch - (Elm.Arg.customType "Loop" stepTags.loop |> Elm.Arg.item - (Elm.Arg.varWith - "state" - (Type.var - "state" - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Done" stepTags.done |> Elm.Arg.item - (Elm.Arg.varWith - "a" - (Type.var - "a" - ) - ) - ) - Basics.identity - ] - , nestable = - \nestableExpression nestableTags -> - Elm.Case.custom - nestableExpression - (Type.namedWith [ "Parser" ] "Nestable" []) - [ Elm.Case.branch - (Elm.Arg.customType "NotNestable" nestableTags.notNestable) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Nestable" nestableTags.nestable) - Basics.identity - ] - , problem = - \problemExpression problemTags -> - Elm.Case.custom - problemExpression - (Type.namedWith [ "Parser" ] "Problem" []) - [ Elm.Case.branch - (Elm.Arg.customType - "Expecting" - problemTags.expecting |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "ExpectingInt" problemTags.expectingInt) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "ExpectingHex" problemTags.expectingHex) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "ExpectingOctal" - problemTags.expectingOctal - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "ExpectingBinary" - problemTags.expectingBinary - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "ExpectingFloat" - problemTags.expectingFloat - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "ExpectingNumber" - problemTags.expectingNumber - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "ExpectingVariable" - problemTags.expectingVariable - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "ExpectingSymbol" - problemTags.expectingSymbol |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "ExpectingKeyword" - problemTags.expectingKeyword |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "ExpectingEnd" problemTags.expectingEnd) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "UnexpectedChar" - problemTags.unexpectedChar - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "Problem" - problemTags.problem |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "BadRepeat" problemTags.badRepeat) - Basics.identity - ] - } - - -call_ : - { run : Elm.Expression -> Elm.Expression -> Elm.Expression - , number : Elm.Expression -> Elm.Expression - , symbol : Elm.Expression -> Elm.Expression - , keyword : Elm.Expression -> Elm.Expression - , variable : Elm.Expression -> Elm.Expression - , succeed : Elm.Expression -> Elm.Expression - , lazy : Elm.Expression -> Elm.Expression - , andThen : Elm.Expression -> Elm.Expression -> Elm.Expression - , problem : Elm.Expression -> Elm.Expression - , oneOf : Elm.Expression -> Elm.Expression - , map : Elm.Expression -> Elm.Expression -> Elm.Expression - , backtrackable : Elm.Expression -> Elm.Expression - , commit : Elm.Expression -> Elm.Expression - , token : Elm.Expression -> Elm.Expression - , sequence : Elm.Expression -> Elm.Expression - , loop : Elm.Expression -> Elm.Expression -> Elm.Expression - , lineComment : Elm.Expression -> Elm.Expression - , multiComment : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , getChompedString : Elm.Expression -> Elm.Expression - , chompIf : Elm.Expression -> Elm.Expression - , chompWhile : Elm.Expression -> Elm.Expression - , chompUntil : Elm.Expression -> Elm.Expression - , chompUntilEndOr : Elm.Expression -> Elm.Expression - , mapChompedString : Elm.Expression -> Elm.Expression -> Elm.Expression - , deadEndsToString : Elm.Expression -> Elm.Expression - , withIndent : Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { run = - \runArg_ runArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "run" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - , Type.string - ] - (Type.namedWith - [ "Result" ] - "Result" - [ Type.list - (Type.namedWith - [ "Parser" ] - "DeadEnd" - [] - ) - , Type.var "a" - ] - ) - ) - } - ) - [ runArg_, runArg_0 ] - , number = - \numberArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "number" - , annotation = - Just - (Type.function - [ Type.record - [ ( "int" - , Type.maybe - (Type.function - [ Type.int ] - (Type.var "a") - ) - ) - , ( "hex" - , Type.maybe - (Type.function - [ Type.int ] - (Type.var "a") - ) - ) - , ( "octal" - , Type.maybe - (Type.function - [ Type.int ] - (Type.var "a") - ) - ) - , ( "binary" - , Type.maybe - (Type.function - [ Type.int ] - (Type.var "a") - ) - ) - , ( "float" - , Type.maybe - (Type.function - [ Type.float ] - (Type.var "a") - ) - ) - ] - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ) - } - ) - [ numberArg_ ] - , symbol = - \symbolArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "symbol" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.unit ] - ) - ) - } - ) - [ symbolArg_ ] - , keyword = - \keywordArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "keyword" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.unit ] - ) - ) - } - ) - [ keywordArg_ ] - , variable = - \variableArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "variable" - , annotation = - Just - (Type.function - [ Type.record - [ ( "start" - , Type.function [ Type.char ] Type.bool - ) - , ( "inner" - , Type.function [ Type.char ] Type.bool - ) - , ( "reserved" - , Type.namedWith - [ "Set" ] - "Set" - [ Type.string ] - ) - ] - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.string ] - ) - ) - } - ) - [ variableArg_ ] - , succeed = - \succeedArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "succeed" - , annotation = - Just - (Type.function - [ Type.var "a" ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ) - } - ) - [ succeedArg_ ] - , lazy = - \lazyArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "lazy" - , annotation = - Just - (Type.function - [ Type.function - [ Type.unit ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ) - } - ) - [ lazyArg_ ] - , andThen = - \andThenArg_ andThenArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "andThen" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "b" ] - ) - , Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "b" ] - ) - ) - } - ) - [ andThenArg_, andThenArg_0 ] - , problem = - \problemArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "problem" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ) - } - ) - [ problemArg_ ] - , oneOf = - \oneOfArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "oneOf" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ) - } - ) - [ oneOfArg_ ] - , map = - \mapArg_ mapArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" ] - (Type.var "b") - , Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "b" ] - ) - ) - } - ) - [ mapArg_, mapArg_0 ] - , backtrackable = - \backtrackableArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "backtrackable" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ) - } - ) - [ backtrackableArg_ ] - , commit = - \commitArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "commit" - , annotation = - Just - (Type.function - [ Type.var "a" ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ) - } - ) - [ commitArg_ ] - , token = - \tokenArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "token" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.unit ] - ) - ) - } - ) - [ tokenArg_ ] - , sequence = - \sequenceArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "sequence" - , annotation = - Just - (Type.function - [ Type.record - [ ( "start", Type.string ) - , ( "separator", Type.string ) - , ( "end", Type.string ) - , ( "spaces" - , Type.namedWith - [ "Parser" ] - "Parser" - [ Type.unit ] - ) - , ( "item" - , Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - , ( "trailing" - , Type.namedWith - [ "Parser" ] - "Trailing" - [] - ) - ] - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.list (Type.var "a") ] - ) - ) - } - ) - [ sequenceArg_ ] - , loop = - \loopArg_ loopArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "loop" - , annotation = - Just - (Type.function - [ Type.var "state" - , Type.function - [ Type.var "state" ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.namedWith - [ "Parser" ] - "Step" - [ Type.var "state" - , Type.var "a" - ] - ] - ) - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ) - } - ) - [ loopArg_, loopArg_0 ] - , lineComment = - \lineCommentArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "lineComment" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.unit ] - ) - ) - } - ) - [ lineCommentArg_ ] - , multiComment = - \multiCommentArg_ multiCommentArg_0 multiCommentArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "multiComment" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith [ "Parser" ] "Nestable" [] - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.unit ] - ) - ) - } - ) - [ multiCommentArg_, multiCommentArg_0, multiCommentArg_1 ] - , getChompedString = - \getChompedStringArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "getChompedString" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.string ] - ) - ) - } - ) - [ getChompedStringArg_ ] - , chompIf = - \chompIfArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "chompIf" - , annotation = - Just - (Type.function - [ Type.function [ Type.char ] Type.bool ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.unit ] - ) - ) - } - ) - [ chompIfArg_ ] - , chompWhile = - \chompWhileArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "chompWhile" - , annotation = - Just - (Type.function - [ Type.function [ Type.char ] Type.bool ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.unit ] - ) - ) - } - ) - [ chompWhileArg_ ] - , chompUntil = - \chompUntilArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "chompUntil" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.unit ] - ) - ) - } - ) - [ chompUntilArg_ ] - , chompUntilEndOr = - \chompUntilEndOrArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "chompUntilEndOr" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.unit ] - ) - ) - } - ) - [ chompUntilEndOrArg_ ] - , mapChompedString = - \mapChompedStringArg_ mapChompedStringArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "mapChompedString" - , annotation = - Just - (Type.function - [ Type.function - [ Type.string, Type.var "a" ] - (Type.var "b") - , Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "b" ] - ) - ) - } - ) - [ mapChompedStringArg_, mapChompedStringArg_0 ] - , deadEndsToString = - \deadEndsToStringArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "deadEndsToString" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith [ "Parser" ] "DeadEnd" []) - ] - Type.string - ) - } - ) - [ deadEndsToStringArg_ ] - , withIndent = - \withIndentArg_ withIndentArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Parser" ] - , name = "withIndent" - , annotation = - Just - (Type.function - [ Type.int - , Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ) - } - ) - [ withIndentArg_, withIndentArg_0 ] - } - - -values_ : - { run : Elm.Expression - , int : Elm.Expression - , float : Elm.Expression - , number : Elm.Expression - , symbol : Elm.Expression - , keyword : Elm.Expression - , variable : Elm.Expression - , end : Elm.Expression - , succeed : Elm.Expression - , lazy : Elm.Expression - , andThen : Elm.Expression - , problem : Elm.Expression - , oneOf : Elm.Expression - , map : Elm.Expression - , backtrackable : Elm.Expression - , commit : Elm.Expression - , token : Elm.Expression - , sequence : Elm.Expression - , loop : Elm.Expression - , spaces : Elm.Expression - , lineComment : Elm.Expression - , multiComment : Elm.Expression - , getChompedString : Elm.Expression - , chompIf : Elm.Expression - , chompWhile : Elm.Expression - , chompUntil : Elm.Expression - , chompUntilEndOr : Elm.Expression - , mapChompedString : Elm.Expression - , deadEndsToString : Elm.Expression - , withIndent : Elm.Expression - , getIndent : Elm.Expression - , getPosition : Elm.Expression - , getRow : Elm.Expression - , getCol : Elm.Expression - , getOffset : Elm.Expression - , getSource : Elm.Expression - } -values_ = - { run = - Elm.value - { importFrom = [ "Parser" ] - , name = "run" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - , Type.string - ] - (Type.namedWith - [ "Result" ] - "Result" - [ Type.list - (Type.namedWith [ "Parser" ] "DeadEnd" []) - , Type.var "a" - ] - ) - ) - } - , int = - Elm.value - { importFrom = [ "Parser" ] - , name = "int" - , annotation = - Just (Type.namedWith [ "Parser" ] "Parser" [ Type.int ]) - } - , float = - Elm.value - { importFrom = [ "Parser" ] - , name = "float" - , annotation = - Just (Type.namedWith [ "Parser" ] "Parser" [ Type.float ]) - } - , number = - Elm.value - { importFrom = [ "Parser" ] - , name = "number" - , annotation = - Just - (Type.function - [ Type.record - [ ( "int" - , Type.maybe - (Type.function [ Type.int ] (Type.var "a")) - ) - , ( "hex" - , Type.maybe - (Type.function [ Type.int ] (Type.var "a")) - ) - , ( "octal" - , Type.maybe - (Type.function [ Type.int ] (Type.var "a")) - ) - , ( "binary" - , Type.maybe - (Type.function [ Type.int ] (Type.var "a")) - ) - , ( "float" - , Type.maybe - (Type.function [ Type.float ] (Type.var "a")) - ) - ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ]) - ) - } - , symbol = - Elm.value - { importFrom = [ "Parser" ] - , name = "symbol" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - , keyword = - Elm.value - { importFrom = [ "Parser" ] - , name = "keyword" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - , variable = - Elm.value - { importFrom = [ "Parser" ] - , name = "variable" - , annotation = - Just - (Type.function - [ Type.record - [ ( "start" - , Type.function [ Type.char ] Type.bool - ) - , ( "inner" - , Type.function [ Type.char ] Type.bool - ) - , ( "reserved" - , Type.namedWith [ "Set" ] "Set" [ Type.string ] - ) - ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.string ]) - ) - } - , end = - Elm.value - { importFrom = [ "Parser" ] - , name = "end" - , annotation = - Just (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - } - , succeed = - Elm.value - { importFrom = [ "Parser" ] - , name = "succeed" - , annotation = - Just - (Type.function - [ Type.var "a" ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ]) - ) - } - , lazy = - Elm.value - { importFrom = [ "Parser" ] - , name = "lazy" - , annotation = - Just - (Type.function - [ Type.function - [ Type.unit ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ]) - ) - } - , andThen = - Elm.value - { importFrom = [ "Parser" ] - , name = "andThen" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "b" ] - ) - , Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "b" ]) - ) - } - , problem = - Elm.value - { importFrom = [ "Parser" ] - , name = "problem" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ]) - ) - } - , oneOf = - Elm.value - { importFrom = [ "Parser" ] - , name = "oneOf" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ]) - ) - } - , map = - Elm.value - { importFrom = [ "Parser" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function [ Type.var "a" ] (Type.var "b") - , Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "b" ]) - ) - } - , backtrackable = - Elm.value - { importFrom = [ "Parser" ] - , name = "backtrackable" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ]) - ) - } - , commit = - Elm.value - { importFrom = [ "Parser" ] - , name = "commit" - , annotation = - Just - (Type.function - [ Type.var "a" ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ]) - ) - } - , token = - Elm.value - { importFrom = [ "Parser" ] - , name = "token" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - , sequence = - Elm.value - { importFrom = [ "Parser" ] - , name = "sequence" - , annotation = - Just - (Type.function - [ Type.record - [ ( "start", Type.string ) - , ( "separator", Type.string ) - , ( "end", Type.string ) - , ( "spaces" - , Type.namedWith - [ "Parser" ] - "Parser" - [ Type.unit ] - ) - , ( "item" - , Type.namedWith - [ "Parser" ] - "Parser" - [ Type.var "a" ] - ) - , ( "trailing" - , Type.namedWith [ "Parser" ] "Trailing" [] - ) - ] - ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.list (Type.var "a") ] - ) - ) - } - , loop = - Elm.value - { importFrom = [ "Parser" ] - , name = "loop" - , annotation = - Just - (Type.function - [ Type.var "state" - , Type.function - [ Type.var "state" ] - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.namedWith - [ "Parser" ] - "Step" - [ Type.var "state", Type.var "a" ] - ] - ) - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ]) - ) - } - , spaces = - Elm.value - { importFrom = [ "Parser" ] - , name = "spaces" - , annotation = - Just (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - } - , lineComment = - Elm.value - { importFrom = [ "Parser" ] - , name = "lineComment" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - , multiComment = - Elm.value - { importFrom = [ "Parser" ] - , name = "multiComment" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith [ "Parser" ] "Nestable" [] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - , getChompedString = - Elm.value - { importFrom = [ "Parser" ] - , name = "getChompedString" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.string ]) - ) - } - , chompIf = - Elm.value - { importFrom = [ "Parser" ] - , name = "chompIf" - , annotation = - Just - (Type.function - [ Type.function [ Type.char ] Type.bool ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - , chompWhile = - Elm.value - { importFrom = [ "Parser" ] - , name = "chompWhile" - , annotation = - Just - (Type.function - [ Type.function [ Type.char ] Type.bool ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - , chompUntil = - Elm.value - { importFrom = [ "Parser" ] - , name = "chompUntil" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - , chompUntilEndOr = - Elm.value - { importFrom = [ "Parser" ] - , name = "chompUntilEndOr" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.unit ]) - ) - } - , mapChompedString = - Elm.value - { importFrom = [ "Parser" ] - , name = "mapChompedString" - , annotation = - Just - (Type.function - [ Type.function - [ Type.string, Type.var "a" ] - (Type.var "b") - , Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "b" ]) - ) - } - , deadEndsToString = - Elm.value - { importFrom = [ "Parser" ] - , name = "deadEndsToString" - , annotation = - Just - (Type.function - [ Type.list (Type.namedWith [ "Parser" ] "DeadEnd" []) - ] - Type.string - ) - } - , withIndent = - Elm.value - { importFrom = [ "Parser" ] - , name = "withIndent" - , annotation = - Just - (Type.function - [ Type.int - , Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ] - ] - (Type.namedWith [ "Parser" ] "Parser" [ Type.var "a" ]) - ) - } - , getIndent = - Elm.value - { importFrom = [ "Parser" ] - , name = "getIndent" - , annotation = - Just (Type.namedWith [ "Parser" ] "Parser" [ Type.int ]) - } - , getPosition = - Elm.value - { importFrom = [ "Parser" ] - , name = "getPosition" - , annotation = - Just - (Type.namedWith - [ "Parser" ] - "Parser" - [ Type.tuple Type.int Type.int ] - ) - } - , getRow = - Elm.value - { importFrom = [ "Parser" ] - , name = "getRow" - , annotation = - Just (Type.namedWith [ "Parser" ] "Parser" [ Type.int ]) - } - , getCol = - Elm.value - { importFrom = [ "Parser" ] - , name = "getCol" - , annotation = - Just (Type.namedWith [ "Parser" ] "Parser" [ Type.int ]) - } - , getOffset = - Elm.value - { importFrom = [ "Parser" ] - , name = "getOffset" - , annotation = - Just (Type.namedWith [ "Parser" ] "Parser" [ Type.int ]) - } - , getSource = - Elm.value - { importFrom = [ "Parser" ] - , name = "getSource" - , annotation = - Just (Type.namedWith [ "Parser" ] "Parser" [ Type.string ]) - } - } \ No newline at end of file diff --git a/codegen/Gen/Scaffold/Form.elm b/codegen/Gen/Scaffold/Form.elm deleted file mode 100644 index 16322aa3..00000000 --- a/codegen/Gen/Scaffold/Form.elm +++ /dev/null @@ -1,678 +0,0 @@ -module Gen.Scaffold.Form exposing - ( moduleName_, provide, restArgsParser, recordEncoder, fieldEncoder, annotation_ - , make_, caseOf_, call_, values_ - ) - -{-| -# Generated bindings for Scaffold.Form - -@docs moduleName_, provide, restArgsParser, recordEncoder, fieldEncoder, annotation_ -@docs make_, caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Scaffold", "Form" ] - - -{-| provide: - { fields : List ( String, Scaffold.Form.Kind ) - , elmCssView : Bool - , view : - { formState : Scaffold.Form.Context - , params : - List { name : String - , kind : Scaffold.Form.Kind - , param : Elm.Expression - } - } - -> Elm.Expression - } - -> Maybe { formHandlers : Elm.Expression - , form : Elm.Expression - , declarations : List Elm.Declaration - } --} -provide : - { fields : List Elm.Expression - , elmCssView : Bool - , view : Elm.Expression -> Elm.Expression - } - -> Elm.Expression -provide provideArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "provide" - , annotation = - Just - (Type.function - [ Type.record - [ ( "fields" - , Type.list - (Type.tuple - Type.string - (Type.namedWith - [ "Scaffold", "Form" ] - "Kind" - [] - ) - ) - ) - , ( "elmCssView", Type.bool ) - , ( "view" - , Type.function - [ Type.record - [ ( "formState" - , Type.namedWith - [ "Scaffold", "Form" ] - "Context" - [] - ) - , ( "params" - , Type.list - (Type.record - [ ( "name", Type.string ) - , ( "kind" - , Type.namedWith - [ "Scaffold" - , "Form" - ] - "Kind" - [] - ) - , ( "param" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ) - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - ] - ] - (Type.maybe - (Type.record - [ ( "formHandlers" - , Type.namedWith [ "Elm" ] "Expression" [] - ) - , ( "form" - , Type.namedWith [ "Elm" ] "Expression" [] - ) - , ( "declarations" - , Type.list - (Type.namedWith - [ "Elm" ] - "Declaration" - [] - ) - ) - ] - ) - ) - ) - } - ) - [ Elm.record - [ Tuple.pair "fields" (Elm.list provideArg_.fields) - , Tuple.pair "elmCssView" (Elm.bool provideArg_.elmCssView) - , Tuple.pair - "view" - (Elm.functionReduced "provideUnpack" provideArg_.view) - ] - ] - - -{-| This parser handles the following field types (or `text` if none is provided): - - - `text` - - `textarea` - - `checkbox` - - `time` - - `date` - -The naming convention follows the same naming as the HTML form field elements or attributes that are used to represent them. -In addition to using the appropriate field type, this will also give you an Elm type with the corresponding base type (like `Date` for `date` or `Bool` for `checkbox`). - -restArgsParser: Cli.Option.Option (List String) (List ( String, Scaffold.Form.Kind )) Cli.Option.RestArgsOption --} -restArgsParser : Elm.Expression -restArgsParser = - Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "restArgsParser" - , annotation = - Just - (Type.namedWith - [ "Cli", "Option" ] - "Option" - [ Type.list Type.string - , Type.list - (Type.tuple - Type.string - (Type.namedWith [ "Scaffold", "Form" ] "Kind" []) - ) - , Type.namedWith [ "Cli", "Option" ] "RestArgsOption" [] - ] - ) - } - - -{-| Generate a JSON Encoder for the form fields. This can be helpful for sending the validated form data through a -BackendTask.Custom or to an external API from your scaffolded Route Module code. - -recordEncoder: Elm.Expression -> List ( String, Scaffold.Form.Kind ) -> Elm.Expression --} -recordEncoder : Elm.Expression -> List Elm.Expression -> Elm.Expression -recordEncoder recordEncoderArg_ recordEncoderArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "recordEncoder" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] - , Type.list - (Type.tuple - Type.string - (Type.namedWith - [ "Scaffold", "Form" ] - "Kind" - [] - ) - ) - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - } - ) - [ recordEncoderArg_, Elm.list recordEncoderArg_0 ] - - -{-| A lower-level, more granular version of `recordEncoder` - lets you generate a JSON Encoder `Expression` for an individual Field rather than a group of Fields. - -fieldEncoder: Elm.Expression -> String -> Scaffold.Form.Kind -> Elm.Expression --} -fieldEncoder : Elm.Expression -> String -> Elm.Expression -> Elm.Expression -fieldEncoder fieldEncoderArg_ fieldEncoderArg_0 fieldEncoderArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "fieldEncoder" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] - , Type.string - , Type.namedWith [ "Scaffold", "Form" ] "Kind" [] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - } - ) - [ fieldEncoderArg_, Elm.string fieldEncoderArg_0, fieldEncoderArg_1 ] - - -annotation_ : { kind : Type.Annotation, context : Type.Annotation } -annotation_ = - { kind = Type.namedWith [ "Scaffold", "Form" ] "Kind" [] - , context = - Type.alias - moduleName_ - "Context" - [] - (Type.record - [ ( "errors", Type.namedWith [ "Elm" ] "Expression" [] ) - , ( "submitting", Type.namedWith [ "Elm" ] "Expression" [] ) - , ( "submitAttempted" - , Type.namedWith [ "Elm" ] "Expression" [] - ) - , ( "data", Type.namedWith [ "Elm" ] "Expression" [] ) - , ( "expression", Type.namedWith [ "Elm" ] "Expression" [] ) - ] - ) - } - - -make_ : - { fieldInt : Elm.Expression - , fieldText : Elm.Expression - , fieldTextarea : Elm.Expression - , fieldFloat : Elm.Expression - , fieldTime : Elm.Expression - , fieldDate : Elm.Expression - , fieldCheckbox : Elm.Expression - , context : - { errors : Elm.Expression - , submitting : Elm.Expression - , submitAttempted : Elm.Expression - , data : Elm.Expression - , expression : Elm.Expression - } - -> Elm.Expression - } -make_ = - { fieldInt = - Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "FieldInt" - , annotation = Just (Type.namedWith [] "Kind" []) - } - , fieldText = - Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "FieldText" - , annotation = Just (Type.namedWith [] "Kind" []) - } - , fieldTextarea = - Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "FieldTextarea" - , annotation = Just (Type.namedWith [] "Kind" []) - } - , fieldFloat = - Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "FieldFloat" - , annotation = Just (Type.namedWith [] "Kind" []) - } - , fieldTime = - Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "FieldTime" - , annotation = Just (Type.namedWith [] "Kind" []) - } - , fieldDate = - Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "FieldDate" - , annotation = Just (Type.namedWith [] "Kind" []) - } - , fieldCheckbox = - Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "FieldCheckbox" - , annotation = Just (Type.namedWith [] "Kind" []) - } - , context = - \context_args -> - Elm.withType - (Type.alias - [ "Scaffold", "Form" ] - "Context" - [] - (Type.record - [ ( "errors" - , Type.namedWith [ "Elm" ] "Expression" [] - ) - , ( "submitting" - , Type.namedWith [ "Elm" ] "Expression" [] - ) - , ( "submitAttempted" - , Type.namedWith [ "Elm" ] "Expression" [] - ) - , ( "data", Type.namedWith [ "Elm" ] "Expression" [] ) - , ( "expression" - , Type.namedWith [ "Elm" ] "Expression" [] - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "errors" context_args.errors - , Tuple.pair "submitting" context_args.submitting - , Tuple.pair "submitAttempted" context_args.submitAttempted - , Tuple.pair "data" context_args.data - , Tuple.pair "expression" context_args.expression - ] - ) - } - - -caseOf_ : - { kind : - Elm.Expression - -> { fieldInt : Elm.Expression - , fieldText : Elm.Expression - , fieldTextarea : Elm.Expression - , fieldFloat : Elm.Expression - , fieldTime : Elm.Expression - , fieldDate : Elm.Expression - , fieldCheckbox : Elm.Expression - } - -> Elm.Expression - } -caseOf_ = - { kind = - \kindExpression kindTags -> - Elm.Case.custom - kindExpression - (Type.namedWith [ "Scaffold", "Form" ] "Kind" []) - [ Elm.Case.branch - (Elm.Arg.customType "FieldInt" kindTags.fieldInt) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "FieldText" kindTags.fieldText) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "FieldTextarea" kindTags.fieldTextarea) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "FieldFloat" kindTags.fieldFloat) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "FieldTime" kindTags.fieldTime) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "FieldDate" kindTags.fieldDate) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "FieldCheckbox" kindTags.fieldCheckbox) - Basics.identity - ] - } - - -call_ : - { provide : Elm.Expression -> Elm.Expression - , recordEncoder : Elm.Expression -> Elm.Expression -> Elm.Expression - , fieldEncoder : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { provide = - \provideArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "provide" - , annotation = - Just - (Type.function - [ Type.record - [ ( "fields" - , Type.list - (Type.tuple - Type.string - (Type.namedWith - [ "Scaffold", "Form" ] - "Kind" - [] - ) - ) - ) - , ( "elmCssView", Type.bool ) - , ( "view" - , Type.function - [ Type.record - [ ( "formState" - , Type.namedWith - [ "Scaffold", "Form" ] - "Context" - [] - ) - , ( "params" - , Type.list - (Type.record - [ ( "name" - , Type.string - ) - , ( "kind" - , Type.namedWith - [ "Scaffold" - , "Form" - ] - "Kind" - [] - ) - , ( "param" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ) - ) - ] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - ] - ] - (Type.maybe - (Type.record - [ ( "formHandlers" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "form" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "declarations" - , Type.list - (Type.namedWith - [ "Elm" ] - "Declaration" - [] - ) - ) - ] - ) - ) - ) - } - ) - [ provideArg_ ] - , recordEncoder = - \recordEncoderArg_ recordEncoderArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "recordEncoder" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] - , Type.list - (Type.tuple - Type.string - (Type.namedWith - [ "Scaffold", "Form" ] - "Kind" - [] - ) - ) - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - } - ) - [ recordEncoderArg_, recordEncoderArg_0 ] - , fieldEncoder = - \fieldEncoderArg_ fieldEncoderArg_0 fieldEncoderArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "fieldEncoder" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] - , Type.string - , Type.namedWith - [ "Scaffold", "Form" ] - "Kind" - [] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - } - ) - [ fieldEncoderArg_, fieldEncoderArg_0, fieldEncoderArg_1 ] - } - - -values_ : - { provide : Elm.Expression - , restArgsParser : Elm.Expression - , recordEncoder : Elm.Expression - , fieldEncoder : Elm.Expression - } -values_ = - { provide = - Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "provide" - , annotation = - Just - (Type.function - [ Type.record - [ ( "fields" - , Type.list - (Type.tuple - Type.string - (Type.namedWith - [ "Scaffold", "Form" ] - "Kind" - [] - ) - ) - ) - , ( "elmCssView", Type.bool ) - , ( "view" - , Type.function - [ Type.record - [ ( "formState" - , Type.namedWith - [ "Scaffold", "Form" ] - "Context" - [] - ) - , ( "params" - , Type.list - (Type.record - [ ( "name", Type.string ) - , ( "kind" - , Type.namedWith - [ "Scaffold" - , "Form" - ] - "Kind" - [] - ) - , ( "param" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ) - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - ] - ] - (Type.maybe - (Type.record - [ ( "formHandlers" - , Type.namedWith [ "Elm" ] "Expression" [] - ) - , ( "form" - , Type.namedWith [ "Elm" ] "Expression" [] - ) - , ( "declarations" - , Type.list - (Type.namedWith - [ "Elm" ] - "Declaration" - [] - ) - ) - ] - ) - ) - ) - } - , restArgsParser = - Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "restArgsParser" - , annotation = - Just - (Type.namedWith - [ "Cli", "Option" ] - "Option" - [ Type.list Type.string - , Type.list - (Type.tuple - Type.string - (Type.namedWith [ "Scaffold", "Form" ] "Kind" [] - ) - ) - , Type.namedWith - [ "Cli", "Option" ] - "RestArgsOption" - [] - ] - ) - } - , recordEncoder = - Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "recordEncoder" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] - , Type.list - (Type.tuple - Type.string - (Type.namedWith [ "Scaffold", "Form" ] "Kind" [] - ) - ) - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - } - , fieldEncoder = - Elm.value - { importFrom = [ "Scaffold", "Form" ] - , name = "fieldEncoder" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] - , Type.string - , Type.namedWith [ "Scaffold", "Form" ] "Kind" [] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Scaffold/Route.elm b/codegen/Gen/Scaffold/Route.elm deleted file mode 100644 index 8567444a..00000000 --- a/codegen/Gen/Scaffold/Route.elm +++ /dev/null @@ -1,1962 +0,0 @@ -module Gen.Scaffold.Route exposing - ( moduleName_, buildWithLocalState, buildWithSharedState, buildNoState, serverRender, preRender - , single, addDeclarations, moduleNameCliArg, annotation_, make_, caseOf_, call_ - , values_ - ) - -{-| -# Generated bindings for Scaffold.Route - -@docs moduleName_, buildWithLocalState, buildWithSharedState, buildNoState, serverRender, preRender -@docs single, addDeclarations, moduleNameCliArg, annotation_, make_, caseOf_ -@docs call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Scaffold", "Route" ] - - -{-| buildWithLocalState: - { view : - { shared : Elm.Expression, model : Elm.Expression, app : Elm.Expression } - -> Elm.Expression - , update : - { shared : Elm.Expression - , app : Elm.Expression - , msg : Elm.Expression - , model : Elm.Expression - } - -> Elm.Expression - , init : { shared : Elm.Expression, app : Elm.Expression } -> Elm.Expression - , subscriptions : - { routeParams : Elm.Expression - , path : Elm.Expression - , shared : Elm.Expression - , model : Elm.Expression - } - -> Elm.Expression - , msg : Scaffold.Route.Type - , model : Scaffold.Route.Type - } - -> Scaffold.Route.Builder - -> { path : String, body : String } --} -buildWithLocalState : - { view : Elm.Expression -> Elm.Expression - , update : Elm.Expression -> Elm.Expression - , init : Elm.Expression -> Elm.Expression - , subscriptions : Elm.Expression -> Elm.Expression - , msg : Elm.Expression - , model : Elm.Expression - } - -> Elm.Expression - -> Elm.Expression -buildWithLocalState buildWithLocalStateArg_ buildWithLocalStateArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "buildWithLocalState" - , annotation = - Just - (Type.function - [ Type.record - [ ( "view" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "update" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "msg" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "init" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "subscriptions" - , Type.function - [ Type.record - [ ( "routeParams" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "path" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "msg" - , Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - , ( "model" - , Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - ] - , Type.namedWith [ "Scaffold", "Route" ] "Builder" [] - ] - (Type.record - [ ( "path", Type.string ) - , ( "body", Type.string ) - ] - ) - ) - } - ) - [ Elm.record - [ Tuple.pair - "view" - (Elm.functionReduced - "buildWithLocalStateUnpack" - buildWithLocalStateArg_.view - ) - , Tuple.pair - "update" - (Elm.functionReduced - "buildWithLocalStateUnpack" - buildWithLocalStateArg_.update - ) - , Tuple.pair - "init" - (Elm.functionReduced - "buildWithLocalStateUnpack" - buildWithLocalStateArg_.init - ) - , Tuple.pair - "subscriptions" - (Elm.functionReduced - "buildWithLocalStateUnpack" - buildWithLocalStateArg_.subscriptions - ) - , Tuple.pair "msg" buildWithLocalStateArg_.msg - , Tuple.pair "model" buildWithLocalStateArg_.model - ] - , buildWithLocalStateArg_0 - ] - - -{-| buildWithSharedState: - { view : - { shared : Elm.Expression, model : Elm.Expression, app : Elm.Expression } - -> Elm.Expression - , update : - { shared : Elm.Expression - , app : Elm.Expression - , msg : Elm.Expression - , model : Elm.Expression - } - -> Elm.Expression - , init : { shared : Elm.Expression, app : Elm.Expression } -> Elm.Expression - , subscriptions : - { routeParams : Elm.Expression - , path : Elm.Expression - , shared : Elm.Expression - , model : Elm.Expression - } - -> Elm.Expression - , msg : Scaffold.Route.Type - , model : Scaffold.Route.Type - } - -> Scaffold.Route.Builder - -> { path : String, body : String } --} -buildWithSharedState : - { view : Elm.Expression -> Elm.Expression - , update : Elm.Expression -> Elm.Expression - , init : Elm.Expression -> Elm.Expression - , subscriptions : Elm.Expression -> Elm.Expression - , msg : Elm.Expression - , model : Elm.Expression - } - -> Elm.Expression - -> Elm.Expression -buildWithSharedState buildWithSharedStateArg_ buildWithSharedStateArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "buildWithSharedState" - , annotation = - Just - (Type.function - [ Type.record - [ ( "view" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "update" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "msg" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "init" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "subscriptions" - , Type.function - [ Type.record - [ ( "routeParams" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "path" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "msg" - , Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - , ( "model" - , Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - ] - , Type.namedWith [ "Scaffold", "Route" ] "Builder" [] - ] - (Type.record - [ ( "path", Type.string ) - , ( "body", Type.string ) - ] - ) - ) - } - ) - [ Elm.record - [ Tuple.pair - "view" - (Elm.functionReduced - "buildWithSharedStateUnpack" - buildWithSharedStateArg_.view - ) - , Tuple.pair - "update" - (Elm.functionReduced - "buildWithSharedStateUnpack" - buildWithSharedStateArg_.update - ) - , Tuple.pair - "init" - (Elm.functionReduced - "buildWithSharedStateUnpack" - buildWithSharedStateArg_.init - ) - , Tuple.pair - "subscriptions" - (Elm.functionReduced - "buildWithSharedStateUnpack" - buildWithSharedStateArg_.subscriptions - ) - , Tuple.pair "msg" buildWithSharedStateArg_.msg - , Tuple.pair "model" buildWithSharedStateArg_.model - ] - , buildWithSharedStateArg_0 - ] - - -{-| buildNoState: - { view : { shared : Elm.Expression, app : Elm.Expression } -> Elm.Expression } - -> Scaffold.Route.Builder - -> { path : String, body : String } --} -buildNoState : - { view : Elm.Expression -> Elm.Expression } - -> Elm.Expression - -> Elm.Expression -buildNoState buildNoStateArg_ buildNoStateArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "buildNoState" - , annotation = - Just - (Type.function - [ Type.record - [ ( "view" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - ] - , Type.namedWith [ "Scaffold", "Route" ] "Builder" [] - ] - (Type.record - [ ( "path", Type.string ) - , ( "body", Type.string ) - ] - ) - ) - } - ) - [ Elm.record - [ Tuple.pair - "view" - (Elm.functionReduced - "buildNoStateUnpack" - buildNoStateArg_.view - ) - ] - , buildNoStateArg_0 - ] - - -{-| serverRender: - { data : - ( Scaffold.Route.Type, Elm.Expression -> Elm.Expression -> Elm.Expression ) - , action : - ( Scaffold.Route.Type, Elm.Expression -> Elm.Expression -> Elm.Expression ) - , head : Elm.Expression -> Elm.Expression - , moduleName : List String - } - -> Scaffold.Route.Builder --} -serverRender : - { data : Elm.Expression - , action : Elm.Expression - , head : Elm.Expression -> Elm.Expression - , moduleName : List String - } - -> Elm.Expression -serverRender serverRenderArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "serverRender" - , annotation = - Just - (Type.function - [ Type.record - [ ( "data" - , Type.tuple - (Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - (Type.function - [ Type.namedWith - [ "Elm" ] - "Expression" - [] - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ] - (Type.namedWith [ "Elm" ] "Expression" [] - ) - ) - ) - , ( "action" - , Type.tuple - (Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - (Type.function - [ Type.namedWith - [ "Elm" ] - "Expression" - [] - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ] - (Type.namedWith [ "Elm" ] "Expression" [] - ) - ) - ) - , ( "head" - , Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "moduleName", Type.list Type.string ) - ] - ] - (Type.namedWith [ "Scaffold", "Route" ] "Builder" []) - ) - } - ) - [ Elm.record - [ Tuple.pair "data" serverRenderArg_.data - , Tuple.pair "action" serverRenderArg_.action - , Tuple.pair - "head" - (Elm.functionReduced - "serverRenderUnpack" - serverRenderArg_.head - ) - , Tuple.pair - "moduleName" - (Elm.list (List.map Elm.string serverRenderArg_.moduleName)) - ] - ] - - -{-| Will scaffold using `RouteBuilder.preRender` if there are any dynamic segments (as in `Company.Team.Name_`), -or using `RouteBuilder.single` if there are no dynamic segments (as in `Company.AboutUs`). - -When there are no dynamic segments, the `pages` field will be ignored as it is only relevant for Routes with dynamic segments. - -For dynamic segments, the `routeParams` parameter in the `data` function will be an `Elm.Expression` with the `RouteParams` parameter in the `data` function. -For static segments, it will be a hardcoded empty record (`{}`). - -preRender: - { data : ( Scaffold.Route.Type, Elm.Expression -> Elm.Expression ) - , pages : Elm.Expression - , head : Elm.Expression -> Elm.Expression - , moduleName : List String - } - -> Scaffold.Route.Builder --} -preRender : - { data : Elm.Expression - , pages : Elm.Expression - , head : Elm.Expression -> Elm.Expression - , moduleName : List String - } - -> Elm.Expression -preRender preRenderArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "preRender" - , annotation = - Just - (Type.function - [ Type.record - [ ( "data" - , Type.tuple - (Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - (Type.function - [ Type.namedWith - [ "Elm" ] - "Expression" - [] - ] - (Type.namedWith [ "Elm" ] "Expression" [] - ) - ) - ) - , ( "pages" - , Type.namedWith [ "Elm" ] "Expression" [] - ) - , ( "head" - , Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "moduleName", Type.list Type.string ) - ] - ] - (Type.namedWith [ "Scaffold", "Route" ] "Builder" []) - ) - } - ) - [ Elm.record - [ Tuple.pair "data" preRenderArg_.data - , Tuple.pair "pages" preRenderArg_.pages - , Tuple.pair - "head" - (Elm.functionReduced "preRenderUnpack" preRenderArg_.head) - , Tuple.pair - "moduleName" - (Elm.list (List.map Elm.string preRenderArg_.moduleName)) - ] - ] - - -{-| @depreacted. This is obsolete and will be removed in a future release. Use [`preRender`](#preRender) instead. - -If you pass in only static route segments as the `moduleName` to `preRender` it will yield the same result as `single`. - -single: - { data : ( Scaffold.Route.Type, Elm.Expression ) - , head : Elm.Expression -> Elm.Expression - , moduleName : List String - } - -> Scaffold.Route.Builder --} -single : - { data : Elm.Expression - , head : Elm.Expression -> Elm.Expression - , moduleName : List String - } - -> Elm.Expression -single singleArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "single" - , annotation = - Just - (Type.function - [ Type.record - [ ( "data" - , Type.tuple - (Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "head" - , Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "moduleName", Type.list Type.string ) - ] - ] - (Type.namedWith [ "Scaffold", "Route" ] "Builder" []) - ) - } - ) - [ Elm.record - [ Tuple.pair "data" singleArg_.data - , Tuple.pair - "head" - (Elm.functionReduced "singleUnpack" singleArg_.head) - , Tuple.pair - "moduleName" - (Elm.list (List.map Elm.string singleArg_.moduleName)) - ] - ] - - -{-| The helpers in this module help you generate a Route module file with the core boilerplate abstracted away. - -You can also define additional top-level declarations in the generated Route module using this helper. - -addDeclarations: List Elm.Declaration -> Scaffold.Route.Builder -> Scaffold.Route.Builder --} -addDeclarations : List Elm.Expression -> Elm.Expression -> Elm.Expression -addDeclarations addDeclarationsArg_ addDeclarationsArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "addDeclarations" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith [ "Elm" ] "Declaration" []) - , Type.namedWith [ "Scaffold", "Route" ] "Builder" [] - ] - (Type.namedWith [ "Scaffold", "Route" ] "Builder" []) - ) - } - ) - [ Elm.list addDeclarationsArg_, addDeclarationsArg_0 ] - - -{-| A positional argument for elm-cli-options-parser that does a Regex validation to check that the module name is a valid Elm Route module name. - -moduleNameCliArg: - Cli.Option.Option from String builderState - -> Cli.Option.Option from (List String) builderState --} -moduleNameCliArg : Elm.Expression -> Elm.Expression -moduleNameCliArg moduleNameCliArgArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "moduleNameCliArg" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Cli", "Option" ] - "Option" - [ Type.var "from" - , Type.string - , Type.var "builderState" - ] - ] - (Type.namedWith - [ "Cli", "Option" ] - "Option" - [ Type.var "from" - , Type.list Type.string - , Type.var "builderState" - ] - ) - ) - } - ) - [ moduleNameCliArgArg_ ] - - -annotation_ : { builder : Type.Annotation, type_ : Type.Annotation } -annotation_ = - { builder = Type.namedWith [ "Scaffold", "Route" ] "Builder" [] - , type_ = Type.namedWith [ "Scaffold", "Route" ] "Type" [] - } - - -make_ : - { alias : Elm.Expression -> Elm.Expression - , custom : Elm.Expression -> Elm.Expression - } -make_ = - { alias = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "Alias" - , annotation = Just (Type.namedWith [] "Type" []) - } - ) - [ ar0 ] - , custom = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "Custom" - , annotation = Just (Type.namedWith [] "Type" []) - } - ) - [ ar0 ] - } - - -caseOf_ = - { type_ = - \typeExpression typeTags -> - Elm.Case.custom - typeExpression - (Type.namedWith [ "Scaffold", "Route" ] "Type" []) - [ Elm.Case.branch - (Elm.Arg.customType "Alias" typeTags.alias |> Elm.Arg.item - (Elm.Arg.varWith - "elmAnnotationAnnotation" - (Type.namedWith - [ "Elm" - , "Annotation" - ] - "Annotation" - [] - ) - ) - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Custom" typeTags.custom |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - (Type.list - (Type.namedWith - [ "Elm" - ] - "Variant" - [] - ) - ) - ) - ) - Basics.identity - ] - } - - -call_ : - { buildWithLocalState : Elm.Expression -> Elm.Expression -> Elm.Expression - , buildWithSharedState : Elm.Expression -> Elm.Expression -> Elm.Expression - , buildNoState : Elm.Expression -> Elm.Expression -> Elm.Expression - , serverRender : Elm.Expression -> Elm.Expression - , preRender : Elm.Expression -> Elm.Expression - , single : Elm.Expression -> Elm.Expression - , addDeclarations : Elm.Expression -> Elm.Expression -> Elm.Expression - , moduleNameCliArg : Elm.Expression -> Elm.Expression - } -call_ = - { buildWithLocalState = - \buildWithLocalStateArg_ buildWithLocalStateArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "buildWithLocalState" - , annotation = - Just - (Type.function - [ Type.record - [ ( "view" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - , ( "update" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "msg" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - , ( "init" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - , ( "subscriptions" - , Type.function - [ Type.record - [ ( "routeParams" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "path" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - , ( "msg" - , Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - , ( "model" - , Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - ] - , Type.namedWith - [ "Scaffold", "Route" ] - "Builder" - [] - ] - (Type.record - [ ( "path", Type.string ) - , ( "body", Type.string ) - ] - ) - ) - } - ) - [ buildWithLocalStateArg_, buildWithLocalStateArg_0 ] - , buildWithSharedState = - \buildWithSharedStateArg_ buildWithSharedStateArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "buildWithSharedState" - , annotation = - Just - (Type.function - [ Type.record - [ ( "view" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - , ( "update" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "msg" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - , ( "init" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - , ( "subscriptions" - , Type.function - [ Type.record - [ ( "routeParams" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "path" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - , ( "msg" - , Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - , ( "model" - , Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - ] - , Type.namedWith - [ "Scaffold", "Route" ] - "Builder" - [] - ] - (Type.record - [ ( "path", Type.string ) - , ( "body", Type.string ) - ] - ) - ) - } - ) - [ buildWithSharedStateArg_, buildWithSharedStateArg_0 ] - , buildNoState = - \buildNoStateArg_ buildNoStateArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "buildNoState" - , annotation = - Just - (Type.function - [ Type.record - [ ( "view" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - ] - , Type.namedWith - [ "Scaffold", "Route" ] - "Builder" - [] - ] - (Type.record - [ ( "path", Type.string ) - , ( "body", Type.string ) - ] - ) - ) - } - ) - [ buildNoStateArg_, buildNoStateArg_0 ] - , serverRender = - \serverRenderArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "serverRender" - , annotation = - Just - (Type.function - [ Type.record - [ ( "data" - , Type.tuple - (Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - (Type.function - [ Type.namedWith - [ "Elm" ] - "Expression" - [] - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - ) - , ( "action" - , Type.tuple - (Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - (Type.function - [ Type.namedWith - [ "Elm" ] - "Expression" - [] - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - ) - , ( "head" - , Type.function - [ Type.namedWith - [ "Elm" ] - "Expression" - [] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - , ( "moduleName", Type.list Type.string ) - ] - ] - (Type.namedWith - [ "Scaffold", "Route" ] - "Builder" - [] - ) - ) - } - ) - [ serverRenderArg_ ] - , preRender = - \preRenderArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "preRender" - , annotation = - Just - (Type.function - [ Type.record - [ ( "data" - , Type.tuple - (Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - (Type.function - [ Type.namedWith - [ "Elm" ] - "Expression" - [] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - ) - , ( "pages" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "head" - , Type.function - [ Type.namedWith - [ "Elm" ] - "Expression" - [] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - , ( "moduleName", Type.list Type.string ) - ] - ] - (Type.namedWith - [ "Scaffold", "Route" ] - "Builder" - [] - ) - ) - } - ) - [ preRenderArg_ ] - , single = - \singleArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "single" - , annotation = - Just - (Type.function - [ Type.record - [ ( "data" - , Type.tuple - (Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - , ( "head" - , Type.function - [ Type.namedWith - [ "Elm" ] - "Expression" - [] - ] - (Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ) - , ( "moduleName", Type.list Type.string ) - ] - ] - (Type.namedWith - [ "Scaffold", "Route" ] - "Builder" - [] - ) - ) - } - ) - [ singleArg_ ] - , addDeclarations = - \addDeclarationsArg_ addDeclarationsArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "addDeclarations" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith [ "Elm" ] "Declaration" [] - ) - , Type.namedWith - [ "Scaffold", "Route" ] - "Builder" - [] - ] - (Type.namedWith - [ "Scaffold", "Route" ] - "Builder" - [] - ) - ) - } - ) - [ addDeclarationsArg_, addDeclarationsArg_0 ] - , moduleNameCliArg = - \moduleNameCliArgArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "moduleNameCliArg" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Cli", "Option" ] - "Option" - [ Type.var "from" - , Type.string - , Type.var "builderState" - ] - ] - (Type.namedWith - [ "Cli", "Option" ] - "Option" - [ Type.var "from" - , Type.list Type.string - , Type.var "builderState" - ] - ) - ) - } - ) - [ moduleNameCliArgArg_ ] - } - - -values_ : - { buildWithLocalState : Elm.Expression - , buildWithSharedState : Elm.Expression - , buildNoState : Elm.Expression - , serverRender : Elm.Expression - , preRender : Elm.Expression - , single : Elm.Expression - , addDeclarations : Elm.Expression - , moduleNameCliArg : Elm.Expression - } -values_ = - { buildWithLocalState = - Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "buildWithLocalState" - , annotation = - Just - (Type.function - [ Type.record - [ ( "view" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "update" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "msg" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "init" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "subscriptions" - , Type.function - [ Type.record - [ ( "routeParams" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "path" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "msg" - , Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - , ( "model" - , Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - ] - , Type.namedWith [ "Scaffold", "Route" ] "Builder" [] - ] - (Type.record - [ ( "path", Type.string ) - , ( "body", Type.string ) - ] - ) - ) - } - , buildWithSharedState = - Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "buildWithSharedState" - , annotation = - Just - (Type.function - [ Type.record - [ ( "view" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "update" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "msg" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "init" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "subscriptions" - , Type.function - [ Type.record - [ ( "routeParams" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "path" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "model" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "msg" - , Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - , ( "model" - , Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - ] - , Type.namedWith [ "Scaffold", "Route" ] "Builder" [] - ] - (Type.record - [ ( "path", Type.string ) - , ( "body", Type.string ) - ] - ) - ) - } - , buildNoState = - Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "buildNoState" - , annotation = - Just - (Type.function - [ Type.record - [ ( "view" - , Type.function - [ Type.record - [ ( "shared" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - , ( "app" - , Type.namedWith - [ "Elm" ] - "Expression" - [] - ) - ] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - ] - , Type.namedWith [ "Scaffold", "Route" ] "Builder" [] - ] - (Type.record - [ ( "path", Type.string ) - , ( "body", Type.string ) - ] - ) - ) - } - , serverRender = - Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "serverRender" - , annotation = - Just - (Type.function - [ Type.record - [ ( "data" - , Type.tuple - (Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - (Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] - , Type.namedWith [ "Elm" ] "Expression" [] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - ) - , ( "action" - , Type.tuple - (Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - (Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] - , Type.namedWith [ "Elm" ] "Expression" [] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - ) - , ( "head" - , Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "moduleName", Type.list Type.string ) - ] - ] - (Type.namedWith [ "Scaffold", "Route" ] "Builder" []) - ) - } - , preRender = - Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "preRender" - , annotation = - Just - (Type.function - [ Type.record - [ ( "data" - , Type.tuple - (Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - (Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] - ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - ) - , ( "pages" - , Type.namedWith [ "Elm" ] "Expression" [] - ) - , ( "head" - , Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "moduleName", Type.list Type.string ) - ] - ] - (Type.namedWith [ "Scaffold", "Route" ] "Builder" []) - ) - } - , single = - Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "single" - , annotation = - Just - (Type.function - [ Type.record - [ ( "data" - , Type.tuple - (Type.namedWith - [ "Scaffold", "Route" ] - "Type" - [] - ) - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "head" - , Type.function - [ Type.namedWith [ "Elm" ] "Expression" [] ] - (Type.namedWith [ "Elm" ] "Expression" []) - ) - , ( "moduleName", Type.list Type.string ) - ] - ] - (Type.namedWith [ "Scaffold", "Route" ] "Builder" []) - ) - } - , addDeclarations = - Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "addDeclarations" - , annotation = - Just - (Type.function - [ Type.list (Type.namedWith [ "Elm" ] "Declaration" []) - , Type.namedWith [ "Scaffold", "Route" ] "Builder" [] - ] - (Type.namedWith [ "Scaffold", "Route" ] "Builder" []) - ) - } - , moduleNameCliArg = - Elm.value - { importFrom = [ "Scaffold", "Route" ] - , name = "moduleNameCliArg" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Cli", "Option" ] - "Option" - [ Type.var "from" - , Type.string - , Type.var "builderState" - ] - ] - (Type.namedWith - [ "Cli", "Option" ] - "Option" - [ Type.var "from" - , Type.list Type.string - , Type.var "builderState" - ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Server/Request.elm b/codegen/Gen/Server/Request.elm deleted file mode 100644 index cfe1569f..00000000 --- a/codegen/Gen/Server/Request.elm +++ /dev/null @@ -1,1502 +0,0 @@ -module Gen.Server.Request exposing - ( moduleName_, requestTime, header, headers, method, methodToString - , body, jsonBody, formData, formDataWithServerValidation, rawFormData, rawUrl, queryParam - , queryParams, matchesContentType, cookie, cookies, annotation_, make_, caseOf_ - , call_, values_ - ) - -{-| -# Generated bindings for Server.Request - -@docs moduleName_, requestTime, header, headers, method, methodToString -@docs body, jsonBody, formData, formDataWithServerValidation, rawFormData, rawUrl -@docs queryParam, queryParams, matchesContentType, cookie, cookies, annotation_ -@docs make_, caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Server", "Request" ] - - -{-| Get the `Time.Posix` when the incoming HTTP request was received. - -requestTime: Server.Request.Request -> Time.Posix --} -requestTime : Elm.Expression -> Elm.Expression -requestTime requestTimeArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "requestTime" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - ) - [ requestTimeArg_ ] - - -{-| Get a header from the request. The header name is case-insensitive. - -Header: Accept-Language: en-US,en;q=0.5 - - request |> Request.header "Accept-Language" - -- Just "Accept-Language: en-US,en;q=0.5" - -header: String -> Server.Request.Request -> Maybe String --} -header : String -> Elm.Expression -> Elm.Expression -header headerArg_ headerArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "header" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.maybe Type.string) - ) - } - ) - [ Elm.string headerArg_, headerArg_0 ] - - -{-| headers: Server.Request.Request -> Dict.Dict String String -} -headers : Elm.Expression -> Elm.Expression -headers headersArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "headers" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.string ] - ) - ) - } - ) - [ headersArg_ ] - - -{-| The [HTTP request method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) of the incoming request. - -Note that Route modules `data` is run for `GET` requests, and `action` is run for other request methods (including `POST`, `PUT`, `DELETE`). -So you don't need to check the `method` in your Route Module's `data` function, though you can choose to do so in its `action`. - -method: Server.Request.Request -> Server.Request.Method --} -method : Elm.Expression -> Elm.Expression -method methodArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "method" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.namedWith [ "Server", "Request" ] "Method" []) - ) - } - ) - [ methodArg_ ] - - -{-| Gets the HTTP Method as an uppercase String. - -Examples: - - Get - |> methodToString - -- "GET" - -methodToString: Server.Request.Method -> String --} -methodToString : Elm.Expression -> Elm.Expression -methodToString methodToStringArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "methodToString" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Method" [] ] - Type.string - ) - } - ) - [ methodToStringArg_ ] - - -{-| The Request body, if present (or `Nothing` if there is no request body). - -body: Server.Request.Request -> Maybe String --} -body : Elm.Expression -> Elm.Expression -body bodyArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "body" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.maybe Type.string) - ) - } - ) - [ bodyArg_ ] - - -{-| If the request has a body and its `Content-Type` matches JSON, then -try running a JSON decoder on the body of the request. Otherwise, return `Nothing`. - -Example: - - Body: { "name": "John" } - Headers: - Content-Type: application/json - request |> jsonBody (Json.Decode.field "name" Json.Decode.string) - -- Just (Ok "John") - - Body: { "name": "John" } - No Headers - jsonBody (Json.Decode.field "name" Json.Decode.string) request - -- Nothing - - No Body - No Headers - jsonBody (Json.Decode.field "name" Json.Decode.string) request - -- Nothing - -jsonBody: - Json.Decode.Decoder value - -> Server.Request.Request - -> Maybe (Result.Result Json.Decode.Error value) --} -jsonBody : Elm.Expression -> Elm.Expression -> Elm.Expression -jsonBody jsonBodyArg_ jsonBodyArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "jsonBody" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "value" ] - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.maybe - (Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "Json", "Decode" ] - "Error" - [] - , Type.var "value" - ] - ) - ) - ) - } - ) - [ jsonBodyArg_, jsonBodyArg_0 ] - - -{-| Takes a [`Form.Handler.Handler`](https://package.elm-lang.org/packages/dillonkearns/elm-form/latest/Form-Handler) and -parses the raw form data into a [`Form.Validated`](https://package.elm-lang.org/packages/dillonkearns/elm-form/latest/Form#Validated) value. - -This is the standard pattern for dealing with form data in `elm-pages`. You can share your code for your [`Form`](https://package.elm-lang.org/packages/dillonkearns/elm-form/latest/Form#Form) -definitions between your client and server code, using this function to parse the raw form data into a `Form.Validated` value for the backend, -and [`Pages.Form`](Pages-Form) to render the `Form` on the client. - -Since we are sharing the `Form` definition between frontend and backend, we get to re-use the same validation logic so we gain confidence that -the validation errors that the user sees on the client are protected on our backend, and vice versa. - - import BackendTask exposing (BackendTask) - import FatalError exposing (FatalError) - import Form - import Server.Request as Request exposing (Request) - import Server.Response as Response exposing (Response) - - type Action - = Delete - | CreateOrUpdate Post - - formHandlers : Form.Handler.Handler String Action - formHandlers = - deleteForm - |> Form.Handler.init (\() -> Delete) - |> Form.Handler.with CreateOrUpdate createOrUpdateForm - - deleteForm : Form.HtmlForm String () input msg - - createOrUpdateForm : Form.HtmlForm String Post Post msg - - action : - RouteParams - -> Request - -> BackendTask FatalError (Response ActionData ErrorPage) - action routeParams request = - case request |> Server.Request.formData formHandlers of - Nothing -> - BackendTask.fail (FatalError.fromString "Missing form data") - - Just ( formResponse, parsedForm ) -> - case parsedForm of - Form.Valid Delete -> - deletePostBySlug routeParams.slug - |> BackendTask.map - (\() -> Route.redirectTo Route.Index) - - Form.Valid (CreateOrUpdate post) -> - let - createPost : Bool - createPost = - okForm.slug == "new" - in - createOrUpdatePost post - |> BackendTask.map - (\() -> - Route.redirectTo - (Route.Admin__Slug_ { slug = okForm.slug }) - ) - - Form.Invalid _ invalidForm -> - BackendTask.succeed - (Server.Response.render - { errors = formResponse } - ) - -You can handle form submissions as either GET or POST requests. Note that for security reasons, it's important to performing mutations with care from GET requests, -since a GET request can be performed from an outside origin by embedding an image that points to the given URL. So a logout submission should be protected by -using `POST` to ensure that you can't log users out by embedding an image with a logout URL in it. - -If the request has HTTP method `GET`, the form data will come from the query parameters. - -If the request has the HTTP method `POST` _and_ the `Content-Type` is `application/x-www-form-urlencoded`, it will return the -decoded form data from the body of the request. - -Otherwise, this `Parser` will not match. - -Note that in server-rendered Route modules, your `data` function will handle `GET` requests (and will _not_ receive any `POST` requests), -while your `action` will receive POST (and other non-GET) requests. - -By default, [`Form`]'s are rendered with a `POST` method, and you can configure them to submit `GET` requests using [`withGetMethod`](https://package.elm-lang.org/packages/dillonkearns/elm-form/latest/Form#withGetMethod). -So you will want to handle any `Form`'s rendered using `withGetMethod` in your Route's `data` function, or otherwise handle forms in `action`. - -formData: - Form.Handler.Handler error combined - -> Server.Request.Request - -> Maybe ( Form.ServerResponse error, Form.Validated error combined ) --} -formData : Elm.Expression -> Elm.Expression -> Elm.Expression -formData formDataArg_ formDataArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "formData" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Form", "Handler" ] - "Handler" - [ Type.var "error", Type.var "combined" ] - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.maybe - (Type.tuple - (Type.namedWith - [ "Form" ] - "ServerResponse" - [ Type.var "error" ] - ) - (Type.namedWith - [ "Form" ] - "Validated" - [ Type.var "error" - , Type.var "combined" - ] - ) - ) - ) - ) - } - ) - [ formDataArg_, formDataArg_0 ] - - -{-| formDataWithServerValidation: - Pages.Form.Handler error combined - -> Server.Request.Request - -> Maybe (BackendTask.BackendTask FatalError.FatalError (Result.Result (Form.ServerResponse error) ( Form.ServerResponse error, combined ))) --} -formDataWithServerValidation : - Elm.Expression -> Elm.Expression -> Elm.Expression -formDataWithServerValidation formDataWithServerValidationArg_ formDataWithServerValidationArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "formDataWithServerValidation" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Form" ] - "Handler" - [ Type.var "error", Type.var "combined" ] - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.maybe - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "Form" ] - "ServerResponse" - [ Type.var "error" ] - , Type.tuple - (Type.namedWith - [ "Form" ] - "ServerResponse" - [ Type.var "error" ] - ) - (Type.var "combined") - ] - ] - ) - ) - ) - } - ) - [ formDataWithServerValidationArg_, formDataWithServerValidationArg_0 ] - - -{-| Get the raw key-value pairs from a form submission. - -If the request has the HTTP method `GET`, it will return the query parameters. - -If the request has the HTTP method `POST` _and_ the `Content-Type` is `application/x-www-form-urlencoded`, it will return the -decoded form data from the body of the request. - -Otherwise, this `Parser` will not match. - -Note that in server-rendered Route modules, your `data` function will handle `GET` requests (and will _not_ receive any `POST` requests), -while your `action` will receive POST (and other non-GET) requests. - -By default, [`Form`]'s are rendered with a `POST` method, and you can configure them to submit `GET` requests using [`withGetMethod`](https://package.elm-lang.org/packages/dillonkearns/elm-form/latest/Form#withGetMethod). -So you will want to handle any `Form`'s rendered using `withGetMethod` in your Route's `data` function, or otherwise handle forms in `action`. - -rawFormData: Server.Request.Request -> Maybe (List ( String, String )) --} -rawFormData : Elm.Expression -> Elm.Expression -rawFormData rawFormDataArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "rawFormData" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.maybe - (Type.list (Type.tuple Type.string Type.string)) - ) - ) - } - ) - [ rawFormDataArg_ ] - - -{-| The full URL of the incoming HTTP request, including the query params. - -Note that the fragment is not included because this is client-only (not sent to the server). - - rawUrl request - - -- url: http://example.com?coupon=abc - -- parses into: "http://example.com?coupon=abc" - - rawUrl request - - -- url: https://example.com?coupon=abc&coupon=xyz - -- parses into: "https://example.com?coupon=abc&coupon=xyz" - -rawUrl: Server.Request.Request -> String --} -rawUrl : Elm.Expression -> Elm.Expression -rawUrl rawUrlArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "rawUrl" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] - ] - Type.string - ) - } - ) - [ rawUrlArg_ ] - - -{-| Get `Nothing` if the query param with the given name is missing, or `Just` the value if it is present. - -If there are multiple query params with the same name, the first one is returned. - - queryParam "coupon" - - -- url: http://example.com?coupon=abc - -- parses into: Just "abc" - - queryParam "coupon" - - -- url: http://example.com?coupon=abc&coupon=xyz - -- parses into: Just "abc" - - queryParam "coupon" - - -- url: http://example.com - -- parses into: Nothing - -See also [`queryParams`](#queryParams), or [`rawUrl`](#rawUrl) if you need something more low-level. - -queryParam: String -> Server.Request.Request -> Maybe String --} -queryParam : String -> Elm.Expression -> Elm.Expression -queryParam queryParamArg_ queryParamArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "queryParam" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.maybe Type.string) - ) - } - ) - [ Elm.string queryParamArg_, queryParamArg_0 ] - - -{-| Gives all query params from the URL. - - queryParam "coupon" - - -- url: http://example.com?coupon=abc - -- parses into: Dict.fromList [("coupon", ["abc"])] - - queryParam "coupon" - - -- url: http://example.com?coupon=abc&coupon=xyz - -- parses into: Dict.fromList [("coupon", ["abc", "xyz"])] - -queryParams: Server.Request.Request -> Dict.Dict String (List String) --} -queryParams : Elm.Expression -> Elm.Expression -queryParams queryParamsArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "queryParams" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.list Type.string ] - ) - ) - } - ) - [ queryParamsArg_ ] - - -{-| True if the `content-type` header is present AND matches the given argument. - -Examples: - - Content-Type: application/json; charset=utf-8 - request |> matchesContentType "application/json" - -- True - - Content-Type: application/json - request |> matchesContentType "application/json" - -- True - - Content-Type: application/json - request |> matchesContentType "application/xml" - -- False - -matchesContentType: String -> Server.Request.Request -> Bool --} -matchesContentType : String -> Elm.Expression -> Elm.Expression -matchesContentType matchesContentTypeArg_ matchesContentTypeArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "matchesContentType" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - Type.bool - ) - } - ) - [ Elm.string matchesContentTypeArg_, matchesContentTypeArg_0 ] - - -{-| Get a cookie from the request. For a more high-level API, see [`Server.Session`](Server-Session). - -cookie: String -> Server.Request.Request -> Maybe String --} -cookie : String -> Elm.Expression -> Elm.Expression -cookie cookieArg_ cookieArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "cookie" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.maybe Type.string) - ) - } - ) - [ Elm.string cookieArg_, cookieArg_0 ] - - -{-| Get all of the cookies from the incoming HTTP request. For a more high-level API, see [`Server.Session`](Server-Session). - -cookies: Server.Request.Request -> Dict.Dict String String --} -cookies : Elm.Expression -> Elm.Expression -cookies cookiesArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "cookies" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.string ] - ) - ) - } - ) - [ cookiesArg_ ] - - -annotation_ : { request : Type.Annotation, method : Type.Annotation } -annotation_ = - { request = - Type.alias - moduleName_ - "Request" - [] - (Type.namedWith [ "Internal", "Request" ] "Request" []) - , method = Type.namedWith [ "Server", "Request" ] "Method" [] - } - - -make_ : - { connect : Elm.Expression - , delete : Elm.Expression - , get : Elm.Expression - , head : Elm.Expression - , options : Elm.Expression - , patch : Elm.Expression - , post : Elm.Expression - , put : Elm.Expression - , trace : Elm.Expression - , nonStandard : Elm.Expression -> Elm.Expression - } -make_ = - { connect = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "Connect" - , annotation = Just (Type.namedWith [] "Method" []) - } - , delete = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "Delete" - , annotation = Just (Type.namedWith [] "Method" []) - } - , get = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "Get" - , annotation = Just (Type.namedWith [] "Method" []) - } - , head = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "Head" - , annotation = Just (Type.namedWith [] "Method" []) - } - , options = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "Options" - , annotation = Just (Type.namedWith [] "Method" []) - } - , patch = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "Patch" - , annotation = Just (Type.namedWith [] "Method" []) - } - , post = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "Post" - , annotation = Just (Type.namedWith [] "Method" []) - } - , put = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "Put" - , annotation = Just (Type.namedWith [] "Method" []) - } - , trace = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "Trace" - , annotation = Just (Type.namedWith [] "Method" []) - } - , nonStandard = - \ar0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "NonStandard" - , annotation = Just (Type.namedWith [] "Method" []) - } - ) - [ ar0 ] - } - - -caseOf_ : - { method : - Elm.Expression - -> { connect : Elm.Expression - , delete : Elm.Expression - , get : Elm.Expression - , head : Elm.Expression - , options : Elm.Expression - , patch : Elm.Expression - , post : Elm.Expression - , put : Elm.Expression - , trace : Elm.Expression - , nonStandard : Elm.Expression -> Elm.Expression - } - -> Elm.Expression - } -caseOf_ = - { method = - \methodExpression methodTags -> - Elm.Case.custom - methodExpression - (Type.namedWith [ "Server", "Request" ] "Method" []) - [ Elm.Case.branch - (Elm.Arg.customType "Connect" methodTags.connect) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Delete" methodTags.delete) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Get" methodTags.get) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Head" methodTags.head) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Options" methodTags.options) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Patch" methodTags.patch) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Post" methodTags.post) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Put" methodTags.put) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Trace" methodTags.trace) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "NonStandard" - methodTags.nonStandard |> Elm.Arg.item - (Elm.Arg.varWith - "arg_0" - Type.string - ) - ) - Basics.identity - ] - } - - -call_ : - { requestTime : Elm.Expression -> Elm.Expression - , header : Elm.Expression -> Elm.Expression -> Elm.Expression - , headers : Elm.Expression -> Elm.Expression - , method : Elm.Expression -> Elm.Expression - , methodToString : Elm.Expression -> Elm.Expression - , body : Elm.Expression -> Elm.Expression - , jsonBody : Elm.Expression -> Elm.Expression -> Elm.Expression - , formData : Elm.Expression -> Elm.Expression -> Elm.Expression - , formDataWithServerValidation : - Elm.Expression -> Elm.Expression -> Elm.Expression - , rawFormData : Elm.Expression -> Elm.Expression - , rawUrl : Elm.Expression -> Elm.Expression - , queryParam : Elm.Expression -> Elm.Expression -> Elm.Expression - , queryParams : Elm.Expression -> Elm.Expression - , matchesContentType : Elm.Expression -> Elm.Expression -> Elm.Expression - , cookie : Elm.Expression -> Elm.Expression -> Elm.Expression - , cookies : Elm.Expression -> Elm.Expression - } -call_ = - { requestTime = - \requestTimeArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "requestTime" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - ) - [ requestTimeArg_ ] - , header = - \headerArg_ headerArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "header" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.maybe Type.string) - ) - } - ) - [ headerArg_, headerArg_0 ] - , headers = - \headersArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "headers" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.string ] - ) - ) - } - ) - [ headersArg_ ] - , method = - \methodArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "method" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.namedWith - [ "Server", "Request" ] - "Method" - [] - ) - ) - } - ) - [ methodArg_ ] - , methodToString = - \methodToStringArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "methodToString" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "Request" ] - "Method" - [] - ] - Type.string - ) - } - ) - [ methodToStringArg_ ] - , body = - \bodyArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "body" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.maybe Type.string) - ) - } - ) - [ bodyArg_ ] - , jsonBody = - \jsonBodyArg_ jsonBodyArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "jsonBody" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "value" ] - , Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.maybe - (Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "Json", "Decode" ] - "Error" - [] - , Type.var "value" - ] - ) - ) - ) - } - ) - [ jsonBodyArg_, jsonBodyArg_0 ] - , formData = - \formDataArg_ formDataArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "formData" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Form", "Handler" ] - "Handler" - [ Type.var "error", Type.var "combined" ] - , Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.maybe - (Type.tuple - (Type.namedWith - [ "Form" ] - "ServerResponse" - [ Type.var "error" ] - ) - (Type.namedWith - [ "Form" ] - "Validated" - [ Type.var "error" - , Type.var "combined" - ] - ) - ) - ) - ) - } - ) - [ formDataArg_, formDataArg_0 ] - , formDataWithServerValidation = - \formDataWithServerValidationArg_ formDataWithServerValidationArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "formDataWithServerValidation" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Form" ] - "Handler" - [ Type.var "error", Type.var "combined" ] - , Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.maybe - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "Form" ] - "ServerResponse" - [ Type.var "error" ] - , Type.tuple - (Type.namedWith - [ "Form" ] - "ServerResponse" - [ Type.var "error" ] - ) - (Type.var "combined") - ] - ] - ) - ) - ) - } - ) - [ formDataWithServerValidationArg_ - , formDataWithServerValidationArg_0 - ] - , rawFormData = - \rawFormDataArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "rawFormData" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.maybe - (Type.list - (Type.tuple Type.string Type.string) - ) - ) - ) - } - ) - [ rawFormDataArg_ ] - , rawUrl = - \rawUrlArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "rawUrl" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - Type.string - ) - } - ) - [ rawUrlArg_ ] - , queryParam = - \queryParamArg_ queryParamArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "queryParam" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.maybe Type.string) - ) - } - ) - [ queryParamArg_, queryParamArg_0 ] - , queryParams = - \queryParamsArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "queryParams" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.list Type.string ] - ) - ) - } - ) - [ queryParamsArg_ ] - , matchesContentType = - \matchesContentTypeArg_ matchesContentTypeArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "matchesContentType" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - Type.bool - ) - } - ) - [ matchesContentTypeArg_, matchesContentTypeArg_0 ] - , cookie = - \cookieArg_ cookieArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "cookie" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.maybe Type.string) - ) - } - ) - [ cookieArg_, cookieArg_0 ] - , cookies = - \cookiesArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Request" ] - , name = "cookies" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.string ] - ) - ) - } - ) - [ cookiesArg_ ] - } - - -values_ : - { requestTime : Elm.Expression - , header : Elm.Expression - , headers : Elm.Expression - , method : Elm.Expression - , methodToString : Elm.Expression - , body : Elm.Expression - , jsonBody : Elm.Expression - , formData : Elm.Expression - , formDataWithServerValidation : Elm.Expression - , rawFormData : Elm.Expression - , rawUrl : Elm.Expression - , queryParam : Elm.Expression - , queryParams : Elm.Expression - , matchesContentType : Elm.Expression - , cookie : Elm.Expression - , cookies : Elm.Expression - } -values_ = - { requestTime = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "requestTime" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - , header = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "header" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.maybe Type.string) - ) - } - , headers = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "headers" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] ] - (Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.string ] - ) - ) - } - , method = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "method" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] ] - (Type.namedWith [ "Server", "Request" ] "Method" []) - ) - } - , methodToString = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "methodToString" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Method" [] ] - Type.string - ) - } - , body = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "body" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] ] - (Type.maybe Type.string) - ) - } - , jsonBody = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "jsonBody" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Decode" ] - "Decoder" - [ Type.var "value" ] - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.maybe - (Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "Json", "Decode" ] - "Error" - [] - , Type.var "value" - ] - ) - ) - ) - } - , formData = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "formData" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Form", "Handler" ] - "Handler" - [ Type.var "error", Type.var "combined" ] - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.maybe - (Type.tuple - (Type.namedWith - [ "Form" ] - "ServerResponse" - [ Type.var "error" ] - ) - (Type.namedWith - [ "Form" ] - "Validated" - [ Type.var "error" - , Type.var "combined" - ] - ) - ) - ) - ) - } - , formDataWithServerValidation = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "formDataWithServerValidation" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Pages", "Form" ] - "Handler" - [ Type.var "error", Type.var "combined" ] - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.maybe - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.namedWith - [ "FatalError" ] - "FatalError" - [] - , Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "Form" ] - "ServerResponse" - [ Type.var "error" ] - , Type.tuple - (Type.namedWith - [ "Form" ] - "ServerResponse" - [ Type.var "error" ] - ) - (Type.var "combined") - ] - ] - ) - ) - ) - } - , rawFormData = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "rawFormData" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] ] - (Type.maybe - (Type.list (Type.tuple Type.string Type.string)) - ) - ) - } - , rawUrl = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "rawUrl" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] ] - Type.string - ) - } - , queryParam = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "queryParam" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.maybe Type.string) - ) - } - , queryParams = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "queryParams" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] ] - (Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.list Type.string ] - ) - ) - } - , matchesContentType = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "matchesContentType" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - Type.bool - ) - } - , cookie = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "cookie" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.maybe Type.string) - ) - } - , cookies = - Elm.value - { importFrom = [ "Server", "Request" ] - , name = "cookies" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "Request" ] "Request" [] ] - (Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.string ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Server/Response.elm b/codegen/Gen/Server/Response.elm deleted file mode 100644 index 489fcee5..00000000 --- a/codegen/Gen/Server/Response.elm +++ /dev/null @@ -1,1275 +0,0 @@ -module Gen.Server.Response exposing - ( moduleName_, render, map, errorPage, mapError, temporaryRedirect - , permanentRedirect, json, plainText, emptyBody, body, bytesBody, base64Body - , withHeader, withHeaders, withStatusCode, withSetCookieHeader, toJson, annotation_, call_ - , values_ - ) - -{-| -# Generated bindings for Server.Response - -@docs moduleName_, render, map, errorPage, mapError, temporaryRedirect -@docs permanentRedirect, json, plainText, emptyBody, body, bytesBody -@docs base64Body, withHeader, withHeaders, withStatusCode, withSetCookieHeader, toJson -@docs annotation_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Server", "Response" ] - - -{-| Render the Route Module with the supplied data. Used for both the `data` and `action` functions in a server-rendered Route Module. - - Response.render project - -render: data -> Server.Response.Response data error --} -render : Elm.Expression -> Elm.Expression -render renderArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "render" - , annotation = - Just - (Type.function - [ Type.var "data" ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ renderArg_ ] - - -{-| Maps the `data` for a Render response. Usually not needed, but always good to have the option. - -map: - (data -> mappedData) - -> Server.Response.Response data error - -> Server.Response.Response mappedData error --} -map : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -map mapArg_ mapArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "data" ] - (Type.var "mappedData") - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "mappedData", Type.var "error" ] - ) - ) - } - ) - [ Elm.functionReduced "mapUnpack" mapArg_, mapArg_0 ] - - -{-| Instead of rendering the current Route Module, you can render an `ErrorPage` such as a 404 page or a 500 error page. - -[Read more about Error Pages](https://elm-pages.com/docs/error-pages) to learn about -defining and rendering your custom ErrorPage type. - -errorPage: errorPage -> Server.Response.Response data errorPage --} -errorPage : Elm.Expression -> Elm.Expression -errorPage errorPageArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "errorPage" - , annotation = - Just - (Type.function - [ Type.var "errorPage" ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "errorPage" ] - ) - ) - } - ) - [ errorPageArg_ ] - - -{-| Maps the `error` for an ErrorPage response. Usually not needed, but always good to have the option. - -mapError: - (errorPage -> mappedErrorPage) - -> Server.Response.Response data errorPage - -> Server.Response.Response data mappedErrorPage --} -mapError : - (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -mapError mapErrorArg_ mapErrorArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "mapError" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "errorPage" ] - (Type.var "mappedErrorPage") - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "errorPage" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "mappedErrorPage" ] - ) - ) - } - ) - [ Elm.functionReduced "mapErrorUnpack" mapErrorArg_, mapErrorArg_0 ] - - -{-| temporaryRedirect: String -> Server.Response.Response data error -} -temporaryRedirect : String -> Elm.Expression -temporaryRedirect temporaryRedirectArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "temporaryRedirect" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ Elm.string temporaryRedirectArg_ ] - - -{-| Build a 308 permanent redirect response. - -Permanent redirects tell the browser that a resource has permanently moved. If you redirect because a user is not logged in, -then you **do not** want to use a permanent redirect because the page they are looking for hasn't changed, you are just -temporarily pointing them to a new page since they need to authenticate. - -Permanent redirects are aggressively cached so be careful not to use them when you mean to use temporary redirects instead. - -If you need to specifically rely on a 301 permanent redirect (see on the difference between 301 and 308), -use `customResponse` instead. - -permanentRedirect: String -> Server.Response.Response data error --} -permanentRedirect : String -> Elm.Expression -permanentRedirect permanentRedirectArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "permanentRedirect" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ Elm.string permanentRedirectArg_ ] - - -{-| Build a JSON body from a `Json.Encode.Value`. - - Json.Encode.object - [ ( "message", Json.Encode.string "Hello" ) ] - |> Response.json - -Sets the `Content-Type` to `application/json`. - -json: Json.Encode.Value -> Server.Response.Response data error --} -json : Elm.Expression -> Elm.Expression -json jsonArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "json" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Json", "Encode" ] "Value" [] ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ jsonArg_ ] - - -{-| Build a `Response` with a String body. Sets the `Content-Type` to `text/plain`. - - Response.plainText "Hello" - -plainText: String -> Server.Response.Response data error --} -plainText : String -> Elm.Expression -plainText plainTextArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "plainText" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ Elm.string plainTextArg_ ] - - -{-| Build a `Response` with no HTTP response body. - -emptyBody: Server.Response.Response data error --} -emptyBody : Elm.Expression -emptyBody = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "emptyBody" - , annotation = - Just - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - } - - -{-| Same as [`plainText`](#plainText), but doesn't set a `Content-Type`. - -body: String -> Server.Response.Response data error --} -body : String -> Elm.Expression -body bodyArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "body" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ Elm.string bodyArg_ ] - - -{-| Build a `Response` with a `Bytes`. - -Under the hood, it will be converted to a base64 encoded String with `isBase64Encoded = True`. -Your adapter will need to handle `isBase64Encoded` to turn it into the appropriate response. - -bytesBody: Bytes.Bytes -> Server.Response.Response data error --} -bytesBody : Elm.Expression -> Elm.Expression -bytesBody bytesBodyArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "bytesBody" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Bytes" [] ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ bytesBodyArg_ ] - - -{-| Build a `Response` with a String that should represent a base64 encoded value. - -Your adapter will need to handle `isBase64Encoded` to turn it into the appropriate response. - - Response.base64Body "SGVsbG8gV29ybGQ=" - -base64Body: String -> Server.Response.Response data error --} -base64Body : String -> Elm.Expression -base64Body base64BodyArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "base64Body" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ Elm.string base64BodyArg_ ] - - -{-| Add a header to the response. - - Response.plainText "Hello!" - -- allow CORS requests - |> Response.withHeader "Access-Control-Allow-Origin" "*" - |> Response.withHeader "Access-Control-Allow-Methods" "GET, POST, OPTIONS" - -withHeader: - String - -> String - -> Server.Response.Response data error - -> Server.Response.Response data error --} -withHeader : String -> String -> Elm.Expression -> Elm.Expression -withHeader withHeaderArg_ withHeaderArg_0 withHeaderArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "withHeader" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ Elm.string withHeaderArg_ - , Elm.string withHeaderArg_0 - , withHeaderArg_1 - ] - - -{-| Same as [`withHeader`](#withHeader), but allows you to add multiple headers at once. - - Response.plainText "Hello!" - -- allow CORS requests - |> Response.withHeaders - [ ( "Access-Control-Allow-Origin", "*" ) - , ( "Access-Control-Allow-Methods", "GET, POST, OPTIONS" ) - ] - -withHeaders: - List ( String, String ) - -> Server.Response.Response data error - -> Server.Response.Response data error --} -withHeaders : List Elm.Expression -> Elm.Expression -> Elm.Expression -withHeaders withHeadersArg_ withHeadersArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "withHeaders" - , annotation = - Just - (Type.function - [ Type.list (Type.tuple Type.string Type.string) - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ Elm.list withHeadersArg_, withHeadersArg_0 ] - - -{-| Set the [HTTP Response status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) for the `Response`. - - Response.plainText "Not Authorized" - |> Response.withStatusCode 401 - -withStatusCode: - Int - -> Server.Response.Response data Basics.Never - -> Server.Response.Response data Basics.Never --} -withStatusCode : Int -> Elm.Expression -> Elm.Expression -withStatusCode withStatusCodeArg_ withStatusCodeArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "withStatusCode" - , annotation = - Just - (Type.function - [ Type.int - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.namedWith [ "Basics" ] "Never" [] - ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.namedWith [ "Basics" ] "Never" [] - ] - ) - ) - } - ) - [ Elm.int withStatusCodeArg_, withStatusCodeArg_0 ] - - -{-| Set a [`Server.SetCookie`](Server-SetCookie) value on the response. - -The easiest way to manage cookies in your Routes is through the [`Server.Session`](Server-Session) API, but this -provides a more granular way to set cookies. - -withSetCookieHeader: - Server.SetCookie.SetCookie - -> Server.Response.Response data error - -> Server.Response.Response data error --} -withSetCookieHeader : Elm.Expression -> Elm.Expression -> Elm.Expression -withSetCookieHeader withSetCookieHeaderArg_ withSetCookieHeaderArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "withSetCookieHeader" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "SetCookie" - [] - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ withSetCookieHeaderArg_, withSetCookieHeaderArg_0 ] - - -{-| For internal use or more advanced use cases for meta frameworks. - -toJson: Server.Response.Response Basics.Never Basics.Never -> Json.Encode.Value --} -toJson : Elm.Expression -> Elm.Expression -toJson toJsonArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "toJson" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.namedWith [ "Basics" ] "Never" [] - , Type.namedWith [ "Basics" ] "Never" [] - ] - ] - (Type.namedWith [ "Json", "Encode" ] "Value" []) - ) - } - ) - [ toJsonArg_ ] - - -annotation_ : - { response : Type.Annotation -> Type.Annotation -> Type.Annotation } -annotation_ = - { response = - \responseArg0 responseArg1 -> - Type.alias - moduleName_ - "Response" - [ responseArg0, responseArg1 ] - (Type.namedWith - [ "PageServerResponse" ] - "PageServerResponse" - [ Type.var "data", Type.var "error" ] - ) - } - - -call_ : - { render : Elm.Expression -> Elm.Expression - , map : Elm.Expression -> Elm.Expression -> Elm.Expression - , errorPage : Elm.Expression -> Elm.Expression - , mapError : Elm.Expression -> Elm.Expression -> Elm.Expression - , temporaryRedirect : Elm.Expression -> Elm.Expression - , permanentRedirect : Elm.Expression -> Elm.Expression - , json : Elm.Expression -> Elm.Expression - , plainText : Elm.Expression -> Elm.Expression - , body : Elm.Expression -> Elm.Expression - , bytesBody : Elm.Expression -> Elm.Expression - , base64Body : Elm.Expression -> Elm.Expression - , withHeader : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , withHeaders : Elm.Expression -> Elm.Expression -> Elm.Expression - , withStatusCode : Elm.Expression -> Elm.Expression -> Elm.Expression - , withSetCookieHeader : Elm.Expression -> Elm.Expression -> Elm.Expression - , toJson : Elm.Expression -> Elm.Expression - } -call_ = - { render = - \renderArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "render" - , annotation = - Just - (Type.function - [ Type.var "data" ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ renderArg_ ] - , map = - \mapArg_ mapArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "data" ] - (Type.var "mappedData") - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "mappedData" - , Type.var "error" - ] - ) - ) - } - ) - [ mapArg_, mapArg_0 ] - , errorPage = - \errorPageArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "errorPage" - , annotation = - Just - (Type.function - [ Type.var "errorPage" ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "errorPage" ] - ) - ) - } - ) - [ errorPageArg_ ] - , mapError = - \mapErrorArg_ mapErrorArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "mapError" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "errorPage" ] - (Type.var "mappedErrorPage") - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "errorPage" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.var "mappedErrorPage" - ] - ) - ) - } - ) - [ mapErrorArg_, mapErrorArg_0 ] - , temporaryRedirect = - \temporaryRedirectArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "temporaryRedirect" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ temporaryRedirectArg_ ] - , permanentRedirect = - \permanentRedirectArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "permanentRedirect" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ permanentRedirectArg_ ] - , json = - \jsonArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "json" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ jsonArg_ ] - , plainText = - \plainTextArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "plainText" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ plainTextArg_ ] - , body = - \bodyArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "body" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ bodyArg_ ] - , bytesBody = - \bytesBodyArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "bytesBody" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Bytes" [] ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ bytesBodyArg_ ] - , base64Body = - \base64BodyArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "base64Body" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ base64BodyArg_ ] - , withHeader = - \withHeaderArg_ withHeaderArg_0 withHeaderArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "withHeader" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ withHeaderArg_, withHeaderArg_0, withHeaderArg_1 ] - , withHeaders = - \withHeadersArg_ withHeadersArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "withHeaders" - , annotation = - Just - (Type.function - [ Type.list - (Type.tuple Type.string Type.string) - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ withHeadersArg_, withHeadersArg_0 ] - , withStatusCode = - \withStatusCodeArg_ withStatusCodeArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "withStatusCode" - , annotation = - Just - (Type.function - [ Type.int - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.namedWith [ "Basics" ] "Never" [] - ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.namedWith [ "Basics" ] "Never" [] - ] - ) - ) - } - ) - [ withStatusCodeArg_, withStatusCodeArg_0 ] - , withSetCookieHeader = - \withSetCookieHeaderArg_ withSetCookieHeaderArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "withSetCookieHeader" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "SetCookie" - [] - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - ) - [ withSetCookieHeaderArg_, withSetCookieHeaderArg_0 ] - , toJson = - \toJsonArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Response" ] - , name = "toJson" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.namedWith [ "Basics" ] "Never" [] - , Type.namedWith [ "Basics" ] "Never" [] - ] - ] - (Type.namedWith - [ "Json", "Encode" ] - "Value" - [] - ) - ) - } - ) - [ toJsonArg_ ] - } - - -values_ : - { render : Elm.Expression - , map : Elm.Expression - , errorPage : Elm.Expression - , mapError : Elm.Expression - , temporaryRedirect : Elm.Expression - , permanentRedirect : Elm.Expression - , json : Elm.Expression - , plainText : Elm.Expression - , emptyBody : Elm.Expression - , body : Elm.Expression - , bytesBody : Elm.Expression - , base64Body : Elm.Expression - , withHeader : Elm.Expression - , withHeaders : Elm.Expression - , withStatusCode : Elm.Expression - , withSetCookieHeader : Elm.Expression - , toJson : Elm.Expression - } -values_ = - { render = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "render" - , annotation = - Just - (Type.function - [ Type.var "data" ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - , map = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "data" ] - (Type.var "mappedData") - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "mappedData", Type.var "error" ] - ) - ) - } - , errorPage = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "errorPage" - , annotation = - Just - (Type.function - [ Type.var "errorPage" ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "errorPage" ] - ) - ) - } - , mapError = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "mapError" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "errorPage" ] - (Type.var "mappedErrorPage") - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "errorPage" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "mappedErrorPage" ] - ) - ) - } - , temporaryRedirect = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "temporaryRedirect" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - , permanentRedirect = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "permanentRedirect" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - , json = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "json" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Json", "Encode" ] "Value" [] ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - , plainText = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "plainText" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - , emptyBody = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "emptyBody" - , annotation = - Just - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - } - , body = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "body" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - , bytesBody = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "bytesBody" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Bytes" ] "Bytes" [] ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - , base64Body = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "base64Body" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - , withHeader = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "withHeader" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - , withHeaders = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "withHeaders" - , annotation = - Just - (Type.function - [ Type.list (Type.tuple Type.string Type.string) - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - , withStatusCode = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "withStatusCode" - , annotation = - Just - (Type.function - [ Type.int - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.namedWith [ "Basics" ] "Never" [] - ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.namedWith [ "Basics" ] "Never" [] - ] - ) - ) - } - , withSetCookieHeader = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "withSetCookieHeader" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "SetCookie" - [] - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ] - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "error" ] - ) - ) - } - , toJson = - Elm.value - { importFrom = [ "Server", "Response" ] - , name = "toJson" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.namedWith [ "Basics" ] "Never" [] - , Type.namedWith [ "Basics" ] "Never" [] - ] - ] - (Type.namedWith [ "Json", "Encode" ] "Value" []) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Server/Session.elm b/codegen/Gen/Server/Session.elm deleted file mode 100644 index b9aa0911..00000000 --- a/codegen/Gen/Server/Session.elm +++ /dev/null @@ -1,974 +0,0 @@ -module Gen.Server.Session exposing - ( moduleName_, withSession, withSessionResult, empty, get, insert - , remove, update, withFlash, annotation_, make_, caseOf_, call_ - , values_ - ) - -{-| -# Generated bindings for Server.Session - -@docs moduleName_, withSession, withSessionResult, empty, get, insert -@docs remove, update, withFlash, annotation_, make_, caseOf_ -@docs call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Server", "Session" ] - - -{-| The main function for using sessions. If you need more fine-grained control over cases where a session can't be loaded, see -[`withSessionResult`](#withSessionResult). - -withSession: - { name : String - , secrets : BackendTask.BackendTask error (List String) - , options : Maybe Server.SetCookie.Options - } - -> (Server.Session.Session - -> BackendTask.BackendTask error ( Server.Session.Session, Server.Response.Response data errorPage )) - -> Server.Request.Request - -> BackendTask.BackendTask error (Server.Response.Response data errorPage) --} -withSession : - { name : String, secrets : Elm.Expression, options : Elm.Expression } - -> (Elm.Expression -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression -withSession withSessionArg_ withSessionArg_0 withSessionArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Session" ] - , name = "withSession" - , annotation = - Just - (Type.function - [ Type.record - [ ( "name", Type.string ) - , ( "secrets" - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.list Type.string ] - ) - , ( "options" - , Type.maybe - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - ] - , Type.function - [ Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.tuple - (Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ) - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.var "errorPage" - ] - ) - ] - ) - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "errorPage" ] - ] - ) - ) - } - ) - [ Elm.record - [ Tuple.pair "name" (Elm.string withSessionArg_.name) - , Tuple.pair "secrets" withSessionArg_.secrets - , Tuple.pair "options" withSessionArg_.options - ] - , Elm.functionReduced "withSessionUnpack" withSessionArg_0 - , withSessionArg_1 - ] - - -{-| Same as `withSession`, but gives you an `Err` with the reason why the Session couldn't be loaded instead of -using `Session.empty` as a default in the cases where there is an error loading the session. - -A session won't load if there is no session, or if it cannot be unsigned with your secrets. This could be because the cookie was tampered with -or otherwise corrupted, or because the cookie was signed with a secret that is no longer in the rotation. - -withSessionResult: - { name : String - , secrets : BackendTask.BackendTask error (List String) - , options : Maybe Server.SetCookie.Options - } - -> (Result.Result Server.Session.NotLoadedReason Server.Session.Session - -> BackendTask.BackendTask error ( Server.Session.Session, Server.Response.Response data errorPage )) - -> Server.Request.Request - -> BackendTask.BackendTask error (Server.Response.Response data errorPage) --} -withSessionResult : - { name : String, secrets : Elm.Expression, options : Elm.Expression } - -> (Elm.Expression -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression -withSessionResult withSessionResultArg_ withSessionResultArg_0 withSessionResultArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Session" ] - , name = "withSessionResult" - , annotation = - Just - (Type.function - [ Type.record - [ ( "name", Type.string ) - , ( "secrets" - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.list Type.string ] - ) - , ( "options" - , Type.maybe - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - ] - , Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "Server", "Session" ] - "NotLoadedReason" - [] - , Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.tuple - (Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ) - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.var "errorPage" - ] - ) - ] - ) - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "errorPage" ] - ] - ) - ) - } - ) - [ Elm.record - [ Tuple.pair "name" (Elm.string withSessionResultArg_.name) - , Tuple.pair "secrets" withSessionResultArg_.secrets - , Tuple.pair "options" withSessionResultArg_.options - ] - , Elm.functionReduced "withSessionResultUnpack" withSessionResultArg_0 - , withSessionResultArg_1 - ] - - -{-| An empty `Session` with no key-value pairs. - -empty: Server.Session.Session --} -empty : Elm.Expression -empty = - Elm.value - { importFrom = [ "Server", "Session" ] - , name = "empty" - , annotation = - Just (Type.namedWith [ "Server", "Session" ] "Session" []) - } - - -{-| Retrieve a String value from the session for the given key (or `Nothing` if the key is not present). - - (session - |> Session.get "mode" - |> Maybe.withDefault "light" - ) - == "dark" - -get: String -> Server.Session.Session -> Maybe String --} -get : String -> Elm.Expression -> Elm.Expression -get getArg_ getArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Session" ] - , name = "get" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Server", "Session" ] "Session" [] - ] - (Type.maybe Type.string) - ) - } - ) - [ Elm.string getArg_, getArg_0 ] - - -{-| Insert a value under the given key in the `Session`. - - session - |> Session.insert "mode" "dark" - -insert: String -> String -> Server.Session.Session -> Server.Session.Session --} -insert : String -> String -> Elm.Expression -> Elm.Expression -insert insertArg_ insertArg_0 insertArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Session" ] - , name = "insert" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith [ "Server", "Session" ] "Session" [] - ] - (Type.namedWith [ "Server", "Session" ] "Session" []) - ) - } - ) - [ Elm.string insertArg_, Elm.string insertArg_0, insertArg_1 ] - - -{-| Remove a key from the `Session`. - -remove: String -> Server.Session.Session -> Server.Session.Session --} -remove : String -> Elm.Expression -> Elm.Expression -remove removeArg_ removeArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Session" ] - , name = "remove" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Server", "Session" ] "Session" [] - ] - (Type.namedWith [ "Server", "Session" ] "Session" []) - ) - } - ) - [ Elm.string removeArg_, removeArg_0 ] - - -{-| Update the `Session`, given a `Maybe String` of the current value for the given key, and returning a `Maybe String`. - -If you return `Nothing`, the key-value pair will be removed from the `Session` (or left out if it didn't exist in the first place). - - session - |> Session.update "mode" - (\mode -> - case mode of - Just "dark" -> - Just "light" - - Just "light" -> - Just "dark" - - Nothing -> - Just "dark" - ) - -update: - String - -> (Maybe String -> Maybe String) - -> Server.Session.Session - -> Server.Session.Session --} -update : - String - -> (Elm.Expression -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression -update updateArg_ updateArg_0 updateArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Session" ] - , name = "update" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.maybe Type.string ] - (Type.maybe Type.string) - , Type.namedWith [ "Server", "Session" ] "Session" [] - ] - (Type.namedWith [ "Server", "Session" ] "Session" []) - ) - } - ) - [ Elm.string updateArg_ - , Elm.functionReduced "updateUnpack" updateArg_0 - , updateArg_1 - ] - - -{-| Flash session values are values that are only available for the next request. - - session - |> Session.withFlash "message" "Your payment was successful!" - -withFlash: String -> String -> Server.Session.Session -> Server.Session.Session --} -withFlash : String -> String -> Elm.Expression -> Elm.Expression -withFlash withFlashArg_ withFlashArg_0 withFlashArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "Session" ] - , name = "withFlash" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith [ "Server", "Session" ] "Session" [] - ] - (Type.namedWith [ "Server", "Session" ] "Session" []) - ) - } - ) - [ Elm.string withFlashArg_, Elm.string withFlashArg_0, withFlashArg_1 ] - - -annotation_ : { notLoadedReason : Type.Annotation, session : Type.Annotation } -annotation_ = - { notLoadedReason = - Type.namedWith [ "Server", "Session" ] "NotLoadedReason" [] - , session = Type.namedWith [ "Server", "Session" ] "Session" [] - } - - -make_ : - { noSessionCookie : Elm.Expression, invalidSessionCookie : Elm.Expression } -make_ = - { noSessionCookie = - Elm.value - { importFrom = [ "Server", "Session" ] - , name = "NoSessionCookie" - , annotation = Just (Type.namedWith [] "NotLoadedReason" []) - } - , invalidSessionCookie = - Elm.value - { importFrom = [ "Server", "Session" ] - , name = "InvalidSessionCookie" - , annotation = Just (Type.namedWith [] "NotLoadedReason" []) - } - } - - -caseOf_ : - { notLoadedReason : - Elm.Expression - -> { noSessionCookie : Elm.Expression - , invalidSessionCookie : Elm.Expression - } - -> Elm.Expression - } -caseOf_ = - { notLoadedReason = - \notLoadedReasonExpression notLoadedReasonTags -> - Elm.Case.custom - notLoadedReasonExpression - (Type.namedWith [ "Server", "Session" ] "NotLoadedReason" []) - [ Elm.Case.branch - (Elm.Arg.customType - "NoSessionCookie" - notLoadedReasonTags.noSessionCookie - ) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType - "InvalidSessionCookie" - notLoadedReasonTags.invalidSessionCookie - ) - Basics.identity - ] - } - - -call_ : - { withSession : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , withSessionResult : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , get : Elm.Expression -> Elm.Expression -> Elm.Expression - , insert : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , remove : Elm.Expression -> Elm.Expression -> Elm.Expression - , update : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , withFlash : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { withSession = - \withSessionArg_ withSessionArg_0 withSessionArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Session" ] - , name = "withSession" - , annotation = - Just - (Type.function - [ Type.record - [ ( "name", Type.string ) - , ( "secrets" - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.list Type.string - ] - ) - , ( "options" - , Type.maybe - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - ] - , Type.function - [ Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.tuple - (Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ) - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.var "errorPage" - ] - ) - ] - ) - , Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.var "errorPage" - ] - ] - ) - ) - } - ) - [ withSessionArg_, withSessionArg_0, withSessionArg_1 ] - , withSessionResult = - \withSessionResultArg_ withSessionResultArg_0 withSessionResultArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Session" ] - , name = "withSessionResult" - , annotation = - Just - (Type.function - [ Type.record - [ ( "name", Type.string ) - , ( "secrets" - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.list Type.string - ] - ) - , ( "options" - , Type.maybe - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - ] - , Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "Server", "Session" ] - "NotLoadedReason" - [] - , Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.tuple - (Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ) - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.var "errorPage" - ] - ) - ] - ) - , Type.namedWith - [ "Server", "Request" ] - "Request" - [] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.var "errorPage" - ] - ] - ) - ) - } - ) - [ withSessionResultArg_ - , withSessionResultArg_0 - , withSessionResultArg_1 - ] - , get = - \getArg_ getArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Session" ] - , name = "get" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ] - (Type.maybe Type.string) - ) - } - ) - [ getArg_, getArg_0 ] - , insert = - \insertArg_ insertArg_0 insertArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Session" ] - , name = "insert" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ] - (Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ) - ) - } - ) - [ insertArg_, insertArg_0, insertArg_1 ] - , remove = - \removeArg_ removeArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Session" ] - , name = "remove" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ] - (Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ) - ) - } - ) - [ removeArg_, removeArg_0 ] - , update = - \updateArg_ updateArg_0 updateArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Session" ] - , name = "update" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.maybe Type.string ] - (Type.maybe Type.string) - , Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ] - (Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ) - ) - } - ) - [ updateArg_, updateArg_0, updateArg_1 ] - , withFlash = - \withFlashArg_ withFlashArg_0 withFlashArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "Session" ] - , name = "withFlash" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ] - (Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ) - ) - } - ) - [ withFlashArg_, withFlashArg_0, withFlashArg_1 ] - } - - -values_ : - { withSession : Elm.Expression - , withSessionResult : Elm.Expression - , empty : Elm.Expression - , get : Elm.Expression - , insert : Elm.Expression - , remove : Elm.Expression - , update : Elm.Expression - , withFlash : Elm.Expression - } -values_ = - { withSession = - Elm.value - { importFrom = [ "Server", "Session" ] - , name = "withSession" - , annotation = - Just - (Type.function - [ Type.record - [ ( "name", Type.string ) - , ( "secrets" - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.list Type.string ] - ) - , ( "options" - , Type.maybe - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - ] - , Type.function - [ Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.tuple - (Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ) - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.var "errorPage" - ] - ) - ] - ) - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "errorPage" ] - ] - ) - ) - } - , withSessionResult = - Elm.value - { importFrom = [ "Server", "Session" ] - , name = "withSessionResult" - , annotation = - Just - (Type.function - [ Type.record - [ ( "name", Type.string ) - , ( "secrets" - , Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error", Type.list Type.string ] - ) - , ( "options" - , Type.maybe - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - ] - , Type.function - [ Type.namedWith - [ "Result" ] - "Result" - [ Type.namedWith - [ "Server", "Session" ] - "NotLoadedReason" - [] - , Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.tuple - (Type.namedWith - [ "Server", "Session" ] - "Session" - [] - ) - (Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data" - , Type.var "errorPage" - ] - ) - ] - ) - , Type.namedWith [ "Server", "Request" ] "Request" [] - ] - (Type.namedWith - [ "BackendTask" ] - "BackendTask" - [ Type.var "error" - , Type.namedWith - [ "Server", "Response" ] - "Response" - [ Type.var "data", Type.var "errorPage" ] - ] - ) - ) - } - , empty = - Elm.value - { importFrom = [ "Server", "Session" ] - , name = "empty" - , annotation = - Just (Type.namedWith [ "Server", "Session" ] "Session" []) - } - , get = - Elm.value - { importFrom = [ "Server", "Session" ] - , name = "get" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Server", "Session" ] "Session" [] - ] - (Type.maybe Type.string) - ) - } - , insert = - Elm.value - { importFrom = [ "Server", "Session" ] - , name = "insert" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith [ "Server", "Session" ] "Session" [] - ] - (Type.namedWith [ "Server", "Session" ] "Session" []) - ) - } - , remove = - Elm.value - { importFrom = [ "Server", "Session" ] - , name = "remove" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Server", "Session" ] "Session" [] - ] - (Type.namedWith [ "Server", "Session" ] "Session" []) - ) - } - , update = - Elm.value - { importFrom = [ "Server", "Session" ] - , name = "update" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.maybe Type.string ] - (Type.maybe Type.string) - , Type.namedWith [ "Server", "Session" ] "Session" [] - ] - (Type.namedWith [ "Server", "Session" ] "Session" []) - ) - } - , withFlash = - Elm.value - { importFrom = [ "Server", "Session" ] - , name = "withFlash" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith [ "Server", "Session" ] "Session" [] - ] - (Type.namedWith [ "Server", "Session" ] "Session" []) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Server/SetCookie.elm b/codegen/Gen/Server/SetCookie.elm deleted file mode 100644 index 18f0fe6d..00000000 --- a/codegen/Gen/Server/SetCookie.elm +++ /dev/null @@ -1,985 +0,0 @@ -module Gen.Server.SetCookie exposing - ( moduleName_, setCookie, options, withSameSite, withImmediateExpiration, makeVisibleToJavaScript - , nonSecure, withDomain, withExpiration, withMaxAge, withPath, withoutPath, toString - , annotation_, make_, caseOf_, call_, values_ - ) - -{-| -# Generated bindings for Server.SetCookie - -@docs moduleName_, setCookie, options, withSameSite, withImmediateExpiration, makeVisibleToJavaScript -@docs nonSecure, withDomain, withExpiration, withMaxAge, withPath, withoutPath -@docs toString, annotation_, make_, caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Server", "SetCookie" ] - - -{-| Create a `SetCookie` record with the given name, value, and [`Options`](Options]. To add a `Set-Cookie` header, you can -pass this value with [`Server.Response.withSetCookieHeader`](Server-Response#withSetCookieHeader). Or for more low-level -uses you can stringify the value manually with [`toString`](#toString). - -setCookie: String -> String -> Server.SetCookie.Options -> Server.SetCookie.SetCookie --} -setCookie : String -> String -> Elm.Expression -> Elm.Expression -setCookie setCookieArg_ setCookieArg_0 setCookieArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "setCookie" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith - [ "Server", "SetCookie" ] - "SetCookie" - [] - ) - ) - } - ) - [ Elm.string setCookieArg_, Elm.string setCookieArg_0, setCookieArg_1 ] - - -{-| Initialize the default `SetCookie` `Options`. Can be configured directly through a record update, or with `withExpiration`, etc. - -options: Server.SetCookie.Options --} -options : Elm.Expression -options = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "options" - , annotation = - Just (Type.namedWith [ "Server", "SetCookie" ] "Options" []) - } - - -{-| The default SameSite policy is Lax if one is not explicitly set. See the SameSite section in . - -withSameSite: - Server.SetCookie.SameSite - -> Server.SetCookie.Options - -> Server.SetCookie.Options --} -withSameSite : Elm.Expression -> Elm.Expression -> Elm.Expression -withSameSite withSameSiteArg_ withSameSiteArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withSameSite" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "SameSite" - [] - , Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ) - ) - } - ) - [ withSameSiteArg_, withSameSiteArg_0 ] - - -{-| Sets [`Expires`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#expiresdate) to `Time.millisToPosix 0`, -which effectively tells the browser to delete the cookie immediately (by giving it an expiration date in the past). - -withImmediateExpiration: Server.SetCookie.Options -> Server.SetCookie.Options --} -withImmediateExpiration : Elm.Expression -> Elm.Expression -withImmediateExpiration withImmediateExpirationArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withImmediateExpiration" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ) - ) - } - ) - [ withImmediateExpirationArg_ ] - - -{-| The default option in this API is for HttpOnly cookies . - -Cookies can be exposed so you can read them from JavaScript using `Document.cookie`. When this is intended and understood -then there's nothing unsafe about that (for example, if you are setting a `darkMode` cookie and what to access that -dynamically). In this API you opt into exposing a cookie you set to JavaScript to ensure cookies aren't exposed to JS unintentionally. - -In general if you can accomplish your goal using HttpOnly cookies (i.e. not using `makeVisibleToJavaScript`) then -it's a good practice. With server-rendered `elm-pages` applications you can often manage your session state by pulling -in session data from cookies in a `BackendTask` (which is resolved server-side before it ever reaches the browser). - -makeVisibleToJavaScript: Server.SetCookie.Options -> Server.SetCookie.Options --} -makeVisibleToJavaScript : Elm.Expression -> Elm.Expression -makeVisibleToJavaScript makeVisibleToJavaScriptArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "makeVisibleToJavaScript" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ) - ) - } - ) - [ makeVisibleToJavaScriptArg_ ] - - -{-| Secure (only sent over https, or localhost on http) is the default. This overrides that and -removes the `Secure` attribute from the cookie. - -nonSecure: Server.SetCookie.Options -> Server.SetCookie.Options --} -nonSecure : Elm.Expression -> Elm.Expression -nonSecure nonSecureArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "nonSecure" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ) - ) - } - ) - [ nonSecureArg_ ] - - -{-| Sets the `Set-Cookie`'s [`Domain`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#domaindomain-value). - -withDomain: String -> Server.SetCookie.Options -> Server.SetCookie.Options --} -withDomain : String -> Elm.Expression -> Elm.Expression -withDomain withDomainArg_ withDomainArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withDomain" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ) - ) - } - ) - [ Elm.string withDomainArg_, withDomainArg_0 ] - - -{-| withExpiration: Time.Posix -> Server.SetCookie.Options -> Server.SetCookie.Options -} -withExpiration : Elm.Expression -> Elm.Expression -> Elm.Expression -withExpiration withExpirationArg_ withExpirationArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withExpiration" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Posix" [] - , Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ) - ) - } - ) - [ withExpirationArg_, withExpirationArg_0 ] - - -{-| Sets the `Set-Cookie`'s [`Max-Age`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#max-agenumber). - -withMaxAge: Int -> Server.SetCookie.Options -> Server.SetCookie.Options --} -withMaxAge : Int -> Elm.Expression -> Elm.Expression -withMaxAge withMaxAgeArg_ withMaxAgeArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withMaxAge" - , annotation = - Just - (Type.function - [ Type.int - , Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ) - ) - } - ) - [ Elm.int withMaxAgeArg_, withMaxAgeArg_0 ] - - -{-| Sets the `Set-Cookie`'s [`Path`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#pathpath-value). - -The default value is `/`, which will match any sub-directories or the root directory. See also [\`withoutPath](#withoutPath) - -withPath: String -> Server.SetCookie.Options -> Server.SetCookie.Options --} -withPath : String -> Elm.Expression -> Elm.Expression -withPath withPathArg_ withPathArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withPath" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ) - ) - } - ) - [ Elm.string withPathArg_, withPathArg_0 ] - - -{-| > If the server omits the Path attribute, the user agent will use the "directory" of the request-uri's path component as the default value. - -Source: . See . - -withoutPath: Server.SetCookie.Options -> Server.SetCookie.Options --} -withoutPath : Elm.Expression -> Elm.Expression -withoutPath withoutPathArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withoutPath" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ) - ) - } - ) - [ withoutPathArg_ ] - - -{-| Usually you'll want to use [`Server.Response.withSetCookieHeader`](Server-Response#withSetCookieHeader) instead. - -This is a low-level helper that's there in case you want it but most users will never need this. - -toString: Server.SetCookie.SetCookie -> String --} -toString : Elm.Expression -> Elm.Expression -toString toStringArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "toString" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "SetCookie" - [] - ] - Type.string - ) - } - ) - [ toStringArg_ ] - - -annotation_ : - { setCookie : Type.Annotation - , options : Type.Annotation - , sameSite : Type.Annotation - } -annotation_ = - { setCookie = - Type.alias - moduleName_ - "SetCookie" - [] - (Type.record - [ ( "name", Type.string ) - , ( "value", Type.string ) - , ( "options" - , Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ) - ] - ) - , options = - Type.alias - moduleName_ - "Options" - [] - (Type.record - [ ( "expiration" - , Type.maybe (Type.namedWith [ "Time" ] "Posix" []) - ) - , ( "visibleToJavaScript", Type.bool ) - , ( "maxAge", Type.maybe Type.int ) - , ( "path", Type.maybe Type.string ) - , ( "domain", Type.maybe Type.string ) - , ( "secure", Type.bool ) - , ( "sameSite" - , Type.maybe - (Type.namedWith [ "Server", "SetCookie" ] "SameSite" [] - ) - ) - ] - ) - , sameSite = Type.namedWith [ "Server", "SetCookie" ] "SameSite" [] - } - - -make_ : - { setCookie : - { name : Elm.Expression - , value : Elm.Expression - , options : Elm.Expression - } - -> Elm.Expression - , options : - { expiration : Elm.Expression - , visibleToJavaScript : Elm.Expression - , maxAge : Elm.Expression - , path : Elm.Expression - , domain : Elm.Expression - , secure : Elm.Expression - , sameSite : Elm.Expression - } - -> Elm.Expression - , strict : Elm.Expression - , lax : Elm.Expression - , none : Elm.Expression - } -make_ = - { setCookie = - \setCookie_args -> - Elm.withType - (Type.alias - [ "Server", "SetCookie" ] - "SetCookie" - [] - (Type.record - [ ( "name", Type.string ) - , ( "value", Type.string ) - , ( "options" - , Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "name" setCookie_args.name - , Tuple.pair "value" setCookie_args.value - , Tuple.pair "options" setCookie_args.options - ] - ) - , options = - \options_args -> - Elm.withType - (Type.alias - [ "Server", "SetCookie" ] - "Options" - [] - (Type.record - [ ( "expiration" - , Type.maybe (Type.namedWith [ "Time" ] "Posix" []) - ) - , ( "visibleToJavaScript", Type.bool ) - , ( "maxAge", Type.maybe Type.int ) - , ( "path", Type.maybe Type.string ) - , ( "domain", Type.maybe Type.string ) - , ( "secure", Type.bool ) - , ( "sameSite" - , Type.maybe - (Type.namedWith - [ "Server", "SetCookie" ] - "SameSite" - [] - ) - ) - ] - ) - ) - (Elm.record - [ Tuple.pair "expiration" options_args.expiration - , Tuple.pair - "visibleToJavaScript" - options_args.visibleToJavaScript - , Tuple.pair "maxAge" options_args.maxAge - , Tuple.pair "path" options_args.path - , Tuple.pair "domain" options_args.domain - , Tuple.pair "secure" options_args.secure - , Tuple.pair "sameSite" options_args.sameSite - ] - ) - , strict = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "Strict" - , annotation = Just (Type.namedWith [] "SameSite" []) - } - , lax = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "Lax" - , annotation = Just (Type.namedWith [] "SameSite" []) - } - , none = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "None" - , annotation = Just (Type.namedWith [] "SameSite" []) - } - } - - -caseOf_ : - { sameSite : - Elm.Expression - -> { strict : Elm.Expression - , lax : Elm.Expression - , none : Elm.Expression - } - -> Elm.Expression - } -caseOf_ = - { sameSite = - \sameSiteExpression sameSiteTags -> - Elm.Case.custom - sameSiteExpression - (Type.namedWith [ "Server", "SetCookie" ] "SameSite" []) - [ Elm.Case.branch - (Elm.Arg.customType "Strict" sameSiteTags.strict) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Lax" sameSiteTags.lax) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "None" sameSiteTags.none) - Basics.identity - ] - } - - -call_ : - { setCookie : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , withSameSite : Elm.Expression -> Elm.Expression -> Elm.Expression - , withImmediateExpiration : Elm.Expression -> Elm.Expression - , makeVisibleToJavaScript : Elm.Expression -> Elm.Expression - , nonSecure : Elm.Expression -> Elm.Expression - , withDomain : Elm.Expression -> Elm.Expression -> Elm.Expression - , withExpiration : Elm.Expression -> Elm.Expression -> Elm.Expression - , withMaxAge : Elm.Expression -> Elm.Expression -> Elm.Expression - , withPath : Elm.Expression -> Elm.Expression -> Elm.Expression - , withoutPath : Elm.Expression -> Elm.Expression - , toString : Elm.Expression -> Elm.Expression - } -call_ = - { setCookie = - \setCookieArg_ setCookieArg_0 setCookieArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "setCookie" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith - [ "Server", "SetCookie" ] - "SetCookie" - [] - ) - ) - } - ) - [ setCookieArg_, setCookieArg_0, setCookieArg_1 ] - , withSameSite = - \withSameSiteArg_ withSameSiteArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withSameSite" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "SameSite" - [] - , Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - } - ) - [ withSameSiteArg_, withSameSiteArg_0 ] - , withImmediateExpiration = - \withImmediateExpirationArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withImmediateExpiration" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - } - ) - [ withImmediateExpirationArg_ ] - , makeVisibleToJavaScript = - \makeVisibleToJavaScriptArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "makeVisibleToJavaScript" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - } - ) - [ makeVisibleToJavaScriptArg_ ] - , nonSecure = - \nonSecureArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "nonSecure" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - } - ) - [ nonSecureArg_ ] - , withDomain = - \withDomainArg_ withDomainArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withDomain" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - } - ) - [ withDomainArg_, withDomainArg_0 ] - , withExpiration = - \withExpirationArg_ withExpirationArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withExpiration" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Posix" [] - , Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - } - ) - [ withExpirationArg_, withExpirationArg_0 ] - , withMaxAge = - \withMaxAgeArg_ withMaxAgeArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withMaxAge" - , annotation = - Just - (Type.function - [ Type.int - , Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - } - ) - [ withMaxAgeArg_, withMaxAgeArg_0 ] - , withPath = - \withPathArg_ withPathArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withPath" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - } - ) - [ withPathArg_, withPathArg_0 ] - , withoutPath = - \withoutPathArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withoutPath" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ] - (Type.namedWith - [ "Server", "SetCookie" ] - "Options" - [] - ) - ) - } - ) - [ withoutPathArg_ ] - , toString = - \toStringArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "toString" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "SetCookie" - [] - ] - Type.string - ) - } - ) - [ toStringArg_ ] - } - - -values_ : - { setCookie : Elm.Expression - , options : Elm.Expression - , withSameSite : Elm.Expression - , withImmediateExpiration : Elm.Expression - , makeVisibleToJavaScript : Elm.Expression - , nonSecure : Elm.Expression - , withDomain : Elm.Expression - , withExpiration : Elm.Expression - , withMaxAge : Elm.Expression - , withPath : Elm.Expression - , withoutPath : Elm.Expression - , toString : Elm.Expression - } -values_ = - { setCookie = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "setCookie" - , annotation = - Just - (Type.function - [ Type.string - , Type.string - , Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ] - (Type.namedWith - [ "Server", "SetCookie" ] - "SetCookie" - [] - ) - ) - } - , options = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "options" - , annotation = - Just (Type.namedWith [ "Server", "SetCookie" ] "Options" []) - } - , withSameSite = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withSameSite" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "SameSite" - [] - , Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" []) - ) - } - , withImmediateExpiration = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withImmediateExpiration" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" []) - ) - } - , makeVisibleToJavaScript = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "makeVisibleToJavaScript" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" []) - ) - } - , nonSecure = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "nonSecure" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" []) - ) - } - , withDomain = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withDomain" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" []) - ) - } - , withExpiration = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withExpiration" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Posix" [] - , Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" []) - ) - } - , withMaxAge = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withMaxAge" - , annotation = - Just - (Type.function - [ Type.int - , Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" []) - ) - } - , withPath = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withPath" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" []) - ) - } - , withoutPath = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "withoutPath" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Server", "SetCookie" ] "Options" [] - ] - (Type.namedWith [ "Server", "SetCookie" ] "Options" []) - ) - } - , toString = - Elm.value - { importFrom = [ "Server", "SetCookie" ] - , name = "toString" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Server", "SetCookie" ] - "SetCookie" - [] - ] - Type.string - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Time/Extra.elm b/codegen/Gen/Time/Extra.elm deleted file mode 100644 index a1216681..00000000 --- a/codegen/Gen/Time/Extra.elm +++ /dev/null @@ -1,976 +0,0 @@ -module Gen.Time.Extra exposing - ( moduleName_, partsToPosix, posixToParts, compare, diff, add - , floor, ceiling, range, toOffset, annotation_, make_, caseOf_ - , call_, values_ - ) - -{-| -# Generated bindings for Time.Extra - -@docs moduleName_, partsToPosix, posixToParts, compare, diff, add -@docs floor, ceiling, range, toOffset, annotation_, make_ -@docs caseOf_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type -import Elm.Arg -import Elm.Case - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Time", "Extra" ] - - -{-| Create a `Posix` from a description of a time and a specific time zone. - - import Time exposing (Month(..), utc) - import Time.Extra exposing (Parts, partsToPosix) - - partsToPosix utc (Parts 2018 Sep 26 14 30 0 0) - -Any out-of-range day or time values will be clamped within range. - - partsToPosix utc (Parts 2018 Sep 31 24 60 -60 -500) - == partsToPosix utc (Parts 2018 Sep 30 23 59 0 0) - -partsToPosix: Time.Zone -> Time.Extra.Parts -> Time.Posix --} -partsToPosix : Elm.Expression -> Elm.Expression -> Elm.Expression -partsToPosix partsToPosixArg_ partsToPosixArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "partsToPosix" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time", "Extra" ] "Parts" [] - ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - ) - [ partsToPosixArg_, partsToPosixArg_0 ] - - -{-| Convert a `Posix` to a description of a time in a specific time zone. This -is a convenience function for extracting parts of a time into a single record. - - import Time exposing (Month(..), utc) - import Time.Extra exposing (Parts, partsToPosix, posixToParts) - - posixToParts - utc - (partsToPosix utc (Parts 2018 Sep 26 14 30 0 0)) - == { year = 2018 - , month = Sep - , day = 26 - , hour = 14 - , minute = 30 - , second = 0 - , millisecond = 0 - } - -posixToParts: Time.Zone -> Time.Posix -> Time.Extra.Parts --} -posixToParts : Elm.Expression -> Elm.Expression -> Elm.Expression -posixToParts posixToPartsArg_ posixToPartsArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "posixToParts" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Time", "Extra" ] "Parts" []) - ) - } - ) - [ posixToPartsArg_, posixToPartsArg_0 ] - - -{-| Compare the first time to the second time. - - import Time - import Time.Extra as Time - - Time.compare (Time.millisToPosix 0) (Time.millisToPosix 1000) - == LT - -compare: Time.Posix -> Time.Posix -> Basics.Order --} -compare : Elm.Expression -> Elm.Expression -> Elm.Expression -compare compareArg_ compareArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "compare" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Posix" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Basics" ] "Order" []) - ) - } - ) - [ compareArg_, compareArg_0 ] - - -{-| Get the difference, as a number of whole intervals, between two times. - - import Time exposing (Month(..), utc) - import Time.Extra exposing (Interval(..), Parts, partsToPosix, diff) - - diff Month utc - (partsToPosix utc (Parts 2020 Jan 2 0 0 0 0)) - (partsToPosix utc (Parts 2020 Apr 1 0 0 0 0)) - == 2 - -diff: Time.Extra.Interval -> Time.Zone -> Time.Posix -> Time.Posix -> Int --} -diff : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression -diff diffArg_ diffArg_0 diffArg_1 diffArg_2 = - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "diff" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time", "Extra" ] "Interval" [] - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - Type.int - ) - } - ) - [ diffArg_, diffArg_0, diffArg_1, diffArg_2 ] - - -{-| Shift a time into the past or future by adding a number of whole intervals. - - import Time exposing (Month(..), utc) - import Time.Extra exposing (Interval(..), Parts, partsToPosix, add) - - add Week 2 utc (partsToPosix utc (Parts 2018 Sep 1 11 55 0 0)) - == partsToPosix utc (Parts 2018 Sep 15 11 55 0 0) - -When adding `Month`, `Quarter`, or `Year` intervals, day values are clamped to -the end of the month if necessary. - - add Month 1 utc (partsToPosix utc (Parts 2020 Jan 31 0 0 0 0)) - == partsToPosix utc (Parts 2020 Feb 29 0 0 0 0) - -add: Time.Extra.Interval -> Int -> Time.Zone -> Time.Posix -> Time.Posix --} -add : - Elm.Expression -> Int -> Elm.Expression -> Elm.Expression -> Elm.Expression -add addArg_ addArg_0 addArg_1 addArg_2 = - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "add" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time", "Extra" ] "Interval" [] - , Type.int - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - ) - [ addArg_, Elm.int addArg_0, addArg_1, addArg_2 ] - - -{-| Round down a time to the beginning of the closest interval. The resulting -time will be less than or equal to the one provided. - - import Time exposing (Month(..), utc) - import Time.Extra exposing (Interval(..), Parts, partsToPosix, floor) - - floor Hour utc - (partsToPosix utc (Parts 1999 Dec 31 23 59 59 999)) - == (partsToPosix utc (Parts 1999 Dec 31 23 0 0 0)) - -floor: Time.Extra.Interval -> Time.Zone -> Time.Posix -> Time.Posix --} -floor : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -floor floorArg_ floorArg_0 floorArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "floor" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time", "Extra" ] "Interval" [] - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - ) - [ floorArg_, floorArg_0, floorArg_1 ] - - -{-| Round up a time to the beginning of the closest interval. The resulting -time will be greater than or equal to the one provided. - - import Time exposing (Month(..), utc) - import Time.Extra exposing (Interval(..), Parts, partsToPosix, ceiling) - - ceiling Hour utc - (partsToPosix utc (Parts 1999 Dec 31 23 59 59 999)) - == (partsToPosix utc (Parts 2000 Jan 1 0 0 0 0)) - -ceiling: Time.Extra.Interval -> Time.Zone -> Time.Posix -> Time.Posix --} -ceiling : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -ceiling ceilingArg_ ceilingArg_0 ceilingArg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "ceiling" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time", "Extra" ] "Interval" [] - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - ) - [ ceilingArg_, ceilingArg_0, ceilingArg_1 ] - - -{-| Create a list of times, at rounded intervals, increasing by a step value, -between two times. The list will start on or after the first time, and end -before the second time. - - import Time exposing (Month(..), utc) - import Time.Extra exposing (Interval(..), Parts, partsToPosix, range) - - start = Parts 2020 Jan 1 12 0 0 0 - until = Parts 2020 Jan 8 0 0 0 0 - - range Day 2 utc (partsToPosix utc start) (partsToPosix utc until) - == List.map (partsToPosix utc) - [ Parts 2020 Jan 2 0 0 0 0 - , Parts 2020 Jan 4 0 0 0 0 - , Parts 2020 Jan 6 0 0 0 0 - ] - -range: - Time.Extra.Interval - -> Int - -> Time.Zone - -> Time.Posix - -> Time.Posix - -> List Time.Posix --} -range : - Elm.Expression - -> Int - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression -range rangeArg_ rangeArg_0 rangeArg_1 rangeArg_2 rangeArg_3 = - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "range" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time", "Extra" ] "Interval" [] - , Type.int - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.list (Type.namedWith [ "Time" ] "Posix" [])) - ) - } - ) - [ rangeArg_, Elm.int rangeArg_0, rangeArg_1, rangeArg_2, rangeArg_3 ] - - -{-| What is the offset from UTC, in minutes, for this `Zone` at this -`Posix` time? - - import Time exposing (Month(..)) - import Time.Extra exposing (Parts, partsToPosix, toOffset) - - toOffset nyc - (partsToPosix nyc (Parts 2018 Sep 26 10 30 0 0)) - == -240 - - -- assuming `nyc` is a `Zone` for America/New_York - -**Note:** It's possible to verify the example above by using time zone data -from the package [justinmimbs/timezone-data][tzdata] to define `nyc`: - - import TimeZone - - nyc = - TimeZone.america__new_york () - -[tzdata]: https://package.elm-lang.org/packages/justinmimbs/timezone-data/latest/ - -toOffset: Time.Zone -> Time.Posix -> Int --} -toOffset : Elm.Expression -> Elm.Expression -> Elm.Expression -toOffset toOffsetArg_ toOffsetArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "toOffset" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - Type.int - ) - } - ) - [ toOffsetArg_, toOffsetArg_0 ] - - -annotation_ : { parts : Type.Annotation, interval : Type.Annotation } -annotation_ = - { parts = - Type.alias - moduleName_ - "Parts" - [] - (Type.record - [ ( "year", Type.int ) - , ( "month", Type.namedWith [ "Time" ] "Month" [] ) - , ( "day", Type.int ) - , ( "hour", Type.int ) - , ( "minute", Type.int ) - , ( "second", Type.int ) - , ( "millisecond", Type.int ) - ] - ) - , interval = Type.namedWith [ "Time", "Extra" ] "Interval" [] - } - - -make_ : - { parts : - { year : Elm.Expression - , month : Elm.Expression - , day : Elm.Expression - , hour : Elm.Expression - , minute : Elm.Expression - , second : Elm.Expression - , millisecond : Elm.Expression - } - -> Elm.Expression - , year : Elm.Expression - , quarter : Elm.Expression - , month : Elm.Expression - , week : Elm.Expression - , monday : Elm.Expression - , tuesday : Elm.Expression - , wednesday : Elm.Expression - , thursday : Elm.Expression - , friday : Elm.Expression - , saturday : Elm.Expression - , sunday : Elm.Expression - , day : Elm.Expression - , hour : Elm.Expression - , minute : Elm.Expression - , second : Elm.Expression - , millisecond : Elm.Expression - } -make_ = - { parts = - \parts_args -> - Elm.withType - (Type.alias - [ "Time", "Extra" ] - "Parts" - [] - (Type.record - [ ( "year", Type.int ) - , ( "month", Type.namedWith [ "Time" ] "Month" [] ) - , ( "day", Type.int ) - , ( "hour", Type.int ) - , ( "minute", Type.int ) - , ( "second", Type.int ) - , ( "millisecond", Type.int ) - ] - ) - ) - (Elm.record - [ Tuple.pair "year" parts_args.year - , Tuple.pair "month" parts_args.month - , Tuple.pair "day" parts_args.day - , Tuple.pair "hour" parts_args.hour - , Tuple.pair "minute" parts_args.minute - , Tuple.pair "second" parts_args.second - , Tuple.pair "millisecond" parts_args.millisecond - ] - ) - , year = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Year" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , quarter = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Quarter" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , month = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Month" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , week = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Week" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , monday = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Monday" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , tuesday = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Tuesday" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , wednesday = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Wednesday" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , thursday = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Thursday" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , friday = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Friday" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , saturday = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Saturday" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , sunday = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Sunday" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , day = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Day" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , hour = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Hour" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , minute = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Minute" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , second = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Second" - , annotation = Just (Type.namedWith [] "Interval" []) - } - , millisecond = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "Millisecond" - , annotation = Just (Type.namedWith [] "Interval" []) - } - } - - -caseOf_ : - { interval : - Elm.Expression - -> { year : Elm.Expression - , quarter : Elm.Expression - , month : Elm.Expression - , week : Elm.Expression - , monday : Elm.Expression - , tuesday : Elm.Expression - , wednesday : Elm.Expression - , thursday : Elm.Expression - , friday : Elm.Expression - , saturday : Elm.Expression - , sunday : Elm.Expression - , day : Elm.Expression - , hour : Elm.Expression - , minute : Elm.Expression - , second : Elm.Expression - , millisecond : Elm.Expression - } - -> Elm.Expression - } -caseOf_ = - { interval = - \intervalExpression intervalTags -> - Elm.Case.custom - intervalExpression - (Type.namedWith [ "Time", "Extra" ] "Interval" []) - [ Elm.Case.branch - (Elm.Arg.customType "Year" intervalTags.year) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Quarter" intervalTags.quarter) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Month" intervalTags.month) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Week" intervalTags.week) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Monday" intervalTags.monday) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Tuesday" intervalTags.tuesday) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Wednesday" intervalTags.wednesday) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Thursday" intervalTags.thursday) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Friday" intervalTags.friday) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Saturday" intervalTags.saturday) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Sunday" intervalTags.sunday) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Day" intervalTags.day) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Hour" intervalTags.hour) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Minute" intervalTags.minute) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Second" intervalTags.second) - Basics.identity - , Elm.Case.branch - (Elm.Arg.customType "Millisecond" intervalTags.millisecond) - Basics.identity - ] - } - - -call_ : - { partsToPosix : Elm.Expression -> Elm.Expression -> Elm.Expression - , posixToParts : Elm.Expression -> Elm.Expression -> Elm.Expression - , compare : Elm.Expression -> Elm.Expression -> Elm.Expression - , diff : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , add : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , floor : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , ceiling : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , range : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , toOffset : Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { partsToPosix = - \partsToPosixArg_ partsToPosixArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "partsToPosix" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith - [ "Time", "Extra" ] - "Parts" - [] - ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - ) - [ partsToPosixArg_, partsToPosixArg_0 ] - , posixToParts = - \posixToPartsArg_ posixToPartsArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "posixToParts" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Time", "Extra" ] "Parts" [] - ) - ) - } - ) - [ posixToPartsArg_, posixToPartsArg_0 ] - , compare = - \compareArg_ compareArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "compare" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Posix" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Basics" ] "Order" []) - ) - } - ) - [ compareArg_, compareArg_0 ] - , diff = - \diffArg_ diffArg_0 diffArg_1 diffArg_2 -> - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "diff" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Time", "Extra" ] - "Interval" - [] - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - Type.int - ) - } - ) - [ diffArg_, diffArg_0, diffArg_1, diffArg_2 ] - , add = - \addArg_ addArg_0 addArg_1 addArg_2 -> - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "add" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Time", "Extra" ] - "Interval" - [] - , Type.int - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - ) - [ addArg_, addArg_0, addArg_1, addArg_2 ] - , floor = - \floorArg_ floorArg_0 floorArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "floor" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Time", "Extra" ] - "Interval" - [] - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - ) - [ floorArg_, floorArg_0, floorArg_1 ] - , ceiling = - \ceilingArg_ ceilingArg_0 ceilingArg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "ceiling" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Time", "Extra" ] - "Interval" - [] - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - ) - [ ceilingArg_, ceilingArg_0, ceilingArg_1 ] - , range = - \rangeArg_ rangeArg_0 rangeArg_1 rangeArg_2 rangeArg_3 -> - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "range" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Time", "Extra" ] - "Interval" - [] - , Type.int - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.list - (Type.namedWith [ "Time" ] "Posix" []) - ) - ) - } - ) - [ rangeArg_, rangeArg_0, rangeArg_1, rangeArg_2, rangeArg_3 ] - , toOffset = - \toOffsetArg_ toOffsetArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "toOffset" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - Type.int - ) - } - ) - [ toOffsetArg_, toOffsetArg_0 ] - } - - -values_ : - { partsToPosix : Elm.Expression - , posixToParts : Elm.Expression - , compare : Elm.Expression - , diff : Elm.Expression - , add : Elm.Expression - , floor : Elm.Expression - , ceiling : Elm.Expression - , range : Elm.Expression - , toOffset : Elm.Expression - } -values_ = - { partsToPosix = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "partsToPosix" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time", "Extra" ] "Parts" [] - ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - , posixToParts = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "posixToParts" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Time", "Extra" ] "Parts" []) - ) - } - , compare = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "compare" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Posix" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Basics" ] "Order" []) - ) - } - , diff = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "diff" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time", "Extra" ] "Interval" [] - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - Type.int - ) - } - , add = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "add" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time", "Extra" ] "Interval" [] - , Type.int - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - , floor = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "floor" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time", "Extra" ] "Interval" [] - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - , ceiling = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "ceiling" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time", "Extra" ] "Interval" [] - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.namedWith [ "Time" ] "Posix" []) - ) - } - , range = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "range" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time", "Extra" ] "Interval" [] - , Type.int - , Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - (Type.list (Type.namedWith [ "Time" ] "Posix" [])) - ) - } - , toOffset = - Elm.value - { importFrom = [ "Time", "Extra" ] - , name = "toOffset" - , annotation = - Just - (Type.function - [ Type.namedWith [ "Time" ] "Zone" [] - , Type.namedWith [ "Time" ] "Posix" [] - ] - Type.int - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Url/Parser.elm b/codegen/Gen/Url/Parser.elm deleted file mode 100644 index 02714377..00000000 --- a/codegen/Gen/Url/Parser.elm +++ /dev/null @@ -1,849 +0,0 @@ -module Gen.Url.Parser exposing - ( moduleName_, string, int, s, map, oneOf - , top, custom, query, fragment, parse, annotation_, call_ - , values_ - ) - -{-| -# Generated bindings for Url.Parser - -@docs moduleName_, string, int, s, map, oneOf -@docs top, custom, query, fragment, parse, annotation_ -@docs call_, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Url", "Parser" ] - - -{-| Parse a segment of the path as a `String`. - - -- /alice/ ==> Just "alice" - -- /bob ==> Just "bob" - -- /42/ ==> Just "42" - -- / ==> Nothing - -string: Url.Parser.Parser (String -> a) a --} -string : Elm.Expression -string = - Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "string" - , annotation = - Just - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function [ Type.string ] (Type.var "a") - , Type.var "a" - ] - ) - } - - -{-| Parse a segment of the path as an `Int`. - - -- /alice/ ==> Nothing - -- /bob ==> Nothing - -- /42/ ==> Just 42 - -- / ==> Nothing - -int: Url.Parser.Parser (Int -> a) a --} -int : Elm.Expression -int = - Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "int" - , annotation = - Just - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function [ Type.int ] (Type.var "a"), Type.var "a" ] - ) - } - - -{-| Parse a segment of the path if it matches a given string. It is almost -always used with [``](#) or [`oneOf`](#oneOf). For example: - - blog : Parser (Int -> a) a - blog = - s "blog" int - - -- /blog/42 ==> Just 42 - -- /tree/42 ==> Nothing - -The path segment must be an exact match! - -s: String -> Url.Parser.Parser a a --} -s : String -> Elm.Expression -s sArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "s" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.var "a", Type.var "a" ] - ) - ) - } - ) - [ Elm.string sArg_ ] - - -{-| Transform a path parser. - - type alias Comment = { user : String, id : Int } - - userAndId : Parser (String -> Int -> a) a - userAndId = - s "user" string s "comment" int - - comment : Parser (Comment -> a) a - comment = - map Comment userAndId - - -- /user/bob/comment/42 ==> Just { user = "bob", id = 42 } - -- /user/tom/comment/35 ==> Just { user = "tom", id = 35 } - -- /user/sam/ ==> Nothing - -map: a -> Url.Parser.Parser a b -> Url.Parser.Parser (b -> c) c --} -map : Elm.Expression -> Elm.Expression -> Elm.Expression -map mapArg_ mapArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.var "a" - , Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.var "a", Type.var "b" ] - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function [ Type.var "b" ] (Type.var "c") - , Type.var "c" - ] - ) - ) - } - ) - [ mapArg_, mapArg_0 ] - - -{-| Try a bunch of different path parsers. - - type Route - = Topic String - | Blog Int - | User String - | Comment String Int - - route : Parser (Route -> a) a - route = - oneOf - [ map Topic (s "topic" string) - , map Blog (s "blog" int) - , map User (s "user" string) - , map Comment (s "user" string s "comment" int) - ] - - -- /topic/wolf ==> Just (Topic "wolf") - -- /topic/ ==> Nothing - - -- /blog/42 ==> Just (Blog 42) - -- /blog/wolf ==> Nothing - - -- /user/sam/ ==> Just (User "sam") - -- /user/bob/comment/42 ==> Just (Comment "bob" 42) - -- /user/tom/comment/35 ==> Just (Comment "tom" 35) - -- /user/ ==> Nothing - -If there are multiple parsers that could succeed, the first one wins. - -oneOf: List (Url.Parser.Parser a b) -> Url.Parser.Parser a b --} -oneOf : List Elm.Expression -> Elm.Expression -oneOf oneOfArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "oneOf" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.var "a", Type.var "b" ] - ) - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.var "a", Type.var "b" ] - ) - ) - } - ) - [ Elm.list oneOfArg_ ] - - -{-| A parser that does not consume any path segments. - - type Route = Overview | Post Int - - blog : Parser (BlogRoute -> a) a - blog = - s "blog" - oneOf - [ map Overview top - , map Post (s "post" int) - ] - - -- /blog/ ==> Just Overview - -- /blog/post/42 ==> Just (Post 42) - -top: Url.Parser.Parser a a --} -top : Elm.Expression -top = - Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "top" - , annotation = - Just - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.var "a", Type.var "a" ] - ) - } - - -{-| Create a custom path segment parser. Here is how it is used to define the -`int` parser: - - int : Parser (Int -> a) a - int = - custom "NUMBER" String.toInt - -You can use it to define something like “only CSS files” like this: - - css : Parser (String -> a) a - css = - custom "CSS_FILE" <| \segment -> - if String.endsWith ".css" segment then - Just segment - else - Nothing - -custom: String -> (String -> Maybe a) -> Url.Parser.Parser (a -> b) b --} -custom : String -> (Elm.Expression -> Elm.Expression) -> Elm.Expression -custom customArg_ customArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "custom" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.string ] - (Type.maybe (Type.var "a")) - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function [ Type.var "a" ] (Type.var "b") - , Type.var "b" - ] - ) - ) - } - ) - [ Elm.string customArg_ - , Elm.functionReduced "customUnpack" customArg_0 - ] - - -{-| The [`Url.Parser.Query`](Url-Parser-Query) module defines its own -[`Parser`](Url-Parser-Query#Parser) type. This function is a helper to convert -those into normal parsers. - - import Url.Parser.Query as Query - - -- the following expressions are both the same! - -- - -- s "blog" Query.string "search" - -- s "blog" query (Query.string "search") - -This may be handy if you need query parameters but are not parsing any path -segments. - -query: Url.Parser.Query.Parser query -> Url.Parser.Parser (query -> a) a --} -query : Elm.Expression -> Elm.Expression -query queryArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "query" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "query" ] - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function - [ Type.var "query" ] - (Type.var "a") - , Type.var "a" - ] - ) - ) - } - ) - [ queryArg_ ] - - -{-| Create a parser for the URL fragment, the stuff after the `#`. This can -be handy for handling links to DOM elements within a page. Pages like this one! - - type alias Docs = - (String, Maybe String) - - docs : Parser (Docs -> a) a - docs = - map Tuple.pair (string fragment identity) - - -- /List/map ==> Nothing - -- /List/#map ==> Just ("List", Just "map") - -- /List#map ==> Just ("List", Just "map") - -- /List# ==> Just ("List", Just "") - -- /List ==> Just ("List", Nothing) - -- / ==> Nothing - -fragment: (Maybe String -> fragment) -> Url.Parser.Parser (fragment -> a) a --} -fragment : (Elm.Expression -> Elm.Expression) -> Elm.Expression -fragment fragmentArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "fragment" - , annotation = - Just - (Type.function - [ Type.function - [ Type.maybe Type.string ] - (Type.var "fragment") - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function - [ Type.var "fragment" ] - (Type.var "a") - , Type.var "a" - ] - ) - ) - } - ) - [ Elm.functionReduced "fragmentUnpack" fragmentArg_ ] - - -{-| Actually run a parser! You provide some [`Url`](Url#Url) that -represent a valid URL. From there `parse` runs your parser on the path, query -parameters, and fragment. - - import Url - import Url.Parser exposing (Parser, parse, int, map, oneOf, s, top) - - type Route = Home | Blog Int | NotFound - - route : Parser (Route -> a) a - route = - oneOf - [ map Home top - , map Blog (s "blog" int) - ] - - toRoute : String -> Route - toRoute string = - case Url.fromString string of - Nothing -> - NotFound - - Just url -> - Maybe.withDefault NotFound (parse route url) - - -- toRoute "/blog/42" == NotFound - -- toRoute "https://example.com/" == Home - -- toRoute "https://example.com/blog" == NotFound - -- toRoute "https://example.com/blog/42" == Blog 42 - -- toRoute "https://example.com/blog/42/" == Blog 42 - -- toRoute "https://example.com/blog/42#wolf" == Blog 42 - -- toRoute "https://example.com/blog/42?q=wolf" == Blog 42 - -- toRoute "https://example.com/settings" == NotFound - -Functions like `toRoute` are useful when creating single-page apps with -[`Browser.fullscreen`][fs]. I use them in `init` and `onNavigation` to handle -the initial URL and any changes. - -[fs]: /packages/elm/browser/latest/Browser#fullscreen - -parse: Url.Parser.Parser (a -> a) a -> Url.Url -> Maybe a --} -parse : Elm.Expression -> Elm.Expression -> Elm.Expression -parse parseArg_ parseArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "parse" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function [ Type.var "a" ] (Type.var "a") - , Type.var "a" - ] - , Type.namedWith [ "Url" ] "Url" [] - ] - (Type.maybe (Type.var "a")) - ) - } - ) - [ parseArg_, parseArg_0 ] - - -annotation_ : { parser : Type.Annotation -> Type.Annotation -> Type.Annotation } -annotation_ = - { parser = - \parserArg0 parserArg1 -> - Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ parserArg0, parserArg1 ] - } - - -call_ : - { s : Elm.Expression -> Elm.Expression - , map : Elm.Expression -> Elm.Expression -> Elm.Expression - , oneOf : Elm.Expression -> Elm.Expression - , custom : Elm.Expression -> Elm.Expression -> Elm.Expression - , query : Elm.Expression -> Elm.Expression - , fragment : Elm.Expression -> Elm.Expression - , parse : Elm.Expression -> Elm.Expression -> Elm.Expression - } -call_ = - { s = - \sArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "s" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.var "a", Type.var "a" ] - ) - ) - } - ) - [ sArg_ ] - , map = - \mapArg_ mapArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.var "a" - , Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.var "a", Type.var "b" ] - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function - [ Type.var "b" ] - (Type.var "c") - , Type.var "c" - ] - ) - ) - } - ) - [ mapArg_, mapArg_0 ] - , oneOf = - \oneOfArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "oneOf" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.var "a", Type.var "b" ] - ) - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.var "a", Type.var "b" ] - ) - ) - } - ) - [ oneOfArg_ ] - , custom = - \customArg_ customArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "custom" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.string ] - (Type.maybe (Type.var "a")) - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function - [ Type.var "a" ] - (Type.var "b") - , Type.var "b" - ] - ) - ) - } - ) - [ customArg_, customArg_0 ] - , query = - \queryArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "query" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "query" ] - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function - [ Type.var "query" ] - (Type.var "a") - , Type.var "a" - ] - ) - ) - } - ) - [ queryArg_ ] - , fragment = - \fragmentArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "fragment" - , annotation = - Just - (Type.function - [ Type.function - [ Type.maybe Type.string ] - (Type.var "fragment") - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function - [ Type.var "fragment" ] - (Type.var "a") - , Type.var "a" - ] - ) - ) - } - ) - [ fragmentArg_ ] - , parse = - \parseArg_ parseArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "parse" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function - [ Type.var "a" ] - (Type.var "a") - , Type.var "a" - ] - , Type.namedWith [ "Url" ] "Url" [] - ] - (Type.maybe (Type.var "a")) - ) - } - ) - [ parseArg_, parseArg_0 ] - } - - -values_ : - { string : Elm.Expression - , int : Elm.Expression - , s : Elm.Expression - , map : Elm.Expression - , oneOf : Elm.Expression - , top : Elm.Expression - , custom : Elm.Expression - , query : Elm.Expression - , fragment : Elm.Expression - , parse : Elm.Expression - } -values_ = - { string = - Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "string" - , annotation = - Just - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function [ Type.string ] (Type.var "a") - , Type.var "a" - ] - ) - } - , int = - Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "int" - , annotation = - Just - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function [ Type.int ] (Type.var "a") - , Type.var "a" - ] - ) - } - , s = - Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "s" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.var "a", Type.var "a" ] - ) - ) - } - , map = - Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.var "a" - , Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.var "a", Type.var "b" ] - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function [ Type.var "b" ] (Type.var "c") - , Type.var "c" - ] - ) - ) - } - , oneOf = - Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "oneOf" - , annotation = - Just - (Type.function - [ Type.list - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.var "a", Type.var "b" ] - ) - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.var "a", Type.var "b" ] - ) - ) - } - , top = - Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "top" - , annotation = - Just - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.var "a", Type.var "a" ] - ) - } - , custom = - Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "custom" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.string ] - (Type.maybe (Type.var "a")) - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function [ Type.var "a" ] (Type.var "b") - , Type.var "b" - ] - ) - ) - } - , query = - Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "query" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "query" ] - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function - [ Type.var "query" ] - (Type.var "a") - , Type.var "a" - ] - ) - ) - } - , fragment = - Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "fragment" - , annotation = - Just - (Type.function - [ Type.function - [ Type.maybe Type.string ] - (Type.var "fragment") - ] - (Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function - [ Type.var "fragment" ] - (Type.var "a") - , Type.var "a" - ] - ) - ) - } - , parse = - Elm.value - { importFrom = [ "Url", "Parser" ] - , name = "parse" - , annotation = - Just - (Type.function - [ Type.namedWith - [ "Url", "Parser" ] - "Parser" - [ Type.function [ Type.var "a" ] (Type.var "a") - , Type.var "a" - ] - , Type.namedWith [ "Url" ] "Url" [] - ] - (Type.maybe (Type.var "a")) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/Url/Parser/Query.elm b/codegen/Gen/Url/Parser/Query.elm deleted file mode 100644 index 76c35b9e..00000000 --- a/codegen/Gen/Url/Parser/Query.elm +++ /dev/null @@ -1,1922 +0,0 @@ -module Gen.Url.Parser.Query exposing - ( moduleName_, string, int, enum, custom, map - , map2, map3, map4, map5, map6, map7, map8 - , annotation_, call_, values_ - ) - -{-| -# Generated bindings for Url.Parser.Query - -@docs moduleName_, string, int, enum, custom, map -@docs map2, map3, map4, map5, map6, map7 -@docs map8, annotation_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "Url", "Parser", "Query" ] - - -{-| Handle `String` parameters. - - search : Parser (Maybe String) - search = - string "search" - - -- ?search=cats == Just "cats" - -- ?search=42 == Just "42" - -- ?branch=left == Nothing - -- ?search=cats&search=dogs == Nothing - -Check out [`custom`](#custom) if you need to handle multiple `search` -parameters for some reason. - -string: String -> Url.Parser.Query.Parser (Maybe String) --} -string : String -> Elm.Expression -string stringArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "string" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.maybe Type.string ] - ) - ) - } - ) - [ Elm.string stringArg_ ] - - -{-| Handle `Int` parameters. Maybe you want to show paginated search results: - - page : Parser (Maybe Int) - page = - int "page" - - -- ?page=2 == Just 2 - -- ?page=17 == Just 17 - -- ?page=two == Nothing - -- ?sort=date == Nothing - -- ?page=2&page=3 == Nothing - -Check out [`custom`](#custom) if you need to handle multiple `page` parameters -or something like that. - -int: String -> Url.Parser.Query.Parser (Maybe Int) --} -int : String -> Elm.Expression -int intArg_ = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "int" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.maybe Type.int ] - ) - ) - } - ) - [ Elm.string intArg_ ] - - -{-| Handle enumerated parameters. Maybe you want a true-or-false parameter: - - import Dict - - debug : Parser (Maybe Bool) - debug = - enum "debug" (Dict.fromList [ ("true", True), ("false", False) ]) - - -- ?debug=true == Just True - -- ?debug=false == Just False - -- ?debug=1 == Nothing - -- ?debug=0 == Nothing - -- ?true=true == Nothing - -- ?debug=true&debug=true == Nothing - -You could add `0` and `1` to the dictionary if you want to handle those as -well. You can also use [`map`](#map) to say `map (Result.withDefault False) debug` -to get a parser of type `Parser Bool` that swallows any errors and defaults to -`False`. - -**Note:** Parameters like `?debug` with no `=` are not supported by this library. - -enum: String -> Dict.Dict String a -> Url.Parser.Query.Parser (Maybe a) --} -enum : String -> Elm.Expression -> Elm.Expression -enum enumArg_ enumArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "enum" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.var "a" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.maybe (Type.var "a") ] - ) - ) - } - ) - [ Elm.string enumArg_, enumArg_0 ] - - -{-| Create a custom query parser. The [`string`](#string), [`int`](#int), and -[`enum`](#enum) parsers are defined using this function. It can help you handle -anything though! - -Say you are unlucky enough to need to handle `?post=2&post=7` to show a couple -posts on screen at once. You could say: - - posts : Parser (Maybe (List Int)) - posts = - custom "post" (List.maybeMap String.toInt) - - -- ?post=2 == [2] - -- ?post=2&post=7 == [2, 7] - -- ?post=2&post=x == [2] - -- ?hats=2 == [] - -custom: String -> (List String -> a) -> Url.Parser.Query.Parser a --} -custom : String -> (Elm.Expression -> Elm.Expression) -> Elm.Expression -custom customArg_ customArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "custom" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.list Type.string ] - (Type.var "a") - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - ) - ) - } - ) - [ Elm.string customArg_ - , Elm.functionReduced "customUnpack" customArg_0 - ] - - -{-| Transform a parser in some way. Maybe you want your `page` query parser to -default to `1` if there is any problem? - - page : Parser Int - page = - map (Result.withDefault 1) (int "page") - -map: (a -> b) -> Url.Parser.Query.Parser a -> Url.Parser.Query.Parser b --} -map : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression -map mapArg_ mapArg_0 = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function [ Type.var "a" ] (Type.var "b") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - ) - ) - } - ) - [ Elm.functionReduced "mapUnpack" mapArg_, mapArg_0 ] - - -{-| Combine two parsers. A query like `?search=hats&page=2` could be parsed -with something like this: - - type alias Query = - { search : Maybe String - , page : Maybe Int - } - - query : Parser Query - query = - map2 Query (string "search") (int "page") - -map2: - (a -> b -> result) - -> Url.Parser.Query.Parser a - -> Url.Parser.Query.Parser b - -> Url.Parser.Query.Parser result --} -map2 : - (Elm.Expression -> Elm.Expression -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression -map2 map2Arg_ map2Arg_0 map2Arg_1 = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map2" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a", Type.var "b" ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - ) - [ Elm.functionReduced - "map2Unpack" - (\functionReducedUnpack -> - Elm.functionReduced "unpack" (map2Arg_ functionReducedUnpack) - ) - , map2Arg_0 - , map2Arg_1 - ] - - -{-| Combine three parsers. A query like `?search=hats&page=2&sort=ascending` -could be parsed with something like this: - - import Dict - - type alias Query = - { search : Maybe String - , page : Maybe Int - , sort : Maybe Order - } - - type Order = Ascending | Descending - - query : Parser Query - query = - map3 Query (string "search") (int "page") (enum "sort" order) - - order : Dict.Dict String Order - order = - Dict.fromList - [ ( "ascending", Ascending ) - , ( "descending", Descending ) - ] - -map3: - (a -> b -> c -> result) - -> Url.Parser.Query.Parser a - -> Url.Parser.Query.Parser b - -> Url.Parser.Query.Parser c - -> Url.Parser.Query.Parser result --} -map3 : - (Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression -map3 map3Arg_ map3Arg_0 map3Arg_1 map3Arg_2 = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map3" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a", Type.var "b", Type.var "c" ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - ) - [ Elm.functionReduced - "map3Unpack" - (\functionReducedUnpack -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack0 -> - Elm.functionReduced - "unpack" - ((map3Arg_ functionReducedUnpack) - functionReducedUnpack0 - ) - ) - ) - , map3Arg_0 - , map3Arg_1 - , map3Arg_2 - ] - - -{-| map4: - (a -> b -> c -> d -> result) - -> Url.Parser.Query.Parser a - -> Url.Parser.Query.Parser b - -> Url.Parser.Query.Parser c - -> Url.Parser.Query.Parser d - -> Url.Parser.Query.Parser result --} -map4 : - (Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression -map4 map4Arg_ map4Arg_0 map4Arg_1 map4Arg_2 map4Arg_3 = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map4" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - ) - [ Elm.functionReduced - "map4Unpack" - (\functionReducedUnpack -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - (((map4Arg_ functionReducedUnpack) - functionReducedUnpack0 - ) - functionReducedUnpack_2_1_2_0_2_0_2_0_0 - ) - ) - ) - ) - , map4Arg_0 - , map4Arg_1 - , map4Arg_2 - , map4Arg_3 - ] - - -{-| map5: - (a -> b -> c -> d -> e -> result) - -> Url.Parser.Query.Parser a - -> Url.Parser.Query.Parser b - -> Url.Parser.Query.Parser c - -> Url.Parser.Query.Parser d - -> Url.Parser.Query.Parser e - -> Url.Parser.Query.Parser result --} -map5 : - (Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression -map5 map5Arg_ map5Arg_0 map5Arg_1 map5Arg_2 map5Arg_3 map5Arg_4 = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map5" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - , Type.var "e" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "e" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - ) - [ Elm.functionReduced - "map5Unpack" - (\functionReducedUnpack -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - ((((map5Arg_ functionReducedUnpack - ) - functionReducedUnpack0 - ) - functionReducedUnpack_2_1_2_0_2_0_2_0_0 - ) - functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 - ) - ) - ) - ) - ) - , map5Arg_0 - , map5Arg_1 - , map5Arg_2 - , map5Arg_3 - , map5Arg_4 - ] - - -{-| map6: - (a -> b -> c -> d -> e -> f -> result) - -> Url.Parser.Query.Parser a - -> Url.Parser.Query.Parser b - -> Url.Parser.Query.Parser c - -> Url.Parser.Query.Parser d - -> Url.Parser.Query.Parser e - -> Url.Parser.Query.Parser f - -> Url.Parser.Query.Parser result --} -map6 : - (Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression -map6 map6Arg_ map6Arg_0 map6Arg_1 map6Arg_2 map6Arg_3 map6Arg_4 map6Arg_5 = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map6" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - , Type.var "e" - , Type.var "f" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "e" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "f" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - ) - [ Elm.functionReduced - "map6Unpack" - (\functionReducedUnpack -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_1_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - (((((map6Arg_ - functionReducedUnpack - ) - functionReducedUnpack0 - ) - functionReducedUnpack_2_1_2_0_2_0_2_0_0 - ) - functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 - ) - functionReducedUnpack_2_1_2_1_2_1_2_0_2_0_2_0_0 - ) - ) - ) - ) - ) - ) - , map6Arg_0 - , map6Arg_1 - , map6Arg_2 - , map6Arg_3 - , map6Arg_4 - , map6Arg_5 - ] - - -{-| map7: - (a -> b -> c -> d -> e -> f -> g -> result) - -> Url.Parser.Query.Parser a - -> Url.Parser.Query.Parser b - -> Url.Parser.Query.Parser c - -> Url.Parser.Query.Parser d - -> Url.Parser.Query.Parser e - -> Url.Parser.Query.Parser f - -> Url.Parser.Query.Parser g - -> Url.Parser.Query.Parser result --} -map7 : - (Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression -map7 map7Arg_ map7Arg_0 map7Arg_1 map7Arg_2 map7Arg_3 map7Arg_4 map7Arg_5 map7Arg_6 = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map7" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - , Type.var "e" - , Type.var "f" - , Type.var "g" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "e" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "f" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "g" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - ) - [ Elm.functionReduced - "map7Unpack" - (\functionReducedUnpack -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_1_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_1_2_1_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - ((((((map7Arg_ - functionReducedUnpack - ) - functionReducedUnpack0 - ) - functionReducedUnpack_2_1_2_0_2_0_2_0_0 - ) - functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 - ) - functionReducedUnpack_2_1_2_1_2_1_2_0_2_0_2_0_0 - ) - functionReducedUnpack_2_1_2_1_2_1_2_1_2_0_2_0_2_0_0 - ) - ) - ) - ) - ) - ) - ) - , map7Arg_0 - , map7Arg_1 - , map7Arg_2 - , map7Arg_3 - , map7Arg_4 - , map7Arg_5 - , map7Arg_6 - ] - - -{-| If you need higher than eight, you can define a function like this: - - apply : Parser a -> Parser (a -> b) -> Parser b - apply argParser funcParser = - map2 (<|) funcParser argParser - -And then you can chain it to do as many of these as you would like: - - map func (string "search") - |> apply (int "page") - |> apply (int "per-page") - -map8: - (a -> b -> c -> d -> e -> f -> g -> h -> result) - -> Url.Parser.Query.Parser a - -> Url.Parser.Query.Parser b - -> Url.Parser.Query.Parser c - -> Url.Parser.Query.Parser d - -> Url.Parser.Query.Parser e - -> Url.Parser.Query.Parser f - -> Url.Parser.Query.Parser g - -> Url.Parser.Query.Parser h - -> Url.Parser.Query.Parser result --} -map8 : - (Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression) - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression -map8 map8Arg_ map8Arg_0 map8Arg_1 map8Arg_2 map8Arg_3 map8Arg_4 map8Arg_5 map8Arg_6 map8Arg_7 = - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map8" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - , Type.var "e" - , Type.var "f" - , Type.var "g" - , Type.var "h" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "e" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "f" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "g" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "h" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - ) - [ Elm.functionReduced - "map8Unpack" - (\functionReducedUnpack -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_1_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_1_2_1_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - (\functionReducedUnpack_2_1_2_1_2_1_2_1_2_1_2_0_2_0_2_0_0 -> - Elm.functionReduced - "unpack" - (((((((map8Arg_ - functionReducedUnpack - ) - functionReducedUnpack0 - ) - functionReducedUnpack_2_1_2_0_2_0_2_0_0 - ) - functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 - ) - functionReducedUnpack_2_1_2_1_2_1_2_0_2_0_2_0_0 - ) - functionReducedUnpack_2_1_2_1_2_1_2_1_2_0_2_0_2_0_0 - ) - functionReducedUnpack_2_1_2_1_2_1_2_1_2_1_2_0_2_0_2_0_0 - ) - ) - ) - ) - ) - ) - ) - ) - , map8Arg_0 - , map8Arg_1 - , map8Arg_2 - , map8Arg_3 - , map8Arg_4 - , map8Arg_5 - , map8Arg_6 - , map8Arg_7 - ] - - -annotation_ : { parser : Type.Annotation -> Type.Annotation } -annotation_ = - { parser = - \parserArg0 -> - Type.alias - moduleName_ - "Parser" - [ parserArg0 ] - (Type.namedWith - [ "Url", "Parser", "Internal" ] - "QueryParser" - [ Type.var "a" ] - ) - } - - -call_ : - { string : Elm.Expression -> Elm.Expression - , int : Elm.Expression -> Elm.Expression - , enum : Elm.Expression -> Elm.Expression -> Elm.Expression - , custom : Elm.Expression -> Elm.Expression -> Elm.Expression - , map : Elm.Expression -> Elm.Expression -> Elm.Expression - , map2 : - Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression - , map3 : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , map4 : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , map5 : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , map6 : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , map7 : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - , map8 : - Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - -> Elm.Expression - } -call_ = - { string = - \stringArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "string" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.maybe Type.string ] - ) - ) - } - ) - [ stringArg_ ] - , int = - \intArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "int" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.maybe Type.int ] - ) - ) - } - ) - [ intArg_ ] - , enum = - \enumArg_ enumArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "enum" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.var "a" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.maybe (Type.var "a") ] - ) - ) - } - ) - [ enumArg_, enumArg_0 ] - , custom = - \customArg_ customArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "custom" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.list Type.string ] - (Type.var "a") - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - ) - ) - } - ) - [ customArg_, customArg_0 ] - , map = - \mapArg_ mapArg_0 -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" ] - (Type.var "b") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - ) - ) - } - ) - [ mapArg_, mapArg_0 ] - , map2 = - \map2Arg_ map2Arg_0 map2Arg_1 -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map2" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a", Type.var "b" ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - ) - [ map2Arg_, map2Arg_0, map2Arg_1 ] - , map3 = - \map3Arg_ map3Arg_0 map3Arg_1 map3Arg_2 -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map3" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - ) - [ map3Arg_, map3Arg_0, map3Arg_1, map3Arg_2 ] - , map4 = - \map4Arg_ map4Arg_0 map4Arg_1 map4Arg_2 map4Arg_3 -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map4" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - ) - [ map4Arg_, map4Arg_0, map4Arg_1, map4Arg_2, map4Arg_3 ] - , map5 = - \map5Arg_ map5Arg_0 map5Arg_1 map5Arg_2 map5Arg_3 map5Arg_4 -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map5" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - , Type.var "e" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "e" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - ) - [ map5Arg_ - , map5Arg_0 - , map5Arg_1 - , map5Arg_2 - , map5Arg_3 - , map5Arg_4 - ] - , map6 = - \map6Arg_ map6Arg_0 map6Arg_1 map6Arg_2 map6Arg_3 map6Arg_4 map6Arg_5 -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map6" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - , Type.var "e" - , Type.var "f" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "e" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "f" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - ) - [ map6Arg_ - , map6Arg_0 - , map6Arg_1 - , map6Arg_2 - , map6Arg_3 - , map6Arg_4 - , map6Arg_5 - ] - , map7 = - \map7Arg_ map7Arg_0 map7Arg_1 map7Arg_2 map7Arg_3 map7Arg_4 map7Arg_5 map7Arg_6 -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map7" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - , Type.var "e" - , Type.var "f" - , Type.var "g" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "e" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "f" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "g" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - ) - [ map7Arg_ - , map7Arg_0 - , map7Arg_1 - , map7Arg_2 - , map7Arg_3 - , map7Arg_4 - , map7Arg_5 - , map7Arg_6 - ] - , map8 = - \map8Arg_ map8Arg_0 map8Arg_1 map8Arg_2 map8Arg_3 map8Arg_4 map8Arg_5 map8Arg_6 map8Arg_7 -> - Elm.apply - (Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map8" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - , Type.var "e" - , Type.var "f" - , Type.var "g" - , Type.var "h" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "e" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "f" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "g" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "h" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - ) - [ map8Arg_ - , map8Arg_0 - , map8Arg_1 - , map8Arg_2 - , map8Arg_3 - , map8Arg_4 - , map8Arg_5 - , map8Arg_6 - , map8Arg_7 - ] - } - - -values_ : - { string : Elm.Expression - , int : Elm.Expression - , enum : Elm.Expression - , custom : Elm.Expression - , map : Elm.Expression - , map2 : Elm.Expression - , map3 : Elm.Expression - , map4 : Elm.Expression - , map5 : Elm.Expression - , map6 : Elm.Expression - , map7 : Elm.Expression - , map8 : Elm.Expression - } -values_ = - { string = - Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "string" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.maybe Type.string ] - ) - ) - } - , int = - Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "int" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.maybe Type.int ] - ) - ) - } - , enum = - Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "enum" - , annotation = - Just - (Type.function - [ Type.string - , Type.namedWith - [ "Dict" ] - "Dict" - [ Type.string, Type.var "a" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.maybe (Type.var "a") ] - ) - ) - } - , custom = - Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "custom" - , annotation = - Just - (Type.function - [ Type.string - , Type.function - [ Type.list Type.string ] - (Type.var "a") - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - ) - ) - } - , map = - Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map" - , annotation = - Just - (Type.function - [ Type.function [ Type.var "a" ] (Type.var "b") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - ) - ) - } - , map2 = - Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map2" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a", Type.var "b" ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - , map3 = - Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map3" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a", Type.var "b", Type.var "c" ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - , map4 = - Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map4" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - , map5 = - Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map5" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - , Type.var "e" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "e" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - , map6 = - Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map6" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - , Type.var "e" - , Type.var "f" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "e" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "f" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - , map7 = - Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map7" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - , Type.var "e" - , Type.var "f" - , Type.var "g" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "e" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "f" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "g" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - , map8 = - Elm.value - { importFrom = [ "Url", "Parser", "Query" ] - , name = "map8" - , annotation = - Just - (Type.function - [ Type.function - [ Type.var "a" - , Type.var "b" - , Type.var "c" - , Type.var "d" - , Type.var "e" - , Type.var "f" - , Type.var "g" - , Type.var "h" - ] - (Type.var "result") - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "a" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "b" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "c" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "d" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "e" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "f" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "g" ] - , Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "h" ] - ] - (Type.namedWith - [ "Url", "Parser", "Query" ] - "Parser" - [ Type.var "result" ] - ) - ) - } - } \ No newline at end of file diff --git a/codegen/Gen/UrlPath.elm b/codegen/Gen/UrlPath.elm deleted file mode 100644 index 643049c1..00000000 --- a/codegen/Gen/UrlPath.elm +++ /dev/null @@ -1,276 +0,0 @@ -module Gen.UrlPath exposing - ( moduleName_, join, fromString, toAbsolute, toRelative, toSegments - , annotation_, call_, values_ - ) - -{-| -# Generated bindings for UrlPath - -@docs moduleName_, join, fromString, toAbsolute, toRelative, toSegments -@docs annotation_, call_, values_ --} - - -import Elm -import Elm.Annotation as Type - - -{-| The name of this module. -} -moduleName_ : List String -moduleName_ = - [ "UrlPath" ] - - -{-| Turn a Path to a relative URL. - -join: UrlPath.UrlPath -> UrlPath.UrlPath --} -join : Elm.Expression -> Elm.Expression -join joinArg_ = - Elm.apply - (Elm.value - { importFrom = [ "UrlPath" ] - , name = "join" - , annotation = - Just - (Type.function - [ Type.namedWith [ "UrlPath" ] "UrlPath" [] ] - (Type.namedWith [ "UrlPath" ] "UrlPath" []) - ) - } - ) - [ joinArg_ ] - - -{-| Create a UrlPath from a path String. - - UrlPath.fromString "blog/post-1/" - |> UrlPath.toAbsolute - |> Expect.equal "/blog/post-1" - -fromString: String -> UrlPath.UrlPath --} -fromString : String -> Elm.Expression -fromString fromStringArg_ = - Elm.apply - (Elm.value - { importFrom = [ "UrlPath" ] - , name = "fromString" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "UrlPath" ] "UrlPath" []) - ) - } - ) - [ Elm.string fromStringArg_ ] - - -{-| Turn a UrlPath to an absolute URL (with no trailing slash). - -toAbsolute: UrlPath.UrlPath -> String --} -toAbsolute : Elm.Expression -> Elm.Expression -toAbsolute toAbsoluteArg_ = - Elm.apply - (Elm.value - { importFrom = [ "UrlPath" ] - , name = "toAbsolute" - , annotation = - Just - (Type.function - [ Type.namedWith [ "UrlPath" ] "UrlPath" [] ] - Type.string - ) - } - ) - [ toAbsoluteArg_ ] - - -{-| Turn a UrlPath to a relative URL. - -toRelative: UrlPath.UrlPath -> String --} -toRelative : Elm.Expression -> Elm.Expression -toRelative toRelativeArg_ = - Elm.apply - (Elm.value - { importFrom = [ "UrlPath" ] - , name = "toRelative" - , annotation = - Just - (Type.function - [ Type.namedWith [ "UrlPath" ] "UrlPath" [] ] - Type.string - ) - } - ) - [ toRelativeArg_ ] - - -{-| toSegments: String -> List String -} -toSegments : String -> Elm.Expression -toSegments toSegmentsArg_ = - Elm.apply - (Elm.value - { importFrom = [ "UrlPath" ] - , name = "toSegments" - , annotation = - Just (Type.function [ Type.string ] (Type.list Type.string)) - } - ) - [ Elm.string toSegmentsArg_ ] - - -annotation_ : { urlPath : Type.Annotation } -annotation_ = - { urlPath = Type.alias moduleName_ "UrlPath" [] (Type.list Type.string) } - - -call_ : - { join : Elm.Expression -> Elm.Expression - , fromString : Elm.Expression -> Elm.Expression - , toAbsolute : Elm.Expression -> Elm.Expression - , toRelative : Elm.Expression -> Elm.Expression - , toSegments : Elm.Expression -> Elm.Expression - } -call_ = - { join = - \joinArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "UrlPath" ] - , name = "join" - , annotation = - Just - (Type.function - [ Type.namedWith [ "UrlPath" ] "UrlPath" [] ] - (Type.namedWith [ "UrlPath" ] "UrlPath" []) - ) - } - ) - [ joinArg_ ] - , fromString = - \fromStringArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "UrlPath" ] - , name = "fromString" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "UrlPath" ] "UrlPath" []) - ) - } - ) - [ fromStringArg_ ] - , toAbsolute = - \toAbsoluteArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "UrlPath" ] - , name = "toAbsolute" - , annotation = - Just - (Type.function - [ Type.namedWith [ "UrlPath" ] "UrlPath" [] ] - Type.string - ) - } - ) - [ toAbsoluteArg_ ] - , toRelative = - \toRelativeArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "UrlPath" ] - , name = "toRelative" - , annotation = - Just - (Type.function - [ Type.namedWith [ "UrlPath" ] "UrlPath" [] ] - Type.string - ) - } - ) - [ toRelativeArg_ ] - , toSegments = - \toSegmentsArg_ -> - Elm.apply - (Elm.value - { importFrom = [ "UrlPath" ] - , name = "toSegments" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.list Type.string) - ) - } - ) - [ toSegmentsArg_ ] - } - - -values_ : - { join : Elm.Expression - , fromString : Elm.Expression - , toAbsolute : Elm.Expression - , toRelative : Elm.Expression - , toSegments : Elm.Expression - } -values_ = - { join = - Elm.value - { importFrom = [ "UrlPath" ] - , name = "join" - , annotation = - Just - (Type.function - [ Type.namedWith [ "UrlPath" ] "UrlPath" [] ] - (Type.namedWith [ "UrlPath" ] "UrlPath" []) - ) - } - , fromString = - Elm.value - { importFrom = [ "UrlPath" ] - , name = "fromString" - , annotation = - Just - (Type.function - [ Type.string ] - (Type.namedWith [ "UrlPath" ] "UrlPath" []) - ) - } - , toAbsolute = - Elm.value - { importFrom = [ "UrlPath" ] - , name = "toAbsolute" - , annotation = - Just - (Type.function - [ Type.namedWith [ "UrlPath" ] "UrlPath" [] ] - Type.string - ) - } - , toRelative = - Elm.value - { importFrom = [ "UrlPath" ] - , name = "toRelative" - , annotation = - Just - (Type.function - [ Type.namedWith [ "UrlPath" ] "UrlPath" [] ] - Type.string - ) - } - , toSegments = - Elm.value - { importFrom = [ "UrlPath" ] - , name = "toSegments" - , annotation = - Just (Type.function [ Type.string ] (Type.list Type.string)) - } - } \ No newline at end of file diff --git a/custom-backend-task.ts b/custom-backend-task.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 70a68e52..a707d48f 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -8,26 +8,53 @@ The general flow of the app is: ## Getting Started +Make sure you have Nix installed (with flakes enabled) so you can use the +project's development shell. An easy way to satisfy this requirement is the +[Determinate Nix Installer][determinate-nix]). + - Clone this repo -- Inside your cloned repo, run `direnv allow` +- Inside your cloned repo, run `direnv allow` or, if you don't use direnv, run + `nix develop` to manually enter a development shell - Start coding! - Run `npm run dev ` - - e.g. `npm run dev ./example/github-spec.json` will produce: `generated/GithubV3RestApi/APi.elm`, `generated/GithubV3RestApi/Json.elm`, `generated/GithubV3RestApi/Types.elm`, and `generated/OpenApi/Common.elm` + - e.g. `npm run dev ./example/github-spec.json` will produce: `generated/GithubV3RestApi/Api.elm`, `generated/GithubV3RestApi/Json.elm`, `generated/GithubV3RestApi/Types.elm`, and `generated/OpenApi/Common.elm` - Please run `npm run test:gen` when making a pull request to ensure that the generated code is correct. _(would be nice to have this as part of the CI checks in the future)_ +[determinate-nix]: https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#determinate-nix-installer + +## Working on the elm-open-api-codegen package + +In order for your local code for `elm-open-api-cli` and the example project +(`example-using-api`) to use your local `elm-open-api-codegen` code, you'll +need to trick the Elm/Lamdera compiler by running a special script: + + ./scripts/link-local-package + +This will modify some `elm.json` files locally. Make sure not to commit these +changes. + +When you want to undo the linking, run: + + ./scripts/unlink-local-package + ## Project structure +The top-level project is a command-line interface to the functionality in the +`elm-open-api-codegen` package. + ``` src/ -├── JsonSchema/ Anything specific to JSON Schema code gen -│ └── Generate.elm -├── OpenApi/ Anything specific to OpenAPI code gen -│ └── Generate.elm -├── Util/ Utility functions for common Elm code, -│ │ similar to the common `Extra.*` packages -│ └── List.elm -├── Cli.elm The main entry point for the tool -├── CliMonad.elm An abstraction for wrapping code gen & warnings -├── Common.elm Common, shared types & functions -└── SchemaUtils.elm Utility functions for working with these Schemas +└── Cli.elm The main entry point for the tool +elm-open-api-codegen/ +└── src/ + ├── JsonSchema/ Anything specific to JSON Schema code gen + │ └── Generate.elm + ├── OpenApi/ Anything specific to OpenAPI code gen + │ └── Generate.elm + ├── Util/ Utility functions for common Elm code, + │ │ similar to the common `Extra.*` packages + │ └── List.elm + ├── CliMonad.elm An abstraction for wrapping code gen & warnings + ├── Common.elm Common, shared types & functions + └── SchemaUtils.elm Utility functions for working with these Schemas ``` diff --git a/elm-open-api-codegen/.gitignore b/elm-open-api-codegen/.gitignore new file mode 100644 index 00000000..3ab96596 --- /dev/null +++ b/elm-open-api-codegen/.gitignore @@ -0,0 +1,3 @@ +# If files pop up in this folder, don't commit them--run +# `scripts/sync-elm-codegen` to take care of it. +codegen/Gen diff --git a/elm-open-api-codegen/README.md b/elm-open-api-codegen/README.md new file mode 100644 index 00000000..b91d619a --- /dev/null +++ b/elm-open-api-codegen/README.md @@ -0,0 +1,29 @@ +# elm-open-api-codegen + +Generate Elm code for OpenAPI schemas. This powers +[elm-open-api-cli][elm-open-api-cli], but can be used directly, via an Elm Pages +script, for more powerful customized code generation. + +The main advantage of using this package directly is that you can define your +own custom formats in Elm, which means you can customize the types and generated +code based on the `format` listed in your OpenAPI schema. + +See the included [example of using this package][example]. + +[elm-open-api-cli]: https://github.com/wolfadex/elm-open-api-cli +[example]: https://github.com/wolfadex/elm-open-api-codegen/tree/main/example-using-api + +## CONTRIBUTING + +The `elm.codegen.json` file in this project is located in the `src` directory. +Since this isn't the standard directory, you'll need to tell `elm-codegen` where +it is. You can run `elm-codegen install --cwd=src` or use this wrapper script: + + ./scripts/codegen + +The codegen config is in `src` so that the `Gen.*` modules are written to the +`src/` folder, which is necessary because the code in this project is part of an +Elm _package_, and unlike Elm applications, Elm packages do not support +specifying extra source directories. + +Note that `elm-codegen run` isn't used (there is no `Generate.elm` file). diff --git a/elm-open-api-codegen/elm.json b/elm-open-api-codegen/elm.json new file mode 100644 index 00000000..082d8a7d --- /dev/null +++ b/elm-open-api-codegen/elm.json @@ -0,0 +1,33 @@ +{ + "type": "package", + "name": "wolfadex/elm-open-api-codegen", + "summary": "Code generation used by elm-open-api-cli", + "license": "BSD-3-Clause", + "version": "1.0.0", + "elm-version": "0.19.0 <= v < 0.20.0", + "exposed-modules": [ + "Common", + "OpenApi.BackendTask", + "OpenApi.Config" + ], + "dependencies": { + "dillonkearns/elm-pages": "10.2.2 <= v < 11.0.0", + "elm/core": "1.0.5 <= v < 2.0.0", + "elm/json": "1.1.3 <= v < 2.0.0", + "elm/regex": "1.0.0 <= v < 2.0.0", + "elm/url": "1.0.0 <= v < 2.0.0", + "elmcraft/core-extra": "2.2.0 <= v < 3.0.0", + "json-tools/json-schema": "1.0.2 <= v < 2.0.0", + "json-tools/json-value": "1.0.1 <= v < 2.0.0", + "mdgriffith/elm-codegen": "5.2.0 <= v < 6.0.0", + "miniBill/elm-fast-dict": "1.2.4 <= v < 2.0.0", + "myrho/yaml": "1.0.0 <= v < 2.0.0", + "turboMaCk/non-empty-list-alias": "1.4.0 <= v < 2.0.0", + "wolfadex/elm-ansi": "3.0.0 <= v < 4.0.0", + "wolfadex/elm-open-api": "2.0.0 <= v < 3.0.0" + }, + "test-dependencies": { + "elm-explorations/test": "2.2.0 <= v < 3.0.0", + "miniBill/elm-unicode": "1.1.1 <= v < 2.0.0" + } +} diff --git a/helpers/Http.elm b/elm-open-api-codegen/helpers/Http.elm similarity index 100% rename from helpers/Http.elm rename to elm-open-api-codegen/helpers/Http.elm diff --git a/helpers/Task.elm b/elm-open-api-codegen/helpers/Task.elm similarity index 100% rename from helpers/Task.elm rename to elm-open-api-codegen/helpers/Task.elm diff --git a/elm-open-api-codegen/review/elm.json b/elm-open-api-codegen/review/elm.json new file mode 100644 index 00000000..1a4efce3 --- /dev/null +++ b/elm-open-api-codegen/review/elm.json @@ -0,0 +1,41 @@ +{ + "type": "application", + "source-directories": [ + "src" + ], + "elm-version": "0.19.1", + "dependencies": { + "direct": { + "elm/core": "1.0.5", + "elm/json": "1.1.3", + "elm/project-metadata-utils": "1.0.2", + "jfmengels/elm-review": "2.15.1", + "jfmengels/elm-review-code-style": "1.2.0", + "jfmengels/elm-review-common": "1.3.3", + "jfmengels/elm-review-debug": "1.0.8", + "jfmengels/elm-review-documentation": "2.0.4", + "jfmengels/elm-review-simplify": "2.1.8", + "jfmengels/elm-review-unused": "1.2.4", + "stil4m/elm-syntax": "7.3.9" + }, + "indirect": { + "elm/bytes": "1.0.8", + "elm/html": "1.0.0", + "elm/parser": "1.1.0", + "elm/random": "1.0.0", + "elm/regex": "1.0.0", + "elm/time": "1.0.0", + "elm/virtual-dom": "1.0.4", + "elm-explorations/test": "2.2.0", + "pzp1997/assoc-list": "1.0.0", + "rtfeldman/elm-hex": "1.0.0", + "stil4m/structured-writer": "1.0.3" + } + }, + "test-dependencies": { + "direct": { + "elm-explorations/test": "2.2.0" + }, + "indirect": {} + } +} \ No newline at end of file diff --git a/elm-open-api-codegen/review/src/ReviewConfig.elm b/elm-open-api-codegen/review/src/ReviewConfig.elm new file mode 100644 index 00000000..0ccfc07d --- /dev/null +++ b/elm-open-api-codegen/review/src/ReviewConfig.elm @@ -0,0 +1,68 @@ +module ReviewConfig exposing (config) + +{-| Do not rename the ReviewConfig module or the config function, because +`elm-review` will look for these. + +To add packages that contain rules, add them to this review project using + + `elm install author/packagename` + +when inside the directory containing this file. + +-} + +import Docs.NoMissing exposing (exposedModules, onlyExposed) +import Docs.ReviewAtDocs +import Docs.ReviewLinksAndSections +import Docs.UpToDateReadmeLinks +import NoConfusingPrefixOperator +import NoDebug.Log +import NoDebug.TodoOrToString +import NoExposingEverything +import NoImportingEverything +import NoMissingTypeAnnotation +import NoMissingTypeAnnotationInLetIn +import NoMissingTypeExpose +import NoPrematureLetComputation +import NoSimpleLetBody +import NoUnused.CustomTypeConstructorArgs +import NoUnused.CustomTypeConstructors +import NoUnused.Dependencies +import NoUnused.Exports +import NoUnused.Parameters +import NoUnused.Patterns +import NoUnused.Variables +import Review.Rule as Rule exposing (Rule) +import Simplify + + +config : List Rule +config = + [ Docs.NoMissing.rule + { document = onlyExposed + , from = exposedModules + } + , Docs.ReviewLinksAndSections.rule + , Docs.ReviewAtDocs.rule + , Docs.UpToDateReadmeLinks.rule + , NoConfusingPrefixOperator.rule + , NoDebug.Log.rule + , NoDebug.TodoOrToString.rule + |> Rule.ignoreErrorsForDirectories [ "tests/" ] + , NoExposingEverything.rule + , NoImportingEverything.rule [] + , NoMissingTypeAnnotation.rule + , NoMissingTypeAnnotationInLetIn.rule + , NoMissingTypeExpose.rule + , NoSimpleLetBody.rule + , NoPrematureLetComputation.rule + , NoUnused.CustomTypeConstructors.rule [] + , NoUnused.CustomTypeConstructorArgs.rule + , NoUnused.Dependencies.rule + , NoUnused.Exports.rule + , NoUnused.Parameters.rule + , NoUnused.Patterns.rule + , NoUnused.Variables.rule + , Simplify.rule Simplify.defaults + ] + |> List.map (Rule.ignoreErrorsForDirectories [ "src/Gen" ]) diff --git a/elm-open-api-codegen/scripts/codegen b/elm-open-api-codegen/scripts/codegen new file mode 100755 index 00000000..dd5be51c --- /dev/null +++ b/elm-open-api-codegen/scripts/codegen @@ -0,0 +1,55 @@ +#!/usr/bin/env node +import { spawnSync } from "node:child_process"; +import { readdirSync } from "node:fs"; +import { unlink } from "node:fs/promises"; + +const debug = process.env.DEBUG ? console.trace : () => {}; + +function recursiveReaddir(path) { + const entries = readdirSync(path, { withFileTypes: true }); + return entries.flatMap((dirent) => { + if (dirent.isDirectory()) { + return recursiveReaddir(`${path}/${dirent.name}`); + } + if (dirent.name.endsWith(".elm")) { + return [`${path}/${dirent.name}`]; + } + return []; + }); +} + +// First generate all codegen helpers. +spawnSync("npx", ["--no", "--", "elm-codegen", "install", "--cwd=src"], { + stdio: "inherit", +}); + +// Find all instances of importing codegen helpers. +const { stdout } = spawnSync("grep", ["import Gen.", "-Rh", "src"]); + +// Determine which helper modules are actually used. +const neededGenFiles = new Set( + stdout + .toString() + .trim() + .split("\n") + .map((line) => { + const moduleName = line + // Remove everything except module name + .replace(/^import ([^ ]*).*$/, "$1") + // Replace namespace separators with path separators + .replaceAll(".", "/"); + + return `src/${moduleName}.elm`; + }), +); +debug("needed Gen files", neededGenFiles); + +// Find *all* Gen files so we can determine which to delete. +const allGenFiles = recursiveReaddir("src/Gen"); +const unneededGenFiles = allGenFiles.filter( + (file) => !neededGenFiles.has(file), +); +debug("Deletable files", unneededGenFiles); + +// Delete the dead code. +await Promise.all(unneededGenFiles.map((file) => unlink(file))); diff --git a/src/BackendTask/Extra.elm b/elm-open-api-codegen/src/BackendTask/Extra.elm similarity index 100% rename from src/BackendTask/Extra.elm rename to elm-open-api-codegen/src/BackendTask/Extra.elm diff --git a/src/CliMonad.elm b/elm-open-api-codegen/src/CliMonad.elm similarity index 100% rename from src/CliMonad.elm rename to elm-open-api-codegen/src/CliMonad.elm diff --git a/src/Common.elm b/elm-open-api-codegen/src/Common.elm similarity index 88% rename from src/Common.elm rename to elm-open-api-codegen/src/Common.elm index 72017c4f..cde93e28 100644 --- a/src/Common.elm +++ b/elm-open-api-codegen/src/Common.elm @@ -22,11 +22,39 @@ module Common exposing , unwrapUnsafe ) +{-| + +@docs BasicType +@docs ConstValue +@docs Field +@docs Module +@docs Object +@docs OneOfData +@docs Package +@docs Type +@docs TypeName +@docs UnsafeName +@docs VariantName +@docs base64PackageName +@docs basicTypeToString +@docs commonModuleName +@docs enum +@docs moduleToNamespace +@docs ref +@docs reservedList +@docs toTypeName +@docs toValueName +@docs unwrapUnsafe + +-} + import Regex import Set exposing (Set) import String.Extra +{-| An Elm module being generated +-} type Module = Json | Types @@ -36,6 +64,8 @@ type Module | Servers +{-| An Effects package we can target when code-generating API calls. +-} type Package = ElmHttp | DillonkearnsElmPages @@ -48,6 +78,8 @@ type UnsafeName = UnsafeName String +{-| Given a namespace and Module, generate the full module name +-} moduleToNamespace : List String -> Module -> List String moduleToNamespace namespace moduleName = case moduleName of @@ -78,6 +110,8 @@ moduleToNamespace namespace moduleName = commonModuleName +{-| Module where we generate common helper functions. +-} commonModuleName : List String commonModuleName = [ "OpenApi", "Common" ] @@ -87,6 +121,8 @@ commonModuleName = -- Names adaptation -- +{-| Convert an UnsafeName to a valid TypeName. +-} toTypeName : UnsafeName -> TypeName toTypeName (UnsafeName name) = name @@ -169,6 +205,8 @@ toValueName (UnsafeName name) = clean +{-| Reserved words; these can't be used for Elm variable names. +-} reservedList : Set String reservedList = -- Copied from elm-syntax @@ -314,6 +352,8 @@ initialUppercaseWordToLowercase input = input +{-| Intermediate representation of an OpenAPI schema +-} type Type = Nullable Type | Object Object @@ -335,6 +375,8 @@ type Type | Unit +{-| A basic value +-} type BasicType = Integer | Boolean @@ -342,6 +384,8 @@ type BasicType | Number +{-| A constant value +-} type ConstValue = ConstInteger Int | ConstBoolean Bool @@ -349,6 +393,8 @@ type ConstValue | ConstNumber Float +{-| Convert BasicType to OpenAPI "type" string +-} basicTypeToString : BasicType -> String basicTypeToString basicType = case basicType of @@ -365,10 +411,14 @@ basicTypeToString basicType = "number" +{-| An Object in a schema +-} type alias Object = List ( UnsafeName, Field ) +{-| A `oneOf` declaration +-} type alias OneOfData = List { name : UnsafeName @@ -377,14 +427,20 @@ type alias OneOfData = } +{-| Name of a Type. +-} type alias TypeName = String +{-| Variant. +-} type alias VariantName = TypeName +{-| An Object field. +-} type alias Field = { type_ : Type , required : Bool @@ -392,16 +448,22 @@ type alias Field = } +{-| Create a "Ref", as in `$ref: "#/components/..."`. +-} ref : String -> Type ref str = Ref (String.split "/" str) +{-| Get the value inside of an UnsafeName. +-} unwrapUnsafe : UnsafeName -> String unwrapUnsafe (UnsafeName name) = name +{-| Generate an "enum" from a list of variants. +-} enum : List String -> Type enum variants = variants @@ -410,6 +472,8 @@ enum variants = |> Enum +{-| Name of the package needed for Base64. +-} base64PackageName : String base64PackageName = "danfishgold/base64-bytes" diff --git a/src/Elm/Declare/Extra.elm b/elm-open-api-codegen/src/Elm/Declare/Extra.elm similarity index 100% rename from src/Elm/Declare/Extra.elm rename to elm-open-api-codegen/src/Elm/Declare/Extra.elm diff --git a/src/Elm/Extra.elm b/elm-open-api-codegen/src/Elm/Extra.elm similarity index 100% rename from src/Elm/Extra.elm rename to elm-open-api-codegen/src/Elm/Extra.elm diff --git a/src/Elm/Op/Extra.elm b/elm-open-api-codegen/src/Elm/Op/Extra.elm similarity index 100% rename from src/Elm/Op/Extra.elm rename to elm-open-api-codegen/src/Elm/Op/Extra.elm diff --git a/codegen/Gen/BackendTask.elm b/elm-open-api-codegen/src/Gen/BackendTask.elm similarity index 100% rename from codegen/Gen/BackendTask.elm rename to elm-open-api-codegen/src/Gen/BackendTask.elm diff --git a/codegen/Gen/BackendTask/Http.elm b/elm-open-api-codegen/src/Gen/BackendTask/Http.elm similarity index 100% rename from codegen/Gen/BackendTask/Http.elm rename to elm-open-api-codegen/src/Gen/BackendTask/Http.elm diff --git a/codegen/Gen/Base64.elm b/elm-open-api-codegen/src/Gen/Base64.elm similarity index 100% rename from codegen/Gen/Base64.elm rename to elm-open-api-codegen/src/Gen/Base64.elm diff --git a/codegen/Gen/Basics.elm b/elm-open-api-codegen/src/Gen/Basics.elm similarity index 100% rename from codegen/Gen/Basics.elm rename to elm-open-api-codegen/src/Gen/Basics.elm diff --git a/codegen/Gen/Bytes.elm b/elm-open-api-codegen/src/Gen/Bytes.elm similarity index 100% rename from codegen/Gen/Bytes.elm rename to elm-open-api-codegen/src/Gen/Bytes.elm diff --git a/codegen/Gen/Bytes/Decode.elm b/elm-open-api-codegen/src/Gen/Bytes/Decode.elm similarity index 100% rename from codegen/Gen/Bytes/Decode.elm rename to elm-open-api-codegen/src/Gen/Bytes/Decode.elm diff --git a/codegen/Gen/Date.elm b/elm-open-api-codegen/src/Gen/Date.elm similarity index 100% rename from codegen/Gen/Date.elm rename to elm-open-api-codegen/src/Gen/Date.elm diff --git a/codegen/Gen/Debug.elm b/elm-open-api-codegen/src/Gen/Debug.elm similarity index 100% rename from codegen/Gen/Debug.elm rename to elm-open-api-codegen/src/Gen/Debug.elm diff --git a/codegen/Gen/Dict.elm b/elm-open-api-codegen/src/Gen/Dict.elm similarity index 100% rename from codegen/Gen/Dict.elm rename to elm-open-api-codegen/src/Gen/Dict.elm diff --git a/codegen/Gen/Effect/Http.elm b/elm-open-api-codegen/src/Gen/Effect/Http.elm similarity index 100% rename from codegen/Gen/Effect/Http.elm rename to elm-open-api-codegen/src/Gen/Effect/Http.elm diff --git a/codegen/Gen/Effect/Task.elm b/elm-open-api-codegen/src/Gen/Effect/Task.elm similarity index 100% rename from codegen/Gen/Effect/Task.elm rename to elm-open-api-codegen/src/Gen/Effect/Task.elm diff --git a/codegen/Gen/FatalError.elm b/elm-open-api-codegen/src/Gen/FatalError.elm similarity index 100% rename from codegen/Gen/FatalError.elm rename to elm-open-api-codegen/src/Gen/FatalError.elm diff --git a/codegen/Gen/Http.elm b/elm-open-api-codegen/src/Gen/Http.elm similarity index 100% rename from codegen/Gen/Http.elm rename to elm-open-api-codegen/src/Gen/Http.elm diff --git a/codegen/Gen/Json/Decode.elm b/elm-open-api-codegen/src/Gen/Json/Decode.elm similarity index 100% rename from codegen/Gen/Json/Decode.elm rename to elm-open-api-codegen/src/Gen/Json/Decode.elm diff --git a/codegen/Gen/Json/Encode.elm b/elm-open-api-codegen/src/Gen/Json/Encode.elm similarity index 100% rename from codegen/Gen/Json/Encode.elm rename to elm-open-api-codegen/src/Gen/Json/Encode.elm diff --git a/codegen/Gen/List.elm b/elm-open-api-codegen/src/Gen/List.elm similarity index 100% rename from codegen/Gen/List.elm rename to elm-open-api-codegen/src/Gen/List.elm diff --git a/codegen/Gen/Maybe.elm b/elm-open-api-codegen/src/Gen/Maybe.elm similarity index 100% rename from codegen/Gen/Maybe.elm rename to elm-open-api-codegen/src/Gen/Maybe.elm diff --git a/codegen/Gen/Parser/Advanced.elm b/elm-open-api-codegen/src/Gen/Parser/Advanced.elm similarity index 100% rename from codegen/Gen/Parser/Advanced.elm rename to elm-open-api-codegen/src/Gen/Parser/Advanced.elm diff --git a/codegen/Gen/Result.elm b/elm-open-api-codegen/src/Gen/Result.elm similarity index 100% rename from codegen/Gen/Result.elm rename to elm-open-api-codegen/src/Gen/Result.elm diff --git a/codegen/Gen/Rfc3339.elm b/elm-open-api-codegen/src/Gen/Rfc3339.elm similarity index 100% rename from codegen/Gen/Rfc3339.elm rename to elm-open-api-codegen/src/Gen/Rfc3339.elm diff --git a/codegen/Gen/String.elm b/elm-open-api-codegen/src/Gen/String.elm similarity index 100% rename from codegen/Gen/String.elm rename to elm-open-api-codegen/src/Gen/String.elm diff --git a/codegen/Gen/Task.elm b/elm-open-api-codegen/src/Gen/Task.elm similarity index 100% rename from codegen/Gen/Task.elm rename to elm-open-api-codegen/src/Gen/Task.elm diff --git a/codegen/Gen/Time.elm b/elm-open-api-codegen/src/Gen/Time.elm similarity index 100% rename from codegen/Gen/Time.elm rename to elm-open-api-codegen/src/Gen/Time.elm diff --git a/codegen/Gen/Url.elm b/elm-open-api-codegen/src/Gen/Url.elm similarity index 100% rename from codegen/Gen/Url.elm rename to elm-open-api-codegen/src/Gen/Url.elm diff --git a/codegen/Gen/Url/Builder.elm b/elm-open-api-codegen/src/Gen/Url/Builder.elm similarity index 100% rename from codegen/Gen/Url/Builder.elm rename to elm-open-api-codegen/src/Gen/Url/Builder.elm diff --git a/src/JsonSchema/Generate.elm b/elm-open-api-codegen/src/JsonSchema/Generate.elm similarity index 100% rename from src/JsonSchema/Generate.elm rename to elm-open-api-codegen/src/JsonSchema/Generate.elm diff --git a/elm-open-api-codegen/src/OpenApi/BackendTask.elm b/elm-open-api-codegen/src/OpenApi/BackendTask.elm new file mode 100644 index 00000000..1272af59 --- /dev/null +++ b/elm-open-api-codegen/src/OpenApi/BackendTask.elm @@ -0,0 +1,906 @@ +module OpenApi.BackendTask exposing (withConfig) + +{-| Run OpenAPI code generation via an Elm Pages `BackendTask`. + +@docs withConfig + +-} + +import Ansi +import Ansi.Color +import BackendTask exposing (BackendTask) +import BackendTask.Extra +import BackendTask.File +import BackendTask.Http +import BackendTask.Stream +import CliMonad +import Common +import Dict +import Dict.Extra +import Elm +import FastDict +import FastSet +import FatalError exposing (FatalError) +import Json.Decode +import Json.Encode +import Json.Value +import OpenApi +import OpenApi.Common.Internal +import OpenApi.Config +import OpenApi.Generate +import Pages.Script +import Pages.Script.Spinner +import Result.Extra +import Set +import String.Extra +import Url +import UrlPath +import Yaml.Decode + + +withInnerStep : + Int + -> Int + -> String + -> (a -> BackendTask FatalError b) + -> Pages.Script.Spinner.Steps FatalError ( a, c, d ) + -> Pages.Script.Spinner.Steps FatalError ( b, c, d ) +withInnerStep index total label toTask = + Pages.Script.Spinner.withStep (counter index total ++ " " ++ label) + (\( input, acc1, acc2 ) -> toTask input |> BackendTask.map (\result -> ( result, acc1, acc2 ))) + + +{-| Given a configuration, create the BackendTask to run the code generation. +-} +withConfig : OpenApi.Config.Config -> BackendTask FatalError () +withConfig config = + let + total : Int + total = + List.length (OpenApi.Config.inputs config) + in + List.foldl + (\input ( index, steps ) -> + ( index + 1 + , steps + |> (case OpenApi.Config.oasPath input of + OpenApi.Config.Url url -> + withInnerStep index + total + ("Download OAS from " ++ Url.toString url) + (\_ -> BackendTask.andThen (parseOriginal input) (readFromUrl url)) + + OpenApi.Config.File path -> + withInnerStep index + total + ("Read OAS from " ++ path) + (\_ -> BackendTask.andThen (parseOriginal input) (readFromFile path)) + ) + |> (\prev -> + let + overrides : List OpenApi.Config.Path + overrides = + OpenApi.Config.overrides input + in + if List.isEmpty overrides then + prev + |> withInnerStep index + total + "No overrides" + (\( _, original ) -> BackendTask.succeed (Json.Value.encode original)) + + else + List.foldl + (\override -> + case override of + OpenApi.Config.Url url -> + withInnerStep index + total + ("Download override from " ++ Url.toString url) + (\( acc, original ) -> BackendTask.map (\read -> ( ( override, read ) :: acc, original )) (readFromUrl url)) + + OpenApi.Config.File path -> + withInnerStep index + total + ("Read override from " ++ path) + (\( acc, original ) -> BackendTask.map (\read -> ( ( override, read ) :: acc, original )) (readFromFile path)) + ) + prev + overrides + |> withInnerStep index total "Merging overrides" mergeOverrides + ) + |> (case OpenApi.Config.writeMergedTo input of + Nothing -> + identity + + Just destination -> + withInnerStep index total "Writing merged OAS" (writeMerged destination) + ) + |> Pages.Script.Spinner.withStep (counter index total ++ " Parse OAS") + (\( merged, apiSpecAcc, formatsAcc ) -> + merged + |> decodeOpenApiSpecOrFail { hasAttemptedToConvertFromSwagger = False } config input + |> BackendTask.map + (\( apiSpec, formats ) -> + ( () + , ( input, apiSpec ) :: apiSpecAcc + , formats :: formatsAcc + ) + ) + ) + ) + ) + ( 1 + , Pages.Script.Spinner.steps + |> Pages.Script.Spinner.withStep "Collecting configuration" (\_ -> BackendTask.succeed ( (), [], [] )) + ) + (OpenApi.Config.inputs config) + |> Tuple.second + |> Pages.Script.Spinner.withStep "Generate Elm modules" + (\( (), apiSpecs, allFormats ) -> + OpenApi.Config.toGenerationConfig (List.concat allFormats) config apiSpecs + |> generateFilesFromOpenApiSpecs + ) + |> Pages.Script.Spinner.withStep "Format with elm-format" (onFirst attemptToFormat) + |> Pages.Script.Spinner.withStep "Write to disk" (onFirst (writeSdkToDisk (OpenApi.Config.outputDirectory config))) + |> Pages.Script.Spinner.runSteps + |> BackendTask.andThen printSuccessMessageAndWarnings + + +counter : Int -> Int -> String +counter index total = + let + totalString : String + totalString = + String.fromInt total + in + "[" + ++ String.padLeft (String.length totalString) '0' (String.fromInt index) + ++ "/" + ++ totalString + ++ "]" + + +onFirst : (a -> BackendTask.BackendTask error c) -> ( a, b ) -> BackendTask.BackendTask error ( c, b ) +onFirst f ( a, b ) = + f a |> BackendTask.map (\c -> ( c, b )) + + +parseOriginal : OpenApi.Config.Input -> String -> BackendTask.BackendTask FatalError.FatalError ( List a, Json.Value.JsonValue ) +parseOriginal input original = + case decodeMaybeYaml (OpenApi.Config.oasPath input) original of + Err e -> + e + |> jsonErrorToFatalError + |> BackendTask.fail + + Ok decoded -> + BackendTask.succeed ( [], decoded ) + + +mergeOverrides : ( List ( OpenApi.Config.Path, String ), Json.Value.JsonValue ) -> BackendTask.BackendTask FatalError.FatalError Json.Decode.Value +mergeOverrides ( overrides, original ) = + Result.map + (\overridesValues -> + List.foldl + (\override acc -> Result.andThen (overrideWith override) acc) + (Ok original) + overridesValues + |> Result.mapError FatalError.fromString + |> Result.map Json.Value.encode + ) + (overrides + |> List.reverse + |> Result.Extra.combineMap (\( path, file ) -> decodeMaybeYaml path file) + |> Result.mapError jsonErrorToFatalError + ) + |> Result.Extra.join + |> BackendTask.fromResult + + +writeMerged : String -> Json.Decode.Value -> BackendTask.BackendTask FatalError.FatalError Json.Decode.Value +writeMerged destination spec = + Pages.Script.writeFile + { path = destination + , body = spec |> Json.Encode.encode 4 + } + |> BackendTask.allowFatal + |> BackendTask.map (\_ -> spec) + + +decodeOpenApiSpecOrFail : + { hasAttemptedToConvertFromSwagger : Bool } + -> OpenApi.Config.Config + -> OpenApi.Config.Input + -> Json.Decode.Value + -> BackendTask.BackendTask FatalError.FatalError ( OpenApi.OpenApi, List { format : String, basicType : Common.BasicType } ) +decodeOpenApiSpecOrFail { hasAttemptedToConvertFromSwagger } config input value = + case + Result.map2 Tuple.pair + (Json.Decode.decodeValue OpenApi.decode value) + (extractFormats value) + of + Ok pair -> + BackendTask.succeed pair + + Err decodeError -> + if hasAttemptedToConvertFromSwagger then + jsonErrorToFatalError decodeError + |> BackendTask.fail + + else + case Json.Decode.decodeValue swaggerFieldDecoder value of + Err _ -> + jsonErrorToFatalError decodeError + |> BackendTask.fail + + Ok _ -> + let + askForConversion : BackendTask error Bool + askForConversion = + if OpenApi.Config.autoConvertSwagger config then + BackendTask.succeed True + + else + Pages.Script.question + (Ansi.Color.fontColor Ansi.Color.brightCyan (OpenApi.Config.pathToString (OpenApi.Config.oasPath input)) + ++ """ is a Swagger doc (aka Open API v2) and this tool only supports Open API v3. +Would you like to use """ + ++ Ansi.Color.fontColor Ansi.Color.brightCyan (OpenApi.Config.swaggerConversionUrl config) + ++ " to upgrade to v3? (y/n)\n" + ) + |> BackendTask.map (\response -> String.toLower response == "y") + in + askForConversion + |> BackendTask.andThen + (\shouldConvert -> + if shouldConvert then + convertToSwaggerAndThenDecode config input value + + else + ("""The input file appears to be a Swagger doc, +and the CLI was not configured to automatically convert it to an Open API spec. +See the """ + ++ Ansi.Color.fontColor Ansi.Color.brightCyan "--auto-convert-swagger" + ++ " flag for more info." + ) + |> FatalError.fromString + |> BackendTask.fail + ) + + +extractFormats : Json.Decode.Value -> Result Json.Decode.Error (List { format : String, basicType : Common.BasicType }) +extractFormats value = + Json.Decode.decodeValue formatDecoder value + + +formatDecoder : Json.Decode.Decoder (List { format : String, basicType : Common.BasicType }) +formatDecoder = + let + typeDecoder : Json.Decode.Decoder Common.BasicType + typeDecoder = + Json.Decode.string + |> Json.Decode.andThen + (\type_ -> + case type_ of + "string" -> + Json.Decode.succeed Common.String + + "integer" -> + Json.Decode.succeed Common.Integer + + "boolean" -> + Json.Decode.succeed Common.Boolean + + "number" -> + Json.Decode.succeed Common.Number + + _ -> + Json.Decode.fail "Unexpected type" + ) + in + Json.Decode.oneOf + [ Json.Decode.list (Json.Decode.lazy (\_ -> formatDecoder)) + |> Json.Decode.map List.concat + , Json.Decode.dict Json.Decode.value + |> Json.Decode.andThen + (\dict -> + case ( Dict.get "format" dict, Dict.get "type" dict ) of + ( Just format, Just type_ ) -> + Result.map2 + (\fmt basicType -> + [ { format = fmt + , basicType = basicType + } + ] + ) + (Json.Decode.decodeValue Json.Decode.string format) + (Json.Decode.decodeValue typeDecoder type_) + |> resultToDecoder + + _ -> + dict + |> Dict.values + |> Result.Extra.combineMap + (\v -> Json.Decode.decodeValue (Json.Decode.lazy (\_ -> formatDecoder)) v) + |> Result.map List.concat + |> resultToDecoder + ) + , Json.Decode.succeed [] + ] + + +resultToDecoder : Result Json.Decode.Error a -> Json.Decode.Decoder a +resultToDecoder result = + case result of + Ok ok -> + Json.Decode.succeed ok + + Err e -> + Json.Decode.fail (Json.Decode.errorToString e) + + +convertToSwaggerAndThenDecode : OpenApi.Config.Config -> OpenApi.Config.Input -> Json.Decode.Value -> BackendTask.BackendTask FatalError.FatalError ( OpenApi.OpenApi, List { format : String, basicType : Common.BasicType } ) +convertToSwaggerAndThenDecode config input value = + convertSwaggerToOpenApi config (Json.Encode.encode 0 value) + |> BackendTask.andThen + (\swagger -> + parseOriginal input swagger + |> BackendTask.andThen mergeOverrides + ) + |> Pages.Script.Spinner.runTask "Convert Swagger to Open API" + |> BackendTask.andThen (\converted -> decodeOpenApiSpecOrFail { hasAttemptedToConvertFromSwagger = True } config input converted) + + +jsonErrorToFatalError : Json.Decode.Error -> FatalError.FatalError +jsonErrorToFatalError decodeError = + decodeError + |> Json.Decode.errorToString + |> Ansi.Color.fontColor Ansi.Color.brightRed + |> FatalError.fromString + + +overrideWith : Json.Value.JsonValue -> Json.Value.JsonValue -> Result String Json.Value.JsonValue +overrideWith override original = + case override of + Json.Value.ObjectValue overrideObject -> + case original of + Json.Value.ObjectValue originalObject -> + Dict.merge + (\key value res -> Result.map (\acc -> ( key, value ) :: acc) res) + (\key originalValue overrideValue res -> + if overrideValue == Json.Value.NullValue then + res + + else if key == "security" then + Result.map (\acc -> ( key, overrideValue ) :: acc) res + + else + Result.map2 + (\acc newValue -> ( key, newValue ) :: acc) + res + (overrideWith overrideValue originalValue) + ) + (\key value res -> Result.map (\acc -> ( key, value ) :: acc) res) + (Dict.fromList originalObject) + (Dict.fromList overrideObject) + (Ok []) + |> Result.map (\list -> Json.Value.ObjectValue (List.reverse list)) + + _ -> + overrideError override original + + Json.Value.ArrayValue overrideArray -> + case original of + Json.Value.ArrayValue originalArray -> + mergeArrays overrideArray originalArray [] + + _ -> + overrideError override original + + Json.Value.BoolValue _ -> + Ok override + + Json.Value.NumericValue _ -> + Ok override + + Json.Value.StringValue _ -> + Ok override + + Json.Value.NullValue -> + Ok override + + +mergeArrays : List Json.Value.JsonValue -> List Json.Value.JsonValue -> List Json.Value.JsonValue -> Result String Json.Value.JsonValue +mergeArrays override original acc = + case original of + ogHead :: ogTail -> + case override of + Json.Value.NullValue :: ovTail -> + mergeArrays ovTail ogTail acc + + ovHead :: ovTail -> + case overrideWith ovHead ogHead of + Ok newHead -> + mergeArrays ovTail ogTail (newHead :: acc) + + Err e -> + Err e + + [] -> + if List.isEmpty original then + Ok (Json.Value.ArrayValue (List.reverse acc)) + + else + Ok (Json.Value.ArrayValue (List.reverse acc ++ original)) + + [] -> + if List.isEmpty override then + Ok (Json.Value.ArrayValue (List.reverse acc)) + + else + Ok (Json.Value.ArrayValue (List.reverse acc ++ override)) + + +overrideError : Json.Value.JsonValue -> Json.Value.JsonValue -> Result String Json.Value.JsonValue +overrideError override original = + let + toString : Json.Value.JsonValue -> String + toString v = + Json.Encode.encode 0 (Json.Value.encode v) + + message : String + message = + "Cannot override original value " ++ toString original ++ " with override " ++ toString override + in + Err message + + +convertSwaggerToOpenApi : OpenApi.Config.Config -> String -> BackendTask.BackendTask FatalError.FatalError String +convertSwaggerToOpenApi config input = + case OpenApi.Config.swaggerConversionCommand config of + Just { command, args } -> + BackendTask.Stream.fromString input + |> BackendTask.Stream.pipe (BackendTask.Stream.command command args) + |> BackendTask.Stream.read + |> BackendTask.mapError + (\error -> + FatalError.fromString <| + ("Attempted to convert the Swagger doc to an Open API spec using\n" + ++ Ansi.Color.fontColor Ansi.Color.brightCyan + (String.join " " + (command :: args) + ) + ++ "\nbut encountered an issue:\n\n" + ++ (Ansi.Color.fontColor Ansi.Color.brightRed <| + case error.recoverable of + BackendTask.Stream.StreamError err -> + err + + BackendTask.Stream.CustomError errCode maybeBody -> + case maybeBody of + Just body -> + body + + Nothing -> + String.fromInt errCode + ) + ) + ) + |> BackendTask.map .body + + Nothing -> + let + swaggerConversionUrl : String + swaggerConversionUrl = + OpenApi.Config.swaggerConversionUrl config + in + BackendTask.Http.post swaggerConversionUrl + (BackendTask.Http.stringBody "application/yaml" input) + (BackendTask.Http.expectJson Json.Decode.value) + |> BackendTask.map (Json.Encode.encode 0) + |> BackendTask.mapError + (\error -> + FatalError.fromString + ("Attempted to convert the Swagger doc to an Open API spec but encountered an issue:\n\n" + ++ (Ansi.Color.fontColor Ansi.Color.brightRed <| + case error.recoverable of + BackendTask.Http.BadUrl _ -> + "with the URL: " ++ swaggerConversionUrl + + BackendTask.Http.Timeout -> + "the request timed out" + + BackendTask.Http.NetworkError -> + "with a network error" + + BackendTask.Http.BadStatus { statusCode, statusText } _ -> + "status code " ++ String.fromInt statusCode ++ ", " ++ statusText + + BackendTask.Http.BadBody _ _ -> + "expected a string response body but got something else" + ) + ) + ) + + +swaggerFieldDecoder : Json.Decode.Decoder String +swaggerFieldDecoder = + Json.Decode.field "swagger" Json.Decode.string + + +decodeMaybeYaml : OpenApi.Config.Path -> String -> Result Json.Decode.Error Json.Value.JsonValue +decodeMaybeYaml oasPath input = + let + -- TODO: Better handling of errors: https://github.com/wolfadex/elm-open-api-cli/issues/40 + isJson : Bool + isJson = + case oasPath of + OpenApi.Config.File file -> + String.endsWith ".json" file + + OpenApi.Config.Url url -> + String.endsWith ".json" url.path + in + -- Short-circuit the error-prone yaml parsing of JSON structures if we + -- are reasonably confident that it is a JSON file + if isJson then + Json.Decode.decodeString Json.Value.decoder input + + else + case Yaml.Decode.fromString yamlToJsonValueDecoder input of + Err _ -> + Json.Decode.decodeString Json.Value.decoder input + + Ok jsonFromYaml -> + Ok jsonFromYaml + + +yamlToJsonValueDecoder : Yaml.Decode.Decoder Json.Value.JsonValue +yamlToJsonValueDecoder = + Yaml.Decode.oneOf + [ Yaml.Decode.map Json.Value.NumericValue Yaml.Decode.float + , Yaml.Decode.map Json.Value.StringValue Yaml.Decode.string + , Yaml.Decode.map Json.Value.BoolValue Yaml.Decode.bool + , Yaml.Decode.map (\_ -> Json.Value.NullValue) Yaml.Decode.null + , Yaml.Decode.map + Json.Value.ArrayValue + (Yaml.Decode.list (Yaml.Decode.lazy (\_ -> yamlToJsonValueDecoder))) + , Yaml.Decode.map + (\dict -> Json.Value.ObjectValue (Dict.toList dict)) + (Yaml.Decode.dict (Yaml.Decode.lazy (\_ -> yamlToJsonValueDecoder))) + ] + + +generateFilesFromOpenApiSpecs : + List ( OpenApi.Generate.Config, OpenApi.OpenApi ) + -> + BackendTask.BackendTask + FatalError.FatalError + ( List Elm.File + , { warnings : List CliMonad.Message + , requiredPackages : FastSet.Set String + } + ) +generateFilesFromOpenApiSpecs configs = + configs + |> BackendTask.Extra.combineMap + (\( config, apiSpec ) -> + OpenApi.Generate.files config apiSpec + |> Result.mapError + (\err -> + err + |> messageToString + |> FatalError.fromString + ) + |> BackendTask.fromResult + ) + |> BackendTask.map + (\result -> + let + groupOrder : String -> Int + groupOrder group = + case group of + "Request functions" -> + 1 + + "Types" -> + 2 + + "Encoders" -> + 3 + + "Decoders" -> + 4 + + _ -> + 5 + + commonDeclarationsFromResult : List { declaration : Elm.Declaration, group : String } + commonDeclarationsFromResult = + result + |> List.concatMap .modules + |> Dict.Extra.groupBy .moduleName + |> Dict.toList + |> List.concatMap + (\( moduleName, declarations ) -> + if moduleName == Common.commonModuleName then + declarations + |> List.foldl (\e acc -> FastDict.union e.declarations acc) FastDict.empty + |> FastDict.values + + else + [] + ) + + allEffectTypes : List OpenApi.Config.EffectType + allEffectTypes = + List.concatMap + (\( { effectTypes }, _ ) -> effectTypes) + configs + + commonFile : Elm.File + commonFile = + OpenApi.Common.Internal.declarations + { effectTypes = allEffectTypes + , requiresBase64 = List.any (\{ requiredPackages } -> FastSet.member Common.base64PackageName requiredPackages) result + } + ++ commonDeclarationsFromResult + |> fileFromGroups Common.commonModuleName + + fileFromGroups : List String -> List { group : String, declaration : Elm.Declaration } -> Elm.File + fileFromGroups moduleName declarations = + declarations + |> Dict.Extra.groupBy (\{ group } -> ( groupOrder group, group )) + |> Dict.toList + |> List.concatMap + (\( ( _, group ), decls ) -> + [ Elm.docs ("## " ++ group) + , Elm.group (List.map .declaration decls) + ] + ) + |> Elm.file moduleName + in + ( result + |> List.concatMap .modules + |> Dict.Extra.groupBy .moduleName + |> Dict.toList + |> List.filterMap + (\( moduleName, declarations ) -> + if moduleName == Common.commonModuleName then + Nothing + + else + declarations + |> List.foldl (\e acc -> FastDict.union e.declarations acc) FastDict.empty + |> FastDict.values + |> fileFromGroups moduleName + |> Just + ) + |> (::) commonFile + , { warnings = List.concatMap .warnings result + , requiredPackages = + List.foldl + (\{ requiredPackages } acc -> FastSet.union requiredPackages acc) + FastSet.empty + result + } + ) + ) + + +{-| Check to see if `elm-format` is available, and if so format the files +-} +attemptToFormat : List Elm.File -> BackendTask.BackendTask FatalError.FatalError (List Elm.File) +attemptToFormat files = + Pages.Script.which "elm-format" + |> BackendTask.andThen + (\maybeFound -> + case maybeFound of + Just _ -> + files + |> BackendTask.Extra.combineMap + (\file -> + BackendTask.Stream.fromString file.contents + |> BackendTask.Stream.pipe (BackendTask.Stream.command "elm-format" [ "--stdin" ]) + |> BackendTask.Stream.read + |> BackendTask.map (\formatted -> { file | contents = formatted.body }) + -- Never fail on formatting errors + |> BackendTask.onError (\_ -> BackendTask.succeed file) + ) + + Nothing -> + BackendTask.succeed files + ) + + +writeSdkToDisk : String -> List Elm.File -> BackendTask.BackendTask FatalError.FatalError (List String) +writeSdkToDisk outputDirectory files = + BackendTask.Extra.combineMap + (\file -> + let + filePath : String + filePath = + outputDirectory + ++ "/" + ++ file.path + + outputPath : String + outputPath = + filePath + |> String.split "/" + |> UrlPath.join + |> UrlPath.toRelative + in + Pages.Script.writeFile + { path = outputPath + , body = file.contents + } + |> BackendTask.mapError + (\error -> + case error.recoverable of + Pages.Script.FileWriteError -> + FatalError.fromString <| + Ansi.Color.fontColor Ansi.Color.brightRed + ("Uh oh! Failed to write " ++ outputPath) + ) + |> BackendTask.map (\_ -> outputPath) + ) + files + + +printSuccessMessageAndWarnings : + ( List String + , { warnings : List CliMonad.Message + , requiredPackages : FastSet.Set String + } + ) + -> BackendTask.BackendTask FatalError.FatalError () +printSuccessMessageAndWarnings ( outputPaths, { requiredPackages, warnings } ) = + let + indentBy : Int -> String -> String + indentBy amount input = + String.repeat amount " " ++ input + + allRequiredPackages : List String + allRequiredPackages = + requiredPackages + |> FastSet.insert "elm/http" + |> FastSet.insert "elm/json" + |> FastSet.insert "elm/url" + |> FastSet.insert "elm/bytes" + |> FastSet.toList + + toInstall : String -> String + toInstall dependency = + indentBy 4 "elm install " ++ dependency + + toSentence : List String -> String + toSentence links = + links + |> List.map toElmDependencyLink + |> String.Extra.toSentenceOxford + + toElmDependencyLink : String -> String + toElmDependencyLink dependency = + Ansi.link + { text = dependency + , url = "https://package.elm-lang.org/packages/" ++ dependency ++ "/latest/" + } + + warningTask : BackendTask.BackendTask FatalError.FatalError () + warningTask = + warnings + |> Dict.Extra.groupBy .message + |> Dict.toList + |> List.map logWarning + |> BackendTask.doEach + + successTask : BackendTask.BackendTask error () + successTask = + [ [ "" + , "🎉 SDK generated:" + , "" + ] + , outputPaths + |> List.map (indentBy 4) + , [ "" + , "" + , "You'll also need " ++ toSentence allRequiredPackages ++ " installed. Try running:" + , "" + ] + , List.map toInstall allRequiredPackages + ] + |> List.concat + |> List.map Pages.Script.log + |> BackendTask.doEach + in + BackendTask.doEach [ successTask, warningTask ] + + +messageToString : CliMonad.Message -> String +messageToString { path, message } = + if List.isEmpty path then + "Error! " ++ message + + else + "Error! " ++ message ++ "\n Path: " ++ String.join " -> " path + + +logWarning : ( String, List CliMonad.Message ) -> BackendTask.BackendTask FatalError.FatalError () +logWarning ( message, messages ) = + let + firstLine : String + firstLine = + Ansi.Color.fontColor Ansi.Color.brightYellow "Warning: " ++ message + + paths : List String + paths = + messages + |> List.filterMap + (\{ path } -> + if List.isEmpty path then + Nothing + + else + Just (" at " ++ String.join " -> " path) + ) + |> Set.fromList + |> Set.toList + in + (firstLine :: paths) + |> List.map Pages.Script.log + |> BackendTask.doEach + + + +-- HELPERS + + +readFromUrl : Url.Url -> BackendTask.BackendTask FatalError.FatalError String +readFromUrl url = + let + path : String + path = + Url.toString url + in + BackendTask.Http.get path BackendTask.Http.expectString + |> BackendTask.mapError + (\error -> + FatalError.fromString <| + Ansi.Color.fontColor Ansi.Color.brightRed <| + case error.recoverable of + BackendTask.Http.BadUrl _ -> + "Uh oh! There is no file at " ++ path + + BackendTask.Http.Timeout -> + "Uh oh! Timed out waiting for response" + + BackendTask.Http.NetworkError -> + "Uh oh! A network error happened" + + BackendTask.Http.BadStatus { statusCode, statusText } _ -> + "Uh oh! The server responded with a " ++ String.fromInt statusCode ++ " " ++ statusText ++ " status" + + BackendTask.Http.BadBody _ _ -> + "Uh oh! The body of the response was invalid" + ) + + +readFromFile : String -> BackendTask.BackendTask FatalError.FatalError String +readFromFile entryFilePath = + BackendTask.File.rawFile entryFilePath + |> BackendTask.mapError + (\error -> + FatalError.fromString <| + Ansi.Color.fontColor Ansi.Color.brightRed <| + case error.recoverable of + BackendTask.File.FileDoesntExist -> + "Uh oh! There is no file at " ++ entryFilePath + + BackendTask.File.FileReadError _ -> + "Uh oh! Can't read!" + + BackendTask.File.DecodingError _ -> + "Uh oh! Decoding failure!" + ) diff --git a/src/OpenApi/Common/Internal.elm b/elm-open-api-codegen/src/OpenApi/Common/Internal.elm similarity index 100% rename from src/OpenApi/Common/Internal.elm rename to elm-open-api-codegen/src/OpenApi/Common/Internal.elm diff --git a/src/OpenApi/Config.elm b/elm-open-api-codegen/src/OpenApi/Config.elm similarity index 86% rename from src/OpenApi/Config.elm rename to elm-open-api-codegen/src/OpenApi/Config.elm index 404a475b..14dbd9b3 100644 --- a/src/OpenApi/Config.elm +++ b/elm-open-api-codegen/src/OpenApi/Config.elm @@ -68,6 +68,12 @@ import Url import Utils +{-| Configuration for OpenAPI code generation. See: + + - inputFrom + - builder functions in this module, such as withInput, withFormat, etc. + +-} type Config = Config { inputs : List Input @@ -81,6 +87,8 @@ type Config } +{-| An OpenAPI schema used as the basis for code generation. +-} type Input = Input { oasPath : Path @@ -92,6 +100,8 @@ type Input } +{-| Different effect types, for API call generation. Each represents a way to create HTTP calls in Elm or Lamdera. +-} type EffectType = ElmHttpCmd | ElmHttpCmdRecord @@ -109,6 +119,8 @@ type EffectType | LamderaProgramTestTaskRecord +{-| Determine which package is needed for an EffectType +-} effectTypeToPackage : EffectType -> Common.Package effectTypeToPackage effectType = case effectType of @@ -155,12 +167,19 @@ effectTypeToPackage effectType = Common.LamderaProgramTest +{-| OpenAPI server setting. + +To skip generating a Server.elm file, use `Multiple []`. + +-} type Server = Default | Single String | Multiple (Dict.Dict String String) +{-| Specify how to generate code and type annotations for data with a `format:` declared. +-} type alias Format = { basicType : Common.BasicType , format : String @@ -173,11 +192,15 @@ type alias Format = } +{-| Specify the location of an input, such as a schema or schema overrides file. +-} type Path = File String -- swagger.json ./swagger.json /folder/swagger.json | Url Url.Url -- https://petstore3.swagger.io/api/v3/openapi.json +{-| Create a Path +-} pathFromString : String -> Path pathFromString path = case Url.fromString path of @@ -188,6 +211,8 @@ pathFromString path = File path +{-| Unwrap a Path +-} pathToString : Path -> String pathToString pathType = case pathType of @@ -198,6 +223,8 @@ pathToString pathType = Url.toString url +{-| Create a new Config, given an initial value for output directory +-} init : String -> Config init initialOutputDirectory = { inputs = [] @@ -212,6 +239,8 @@ init initialOutputDirectory = |> Config +{-| Create an Input for a Config +-} inputFrom : Path -> Input inputFrom path = { oasPath = path @@ -230,6 +259,8 @@ inputFrom path = ------------- +{-| Built-in Formats +-} defaultFormats : List Format defaultFormats = [ dateTimeFormat @@ -239,6 +270,8 @@ defaultFormats = ] +{-| Default format for `format: date-time` +-} dateTimeFormat : Format dateTimeFormat = let @@ -288,6 +321,8 @@ dateTimeFormat = } +{-| Default format for `format: date` +-} dateFormat : Format dateFormat = { basicType = Common.String @@ -314,6 +349,8 @@ dateFormat = } +{-| Default format for `format: uri` +-} uriFormat : Format uriFormat = { basicType = Common.String @@ -342,6 +379,8 @@ uriFormat = } +{-| Default format for `format: byte` +-} byteFormat : Format byteFormat = { basicType = Common.String @@ -376,56 +415,83 @@ byteFormat = ------------- +{-| Set the type of Effects generated for an Input +-} withEffectTypes : List EffectType -> Input -> Input withEffectTypes effectTypes (Input input) = Input { input | effectTypes = effectTypes } +{-| Set an Input's generated Elm module name +-} withOutputModuleName : List String -> Input -> Input withOutputModuleName moduleName (Input input) = Input { input | outputModuleName = Just moduleName } +{-| Add override file(s) to an input, to override parts of the schema. + +Override files cannot delete a key from a schema, but can add keys or change the values of keys. + +However, specifying `security: []` in an override for a Path will override the top-level `security` declaration. + +-} withOverrides : List Path -> Input -> Input withOverrides newOverrides (Input input) = Input { input | overrides = newOverrides } +{-| Set whether to generate Debug.todo's. +-} withGenerateTodos : Bool -> Config -> Config withGenerateTodos generateTodos (Config config) = Config { config | generateTodos = generateTodos } +{-| Set whether to automatically convert a Swagger schema to an OpenAPI one. +-} withAutoConvertSwagger : Bool -> Config -> Config withAutoConvertSwagger newAutoConvertSwagger (Config config) = Config { config | autoConvertSwagger = newAutoConvertSwagger } +{-| Set the URL to convert a Swagger schema to an OpenAPI one. +-} withSwaggerConversionUrl : String -> Config -> Config withSwaggerConversionUrl newSwaggerConversionUrl (Config config) = Config { config | swaggerConversionUrl = newSwaggerConversionUrl } +{-| Set the shell command to convert a Swagger schema to an OpenAPI one. +-} withSwaggerConversionCommand : { command : String, args : List String } -> Config -> Config withSwaggerConversionCommand newSwaggerConversionCommand (Config config) = Config { config | swaggerConversionCommand = Just newSwaggerConversionCommand } +{-| Configure Server.elm module generation. +-} withServer : Server -> Input -> Input withServer newServer (Input input) = Input { input | server = newServer } +{-| Set output for merged writing. +-} withWriteMergedTo : String -> Input -> Input withWriteMergedTo newWriteMergedTo (Input input) = Input { input | writeMergedTo = Just newWriteMergedTo } +{-| Add a custom Format. +-} withFormat : Format -> Config -> Config withFormat newFormat (Config config) = Config { config | staticFormats = newFormat :: config.staticFormats } +{-| Add dynamic formats. +-} withFormats : (List { format : String, basicType : Common.BasicType } -> List Format) -> Config @@ -434,6 +500,8 @@ withFormats newFormat (Config config) = Config { config | dynamicFormats = \input -> newFormat input ++ config.dynamicFormats input } +{-| Add an input schema. +-} withInput : Input -> Config -> Config withInput input (Config config) = Config { config | inputs = input :: config.inputs } @@ -445,41 +513,57 @@ withInput input (Config config) = ------------- +{-| Retrieve Swagger conversion URL. +-} swaggerConversionUrl : Config -> String swaggerConversionUrl (Config config) = config.swaggerConversionUrl +{-| Retrieve Swagger conversion command. +-} swaggerConversionCommand : Config -> Maybe { command : String, args : List String } swaggerConversionCommand (Config config) = config.swaggerConversionCommand +{-| Retrieve whether to automatically convert Swagger to OpenAPI. +-} autoConvertSwagger : Config -> Bool autoConvertSwagger (Config config) = config.autoConvertSwagger +{-| Retrieve a Config's output directory. +-} outputDirectory : Config -> String outputDirectory (Config config) = config.outputDirectory +{-| Retrieve Inputs. +-} inputs : Config -> List Input inputs (Config config) = List.reverse config.inputs +{-| Retrieve OpenAPI Schema path. +-} oasPath : Input -> Path oasPath (Input input) = input.oasPath +{-| Retrieve writeMergedTo path, if applicable. +-} writeMergedTo : Input -> Maybe String writeMergedTo (Input input) = input.writeMergedTo +{-| Retrieve schema override paths. +-} overrides : Input -> List Path overrides (Input input) = input.overrides @@ -491,6 +575,8 @@ overrides (Input input) = ------------ +{-| For internal use only. +-} toGenerationConfig : List { format : String, basicType : Common.BasicType } -> Config diff --git a/src/OpenApi/Generate.elm b/elm-open-api-codegen/src/OpenApi/Generate.elm similarity index 99% rename from src/OpenApi/Generate.elm rename to elm-open-api-codegen/src/OpenApi/Generate.elm index a8cc5824..d6e733f6 100644 --- a/src/OpenApi/Generate.elm +++ b/elm-open-api-codegen/src/OpenApi/Generate.elm @@ -5,7 +5,6 @@ module OpenApi.Generate exposing , files ) -import Cli.Validate import CliMonad exposing (CliMonad) import Common import Dict @@ -56,6 +55,7 @@ import OpenApi.Schema import OpenApi.SecurityRequirement import OpenApi.SecurityScheme import OpenApi.Server +import Regex import Result.Extra import SchemaUtils import String.Extra @@ -1595,19 +1595,16 @@ operationToContentSchema operation = |> CliMonad.map (\ref -> JsonContent (Common.Ref <| String.split "/" <| OpenApi.Reference.ref ref)) -regexToCheckIfJson : String -> Cli.Validate.ValidationResult -regexToCheckIfJson = - Cli.Validate.regex "^application\\/(vnd\\.[a-z0-9]+(\\.v\\d+)?(\\.[a-z0-9]+)?)?\\+?json$" +regexToCheckIfJson : String -> Bool +regexToCheckIfJson mediaType = + Regex.fromString "^application\\/(vnd\\.[a-z0-9]+(\\.v\\d+)?(\\.[a-z0-9]+)?)?\\+?json$" + |> Maybe.map (\regex -> Regex.contains regex mediaType) + |> Maybe.withDefault True searchForJsonMediaType : String -> a -> Bool searchForJsonMediaType mediaType _ = - case regexToCheckIfJson mediaType of - Cli.Validate.Valid -> - True - - Cli.Validate.Invalid _ -> - False + regexToCheckIfJson mediaType contentToContentSchema : Bool -> Dict.Dict String OpenApi.MediaType.MediaType -> CliMonad ContentSchema diff --git a/src/SchemaUtils.elm b/elm-open-api-codegen/src/SchemaUtils.elm similarity index 100% rename from src/SchemaUtils.elm rename to elm-open-api-codegen/src/SchemaUtils.elm diff --git a/src/Util/List.elm b/elm-open-api-codegen/src/Util/List.elm similarity index 100% rename from src/Util/List.elm rename to elm-open-api-codegen/src/Util/List.elm diff --git a/src/Utils.elm b/elm-open-api-codegen/src/Utils.elm similarity index 100% rename from src/Utils.elm rename to elm-open-api-codegen/src/Utils.elm diff --git a/codegen/elm.codegen.json b/elm-open-api-codegen/src/elm.codegen.json similarity index 71% rename from codegen/elm.codegen.json rename to elm-open-api-codegen/src/elm.codegen.json index 8e0c1ebb..779c4711 100644 --- a/codegen/elm.codegen.json +++ b/elm-open-api-codegen/src/elm.codegen.json @@ -2,22 +2,21 @@ "elm-codegen-version": "0.6.1", "codegen-helpers": { "packages": { + "danfishgold/base64-bytes": "1.1.0", + "dillonkearns/elm-pages": "10.2.2", "elm/bytes": "1.0.8", "elm/core": "1.0.5", "elm/http": "2.0.0", "elm/json": "1.1.3", - "elm-community/json-extra": "4.3.0", + "elm/parser": "1.1.0", + "elm/time": "1.0.0", "elm/url": "1.0.0", - "dillonkearns/elm-pages": "10.1.0", - "justinmimbs/time-extra": "1.2.0", "justinmimbs/date": "4.1.0", - "elm/time": "1.0.0", - "elm/parser": "1.1.0", - "wolfadex/elm-rfc3339": "2.0.0", - "danfishgold/base64-bytes": "1.1.0" + "justinmimbs/time-extra": "1.2.0", + "wolfadex/elm-rfc3339": "2.0.0" }, "local": [ "helpers" ] } -} \ No newline at end of file +} diff --git a/tests/Test/OpenApi/Generate.elm b/elm-open-api-codegen/tests/Test/OpenApi/Generate.elm similarity index 100% rename from tests/Test/OpenApi/Generate.elm rename to elm-open-api-codegen/tests/Test/OpenApi/Generate.elm diff --git a/tests/TestCommon.elm b/elm-open-api-codegen/tests/TestCommon.elm similarity index 100% rename from tests/TestCommon.elm rename to elm-open-api-codegen/tests/TestCommon.elm diff --git a/elm.json b/elm.json index 6c9c9ab6..c974fa64 100644 --- a/elm.json +++ b/elm.json @@ -1,27 +1,18 @@ { "type": "application", "source-directories": [ - "src", - "codegen" + "src" ], "elm-version": "0.19.1", "dependencies": { "direct": { "dillonkearns/elm-cli-options-parser": "3.2.0", - "dillonkearns/elm-pages": "10.2.0", + "dillonkearns/elm-pages": "10.2.2", "elm/core": "1.0.5", "elm/json": "1.1.3", - "elm/regex": "1.0.0", - "elm/url": "1.0.0", - "elmcraft/core-extra": "2.1.0", - "json-tools/json-schema": "1.0.2", - "json-tools/json-value": "1.0.1", - "mdgriffith/elm-codegen": "5.2.0", - "miniBill/elm-fast-dict": "1.2.1", - "myrho/yaml": "1.0.0", - "turboMaCk/non-empty-list-alias": "1.4.0", - "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", + "wolfadex/elm-ansi": "3.0.0" }, "indirect": { "Chadtech/elm-bool-extra": "2.4.2", @@ -40,7 +31,9 @@ "elm/http": "2.0.0", "elm/parser": "1.1.0", "elm/random": "1.0.0", + "elm/regex": "1.0.0", "elm/time": "1.0.0", + "elm/url": "1.0.0", "elm/virtual-dom": "1.0.3", "elm-community/basics-extra": "4.1.0", "elm-community/json-extra": "4.3.0", @@ -48,10 +41,15 @@ "elm-community/maybe-extra": "5.3.0", "fredcy/elm-parseint": "2.0.1", "jluckyiv/elm-utc-date-strings": "1.0.0", + "json-tools/json-schema": "1.0.2", + "json-tools/json-value": "1.0.1", "justinmimbs/date": "4.1.0", + "mdgriffith/elm-codegen": "5.2.0", "miniBill/elm-codec": "2.2.0", + "miniBill/elm-fast-dict": "1.2.4", "miniBill/elm-unicode": "1.1.1", "myrho/elm-parser-extras": "1.0.1", + "myrho/yaml": "1.0.0", "noahzgordon/elm-color-extra": "1.0.2", "robinheghan/fnv1a": "1.0.0", "robinheghan/murmur3": "1.0.0", @@ -62,14 +60,13 @@ "stil4m/structured-writer": "1.0.3", "the-sett/elm-pretty-printer": "3.1.0", "the-sett/elm-syntax-dsl": "6.0.3", + "turboMaCk/non-empty-list-alias": "1.4.0", + "wolfadex/elm-open-api": "2.0.0", "zwilias/elm-utf-tools": "2.0.1" } }, "test-dependencies": { - "direct": { - "elm-explorations/test": "2.2.0", - "miniBill/elm-unicode": "1.1.1" - }, + "direct": {}, "indirect": {} } } diff --git a/example-using-api/README.md b/example-using-api/README.md new file mode 100644 index 00000000..13a9ab35 --- /dev/null +++ b/example-using-api/README.md @@ -0,0 +1,37 @@ +# elm-open-api-codegen example + +OpenAPI has built-in formats, such as `date-time`, but you can define your own +custom ones, too--and with the `elm-open-api-codegen` package, you can control +how data with your custom format is decoded, encoded, and transformed into a URL +param! + +OpenAPI formats are specified by setting `format` alongside `type` in a spec. +For example, this looks like: + +```yaml +components: + schemas: + ArticleId: + type: string + format: article-id +``` + +To define a custom format, we use an Elm Pages script that calls the +`elm-open-api-codegen` package to generate Elm code for an API schema, rather +than using the `elm-open-api` CLI. This allows us to configure the code +generator by using, for example, the `OpenApi.Config.withFormat` function. + +This example includes an `ArticleId` module that defines an opaque id type for +"articles" retrieved through a hypothetical API. We'd like the OpenAPI code +generator to use our `ArticleId.decode` and `ArticleId.encode` functions when +serializing Article IDs, so we need to define a custom format. + +We have already run `elm-codegen install src/ArticleId.elm` in order to create +the `codegen/Gen/ArticleId.elm` module. This is an `elm-codegen` helper module +that makes it easier to generate code that uses the types and functions defined +in `src/ArticleId.elm`. We use this helper module in our main script when +telling the OpenAPI code generator what code should be generated for decoding +and encoding our custom `article-id` OpenAPI format. + +Take a look at [the example Elm Pages script](scripts/src/CodeGenOpenApi.elm) to +see the code. diff --git a/codegen/Gen/Array.elm b/example-using-api/codegen/Gen/Array.elm similarity index 100% rename from codegen/Gen/Array.elm rename to example-using-api/codegen/Gen/Array.elm diff --git a/example-using-api/codegen/Gen/ArticleId.elm b/example-using-api/codegen/Gen/ArticleId.elm new file mode 100644 index 00000000..90698bf5 --- /dev/null +++ b/example-using-api/codegen/Gen/ArticleId.elm @@ -0,0 +1,238 @@ +module Gen.ArticleId exposing + ( moduleName_, encode, decode, parse, toString, annotation_ + , call_, values_ + ) + +{-| +# Generated bindings for ArticleId + +@docs moduleName_, encode, decode, parse, toString, annotation_ +@docs call_, values_ +-} + + +import Elm +import Elm.Annotation as Type + + +{-| The name of this module. -} +moduleName_ : List String +moduleName_ = + [ "ArticleId" ] + + +{-| encode: ArticleId.ArticleId -> Json.Encode.Value -} +encode : Elm.Expression -> Elm.Expression +encode encodeArg_ = + Elm.apply + (Elm.value + { importFrom = [ "ArticleId" ] + , name = "encode" + , annotation = + Just + (Type.function + [ Type.namedWith [ "ArticleId" ] "ArticleId" [] ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + ) + [ encodeArg_ ] + + +{-| decode: Json.Decode.Decoder ArticleId.ArticleId -} +decode : Elm.Expression +decode = + Elm.value + { importFrom = [ "ArticleId" ] + , name = "decode" + , annotation = + Just + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.namedWith [ "ArticleId" ] "ArticleId" [] ] + ) + } + + +{-| parse: String -> Result.Result String ArticleId.ArticleId -} +parse : String -> Elm.Expression +parse parseArg_ = + Elm.apply + (Elm.value + { importFrom = [ "ArticleId" ] + , name = "parse" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.string + , Type.namedWith [ "ArticleId" ] "ArticleId" [] + ] + ) + ) + } + ) + [ Elm.string parseArg_ ] + + +{-| toString: ArticleId.ArticleId -> String -} +toString : Elm.Expression -> Elm.Expression +toString toStringArg_ = + Elm.apply + (Elm.value + { importFrom = [ "ArticleId" ] + , name = "toString" + , annotation = + Just + (Type.function + [ Type.namedWith [ "ArticleId" ] "ArticleId" [] ] + Type.string + ) + } + ) + [ toStringArg_ ] + + +annotation_ : { articleId : Type.Annotation } +annotation_ = + { articleId = Type.namedWith [ "ArticleId" ] "ArticleId" [] } + + +call_ : + { encode : Elm.Expression -> Elm.Expression + , parse : Elm.Expression -> Elm.Expression + , toString : Elm.Expression -> Elm.Expression + } +call_ = + { encode = + \encodeArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "ArticleId" ] + , name = "encode" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "ArticleId" ] + "ArticleId" + [] + ] + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + ) + } + ) + [ encodeArg_ ] + , parse = + \parseArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "ArticleId" ] + , name = "parse" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.string + , Type.namedWith + [ "ArticleId" ] + "ArticleId" + [] + ] + ) + ) + } + ) + [ parseArg_ ] + , toString = + \toStringArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "ArticleId" ] + , name = "toString" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "ArticleId" ] + "ArticleId" + [] + ] + Type.string + ) + } + ) + [ toStringArg_ ] + } + + +values_ : + { encode : Elm.Expression + , decode : Elm.Expression + , parse : Elm.Expression + , toString : Elm.Expression + } +values_ = + { encode = + Elm.value + { importFrom = [ "ArticleId" ] + , name = "encode" + , annotation = + Just + (Type.function + [ Type.namedWith [ "ArticleId" ] "ArticleId" [] ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + , decode = + Elm.value + { importFrom = [ "ArticleId" ] + , name = "decode" + , annotation = + Just + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.namedWith [ "ArticleId" ] "ArticleId" [] ] + ) + } + , parse = + Elm.value + { importFrom = [ "ArticleId" ] + , name = "parse" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.string + , Type.namedWith [ "ArticleId" ] "ArticleId" [] + ] + ) + ) + } + , toString = + Elm.value + { importFrom = [ "ArticleId" ] + , name = "toString" + , annotation = + Just + (Type.function + [ Type.namedWith [ "ArticleId" ] "ArticleId" [] ] + Type.string + ) + } + } \ No newline at end of file diff --git a/example-using-api/codegen/Gen/Basics.elm b/example-using-api/codegen/Gen/Basics.elm new file mode 100644 index 00000000..02629e9b --- /dev/null +++ b/example-using-api/codegen/Gen/Basics.elm @@ -0,0 +1,1715 @@ +module Gen.Basics exposing + ( moduleName_, toFloat, round, floor, ceiling, truncate + , max, min, compare, not, xor, modBy, remainderBy + , negate, abs, clamp, sqrt, logBase, e, degrees + , radians, turns, pi, cos, sin, tan, acos + , asin, atan, atan2, toPolar, fromPolar, isNaN, isInfinite + , identity, always, never, annotation_, make_, caseOf_, call_ + , values_ + ) + +{-| +# Generated bindings for Basics + +@docs moduleName_, toFloat, round, floor, ceiling, truncate +@docs max, min, compare, not, xor, modBy +@docs remainderBy, negate, abs, clamp, sqrt, logBase +@docs e, degrees, radians, turns, pi, cos +@docs sin, tan, acos, asin, atan, atan2 +@docs toPolar, fromPolar, isNaN, isInfinite, identity, always +@docs never, annotation_, make_, caseOf_, call_, values_ +-} + + +import Elm +import Elm.Annotation as Type +import Elm.Arg +import Elm.Case + + +{-| The name of this module. -} +moduleName_ : List String +moduleName_ = + [ "Basics" ] + + +{-| Convert an integer into a float. Useful when mixing `Int` and `Float` +values like this: + + halfOf : Int -> Float + halfOf number = + toFloat number / 2 + +toFloat: Int -> Float +-} +toFloat : Int -> Elm.Expression +toFloat toFloatArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "toFloat" + , annotation = Just (Type.function [ Type.int ] Type.float) + } + ) + [ Elm.int toFloatArg_ ] + + +{-| Round a number to the nearest integer. + + round 1.0 == 1 + round 1.2 == 1 + round 1.5 == 2 + round 1.8 == 2 + + round -1.2 == -1 + round -1.5 == -1 + round -1.8 == -2 + +round: Float -> Int +-} +round : Float -> Elm.Expression +round roundArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "round" + , annotation = Just (Type.function [ Type.float ] Type.int) + } + ) + [ Elm.float roundArg_ ] + + +{-| Floor function, rounding down. + + floor 1.0 == 1 + floor 1.2 == 1 + floor 1.5 == 1 + floor 1.8 == 1 + + floor -1.2 == -2 + floor -1.5 == -2 + floor -1.8 == -2 + +floor: Float -> Int +-} +floor : Float -> Elm.Expression +floor floorArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "floor" + , annotation = Just (Type.function [ Type.float ] Type.int) + } + ) + [ Elm.float floorArg_ ] + + +{-| Ceiling function, rounding up. + + ceiling 1.0 == 1 + ceiling 1.2 == 2 + ceiling 1.5 == 2 + ceiling 1.8 == 2 + + ceiling -1.2 == -1 + ceiling -1.5 == -1 + ceiling -1.8 == -1 + +ceiling: Float -> Int +-} +ceiling : Float -> Elm.Expression +ceiling ceilingArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "ceiling" + , annotation = Just (Type.function [ Type.float ] Type.int) + } + ) + [ Elm.float ceilingArg_ ] + + +{-| Truncate a number, rounding towards zero. + + truncate 1.0 == 1 + truncate 1.2 == 1 + truncate 1.5 == 1 + truncate 1.8 == 1 + + truncate -1.2 == -1 + truncate -1.5 == -1 + truncate -1.8 == -1 + +truncate: Float -> Int +-} +truncate : Float -> Elm.Expression +truncate truncateArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "truncate" + , annotation = Just (Type.function [ Type.float ] Type.int) + } + ) + [ Elm.float truncateArg_ ] + + +{-| Find the larger of two comparables. + + max 42 12345678 == 12345678 + max "abc" "xyz" == "xyz" + +max: comparable -> comparable -> comparable +-} +max : Elm.Expression -> Elm.Expression -> Elm.Expression +max maxArg_ maxArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "max" + , annotation = + Just + (Type.function + [ Type.var "comparable", Type.var "comparable" ] + (Type.var "comparable") + ) + } + ) + [ maxArg_, maxArg_0 ] + + +{-| Find the smaller of two comparables. + + min 42 12345678 == 42 + min "abc" "xyz" == "abc" + +min: comparable -> comparable -> comparable +-} +min : Elm.Expression -> Elm.Expression -> Elm.Expression +min minArg_ minArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "min" + , annotation = + Just + (Type.function + [ Type.var "comparable", Type.var "comparable" ] + (Type.var "comparable") + ) + } + ) + [ minArg_, minArg_0 ] + + +{-| Compare any two comparable values. Comparable values include `String`, +`Char`, `Int`, `Float`, or a list or tuple containing comparable values. These +are also the only values that work as `Dict` keys or `Set` members. + + compare 3 4 == LT + compare 4 4 == EQ + compare 5 4 == GT + +compare: comparable -> comparable -> Basics.Order +-} +compare : Elm.Expression -> Elm.Expression -> Elm.Expression +compare compareArg_ compareArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "compare" + , annotation = + Just + (Type.function + [ Type.var "comparable", Type.var "comparable" ] + (Type.namedWith [ "Basics" ] "Order" []) + ) + } + ) + [ compareArg_, compareArg_0 ] + + +{-| Negate a boolean value. + + not True == False + not False == True + +not: Bool -> Bool +-} +not : Bool -> Elm.Expression +not notArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "not" + , annotation = Just (Type.function [ Type.bool ] Type.bool) + } + ) + [ Elm.bool notArg_ ] + + +{-| The exclusive-or operator. `True` if exactly one input is `True`. + + xor True True == False + xor True False == True + xor False True == True + xor False False == False + +xor: Bool -> Bool -> Bool +-} +xor : Bool -> Bool -> Elm.Expression +xor xorArg_ xorArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "xor" + , annotation = + Just (Type.function [ Type.bool, Type.bool ] Type.bool) + } + ) + [ Elm.bool xorArg_, Elm.bool xorArg_0 ] + + +{-| Perform [modular arithmetic](https://en.wikipedia.org/wiki/Modular_arithmetic). +A common trick is to use (n mod 2) to detect even and odd numbers: + + modBy 2 0 == 0 + modBy 2 1 == 1 + modBy 2 2 == 0 + modBy 2 3 == 1 + +Our `modBy` function works in the typical mathematical way when you run into +negative numbers: + + List.map (modBy 4) [ -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 ] + -- [ 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1 ] + +Use [`remainderBy`](#remainderBy) for a different treatment of negative numbers, +or read Daan Leijen’s [Division and Modulus for Computer Scientists][dm] for more +information. + +[dm]: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/divmodnote-letter.pdf + +modBy: Int -> Int -> Int +-} +modBy : Int -> Int -> Elm.Expression +modBy modByArg_ modByArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "modBy" + , annotation = Just (Type.function [ Type.int, Type.int ] Type.int) + } + ) + [ Elm.int modByArg_, Elm.int modByArg_0 ] + + +{-| Get the remainder after division. Here are bunch of examples of dividing by four: + + List.map (remainderBy 4) [ -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 ] + -- [ -1, 0, -3, -2, -1, 0, 1, 2, 3, 0, 1 ] + +Use [`modBy`](#modBy) for a different treatment of negative numbers, +or read Daan Leijen’s [Division and Modulus for Computer Scientists][dm] for more +information. + +[dm]: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/divmodnote-letter.pdf + +remainderBy: Int -> Int -> Int +-} +remainderBy : Int -> Int -> Elm.Expression +remainderBy remainderByArg_ remainderByArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "remainderBy" + , annotation = Just (Type.function [ Type.int, Type.int ] Type.int) + } + ) + [ Elm.int remainderByArg_, Elm.int remainderByArg_0 ] + + +{-| Negate a number. + + negate 42 == -42 + negate -42 == 42 + negate 0 == 0 + +negate: number -> number +-} +negate : Elm.Expression -> Elm.Expression +negate negateArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "negate" + , annotation = + Just (Type.function [ Type.var "number" ] (Type.var "number")) + } + ) + [ negateArg_ ] + + +{-| Get the [absolute value][abs] of a number. + + abs 16 == 16 + abs -4 == 4 + abs -8.5 == 8.5 + abs 3.14 == 3.14 + +[abs]: https://en.wikipedia.org/wiki/Absolute_value + +abs: number -> number +-} +abs : Elm.Expression -> Elm.Expression +abs absArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "abs" + , annotation = + Just (Type.function [ Type.var "number" ] (Type.var "number")) + } + ) + [ absArg_ ] + + +{-| Clamps a number within a given range. With the expression +`clamp 100 200 x` the results are as follows: + + 100 if x < 100 + x if 100 <= x < 200 + 200 if 200 <= x + +clamp: number -> number -> number -> number +-} +clamp : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression +clamp clampArg_ clampArg_0 clampArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "clamp" + , annotation = + Just + (Type.function + [ Type.var "number" + , Type.var "number" + , Type.var "number" + ] + (Type.var "number") + ) + } + ) + [ clampArg_, clampArg_0, clampArg_1 ] + + +{-| Take the square root of a number. + + sqrt 4 == 2 + sqrt 9 == 3 + sqrt 16 == 4 + sqrt 25 == 5 + +sqrt: Float -> Float +-} +sqrt : Float -> Elm.Expression +sqrt sqrtArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "sqrt" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + ) + [ Elm.float sqrtArg_ ] + + +{-| Calculate the logarithm of a number with a given base. + + logBase 10 100 == 2 + logBase 2 256 == 8 + +logBase: Float -> Float -> Float +-} +logBase : Float -> Float -> Elm.Expression +logBase logBaseArg_ logBaseArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "logBase" + , annotation = + Just (Type.function [ Type.float, Type.float ] Type.float) + } + ) + [ Elm.float logBaseArg_, Elm.float logBaseArg_0 ] + + +{-| An approximation of e. + +e: Float +-} +e : Elm.Expression +e = + Elm.value + { importFrom = [ "Basics" ], name = "e", annotation = Just Type.float } + + +{-| Convert degrees to standard Elm angles (radians). + + degrees 180 == 3.141592653589793 + +degrees: Float -> Float +-} +degrees : Float -> Elm.Expression +degrees degreesArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "degrees" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + ) + [ Elm.float degreesArg_ ] + + +{-| Convert radians to standard Elm angles (radians). + + radians pi == 3.141592653589793 + +radians: Float -> Float +-} +radians : Float -> Elm.Expression +radians radiansArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "radians" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + ) + [ Elm.float radiansArg_ ] + + +{-| Convert turns to standard Elm angles (radians). One turn is equal to 360°. + + turns (1/2) == 3.141592653589793 + +turns: Float -> Float +-} +turns : Float -> Elm.Expression +turns turnsArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "turns" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + ) + [ Elm.float turnsArg_ ] + + +{-| An approximation of pi. + +pi: Float +-} +pi : Elm.Expression +pi = + Elm.value + { importFrom = [ "Basics" ], name = "pi", annotation = Just Type.float } + + +{-| Figure out the cosine given an angle in radians. + + cos (degrees 60) == 0.5000000000000001 + cos (turns (1/6)) == 0.5000000000000001 + cos (radians (pi/3)) == 0.5000000000000001 + cos (pi/3) == 0.5000000000000001 + +cos: Float -> Float +-} +cos : Float -> Elm.Expression +cos cosArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "cos" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + ) + [ Elm.float cosArg_ ] + + +{-| Figure out the sine given an angle in radians. + + sin (degrees 30) == 0.49999999999999994 + sin (turns (1/12)) == 0.49999999999999994 + sin (radians (pi/6)) == 0.49999999999999994 + sin (pi/6) == 0.49999999999999994 + +sin: Float -> Float +-} +sin : Float -> Elm.Expression +sin sinArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "sin" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + ) + [ Elm.float sinArg_ ] + + +{-| Figure out the tangent given an angle in radians. + + tan (degrees 45) == 0.9999999999999999 + tan (turns (1/8)) == 0.9999999999999999 + tan (radians (pi/4)) == 0.9999999999999999 + tan (pi/4) == 0.9999999999999999 + +tan: Float -> Float +-} +tan : Float -> Elm.Expression +tan tanArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "tan" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + ) + [ Elm.float tanArg_ ] + + +{-| Figure out the arccosine for `adjacent / hypotenuse` in radians: + + acos (1/2) == 1.0471975511965979 -- 60° or pi/3 radians + +acos: Float -> Float +-} +acos : Float -> Elm.Expression +acos acosArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "acos" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + ) + [ Elm.float acosArg_ ] + + +{-| Figure out the arcsine for `opposite / hypotenuse` in radians: + + asin (1/2) == 0.5235987755982989 -- 30° or pi/6 radians + +asin: Float -> Float +-} +asin : Float -> Elm.Expression +asin asinArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "asin" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + ) + [ Elm.float asinArg_ ] + + +{-| This helps you find the angle (in radians) to an `(x,y)` coordinate, but +in a way that is rarely useful in programming. **You probably want +[`atan2`](#atan2) instead!** + +This version takes `y/x` as its argument, so there is no way to know whether +the negative signs comes from the `y` or `x` value. So as we go counter-clockwise +around the origin from point `(1,1)` to `(1,-1)` to `(-1,-1)` to `(-1,1)` we do +not get angles that go in the full circle: + + atan ( 1 / 1 ) == 0.7853981633974483 -- 45° or pi/4 radians + atan ( 1 / -1 ) == -0.7853981633974483 -- 315° or 7*pi/4 radians + atan ( -1 / -1 ) == 0.7853981633974483 -- 45° or pi/4 radians + atan ( -1 / 1 ) == -0.7853981633974483 -- 315° or 7*pi/4 radians + +Notice that everything is between `pi/2` and `-pi/2`. That is pretty useless +for figuring out angles in any sort of visualization, so again, check out +[`atan2`](#atan2) instead! + +atan: Float -> Float +-} +atan : Float -> Elm.Expression +atan atanArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "atan" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + ) + [ Elm.float atanArg_ ] + + +{-| This helps you find the angle (in radians) to an `(x,y)` coordinate. +So rather than saying `atan (y/x)` you say `atan2 y x` and you can get a full +range of angles: + + atan2 1 1 == 0.7853981633974483 -- 45° or pi/4 radians + atan2 1 -1 == 2.356194490192345 -- 135° or 3*pi/4 radians + atan2 -1 -1 == -2.356194490192345 -- 225° or 5*pi/4 radians + atan2 -1 1 == -0.7853981633974483 -- 315° or 7*pi/4 radians + +atan2: Float -> Float -> Float +-} +atan2 : Float -> Float -> Elm.Expression +atan2 atan2Arg_ atan2Arg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "atan2" + , annotation = + Just (Type.function [ Type.float, Type.float ] Type.float) + } + ) + [ Elm.float atan2Arg_, Elm.float atan2Arg_0 ] + + +{-| Convert Cartesian coordinates (x,y) to polar coordinates (r,θ). + + toPolar (3, 4) == ( 5, 0.9272952180016122) + toPolar (5,12) == (13, 1.1760052070951352) + +toPolar: ( Float, Float ) -> ( Float, Float ) +-} +toPolar : Elm.Expression -> Elm.Expression +toPolar toPolarArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "toPolar" + , annotation = + Just + (Type.function + [ Type.tuple Type.float Type.float ] + (Type.tuple Type.float Type.float) + ) + } + ) + [ toPolarArg_ ] + + +{-| Convert polar coordinates (r,θ) to Cartesian coordinates (x,y). + + fromPolar (sqrt 2, degrees 45) == (1, 1) + +fromPolar: ( Float, Float ) -> ( Float, Float ) +-} +fromPolar : Elm.Expression -> Elm.Expression +fromPolar fromPolarArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "fromPolar" + , annotation = + Just + (Type.function + [ Type.tuple Type.float Type.float ] + (Type.tuple Type.float Type.float) + ) + } + ) + [ fromPolarArg_ ] + + +{-| Determine whether a float is an undefined or unrepresentable number. +NaN stands for *not a number* and it is [a standardized part of floating point +numbers](https://en.wikipedia.org/wiki/NaN). + + isNaN (0/0) == True + isNaN (sqrt -1) == True + isNaN (1/0) == False -- infinity is a number + isNaN 1 == False + +isNaN: Float -> Bool +-} +isNaN : Float -> Elm.Expression +isNaN isNaNArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "isNaN" + , annotation = Just (Type.function [ Type.float ] Type.bool) + } + ) + [ Elm.float isNaNArg_ ] + + +{-| Determine whether a float is positive or negative infinity. + + isInfinite (0/0) == False + isInfinite (sqrt -1) == False + isInfinite (1/0) == True + isInfinite 1 == False + +Notice that NaN is not infinite! For float `n` to be finite implies that +`not (isInfinite n || isNaN n)` evaluates to `True`. + +isInfinite: Float -> Bool +-} +isInfinite : Float -> Elm.Expression +isInfinite isInfiniteArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "isInfinite" + , annotation = Just (Type.function [ Type.float ] Type.bool) + } + ) + [ Elm.float isInfiniteArg_ ] + + +{-| Given a value, returns exactly the same value. This is called +[the identity function](https://en.wikipedia.org/wiki/Identity_function). + +identity: a -> a +-} +identity : Elm.Expression -> Elm.Expression +identity identityArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "identity" + , annotation = Just (Type.function [ Type.var "a" ] (Type.var "a")) + } + ) + [ identityArg_ ] + + +{-| Create a function that *always* returns the same value. Useful with +functions like `map`: + + List.map (always 0) [1,2,3,4,5] == [0,0,0,0,0] + + -- List.map (\_ -> 0) [1,2,3,4,5] == [0,0,0,0,0] + -- always = (\x _ -> x) + +always: a -> b -> a +-} +always : Elm.Expression -> Elm.Expression -> Elm.Expression +always alwaysArg_ alwaysArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "always" + , annotation = + Just + (Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "a") + ) + } + ) + [ alwaysArg_, alwaysArg_0 ] + + +{-| A function that can never be called. Seems extremely pointless, but it +*can* come in handy. Imagine you have some HTML that should never produce any +messages. And say you want to use it in some other HTML that *does* produce +messages. You could say: + + import Html exposing (..) + + embedHtml : Html Never -> Html msg + embedHtml staticStuff = + div [] + [ text "hello" + , Html.map never staticStuff + ] + +So the `never` function is basically telling the type system, make sure no one +ever calls me! + +never: Basics.Never -> a +-} +never : Elm.Expression -> Elm.Expression +never neverArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "never" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Basics" ] "Never" [] ] + (Type.var "a") + ) + } + ) + [ neverArg_ ] + + +annotation_ : + { int : Type.Annotation + , float : Type.Annotation + , order : Type.Annotation + , bool : Type.Annotation + , never : Type.Annotation + } +annotation_ = + { int = Type.namedWith [] "Int" [] + , float = Type.namedWith [] "Float" [] + , order = Type.namedWith [ "Basics" ] "Order" [] + , bool = Type.namedWith [] "Bool" [] + , never = Type.namedWith [] "Never" [] + } + + +make_ : + { lT : Elm.Expression + , eQ : Elm.Expression + , gT : Elm.Expression + , true : Elm.Expression + , false : Elm.Expression + } +make_ = + { lT = + Elm.value + { importFrom = [ "Basics" ] + , name = "LT" + , annotation = Just (Type.namedWith [] "Order" []) + } + , eQ = + Elm.value + { importFrom = [ "Basics" ] + , name = "EQ" + , annotation = Just (Type.namedWith [] "Order" []) + } + , gT = + Elm.value + { importFrom = [ "Basics" ] + , name = "GT" + , annotation = Just (Type.namedWith [] "Order" []) + } + , true = + Elm.value + { importFrom = [ "Basics" ] + , name = "True" + , annotation = Just (Type.namedWith [] "Bool" []) + } + , false = + Elm.value + { importFrom = [ "Basics" ] + , name = "False" + , annotation = Just (Type.namedWith [] "Bool" []) + } + } + + +caseOf_ : + { order : + Elm.Expression + -> { lT : Elm.Expression, eQ : Elm.Expression, gT : Elm.Expression } + -> Elm.Expression + , bool : + Elm.Expression + -> { true : Elm.Expression, false : Elm.Expression } + -> Elm.Expression + } +caseOf_ = + { order = + \orderExpression orderTags -> + Elm.Case.custom + orderExpression + (Type.namedWith [ "Basics" ] "Order" []) + [ Elm.Case.branch + (Elm.Arg.customType "LT" orderTags.lT) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "EQ" orderTags.eQ) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "GT" orderTags.gT) + Basics.identity + ] + , bool = + \boolExpression boolTags -> + Elm.Case.custom + boolExpression + (Type.namedWith [ "Basics" ] "Bool" []) + [ Elm.Case.branch + (Elm.Arg.customType "True" boolTags.true) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "False" boolTags.false) + Basics.identity + ] + } + + +call_ : + { toFloat : Elm.Expression -> Elm.Expression + , round : Elm.Expression -> Elm.Expression + , floor : Elm.Expression -> Elm.Expression + , ceiling : Elm.Expression -> Elm.Expression + , truncate : Elm.Expression -> Elm.Expression + , max : Elm.Expression -> Elm.Expression -> Elm.Expression + , min : Elm.Expression -> Elm.Expression -> Elm.Expression + , compare : Elm.Expression -> Elm.Expression -> Elm.Expression + , not : Elm.Expression -> Elm.Expression + , xor : Elm.Expression -> Elm.Expression -> Elm.Expression + , modBy : Elm.Expression -> Elm.Expression -> Elm.Expression + , remainderBy : Elm.Expression -> Elm.Expression -> Elm.Expression + , negate : Elm.Expression -> Elm.Expression + , abs : Elm.Expression -> Elm.Expression + , clamp : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , sqrt : Elm.Expression -> Elm.Expression + , logBase : Elm.Expression -> Elm.Expression -> Elm.Expression + , degrees : Elm.Expression -> Elm.Expression + , radians : Elm.Expression -> Elm.Expression + , turns : Elm.Expression -> Elm.Expression + , cos : Elm.Expression -> Elm.Expression + , sin : Elm.Expression -> Elm.Expression + , tan : Elm.Expression -> Elm.Expression + , acos : Elm.Expression -> Elm.Expression + , asin : Elm.Expression -> Elm.Expression + , atan : Elm.Expression -> Elm.Expression + , atan2 : Elm.Expression -> Elm.Expression -> Elm.Expression + , toPolar : Elm.Expression -> Elm.Expression + , fromPolar : Elm.Expression -> Elm.Expression + , isNaN : Elm.Expression -> Elm.Expression + , isInfinite : Elm.Expression -> Elm.Expression + , identity : Elm.Expression -> Elm.Expression + , always : Elm.Expression -> Elm.Expression -> Elm.Expression + , never : Elm.Expression -> Elm.Expression + } +call_ = + { toFloat = + \toFloatArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "toFloat" + , annotation = Just (Type.function [ Type.int ] Type.float) + } + ) + [ toFloatArg_ ] + , round = + \roundArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "round" + , annotation = Just (Type.function [ Type.float ] Type.int) + } + ) + [ roundArg_ ] + , floor = + \floorArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "floor" + , annotation = Just (Type.function [ Type.float ] Type.int) + } + ) + [ floorArg_ ] + , ceiling = + \ceilingArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "ceiling" + , annotation = Just (Type.function [ Type.float ] Type.int) + } + ) + [ ceilingArg_ ] + , truncate = + \truncateArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "truncate" + , annotation = Just (Type.function [ Type.float ] Type.int) + } + ) + [ truncateArg_ ] + , max = + \maxArg_ maxArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "max" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.var "comparable" + ] + (Type.var "comparable") + ) + } + ) + [ maxArg_, maxArg_0 ] + , min = + \minArg_ minArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "min" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.var "comparable" + ] + (Type.var "comparable") + ) + } + ) + [ minArg_, minArg_0 ] + , compare = + \compareArg_ compareArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "compare" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.var "comparable" + ] + (Type.namedWith [ "Basics" ] "Order" []) + ) + } + ) + [ compareArg_, compareArg_0 ] + , not = + \notArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "not" + , annotation = Just (Type.function [ Type.bool ] Type.bool) + } + ) + [ notArg_ ] + , xor = + \xorArg_ xorArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "xor" + , annotation = + Just (Type.function [ Type.bool, Type.bool ] Type.bool) + } + ) + [ xorArg_, xorArg_0 ] + , modBy = + \modByArg_ modByArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "modBy" + , annotation = + Just (Type.function [ Type.int, Type.int ] Type.int) + } + ) + [ modByArg_, modByArg_0 ] + , remainderBy = + \remainderByArg_ remainderByArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "remainderBy" + , annotation = + Just (Type.function [ Type.int, Type.int ] Type.int) + } + ) + [ remainderByArg_, remainderByArg_0 ] + , negate = + \negateArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "negate" + , annotation = + Just + (Type.function + [ Type.var "number" ] + (Type.var "number") + ) + } + ) + [ negateArg_ ] + , abs = + \absArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "abs" + , annotation = + Just + (Type.function + [ Type.var "number" ] + (Type.var "number") + ) + } + ) + [ absArg_ ] + , clamp = + \clampArg_ clampArg_0 clampArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "clamp" + , annotation = + Just + (Type.function + [ Type.var "number" + , Type.var "number" + , Type.var "number" + ] + (Type.var "number") + ) + } + ) + [ clampArg_, clampArg_0, clampArg_1 ] + , sqrt = + \sqrtArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "sqrt" + , annotation = + Just (Type.function [ Type.float ] Type.float) + } + ) + [ sqrtArg_ ] + , logBase = + \logBaseArg_ logBaseArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "logBase" + , annotation = + Just + (Type.function + [ Type.float, Type.float ] + Type.float + ) + } + ) + [ logBaseArg_, logBaseArg_0 ] + , degrees = + \degreesArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "degrees" + , annotation = + Just (Type.function [ Type.float ] Type.float) + } + ) + [ degreesArg_ ] + , radians = + \radiansArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "radians" + , annotation = + Just (Type.function [ Type.float ] Type.float) + } + ) + [ radiansArg_ ] + , turns = + \turnsArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "turns" + , annotation = + Just (Type.function [ Type.float ] Type.float) + } + ) + [ turnsArg_ ] + , cos = + \cosArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "cos" + , annotation = + Just (Type.function [ Type.float ] Type.float) + } + ) + [ cosArg_ ] + , sin = + \sinArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "sin" + , annotation = + Just (Type.function [ Type.float ] Type.float) + } + ) + [ sinArg_ ] + , tan = + \tanArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "tan" + , annotation = + Just (Type.function [ Type.float ] Type.float) + } + ) + [ tanArg_ ] + , acos = + \acosArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "acos" + , annotation = + Just (Type.function [ Type.float ] Type.float) + } + ) + [ acosArg_ ] + , asin = + \asinArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "asin" + , annotation = + Just (Type.function [ Type.float ] Type.float) + } + ) + [ asinArg_ ] + , atan = + \atanArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "atan" + , annotation = + Just (Type.function [ Type.float ] Type.float) + } + ) + [ atanArg_ ] + , atan2 = + \atan2Arg_ atan2Arg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "atan2" + , annotation = + Just + (Type.function + [ Type.float, Type.float ] + Type.float + ) + } + ) + [ atan2Arg_, atan2Arg_0 ] + , toPolar = + \toPolarArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "toPolar" + , annotation = + Just + (Type.function + [ Type.tuple Type.float Type.float ] + (Type.tuple Type.float Type.float) + ) + } + ) + [ toPolarArg_ ] + , fromPolar = + \fromPolarArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "fromPolar" + , annotation = + Just + (Type.function + [ Type.tuple Type.float Type.float ] + (Type.tuple Type.float Type.float) + ) + } + ) + [ fromPolarArg_ ] + , isNaN = + \isNaNArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "isNaN" + , annotation = + Just (Type.function [ Type.float ] Type.bool) + } + ) + [ isNaNArg_ ] + , isInfinite = + \isInfiniteArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "isInfinite" + , annotation = + Just (Type.function [ Type.float ] Type.bool) + } + ) + [ isInfiniteArg_ ] + , identity = + \identityArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "identity" + , annotation = + Just (Type.function [ Type.var "a" ] (Type.var "a")) + } + ) + [ identityArg_ ] + , always = + \alwaysArg_ alwaysArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "always" + , annotation = + Just + (Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "a") + ) + } + ) + [ alwaysArg_, alwaysArg_0 ] + , never = + \neverArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Basics" ] + , name = "never" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Basics" ] "Never" [] ] + (Type.var "a") + ) + } + ) + [ neverArg_ ] + } + + +values_ : + { toFloat : Elm.Expression + , round : Elm.Expression + , floor : Elm.Expression + , ceiling : Elm.Expression + , truncate : Elm.Expression + , max : Elm.Expression + , min : Elm.Expression + , compare : Elm.Expression + , not : Elm.Expression + , xor : Elm.Expression + , modBy : Elm.Expression + , remainderBy : Elm.Expression + , negate : Elm.Expression + , abs : Elm.Expression + , clamp : Elm.Expression + , sqrt : Elm.Expression + , logBase : Elm.Expression + , e : Elm.Expression + , degrees : Elm.Expression + , radians : Elm.Expression + , turns : Elm.Expression + , pi : Elm.Expression + , cos : Elm.Expression + , sin : Elm.Expression + , tan : Elm.Expression + , acos : Elm.Expression + , asin : Elm.Expression + , atan : Elm.Expression + , atan2 : Elm.Expression + , toPolar : Elm.Expression + , fromPolar : Elm.Expression + , isNaN : Elm.Expression + , isInfinite : Elm.Expression + , identity : Elm.Expression + , always : Elm.Expression + , never : Elm.Expression + } +values_ = + { toFloat = + Elm.value + { importFrom = [ "Basics" ] + , name = "toFloat" + , annotation = Just (Type.function [ Type.int ] Type.float) + } + , round = + Elm.value + { importFrom = [ "Basics" ] + , name = "round" + , annotation = Just (Type.function [ Type.float ] Type.int) + } + , floor = + Elm.value + { importFrom = [ "Basics" ] + , name = "floor" + , annotation = Just (Type.function [ Type.float ] Type.int) + } + , ceiling = + Elm.value + { importFrom = [ "Basics" ] + , name = "ceiling" + , annotation = Just (Type.function [ Type.float ] Type.int) + } + , truncate = + Elm.value + { importFrom = [ "Basics" ] + , name = "truncate" + , annotation = Just (Type.function [ Type.float ] Type.int) + } + , max = + Elm.value + { importFrom = [ "Basics" ] + , name = "max" + , annotation = + Just + (Type.function + [ Type.var "comparable", Type.var "comparable" ] + (Type.var "comparable") + ) + } + , min = + Elm.value + { importFrom = [ "Basics" ] + , name = "min" + , annotation = + Just + (Type.function + [ Type.var "comparable", Type.var "comparable" ] + (Type.var "comparable") + ) + } + , compare = + Elm.value + { importFrom = [ "Basics" ] + , name = "compare" + , annotation = + Just + (Type.function + [ Type.var "comparable", Type.var "comparable" ] + (Type.namedWith [ "Basics" ] "Order" []) + ) + } + , not = + Elm.value + { importFrom = [ "Basics" ] + , name = "not" + , annotation = Just (Type.function [ Type.bool ] Type.bool) + } + , xor = + Elm.value + { importFrom = [ "Basics" ] + , name = "xor" + , annotation = + Just (Type.function [ Type.bool, Type.bool ] Type.bool) + } + , modBy = + Elm.value + { importFrom = [ "Basics" ] + , name = "modBy" + , annotation = Just (Type.function [ Type.int, Type.int ] Type.int) + } + , remainderBy = + Elm.value + { importFrom = [ "Basics" ] + , name = "remainderBy" + , annotation = Just (Type.function [ Type.int, Type.int ] Type.int) + } + , negate = + Elm.value + { importFrom = [ "Basics" ] + , name = "negate" + , annotation = + Just (Type.function [ Type.var "number" ] (Type.var "number")) + } + , abs = + Elm.value + { importFrom = [ "Basics" ] + , name = "abs" + , annotation = + Just (Type.function [ Type.var "number" ] (Type.var "number")) + } + , clamp = + Elm.value + { importFrom = [ "Basics" ] + , name = "clamp" + , annotation = + Just + (Type.function + [ Type.var "number" + , Type.var "number" + , Type.var "number" + ] + (Type.var "number") + ) + } + , sqrt = + Elm.value + { importFrom = [ "Basics" ] + , name = "sqrt" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + , logBase = + Elm.value + { importFrom = [ "Basics" ] + , name = "logBase" + , annotation = + Just (Type.function [ Type.float, Type.float ] Type.float) + } + , e = + Elm.value + { importFrom = [ "Basics" ] + , name = "e" + , annotation = Just Type.float + } + , degrees = + Elm.value + { importFrom = [ "Basics" ] + , name = "degrees" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + , radians = + Elm.value + { importFrom = [ "Basics" ] + , name = "radians" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + , turns = + Elm.value + { importFrom = [ "Basics" ] + , name = "turns" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + , pi = + Elm.value + { importFrom = [ "Basics" ] + , name = "pi" + , annotation = Just Type.float + } + , cos = + Elm.value + { importFrom = [ "Basics" ] + , name = "cos" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + , sin = + Elm.value + { importFrom = [ "Basics" ] + , name = "sin" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + , tan = + Elm.value + { importFrom = [ "Basics" ] + , name = "tan" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + , acos = + Elm.value + { importFrom = [ "Basics" ] + , name = "acos" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + , asin = + Elm.value + { importFrom = [ "Basics" ] + , name = "asin" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + , atan = + Elm.value + { importFrom = [ "Basics" ] + , name = "atan" + , annotation = Just (Type.function [ Type.float ] Type.float) + } + , atan2 = + Elm.value + { importFrom = [ "Basics" ] + , name = "atan2" + , annotation = + Just (Type.function [ Type.float, Type.float ] Type.float) + } + , toPolar = + Elm.value + { importFrom = [ "Basics" ] + , name = "toPolar" + , annotation = + Just + (Type.function + [ Type.tuple Type.float Type.float ] + (Type.tuple Type.float Type.float) + ) + } + , fromPolar = + Elm.value + { importFrom = [ "Basics" ] + , name = "fromPolar" + , annotation = + Just + (Type.function + [ Type.tuple Type.float Type.float ] + (Type.tuple Type.float Type.float) + ) + } + , isNaN = + Elm.value + { importFrom = [ "Basics" ] + , name = "isNaN" + , annotation = Just (Type.function [ Type.float ] Type.bool) + } + , isInfinite = + Elm.value + { importFrom = [ "Basics" ] + , name = "isInfinite" + , annotation = Just (Type.function [ Type.float ] Type.bool) + } + , identity = + Elm.value + { importFrom = [ "Basics" ] + , name = "identity" + , annotation = Just (Type.function [ Type.var "a" ] (Type.var "a")) + } + , always = + Elm.value + { importFrom = [ "Basics" ] + , name = "always" + , annotation = + Just + (Type.function [ Type.var "a", Type.var "b" ] (Type.var "a") + ) + } + , never = + Elm.value + { importFrom = [ "Basics" ] + , name = "never" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Basics" ] "Never" [] ] + (Type.var "a") + ) + } + } \ No newline at end of file diff --git a/codegen/Gen/Bitwise.elm b/example-using-api/codegen/Gen/Bitwise.elm similarity index 100% rename from codegen/Gen/Bitwise.elm rename to example-using-api/codegen/Gen/Bitwise.elm diff --git a/codegen/Gen/Char.elm b/example-using-api/codegen/Gen/Char.elm similarity index 100% rename from codegen/Gen/Char.elm rename to example-using-api/codegen/Gen/Char.elm diff --git a/codegen/Gen/CodeGen/Generate.elm b/example-using-api/codegen/Gen/CodeGen/Generate.elm similarity index 100% rename from codegen/Gen/CodeGen/Generate.elm rename to example-using-api/codegen/Gen/CodeGen/Generate.elm diff --git a/example-using-api/codegen/Gen/Debug.elm b/example-using-api/codegen/Gen/Debug.elm new file mode 100644 index 00000000..6bd8cb24 --- /dev/null +++ b/example-using-api/codegen/Gen/Debug.elm @@ -0,0 +1,201 @@ +module Gen.Debug exposing + ( moduleName_, toString, log, todo, call_, values_ + ) + +{-| +# Generated bindings for Debug + +@docs moduleName_, toString, log, todo, call_, values_ +-} + + +import Elm +import Elm.Annotation as Type + + +{-| The name of this module. -} +moduleName_ : List String +moduleName_ = + [ "Debug" ] + + +{-| Turn any kind of value into a string. + + toString 42 == "42" + toString [1,2] == "[1,2]" + toString ('a', "cat", 13) == "('a', \"cat\", 13)" + toString "he said, \"hi\"" == "\"he said, \\\"hi\\\"\"" + +Notice that with strings, this is not the `identity` function. It escapes +characters so if you say `Html.text (toString "he said, \"hi\"")` it will +show `"he said, \"hi\""` rather than `he said, "hi"`. This makes it nice +for viewing Elm data structures. + +**Note:** This is not available with `elm make --optimize` which gets rid of +a bunch of runtime metadata. For example, it shortens record field names, and +we need that info to `toString` the value! As a consequence, packages cannot +use `toString` because they may be used in `--optimize` mode. + +toString: a -> String +-} +toString : Elm.Expression -> Elm.Expression +toString toStringArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Debug" ] + , name = "toString" + , annotation = Just (Type.function [ Type.var "a" ] Type.string) + } + ) + [ toStringArg_ ] + + +{-| Log a tagged value on the developer console, and then return the value. + + 1 + log "number" 1 -- equals 2, logs "number: 1" + length (log "start" []) -- equals 0, logs "start: []" + +It is often possible to sprinkle this around to see if values are what you +expect. It is kind of old-school to do it this way, but it works! + +**Note:** This is not available with `elm make --optimize` because (1) it +relies on `toString` which has the same restriction and (2) it is not a pure +function and would therefore have unpredictable behavior when paired with +compiler optimizations that move code around. + +**Note:** If you want to create a terminal application that prints stuff out, +use ports for now. That will give you full access to reading and writing in the +terminal. We may have a package in Elm for this someday, but browser +applications are the primary focus of platform development for now. + +log: String -> a -> a +-} +log : String -> Elm.Expression -> Elm.Expression +log logArg_ logArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Debug" ] + , name = "log" + , annotation = + Just + (Type.function [ Type.string, Type.var "a" ] (Type.var "a") + ) + } + ) + [ Elm.string logArg_, logArg_0 ] + + +{-| This is a placeholder for code that you will write later. + +For example, if you are working with a large union type and have partially +completed a case expression, it may make sense to do this: + + type Entity = Ship | Fish | Captain | Seagull + + drawEntity entity = + case entity of + Ship -> + ... + + Fish -> + ... + + _ -> + Debug.todo "handle Captain and Seagull" + +The Elm compiler recognizes each `Debug.todo` so if you run into it, you get +an **uncatchable runtime exception** that includes the module name and line +number. + +**Note:** This is not available with `elm make --optimize` or packages. The +idea is that a `todo` can be useful during development, but uncatchable runtime +exceptions should not appear in the resulting applications. + +**Note:** For the equivalent of try/catch error handling in Elm, use modules +like [`Maybe`](#Maybe) and [`Result`](#Result) which guarantee that no error +goes unhandled! + +todo: String -> a +-} +todo : String -> Elm.Expression +todo todoArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Debug" ] + , name = "todo" + , annotation = Just (Type.function [ Type.string ] (Type.var "a")) + } + ) + [ Elm.string todoArg_ ] + + +call_ : + { toString : Elm.Expression -> Elm.Expression + , log : Elm.Expression -> Elm.Expression -> Elm.Expression + , todo : Elm.Expression -> Elm.Expression + } +call_ = + { toString = + \toStringArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Debug" ] + , name = "toString" + , annotation = + Just (Type.function [ Type.var "a" ] Type.string) + } + ) + [ toStringArg_ ] + , log = + \logArg_ logArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Debug" ] + , name = "log" + , annotation = + Just + (Type.function + [ Type.string, Type.var "a" ] + (Type.var "a") + ) + } + ) + [ logArg_, logArg_0 ] + , todo = + \todoArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Debug" ] + , name = "todo" + , annotation = + Just (Type.function [ Type.string ] (Type.var "a")) + } + ) + [ todoArg_ ] + } + + +values_ : + { toString : Elm.Expression, log : Elm.Expression, todo : Elm.Expression } +values_ = + { toString = + Elm.value + { importFrom = [ "Debug" ] + , name = "toString" + , annotation = Just (Type.function [ Type.var "a" ] Type.string) + } + , log = + Elm.value + { importFrom = [ "Debug" ] + , name = "log" + , annotation = + Just + (Type.function [ Type.string, Type.var "a" ] (Type.var "a")) + } + , todo = + Elm.value + { importFrom = [ "Debug" ] + , name = "todo" + , annotation = Just (Type.function [ Type.string ] (Type.var "a")) + } + } \ No newline at end of file diff --git a/example-using-api/codegen/Gen/Dict.elm b/example-using-api/codegen/Gen/Dict.elm new file mode 100644 index 00000000..38cf6889 --- /dev/null +++ b/example-using-api/codegen/Gen/Dict.elm @@ -0,0 +1,1910 @@ +module Gen.Dict exposing + ( moduleName_, empty, singleton, insert, update, remove + , isEmpty, member, get, size, keys, values, toList + , fromList, map, foldl, foldr, filter, partition, union + , intersect, diff, merge, annotation_, call_, values_ + ) + +{-| +# Generated bindings for Dict + +@docs moduleName_, empty, singleton, insert, update, remove +@docs isEmpty, member, get, size, keys, values +@docs toList, fromList, map, foldl, foldr, filter +@docs partition, union, intersect, diff, merge, annotation_ +@docs call_, values_ +-} + + +import Elm +import Elm.Annotation as Type + + +{-| The name of this module. -} +moduleName_ : List String +moduleName_ = + [ "Dict" ] + + +{-| Create an empty dictionary. + +empty: Dict.Dict k v +-} +empty : Elm.Expression +empty = + Elm.value + { importFrom = [ "Dict" ] + , name = "empty" + , annotation = + Just + (Type.namedWith [ "Dict" ] "Dict" [ Type.var "k", Type.var "v" ] + ) + } + + +{-| Create a dictionary with one key-value pair. + +singleton: comparable -> v -> Dict.Dict comparable v +-} +singleton : Elm.Expression -> Elm.Expression -> Elm.Expression +singleton singletonArg_ singletonArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "singleton" + , annotation = + Just + (Type.function + [ Type.var "comparable", Type.var "v" ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ singletonArg_, singletonArg_0 ] + + +{-| Insert a key-value pair into a dictionary. Replaces value when there is +a collision. + +insert: comparable -> v -> Dict.Dict comparable v -> Dict.Dict comparable v +-} +insert : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression +insert insertArg_ insertArg_0 insertArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "insert" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.var "v" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ insertArg_, insertArg_0, insertArg_1 ] + + +{-| Update the value of a dictionary for a specific key with a given function. + +update: + comparable + -> (Maybe v -> Maybe v) + -> Dict.Dict comparable v + -> Dict.Dict comparable v +-} +update : + Elm.Expression + -> (Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression +update updateArg_ updateArg_0 updateArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "update" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.function + [ Type.maybe (Type.var "v") ] + (Type.maybe (Type.var "v")) + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ updateArg_ + , Elm.functionReduced "updateUnpack" updateArg_0 + , updateArg_1 + ] + + +{-| Remove a key-value pair from a dictionary. If the key is not found, +no changes are made. + +remove: comparable -> Dict.Dict comparable v -> Dict.Dict comparable v +-} +remove : Elm.Expression -> Elm.Expression -> Elm.Expression +remove removeArg_ removeArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "remove" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ removeArg_, removeArg_0 ] + + +{-| Determine if a dictionary is empty. + + isEmpty empty == True + +isEmpty: Dict.Dict k v -> Bool +-} +isEmpty : Elm.Expression -> Elm.Expression +isEmpty isEmptyArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "isEmpty" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + Type.bool + ) + } + ) + [ isEmptyArg_ ] + + +{-| Determine if a key is in a dictionary. + +member: comparable -> Dict.Dict comparable v -> Bool +-} +member : Elm.Expression -> Elm.Expression -> Elm.Expression +member memberArg_ memberArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "member" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + Type.bool + ) + } + ) + [ memberArg_, memberArg_0 ] + + +{-| Get the value associated with a key. If the key is not found, return +`Nothing`. This is useful when you are not sure if a key will be in the +dictionary. + + animals = fromList [ ("Tom", Cat), ("Jerry", Mouse) ] + + get "Tom" animals == Just Cat + get "Jerry" animals == Just Mouse + get "Spike" animals == Nothing + +get: comparable -> Dict.Dict comparable v -> Maybe v +-} +get : Elm.Expression -> Elm.Expression -> Elm.Expression +get getArg_ getArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "get" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.maybe (Type.var "v")) + ) + } + ) + [ getArg_, getArg_0 ] + + +{-| Determine the number of key-value pairs in the dictionary. + +size: Dict.Dict k v -> Int +-} +size : Elm.Expression -> Elm.Expression +size sizeArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "size" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + Type.int + ) + } + ) + [ sizeArg_ ] + + +{-| Get all of the keys in a dictionary, sorted from lowest to highest. + + keys (fromList [(0,"Alice"),(1,"Bob")]) == [0,1] + +keys: Dict.Dict k v -> List k +-} +keys : Elm.Expression -> Elm.Expression +keys keysArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "keys" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.list (Type.var "k")) + ) + } + ) + [ keysArg_ ] + + +{-| Get all of the values in a dictionary, in the order of their keys. + + values (fromList [(0,"Alice"),(1,"Bob")]) == ["Alice", "Bob"] + +values: Dict.Dict k v -> List v +-} +values : Elm.Expression -> Elm.Expression +values valuesArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "values" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.list (Type.var "v")) + ) + } + ) + [ valuesArg_ ] + + +{-| Convert a dictionary into an association list of key-value pairs, sorted by keys. + +toList: Dict.Dict k v -> List ( k, v ) +-} +toList : Elm.Expression -> Elm.Expression +toList toListArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "toList" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.list (Type.tuple (Type.var "k") (Type.var "v"))) + ) + } + ) + [ toListArg_ ] + + +{-| Convert an association list into a dictionary. + +fromList: List ( comparable, v ) -> Dict.Dict comparable v +-} +fromList : List Elm.Expression -> Elm.Expression +fromList fromListArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "fromList" + , annotation = + Just + (Type.function + [ Type.list + (Type.tuple (Type.var "comparable") (Type.var "v") + ) + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ Elm.list fromListArg_ ] + + +{-| Apply a function to all values in a dictionary. + +map: (k -> a -> b) -> Dict.Dict k a -> Dict.Dict k b +-} +map : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression +map mapArg_ mapArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "k", Type.var "a" ] + (Type.var "b") + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "a" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "b" ] + ) + ) + } + ) + [ Elm.functionReduced + "mapUnpack" + (\functionReducedUnpack -> + Elm.functionReduced "unpack" (mapArg_ functionReducedUnpack) + ) + , mapArg_0 + ] + + +{-| Fold over the key-value pairs in a dictionary from lowest key to highest key. + + import Dict exposing (Dict) + + getAges : Dict String User -> List String + getAges users = + Dict.foldl addAge [] users + + addAge : String -> User -> List String -> List String + addAge _ user ages = + user.age :: ages + + -- getAges users == [33,19,28] + +foldl: (k -> v -> b -> b) -> b -> Dict.Dict k v -> b +-} +foldl : + (Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +foldl foldlArg_ foldlArg_0 foldlArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "foldl" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "k", Type.var "v", Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.var "b") + ) + } + ) + [ Elm.functionReduced + "foldlUnpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + ((foldlArg_ functionReducedUnpack) + functionReducedUnpack0 + ) + ) + ) + , foldlArg_0 + , foldlArg_1 + ] + + +{-| Fold over the key-value pairs in a dictionary from highest key to lowest key. + + import Dict exposing (Dict) + + getAges : Dict String User -> List String + getAges users = + Dict.foldr addAge [] users + + addAge : String -> User -> List String -> List String + addAge _ user ages = + user.age :: ages + + -- getAges users == [28,19,33] + +foldr: (k -> v -> b -> b) -> b -> Dict.Dict k v -> b +-} +foldr : + (Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +foldr foldrArg_ foldrArg_0 foldrArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "foldr" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "k", Type.var "v", Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.var "b") + ) + } + ) + [ Elm.functionReduced + "foldrUnpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + ((foldrArg_ functionReducedUnpack) + functionReducedUnpack0 + ) + ) + ) + , foldrArg_0 + , foldrArg_1 + ] + + +{-| Keep only the key-value pairs that pass the given test. + +filter: (comparable -> v -> Bool) -> Dict.Dict comparable v -> Dict.Dict comparable v +-} +filter : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression +filter filterArg_ filterArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "filter" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "comparable", Type.var "v" ] + Type.bool + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ Elm.functionReduced + "filterUnpack" + (\functionReducedUnpack -> + Elm.functionReduced "unpack" (filterArg_ functionReducedUnpack) + ) + , filterArg_0 + ] + + +{-| Partition a dictionary according to some test. The first dictionary +contains all key-value pairs which passed the test, and the second contains +the pairs that did not. + +partition: + (comparable -> v -> Bool) + -> Dict.Dict comparable v + -> ( Dict.Dict comparable v, Dict.Dict comparable v ) +-} +partition : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression +partition partitionArg_ partitionArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "partition" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "comparable", Type.var "v" ] + Type.bool + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.tuple + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + ) + } + ) + [ Elm.functionReduced + "partitionUnpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (partitionArg_ functionReducedUnpack) + ) + , partitionArg_0 + ] + + +{-| Combine two dictionaries. If there is a collision, preference is given +to the first dictionary. + +union: Dict.Dict comparable v -> Dict.Dict comparable v -> Dict.Dict comparable v +-} +union : Elm.Expression -> Elm.Expression -> Elm.Expression +union unionArg_ unionArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "union" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ unionArg_, unionArg_0 ] + + +{-| Keep a key-value pair when its key appears in the second dictionary. +Preference is given to values in the first dictionary. + +intersect: Dict.Dict comparable v -> Dict.Dict comparable v -> Dict.Dict comparable v +-} +intersect : Elm.Expression -> Elm.Expression -> Elm.Expression +intersect intersectArg_ intersectArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "intersect" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ intersectArg_, intersectArg_0 ] + + +{-| Keep a key-value pair when its key does not appear in the second dictionary. + +diff: Dict.Dict comparable a -> Dict.Dict comparable b -> Dict.Dict comparable a +-} +diff : Elm.Expression -> Elm.Expression -> Elm.Expression +diff diffArg_ diffArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "diff" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "a" ] + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "b" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "a" ] + ) + ) + } + ) + [ diffArg_, diffArg_0 ] + + +{-| The most general way of combining two dictionaries. You provide three +accumulators for when a given key appears: + + 1. Only in the left dictionary. + 2. In both dictionaries. + 3. Only in the right dictionary. + +You then traverse all the keys from lowest to highest, building up whatever +you want. + +merge: + (comparable -> a -> result -> result) + -> (comparable -> a -> b -> result -> result) + -> (comparable -> b -> result -> result) + -> Dict.Dict comparable a + -> Dict.Dict comparable b + -> result + -> result +-} +merge : + (Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression) + -> (Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression) + -> (Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +merge mergeArg_ mergeArg_0 mergeArg_1 mergeArg_2 mergeArg_3 mergeArg_4 = + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "merge" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "comparable" + , Type.var "a" + , Type.var "result" + ] + (Type.var "result") + , Type.function + [ Type.var "comparable" + , Type.var "a" + , Type.var "b" + , Type.var "result" + ] + (Type.var "result") + , Type.function + [ Type.var "comparable" + , Type.var "b" + , Type.var "result" + ] + (Type.var "result") + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "a" ] + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "b" ] + , Type.var "result" + ] + (Type.var "result") + ) + } + ) + [ Elm.functionReduced + "mergeUnpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + ((mergeArg_ functionReducedUnpack) + functionReducedUnpack0 + ) + ) + ) + , Elm.functionReduced + "mergeUnpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_0_2_1_2_0_0 -> + Elm.functionReduced + "unpack" + (((mergeArg_0 functionReducedUnpack) + functionReducedUnpack0 + ) + functionReducedUnpack_2_1_2_0_2_1_2_0_0 + ) + ) + ) + ) + , Elm.functionReduced + "mergeUnpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + ((mergeArg_1 functionReducedUnpack) + functionReducedUnpack0 + ) + ) + ) + , mergeArg_2 + , mergeArg_3 + , mergeArg_4 + ] + + +annotation_ : { dict : Type.Annotation -> Type.Annotation -> Type.Annotation } +annotation_ = + { dict = + \dictArg0 dictArg1 -> + Type.namedWith [ "Dict" ] "Dict" [ dictArg0, dictArg1 ] + } + + +call_ : + { singleton : Elm.Expression -> Elm.Expression -> Elm.Expression + , insert : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , update : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , remove : Elm.Expression -> Elm.Expression -> Elm.Expression + , isEmpty : Elm.Expression -> Elm.Expression + , member : Elm.Expression -> Elm.Expression -> Elm.Expression + , get : Elm.Expression -> Elm.Expression -> Elm.Expression + , size : Elm.Expression -> Elm.Expression + , keys : Elm.Expression -> Elm.Expression + , values : Elm.Expression -> Elm.Expression + , toList : Elm.Expression -> Elm.Expression + , fromList : Elm.Expression -> Elm.Expression + , map : Elm.Expression -> Elm.Expression -> Elm.Expression + , foldl : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , foldr : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , filter : Elm.Expression -> Elm.Expression -> Elm.Expression + , partition : Elm.Expression -> Elm.Expression -> Elm.Expression + , union : Elm.Expression -> Elm.Expression -> Elm.Expression + , intersect : Elm.Expression -> Elm.Expression -> Elm.Expression + , diff : Elm.Expression -> Elm.Expression -> Elm.Expression + , merge : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + } +call_ = + { singleton = + \singletonArg_ singletonArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "singleton" + , annotation = + Just + (Type.function + [ Type.var "comparable", Type.var "v" ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ singletonArg_, singletonArg_0 ] + , insert = + \insertArg_ insertArg_0 insertArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "insert" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.var "v" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ insertArg_, insertArg_0, insertArg_1 ] + , update = + \updateArg_ updateArg_0 updateArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "update" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.function + [ Type.maybe (Type.var "v") ] + (Type.maybe (Type.var "v")) + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ updateArg_, updateArg_0, updateArg_1 ] + , remove = + \removeArg_ removeArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "remove" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ removeArg_, removeArg_0 ] + , isEmpty = + \isEmptyArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "isEmpty" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + Type.bool + ) + } + ) + [ isEmptyArg_ ] + , member = + \memberArg_ memberArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "member" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + Type.bool + ) + } + ) + [ memberArg_, memberArg_0 ] + , get = + \getArg_ getArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "get" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.maybe (Type.var "v")) + ) + } + ) + [ getArg_, getArg_0 ] + , size = + \sizeArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "size" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + Type.int + ) + } + ) + [ sizeArg_ ] + , keys = + \keysArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "keys" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.list (Type.var "k")) + ) + } + ) + [ keysArg_ ] + , values = + \valuesArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "values" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.list (Type.var "v")) + ) + } + ) + [ valuesArg_ ] + , toList = + \toListArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "toList" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.list + (Type.tuple (Type.var "k") (Type.var "v") + ) + ) + ) + } + ) + [ toListArg_ ] + , fromList = + \fromListArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "fromList" + , annotation = + Just + (Type.function + [ Type.list + (Type.tuple + (Type.var "comparable") + (Type.var "v") + ) + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ fromListArg_ ] + , map = + \mapArg_ mapArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "k", Type.var "a" ] + (Type.var "b") + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "a" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "b" ] + ) + ) + } + ) + [ mapArg_, mapArg_0 ] + , foldl = + \foldlArg_ foldlArg_0 foldlArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "foldl" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "k" + , Type.var "v" + , Type.var "b" + ] + (Type.var "b") + , Type.var "b" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.var "b") + ) + } + ) + [ foldlArg_, foldlArg_0, foldlArg_1 ] + , foldr = + \foldrArg_ foldrArg_0 foldrArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "foldr" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "k" + , Type.var "v" + , Type.var "b" + ] + (Type.var "b") + , Type.var "b" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.var "b") + ) + } + ) + [ foldrArg_, foldrArg_0, foldrArg_1 ] + , filter = + \filterArg_ filterArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "filter" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "comparable", Type.var "v" ] + Type.bool + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ filterArg_, filterArg_0 ] + , partition = + \partitionArg_ partitionArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "partition" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "comparable", Type.var "v" ] + Type.bool + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.tuple + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable" + , Type.var "v" + ] + ) + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable" + , Type.var "v" + ] + ) + ) + ) + } + ) + [ partitionArg_, partitionArg_0 ] + , union = + \unionArg_ unionArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "union" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ unionArg_, unionArg_0 ] + , intersect = + \intersectArg_ intersectArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "intersect" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + ) + [ intersectArg_, intersectArg_0 ] + , diff = + \diffArg_ diffArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "diff" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "a" ] + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "b" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "a" ] + ) + ) + } + ) + [ diffArg_, diffArg_0 ] + , merge = + \mergeArg_ mergeArg_0 mergeArg_1 mergeArg_2 mergeArg_3 mergeArg_4 -> + Elm.apply + (Elm.value + { importFrom = [ "Dict" ] + , name = "merge" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "comparable" + , Type.var "a" + , Type.var "result" + ] + (Type.var "result") + , Type.function + [ Type.var "comparable" + , Type.var "a" + , Type.var "b" + , Type.var "result" + ] + (Type.var "result") + , Type.function + [ Type.var "comparable" + , Type.var "b" + , Type.var "result" + ] + (Type.var "result") + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "a" ] + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "b" ] + , Type.var "result" + ] + (Type.var "result") + ) + } + ) + [ mergeArg_ + , mergeArg_0 + , mergeArg_1 + , mergeArg_2 + , mergeArg_3 + , mergeArg_4 + ] + } + + +values_ : + { empty : Elm.Expression + , singleton : Elm.Expression + , insert : Elm.Expression + , update : Elm.Expression + , remove : Elm.Expression + , isEmpty : Elm.Expression + , member : Elm.Expression + , get : Elm.Expression + , size : Elm.Expression + , keys : Elm.Expression + , values : Elm.Expression + , toList : Elm.Expression + , fromList : Elm.Expression + , map : Elm.Expression + , foldl : Elm.Expression + , foldr : Elm.Expression + , filter : Elm.Expression + , partition : Elm.Expression + , union : Elm.Expression + , intersect : Elm.Expression + , diff : Elm.Expression + , merge : Elm.Expression + } +values_ = + { empty = + Elm.value + { importFrom = [ "Dict" ] + , name = "empty" + , annotation = + Just + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ) + } + , singleton = + Elm.value + { importFrom = [ "Dict" ] + , name = "singleton" + , annotation = + Just + (Type.function + [ Type.var "comparable", Type.var "v" ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + , insert = + Elm.value + { importFrom = [ "Dict" ] + , name = "insert" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.var "v" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + , update = + Elm.value + { importFrom = [ "Dict" ] + , name = "update" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.function + [ Type.maybe (Type.var "v") ] + (Type.maybe (Type.var "v")) + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + , remove = + Elm.value + { importFrom = [ "Dict" ] + , name = "remove" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + , isEmpty = + Elm.value + { importFrom = [ "Dict" ] + , name = "isEmpty" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + Type.bool + ) + } + , member = + Elm.value + { importFrom = [ "Dict" ] + , name = "member" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + Type.bool + ) + } + , get = + Elm.value + { importFrom = [ "Dict" ] + , name = "get" + , annotation = + Just + (Type.function + [ Type.var "comparable" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.maybe (Type.var "v")) + ) + } + , size = + Elm.value + { importFrom = [ "Dict" ] + , name = "size" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + Type.int + ) + } + , keys = + Elm.value + { importFrom = [ "Dict" ] + , name = "keys" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.list (Type.var "k")) + ) + } + , values = + Elm.value + { importFrom = [ "Dict" ] + , name = "values" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.list (Type.var "v")) + ) + } + , toList = + Elm.value + { importFrom = [ "Dict" ] + , name = "toList" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.list (Type.tuple (Type.var "k") (Type.var "v"))) + ) + } + , fromList = + Elm.value + { importFrom = [ "Dict" ] + , name = "fromList" + , annotation = + Just + (Type.function + [ Type.list + (Type.tuple (Type.var "comparable") (Type.var "v")) + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + , map = + Elm.value + { importFrom = [ "Dict" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "k", Type.var "a" ] + (Type.var "b") + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "a" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "b" ] + ) + ) + } + , foldl = + Elm.value + { importFrom = [ "Dict" ] + , name = "foldl" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "k", Type.var "v", Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.var "b") + ) + } + , foldr = + Elm.value + { importFrom = [ "Dict" ] + , name = "foldr" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "k", Type.var "v", Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.var "b") + ) + } + , filter = + Elm.value + { importFrom = [ "Dict" ] + , name = "filter" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "comparable", Type.var "v" ] + Type.bool + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + , partition = + Elm.value + { importFrom = [ "Dict" ] + , name = "partition" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "comparable", Type.var "v" ] + Type.bool + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.tuple + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + ) + } + , union = + Elm.value + { importFrom = [ "Dict" ] + , name = "union" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + , intersect = + Elm.value + { importFrom = [ "Dict" ] + , name = "intersect" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "v" ] + ) + ) + } + , diff = + Elm.value + { importFrom = [ "Dict" ] + , name = "diff" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "a" ] + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "b" ] + ] + (Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "a" ] + ) + ) + } + , merge = + Elm.value + { importFrom = [ "Dict" ] + , name = "merge" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "comparable" + , Type.var "a" + , Type.var "result" + ] + (Type.var "result") + , Type.function + [ Type.var "comparable" + , Type.var "a" + , Type.var "b" + , Type.var "result" + ] + (Type.var "result") + , Type.function + [ Type.var "comparable" + , Type.var "b" + , Type.var "result" + ] + (Type.var "result") + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "a" ] + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "comparable", Type.var "b" ] + , Type.var "result" + ] + (Type.var "result") + ) + } + } \ No newline at end of file diff --git a/example-using-api/codegen/Gen/Json/Decode.elm b/example-using-api/codegen/Gen/Json/Decode.elm new file mode 100644 index 00000000..e29fafaf --- /dev/null +++ b/example-using-api/codegen/Gen/Json/Decode.elm @@ -0,0 +1,3562 @@ +module Gen.Json.Decode exposing + ( moduleName_, string, bool, int, float, nullable + , list, array, dict, keyValuePairs, oneOrMore, field, at + , index, maybe, oneOf, decodeString, decodeValue, errorToString, map + , map2, map3, map4, map5, map6, map7, map8 + , lazy, value, null, succeed, fail, andThen, annotation_ + , make_, caseOf_, call_, values_ + ) + +{-| +# Generated bindings for Json.Decode + +@docs moduleName_, string, bool, int, float, nullable +@docs list, array, dict, keyValuePairs, oneOrMore, field +@docs at, index, maybe, oneOf, decodeString, decodeValue +@docs errorToString, map, map2, map3, map4, map5 +@docs map6, map7, map8, lazy, value, null +@docs succeed, fail, andThen, annotation_, make_, caseOf_ +@docs call_, values_ +-} + + +import Elm +import Elm.Annotation as Type +import Elm.Arg +import Elm.Case + + +{-| The name of this module. -} +moduleName_ : List String +moduleName_ = + [ "Json", "Decode" ] + + +{-| Decode a JSON string into an Elm `String`. + + decodeString string "true" == Err ... + decodeString string "42" == Err ... + decodeString string "3.14" == Err ... + decodeString string "\"hello\"" == Ok "hello" + decodeString string "{ \"hello\": 42 }" == Err ... + +string: Json.Decode.Decoder String +-} +string : Elm.Expression +string = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "string" + , annotation = + Just (Type.namedWith [ "Json", "Decode" ] "Decoder" [ Type.string ]) + } + + +{-| Decode a JSON boolean into an Elm `Bool`. + + decodeString bool "true" == Ok True + decodeString bool "42" == Err ... + decodeString bool "3.14" == Err ... + decodeString bool "\"hello\"" == Err ... + decodeString bool "{ \"hello\": 42 }" == Err ... + +bool: Json.Decode.Decoder Bool +-} +bool : Elm.Expression +bool = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "bool" + , annotation = + Just (Type.namedWith [ "Json", "Decode" ] "Decoder" [ Type.bool ]) + } + + +{-| Decode a JSON number into an Elm `Int`. + + decodeString int "true" == Err ... + decodeString int "42" == Ok 42 + decodeString int "3.14" == Err ... + decodeString int "\"hello\"" == Err ... + decodeString int "{ \"hello\": 42 }" == Err ... + +int: Json.Decode.Decoder Int +-} +int : Elm.Expression +int = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "int" + , annotation = + Just (Type.namedWith [ "Json", "Decode" ] "Decoder" [ Type.int ]) + } + + +{-| Decode a JSON number into an Elm `Float`. + + decodeString float "true" == Err .. + decodeString float "42" == Ok 42 + decodeString float "3.14" == Ok 3.14 + decodeString float "\"hello\"" == Err ... + decodeString float "{ \"hello\": 42 }" == Err ... + +float: Json.Decode.Decoder Float +-} +float : Elm.Expression +float = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "float" + , annotation = + Just (Type.namedWith [ "Json", "Decode" ] "Decoder" [ Type.float ]) + } + + +{-| Decode a nullable JSON value into an Elm value. + + decodeString (nullable int) "13" == Ok (Just 13) + decodeString (nullable int) "42" == Ok (Just 42) + decodeString (nullable int) "null" == Ok Nothing + decodeString (nullable int) "true" == Err .. + +nullable: Json.Decode.Decoder a -> Json.Decode.Decoder (Maybe a) +-} +nullable : Elm.Expression -> Elm.Expression +nullable nullableArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "nullable" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.maybe (Type.var "a") ] + ) + ) + } + ) + [ nullableArg_ ] + + +{-| Decode a JSON array into an Elm `List`. + + decodeString (list int) "[1,2,3]" == Ok [1,2,3] + decodeString (list bool) "[true,false]" == Ok [True,False] + +list: Json.Decode.Decoder a -> Json.Decode.Decoder (List a) +-} +list : Elm.Expression -> Elm.Expression +list listArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "list" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.list (Type.var "a") ] + ) + ) + } + ) + [ listArg_ ] + + +{-| Decode a JSON array into an Elm `Array`. + + decodeString (array int) "[1,2,3]" == Ok (Array.fromList [1,2,3]) + decodeString (array bool) "[true,false]" == Ok (Array.fromList [True,False]) + +array: Json.Decode.Decoder a -> Json.Decode.Decoder (Array.Array a) +-} +array : Elm.Expression -> Elm.Expression +array arrayArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "array" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.namedWith + [ "Array" ] + "Array" + [ Type.var "a" ] + ] + ) + ) + } + ) + [ arrayArg_ ] + + +{-| Decode a JSON object into an Elm `Dict`. + + decodeString (dict int) "{ \"alice\": 42, \"bob\": 99 }" + == Ok (Dict.fromList [("alice", 42), ("bob", 99)]) + +If you need the keys (like `"alice"` and `"bob"`) available in the `Dict` +values as well, I recommend using a (private) intermediate data structure like +`Info` in this example: + + module User exposing (User, decoder) + + import Dict + import Json.Decode exposing (..) + + type alias User = + { name : String + , height : Float + , age : Int + } + + decoder : Decoder (Dict.Dict String User) + decoder = + map (Dict.map infoToUser) (dict infoDecoder) + + type alias Info = + { height : Float + , age : Int + } + + infoDecoder : Decoder Info + infoDecoder = + map2 Info + (field "height" float) + (field "age" int) + + infoToUser : String -> Info -> User + infoToUser name { height, age } = + User name height age + +So now JSON like `{ "alice": { height: 1.6, age: 33 }}` are turned into +dictionary values like `Dict.singleton "alice" (User "alice" 1.6 33)` if +you need that. + +dict: Json.Decode.Decoder a -> Json.Decode.Decoder (Dict.Dict String a) +-} +dict : Elm.Expression -> Elm.Expression +dict dictArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "dict" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.string, Type.var "a" ] + ] + ) + ) + } + ) + [ dictArg_ ] + + +{-| Decode a JSON object into an Elm `List` of pairs. + + decodeString (keyValuePairs int) "{ \"alice\": 42, \"bob\": 99 }" + == Ok [("alice", 42), ("bob", 99)] + +keyValuePairs: Json.Decode.Decoder a -> Json.Decode.Decoder (List ( String, a )) +-} +keyValuePairs : Elm.Expression -> Elm.Expression +keyValuePairs keyValuePairsArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "keyValuePairs" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.list + (Type.tuple Type.string (Type.var "a")) + ] + ) + ) + } + ) + [ keyValuePairsArg_ ] + + +{-| Decode a JSON array that has one or more elements. This comes up if you +want to enable drag-and-drop of files into your application. You would pair +this function with [`elm/file`]() to write a `dropDecoder` like this: + + import File exposing (File) + import Json.Decoder as D + + type Msg + = GotFiles File (List Files) + + inputDecoder : D.Decoder Msg + inputDecoder = + D.at ["dataTransfer","files"] (D.oneOrMore GotFiles File.decoder) + +This captures the fact that you can never drag-and-drop zero files. + +oneOrMore: (a -> List a -> value) -> Json.Decode.Decoder a -> Json.Decode.Decoder value +-} +oneOrMore : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression +oneOrMore oneOrMoreArg_ oneOrMoreArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "oneOrMore" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.list (Type.var "a") ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ Elm.functionReduced + "oneOrMoreUnpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (oneOrMoreArg_ functionReducedUnpack) + ) + , oneOrMoreArg_0 + ] + + +{-| Decode a JSON object, requiring a particular field. + + decodeString (field "x" int) "{ \"x\": 3 }" == Ok 3 + decodeString (field "x" int) "{ \"x\": 3, \"y\": 4 }" == Ok 3 + decodeString (field "x" int) "{ \"x\": true }" == Err ... + decodeString (field "x" int) "{ \"y\": 4 }" == Err ... + + decodeString (field "name" string) "{ \"name\": \"tom\" }" == Ok "tom" + +The object *can* have other fields. Lots of them! The only thing this decoder +cares about is if `x` is present and that the value there is an `Int`. + +Check out [`map2`](#map2) to see how to decode multiple fields! + +field: String -> Json.Decode.Decoder a -> Json.Decode.Decoder a +-} +field : String -> Elm.Expression -> Elm.Expression +field fieldArg_ fieldArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "field" + , annotation = + Just + (Type.function + [ Type.string + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ Elm.string fieldArg_, fieldArg_0 ] + + +{-| Decode a nested JSON object, requiring certain fields. + + json = """{ "person": { "name": "tom", "age": 42 } }""" + + decodeString (at ["person", "name"] string) json == Ok "tom" + decodeString (at ["person", "age" ] int ) json == Ok "42 + +This is really just a shorthand for saying things like: + + field "person" (field "name" string) == at ["person","name"] string + +at: List String -> Json.Decode.Decoder a -> Json.Decode.Decoder a +-} +at : List String -> Elm.Expression -> Elm.Expression +at atArg_ atArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "at" + , annotation = + Just + (Type.function + [ Type.list Type.string + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ Elm.list (List.map Elm.string atArg_), atArg_0 ] + + +{-| Decode a JSON array, requiring a particular index. + + json = """[ "alice", "bob", "chuck" ]""" + + decodeString (index 0 string) json == Ok "alice" + decodeString (index 1 string) json == Ok "bob" + decodeString (index 2 string) json == Ok "chuck" + decodeString (index 3 string) json == Err ... + +index: Int -> Json.Decode.Decoder a -> Json.Decode.Decoder a +-} +index : Int -> Elm.Expression -> Elm.Expression +index indexArg_ indexArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "index" + , annotation = + Just + (Type.function + [ Type.int + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ Elm.int indexArg_, indexArg_0 ] + + +{-| Helpful for dealing with optional fields. Here are a few slightly different +examples: + + json = """{ "name": "tom", "age": 42 }""" + + decodeString (maybe (field "age" int )) json == Ok (Just 42) + decodeString (maybe (field "name" int )) json == Ok Nothing + decodeString (maybe (field "height" float)) json == Ok Nothing + + decodeString (field "age" (maybe int )) json == Ok (Just 42) + decodeString (field "name" (maybe int )) json == Ok Nothing + decodeString (field "height" (maybe float)) json == Err ... + +Notice the last example! It is saying we *must* have a field named `height` and +the content *may* be a float. There is no `height` field, so the decoder fails. + +Point is, `maybe` will make exactly what it contains conditional. For optional +fields, this means you probably want it *outside* a use of `field` or `at`. + +maybe: Json.Decode.Decoder a -> Json.Decode.Decoder (Maybe a) +-} +maybe : Elm.Expression -> Elm.Expression +maybe maybeArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "maybe" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.maybe (Type.var "a") ] + ) + ) + } + ) + [ maybeArg_ ] + + +{-| Try a bunch of different decoders. This can be useful if the JSON may come +in a couple different formats. For example, say you want to read an array of +numbers, but some of them are `null`. + + import String + + badInt : Decoder Int + badInt = + oneOf [ int, null 0 ] + + -- decodeString (list badInt) "[1,2,null,4]" == Ok [1,2,0,4] + +Why would someone generate JSON like this? Questions like this are not good +for your health. The point is that you can use `oneOf` to handle situations +like this! + +You could also use `oneOf` to help version your data. Try the latest format, +then a few older ones that you still support. You could use `andThen` to be +even more particular if you wanted. + +oneOf: List (Json.Decode.Decoder a) -> Json.Decode.Decoder a +-} +oneOf : List Elm.Expression -> Elm.Expression +oneOf oneOfArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "oneOf" + , annotation = + Just + (Type.function + [ Type.list + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ Elm.list oneOfArg_ ] + + +{-| Parse the given string into a JSON value and then run the `Decoder` on it. +This will fail if the string is not well-formed JSON or if the `Decoder` +fails for some reason. + + decodeString int "4" == Ok 4 + decodeString int "1 + 2" == Err ... + +decodeString: Json.Decode.Decoder a -> String -> Result.Result Json.Decode.Error a +-} +decodeString : Elm.Expression -> String -> Elm.Expression +decodeString decodeStringArg_ decodeStringArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "decodeString" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.string + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.namedWith [ "Json", "Decode" ] "Error" [] + , Type.var "a" + ] + ) + ) + } + ) + [ decodeStringArg_, Elm.string decodeStringArg_0 ] + + +{-| Run a `Decoder` on some JSON `Value`. You can send these JSON values +through ports, so that is probably the main time you would use this function. + +decodeValue: Json.Decode.Decoder a -> Json.Decode.Value -> Result.Result Json.Decode.Error a +-} +decodeValue : Elm.Expression -> Elm.Expression -> Elm.Expression +decodeValue decodeValueArg_ decodeValueArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "decodeValue" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith [ "Json", "Decode" ] "Value" [] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.namedWith [ "Json", "Decode" ] "Error" [] + , Type.var "a" + ] + ) + ) + } + ) + [ decodeValueArg_, decodeValueArg_0 ] + + +{-| Convert a decoding error into a `String` that is nice for debugging. + +It produces multiple lines of output, so you may want to peek at it with +something like this: + + import Html + import Json.Decode as Decode + + errorToHtml : Decode.Error -> Html.Html msg + errorToHtml error = + Html.pre [] [ Html.text (Decode.errorToString error) ] + +**Note:** It would be cool to do nicer coloring and fancier HTML, but I wanted +to avoid having an `elm/html` dependency for now. It is totally possible to +crawl the `Error` structure and create this separately though! + +errorToString: Json.Decode.Error -> String +-} +errorToString : Elm.Expression -> Elm.Expression +errorToString errorToStringArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "errorToString" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Json", "Decode" ] "Error" [] ] + Type.string + ) + } + ) + [ errorToStringArg_ ] + + +{-| Transform a decoder. Maybe you just want to know the length of a string: + + import String + + stringLength : Decoder Int + stringLength = + map String.length string + +It is often helpful to use `map` with `oneOf`, like when defining `nullable`: + + nullable : Decoder a -> Decoder (Maybe a) + nullable decoder = + oneOf + [ null Nothing + , map Just decoder + ] + +map: (a -> value) -> Json.Decode.Decoder a -> Json.Decode.Decoder value +-} +map : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +map mapArg_ mapArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ Elm.functionReduced "mapUnpack" mapArg_, mapArg_0 ] + + +{-| Try two decoders and then combine the result. We can use this to decode +objects with many fields: + + type alias Point = { x : Float, y : Float } + + point : Decoder Point + point = + map2 Point + (field "x" float) + (field "y" float) + + -- decodeString point """{ "x": 3, "y": 4 }""" == Ok { x = 3, y = 4 } + +It tries each individual decoder and puts the result together with the `Point` +constructor. + +map2: + (a -> b -> value) + -> Json.Decode.Decoder a + -> Json.Decode.Decoder b + -> Json.Decode.Decoder value +-} +map2 : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map2 map2Arg_ map2Arg_0 map2Arg_1 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ Elm.functionReduced + "map2Unpack" + (\functionReducedUnpack -> + Elm.functionReduced "unpack" (map2Arg_ functionReducedUnpack) + ) + , map2Arg_0 + , map2Arg_1 + ] + + +{-| Try three decoders and then combine the result. We can use this to decode +objects with many fields: + + type alias Person = { name : String, age : Int, height : Float } + + person : Decoder Person + person = + map3 Person + (at ["name"] string) + (at ["info","age"] int) + (at ["info","height"] float) + + -- json = """{ "name": "tom", "info": { "age": 42, "height": 1.8 } }""" + -- decodeString person json == Ok { name = "tom", age = 42, height = 1.8 } + +Like `map2` it tries each decoder in order and then give the results to the +`Person` constructor. That can be any function though! + +map3: + (a -> b -> c -> value) + -> Json.Decode.Decoder a + -> Json.Decode.Decoder b + -> Json.Decode.Decoder c + -> Json.Decode.Decoder value +-} +map3 : + (Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map3 map3Arg_ map3Arg_0 map3Arg_1 map3Arg_2 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b", Type.var "c" ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ Elm.functionReduced + "map3Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + ((map3Arg_ functionReducedUnpack) + functionReducedUnpack0 + ) + ) + ) + , map3Arg_0 + , map3Arg_1 + , map3Arg_2 + ] + + +{-| map4: + (a -> b -> c -> d -> value) + -> Json.Decode.Decoder a + -> Json.Decode.Decoder b + -> Json.Decode.Decoder c + -> Json.Decode.Decoder d + -> Json.Decode.Decoder value +-} +map4 : + (Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map4 map4Arg_ map4Arg_0 map4Arg_1 map4Arg_2 map4Arg_3 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ Elm.functionReduced + "map4Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (((map4Arg_ functionReducedUnpack) + functionReducedUnpack0 + ) + functionReducedUnpack_2_1_2_0_2_0_2_0_0 + ) + ) + ) + ) + , map4Arg_0 + , map4Arg_1 + , map4Arg_2 + , map4Arg_3 + ] + + +{-| map5: + (a -> b -> c -> d -> e -> value) + -> Json.Decode.Decoder a + -> Json.Decode.Decoder b + -> Json.Decode.Decoder c + -> Json.Decode.Decoder d + -> Json.Decode.Decoder e + -> Json.Decode.Decoder value +-} +map5 : + (Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map5 map5Arg_ map5Arg_0 map5Arg_1 map5Arg_2 map5Arg_3 map5Arg_4 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "e" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ Elm.functionReduced + "map5Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + ((((map5Arg_ functionReducedUnpack + ) + functionReducedUnpack0 + ) + functionReducedUnpack_2_1_2_0_2_0_2_0_0 + ) + functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 + ) + ) + ) + ) + ) + , map5Arg_0 + , map5Arg_1 + , map5Arg_2 + , map5Arg_3 + , map5Arg_4 + ] + + +{-| map6: + (a -> b -> c -> d -> e -> f -> value) + -> Json.Decode.Decoder a + -> Json.Decode.Decoder b + -> Json.Decode.Decoder c + -> Json.Decode.Decoder d + -> Json.Decode.Decoder e + -> Json.Decode.Decoder f + -> Json.Decode.Decoder value +-} +map6 : + (Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map6 map6Arg_ map6Arg_0 map6Arg_1 map6Arg_2 map6Arg_3 map6Arg_4 map6Arg_5 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map6" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + , Type.var "f" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "e" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "f" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ Elm.functionReduced + "map6Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_1_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (((((map6Arg_ + functionReducedUnpack + ) + functionReducedUnpack0 + ) + functionReducedUnpack_2_1_2_0_2_0_2_0_0 + ) + functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 + ) + functionReducedUnpack_2_1_2_1_2_1_2_0_2_0_2_0_0 + ) + ) + ) + ) + ) + ) + , map6Arg_0 + , map6Arg_1 + , map6Arg_2 + , map6Arg_3 + , map6Arg_4 + , map6Arg_5 + ] + + +{-| map7: + (a -> b -> c -> d -> e -> f -> g -> value) + -> Json.Decode.Decoder a + -> Json.Decode.Decoder b + -> Json.Decode.Decoder c + -> Json.Decode.Decoder d + -> Json.Decode.Decoder e + -> Json.Decode.Decoder f + -> Json.Decode.Decoder g + -> Json.Decode.Decoder value +-} +map7 : + (Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map7 map7Arg_ map7Arg_0 map7Arg_1 map7Arg_2 map7Arg_3 map7Arg_4 map7Arg_5 map7Arg_6 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map7" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + , Type.var "f" + , Type.var "g" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "e" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "f" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "g" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ Elm.functionReduced + "map7Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_1_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_1_2_1_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + ((((((map7Arg_ + functionReducedUnpack + ) + functionReducedUnpack0 + ) + functionReducedUnpack_2_1_2_0_2_0_2_0_0 + ) + functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 + ) + functionReducedUnpack_2_1_2_1_2_1_2_0_2_0_2_0_0 + ) + functionReducedUnpack_2_1_2_1_2_1_2_1_2_0_2_0_2_0_0 + ) + ) + ) + ) + ) + ) + ) + , map7Arg_0 + , map7Arg_1 + , map7Arg_2 + , map7Arg_3 + , map7Arg_4 + , map7Arg_5 + , map7Arg_6 + ] + + +{-| map8: + (a -> b -> c -> d -> e -> f -> g -> h -> value) + -> Json.Decode.Decoder a + -> Json.Decode.Decoder b + -> Json.Decode.Decoder c + -> Json.Decode.Decoder d + -> Json.Decode.Decoder e + -> Json.Decode.Decoder f + -> Json.Decode.Decoder g + -> Json.Decode.Decoder h + -> Json.Decode.Decoder value +-} +map8 : + (Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map8 map8Arg_ map8Arg_0 map8Arg_1 map8Arg_2 map8Arg_3 map8Arg_4 map8Arg_5 map8Arg_6 map8Arg_7 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map8" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + , Type.var "f" + , Type.var "g" + , Type.var "h" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "e" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "f" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "g" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "h" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ Elm.functionReduced + "map8Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_1_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_1_2_1_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_1_2_1_2_1_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (((((((map8Arg_ + functionReducedUnpack + ) + functionReducedUnpack0 + ) + functionReducedUnpack_2_1_2_0_2_0_2_0_0 + ) + functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 + ) + functionReducedUnpack_2_1_2_1_2_1_2_0_2_0_2_0_0 + ) + functionReducedUnpack_2_1_2_1_2_1_2_1_2_0_2_0_2_0_0 + ) + functionReducedUnpack_2_1_2_1_2_1_2_1_2_1_2_0_2_0_2_0_0 + ) + ) + ) + ) + ) + ) + ) + ) + , map8Arg_0 + , map8Arg_1 + , map8Arg_2 + , map8Arg_3 + , map8Arg_4 + , map8Arg_5 + , map8Arg_6 + , map8Arg_7 + ] + + +{-| Sometimes you have JSON with recursive structure, like nested comments. +You can use `lazy` to make sure your decoder unrolls lazily. + + type alias Comment = + { message : String + , responses : Responses + } + + type Responses = Responses (List Comment) + + comment : Decoder Comment + comment = + map2 Comment + (field "message" string) + (field "responses" (map Responses (list (lazy (\_ -> comment))))) + +If we had said `list comment` instead, we would start expanding the value +infinitely. What is a `comment`? It is a decoder for objects where the +`responses` field contains comments. What is a `comment` though? Etc. + +By using `list (lazy (\_ -> comment))` we make sure the decoder only expands +to be as deep as the JSON we are given. You can read more about recursive data +structures [here][]. + +[here]: https://github.com/elm/compiler/blob/master/hints/recursive-alias.md + +lazy: (() -> Json.Decode.Decoder a) -> Json.Decode.Decoder a +-} +lazy : (Elm.Expression -> Elm.Expression) -> Elm.Expression +lazy lazyArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "lazy" + , annotation = + Just + (Type.function + [ Type.function + [ Type.unit ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ Elm.functionReduced "lazyUnpack" lazyArg_ ] + + +{-| Do not do anything with a JSON value, just bring it into Elm as a `Value`. +This can be useful if you have particularly complex data that you would like to +deal with later. Or if you are going to send it out a port and do not care +about its structure. + +value: Json.Decode.Decoder Json.Decode.Value +-} +value : Elm.Expression +value = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "value" + , annotation = + Just + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.namedWith [ "Json", "Decode" ] "Value" [] ] + ) + } + + +{-| Decode a `null` value into some Elm value. + + decodeString (null False) "null" == Ok False + decodeString (null 42) "null" == Ok 42 + decodeString (null 42) "42" == Err .. + decodeString (null 42) "false" == Err .. + +So if you ever see a `null`, this will return whatever value you specified. + +null: a -> Json.Decode.Decoder a +-} +null : Elm.Expression -> Elm.Expression +null nullArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "null" + , annotation = + Just + (Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ nullArg_ ] + + +{-| Ignore the JSON and produce a certain Elm value. + + decodeString (succeed 42) "true" == Ok 42 + decodeString (succeed 42) "[1,2,3]" == Ok 42 + decodeString (succeed 42) "hello" == Err ... -- this is not a valid JSON string + +This is handy when used with `oneOf` or `andThen`. + +succeed: a -> Json.Decode.Decoder a +-} +succeed : Elm.Expression -> Elm.Expression +succeed succeedArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "succeed" + , annotation = + Just + (Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ succeedArg_ ] + + +{-| Ignore the JSON and make the decoder fail. This is handy when used with +`oneOf` or `andThen` where you want to give a custom error message in some +case. + +See the [`andThen`](#andThen) docs for an example. + +fail: String -> Json.Decode.Decoder a +-} +fail : String -> Elm.Expression +fail failArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "fail" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ Elm.string failArg_ ] + + +{-| Create decoders that depend on previous results. If you are creating +versioned data, you might do something like this: + + info : Decoder Info + info = + field "version" int + |> andThen infoHelp + + infoHelp : Int -> Decoder Info + infoHelp version = + case version of + 4 -> + infoDecoder4 + + 3 -> + infoDecoder3 + + _ -> + fail <| + "Trying to decode info, but version " + ++ toString version ++ " is not supported." + + -- infoDecoder4 : Decoder Info + -- infoDecoder3 : Decoder Info + +andThen: (a -> Json.Decode.Decoder b) -> Json.Decode.Decoder a -> Json.Decode.Decoder b +-} +andThen : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +andThen andThenArg_ andThenArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "andThen" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + ) + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + ) + ) + } + ) + [ Elm.functionReduced "andThenUnpack" andThenArg_, andThenArg_0 ] + + +annotation_ : + { decoder : Type.Annotation -> Type.Annotation + , value : Type.Annotation + , error : Type.Annotation + } +annotation_ = + { decoder = + \decoderArg0 -> + Type.namedWith [ "Json", "Decode" ] "Decoder" [ decoderArg0 ] + , value = + Type.alias + moduleName_ + "Value" + [] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + , error = Type.namedWith [ "Json", "Decode" ] "Error" [] + } + + +make_ : + { field : Elm.Expression -> Elm.Expression -> Elm.Expression + , index : Elm.Expression -> Elm.Expression -> Elm.Expression + , oneOf : Elm.Expression -> Elm.Expression + , failure : Elm.Expression -> Elm.Expression -> Elm.Expression + } +make_ = + { field = + \ar0 ar1 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "Field" + , annotation = Just (Type.namedWith [] "Error" []) + } + ) + [ ar0, ar1 ] + , index = + \ar0 ar1 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "Index" + , annotation = Just (Type.namedWith [] "Error" []) + } + ) + [ ar0, ar1 ] + , oneOf = + \ar0 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "OneOf" + , annotation = Just (Type.namedWith [] "Error" []) + } + ) + [ ar0 ] + , failure = + \ar0 ar1 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "Failure" + , annotation = Just (Type.namedWith [] "Error" []) + } + ) + [ ar0, ar1 ] + } + + +caseOf_ = + { error = + \errorExpression errorTags -> + Elm.Case.custom + errorExpression + (Type.namedWith [ "Json", "Decode" ] "Error" []) + [ Elm.Case.branch + (Elm.Arg.customType "Field" errorTags.field |> Elm.Arg.item + (Elm.Arg.varWith + "arg_0" + Type.string + ) |> Elm.Arg.item + (Elm.Arg.varWith + "jsonDecodeError" + (Type.namedWith + [ "Json" + , "Decode" + ] + "Error" + [] + ) + ) + ) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Index" errorTags.index |> Elm.Arg.item + (Elm.Arg.varWith + "arg_0" + Type.int + ) |> Elm.Arg.item + (Elm.Arg.varWith + "jsonDecodeError" + (Type.namedWith + [ "Json" + , "Decode" + ] + "Error" + [] + ) + ) + ) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "OneOf" errorTags.oneOf |> Elm.Arg.item + (Elm.Arg.varWith + "arg_0" + (Type.list + (Type.namedWith + [ "Json" + , "Decode" + ] + "Error" + [] + ) + ) + ) + ) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType + "Failure" + errorTags.failure |> Elm.Arg.item + (Elm.Arg.varWith + "arg_0" + Type.string + ) |> Elm.Arg.item + (Elm.Arg.varWith + "jsonDecodeValue" + (Type.namedWith + [ "Json" + , "Decode" + ] + "Value" + [] + ) + ) + ) + Basics.identity + ] + } + + +call_ : + { nullable : Elm.Expression -> Elm.Expression + , list : Elm.Expression -> Elm.Expression + , array : Elm.Expression -> Elm.Expression + , dict : Elm.Expression -> Elm.Expression + , keyValuePairs : Elm.Expression -> Elm.Expression + , oneOrMore : Elm.Expression -> Elm.Expression -> Elm.Expression + , field : Elm.Expression -> Elm.Expression -> Elm.Expression + , at : Elm.Expression -> Elm.Expression -> Elm.Expression + , index : Elm.Expression -> Elm.Expression -> Elm.Expression + , maybe : Elm.Expression -> Elm.Expression + , oneOf : Elm.Expression -> Elm.Expression + , decodeString : Elm.Expression -> Elm.Expression -> Elm.Expression + , decodeValue : Elm.Expression -> Elm.Expression -> Elm.Expression + , errorToString : Elm.Expression -> Elm.Expression + , map : Elm.Expression -> Elm.Expression -> Elm.Expression + , map2 : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , map3 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , map4 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , map5 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , map6 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , map7 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , map8 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , lazy : Elm.Expression -> Elm.Expression + , null : Elm.Expression -> Elm.Expression + , succeed : Elm.Expression -> Elm.Expression + , fail : Elm.Expression -> Elm.Expression + , andThen : Elm.Expression -> Elm.Expression -> Elm.Expression + } +call_ = + { nullable = + \nullableArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "nullable" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.maybe (Type.var "a") ] + ) + ) + } + ) + [ nullableArg_ ] + , list = + \listArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "list" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.list (Type.var "a") ] + ) + ) + } + ) + [ listArg_ ] + , array = + \arrayArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "array" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.namedWith + [ "Array" ] + "Array" + [ Type.var "a" ] + ] + ) + ) + } + ) + [ arrayArg_ ] + , dict = + \dictArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "dict" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.string, Type.var "a" ] + ] + ) + ) + } + ) + [ dictArg_ ] + , keyValuePairs = + \keyValuePairsArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "keyValuePairs" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.list + (Type.tuple + Type.string + (Type.var "a") + ) + ] + ) + ) + } + ) + [ keyValuePairsArg_ ] + , oneOrMore = + \oneOrMoreArg_ oneOrMoreArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "oneOrMore" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.list (Type.var "a") ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ oneOrMoreArg_, oneOrMoreArg_0 ] + , field = + \fieldArg_ fieldArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "field" + , annotation = + Just + (Type.function + [ Type.string + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ fieldArg_, fieldArg_0 ] + , at = + \atArg_ atArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "at" + , annotation = + Just + (Type.function + [ Type.list Type.string + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ atArg_, atArg_0 ] + , index = + \indexArg_ indexArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "index" + , annotation = + Just + (Type.function + [ Type.int + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ indexArg_, indexArg_0 ] + , maybe = + \maybeArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "maybe" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.maybe (Type.var "a") ] + ) + ) + } + ) + [ maybeArg_ ] + , oneOf = + \oneOfArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "oneOf" + , annotation = + Just + (Type.function + [ Type.list + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ oneOfArg_ ] + , decodeString = + \decodeStringArg_ decodeStringArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "decodeString" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.string + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.namedWith + [ "Json", "Decode" ] + "Error" + [] + , Type.var "a" + ] + ) + ) + } + ) + [ decodeStringArg_, decodeStringArg_0 ] + , decodeValue = + \decodeValueArg_ decodeValueArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "decodeValue" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Value" + [] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.namedWith + [ "Json", "Decode" ] + "Error" + [] + , Type.var "a" + ] + ) + ) + } + ) + [ decodeValueArg_, decodeValueArg_0 ] + , errorToString = + \errorToStringArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "errorToString" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Error" + [] + ] + Type.string + ) + } + ) + [ errorToStringArg_ ] + , map = + \mapArg_ mapArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ mapArg_, mapArg_0 ] + , map2 = + \map2Arg_ map2Arg_0 map2Arg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ map2Arg_, map2Arg_0, map2Arg_1 ] + , map3 = + \map3Arg_ map3Arg_0 map3Arg_1 map3Arg_2 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ map3Arg_, map3Arg_0, map3Arg_1, map3Arg_2 ] + , map4 = + \map4Arg_ map4Arg_0 map4Arg_1 map4Arg_2 map4Arg_3 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ map4Arg_, map4Arg_0, map4Arg_1, map4Arg_2, map4Arg_3 ] + , map5 = + \map5Arg_ map5Arg_0 map5Arg_1 map5Arg_2 map5Arg_3 map5Arg_4 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "e" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ map5Arg_ + , map5Arg_0 + , map5Arg_1 + , map5Arg_2 + , map5Arg_3 + , map5Arg_4 + ] + , map6 = + \map6Arg_ map6Arg_0 map6Arg_1 map6Arg_2 map6Arg_3 map6Arg_4 map6Arg_5 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map6" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + , Type.var "f" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "e" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "f" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ map6Arg_ + , map6Arg_0 + , map6Arg_1 + , map6Arg_2 + , map6Arg_3 + , map6Arg_4 + , map6Arg_5 + ] + , map7 = + \map7Arg_ map7Arg_0 map7Arg_1 map7Arg_2 map7Arg_3 map7Arg_4 map7Arg_5 map7Arg_6 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map7" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + , Type.var "f" + , Type.var "g" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "e" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "f" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "g" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ map7Arg_ + , map7Arg_0 + , map7Arg_1 + , map7Arg_2 + , map7Arg_3 + , map7Arg_4 + , map7Arg_5 + , map7Arg_6 + ] + , map8 = + \map8Arg_ map8Arg_0 map8Arg_1 map8Arg_2 map8Arg_3 map8Arg_4 map8Arg_5 map8Arg_6 map8Arg_7 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map8" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + , Type.var "f" + , Type.var "g" + , Type.var "h" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "e" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "f" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "g" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "h" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + ) + [ map8Arg_ + , map8Arg_0 + , map8Arg_1 + , map8Arg_2 + , map8Arg_3 + , map8Arg_4 + , map8Arg_5 + , map8Arg_6 + , map8Arg_7 + ] + , lazy = + \lazyArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "lazy" + , annotation = + Just + (Type.function + [ Type.function + [ Type.unit ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ lazyArg_ ] + , null = + \nullArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "null" + , annotation = + Just + (Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ nullArg_ ] + , succeed = + \succeedArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "succeed" + , annotation = + Just + (Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ succeedArg_ ] + , fail = + \failArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "fail" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + ) + [ failArg_ ] + , andThen = + \andThenArg_ andThenArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "andThen" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + ) + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + ) + ) + } + ) + [ andThenArg_, andThenArg_0 ] + } + + +values_ : + { string : Elm.Expression + , bool : Elm.Expression + , int : Elm.Expression + , float : Elm.Expression + , nullable : Elm.Expression + , list : Elm.Expression + , array : Elm.Expression + , dict : Elm.Expression + , keyValuePairs : Elm.Expression + , oneOrMore : Elm.Expression + , field : Elm.Expression + , at : Elm.Expression + , index : Elm.Expression + , maybe : Elm.Expression + , oneOf : Elm.Expression + , decodeString : Elm.Expression + , decodeValue : Elm.Expression + , errorToString : Elm.Expression + , map : Elm.Expression + , map2 : Elm.Expression + , map3 : Elm.Expression + , map4 : Elm.Expression + , map5 : Elm.Expression + , map6 : Elm.Expression + , map7 : Elm.Expression + , map8 : Elm.Expression + , lazy : Elm.Expression + , value : Elm.Expression + , null : Elm.Expression + , succeed : Elm.Expression + , fail : Elm.Expression + , andThen : Elm.Expression + } +values_ = + { string = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "string" + , annotation = + Just + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.string ] + ) + } + , bool = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "bool" + , annotation = + Just + (Type.namedWith [ "Json", "Decode" ] "Decoder" [ Type.bool ] + ) + } + , int = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "int" + , annotation = + Just + (Type.namedWith [ "Json", "Decode" ] "Decoder" [ Type.int ]) + } + , float = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "float" + , annotation = + Just + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.float ] + ) + } + , nullable = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "nullable" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.maybe (Type.var "a") ] + ) + ) + } + , list = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "list" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.list (Type.var "a") ] + ) + ) + } + , array = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "array" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.namedWith + [ "Array" ] + "Array" + [ Type.var "a" ] + ] + ) + ) + } + , dict = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "dict" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.namedWith + [ "Dict" ] + "Dict" + [ Type.string, Type.var "a" ] + ] + ) + ) + } + , keyValuePairs = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "keyValuePairs" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.list + (Type.tuple Type.string (Type.var "a")) + ] + ) + ) + } + , oneOrMore = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "oneOrMore" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.list (Type.var "a") ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + , field = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "field" + , annotation = + Just + (Type.function + [ Type.string + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + , at = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "at" + , annotation = + Just + (Type.function + [ Type.list Type.string + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + , index = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "index" + , annotation = + Just + (Type.function + [ Type.int + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + , maybe = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "maybe" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.maybe (Type.var "a") ] + ) + ) + } + , oneOf = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "oneOf" + , annotation = + Just + (Type.function + [ Type.list + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + , decodeString = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "decodeString" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.string + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.namedWith [ "Json", "Decode" ] "Error" [] + , Type.var "a" + ] + ) + ) + } + , decodeValue = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "decodeValue" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith [ "Json", "Decode" ] "Value" [] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.namedWith [ "Json", "Decode" ] "Error" [] + , Type.var "a" + ] + ) + ) + } + , errorToString = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "errorToString" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Json", "Decode" ] "Error" [] ] + Type.string + ) + } + , map = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + , map2 = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + , map3 = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b", Type.var "c" ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + , map4 = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + , map5 = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "e" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + , map6 = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map6" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + , Type.var "f" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "e" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "f" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + , map7 = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map7" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + , Type.var "f" + , Type.var "g" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "e" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "f" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "g" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + , map8 = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "map8" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + , Type.var "f" + , Type.var "g" + , Type.var "h" + ] + (Type.var "value") + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "c" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "d" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "e" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "f" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "g" ] + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "h" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "value" ] + ) + ) + } + , lazy = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "lazy" + , annotation = + Just + (Type.function + [ Type.function + [ Type.unit ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + , value = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "value" + , annotation = + Just + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.namedWith [ "Json", "Decode" ] "Value" [] ] + ) + } + , null = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "null" + , annotation = + Just + (Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + , succeed = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "succeed" + , annotation = + Just + (Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + , fail = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "fail" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ) + ) + } + , andThen = + Elm.value + { importFrom = [ "Json", "Decode" ] + , name = "andThen" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + ) + , Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Decode" ] + "Decoder" + [ Type.var "b" ] + ) + ) + } + } \ No newline at end of file diff --git a/example-using-api/codegen/Gen/Json/Encode.elm b/example-using-api/codegen/Gen/Json/Encode.elm new file mode 100644 index 00000000..4386c425 --- /dev/null +++ b/example-using-api/codegen/Gen/Json/Encode.elm @@ -0,0 +1,789 @@ +module Gen.Json.Encode exposing + ( moduleName_, encode, string, int, float, bool + , null, list, array, set, object, dict, annotation_ + , call_, values_ + ) + +{-| +# Generated bindings for Json.Encode + +@docs moduleName_, encode, string, int, float, bool +@docs null, list, array, set, object, dict +@docs annotation_, call_, values_ +-} + + +import Elm +import Elm.Annotation as Type + + +{-| The name of this module. -} +moduleName_ : List String +moduleName_ = + [ "Json", "Encode" ] + + +{-| Convert a `Value` into a prettified string. The first argument specifies +the amount of indentation in the resulting string. + + import Json.Encode as Encode + + tom : Encode.Value + tom = + Encode.object + [ ( "name", Encode.string "Tom" ) + , ( "age", Encode.int 42 ) + ] + + compact = Encode.encode 0 tom + -- {"name":"Tom","age":42} + + readable = Encode.encode 4 tom + -- { + -- "name": "Tom", + -- "age": 42 + -- } + +encode: Int -> Json.Encode.Value -> String +-} +encode : Int -> Elm.Expression -> Elm.Expression +encode encodeArg_ encodeArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "encode" + , annotation = + Just + (Type.function + [ Type.int + , Type.namedWith [ "Json", "Encode" ] "Value" [] + ] + Type.string + ) + } + ) + [ Elm.int encodeArg_, encodeArg_0 ] + + +{-| Turn a `String` into a JSON string. + + import Json.Encode exposing (encode, string) + + -- encode 0 (string "") == "\"\"" + -- encode 0 (string "abc") == "\"abc\"" + -- encode 0 (string "hello") == "\"hello\"" + +string: String -> Json.Encode.Value +-} +string : String -> Elm.Expression +string stringArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "string" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + ) + [ Elm.string stringArg_ ] + + +{-| Turn an `Int` into a JSON number. + + import Json.Encode exposing (encode, int) + + -- encode 0 (int 42) == "42" + -- encode 0 (int -7) == "-7" + -- encode 0 (int 0) == "0" + +int: Int -> Json.Encode.Value +-} +int : Int -> Elm.Expression +int intArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "int" + , annotation = + Just + (Type.function + [ Type.int ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + ) + [ Elm.int intArg_ ] + + +{-| Turn a `Float` into a JSON number. + + import Json.Encode exposing (encode, float) + + -- encode 0 (float 3.14) == "3.14" + -- encode 0 (float 1.618) == "1.618" + -- encode 0 (float -42) == "-42" + -- encode 0 (float NaN) == "null" + -- encode 0 (float Infinity) == "null" + +**Note:** Floating point numbers are defined in the [IEEE 754 standard][ieee] +which is hardcoded into almost all CPUs. This standard allows `Infinity` and +`NaN`. [The JSON spec][json] does not include these values, so we encode them +both as `null`. + +[ieee]: https://en.wikipedia.org/wiki/IEEE_754 +[json]: https://www.json.org/ + +float: Float -> Json.Encode.Value +-} +float : Float -> Elm.Expression +float floatArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "float" + , annotation = + Just + (Type.function + [ Type.float ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + ) + [ Elm.float floatArg_ ] + + +{-| Turn a `Bool` into a JSON boolean. + + import Json.Encode exposing (encode, bool) + + -- encode 0 (bool True) == "true" + -- encode 0 (bool False) == "false" + +bool: Bool -> Json.Encode.Value +-} +bool : Bool -> Elm.Expression +bool boolArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "bool" + , annotation = + Just + (Type.function + [ Type.bool ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + ) + [ Elm.bool boolArg_ ] + + +{-| Create a JSON `null` value. + + import Json.Encode exposing (encode, null) + + -- encode 0 null == "null" + +null: Json.Encode.Value +-} +null : Elm.Expression +null = + Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "null" + , annotation = Just (Type.namedWith [ "Json", "Encode" ] "Value" []) + } + + +{-| Turn a `List` into a JSON array. + + import Json.Encode as Encode exposing (bool, encode, int, list, string) + + -- encode 0 (list int [1,3,4]) == "[1,3,4]" + -- encode 0 (list bool [True,False]) == "[true,false]" + -- encode 0 (list string ["a","b"]) == """["a","b"]""" + +list: (a -> Json.Encode.Value) -> List a -> Json.Encode.Value +-} +list : + (Elm.Expression -> Elm.Expression) -> List Elm.Expression -> Elm.Expression +list listArg_ listArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "list" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + , Type.list (Type.var "a") + ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + ) + [ Elm.functionReduced "listUnpack" listArg_, Elm.list listArg_0 ] + + +{-| Turn an `Array` into a JSON array. + +array: (a -> Json.Encode.Value) -> Array.Array a -> Json.Encode.Value +-} +array : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +array arrayArg_ arrayArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "array" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + , Type.namedWith [ "Array" ] "Array" [ Type.var "a" ] + ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + ) + [ Elm.functionReduced "arrayUnpack" arrayArg_, arrayArg_0 ] + + +{-| Turn an `Set` into a JSON array. + +set: (a -> Json.Encode.Value) -> Set.Set a -> Json.Encode.Value +-} +set : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +set setArg_ setArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "set" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + , Type.namedWith [ "Set" ] "Set" [ Type.var "a" ] + ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + ) + [ Elm.functionReduced "setUnpack" setArg_, setArg_0 ] + + +{-| Create a JSON object. + + import Json.Encode as Encode + + tom : Encode.Value + tom = + Encode.object + [ ( "name", Encode.string "Tom" ) + , ( "age", Encode.int 42 ) + ] + + -- Encode.encode 0 tom == """{"name":"Tom","age":42}""" + +object: List ( String, Json.Encode.Value ) -> Json.Encode.Value +-} +object : List Elm.Expression -> Elm.Expression +object objectArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "object" + , annotation = + Just + (Type.function + [ Type.list + (Type.tuple + Type.string + (Type.namedWith [ "Json", "Encode" ] "Value" [] + ) + ) + ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + ) + [ Elm.list objectArg_ ] + + +{-| Turn a `Dict` into a JSON object. + + import Dict exposing (Dict) + import Json.Encode as Encode + + people : Dict String Int + people = + Dict.fromList [ ("Tom",42), ("Sue", 38) ] + + -- Encode.encode 0 (Encode.dict identity Encode.int people) + -- == """{"Tom":42,"Sue":38}""" + +dict: (k -> String) -> (v -> Json.Encode.Value) -> Dict.Dict k v -> Json.Encode.Value +-} +dict : + (Elm.Expression -> Elm.Expression) + -> (Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression +dict dictArg_ dictArg_0 dictArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "dict" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "k" ] Type.string + , Type.function + [ Type.var "v" ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + ) + [ Elm.functionReduced "dictUnpack" dictArg_ + , Elm.functionReduced "dictUnpack" dictArg_0 + , dictArg_1 + ] + + +annotation_ : { value : Type.Annotation } +annotation_ = + { value = Type.namedWith [ "Json", "Encode" ] "Value" [] } + + +call_ : + { encode : Elm.Expression -> Elm.Expression -> Elm.Expression + , string : Elm.Expression -> Elm.Expression + , int : Elm.Expression -> Elm.Expression + , float : Elm.Expression -> Elm.Expression + , bool : Elm.Expression -> Elm.Expression + , list : Elm.Expression -> Elm.Expression -> Elm.Expression + , array : Elm.Expression -> Elm.Expression -> Elm.Expression + , set : Elm.Expression -> Elm.Expression -> Elm.Expression + , object : Elm.Expression -> Elm.Expression + , dict : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + } +call_ = + { encode = + \encodeArg_ encodeArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "encode" + , annotation = + Just + (Type.function + [ Type.int + , Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ] + Type.string + ) + } + ) + [ encodeArg_, encodeArg_0 ] + , string = + \stringArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "string" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + ) + } + ) + [ stringArg_ ] + , int = + \intArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "int" + , annotation = + Just + (Type.function + [ Type.int ] + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + ) + } + ) + [ intArg_ ] + , float = + \floatArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "float" + , annotation = + Just + (Type.function + [ Type.float ] + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + ) + } + ) + [ floatArg_ ] + , bool = + \boolArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "bool" + , annotation = + Just + (Type.function + [ Type.bool ] + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + ) + } + ) + [ boolArg_ ] + , list = + \listArg_ listArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "list" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + , Type.list (Type.var "a") + ] + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + ) + } + ) + [ listArg_, listArg_0 ] + , array = + \arrayArg_ arrayArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "array" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + , Type.namedWith + [ "Array" ] + "Array" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + ) + } + ) + [ arrayArg_, arrayArg_0 ] + , set = + \setArg_ setArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "set" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + , Type.namedWith + [ "Set" ] + "Set" + [ Type.var "a" ] + ] + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + ) + } + ) + [ setArg_, setArg_0 ] + , object = + \objectArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "object" + , annotation = + Just + (Type.function + [ Type.list + (Type.tuple + Type.string + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + ) + ] + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + ) + } + ) + [ objectArg_ ] + , dict = + \dictArg_ dictArg_0 dictArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "dict" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "k" ] Type.string + , Type.function + [ Type.var "v" ] + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.namedWith + [ "Json", "Encode" ] + "Value" + [] + ) + ) + } + ) + [ dictArg_, dictArg_0, dictArg_1 ] + } + + +values_ : + { encode : Elm.Expression + , string : Elm.Expression + , int : Elm.Expression + , float : Elm.Expression + , bool : Elm.Expression + , null : Elm.Expression + , list : Elm.Expression + , array : Elm.Expression + , set : Elm.Expression + , object : Elm.Expression + , dict : Elm.Expression + } +values_ = + { encode = + Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "encode" + , annotation = + Just + (Type.function + [ Type.int + , Type.namedWith [ "Json", "Encode" ] "Value" [] + ] + Type.string + ) + } + , string = + Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "string" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + , int = + Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "int" + , annotation = + Just + (Type.function + [ Type.int ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + , float = + Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "float" + , annotation = + Just + (Type.function + [ Type.float ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + , bool = + Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "bool" + , annotation = + Just + (Type.function + [ Type.bool ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + , null = + Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "null" + , annotation = Just (Type.namedWith [ "Json", "Encode" ] "Value" []) + } + , list = + Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "list" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + , Type.list (Type.var "a") + ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + , array = + Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "array" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + , Type.namedWith [ "Array" ] "Array" [ Type.var "a" ] + ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + , set = + Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "set" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + , Type.namedWith [ "Set" ] "Set" [ Type.var "a" ] + ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + , object = + Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "object" + , annotation = + Just + (Type.function + [ Type.list + (Type.tuple + Type.string + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + , dict = + Elm.value + { importFrom = [ "Json", "Encode" ] + , name = "dict" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "k" ] Type.string + , Type.function + [ Type.var "v" ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + , Type.namedWith + [ "Dict" ] + "Dict" + [ Type.var "k", Type.var "v" ] + ] + (Type.namedWith [ "Json", "Encode" ] "Value" []) + ) + } + } \ No newline at end of file diff --git a/example-using-api/codegen/Gen/List.elm b/example-using-api/codegen/Gen/List.elm new file mode 100644 index 00000000..fb6c7c39 --- /dev/null +++ b/example-using-api/codegen/Gen/List.elm @@ -0,0 +1,2378 @@ +module Gen.List exposing + ( moduleName_, singleton, repeat, range, map, indexedMap + , foldl, foldr, filter, filterMap, length, reverse, member + , all, any, maximum, minimum, sum, product, append + , concat, concatMap, intersperse, map2, map3, map4, map5 + , sort, sortBy, sortWith, isEmpty, head, tail, take + , drop, partition, unzip, call_, values_ + ) + +{-| +# Generated bindings for List + +@docs moduleName_, singleton, repeat, range, map, indexedMap +@docs foldl, foldr, filter, filterMap, length, reverse +@docs member, all, any, maximum, minimum, sum +@docs product, append, concat, concatMap, intersperse, map2 +@docs map3, map4, map5, sort, sortBy, sortWith +@docs isEmpty, head, tail, take, drop, partition +@docs unzip, call_, values_ +-} + + +import Elm +import Elm.Annotation as Type + + +{-| The name of this module. -} +moduleName_ : List String +moduleName_ = + [ "List" ] + + +{-| Create a list with only one element: + + singleton 1234 == [1234] + singleton "hi" == ["hi"] + +singleton: a -> List a +-} +singleton : Elm.Expression -> Elm.Expression +singleton singletonArg_ = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "singleton" + , annotation = + Just + (Type.function [ Type.var "a" ] (Type.list (Type.var "a"))) + } + ) + [ singletonArg_ ] + + +{-| Create a list with *n* copies of a value: + + repeat 3 (0,0) == [(0,0),(0,0),(0,0)] + +repeat: Int -> a -> List a +-} +repeat : Int -> Elm.Expression -> Elm.Expression +repeat repeatArg_ repeatArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "repeat" + , annotation = + Just + (Type.function + [ Type.int, Type.var "a" ] + (Type.list (Type.var "a")) + ) + } + ) + [ Elm.int repeatArg_, repeatArg_0 ] + + +{-| Create a list of numbers, every element increasing by one. +You give the lowest and highest number that should be in the list. + + range 3 6 == [3, 4, 5, 6] + range 3 3 == [3] + range 6 3 == [] + +range: Int -> Int -> List Int +-} +range : Int -> Int -> Elm.Expression +range rangeArg_ rangeArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "range" + , annotation = + Just + (Type.function [ Type.int, Type.int ] (Type.list Type.int)) + } + ) + [ Elm.int rangeArg_, Elm.int rangeArg_0 ] + + +{-| Apply a function to every element of a list. + + map sqrt [1,4,9] == [1,2,3] + + map not [True,False,True] == [False,True,False] + +So `map func [ a, b, c ]` is the same as `[ func a, func b, func c ]` + +map: (a -> b) -> List a -> List b +-} +map : + (Elm.Expression -> Elm.Expression) -> List Elm.Expression -> Elm.Expression +map mapArg_ mapArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] (Type.var "b") + , Type.list (Type.var "a") + ] + (Type.list (Type.var "b")) + ) + } + ) + [ Elm.functionReduced "mapUnpack" mapArg_, Elm.list mapArg_0 ] + + +{-| Same as `map` but the function is also applied to the index of each +element (starting at zero). + + indexedMap Tuple.pair ["Tom","Sue","Bob"] == [ (0,"Tom"), (1,"Sue"), (2,"Bob") ] + +indexedMap: (Int -> a -> b) -> List a -> List b +-} +indexedMap : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> List Elm.Expression + -> Elm.Expression +indexedMap indexedMapArg_ indexedMapArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "indexedMap" + , annotation = + Just + (Type.function + [ Type.function + [ Type.int, Type.var "a" ] + (Type.var "b") + , Type.list (Type.var "a") + ] + (Type.list (Type.var "b")) + ) + } + ) + [ Elm.functionReduced + "indexedMapUnpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (indexedMapArg_ functionReducedUnpack) + ) + , Elm.list indexedMapArg_0 + ] + + +{-| Reduce a list from the left. + + foldl (+) 0 [1,2,3] == 6 + foldl (::) [] [1,2,3] == [3,2,1] + +So `foldl step state [1,2,3]` is like saying: + + state + |> step 1 + |> step 2 + |> step 3 + +foldl: (a -> b -> b) -> b -> List a -> b +-} +foldl : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> List Elm.Expression + -> Elm.Expression +foldl foldlArg_ foldlArg_0 foldlArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "foldl" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.list (Type.var "a") + ] + (Type.var "b") + ) + } + ) + [ Elm.functionReduced + "foldlUnpack" + (\functionReducedUnpack -> + Elm.functionReduced "unpack" (foldlArg_ functionReducedUnpack) + ) + , foldlArg_0 + , Elm.list foldlArg_1 + ] + + +{-| Reduce a list from the right. + + foldr (+) 0 [1,2,3] == 6 + foldr (::) [] [1,2,3] == [1,2,3] + +So `foldr step state [1,2,3]` is like saying: + + state + |> step 3 + |> step 2 + |> step 1 + +foldr: (a -> b -> b) -> b -> List a -> b +-} +foldr : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> List Elm.Expression + -> Elm.Expression +foldr foldrArg_ foldrArg_0 foldrArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "foldr" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.list (Type.var "a") + ] + (Type.var "b") + ) + } + ) + [ Elm.functionReduced + "foldrUnpack" + (\functionReducedUnpack -> + Elm.functionReduced "unpack" (foldrArg_ functionReducedUnpack) + ) + , foldrArg_0 + , Elm.list foldrArg_1 + ] + + +{-| Keep elements that satisfy the test. + + filter isEven [1,2,3,4,5,6] == [2,4,6] + +filter: (a -> Bool) -> List a -> List a +-} +filter : + (Elm.Expression -> Elm.Expression) -> List Elm.Expression -> Elm.Expression +filter filterArg_ filterArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "filter" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] Type.bool + , Type.list (Type.var "a") + ] + (Type.list (Type.var "a")) + ) + } + ) + [ Elm.functionReduced "filterUnpack" filterArg_, Elm.list filterArg_0 ] + + +{-| Filter out certain values. For example, maybe you have a bunch of strings +from an untrusted source and you want to turn them into numbers: + + numbers : List Int + numbers = + filterMap String.toInt ["3", "hi", "12", "4th", "May"] + + -- numbers == [3, 12] + +filterMap: (a -> Maybe b) -> List a -> List b +-} +filterMap : + (Elm.Expression -> Elm.Expression) -> List Elm.Expression -> Elm.Expression +filterMap filterMapArg_ filterMapArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "filterMap" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.maybe (Type.var "b")) + , Type.list (Type.var "a") + ] + (Type.list (Type.var "b")) + ) + } + ) + [ Elm.functionReduced "filterMapUnpack" filterMapArg_ + , Elm.list filterMapArg_0 + ] + + +{-| Determine the length of a list. + + length [1,2,3] == 3 + +length: List a -> Int +-} +length : List Elm.Expression -> Elm.Expression +length lengthArg_ = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "length" + , annotation = + Just (Type.function [ Type.list (Type.var "a") ] Type.int) + } + ) + [ Elm.list lengthArg_ ] + + +{-| Reverse a list. + + reverse [1,2,3,4] == [4,3,2,1] + +reverse: List a -> List a +-} +reverse : List Elm.Expression -> Elm.Expression +reverse reverseArg_ = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "reverse" + , annotation = + Just + (Type.function + [ Type.list (Type.var "a") ] + (Type.list (Type.var "a")) + ) + } + ) + [ Elm.list reverseArg_ ] + + +{-| Figure out whether a list contains a value. + + member 9 [1,2,3,4] == False + member 4 [1,2,3,4] == True + +member: a -> List a -> Bool +-} +member : Elm.Expression -> List Elm.Expression -> Elm.Expression +member memberArg_ memberArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "member" + , annotation = + Just + (Type.function + [ Type.var "a", Type.list (Type.var "a") ] + Type.bool + ) + } + ) + [ memberArg_, Elm.list memberArg_0 ] + + +{-| Determine if all elements satisfy some test. + + all isEven [2,4] == True + all isEven [2,3] == False + all isEven [] == True + +all: (a -> Bool) -> List a -> Bool +-} +all : + (Elm.Expression -> Elm.Expression) -> List Elm.Expression -> Elm.Expression +all allArg_ allArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "all" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] Type.bool + , Type.list (Type.var "a") + ] + Type.bool + ) + } + ) + [ Elm.functionReduced "allUnpack" allArg_, Elm.list allArg_0 ] + + +{-| Determine if any elements satisfy some test. + + any isEven [2,3] == True + any isEven [1,3] == False + any isEven [] == False + +any: (a -> Bool) -> List a -> Bool +-} +any : + (Elm.Expression -> Elm.Expression) -> List Elm.Expression -> Elm.Expression +any anyArg_ anyArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "any" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] Type.bool + , Type.list (Type.var "a") + ] + Type.bool + ) + } + ) + [ Elm.functionReduced "anyUnpack" anyArg_, Elm.list anyArg_0 ] + + +{-| Find the maximum element in a non-empty list. + + maximum [1,4,2] == Just 4 + maximum [] == Nothing + +maximum: List comparable -> Maybe comparable +-} +maximum : List Elm.Expression -> Elm.Expression +maximum maximumArg_ = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "maximum" + , annotation = + Just + (Type.function + [ Type.list (Type.var "comparable") ] + (Type.maybe (Type.var "comparable")) + ) + } + ) + [ Elm.list maximumArg_ ] + + +{-| Find the minimum element in a non-empty list. + + minimum [3,2,1] == Just 1 + minimum [] == Nothing + +minimum: List comparable -> Maybe comparable +-} +minimum : List Elm.Expression -> Elm.Expression +minimum minimumArg_ = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "minimum" + , annotation = + Just + (Type.function + [ Type.list (Type.var "comparable") ] + (Type.maybe (Type.var "comparable")) + ) + } + ) + [ Elm.list minimumArg_ ] + + +{-| Get the sum of the list elements. + + sum [1,2,3] == 6 + sum [1,1,1] == 3 + sum [] == 0 + +sum: List number -> number +-} +sum : List Elm.Expression -> Elm.Expression +sum sumArg_ = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "sum" + , annotation = + Just + (Type.function + [ Type.list (Type.var "number") ] + (Type.var "number") + ) + } + ) + [ Elm.list sumArg_ ] + + +{-| Get the product of the list elements. + + product [2,2,2] == 8 + product [3,3,3] == 27 + product [] == 1 + +product: List number -> number +-} +product : List Elm.Expression -> Elm.Expression +product productArg_ = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "product" + , annotation = + Just + (Type.function + [ Type.list (Type.var "number") ] + (Type.var "number") + ) + } + ) + [ Elm.list productArg_ ] + + +{-| Put two lists together. + + append [1,1,2] [3,5,8] == [1,1,2,3,5,8] + append ['a','b'] ['c'] == ['a','b','c'] + +You can also use [the `(++)` operator](Basics#++) to append lists. + +append: List a -> List a -> List a +-} +append : List Elm.Expression -> List Elm.Expression -> Elm.Expression +append appendArg_ appendArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "append" + , annotation = + Just + (Type.function + [ Type.list (Type.var "a"), Type.list (Type.var "a") ] + (Type.list (Type.var "a")) + ) + } + ) + [ Elm.list appendArg_, Elm.list appendArg_0 ] + + +{-| Concatenate a bunch of lists into a single list: + + concat [[1,2],[3],[4,5]] == [1,2,3,4,5] + +concat: List (List a) -> List a +-} +concat : List (List Elm.Expression) -> Elm.Expression +concat concatArg_ = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "concat" + , annotation = + Just + (Type.function + [ Type.list (Type.list (Type.var "a")) ] + (Type.list (Type.var "a")) + ) + } + ) + [ Elm.list (List.map Elm.list concatArg_) ] + + +{-| Map a given function onto a list and flatten the resulting lists. + + concatMap f xs == concat (map f xs) + +concatMap: (a -> List b) -> List a -> List b +-} +concatMap : + (Elm.Expression -> Elm.Expression) -> List Elm.Expression -> Elm.Expression +concatMap concatMapArg_ concatMapArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "concatMap" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.list (Type.var "b")) + , Type.list (Type.var "a") + ] + (Type.list (Type.var "b")) + ) + } + ) + [ Elm.functionReduced "concatMapUnpack" concatMapArg_ + , Elm.list concatMapArg_0 + ] + + +{-| Places the given value between all members of the given list. + + intersperse "on" ["turtles","turtles","turtles"] == ["turtles","on","turtles","on","turtles"] + +intersperse: a -> List a -> List a +-} +intersperse : Elm.Expression -> List Elm.Expression -> Elm.Expression +intersperse intersperseArg_ intersperseArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "intersperse" + , annotation = + Just + (Type.function + [ Type.var "a", Type.list (Type.var "a") ] + (Type.list (Type.var "a")) + ) + } + ) + [ intersperseArg_, Elm.list intersperseArg_0 ] + + +{-| Combine two lists, combining them with the given function. +If one list is longer, the extra elements are dropped. + + totals : List Int -> List Int -> List Int + totals xs ys = + List.map2 (+) xs ys + + -- totals [1,2,3] [4,5,6] == [5,7,9] + + pairs : List a -> List b -> List (a,b) + pairs xs ys = + List.map2 Tuple.pair xs ys + + -- pairs ["alice","bob","chuck"] [2,5,7,8] + -- == [("alice",2),("bob",5),("chuck",7)] + +map2: (a -> b -> result) -> List a -> List b -> List result +-} +map2 : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> List Elm.Expression + -> List Elm.Expression + -> Elm.Expression +map2 map2Arg_ map2Arg_0 map2Arg_1 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "result") + , Type.list (Type.var "a") + , Type.list (Type.var "b") + ] + (Type.list (Type.var "result")) + ) + } + ) + [ Elm.functionReduced + "map2Unpack" + (\functionReducedUnpack -> + Elm.functionReduced "unpack" (map2Arg_ functionReducedUnpack) + ) + , Elm.list map2Arg_0 + , Elm.list map2Arg_1 + ] + + +{-| map3: (a -> b -> c -> result) -> List a -> List b -> List c -> List result -} +map3 : + (Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression) + -> List Elm.Expression + -> List Elm.Expression + -> List Elm.Expression + -> Elm.Expression +map3 map3Arg_ map3Arg_0 map3Arg_1 map3Arg_2 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b", Type.var "c" ] + (Type.var "result") + , Type.list (Type.var "a") + , Type.list (Type.var "b") + , Type.list (Type.var "c") + ] + (Type.list (Type.var "result")) + ) + } + ) + [ Elm.functionReduced + "map3Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + ((map3Arg_ functionReducedUnpack) + functionReducedUnpack0 + ) + ) + ) + , Elm.list map3Arg_0 + , Elm.list map3Arg_1 + , Elm.list map3Arg_2 + ] + + +{-| map4: + (a -> b -> c -> d -> result) + -> List a + -> List b + -> List c + -> List d + -> List result +-} +map4 : + (Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression) + -> List Elm.Expression + -> List Elm.Expression + -> List Elm.Expression + -> List Elm.Expression + -> Elm.Expression +map4 map4Arg_ map4Arg_0 map4Arg_1 map4Arg_2 map4Arg_3 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "result") + , Type.list (Type.var "a") + , Type.list (Type.var "b") + , Type.list (Type.var "c") + , Type.list (Type.var "d") + ] + (Type.list (Type.var "result")) + ) + } + ) + [ Elm.functionReduced + "map4Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (((map4Arg_ functionReducedUnpack) + functionReducedUnpack0 + ) + functionReducedUnpack_2_1_2_0_2_0_2_0_0 + ) + ) + ) + ) + , Elm.list map4Arg_0 + , Elm.list map4Arg_1 + , Elm.list map4Arg_2 + , Elm.list map4Arg_3 + ] + + +{-| map5: + (a -> b -> c -> d -> e -> result) + -> List a + -> List b + -> List c + -> List d + -> List e + -> List result +-} +map5 : + (Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression) + -> List Elm.Expression + -> List Elm.Expression + -> List Elm.Expression + -> List Elm.Expression + -> List Elm.Expression + -> Elm.Expression +map5 map5Arg_ map5Arg_0 map5Arg_1 map5Arg_2 map5Arg_3 map5Arg_4 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "result") + , Type.list (Type.var "a") + , Type.list (Type.var "b") + , Type.list (Type.var "c") + , Type.list (Type.var "d") + , Type.list (Type.var "e") + ] + (Type.list (Type.var "result")) + ) + } + ) + [ Elm.functionReduced + "map5Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + ((((map5Arg_ functionReducedUnpack + ) + functionReducedUnpack0 + ) + functionReducedUnpack_2_1_2_0_2_0_2_0_0 + ) + functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 + ) + ) + ) + ) + ) + , Elm.list map5Arg_0 + , Elm.list map5Arg_1 + , Elm.list map5Arg_2 + , Elm.list map5Arg_3 + , Elm.list map5Arg_4 + ] + + +{-| Sort values from lowest to highest + + sort [3,1,5] == [1,3,5] + +sort: List comparable -> List comparable +-} +sort : List Elm.Expression -> Elm.Expression +sort sortArg_ = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "sort" + , annotation = + Just + (Type.function + [ Type.list (Type.var "comparable") ] + (Type.list (Type.var "comparable")) + ) + } + ) + [ Elm.list sortArg_ ] + + +{-| Sort values by a derived property. + + alice = { name="Alice", height=1.62 } + bob = { name="Bob" , height=1.85 } + chuck = { name="Chuck", height=1.76 } + + sortBy .name [chuck,alice,bob] == [alice,bob,chuck] + sortBy .height [chuck,alice,bob] == [alice,chuck,bob] + + sortBy String.length ["mouse","cat"] == ["cat","mouse"] + +sortBy: (a -> comparable) -> List a -> List a +-} +sortBy : + (Elm.Expression -> Elm.Expression) -> List Elm.Expression -> Elm.Expression +sortBy sortByArg_ sortByArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "sortBy" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.var "comparable") + , Type.list (Type.var "a") + ] + (Type.list (Type.var "a")) + ) + } + ) + [ Elm.functionReduced "sortByUnpack" sortByArg_, Elm.list sortByArg_0 ] + + +{-| Sort values with a custom comparison function. + + sortWith flippedComparison [1,2,3,4,5] == [5,4,3,2,1] + + flippedComparison a b = + case compare a b of + LT -> GT + EQ -> EQ + GT -> LT + +This is also the most general sort function, allowing you +to define any other: `sort == sortWith compare` + +sortWith: (a -> a -> Basics.Order) -> List a -> List a +-} +sortWith : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> List Elm.Expression + -> Elm.Expression +sortWith sortWithArg_ sortWithArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "sortWith" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "a" ] + (Type.namedWith [ "Basics" ] "Order" []) + , Type.list (Type.var "a") + ] + (Type.list (Type.var "a")) + ) + } + ) + [ Elm.functionReduced + "sortWithUnpack" + (\functionReducedUnpack -> + Elm.functionReduced "unpack" (sortWithArg_ functionReducedUnpack) + ) + , Elm.list sortWithArg_0 + ] + + +{-| Determine if a list is empty. + + isEmpty [] == True + +**Note:** It is usually preferable to use a `case` to test this so you do not +forget to handle the `(x :: xs)` case as well! + +isEmpty: List a -> Bool +-} +isEmpty : List Elm.Expression -> Elm.Expression +isEmpty isEmptyArg_ = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "isEmpty" + , annotation = + Just (Type.function [ Type.list (Type.var "a") ] Type.bool) + } + ) + [ Elm.list isEmptyArg_ ] + + +{-| Extract the first element of a list. + + head [1,2,3] == Just 1 + head [] == Nothing + +**Note:** It is usually preferable to use a `case` to deconstruct a `List` +because it gives you `(x :: xs)` and you can work with both subparts. + +head: List a -> Maybe a +-} +head : List Elm.Expression -> Elm.Expression +head headArg_ = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "head" + , annotation = + Just + (Type.function + [ Type.list (Type.var "a") ] + (Type.maybe (Type.var "a")) + ) + } + ) + [ Elm.list headArg_ ] + + +{-| Extract the rest of the list. + + tail [1,2,3] == Just [2,3] + tail [] == Nothing + +**Note:** It is usually preferable to use a `case` to deconstruct a `List` +because it gives you `(x :: xs)` and you can work with both subparts. + +tail: List a -> Maybe (List a) +-} +tail : List Elm.Expression -> Elm.Expression +tail tailArg_ = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "tail" + , annotation = + Just + (Type.function + [ Type.list (Type.var "a") ] + (Type.maybe (Type.list (Type.var "a"))) + ) + } + ) + [ Elm.list tailArg_ ] + + +{-| Take the first *n* members of a list. + + take 2 [1,2,3,4] == [1,2] + +take: Int -> List a -> List a +-} +take : Int -> List Elm.Expression -> Elm.Expression +take takeArg_ takeArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "take" + , annotation = + Just + (Type.function + [ Type.int, Type.list (Type.var "a") ] + (Type.list (Type.var "a")) + ) + } + ) + [ Elm.int takeArg_, Elm.list takeArg_0 ] + + +{-| Drop the first *n* members of a list. + + drop 2 [1,2,3,4] == [3,4] + +drop: Int -> List a -> List a +-} +drop : Int -> List Elm.Expression -> Elm.Expression +drop dropArg_ dropArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "drop" + , annotation = + Just + (Type.function + [ Type.int, Type.list (Type.var "a") ] + (Type.list (Type.var "a")) + ) + } + ) + [ Elm.int dropArg_, Elm.list dropArg_0 ] + + +{-| Partition a list based on some test. The first list contains all values +that satisfy the test, and the second list contains all the value that do not. + + partition (\x -> x < 3) [0,1,2,3,4,5] == ([0,1,2], [3,4,5]) + partition isEven [0,1,2,3,4,5] == ([0,2,4], [1,3,5]) + +partition: (a -> Bool) -> List a -> ( List a, List a ) +-} +partition : + (Elm.Expression -> Elm.Expression) -> List Elm.Expression -> Elm.Expression +partition partitionArg_ partitionArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "partition" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] Type.bool + , Type.list (Type.var "a") + ] + (Type.tuple + (Type.list (Type.var "a")) + (Type.list (Type.var "a")) + ) + ) + } + ) + [ Elm.functionReduced "partitionUnpack" partitionArg_ + , Elm.list partitionArg_0 + ] + + +{-| Decompose a list of tuples into a tuple of lists. + + unzip [(0, True), (17, False), (1337, True)] == ([0,17,1337], [True,False,True]) + +unzip: List ( a, b ) -> ( List a, List b ) +-} +unzip : List Elm.Expression -> Elm.Expression +unzip unzipArg_ = + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "unzip" + , annotation = + Just + (Type.function + [ Type.list (Type.tuple (Type.var "a") (Type.var "b")) + ] + (Type.tuple + (Type.list (Type.var "a")) + (Type.list (Type.var "b")) + ) + ) + } + ) + [ Elm.list unzipArg_ ] + + +call_ : + { singleton : Elm.Expression -> Elm.Expression + , repeat : Elm.Expression -> Elm.Expression -> Elm.Expression + , range : Elm.Expression -> Elm.Expression -> Elm.Expression + , map : Elm.Expression -> Elm.Expression -> Elm.Expression + , indexedMap : Elm.Expression -> Elm.Expression -> Elm.Expression + , foldl : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , foldr : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , filter : Elm.Expression -> Elm.Expression -> Elm.Expression + , filterMap : Elm.Expression -> Elm.Expression -> Elm.Expression + , length : Elm.Expression -> Elm.Expression + , reverse : Elm.Expression -> Elm.Expression + , member : Elm.Expression -> Elm.Expression -> Elm.Expression + , all : Elm.Expression -> Elm.Expression -> Elm.Expression + , any : Elm.Expression -> Elm.Expression -> Elm.Expression + , maximum : Elm.Expression -> Elm.Expression + , minimum : Elm.Expression -> Elm.Expression + , sum : Elm.Expression -> Elm.Expression + , product : Elm.Expression -> Elm.Expression + , append : Elm.Expression -> Elm.Expression -> Elm.Expression + , concat : Elm.Expression -> Elm.Expression + , concatMap : Elm.Expression -> Elm.Expression -> Elm.Expression + , intersperse : Elm.Expression -> Elm.Expression -> Elm.Expression + , map2 : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , map3 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , map4 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , map5 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , sort : Elm.Expression -> Elm.Expression + , sortBy : Elm.Expression -> Elm.Expression -> Elm.Expression + , sortWith : Elm.Expression -> Elm.Expression -> Elm.Expression + , isEmpty : Elm.Expression -> Elm.Expression + , head : Elm.Expression -> Elm.Expression + , tail : Elm.Expression -> Elm.Expression + , take : Elm.Expression -> Elm.Expression -> Elm.Expression + , drop : Elm.Expression -> Elm.Expression -> Elm.Expression + , partition : Elm.Expression -> Elm.Expression -> Elm.Expression + , unzip : Elm.Expression -> Elm.Expression + } +call_ = + { singleton = + \singletonArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "singleton" + , annotation = + Just + (Type.function + [ Type.var "a" ] + (Type.list (Type.var "a")) + ) + } + ) + [ singletonArg_ ] + , repeat = + \repeatArg_ repeatArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "repeat" + , annotation = + Just + (Type.function + [ Type.int, Type.var "a" ] + (Type.list (Type.var "a")) + ) + } + ) + [ repeatArg_, repeatArg_0 ] + , range = + \rangeArg_ rangeArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "range" + , annotation = + Just + (Type.function + [ Type.int, Type.int ] + (Type.list Type.int) + ) + } + ) + [ rangeArg_, rangeArg_0 ] + , map = + \mapArg_ mapArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.var "b") + , Type.list (Type.var "a") + ] + (Type.list (Type.var "b")) + ) + } + ) + [ mapArg_, mapArg_0 ] + , indexedMap = + \indexedMapArg_ indexedMapArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "indexedMap" + , annotation = + Just + (Type.function + [ Type.function + [ Type.int, Type.var "a" ] + (Type.var "b") + , Type.list (Type.var "a") + ] + (Type.list (Type.var "b")) + ) + } + ) + [ indexedMapArg_, indexedMapArg_0 ] + , foldl = + \foldlArg_ foldlArg_0 foldlArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "foldl" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.list (Type.var "a") + ] + (Type.var "b") + ) + } + ) + [ foldlArg_, foldlArg_0, foldlArg_1 ] + , foldr = + \foldrArg_ foldrArg_0 foldrArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "foldr" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.list (Type.var "a") + ] + (Type.var "b") + ) + } + ) + [ foldrArg_, foldrArg_0, foldrArg_1 ] + , filter = + \filterArg_ filterArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "filter" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] Type.bool + , Type.list (Type.var "a") + ] + (Type.list (Type.var "a")) + ) + } + ) + [ filterArg_, filterArg_0 ] + , filterMap = + \filterMapArg_ filterMapArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "filterMap" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.maybe (Type.var "b")) + , Type.list (Type.var "a") + ] + (Type.list (Type.var "b")) + ) + } + ) + [ filterMapArg_, filterMapArg_0 ] + , length = + \lengthArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "length" + , annotation = + Just + (Type.function + [ Type.list (Type.var "a") ] + Type.int + ) + } + ) + [ lengthArg_ ] + , reverse = + \reverseArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "reverse" + , annotation = + Just + (Type.function + [ Type.list (Type.var "a") ] + (Type.list (Type.var "a")) + ) + } + ) + [ reverseArg_ ] + , member = + \memberArg_ memberArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "member" + , annotation = + Just + (Type.function + [ Type.var "a", Type.list (Type.var "a") ] + Type.bool + ) + } + ) + [ memberArg_, memberArg_0 ] + , all = + \allArg_ allArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "all" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] Type.bool + , Type.list (Type.var "a") + ] + Type.bool + ) + } + ) + [ allArg_, allArg_0 ] + , any = + \anyArg_ anyArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "any" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] Type.bool + , Type.list (Type.var "a") + ] + Type.bool + ) + } + ) + [ anyArg_, anyArg_0 ] + , maximum = + \maximumArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "maximum" + , annotation = + Just + (Type.function + [ Type.list (Type.var "comparable") ] + (Type.maybe (Type.var "comparable")) + ) + } + ) + [ maximumArg_ ] + , minimum = + \minimumArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "minimum" + , annotation = + Just + (Type.function + [ Type.list (Type.var "comparable") ] + (Type.maybe (Type.var "comparable")) + ) + } + ) + [ minimumArg_ ] + , sum = + \sumArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "sum" + , annotation = + Just + (Type.function + [ Type.list (Type.var "number") ] + (Type.var "number") + ) + } + ) + [ sumArg_ ] + , product = + \productArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "product" + , annotation = + Just + (Type.function + [ Type.list (Type.var "number") ] + (Type.var "number") + ) + } + ) + [ productArg_ ] + , append = + \appendArg_ appendArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "append" + , annotation = + Just + (Type.function + [ Type.list (Type.var "a") + , Type.list (Type.var "a") + ] + (Type.list (Type.var "a")) + ) + } + ) + [ appendArg_, appendArg_0 ] + , concat = + \concatArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "concat" + , annotation = + Just + (Type.function + [ Type.list (Type.list (Type.var "a")) ] + (Type.list (Type.var "a")) + ) + } + ) + [ concatArg_ ] + , concatMap = + \concatMapArg_ concatMapArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "concatMap" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.list (Type.var "b")) + , Type.list (Type.var "a") + ] + (Type.list (Type.var "b")) + ) + } + ) + [ concatMapArg_, concatMapArg_0 ] + , intersperse = + \intersperseArg_ intersperseArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "intersperse" + , annotation = + Just + (Type.function + [ Type.var "a", Type.list (Type.var "a") ] + (Type.list (Type.var "a")) + ) + } + ) + [ intersperseArg_, intersperseArg_0 ] + , map2 = + \map2Arg_ map2Arg_0 map2Arg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "result") + , Type.list (Type.var "a") + , Type.list (Type.var "b") + ] + (Type.list (Type.var "result")) + ) + } + ) + [ map2Arg_, map2Arg_0, map2Arg_1 ] + , map3 = + \map3Arg_ map3Arg_0 map3Arg_1 map3Arg_2 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + ] + (Type.var "result") + , Type.list (Type.var "a") + , Type.list (Type.var "b") + , Type.list (Type.var "c") + ] + (Type.list (Type.var "result")) + ) + } + ) + [ map3Arg_, map3Arg_0, map3Arg_1, map3Arg_2 ] + , map4 = + \map4Arg_ map4Arg_0 map4Arg_1 map4Arg_2 map4Arg_3 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "result") + , Type.list (Type.var "a") + , Type.list (Type.var "b") + , Type.list (Type.var "c") + , Type.list (Type.var "d") + ] + (Type.list (Type.var "result")) + ) + } + ) + [ map4Arg_, map4Arg_0, map4Arg_1, map4Arg_2, map4Arg_3 ] + , map5 = + \map5Arg_ map5Arg_0 map5Arg_1 map5Arg_2 map5Arg_3 map5Arg_4 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "result") + , Type.list (Type.var "a") + , Type.list (Type.var "b") + , Type.list (Type.var "c") + , Type.list (Type.var "d") + , Type.list (Type.var "e") + ] + (Type.list (Type.var "result")) + ) + } + ) + [ map5Arg_ + , map5Arg_0 + , map5Arg_1 + , map5Arg_2 + , map5Arg_3 + , map5Arg_4 + ] + , sort = + \sortArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "sort" + , annotation = + Just + (Type.function + [ Type.list (Type.var "comparable") ] + (Type.list (Type.var "comparable")) + ) + } + ) + [ sortArg_ ] + , sortBy = + \sortByArg_ sortByArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "sortBy" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.var "comparable") + , Type.list (Type.var "a") + ] + (Type.list (Type.var "a")) + ) + } + ) + [ sortByArg_, sortByArg_0 ] + , sortWith = + \sortWithArg_ sortWithArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "sortWith" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "a" ] + (Type.namedWith [ "Basics" ] "Order" []) + , Type.list (Type.var "a") + ] + (Type.list (Type.var "a")) + ) + } + ) + [ sortWithArg_, sortWithArg_0 ] + , isEmpty = + \isEmptyArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "isEmpty" + , annotation = + Just + (Type.function + [ Type.list (Type.var "a") ] + Type.bool + ) + } + ) + [ isEmptyArg_ ] + , head = + \headArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "head" + , annotation = + Just + (Type.function + [ Type.list (Type.var "a") ] + (Type.maybe (Type.var "a")) + ) + } + ) + [ headArg_ ] + , tail = + \tailArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "tail" + , annotation = + Just + (Type.function + [ Type.list (Type.var "a") ] + (Type.maybe (Type.list (Type.var "a"))) + ) + } + ) + [ tailArg_ ] + , take = + \takeArg_ takeArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "take" + , annotation = + Just + (Type.function + [ Type.int, Type.list (Type.var "a") ] + (Type.list (Type.var "a")) + ) + } + ) + [ takeArg_, takeArg_0 ] + , drop = + \dropArg_ dropArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "drop" + , annotation = + Just + (Type.function + [ Type.int, Type.list (Type.var "a") ] + (Type.list (Type.var "a")) + ) + } + ) + [ dropArg_, dropArg_0 ] + , partition = + \partitionArg_ partitionArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "partition" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] Type.bool + , Type.list (Type.var "a") + ] + (Type.tuple + (Type.list (Type.var "a")) + (Type.list (Type.var "a")) + ) + ) + } + ) + [ partitionArg_, partitionArg_0 ] + , unzip = + \unzipArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "List" ] + , name = "unzip" + , annotation = + Just + (Type.function + [ Type.list + (Type.tuple (Type.var "a") (Type.var "b")) + ] + (Type.tuple + (Type.list (Type.var "a")) + (Type.list (Type.var "b")) + ) + ) + } + ) + [ unzipArg_ ] + } + + +values_ : + { singleton : Elm.Expression + , repeat : Elm.Expression + , range : Elm.Expression + , map : Elm.Expression + , indexedMap : Elm.Expression + , foldl : Elm.Expression + , foldr : Elm.Expression + , filter : Elm.Expression + , filterMap : Elm.Expression + , length : Elm.Expression + , reverse : Elm.Expression + , member : Elm.Expression + , all : Elm.Expression + , any : Elm.Expression + , maximum : Elm.Expression + , minimum : Elm.Expression + , sum : Elm.Expression + , product : Elm.Expression + , append : Elm.Expression + , concat : Elm.Expression + , concatMap : Elm.Expression + , intersperse : Elm.Expression + , map2 : Elm.Expression + , map3 : Elm.Expression + , map4 : Elm.Expression + , map5 : Elm.Expression + , sort : Elm.Expression + , sortBy : Elm.Expression + , sortWith : Elm.Expression + , isEmpty : Elm.Expression + , head : Elm.Expression + , tail : Elm.Expression + , take : Elm.Expression + , drop : Elm.Expression + , partition : Elm.Expression + , unzip : Elm.Expression + } +values_ = + { singleton = + Elm.value + { importFrom = [ "List" ] + , name = "singleton" + , annotation = + Just (Type.function [ Type.var "a" ] (Type.list (Type.var "a"))) + } + , repeat = + Elm.value + { importFrom = [ "List" ] + , name = "repeat" + , annotation = + Just + (Type.function + [ Type.int, Type.var "a" ] + (Type.list (Type.var "a")) + ) + } + , range = + Elm.value + { importFrom = [ "List" ] + , name = "range" + , annotation = + Just (Type.function [ Type.int, Type.int ] (Type.list Type.int)) + } + , map = + Elm.value + { importFrom = [ "List" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] (Type.var "b") + , Type.list (Type.var "a") + ] + (Type.list (Type.var "b")) + ) + } + , indexedMap = + Elm.value + { importFrom = [ "List" ] + , name = "indexedMap" + , annotation = + Just + (Type.function + [ Type.function + [ Type.int, Type.var "a" ] + (Type.var "b") + , Type.list (Type.var "a") + ] + (Type.list (Type.var "b")) + ) + } + , foldl = + Elm.value + { importFrom = [ "List" ] + , name = "foldl" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.list (Type.var "a") + ] + (Type.var "b") + ) + } + , foldr = + Elm.value + { importFrom = [ "List" ] + , name = "foldr" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.list (Type.var "a") + ] + (Type.var "b") + ) + } + , filter = + Elm.value + { importFrom = [ "List" ] + , name = "filter" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] Type.bool + , Type.list (Type.var "a") + ] + (Type.list (Type.var "a")) + ) + } + , filterMap = + Elm.value + { importFrom = [ "List" ] + , name = "filterMap" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.maybe (Type.var "b")) + , Type.list (Type.var "a") + ] + (Type.list (Type.var "b")) + ) + } + , length = + Elm.value + { importFrom = [ "List" ] + , name = "length" + , annotation = + Just (Type.function [ Type.list (Type.var "a") ] Type.int) + } + , reverse = + Elm.value + { importFrom = [ "List" ] + , name = "reverse" + , annotation = + Just + (Type.function + [ Type.list (Type.var "a") ] + (Type.list (Type.var "a")) + ) + } + , member = + Elm.value + { importFrom = [ "List" ] + , name = "member" + , annotation = + Just + (Type.function + [ Type.var "a", Type.list (Type.var "a") ] + Type.bool + ) + } + , all = + Elm.value + { importFrom = [ "List" ] + , name = "all" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] Type.bool + , Type.list (Type.var "a") + ] + Type.bool + ) + } + , any = + Elm.value + { importFrom = [ "List" ] + , name = "any" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] Type.bool + , Type.list (Type.var "a") + ] + Type.bool + ) + } + , maximum = + Elm.value + { importFrom = [ "List" ] + , name = "maximum" + , annotation = + Just + (Type.function + [ Type.list (Type.var "comparable") ] + (Type.maybe (Type.var "comparable")) + ) + } + , minimum = + Elm.value + { importFrom = [ "List" ] + , name = "minimum" + , annotation = + Just + (Type.function + [ Type.list (Type.var "comparable") ] + (Type.maybe (Type.var "comparable")) + ) + } + , sum = + Elm.value + { importFrom = [ "List" ] + , name = "sum" + , annotation = + Just + (Type.function + [ Type.list (Type.var "number") ] + (Type.var "number") + ) + } + , product = + Elm.value + { importFrom = [ "List" ] + , name = "product" + , annotation = + Just + (Type.function + [ Type.list (Type.var "number") ] + (Type.var "number") + ) + } + , append = + Elm.value + { importFrom = [ "List" ] + , name = "append" + , annotation = + Just + (Type.function + [ Type.list (Type.var "a"), Type.list (Type.var "a") ] + (Type.list (Type.var "a")) + ) + } + , concat = + Elm.value + { importFrom = [ "List" ] + , name = "concat" + , annotation = + Just + (Type.function + [ Type.list (Type.list (Type.var "a")) ] + (Type.list (Type.var "a")) + ) + } + , concatMap = + Elm.value + { importFrom = [ "List" ] + , name = "concatMap" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.list (Type.var "b")) + , Type.list (Type.var "a") + ] + (Type.list (Type.var "b")) + ) + } + , intersperse = + Elm.value + { importFrom = [ "List" ] + , name = "intersperse" + , annotation = + Just + (Type.function + [ Type.var "a", Type.list (Type.var "a") ] + (Type.list (Type.var "a")) + ) + } + , map2 = + Elm.value + { importFrom = [ "List" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "result") + , Type.list (Type.var "a") + , Type.list (Type.var "b") + ] + (Type.list (Type.var "result")) + ) + } + , map3 = + Elm.value + { importFrom = [ "List" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b", Type.var "c" ] + (Type.var "result") + , Type.list (Type.var "a") + , Type.list (Type.var "b") + , Type.list (Type.var "c") + ] + (Type.list (Type.var "result")) + ) + } + , map4 = + Elm.value + { importFrom = [ "List" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "result") + , Type.list (Type.var "a") + , Type.list (Type.var "b") + , Type.list (Type.var "c") + , Type.list (Type.var "d") + ] + (Type.list (Type.var "result")) + ) + } + , map5 = + Elm.value + { importFrom = [ "List" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "result") + , Type.list (Type.var "a") + , Type.list (Type.var "b") + , Type.list (Type.var "c") + , Type.list (Type.var "d") + , Type.list (Type.var "e") + ] + (Type.list (Type.var "result")) + ) + } + , sort = + Elm.value + { importFrom = [ "List" ] + , name = "sort" + , annotation = + Just + (Type.function + [ Type.list (Type.var "comparable") ] + (Type.list (Type.var "comparable")) + ) + } + , sortBy = + Elm.value + { importFrom = [ "List" ] + , name = "sortBy" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.var "comparable") + , Type.list (Type.var "a") + ] + (Type.list (Type.var "a")) + ) + } + , sortWith = + Elm.value + { importFrom = [ "List" ] + , name = "sortWith" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "a" ] + (Type.namedWith [ "Basics" ] "Order" []) + , Type.list (Type.var "a") + ] + (Type.list (Type.var "a")) + ) + } + , isEmpty = + Elm.value + { importFrom = [ "List" ] + , name = "isEmpty" + , annotation = + Just (Type.function [ Type.list (Type.var "a") ] Type.bool) + } + , head = + Elm.value + { importFrom = [ "List" ] + , name = "head" + , annotation = + Just + (Type.function + [ Type.list (Type.var "a") ] + (Type.maybe (Type.var "a")) + ) + } + , tail = + Elm.value + { importFrom = [ "List" ] + , name = "tail" + , annotation = + Just + (Type.function + [ Type.list (Type.var "a") ] + (Type.maybe (Type.list (Type.var "a"))) + ) + } + , take = + Elm.value + { importFrom = [ "List" ] + , name = "take" + , annotation = + Just + (Type.function + [ Type.int, Type.list (Type.var "a") ] + (Type.list (Type.var "a")) + ) + } + , drop = + Elm.value + { importFrom = [ "List" ] + , name = "drop" + , annotation = + Just + (Type.function + [ Type.int, Type.list (Type.var "a") ] + (Type.list (Type.var "a")) + ) + } + , partition = + Elm.value + { importFrom = [ "List" ] + , name = "partition" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] Type.bool + , Type.list (Type.var "a") + ] + (Type.tuple + (Type.list (Type.var "a")) + (Type.list (Type.var "a")) + ) + ) + } + , unzip = + Elm.value + { importFrom = [ "List" ] + , name = "unzip" + , annotation = + Just + (Type.function + [ Type.list (Type.tuple (Type.var "a") (Type.var "b")) + ] + (Type.tuple + (Type.list (Type.var "a")) + (Type.list (Type.var "b")) + ) + ) + } + } \ No newline at end of file diff --git a/example-using-api/codegen/Gen/Maybe.elm b/example-using-api/codegen/Gen/Maybe.elm new file mode 100644 index 00000000..606fe4b1 --- /dev/null +++ b/example-using-api/codegen/Gen/Maybe.elm @@ -0,0 +1,759 @@ +module Gen.Maybe exposing + ( moduleName_, withDefault, map, map2, map3, map4 + , map5, andThen, annotation_, make_, caseOf_, call_, values_ + ) + +{-| +# Generated bindings for Maybe + +@docs moduleName_, withDefault, map, map2, map3, map4 +@docs map5, andThen, annotation_, make_, caseOf_, call_ +@docs values_ +-} + + +import Elm +import Elm.Annotation as Type +import Elm.Arg +import Elm.Case + + +{-| The name of this module. -} +moduleName_ : List String +moduleName_ = + [ "Maybe" ] + + +{-| Provide a default value, turning an optional value into a normal +value. This comes in handy when paired with functions like +[`Dict.get`](Dict#get) which gives back a `Maybe`. + + withDefault 100 (Just 42) -- 42 + withDefault 100 Nothing -- 100 + + withDefault "unknown" (Dict.get "Tom" Dict.empty) -- "unknown" + +**Note:** This can be overused! Many cases are better handled by a `case` +expression. And if you end up using `withDefault` a lot, it can be a good sign +that a [custom type][ct] will clean your code up quite a bit! + +[ct]: https://guide.elm-lang.org/types/custom_types.html + +withDefault: a -> Maybe a -> a +-} +withDefault : Elm.Expression -> Elm.Expression -> Elm.Expression +withDefault withDefaultArg_ withDefaultArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Maybe" ] + , name = "withDefault" + , annotation = + Just + (Type.function + [ Type.var "a", Type.maybe (Type.var "a") ] + (Type.var "a") + ) + } + ) + [ withDefaultArg_, withDefaultArg_0 ] + + +{-| Transform a `Maybe` value with a given function: + + map sqrt (Just 9) == Just 3 + map sqrt Nothing == Nothing + + map sqrt (String.toFloat "9") == Just 3 + map sqrt (String.toFloat "x") == Nothing + +map: (a -> b) -> Maybe a -> Maybe b +-} +map : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +map mapArg_ mapArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Maybe" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] (Type.var "b") + , Type.maybe (Type.var "a") + ] + (Type.maybe (Type.var "b")) + ) + } + ) + [ Elm.functionReduced "mapUnpack" mapArg_, mapArg_0 ] + + +{-| Apply a function if all the arguments are `Just` a value. + + map2 (+) (Just 3) (Just 4) == Just 7 + map2 (+) (Just 3) Nothing == Nothing + map2 (+) Nothing (Just 4) == Nothing + + map2 (+) (String.toInt "1") (String.toInt "123") == Just 124 + map2 (+) (String.toInt "x") (String.toInt "123") == Nothing + map2 (+) (String.toInt "1") (String.toInt "1.3") == Nothing + +map2: (a -> b -> value) -> Maybe a -> Maybe b -> Maybe value +-} +map2 : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map2 map2Arg_ map2Arg_0 map2Arg_1 = + Elm.apply + (Elm.value + { importFrom = [ "Maybe" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "value") + , Type.maybe (Type.var "a") + , Type.maybe (Type.var "b") + ] + (Type.maybe (Type.var "value")) + ) + } + ) + [ Elm.functionReduced + "map2Unpack" + (\functionReducedUnpack -> + Elm.functionReduced "unpack" (map2Arg_ functionReducedUnpack) + ) + , map2Arg_0 + , map2Arg_1 + ] + + +{-| map3: (a -> b -> c -> value) -> Maybe a -> Maybe b -> Maybe c -> Maybe value -} +map3 : + (Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map3 map3Arg_ map3Arg_0 map3Arg_1 map3Arg_2 = + Elm.apply + (Elm.value + { importFrom = [ "Maybe" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b", Type.var "c" ] + (Type.var "value") + , Type.maybe (Type.var "a") + , Type.maybe (Type.var "b") + , Type.maybe (Type.var "c") + ] + (Type.maybe (Type.var "value")) + ) + } + ) + [ Elm.functionReduced + "map3Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + ((map3Arg_ functionReducedUnpack) + functionReducedUnpack0 + ) + ) + ) + , map3Arg_0 + , map3Arg_1 + , map3Arg_2 + ] + + +{-| map4: + (a -> b -> c -> d -> value) + -> Maybe a + -> Maybe b + -> Maybe c + -> Maybe d + -> Maybe value +-} +map4 : + (Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map4 map4Arg_ map4Arg_0 map4Arg_1 map4Arg_2 map4Arg_3 = + Elm.apply + (Elm.value + { importFrom = [ "Maybe" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "value") + , Type.maybe (Type.var "a") + , Type.maybe (Type.var "b") + , Type.maybe (Type.var "c") + , Type.maybe (Type.var "d") + ] + (Type.maybe (Type.var "value")) + ) + } + ) + [ Elm.functionReduced + "map4Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (((map4Arg_ functionReducedUnpack) + functionReducedUnpack0 + ) + functionReducedUnpack_2_1_2_0_2_0_2_0_0 + ) + ) + ) + ) + , map4Arg_0 + , map4Arg_1 + , map4Arg_2 + , map4Arg_3 + ] + + +{-| map5: + (a -> b -> c -> d -> e -> value) + -> Maybe a + -> Maybe b + -> Maybe c + -> Maybe d + -> Maybe e + -> Maybe value +-} +map5 : + (Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map5 map5Arg_ map5Arg_0 map5Arg_1 map5Arg_2 map5Arg_3 map5Arg_4 = + Elm.apply + (Elm.value + { importFrom = [ "Maybe" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "value") + , Type.maybe (Type.var "a") + , Type.maybe (Type.var "b") + , Type.maybe (Type.var "c") + , Type.maybe (Type.var "d") + , Type.maybe (Type.var "e") + ] + (Type.maybe (Type.var "value")) + ) + } + ) + [ Elm.functionReduced + "map5Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + ((((map5Arg_ functionReducedUnpack + ) + functionReducedUnpack0 + ) + functionReducedUnpack_2_1_2_0_2_0_2_0_0 + ) + functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 + ) + ) + ) + ) + ) + , map5Arg_0 + , map5Arg_1 + , map5Arg_2 + , map5Arg_3 + , map5Arg_4 + ] + + +{-| Chain together many computations that may fail. It is helpful to see its +definition: + + andThen : (a -> Maybe b) -> Maybe a -> Maybe b + andThen callback maybe = + case maybe of + Just value -> + callback value + + Nothing -> + Nothing + +This means we only continue with the callback if things are going well. For +example, say you need to parse some user input as a month: + + parseMonth : String -> Maybe Int + parseMonth userInput = + String.toInt userInput + |> andThen toValidMonth + + toValidMonth : Int -> Maybe Int + toValidMonth month = + if 1 <= month && month <= 12 then + Just month + else + Nothing + +In the `parseMonth` function, if `String.toInt` produces `Nothing` (because +the `userInput` was not an integer) this entire chain of operations will +short-circuit and result in `Nothing`. If `toValidMonth` results in `Nothing`, +again the chain of computations will result in `Nothing`. + +andThen: (a -> Maybe b) -> Maybe a -> Maybe b +-} +andThen : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +andThen andThenArg_ andThenArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Maybe" ] + , name = "andThen" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.maybe (Type.var "b")) + , Type.maybe (Type.var "a") + ] + (Type.maybe (Type.var "b")) + ) + } + ) + [ Elm.functionReduced "andThenUnpack" andThenArg_, andThenArg_0 ] + + +annotation_ : { maybe : Type.Annotation -> Type.Annotation } +annotation_ = + { maybe = \maybeArg0 -> Type.namedWith [] "Maybe" [ maybeArg0 ] } + + +make_ : { just : Elm.Expression -> Elm.Expression, nothing : Elm.Expression } +make_ = + { just = + \ar0 -> + Elm.apply + (Elm.value + { importFrom = [] + , name = "Just" + , annotation = + Just (Type.namedWith [] "Maybe" [ Type.var "a" ]) + } + ) + [ ar0 ] + , nothing = + Elm.value + { importFrom = [] + , name = "Nothing" + , annotation = Just (Type.namedWith [] "Maybe" [ Type.var "a" ]) + } + } + + +caseOf_ : + { maybe : + Elm.Expression + -> { just : Elm.Expression -> Elm.Expression, nothing : Elm.Expression } + -> Elm.Expression + } +caseOf_ = + { maybe = + \maybeExpression maybeTags -> + Elm.Case.custom + maybeExpression + (Type.namedWith [ "Maybe" ] "Maybe" [ Type.var "a" ]) + [ Elm.Case.branch + (Elm.Arg.customType "Just" maybeTags.just |> Elm.Arg.item + (Elm.Arg.varWith + "a" + (Type.var + "a" + ) + ) + ) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Nothing" maybeTags.nothing) + Basics.identity + ] + } + + +call_ : + { withDefault : Elm.Expression -> Elm.Expression -> Elm.Expression + , map : Elm.Expression -> Elm.Expression -> Elm.Expression + , map2 : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , map3 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , map4 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , map5 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , andThen : Elm.Expression -> Elm.Expression -> Elm.Expression + } +call_ = + { withDefault = + \withDefaultArg_ withDefaultArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Maybe" ] + , name = "withDefault" + , annotation = + Just + (Type.function + [ Type.var "a", Type.maybe (Type.var "a") ] + (Type.var "a") + ) + } + ) + [ withDefaultArg_, withDefaultArg_0 ] + , map = + \mapArg_ mapArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Maybe" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.var "b") + , Type.maybe (Type.var "a") + ] + (Type.maybe (Type.var "b")) + ) + } + ) + [ mapArg_, mapArg_0 ] + , map2 = + \map2Arg_ map2Arg_0 map2Arg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "Maybe" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "value") + , Type.maybe (Type.var "a") + , Type.maybe (Type.var "b") + ] + (Type.maybe (Type.var "value")) + ) + } + ) + [ map2Arg_, map2Arg_0, map2Arg_1 ] + , map3 = + \map3Arg_ map3Arg_0 map3Arg_1 map3Arg_2 -> + Elm.apply + (Elm.value + { importFrom = [ "Maybe" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + ] + (Type.var "value") + , Type.maybe (Type.var "a") + , Type.maybe (Type.var "b") + , Type.maybe (Type.var "c") + ] + (Type.maybe (Type.var "value")) + ) + } + ) + [ map3Arg_, map3Arg_0, map3Arg_1, map3Arg_2 ] + , map4 = + \map4Arg_ map4Arg_0 map4Arg_1 map4Arg_2 map4Arg_3 -> + Elm.apply + (Elm.value + { importFrom = [ "Maybe" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "value") + , Type.maybe (Type.var "a") + , Type.maybe (Type.var "b") + , Type.maybe (Type.var "c") + , Type.maybe (Type.var "d") + ] + (Type.maybe (Type.var "value")) + ) + } + ) + [ map4Arg_, map4Arg_0, map4Arg_1, map4Arg_2, map4Arg_3 ] + , map5 = + \map5Arg_ map5Arg_0 map5Arg_1 map5Arg_2 map5Arg_3 map5Arg_4 -> + Elm.apply + (Elm.value + { importFrom = [ "Maybe" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "value") + , Type.maybe (Type.var "a") + , Type.maybe (Type.var "b") + , Type.maybe (Type.var "c") + , Type.maybe (Type.var "d") + , Type.maybe (Type.var "e") + ] + (Type.maybe (Type.var "value")) + ) + } + ) + [ map5Arg_ + , map5Arg_0 + , map5Arg_1 + , map5Arg_2 + , map5Arg_3 + , map5Arg_4 + ] + , andThen = + \andThenArg_ andThenArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Maybe" ] + , name = "andThen" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.maybe (Type.var "b")) + , Type.maybe (Type.var "a") + ] + (Type.maybe (Type.var "b")) + ) + } + ) + [ andThenArg_, andThenArg_0 ] + } + + +values_ : + { withDefault : Elm.Expression + , map : Elm.Expression + , map2 : Elm.Expression + , map3 : Elm.Expression + , map4 : Elm.Expression + , map5 : Elm.Expression + , andThen : Elm.Expression + } +values_ = + { withDefault = + Elm.value + { importFrom = [ "Maybe" ] + , name = "withDefault" + , annotation = + Just + (Type.function + [ Type.var "a", Type.maybe (Type.var "a") ] + (Type.var "a") + ) + } + , map = + Elm.value + { importFrom = [ "Maybe" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] (Type.var "b") + , Type.maybe (Type.var "a") + ] + (Type.maybe (Type.var "b")) + ) + } + , map2 = + Elm.value + { importFrom = [ "Maybe" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "value") + , Type.maybe (Type.var "a") + , Type.maybe (Type.var "b") + ] + (Type.maybe (Type.var "value")) + ) + } + , map3 = + Elm.value + { importFrom = [ "Maybe" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b", Type.var "c" ] + (Type.var "value") + , Type.maybe (Type.var "a") + , Type.maybe (Type.var "b") + , Type.maybe (Type.var "c") + ] + (Type.maybe (Type.var "value")) + ) + } + , map4 = + Elm.value + { importFrom = [ "Maybe" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "value") + , Type.maybe (Type.var "a") + , Type.maybe (Type.var "b") + , Type.maybe (Type.var "c") + , Type.maybe (Type.var "d") + ] + (Type.maybe (Type.var "value")) + ) + } + , map5 = + Elm.value + { importFrom = [ "Maybe" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "value") + , Type.maybe (Type.var "a") + , Type.maybe (Type.var "b") + , Type.maybe (Type.var "c") + , Type.maybe (Type.var "d") + , Type.maybe (Type.var "e") + ] + (Type.maybe (Type.var "value")) + ) + } + , andThen = + Elm.value + { importFrom = [ "Maybe" ] + , name = "andThen" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.maybe (Type.var "b")) + , Type.maybe (Type.var "a") + ] + (Type.maybe (Type.var "b")) + ) + } + } \ No newline at end of file diff --git a/codegen/Gen/Platform.elm b/example-using-api/codegen/Gen/Platform.elm similarity index 100% rename from codegen/Gen/Platform.elm rename to example-using-api/codegen/Gen/Platform.elm diff --git a/codegen/Gen/Platform/Cmd.elm b/example-using-api/codegen/Gen/Platform/Cmd.elm similarity index 100% rename from codegen/Gen/Platform/Cmd.elm rename to example-using-api/codegen/Gen/Platform/Cmd.elm diff --git a/codegen/Gen/Platform/Sub.elm b/example-using-api/codegen/Gen/Platform/Sub.elm similarity index 100% rename from codegen/Gen/Platform/Sub.elm rename to example-using-api/codegen/Gen/Platform/Sub.elm diff --git a/codegen/Gen/Process.elm b/example-using-api/codegen/Gen/Process.elm similarity index 100% rename from codegen/Gen/Process.elm rename to example-using-api/codegen/Gen/Process.elm diff --git a/example-using-api/codegen/Gen/Result.elm b/example-using-api/codegen/Gen/Result.elm new file mode 100644 index 00000000..a1c024fa --- /dev/null +++ b/example-using-api/codegen/Gen/Result.elm @@ -0,0 +1,1266 @@ +module Gen.Result exposing + ( moduleName_, map, map2, map3, map4, map5 + , andThen, withDefault, toMaybe, fromMaybe, mapError, annotation_, make_ + , caseOf_, call_, values_ + ) + +{-| +# Generated bindings for Result + +@docs moduleName_, map, map2, map3, map4, map5 +@docs andThen, withDefault, toMaybe, fromMaybe, mapError, annotation_ +@docs make_, caseOf_, call_, values_ +-} + + +import Elm +import Elm.Annotation as Type +import Elm.Arg +import Elm.Case + + +{-| The name of this module. -} +moduleName_ : List String +moduleName_ = + [ "Result" ] + + +{-| Apply a function to a result. If the result is `Ok`, it will be converted. +If the result is an `Err`, the same error value will propagate through. + + map sqrt (Ok 4.0) == Ok 2.0 + map sqrt (Err "bad input") == Err "bad input" + +map: (a -> value) -> Result.Result x a -> Result.Result x value +-} +map : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +map mapArg_ mapArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + ) + [ Elm.functionReduced "mapUnpack" mapArg_, mapArg_0 ] + + +{-| Apply a function if both results are `Ok`. If not, the first `Err` will +propagate through. + + map2 max (Ok 42) (Ok 13) == Ok 42 + map2 max (Err "x") (Ok 13) == Err "x" + map2 max (Ok 42) (Err "y") == Err "y" + map2 max (Err "x") (Err "y") == Err "x" + +This can be useful if you have two computations that may fail, and you want +to put them together quickly. + +map2: + (a -> b -> value) + -> Result.Result x a + -> Result.Result x b + -> Result.Result x value +-} +map2 : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map2 map2Arg_ map2Arg_0 map2Arg_1 = + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + ) + [ Elm.functionReduced + "map2Unpack" + (\functionReducedUnpack -> + Elm.functionReduced "unpack" (map2Arg_ functionReducedUnpack) + ) + , map2Arg_0 + , map2Arg_1 + ] + + +{-| map3: + (a -> b -> c -> value) + -> Result.Result x a + -> Result.Result x b + -> Result.Result x c + -> Result.Result x value +-} +map3 : + (Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map3 map3Arg_ map3Arg_0 map3Arg_1 map3Arg_2 = + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b", Type.var "c" ] + (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "c" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + ) + [ Elm.functionReduced + "map3Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + ((map3Arg_ functionReducedUnpack) + functionReducedUnpack0 + ) + ) + ) + , map3Arg_0 + , map3Arg_1 + , map3Arg_2 + ] + + +{-| map4: + (a -> b -> c -> d -> value) + -> Result.Result x a + -> Result.Result x b + -> Result.Result x c + -> Result.Result x d + -> Result.Result x value +-} +map4 : + (Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map4 map4Arg_ map4Arg_0 map4Arg_1 map4Arg_2 map4Arg_3 = + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "c" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "d" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + ) + [ Elm.functionReduced + "map4Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (((map4Arg_ functionReducedUnpack) + functionReducedUnpack0 + ) + functionReducedUnpack_2_1_2_0_2_0_2_0_0 + ) + ) + ) + ) + , map4Arg_0 + , map4Arg_1 + , map4Arg_2 + , map4Arg_3 + ] + + +{-| map5: + (a -> b -> c -> d -> e -> value) + -> Result.Result x a + -> Result.Result x b + -> Result.Result x c + -> Result.Result x d + -> Result.Result x e + -> Result.Result x value +-} +map5 : + (Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map5 map5Arg_ map5Arg_0 map5Arg_1 map5Arg_2 map5Arg_3 map5Arg_4 = + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "c" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "d" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "e" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + ) + [ Elm.functionReduced + "map5Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + ((((map5Arg_ functionReducedUnpack + ) + functionReducedUnpack0 + ) + functionReducedUnpack_2_1_2_0_2_0_2_0_0 + ) + functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 + ) + ) + ) + ) + ) + , map5Arg_0 + , map5Arg_1 + , map5Arg_2 + , map5Arg_3 + , map5Arg_4 + ] + + +{-| Chain together a sequence of computations that may fail. It is helpful +to see its definition: + + andThen : (a -> Result e b) -> Result e a -> Result e b + andThen callback result = + case result of + Ok value -> callback value + Err msg -> Err msg + +This means we only continue with the callback if things are going well. For +example, say you need to use (`toInt : String -> Result String Int`) to parse +a month and make sure it is between 1 and 12: + + toValidMonth : Int -> Result String Int + toValidMonth month = + if month >= 1 && month <= 12 + then Ok month + else Err "months must be between 1 and 12" + + toMonth : String -> Result String Int + toMonth rawString = + toInt rawString + |> andThen toValidMonth + + -- toMonth "4" == Ok 4 + -- toMonth "9" == Ok 9 + -- toMonth "a" == Err "cannot parse to an Int" + -- toMonth "0" == Err "months must be between 1 and 12" + +This allows us to come out of a chain of operations with quite a specific error +message. It is often best to create a custom type that explicitly represents +the exact ways your computation may fail. This way it is easy to handle in your +code. + +andThen: (a -> Result.Result x b) -> Result.Result x a -> Result.Result x b +-} +andThen : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +andThen andThenArg_ andThenArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "andThen" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + ) + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + ) + ) + } + ) + [ Elm.functionReduced "andThenUnpack" andThenArg_, andThenArg_0 ] + + +{-| If the result is `Ok` return the value, but if the result is an `Err` then +return a given default value. The following examples try to parse integers. + + Result.withDefault 0 (Ok 123) == 123 + Result.withDefault 0 (Err "no") == 0 + +withDefault: a -> Result.Result x a -> a +-} +withDefault : Elm.Expression -> Elm.Expression -> Elm.Expression +withDefault withDefaultArg_ withDefaultArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "withDefault" + , annotation = + Just + (Type.function + [ Type.var "a" + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.var "a") + ) + } + ) + [ withDefaultArg_, withDefaultArg_0 ] + + +{-| Convert to a simpler `Maybe` if the actual error message is not needed or +you need to interact with some code that primarily uses maybes. + + parseInt : String -> Result ParseError Int + + maybeParseInt : String -> Maybe Int + maybeParseInt string = + toMaybe (parseInt string) + +toMaybe: Result.Result x a -> Maybe a +-} +toMaybe : Elm.Expression -> Elm.Expression +toMaybe toMaybeArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "toMaybe" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.maybe (Type.var "a")) + ) + } + ) + [ toMaybeArg_ ] + + +{-| Convert from a simple `Maybe` to interact with some code that primarily +uses `Results`. + + parseInt : String -> Maybe Int + + resultParseInt : String -> Result String Int + resultParseInt string = + fromMaybe ("error parsing string: " ++ toString string) (parseInt string) + +fromMaybe: x -> Maybe a -> Result.Result x a +-} +fromMaybe : Elm.Expression -> Elm.Expression -> Elm.Expression +fromMaybe fromMaybeArg_ fromMaybeArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "fromMaybe" + , annotation = + Just + (Type.function + [ Type.var "x", Type.maybe (Type.var "a") ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ) + ) + } + ) + [ fromMaybeArg_, fromMaybeArg_0 ] + + +{-| Transform an `Err` value. For example, say the errors we get have too much +information: + + parseInt : String -> Result ParseError Int + + type alias ParseError = + { message : String + , code : Int + , position : (Int,Int) + } + + mapError .message (parseInt "123") == Ok 123 + mapError .message (parseInt "abc") == Err "char 'a' is not a number" + +mapError: (x -> y) -> Result.Result x a -> Result.Result y a +-} +mapError : + (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +mapError mapErrorArg_ mapErrorArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "mapError" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "x" ] (Type.var "y") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "y", Type.var "a" ] + ) + ) + } + ) + [ Elm.functionReduced "mapErrorUnpack" mapErrorArg_, mapErrorArg_0 ] + + +annotation_ : { result : Type.Annotation -> Type.Annotation -> Type.Annotation } +annotation_ = + { result = + \resultArg0 resultArg1 -> + Type.namedWith [] "Result" [ resultArg0, resultArg1 ] + } + + +make_ : + { ok : Elm.Expression -> Elm.Expression + , err : Elm.Expression -> Elm.Expression + } +make_ = + { ok = + \ar0 -> + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "Ok" + , annotation = + Just + (Type.namedWith + [] + "Result" + [ Type.var "error", Type.var "value" ] + ) + } + ) + [ ar0 ] + , err = + \ar0 -> + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "Err" + , annotation = + Just + (Type.namedWith + [] + "Result" + [ Type.var "error", Type.var "value" ] + ) + } + ) + [ ar0 ] + } + + +caseOf_ : + { result : + Elm.Expression + -> { ok : Elm.Expression -> Elm.Expression + , err : Elm.Expression -> Elm.Expression + } + -> Elm.Expression + } +caseOf_ = + { result = + \resultExpression resultTags -> + Elm.Case.custom + resultExpression + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "error", Type.var "value" ] + ) + [ Elm.Case.branch + (Elm.Arg.customType "Ok" resultTags.ok |> Elm.Arg.item + (Elm.Arg.varWith + "value" + (Type.var + "value" + ) + ) + ) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Err" resultTags.err |> Elm.Arg.item + (Elm.Arg.varWith + "error" + (Type.var + "error" + ) + ) + ) + Basics.identity + ] + } + + +call_ : + { map : Elm.Expression -> Elm.Expression -> Elm.Expression + , map2 : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , map3 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , map4 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , map5 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , andThen : Elm.Expression -> Elm.Expression -> Elm.Expression + , withDefault : Elm.Expression -> Elm.Expression -> Elm.Expression + , toMaybe : Elm.Expression -> Elm.Expression + , fromMaybe : Elm.Expression -> Elm.Expression -> Elm.Expression + , mapError : Elm.Expression -> Elm.Expression -> Elm.Expression + } +call_ = + { map = + \mapArg_ mapArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + ) + [ mapArg_, mapArg_0 ] + , map2 = + \map2Arg_ map2Arg_0 map2Arg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + ) + [ map2Arg_, map2Arg_0, map2Arg_1 ] + , map3 = + \map3Arg_ map3Arg_0 map3Arg_1 map3Arg_2 -> + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + ] + (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "c" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + ) + [ map3Arg_, map3Arg_0, map3Arg_1, map3Arg_2 ] + , map4 = + \map4Arg_ map4Arg_0 map4Arg_1 map4Arg_2 map4Arg_3 -> + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "c" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "d" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + ) + [ map4Arg_, map4Arg_0, map4Arg_1, map4Arg_2, map4Arg_3 ] + , map5 = + \map5Arg_ map5Arg_0 map5Arg_1 map5Arg_2 map5Arg_3 map5Arg_4 -> + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "c" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "d" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "e" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + ) + [ map5Arg_ + , map5Arg_0 + , map5Arg_1 + , map5Arg_2 + , map5Arg_3 + , map5Arg_4 + ] + , andThen = + \andThenArg_ andThenArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "andThen" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + ) + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + ) + ) + } + ) + [ andThenArg_, andThenArg_0 ] + , withDefault = + \withDefaultArg_ withDefaultArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "withDefault" + , annotation = + Just + (Type.function + [ Type.var "a" + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.var "a") + ) + } + ) + [ withDefaultArg_, withDefaultArg_0 ] + , toMaybe = + \toMaybeArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "toMaybe" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.maybe (Type.var "a")) + ) + } + ) + [ toMaybeArg_ ] + , fromMaybe = + \fromMaybeArg_ fromMaybeArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "fromMaybe" + , annotation = + Just + (Type.function + [ Type.var "x", Type.maybe (Type.var "a") ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ) + ) + } + ) + [ fromMaybeArg_, fromMaybeArg_0 ] + , mapError = + \mapErrorArg_ mapErrorArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Result" ] + , name = "mapError" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "x" ] + (Type.var "y") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "y", Type.var "a" ] + ) + ) + } + ) + [ mapErrorArg_, mapErrorArg_0 ] + } + + +values_ : + { map : Elm.Expression + , map2 : Elm.Expression + , map3 : Elm.Expression + , map4 : Elm.Expression + , map5 : Elm.Expression + , andThen : Elm.Expression + , withDefault : Elm.Expression + , toMaybe : Elm.Expression + , fromMaybe : Elm.Expression + , mapError : Elm.Expression + } +values_ = + { map = + Elm.value + { importFrom = [ "Result" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + , map2 = + Elm.value + { importFrom = [ "Result" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + , map3 = + Elm.value + { importFrom = [ "Result" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b", Type.var "c" ] + (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "c" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + , map4 = + Elm.value + { importFrom = [ "Result" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "c" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "d" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + , map5 = + Elm.value + { importFrom = [ "Result" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "value") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "c" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "d" ] + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "e" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "value" ] + ) + ) + } + , andThen = + Elm.value + { importFrom = [ "Result" ] + , name = "andThen" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + ) + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "b" ] + ) + ) + } + , withDefault = + Elm.value + { importFrom = [ "Result" ] + , name = "withDefault" + , annotation = + Just + (Type.function + [ Type.var "a" + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.var "a") + ) + } + , toMaybe = + Elm.value + { importFrom = [ "Result" ] + , name = "toMaybe" + , annotation = + Just + (Type.function + [ Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.maybe (Type.var "a")) + ) + } + , fromMaybe = + Elm.value + { importFrom = [ "Result" ] + , name = "fromMaybe" + , annotation = + Just + (Type.function + [ Type.var "x", Type.maybe (Type.var "a") ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ) + ) + } + , mapError = + Elm.value + { importFrom = [ "Result" ] + , name = "mapError" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "x" ] (Type.var "y") + , Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Result" ] + "Result" + [ Type.var "y", Type.var "a" ] + ) + ) + } + } \ No newline at end of file diff --git a/codegen/Gen/Set.elm b/example-using-api/codegen/Gen/Set.elm similarity index 100% rename from codegen/Gen/Set.elm rename to example-using-api/codegen/Gen/Set.elm diff --git a/example-using-api/codegen/Gen/String.elm b/example-using-api/codegen/Gen/String.elm new file mode 100644 index 00000000..b8436645 --- /dev/null +++ b/example-using-api/codegen/Gen/String.elm @@ -0,0 +1,2140 @@ +module Gen.String exposing + ( moduleName_, isEmpty, length, reverse, repeat, replace + , append, concat, split, join, words, lines, slice + , left, right, dropLeft, dropRight, contains, startsWith, endsWith + , indexes, indices, toInt, fromInt, toFloat, fromFloat, fromChar + , cons, uncons, toList, fromList, toUpper, toLower, pad + , padLeft, padRight, trim, trimLeft, trimRight, map, filter + , foldl, foldr, any, all, annotation_, call_, values_ + ) + +{-| +# Generated bindings for String + +@docs moduleName_, isEmpty, length, reverse, repeat, replace +@docs append, concat, split, join, words, lines +@docs slice, left, right, dropLeft, dropRight, contains +@docs startsWith, endsWith, indexes, indices, toInt, fromInt +@docs toFloat, fromFloat, fromChar, cons, uncons, toList +@docs fromList, toUpper, toLower, pad, padLeft, padRight +@docs trim, trimLeft, trimRight, map, filter, foldl +@docs foldr, any, all, annotation_, call_, values_ +-} + + +import Elm +import Elm.Annotation as Type + + +{-| The name of this module. -} +moduleName_ : List String +moduleName_ = + [ "String" ] + + +{-| Determine if a string is empty. + + isEmpty "" == True + isEmpty "the world" == False + +isEmpty: String -> Bool +-} +isEmpty : String -> Elm.Expression +isEmpty isEmptyArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "isEmpty" + , annotation = Just (Type.function [ Type.string ] Type.bool) + } + ) + [ Elm.string isEmptyArg_ ] + + +{-| Get the length of a string. + + length "innumerable" == 11 + length "" == 0 + +length: String -> Int +-} +length : String -> Elm.Expression +length lengthArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "length" + , annotation = Just (Type.function [ Type.string ] Type.int) + } + ) + [ Elm.string lengthArg_ ] + + +{-| Reverse a string. + + reverse "stressed" == "desserts" + +reverse: String -> String +-} +reverse : String -> Elm.Expression +reverse reverseArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "reverse" + , annotation = Just (Type.function [ Type.string ] Type.string) + } + ) + [ Elm.string reverseArg_ ] + + +{-| Repeat a string *n* times. + + repeat 3 "ha" == "hahaha" + +repeat: Int -> String -> String +-} +repeat : Int -> String -> Elm.Expression +repeat repeatArg_ repeatArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "repeat" + , annotation = + Just (Type.function [ Type.int, Type.string ] Type.string) + } + ) + [ Elm.int repeatArg_, Elm.string repeatArg_0 ] + + +{-| Replace all occurrences of some substring. + + replace "." "-" "Json.Decode.succeed" == "Json-Decode-succeed" + replace "," "/" "a,b,c,d,e" == "a/b/c/d/e" + +**Note:** If you need more advanced replacements, check out the +[`elm/parser`][parser] or [`elm/regex`][regex] package. + +[parser]: /packages/elm/parser/latest +[regex]: /packages/elm/regex/latest + +replace: String -> String -> String -> String +-} +replace : String -> String -> String -> Elm.Expression +replace replaceArg_ replaceArg_0 replaceArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "replace" + , annotation = + Just + (Type.function + [ Type.string, Type.string, Type.string ] + Type.string + ) + } + ) + [ Elm.string replaceArg_ + , Elm.string replaceArg_0 + , Elm.string replaceArg_1 + ] + + +{-| Append two strings. You can also use [the `(++)` operator](Basics#++) +to do this. + + append "butter" "fly" == "butterfly" + +append: String -> String -> String +-} +append : String -> String -> Elm.Expression +append appendArg_ appendArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "append" + , annotation = + Just (Type.function [ Type.string, Type.string ] Type.string) + } + ) + [ Elm.string appendArg_, Elm.string appendArg_0 ] + + +{-| Concatenate many strings into one. + + concat ["never","the","less"] == "nevertheless" + +concat: List String -> String +-} +concat : List String -> Elm.Expression +concat concatArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "concat" + , annotation = + Just (Type.function [ Type.list Type.string ] Type.string) + } + ) + [ Elm.list (List.map Elm.string concatArg_) ] + + +{-| Split a string using a given separator. + + split "," "cat,dog,cow" == ["cat","dog","cow"] + split "/" "home/evan/Desktop/" == ["home","evan","Desktop", ""] + +split: String -> String -> List String +-} +split : String -> String -> Elm.Expression +split splitArg_ splitArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "split" + , annotation = + Just + (Type.function + [ Type.string, Type.string ] + (Type.list Type.string) + ) + } + ) + [ Elm.string splitArg_, Elm.string splitArg_0 ] + + +{-| Put many strings together with a given separator. + + join "a" ["H","w","ii","n"] == "Hawaiian" + join " " ["cat","dog","cow"] == "cat dog cow" + join "/" ["home","evan","Desktop"] == "home/evan/Desktop" + +join: String -> List String -> String +-} +join : String -> List String -> Elm.Expression +join joinArg_ joinArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "join" + , annotation = + Just + (Type.function + [ Type.string, Type.list Type.string ] + Type.string + ) + } + ) + [ Elm.string joinArg_, Elm.list (List.map Elm.string joinArg_0) ] + + +{-| Break a string into words, splitting on chunks of whitespace. + + words "How are \t you? \n Good?" == ["How","are","you?","Good?"] + +words: String -> List String +-} +words : String -> Elm.Expression +words wordsArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "words" + , annotation = + Just (Type.function [ Type.string ] (Type.list Type.string)) + } + ) + [ Elm.string wordsArg_ ] + + +{-| Break a string into lines, splitting on newlines. + + lines "How are you?\nGood?" == ["How are you?", "Good?"] + +lines: String -> List String +-} +lines : String -> Elm.Expression +lines linesArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "lines" + , annotation = + Just (Type.function [ Type.string ] (Type.list Type.string)) + } + ) + [ Elm.string linesArg_ ] + + +{-| Take a substring given a start and end index. Negative indexes +are taken starting from the *end* of the list. + + slice 7 9 "snakes on a plane!" == "on" + slice 0 6 "snakes on a plane!" == "snakes" + slice 0 -7 "snakes on a plane!" == "snakes on a" + slice -6 -1 "snakes on a plane!" == "plane" + +slice: Int -> Int -> String -> String +-} +slice : Int -> Int -> String -> Elm.Expression +slice sliceArg_ sliceArg_0 sliceArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "slice" + , annotation = + Just + (Type.function + [ Type.int, Type.int, Type.string ] + Type.string + ) + } + ) + [ Elm.int sliceArg_, Elm.int sliceArg_0, Elm.string sliceArg_1 ] + + +{-| Take *n* characters from the left side of a string. + + left 2 "Mulder" == "Mu" + +left: Int -> String -> String +-} +left : Int -> String -> Elm.Expression +left leftArg_ leftArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "left" + , annotation = + Just (Type.function [ Type.int, Type.string ] Type.string) + } + ) + [ Elm.int leftArg_, Elm.string leftArg_0 ] + + +{-| Take *n* characters from the right side of a string. + + right 2 "Scully" == "ly" + +right: Int -> String -> String +-} +right : Int -> String -> Elm.Expression +right rightArg_ rightArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "right" + , annotation = + Just (Type.function [ Type.int, Type.string ] Type.string) + } + ) + [ Elm.int rightArg_, Elm.string rightArg_0 ] + + +{-| Drop *n* characters from the left side of a string. + + dropLeft 2 "The Lone Gunmen" == "e Lone Gunmen" + +dropLeft: Int -> String -> String +-} +dropLeft : Int -> String -> Elm.Expression +dropLeft dropLeftArg_ dropLeftArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "dropLeft" + , annotation = + Just (Type.function [ Type.int, Type.string ] Type.string) + } + ) + [ Elm.int dropLeftArg_, Elm.string dropLeftArg_0 ] + + +{-| Drop *n* characters from the right side of a string. + + dropRight 2 "Cigarette Smoking Man" == "Cigarette Smoking M" + +dropRight: Int -> String -> String +-} +dropRight : Int -> String -> Elm.Expression +dropRight dropRightArg_ dropRightArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "dropRight" + , annotation = + Just (Type.function [ Type.int, Type.string ] Type.string) + } + ) + [ Elm.int dropRightArg_, Elm.string dropRightArg_0 ] + + +{-| See if the second string contains the first one. + + contains "the" "theory" == True + contains "hat" "theory" == False + contains "THE" "theory" == False + +contains: String -> String -> Bool +-} +contains : String -> String -> Elm.Expression +contains containsArg_ containsArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "contains" + , annotation = + Just (Type.function [ Type.string, Type.string ] Type.bool) + } + ) + [ Elm.string containsArg_, Elm.string containsArg_0 ] + + +{-| See if the second string starts with the first one. + + startsWith "the" "theory" == True + startsWith "ory" "theory" == False + +startsWith: String -> String -> Bool +-} +startsWith : String -> String -> Elm.Expression +startsWith startsWithArg_ startsWithArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "startsWith" + , annotation = + Just (Type.function [ Type.string, Type.string ] Type.bool) + } + ) + [ Elm.string startsWithArg_, Elm.string startsWithArg_0 ] + + +{-| See if the second string ends with the first one. + + endsWith "the" "theory" == False + endsWith "ory" "theory" == True + +endsWith: String -> String -> Bool +-} +endsWith : String -> String -> Elm.Expression +endsWith endsWithArg_ endsWithArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "endsWith" + , annotation = + Just (Type.function [ Type.string, Type.string ] Type.bool) + } + ) + [ Elm.string endsWithArg_, Elm.string endsWithArg_0 ] + + +{-| Get all of the indexes for a substring in another string. + + indexes "i" "Mississippi" == [1,4,7,10] + indexes "ss" "Mississippi" == [2,5] + indexes "needle" "haystack" == [] + +indexes: String -> String -> List Int +-} +indexes : String -> String -> Elm.Expression +indexes indexesArg_ indexesArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "indexes" + , annotation = + Just + (Type.function + [ Type.string, Type.string ] + (Type.list Type.int) + ) + } + ) + [ Elm.string indexesArg_, Elm.string indexesArg_0 ] + + +{-| Alias for `indexes`. + +indices: String -> String -> List Int +-} +indices : String -> String -> Elm.Expression +indices indicesArg_ indicesArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "indices" + , annotation = + Just + (Type.function + [ Type.string, Type.string ] + (Type.list Type.int) + ) + } + ) + [ Elm.string indicesArg_, Elm.string indicesArg_0 ] + + +{-| Try to convert a string into an int, failing on improperly formatted strings. + + String.toInt "123" == Just 123 + String.toInt "-42" == Just -42 + String.toInt "3.1" == Nothing + String.toInt "31a" == Nothing + +If you are extracting a number from some raw user input, you will typically +want to use [`Maybe.withDefault`](Maybe#withDefault) to handle bad data: + + Maybe.withDefault 0 (String.toInt "42") == 42 + Maybe.withDefault 0 (String.toInt "ab") == 0 + +toInt: String -> Maybe Int +-} +toInt : String -> Elm.Expression +toInt toIntArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "toInt" + , annotation = + Just (Type.function [ Type.string ] (Type.maybe Type.int)) + } + ) + [ Elm.string toIntArg_ ] + + +{-| Convert an `Int` to a `String`. + + String.fromInt 123 == "123" + String.fromInt -42 == "-42" + +Check out [`Debug.toString`](Debug#toString) to convert *any* value to a string +for debugging purposes. + +fromInt: Int -> String +-} +fromInt : Int -> Elm.Expression +fromInt fromIntArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "fromInt" + , annotation = Just (Type.function [ Type.int ] Type.string) + } + ) + [ Elm.int fromIntArg_ ] + + +{-| Try to convert a string into a float, failing on improperly formatted strings. + + String.toFloat "123" == Just 123.0 + String.toFloat "-42" == Just -42.0 + String.toFloat "3.1" == Just 3.1 + String.toFloat "31a" == Nothing + +If you are extracting a number from some raw user input, you will typically +want to use [`Maybe.withDefault`](Maybe#withDefault) to handle bad data: + + Maybe.withDefault 0 (String.toFloat "42.5") == 42.5 + Maybe.withDefault 0 (String.toFloat "cats") == 0 + +toFloat: String -> Maybe Float +-} +toFloat : String -> Elm.Expression +toFloat toFloatArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "toFloat" + , annotation = + Just (Type.function [ Type.string ] (Type.maybe Type.float)) + } + ) + [ Elm.string toFloatArg_ ] + + +{-| Convert a `Float` to a `String`. + + String.fromFloat 123 == "123" + String.fromFloat -42 == "-42" + String.fromFloat 3.9 == "3.9" + +Check out [`Debug.toString`](Debug#toString) to convert *any* value to a string +for debugging purposes. + +fromFloat: Float -> String +-} +fromFloat : Float -> Elm.Expression +fromFloat fromFloatArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "fromFloat" + , annotation = Just (Type.function [ Type.float ] Type.string) + } + ) + [ Elm.float fromFloatArg_ ] + + +{-| Create a string from a given character. + + fromChar 'a' == "a" + +fromChar: Char.Char -> String +-} +fromChar : Char.Char -> Elm.Expression +fromChar fromCharArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "fromChar" + , annotation = Just (Type.function [ Type.char ] Type.string) + } + ) + [ Elm.char fromCharArg_ ] + + +{-| Add a character to the beginning of a string. + + cons 'T' "he truth is out there" == "The truth is out there" + +cons: Char.Char -> String -> String +-} +cons : Char.Char -> String -> Elm.Expression +cons consArg_ consArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "cons" + , annotation = + Just (Type.function [ Type.char, Type.string ] Type.string) + } + ) + [ Elm.char consArg_, Elm.string consArg_0 ] + + +{-| Split a non-empty string into its head and tail. This lets you +pattern match on strings exactly as you would with lists. + + uncons "abc" == Just ('a',"bc") + uncons "" == Nothing + +uncons: String -> Maybe ( Char.Char, String ) +-} +uncons : String -> Elm.Expression +uncons unconsArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "uncons" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.maybe (Type.tuple Type.char Type.string)) + ) + } + ) + [ Elm.string unconsArg_ ] + + +{-| Convert a string to a list of characters. + + toList "abc" == ['a','b','c'] + toList "🙈🙉🙊" == ['🙈','🙉','🙊'] + +toList: String -> List Char.Char +-} +toList : String -> Elm.Expression +toList toListArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "toList" + , annotation = + Just (Type.function [ Type.string ] (Type.list Type.char)) + } + ) + [ Elm.string toListArg_ ] + + +{-| Convert a list of characters into a String. Can be useful if you +want to create a string primarily by consing, perhaps for decoding +something. + + fromList ['a','b','c'] == "abc" + fromList ['🙈','🙉','🙊'] == "🙈🙉🙊" + +fromList: List Char.Char -> String +-} +fromList : List Char.Char -> Elm.Expression +fromList fromListArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "fromList" + , annotation = + Just (Type.function [ Type.list Type.char ] Type.string) + } + ) + [ Elm.list (List.map Elm.char fromListArg_) ] + + +{-| Convert a string to all upper case. Useful for case-insensitive comparisons +and VIRTUAL YELLING. + + toUpper "skinner" == "SKINNER" + +toUpper: String -> String +-} +toUpper : String -> Elm.Expression +toUpper toUpperArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "toUpper" + , annotation = Just (Type.function [ Type.string ] Type.string) + } + ) + [ Elm.string toUpperArg_ ] + + +{-| Convert a string to all lower case. Useful for case-insensitive comparisons. + + toLower "X-FILES" == "x-files" + +toLower: String -> String +-} +toLower : String -> Elm.Expression +toLower toLowerArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "toLower" + , annotation = Just (Type.function [ Type.string ] Type.string) + } + ) + [ Elm.string toLowerArg_ ] + + +{-| Pad a string on both sides until it has a given length. + + pad 5 ' ' "1" == " 1 " + pad 5 ' ' "11" == " 11 " + pad 5 ' ' "121" == " 121 " + +pad: Int -> Char.Char -> String -> String +-} +pad : Int -> Char.Char -> String -> Elm.Expression +pad padArg_ padArg_0 padArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "pad" + , annotation = + Just + (Type.function + [ Type.int, Type.char, Type.string ] + Type.string + ) + } + ) + [ Elm.int padArg_, Elm.char padArg_0, Elm.string padArg_1 ] + + +{-| Pad a string on the left until it has a given length. + + padLeft 5 '.' "1" == "....1" + padLeft 5 '.' "11" == "...11" + padLeft 5 '.' "121" == "..121" + +padLeft: Int -> Char.Char -> String -> String +-} +padLeft : Int -> Char.Char -> String -> Elm.Expression +padLeft padLeftArg_ padLeftArg_0 padLeftArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "padLeft" + , annotation = + Just + (Type.function + [ Type.int, Type.char, Type.string ] + Type.string + ) + } + ) + [ Elm.int padLeftArg_, Elm.char padLeftArg_0, Elm.string padLeftArg_1 ] + + +{-| Pad a string on the right until it has a given length. + + padRight 5 '.' "1" == "1...." + padRight 5 '.' "11" == "11..." + padRight 5 '.' "121" == "121.." + +padRight: Int -> Char.Char -> String -> String +-} +padRight : Int -> Char.Char -> String -> Elm.Expression +padRight padRightArg_ padRightArg_0 padRightArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "padRight" + , annotation = + Just + (Type.function + [ Type.int, Type.char, Type.string ] + Type.string + ) + } + ) + [ Elm.int padRightArg_ + , Elm.char padRightArg_0 + , Elm.string padRightArg_1 + ] + + +{-| Get rid of whitespace on both sides of a string. + + trim " hats \n" == "hats" + +trim: String -> String +-} +trim : String -> Elm.Expression +trim trimArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "trim" + , annotation = Just (Type.function [ Type.string ] Type.string) + } + ) + [ Elm.string trimArg_ ] + + +{-| Get rid of whitespace on the left of a string. + + trimLeft " hats \n" == "hats \n" + +trimLeft: String -> String +-} +trimLeft : String -> Elm.Expression +trimLeft trimLeftArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "trimLeft" + , annotation = Just (Type.function [ Type.string ] Type.string) + } + ) + [ Elm.string trimLeftArg_ ] + + +{-| Get rid of whitespace on the right of a string. + + trimRight " hats \n" == " hats" + +trimRight: String -> String +-} +trimRight : String -> Elm.Expression +trimRight trimRightArg_ = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "trimRight" + , annotation = Just (Type.function [ Type.string ] Type.string) + } + ) + [ Elm.string trimRightArg_ ] + + +{-| Transform every character in a string + + map (\c -> if c == '/' then '.' else c) "a/b/c" == "a.b.c" + +map: (Char.Char -> Char.Char) -> String -> String +-} +map : (Elm.Expression -> Elm.Expression) -> String -> Elm.Expression +map mapArg_ mapArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function [ Type.char ] Type.char, Type.string ] + Type.string + ) + } + ) + [ Elm.functionReduced "mapUnpack" mapArg_, Elm.string mapArg_0 ] + + +{-| Keep only the characters that pass the test. + + filter isDigit "R2-D2" == "22" + +filter: (Char.Char -> Bool) -> String -> String +-} +filter : (Elm.Expression -> Elm.Expression) -> String -> Elm.Expression +filter filterArg_ filterArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "filter" + , annotation = + Just + (Type.function + [ Type.function [ Type.char ] Type.bool, Type.string ] + Type.string + ) + } + ) + [ Elm.functionReduced "filterUnpack" filterArg_ + , Elm.string filterArg_0 + ] + + +{-| Reduce a string from the left. + + foldl cons "" "time" == "emit" + +foldl: (Char.Char -> b -> b) -> b -> String -> b +-} +foldl : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> String + -> Elm.Expression +foldl foldlArg_ foldlArg_0 foldlArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "foldl" + , annotation = + Just + (Type.function + [ Type.function + [ Type.char, Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.string + ] + (Type.var "b") + ) + } + ) + [ Elm.functionReduced + "foldlUnpack" + (\functionReducedUnpack -> + Elm.functionReduced "unpack" (foldlArg_ functionReducedUnpack) + ) + , foldlArg_0 + , Elm.string foldlArg_1 + ] + + +{-| Reduce a string from the right. + + foldr cons "" "time" == "time" + +foldr: (Char.Char -> b -> b) -> b -> String -> b +-} +foldr : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> String + -> Elm.Expression +foldr foldrArg_ foldrArg_0 foldrArg_1 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "foldr" + , annotation = + Just + (Type.function + [ Type.function + [ Type.char, Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.string + ] + (Type.var "b") + ) + } + ) + [ Elm.functionReduced + "foldrUnpack" + (\functionReducedUnpack -> + Elm.functionReduced "unpack" (foldrArg_ functionReducedUnpack) + ) + , foldrArg_0 + , Elm.string foldrArg_1 + ] + + +{-| Determine whether *any* characters pass the test. + + any isDigit "90210" == True + any isDigit "R2-D2" == True + any isDigit "heart" == False + +any: (Char.Char -> Bool) -> String -> Bool +-} +any : (Elm.Expression -> Elm.Expression) -> String -> Elm.Expression +any anyArg_ anyArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "any" + , annotation = + Just + (Type.function + [ Type.function [ Type.char ] Type.bool, Type.string ] + Type.bool + ) + } + ) + [ Elm.functionReduced "anyUnpack" anyArg_, Elm.string anyArg_0 ] + + +{-| Determine whether *all* characters pass the test. + + all isDigit "90210" == True + all isDigit "R2-D2" == False + all isDigit "heart" == False + +all: (Char.Char -> Bool) -> String -> Bool +-} +all : (Elm.Expression -> Elm.Expression) -> String -> Elm.Expression +all allArg_ allArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "all" + , annotation = + Just + (Type.function + [ Type.function [ Type.char ] Type.bool, Type.string ] + Type.bool + ) + } + ) + [ Elm.functionReduced "allUnpack" allArg_, Elm.string allArg_0 ] + + +annotation_ : { string : Type.Annotation } +annotation_ = + { string = Type.namedWith [] "String" [] } + + +call_ : + { isEmpty : Elm.Expression -> Elm.Expression + , length : Elm.Expression -> Elm.Expression + , reverse : Elm.Expression -> Elm.Expression + , repeat : Elm.Expression -> Elm.Expression -> Elm.Expression + , replace : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , append : Elm.Expression -> Elm.Expression -> Elm.Expression + , concat : Elm.Expression -> Elm.Expression + , split : Elm.Expression -> Elm.Expression -> Elm.Expression + , join : Elm.Expression -> Elm.Expression -> Elm.Expression + , words : Elm.Expression -> Elm.Expression + , lines : Elm.Expression -> Elm.Expression + , slice : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , left : Elm.Expression -> Elm.Expression -> Elm.Expression + , right : Elm.Expression -> Elm.Expression -> Elm.Expression + , dropLeft : Elm.Expression -> Elm.Expression -> Elm.Expression + , dropRight : Elm.Expression -> Elm.Expression -> Elm.Expression + , contains : Elm.Expression -> Elm.Expression -> Elm.Expression + , startsWith : Elm.Expression -> Elm.Expression -> Elm.Expression + , endsWith : Elm.Expression -> Elm.Expression -> Elm.Expression + , indexes : Elm.Expression -> Elm.Expression -> Elm.Expression + , indices : Elm.Expression -> Elm.Expression -> Elm.Expression + , toInt : Elm.Expression -> Elm.Expression + , fromInt : Elm.Expression -> Elm.Expression + , toFloat : Elm.Expression -> Elm.Expression + , fromFloat : Elm.Expression -> Elm.Expression + , fromChar : Elm.Expression -> Elm.Expression + , cons : Elm.Expression -> Elm.Expression -> Elm.Expression + , uncons : Elm.Expression -> Elm.Expression + , toList : Elm.Expression -> Elm.Expression + , fromList : Elm.Expression -> Elm.Expression + , toUpper : Elm.Expression -> Elm.Expression + , toLower : Elm.Expression -> Elm.Expression + , pad : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , padLeft : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , padRight : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , trim : Elm.Expression -> Elm.Expression + , trimLeft : Elm.Expression -> Elm.Expression + , trimRight : Elm.Expression -> Elm.Expression + , map : Elm.Expression -> Elm.Expression -> Elm.Expression + , filter : Elm.Expression -> Elm.Expression -> Elm.Expression + , foldl : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , foldr : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , any : Elm.Expression -> Elm.Expression -> Elm.Expression + , all : Elm.Expression -> Elm.Expression -> Elm.Expression + } +call_ = + { isEmpty = + \isEmptyArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "isEmpty" + , annotation = + Just (Type.function [ Type.string ] Type.bool) + } + ) + [ isEmptyArg_ ] + , length = + \lengthArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "length" + , annotation = + Just (Type.function [ Type.string ] Type.int) + } + ) + [ lengthArg_ ] + , reverse = + \reverseArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "reverse" + , annotation = + Just (Type.function [ Type.string ] Type.string) + } + ) + [ reverseArg_ ] + , repeat = + \repeatArg_ repeatArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "repeat" + , annotation = + Just + (Type.function + [ Type.int, Type.string ] + Type.string + ) + } + ) + [ repeatArg_, repeatArg_0 ] + , replace = + \replaceArg_ replaceArg_0 replaceArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "replace" + , annotation = + Just + (Type.function + [ Type.string, Type.string, Type.string ] + Type.string + ) + } + ) + [ replaceArg_, replaceArg_0, replaceArg_1 ] + , append = + \appendArg_ appendArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "append" + , annotation = + Just + (Type.function + [ Type.string, Type.string ] + Type.string + ) + } + ) + [ appendArg_, appendArg_0 ] + , concat = + \concatArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "concat" + , annotation = + Just + (Type.function + [ Type.list Type.string ] + Type.string + ) + } + ) + [ concatArg_ ] + , split = + \splitArg_ splitArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "split" + , annotation = + Just + (Type.function + [ Type.string, Type.string ] + (Type.list Type.string) + ) + } + ) + [ splitArg_, splitArg_0 ] + , join = + \joinArg_ joinArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "join" + , annotation = + Just + (Type.function + [ Type.string, Type.list Type.string ] + Type.string + ) + } + ) + [ joinArg_, joinArg_0 ] + , words = + \wordsArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "words" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.list Type.string) + ) + } + ) + [ wordsArg_ ] + , lines = + \linesArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "lines" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.list Type.string) + ) + } + ) + [ linesArg_ ] + , slice = + \sliceArg_ sliceArg_0 sliceArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "slice" + , annotation = + Just + (Type.function + [ Type.int, Type.int, Type.string ] + Type.string + ) + } + ) + [ sliceArg_, sliceArg_0, sliceArg_1 ] + , left = + \leftArg_ leftArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "left" + , annotation = + Just + (Type.function + [ Type.int, Type.string ] + Type.string + ) + } + ) + [ leftArg_, leftArg_0 ] + , right = + \rightArg_ rightArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "right" + , annotation = + Just + (Type.function + [ Type.int, Type.string ] + Type.string + ) + } + ) + [ rightArg_, rightArg_0 ] + , dropLeft = + \dropLeftArg_ dropLeftArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "dropLeft" + , annotation = + Just + (Type.function + [ Type.int, Type.string ] + Type.string + ) + } + ) + [ dropLeftArg_, dropLeftArg_0 ] + , dropRight = + \dropRightArg_ dropRightArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "dropRight" + , annotation = + Just + (Type.function + [ Type.int, Type.string ] + Type.string + ) + } + ) + [ dropRightArg_, dropRightArg_0 ] + , contains = + \containsArg_ containsArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "contains" + , annotation = + Just + (Type.function + [ Type.string, Type.string ] + Type.bool + ) + } + ) + [ containsArg_, containsArg_0 ] + , startsWith = + \startsWithArg_ startsWithArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "startsWith" + , annotation = + Just + (Type.function + [ Type.string, Type.string ] + Type.bool + ) + } + ) + [ startsWithArg_, startsWithArg_0 ] + , endsWith = + \endsWithArg_ endsWithArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "endsWith" + , annotation = + Just + (Type.function + [ Type.string, Type.string ] + Type.bool + ) + } + ) + [ endsWithArg_, endsWithArg_0 ] + , indexes = + \indexesArg_ indexesArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "indexes" + , annotation = + Just + (Type.function + [ Type.string, Type.string ] + (Type.list Type.int) + ) + } + ) + [ indexesArg_, indexesArg_0 ] + , indices = + \indicesArg_ indicesArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "indices" + , annotation = + Just + (Type.function + [ Type.string, Type.string ] + (Type.list Type.int) + ) + } + ) + [ indicesArg_, indicesArg_0 ] + , toInt = + \toIntArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "toInt" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.maybe Type.int) + ) + } + ) + [ toIntArg_ ] + , fromInt = + \fromIntArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "fromInt" + , annotation = + Just (Type.function [ Type.int ] Type.string) + } + ) + [ fromIntArg_ ] + , toFloat = + \toFloatArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "toFloat" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.maybe Type.float) + ) + } + ) + [ toFloatArg_ ] + , fromFloat = + \fromFloatArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "fromFloat" + , annotation = + Just (Type.function [ Type.float ] Type.string) + } + ) + [ fromFloatArg_ ] + , fromChar = + \fromCharArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "fromChar" + , annotation = + Just (Type.function [ Type.char ] Type.string) + } + ) + [ fromCharArg_ ] + , cons = + \consArg_ consArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "cons" + , annotation = + Just + (Type.function + [ Type.char, Type.string ] + Type.string + ) + } + ) + [ consArg_, consArg_0 ] + , uncons = + \unconsArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "uncons" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.maybe (Type.tuple Type.char Type.string) + ) + ) + } + ) + [ unconsArg_ ] + , toList = + \toListArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "toList" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.list Type.char) + ) + } + ) + [ toListArg_ ] + , fromList = + \fromListArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "fromList" + , annotation = + Just + (Type.function [ Type.list Type.char ] Type.string) + } + ) + [ fromListArg_ ] + , toUpper = + \toUpperArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "toUpper" + , annotation = + Just (Type.function [ Type.string ] Type.string) + } + ) + [ toUpperArg_ ] + , toLower = + \toLowerArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "toLower" + , annotation = + Just (Type.function [ Type.string ] Type.string) + } + ) + [ toLowerArg_ ] + , pad = + \padArg_ padArg_0 padArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "pad" + , annotation = + Just + (Type.function + [ Type.int, Type.char, Type.string ] + Type.string + ) + } + ) + [ padArg_, padArg_0, padArg_1 ] + , padLeft = + \padLeftArg_ padLeftArg_0 padLeftArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "padLeft" + , annotation = + Just + (Type.function + [ Type.int, Type.char, Type.string ] + Type.string + ) + } + ) + [ padLeftArg_, padLeftArg_0, padLeftArg_1 ] + , padRight = + \padRightArg_ padRightArg_0 padRightArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "padRight" + , annotation = + Just + (Type.function + [ Type.int, Type.char, Type.string ] + Type.string + ) + } + ) + [ padRightArg_, padRightArg_0, padRightArg_1 ] + , trim = + \trimArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "trim" + , annotation = + Just (Type.function [ Type.string ] Type.string) + } + ) + [ trimArg_ ] + , trimLeft = + \trimLeftArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "trimLeft" + , annotation = + Just (Type.function [ Type.string ] Type.string) + } + ) + [ trimLeftArg_ ] + , trimRight = + \trimRightArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "trimRight" + , annotation = + Just (Type.function [ Type.string ] Type.string) + } + ) + [ trimRightArg_ ] + , map = + \mapArg_ mapArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function [ Type.char ] Type.char + , Type.string + ] + Type.string + ) + } + ) + [ mapArg_, mapArg_0 ] + , filter = + \filterArg_ filterArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "filter" + , annotation = + Just + (Type.function + [ Type.function [ Type.char ] Type.bool + , Type.string + ] + Type.string + ) + } + ) + [ filterArg_, filterArg_0 ] + , foldl = + \foldlArg_ foldlArg_0 foldlArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "foldl" + , annotation = + Just + (Type.function + [ Type.function + [ Type.char, Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.string + ] + (Type.var "b") + ) + } + ) + [ foldlArg_, foldlArg_0, foldlArg_1 ] + , foldr = + \foldrArg_ foldrArg_0 foldrArg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "foldr" + , annotation = + Just + (Type.function + [ Type.function + [ Type.char, Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.string + ] + (Type.var "b") + ) + } + ) + [ foldrArg_, foldrArg_0, foldrArg_1 ] + , any = + \anyArg_ anyArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "any" + , annotation = + Just + (Type.function + [ Type.function [ Type.char ] Type.bool + , Type.string + ] + Type.bool + ) + } + ) + [ anyArg_, anyArg_0 ] + , all = + \allArg_ allArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "String" ] + , name = "all" + , annotation = + Just + (Type.function + [ Type.function [ Type.char ] Type.bool + , Type.string + ] + Type.bool + ) + } + ) + [ allArg_, allArg_0 ] + } + + +values_ : + { isEmpty : Elm.Expression + , length : Elm.Expression + , reverse : Elm.Expression + , repeat : Elm.Expression + , replace : Elm.Expression + , append : Elm.Expression + , concat : Elm.Expression + , split : Elm.Expression + , join : Elm.Expression + , words : Elm.Expression + , lines : Elm.Expression + , slice : Elm.Expression + , left : Elm.Expression + , right : Elm.Expression + , dropLeft : Elm.Expression + , dropRight : Elm.Expression + , contains : Elm.Expression + , startsWith : Elm.Expression + , endsWith : Elm.Expression + , indexes : Elm.Expression + , indices : Elm.Expression + , toInt : Elm.Expression + , fromInt : Elm.Expression + , toFloat : Elm.Expression + , fromFloat : Elm.Expression + , fromChar : Elm.Expression + , cons : Elm.Expression + , uncons : Elm.Expression + , toList : Elm.Expression + , fromList : Elm.Expression + , toUpper : Elm.Expression + , toLower : Elm.Expression + , pad : Elm.Expression + , padLeft : Elm.Expression + , padRight : Elm.Expression + , trim : Elm.Expression + , trimLeft : Elm.Expression + , trimRight : Elm.Expression + , map : Elm.Expression + , filter : Elm.Expression + , foldl : Elm.Expression + , foldr : Elm.Expression + , any : Elm.Expression + , all : Elm.Expression + } +values_ = + { isEmpty = + Elm.value + { importFrom = [ "String" ] + , name = "isEmpty" + , annotation = Just (Type.function [ Type.string ] Type.bool) + } + , length = + Elm.value + { importFrom = [ "String" ] + , name = "length" + , annotation = Just (Type.function [ Type.string ] Type.int) + } + , reverse = + Elm.value + { importFrom = [ "String" ] + , name = "reverse" + , annotation = Just (Type.function [ Type.string ] Type.string) + } + , repeat = + Elm.value + { importFrom = [ "String" ] + , name = "repeat" + , annotation = + Just (Type.function [ Type.int, Type.string ] Type.string) + } + , replace = + Elm.value + { importFrom = [ "String" ] + , name = "replace" + , annotation = + Just + (Type.function + [ Type.string, Type.string, Type.string ] + Type.string + ) + } + , append = + Elm.value + { importFrom = [ "String" ] + , name = "append" + , annotation = + Just (Type.function [ Type.string, Type.string ] Type.string) + } + , concat = + Elm.value + { importFrom = [ "String" ] + , name = "concat" + , annotation = + Just (Type.function [ Type.list Type.string ] Type.string) + } + , split = + Elm.value + { importFrom = [ "String" ] + , name = "split" + , annotation = + Just + (Type.function + [ Type.string, Type.string ] + (Type.list Type.string) + ) + } + , join = + Elm.value + { importFrom = [ "String" ] + , name = "join" + , annotation = + Just + (Type.function + [ Type.string, Type.list Type.string ] + Type.string + ) + } + , words = + Elm.value + { importFrom = [ "String" ] + , name = "words" + , annotation = + Just (Type.function [ Type.string ] (Type.list Type.string)) + } + , lines = + Elm.value + { importFrom = [ "String" ] + , name = "lines" + , annotation = + Just (Type.function [ Type.string ] (Type.list Type.string)) + } + , slice = + Elm.value + { importFrom = [ "String" ] + , name = "slice" + , annotation = + Just + (Type.function + [ Type.int, Type.int, Type.string ] + Type.string + ) + } + , left = + Elm.value + { importFrom = [ "String" ] + , name = "left" + , annotation = + Just (Type.function [ Type.int, Type.string ] Type.string) + } + , right = + Elm.value + { importFrom = [ "String" ] + , name = "right" + , annotation = + Just (Type.function [ Type.int, Type.string ] Type.string) + } + , dropLeft = + Elm.value + { importFrom = [ "String" ] + , name = "dropLeft" + , annotation = + Just (Type.function [ Type.int, Type.string ] Type.string) + } + , dropRight = + Elm.value + { importFrom = [ "String" ] + , name = "dropRight" + , annotation = + Just (Type.function [ Type.int, Type.string ] Type.string) + } + , contains = + Elm.value + { importFrom = [ "String" ] + , name = "contains" + , annotation = + Just (Type.function [ Type.string, Type.string ] Type.bool) + } + , startsWith = + Elm.value + { importFrom = [ "String" ] + , name = "startsWith" + , annotation = + Just (Type.function [ Type.string, Type.string ] Type.bool) + } + , endsWith = + Elm.value + { importFrom = [ "String" ] + , name = "endsWith" + , annotation = + Just (Type.function [ Type.string, Type.string ] Type.bool) + } + , indexes = + Elm.value + { importFrom = [ "String" ] + , name = "indexes" + , annotation = + Just + (Type.function + [ Type.string, Type.string ] + (Type.list Type.int) + ) + } + , indices = + Elm.value + { importFrom = [ "String" ] + , name = "indices" + , annotation = + Just + (Type.function + [ Type.string, Type.string ] + (Type.list Type.int) + ) + } + , toInt = + Elm.value + { importFrom = [ "String" ] + , name = "toInt" + , annotation = + Just (Type.function [ Type.string ] (Type.maybe Type.int)) + } + , fromInt = + Elm.value + { importFrom = [ "String" ] + , name = "fromInt" + , annotation = Just (Type.function [ Type.int ] Type.string) + } + , toFloat = + Elm.value + { importFrom = [ "String" ] + , name = "toFloat" + , annotation = + Just (Type.function [ Type.string ] (Type.maybe Type.float)) + } + , fromFloat = + Elm.value + { importFrom = [ "String" ] + , name = "fromFloat" + , annotation = Just (Type.function [ Type.float ] Type.string) + } + , fromChar = + Elm.value + { importFrom = [ "String" ] + , name = "fromChar" + , annotation = Just (Type.function [ Type.char ] Type.string) + } + , cons = + Elm.value + { importFrom = [ "String" ] + , name = "cons" + , annotation = + Just (Type.function [ Type.char, Type.string ] Type.string) + } + , uncons = + Elm.value + { importFrom = [ "String" ] + , name = "uncons" + , annotation = + Just + (Type.function + [ Type.string ] + (Type.maybe (Type.tuple Type.char Type.string)) + ) + } + , toList = + Elm.value + { importFrom = [ "String" ] + , name = "toList" + , annotation = + Just (Type.function [ Type.string ] (Type.list Type.char)) + } + , fromList = + Elm.value + { importFrom = [ "String" ] + , name = "fromList" + , annotation = + Just (Type.function [ Type.list Type.char ] Type.string) + } + , toUpper = + Elm.value + { importFrom = [ "String" ] + , name = "toUpper" + , annotation = Just (Type.function [ Type.string ] Type.string) + } + , toLower = + Elm.value + { importFrom = [ "String" ] + , name = "toLower" + , annotation = Just (Type.function [ Type.string ] Type.string) + } + , pad = + Elm.value + { importFrom = [ "String" ] + , name = "pad" + , annotation = + Just + (Type.function + [ Type.int, Type.char, Type.string ] + Type.string + ) + } + , padLeft = + Elm.value + { importFrom = [ "String" ] + , name = "padLeft" + , annotation = + Just + (Type.function + [ Type.int, Type.char, Type.string ] + Type.string + ) + } + , padRight = + Elm.value + { importFrom = [ "String" ] + , name = "padRight" + , annotation = + Just + (Type.function + [ Type.int, Type.char, Type.string ] + Type.string + ) + } + , trim = + Elm.value + { importFrom = [ "String" ] + , name = "trim" + , annotation = Just (Type.function [ Type.string ] Type.string) + } + , trimLeft = + Elm.value + { importFrom = [ "String" ] + , name = "trimLeft" + , annotation = Just (Type.function [ Type.string ] Type.string) + } + , trimRight = + Elm.value + { importFrom = [ "String" ] + , name = "trimRight" + , annotation = Just (Type.function [ Type.string ] Type.string) + } + , map = + Elm.value + { importFrom = [ "String" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function [ Type.char ] Type.char, Type.string ] + Type.string + ) + } + , filter = + Elm.value + { importFrom = [ "String" ] + , name = "filter" + , annotation = + Just + (Type.function + [ Type.function [ Type.char ] Type.bool, Type.string ] + Type.string + ) + } + , foldl = + Elm.value + { importFrom = [ "String" ] + , name = "foldl" + , annotation = + Just + (Type.function + [ Type.function + [ Type.char, Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.string + ] + (Type.var "b") + ) + } + , foldr = + Elm.value + { importFrom = [ "String" ] + , name = "foldr" + , annotation = + Just + (Type.function + [ Type.function + [ Type.char, Type.var "b" ] + (Type.var "b") + , Type.var "b" + , Type.string + ] + (Type.var "b") + ) + } + , any = + Elm.value + { importFrom = [ "String" ] + , name = "any" + , annotation = + Just + (Type.function + [ Type.function [ Type.char ] Type.bool, Type.string ] + Type.bool + ) + } + , all = + Elm.value + { importFrom = [ "String" ] + , name = "all" + , annotation = + Just + (Type.function + [ Type.function [ Type.char ] Type.bool, Type.string ] + Type.bool + ) + } + } \ No newline at end of file diff --git a/example-using-api/codegen/Gen/Task.elm b/example-using-api/codegen/Gen/Task.elm new file mode 100644 index 00000000..a7c05999 --- /dev/null +++ b/example-using-api/codegen/Gen/Task.elm @@ -0,0 +1,1499 @@ +module Gen.Task exposing + ( moduleName_, perform, attempt, andThen, succeed, fail + , sequence, map, map2, map3, map4, map5, onError + , mapError, annotation_, call_, values_ + ) + +{-| +# Generated bindings for Task + +@docs moduleName_, perform, attempt, andThen, succeed, fail +@docs sequence, map, map2, map3, map4, map5 +@docs onError, mapError, annotation_, call_, values_ +-} + + +import Elm +import Elm.Annotation as Type + + +{-| The name of this module. -} +moduleName_ : List String +moduleName_ = + [ "Task" ] + + +{-| Like I was saying in the [`Task`](#Task) documentation, just having a +`Task` does not mean it is done. We must command Elm to `perform` the task: + + import Time -- elm install elm/time + import Task + + type Msg + = Click + | Search String + | NewTime Time.Posix + + getNewTime : Cmd Msg + getNewTime = + Task.perform NewTime Time.now + +If you have worked through [`guide.elm-lang.org`][guide] (highly recommended!) +you will recognize `Cmd` from the section on The Elm Architecture. So we have +changed a task like "make delicious lasagna" into a command like "Hey Elm, make +delicious lasagna and give it to my `update` function as a `Msg` value." + +[guide]: https://guide.elm-lang.org/ + +perform: (a -> msg) -> Task.Task Basics.Never a -> Platform.Cmd.Cmd msg +-} +perform : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +perform performArg_ performArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "perform" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] (Type.var "msg") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.namedWith [ "Basics" ] "Never" [] + , Type.var "a" + ] + ] + (Type.namedWith [] "Cmd" [ Type.var "msg" ]) + ) + } + ) + [ Elm.functionReduced "performUnpack" performArg_, performArg_0 ] + + +{-| This is very similar to [`perform`](#perform) except it can handle failures! +So we could _attempt_ to focus on a certain DOM node like this: + + import Browser.Dom -- elm install elm/browser + import Task + + type Msg + = Click + | Search String + | Focus (Result Browser.DomError ()) + + focus : Cmd Msg + focus = + Task.attempt Focus (Browser.Dom.focus "my-app-search-box") + +So the task is "focus on this DOM node" and we are turning it into the command +"Hey Elm, attempt to focus on this DOM node and give me a `Msg` about whether +you succeeded or failed." + +**Note:** Definitely work through [`guide.elm-lang.org`][guide] to get a +feeling for how commands fit into The Elm Architecture. + +[guide]: https://guide.elm-lang.org/ + +attempt: (Result.Result x a -> msg) -> Task.Task x a -> Platform.Cmd.Cmd msg +-} +attempt : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +attempt attemptArg_ attemptArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "attempt" + , annotation = + Just + (Type.function + [ Type.function + [ Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.var "msg") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith [] "Cmd" [ Type.var "msg" ]) + ) + } + ) + [ Elm.functionReduced "attemptUnpack" attemptArg_, attemptArg_0 ] + + +{-| Chain together a task and a callback. The first task will run, and if it is +successful, you give the result to the callback resulting in another task. This +task then gets run. We could use this to make a task that resolves an hour from +now: + + import Time -- elm install elm/time + import Process + + timeInOneHour : Task x Time.Posix + timeInOneHour = + Process.sleep (60 * 60 * 1000) + |> andThen (\_ -> Time.now) + +First the process sleeps for an hour **and then** it tells us what time it is. + +andThen: (a -> Task.Task x b) -> Task.Task x a -> Task.Task x b +-} +andThen : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +andThen andThenArg_ andThenArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "andThen" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + ) + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + ) + ) + } + ) + [ Elm.functionReduced "andThenUnpack" andThenArg_, andThenArg_0 ] + + +{-| A task that succeeds immediately when run. It is usually used with +[`andThen`](#andThen). You can use it like `map` if you want: + + import Time -- elm install elm/time + + timeInMillis : Task x Int + timeInMillis = + Time.now + |> andThen (\t -> succeed (Time.posixToMillis t)) + +succeed: a -> Task.Task x a +-} +succeed : Elm.Expression -> Elm.Expression +succeed succeedArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "succeed" + , annotation = + Just + (Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ) + ) + } + ) + [ succeedArg_ ] + + +{-| A task that fails immediately when run. Like with `succeed`, this can be +used with `andThen` to check on the outcome of another task. + + type Error = NotFound + + notFound : Task Error a + notFound = + fail NotFound + +fail: x -> Task.Task x a +-} +fail : Elm.Expression -> Elm.Expression +fail failArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "fail" + , annotation = + Just + (Type.function + [ Type.var "x" ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ) + ) + } + ) + [ failArg_ ] + + +{-| Start with a list of tasks, and turn them into a single task that returns a +list. The tasks will be run in order one-by-one and if any task fails the whole +sequence fails. + + sequence [ succeed 1, succeed 2 ] == succeed [ 1, 2 ] + +sequence: List (Task.Task x a) -> Task.Task x (List a) +-} +sequence : List Elm.Expression -> Elm.Expression +sequence sequenceArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "sequence" + , annotation = + Just + (Type.function + [ Type.list + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ) + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.list (Type.var "a") ] + ) + ) + } + ) + [ Elm.list sequenceArg_ ] + + +{-| Transform a task. Maybe you want to use [`elm/time`][time] to figure +out what time it will be in one hour: + + import Task exposing (Task) + import Time -- elm install elm/time + + timeInOneHour : Task x Time.Posix + timeInOneHour = + Task.map addAnHour Time.now + + addAnHour : Time.Posix -> Time.Posix + addAnHour time = + Time.millisToPosix (Time.posixToMillis time + 60 * 60 * 1000) + +[time]: /packages/elm/time/latest/ + +map: (a -> b) -> Task.Task x a -> Task.Task x b +-} +map : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +map mapArg_ mapArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] (Type.var "b") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + ) + ) + } + ) + [ Elm.functionReduced "mapUnpack" mapArg_, mapArg_0 ] + + +{-| Put the results of two tasks together. For example, if we wanted to know +the current month, we could use [`elm/time`][time] to ask: + + import Task exposing (Task) + import Time -- elm install elm/time + + getMonth : Task x Int + getMonth = + Task.map2 Time.toMonth Time.here Time.now + +**Note:** Say we were doing HTTP requests instead. `map2` does each task in +order, so it would try the first request and only continue after it succeeds. +If it fails, the whole thing fails! + +[time]: /packages/elm/time/latest/ + +map2: (a -> b -> result) -> Task.Task x a -> Task.Task x b -> Task.Task x result +-} +map2 : + (Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map2 map2Arg_ map2Arg_0 map2Arg_1 = + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "result") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "result" ] + ) + ) + } + ) + [ Elm.functionReduced + "map2Unpack" + (\functionReducedUnpack -> + Elm.functionReduced "unpack" (map2Arg_ functionReducedUnpack) + ) + , map2Arg_0 + , map2Arg_1 + ] + + +{-| map3: + (a -> b -> c -> result) + -> Task.Task x a + -> Task.Task x b + -> Task.Task x c + -> Task.Task x result +-} +map3 : + (Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map3 map3Arg_ map3Arg_0 map3Arg_1 map3Arg_2 = + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b", Type.var "c" ] + (Type.var "result") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "c" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "result" ] + ) + ) + } + ) + [ Elm.functionReduced + "map3Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + ((map3Arg_ functionReducedUnpack) + functionReducedUnpack0 + ) + ) + ) + , map3Arg_0 + , map3Arg_1 + , map3Arg_2 + ] + + +{-| map4: + (a -> b -> c -> d -> result) + -> Task.Task x a + -> Task.Task x b + -> Task.Task x c + -> Task.Task x d + -> Task.Task x result +-} +map4 : + (Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map4 map4Arg_ map4Arg_0 map4Arg_1 map4Arg_2 map4Arg_3 = + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "result") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "c" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "d" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "result" ] + ) + ) + } + ) + [ Elm.functionReduced + "map4Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (((map4Arg_ functionReducedUnpack) + functionReducedUnpack0 + ) + functionReducedUnpack_2_1_2_0_2_0_2_0_0 + ) + ) + ) + ) + , map4Arg_0 + , map4Arg_1 + , map4Arg_2 + , map4Arg_3 + ] + + +{-| map5: + (a -> b -> c -> d -> e -> result) + -> Task.Task x a + -> Task.Task x b + -> Task.Task x c + -> Task.Task x d + -> Task.Task x e + -> Task.Task x result +-} +map5 : + (Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression) + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression +map5 map5Arg_ map5Arg_0 map5Arg_1 map5Arg_2 map5Arg_3 map5Arg_4 = + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "result") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "c" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "d" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "e" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "result" ] + ) + ) + } + ) + [ Elm.functionReduced + "map5Unpack" + (\functionReducedUnpack -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + (\functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 -> + Elm.functionReduced + "unpack" + ((((map5Arg_ functionReducedUnpack + ) + functionReducedUnpack0 + ) + functionReducedUnpack_2_1_2_0_2_0_2_0_0 + ) + functionReducedUnpack_2_1_2_1_2_0_2_0_2_0_0 + ) + ) + ) + ) + ) + , map5Arg_0 + , map5Arg_1 + , map5Arg_2 + , map5Arg_3 + , map5Arg_4 + ] + + +{-| Recover from a failure in a task. If the given task fails, we use the +callback to recover. + + fail "file not found" + |> onError (\msg -> succeed 42) + -- succeed 42 + + succeed 9 + |> onError (\msg -> succeed 42) + -- succeed 9 + +onError: (x -> Task.Task y a) -> Task.Task x a -> Task.Task y a +-} +onError : (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +onError onErrorArg_ onErrorArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "onError" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "x" ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "y", Type.var "a" ] + ) + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "y", Type.var "a" ] + ) + ) + } + ) + [ Elm.functionReduced "onErrorUnpack" onErrorArg_, onErrorArg_0 ] + + +{-| Transform the error value. This can be useful if you need a bunch of error +types to match up. + + type Error + = Http Http.Error + | WebGL WebGL.Error + + getResources : Task Error Resource + getResources = + sequence + [ mapError Http serverTask + , mapError WebGL textureTask + ] + +mapError: (x -> y) -> Task.Task x a -> Task.Task y a +-} +mapError : + (Elm.Expression -> Elm.Expression) -> Elm.Expression -> Elm.Expression +mapError mapErrorArg_ mapErrorArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "mapError" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "x" ] (Type.var "y") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "y", Type.var "a" ] + ) + ) + } + ) + [ Elm.functionReduced "mapErrorUnpack" mapErrorArg_, mapErrorArg_0 ] + + +annotation_ : { task : Type.Annotation -> Type.Annotation -> Type.Annotation } +annotation_ = + { task = + \taskArg0 taskArg1 -> + Type.alias + moduleName_ + "Task" + [ taskArg0, taskArg1 ] + (Type.namedWith + [ "Platform" ] + "Task" + [ Type.var "x", Type.var "a" ] + ) + } + + +call_ : + { perform : Elm.Expression -> Elm.Expression -> Elm.Expression + , attempt : Elm.Expression -> Elm.Expression -> Elm.Expression + , andThen : Elm.Expression -> Elm.Expression -> Elm.Expression + , succeed : Elm.Expression -> Elm.Expression + , fail : Elm.Expression -> Elm.Expression + , sequence : Elm.Expression -> Elm.Expression + , map : Elm.Expression -> Elm.Expression -> Elm.Expression + , map2 : + Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression + , map3 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , map4 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , map5 : + Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + -> Elm.Expression + , onError : Elm.Expression -> Elm.Expression -> Elm.Expression + , mapError : Elm.Expression -> Elm.Expression -> Elm.Expression + } +call_ = + { perform = + \performArg_ performArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "perform" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.var "msg") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.namedWith [ "Basics" ] "Never" [] + , Type.var "a" + ] + ] + (Type.namedWith [] "Cmd" [ Type.var "msg" ]) + ) + } + ) + [ performArg_, performArg_0 ] + , attempt = + \attemptArg_ attemptArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "attempt" + , annotation = + Just + (Type.function + [ Type.function + [ Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.var "msg") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith [] "Cmd" [ Type.var "msg" ]) + ) + } + ) + [ attemptArg_, attemptArg_0 ] + , andThen = + \andThenArg_ andThenArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "andThen" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + ) + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + ) + ) + } + ) + [ andThenArg_, andThenArg_0 ] + , succeed = + \succeedArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "succeed" + , annotation = + Just + (Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ) + ) + } + ) + [ succeedArg_ ] + , fail = + \failArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "fail" + , annotation = + Just + (Type.function + [ Type.var "x" ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ) + ) + } + ) + [ failArg_ ] + , sequence = + \sequenceArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "sequence" + , annotation = + Just + (Type.function + [ Type.list + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ) + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x" + , Type.list (Type.var "a") + ] + ) + ) + } + ) + [ sequenceArg_ ] + , map = + \mapArg_ mapArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.var "b") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + ) + ) + } + ) + [ mapArg_, mapArg_0 ] + , map2 = + \map2Arg_ map2Arg_0 map2Arg_1 -> + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "result") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "result" ] + ) + ) + } + ) + [ map2Arg_, map2Arg_0, map2Arg_1 ] + , map3 = + \map3Arg_ map3Arg_0 map3Arg_1 map3Arg_2 -> + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + ] + (Type.var "result") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "c" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "result" ] + ) + ) + } + ) + [ map3Arg_, map3Arg_0, map3Arg_1, map3Arg_2 ] + , map4 = + \map4Arg_ map4Arg_0 map4Arg_1 map4Arg_2 map4Arg_3 -> + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "result") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "c" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "d" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "result" ] + ) + ) + } + ) + [ map4Arg_, map4Arg_0, map4Arg_1, map4Arg_2, map4Arg_3 ] + , map5 = + \map5Arg_ map5Arg_0 map5Arg_1 map5Arg_2 map5Arg_3 map5Arg_4 -> + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "result") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "c" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "d" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "e" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "result" ] + ) + ) + } + ) + [ map5Arg_ + , map5Arg_0 + , map5Arg_1 + , map5Arg_2 + , map5Arg_3 + , map5Arg_4 + ] + , onError = + \onErrorArg_ onErrorArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "onError" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "x" ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "y", Type.var "a" ] + ) + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "y", Type.var "a" ] + ) + ) + } + ) + [ onErrorArg_, onErrorArg_0 ] + , mapError = + \mapErrorArg_ mapErrorArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Task" ] + , name = "mapError" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "x" ] + (Type.var "y") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "y", Type.var "a" ] + ) + ) + } + ) + [ mapErrorArg_, mapErrorArg_0 ] + } + + +values_ : + { perform : Elm.Expression + , attempt : Elm.Expression + , andThen : Elm.Expression + , succeed : Elm.Expression + , fail : Elm.Expression + , sequence : Elm.Expression + , map : Elm.Expression + , map2 : Elm.Expression + , map3 : Elm.Expression + , map4 : Elm.Expression + , map5 : Elm.Expression + , onError : Elm.Expression + , mapError : Elm.Expression + } +values_ = + { perform = + Elm.value + { importFrom = [ "Task" ] + , name = "perform" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] (Type.var "msg") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.namedWith [ "Basics" ] "Never" [] + , Type.var "a" + ] + ] + (Type.namedWith [] "Cmd" [ Type.var "msg" ]) + ) + } + , attempt = + Elm.value + { importFrom = [ "Task" ] + , name = "attempt" + , annotation = + Just + (Type.function + [ Type.function + [ Type.namedWith + [ "Result" ] + "Result" + [ Type.var "x", Type.var "a" ] + ] + (Type.var "msg") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith [] "Cmd" [ Type.var "msg" ]) + ) + } + , andThen = + Elm.value + { importFrom = [ "Task" ] + , name = "andThen" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + ) + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + ) + ) + } + , succeed = + Elm.value + { importFrom = [ "Task" ] + , name = "succeed" + , annotation = + Just + (Type.function + [ Type.var "a" ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ) + ) + } + , fail = + Elm.value + { importFrom = [ "Task" ] + , name = "fail" + , annotation = + Just + (Type.function + [ Type.var "x" ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ) + ) + } + , sequence = + Elm.value + { importFrom = [ "Task" ] + , name = "sequence" + , annotation = + Just + (Type.function + [ Type.list + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ) + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.list (Type.var "a") ] + ) + ) + } + , map = + Elm.value + { importFrom = [ "Task" ] + , name = "map" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "a" ] (Type.var "b") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + ) + ) + } + , map2 = + Elm.value + { importFrom = [ "Task" ] + , name = "map2" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b" ] + (Type.var "result") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "result" ] + ) + ) + } + , map3 = + Elm.value + { importFrom = [ "Task" ] + , name = "map3" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a", Type.var "b", Type.var "c" ] + (Type.var "result") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "c" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "result" ] + ) + ) + } + , map4 = + Elm.value + { importFrom = [ "Task" ] + , name = "map4" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + ] + (Type.var "result") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "c" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "d" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "result" ] + ) + ) + } + , map5 = + Elm.value + { importFrom = [ "Task" ] + , name = "map5" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "a" + , Type.var "b" + , Type.var "c" + , Type.var "d" + , Type.var "e" + ] + (Type.var "result") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "b" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "c" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "d" ] + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "e" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "result" ] + ) + ) + } + , onError = + Elm.value + { importFrom = [ "Task" ] + , name = "onError" + , annotation = + Just + (Type.function + [ Type.function + [ Type.var "x" ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "y", Type.var "a" ] + ) + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "y", Type.var "a" ] + ) + ) + } + , mapError = + Elm.value + { importFrom = [ "Task" ] + , name = "mapError" + , annotation = + Just + (Type.function + [ Type.function [ Type.var "x" ] (Type.var "y") + , Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.var "a" ] + ] + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "y", Type.var "a" ] + ) + ) + } + } \ No newline at end of file diff --git a/example-using-api/codegen/Gen/Time.elm b/example-using-api/codegen/Gen/Time.elm new file mode 100644 index 00000000..e105e88f --- /dev/null +++ b/example-using-api/codegen/Gen/Time.elm @@ -0,0 +1,1267 @@ +module Gen.Time exposing + ( moduleName_, now, every, posixToMillis, millisToPosix, utc + , here, toYear, toMonth, toDay, toWeekday, toHour, toMinute + , toSecond, toMillis, customZone, getZoneName, annotation_, make_, caseOf_ + , call_, values_ + ) + +{-| +# Generated bindings for Time + +@docs moduleName_, now, every, posixToMillis, millisToPosix, utc +@docs here, toYear, toMonth, toDay, toWeekday, toHour +@docs toMinute, toSecond, toMillis, customZone, getZoneName, annotation_ +@docs make_, caseOf_, call_, values_ +-} + + +import Elm +import Elm.Annotation as Type +import Elm.Arg +import Elm.Case + + +{-| The name of this module. -} +moduleName_ : List String +moduleName_ = + [ "Time" ] + + +{-| Get the POSIX time at the moment when this task is run. + +now: Task.Task x Time.Posix +-} +now : Elm.Expression +now = + Elm.value + { importFrom = [ "Time" ] + , name = "now" + , annotation = + Just + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.namedWith [ "Time" ] "Posix" [] ] + ) + } + + +{-| Get the current time periodically. How often though? Well, you provide an +interval in milliseconds (like `1000` for a second or `60 * 1000` for a minute +or `60 * 60 * 1000` for an hour) and that is how often you get a new time! + +Check out [this example](https://elm-lang.org/examples/time) to see how to use +it in an application. + +**This function is not for animation.** Use the [`elm/animation-frame`][af] +package for that sort of thing! It syncs up with repaints and will end up +being much smoother for any moving visuals. + +[af]: /packages/elm/animation-frame/latest + +every: Float -> (Time.Posix -> msg) -> Platform.Sub.Sub msg +-} +every : Float -> (Elm.Expression -> Elm.Expression) -> Elm.Expression +every everyArg_ everyArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "every" + , annotation = + Just + (Type.function + [ Type.float + , Type.function + [ Type.namedWith [ "Time" ] "Posix" [] ] + (Type.var "msg") + ] + (Type.namedWith [] "Sub" [ Type.var "msg" ]) + ) + } + ) + [ Elm.float everyArg_, Elm.functionReduced "everyUnpack" everyArg_0 ] + + +{-| Turn a `Posix` time into the number of milliseconds since 1970 January 1 +at 00:00:00 UTC. It was a Thursday. + +posixToMillis: Time.Posix -> Int +-} +posixToMillis : Elm.Expression -> Elm.Expression +posixToMillis posixToMillisArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "posixToMillis" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Posix" [] ] + Type.int + ) + } + ) + [ posixToMillisArg_ ] + + +{-| Turn milliseconds into a `Posix` time. + +millisToPosix: Int -> Time.Posix +-} +millisToPosix : Int -> Elm.Expression +millisToPosix millisToPosixArg_ = + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "millisToPosix" + , annotation = + Just + (Type.function + [ Type.int ] + (Type.namedWith [ "Time" ] "Posix" []) + ) + } + ) + [ Elm.int millisToPosixArg_ ] + + +{-| The time zone for Coordinated Universal Time ([UTC][]) + +The `utc` zone has no time adjustments. It never observes daylight-saving +time and it never shifts around based on political restructuring. + +[UTC]: https://en.wikipedia.org/wiki/Coordinated_Universal_Time + +utc: Time.Zone +-} +utc : Elm.Expression +utc = + Elm.value + { importFrom = [ "Time" ] + , name = "utc" + , annotation = Just (Type.namedWith [ "Time" ] "Zone" []) + } + + +{-| Produce a `Zone` based on the current UTC offset. You can use this to figure +out what day it is where you are: + + import Task exposing (Task) + import Time + + whatDayIsIt : Task x Int + whatDayIsIt = + Task.map2 Time.toDay Time.here Time.now + +**Accuracy Note:** This function can only give time zones like `Etc/GMT+9` or +`Etc/GMT-6`. It cannot give you `Europe/Stockholm`, `Asia/Tokyo`, or any other +normal time zone from the [full list][tz] due to limitations in JavaScript. +For example, if you run `here` in New York City, the resulting `Zone` will +never be `America/New_York`. Instead you get `Etc/GMT-5` or `Etc/GMT-4` +depending on Daylight Saving Time. So even though browsers must have internal +access to `America/New_York` to figure out that offset, there is no public API +to get the full information. This means the `Zone` you get from this function +will act weird if (1) an application stays open across a Daylight Saving Time +boundary or (2) you try to use it on historical data. + +**Future Note:** We can improve `here` when there is good browser support for +JavaScript functions that (1) expose the IANA time zone database and (2) let +you ask the time zone of the computer. The committee that reviews additions to +JavaScript is called TC39, and I encourage you to push for these capabilities! I +cannot do it myself unfortunately. + +**Alternatives:** See the `customZone` docs to learn how to implement stopgaps. + +[tz]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + +here: Task.Task x Time.Zone +-} +here : Elm.Expression +here = + Elm.value + { importFrom = [ "Time" ] + , name = "here" + , annotation = + Just + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.namedWith [ "Time" ] "Zone" [] ] + ) + } + + +{-| What year is it?! + + import Time exposing (toYear, utc, millisToPosix) + + toYear utc (millisToPosix 0) == 1970 + toYear nyc (millisToPosix 0) == 1969 + + -- pretend `nyc` is the `Zone` for America/New_York. + +toYear: Time.Zone -> Time.Posix -> Int +-} +toYear : Elm.Expression -> Elm.Expression -> Elm.Expression +toYear toYearArg_ toYearArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toYear" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + ) + [ toYearArg_, toYearArg_0 ] + + +{-| What month is it?! + + import Time exposing (toMonth, utc, millisToPosix) + + toMonth utc (millisToPosix 0) == Jan + toMonth nyc (millisToPosix 0) == Dec + + -- pretend `nyc` is the `Zone` for America/New_York. + +toMonth: Time.Zone -> Time.Posix -> Time.Month +-} +toMonth : Elm.Expression -> Elm.Expression -> Elm.Expression +toMonth toMonthArg_ toMonthArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toMonth" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + (Type.namedWith [ "Time" ] "Month" []) + ) + } + ) + [ toMonthArg_, toMonthArg_0 ] + + +{-| What day is it?! (Days go from 1 to 31) + + import Time exposing (toDay, utc, millisToPosix) + + toDay utc (millisToPosix 0) == 1 + toDay nyc (millisToPosix 0) == 31 + + -- pretend `nyc` is the `Zone` for America/New_York. + +toDay: Time.Zone -> Time.Posix -> Int +-} +toDay : Elm.Expression -> Elm.Expression -> Elm.Expression +toDay toDayArg_ toDayArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toDay" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + ) + [ toDayArg_, toDayArg_0 ] + + +{-| What day of the week is it? + + import Time exposing (toWeekday, utc, millisToPosix) + + toWeekday utc (millisToPosix 0) == Thu + toWeekday nyc (millisToPosix 0) == Wed + + -- pretend `nyc` is the `Zone` for America/New_York. + +toWeekday: Time.Zone -> Time.Posix -> Time.Weekday +-} +toWeekday : Elm.Expression -> Elm.Expression -> Elm.Expression +toWeekday toWeekdayArg_ toWeekdayArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toWeekday" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + (Type.namedWith [ "Time" ] "Weekday" []) + ) + } + ) + [ toWeekdayArg_, toWeekdayArg_0 ] + + +{-| What hour is it? (From 0 to 23) + + import Time exposing (toHour, utc, millisToPosix) + + toHour utc (millisToPosix 0) == 0 -- 12am + toHour nyc (millisToPosix 0) == 19 -- 7pm + + -- pretend `nyc` is the `Zone` for America/New_York. + +toHour: Time.Zone -> Time.Posix -> Int +-} +toHour : Elm.Expression -> Elm.Expression -> Elm.Expression +toHour toHourArg_ toHourArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toHour" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + ) + [ toHourArg_, toHourArg_0 ] + + +{-| What minute is it? (From 0 to 59) + + import Time exposing (toMinute, utc, millisToPosix) + + toMinute utc (millisToPosix 0) == 0 + +This can be different in different time zones. Some time zones are offset +by 30 or 45 minutes! + +toMinute: Time.Zone -> Time.Posix -> Int +-} +toMinute : Elm.Expression -> Elm.Expression -> Elm.Expression +toMinute toMinuteArg_ toMinuteArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toMinute" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + ) + [ toMinuteArg_, toMinuteArg_0 ] + + +{-| What second is it? + + import Time exposing (toSecond, utc, millisToPosix) + + toSecond utc (millisToPosix 0) == 0 + toSecond utc (millisToPosix 1234) == 1 + toSecond utc (millisToPosix 5678) == 5 + +toSecond: Time.Zone -> Time.Posix -> Int +-} +toSecond : Elm.Expression -> Elm.Expression -> Elm.Expression +toSecond toSecondArg_ toSecondArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toSecond" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + ) + [ toSecondArg_, toSecondArg_0 ] + + +{-| import Time exposing (toMillis, utc, millisToPosix) + + toMillis utc (millisToPosix 0) == 0 + toMillis utc (millisToPosix 1234) == 234 + toMillis utc (millisToPosix 5678) == 678 + +toMillis: Time.Zone -> Time.Posix -> Int +-} +toMillis : Elm.Expression -> Elm.Expression -> Elm.Expression +toMillis toMillisArg_ toMillisArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toMillis" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + ) + [ toMillisArg_, toMillisArg_0 ] + + +{-| **Intended for package authors.** + +The documentation of [`here`](#here) explains that it has certain accuracy +limitations that block on adding new APIs to JavaScript. The `customZone` +function is a stopgap that takes: + +1. A default offset in minutes. So `Etc/GMT-5` is `customZone (-5 * 60) []` +and `Etc/GMT+9` is `customZone (9 * 60) []`. +2. A list of exceptions containing their `start` time in "minutes since the Unix +epoch" and their `offset` in "minutes from UTC" + +Human times will be based on the nearest `start`, falling back on the default +offset if the time is older than all of the exceptions. + +When paired with `getZoneName`, this allows you to load the real IANA time zone +database however you want: HTTP, cache, hardcode, etc. + +**Note:** If you use this, please share your work in an Elm community forum! +I am sure others would like to hear about it, and more experience reports will +help me and the any potential TC39 proposal. + +customZone: Int -> List { start : Int, offset : Int } -> Time.Zone +-} +customZone : Int -> List { start : Int, offset : Int } -> Elm.Expression +customZone customZoneArg_ customZoneArg_0 = + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "customZone" + , annotation = + Just + (Type.function + [ Type.int + , Type.list + (Type.record + [ ( "start", Type.int ) + , ( "offset", Type.int ) + ] + ) + ] + (Type.namedWith [ "Time" ] "Zone" []) + ) + } + ) + [ Elm.int customZoneArg_ + , Elm.list + (List.map + (\unpack -> + Elm.record + [ Tuple.pair "start" (Elm.int unpack.start) + , Tuple.pair "offset" (Elm.int unpack.offset) + ] + ) + customZoneArg_0 + ) + ] + + +{-| **Intended for package authors.** + +Use `Intl.DateTimeFormat().resolvedOptions().timeZone` to try to get names +like `Europe/Moscow` or `America/Havana`. From there you can look it up in any +IANA data you loaded yourself. + +getZoneName: Task.Task x Time.ZoneName +-} +getZoneName : Elm.Expression +getZoneName = + Elm.value + { importFrom = [ "Time" ] + , name = "getZoneName" + , annotation = + Just + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.namedWith [ "Time" ] "ZoneName" [] ] + ) + } + + +annotation_ : + { posix : Type.Annotation + , zone : Type.Annotation + , weekday : Type.Annotation + , month : Type.Annotation + , zoneName : Type.Annotation + } +annotation_ = + { posix = Type.namedWith [ "Time" ] "Posix" [] + , zone = Type.namedWith [ "Time" ] "Zone" [] + , weekday = Type.namedWith [ "Time" ] "Weekday" [] + , month = Type.namedWith [ "Time" ] "Month" [] + , zoneName = Type.namedWith [ "Time" ] "ZoneName" [] + } + + +make_ : + { mon : Elm.Expression + , tue : Elm.Expression + , wed : Elm.Expression + , thu : Elm.Expression + , fri : Elm.Expression + , sat : Elm.Expression + , sun : Elm.Expression + , jan : Elm.Expression + , feb : Elm.Expression + , mar : Elm.Expression + , apr : Elm.Expression + , may : Elm.Expression + , jun : Elm.Expression + , jul : Elm.Expression + , aug : Elm.Expression + , sep : Elm.Expression + , oct : Elm.Expression + , nov : Elm.Expression + , dec : Elm.Expression + , name : Elm.Expression -> Elm.Expression + , offset : Elm.Expression -> Elm.Expression + } +make_ = + { mon = + Elm.value + { importFrom = [ "Time" ] + , name = "Mon" + , annotation = Just (Type.namedWith [] "Weekday" []) + } + , tue = + Elm.value + { importFrom = [ "Time" ] + , name = "Tue" + , annotation = Just (Type.namedWith [] "Weekday" []) + } + , wed = + Elm.value + { importFrom = [ "Time" ] + , name = "Wed" + , annotation = Just (Type.namedWith [] "Weekday" []) + } + , thu = + Elm.value + { importFrom = [ "Time" ] + , name = "Thu" + , annotation = Just (Type.namedWith [] "Weekday" []) + } + , fri = + Elm.value + { importFrom = [ "Time" ] + , name = "Fri" + , annotation = Just (Type.namedWith [] "Weekday" []) + } + , sat = + Elm.value + { importFrom = [ "Time" ] + , name = "Sat" + , annotation = Just (Type.namedWith [] "Weekday" []) + } + , sun = + Elm.value + { importFrom = [ "Time" ] + , name = "Sun" + , annotation = Just (Type.namedWith [] "Weekday" []) + } + , jan = + Elm.value + { importFrom = [ "Time" ] + , name = "Jan" + , annotation = Just (Type.namedWith [] "Month" []) + } + , feb = + Elm.value + { importFrom = [ "Time" ] + , name = "Feb" + , annotation = Just (Type.namedWith [] "Month" []) + } + , mar = + Elm.value + { importFrom = [ "Time" ] + , name = "Mar" + , annotation = Just (Type.namedWith [] "Month" []) + } + , apr = + Elm.value + { importFrom = [ "Time" ] + , name = "Apr" + , annotation = Just (Type.namedWith [] "Month" []) + } + , may = + Elm.value + { importFrom = [ "Time" ] + , name = "May" + , annotation = Just (Type.namedWith [] "Month" []) + } + , jun = + Elm.value + { importFrom = [ "Time" ] + , name = "Jun" + , annotation = Just (Type.namedWith [] "Month" []) + } + , jul = + Elm.value + { importFrom = [ "Time" ] + , name = "Jul" + , annotation = Just (Type.namedWith [] "Month" []) + } + , aug = + Elm.value + { importFrom = [ "Time" ] + , name = "Aug" + , annotation = Just (Type.namedWith [] "Month" []) + } + , sep = + Elm.value + { importFrom = [ "Time" ] + , name = "Sep" + , annotation = Just (Type.namedWith [] "Month" []) + } + , oct = + Elm.value + { importFrom = [ "Time" ] + , name = "Oct" + , annotation = Just (Type.namedWith [] "Month" []) + } + , nov = + Elm.value + { importFrom = [ "Time" ] + , name = "Nov" + , annotation = Just (Type.namedWith [] "Month" []) + } + , dec = + Elm.value + { importFrom = [ "Time" ] + , name = "Dec" + , annotation = Just (Type.namedWith [] "Month" []) + } + , name = + \ar0 -> + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "Name" + , annotation = Just (Type.namedWith [] "ZoneName" []) + } + ) + [ ar0 ] + , offset = + \ar0 -> + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "Offset" + , annotation = Just (Type.namedWith [] "ZoneName" []) + } + ) + [ ar0 ] + } + + +caseOf_ : + { weekday : + Elm.Expression + -> { mon : Elm.Expression + , tue : Elm.Expression + , wed : Elm.Expression + , thu : Elm.Expression + , fri : Elm.Expression + , sat : Elm.Expression + , sun : Elm.Expression + } + -> Elm.Expression + , month : + Elm.Expression + -> { jan : Elm.Expression + , feb : Elm.Expression + , mar : Elm.Expression + , apr : Elm.Expression + , may : Elm.Expression + , jun : Elm.Expression + , jul : Elm.Expression + , aug : Elm.Expression + , sep : Elm.Expression + , oct : Elm.Expression + , nov : Elm.Expression + , dec : Elm.Expression + } + -> Elm.Expression + , zoneName : + Elm.Expression + -> { name : Elm.Expression -> Elm.Expression + , offset : Elm.Expression -> Elm.Expression + } + -> Elm.Expression + } +caseOf_ = + { weekday = + \weekdayExpression weekdayTags -> + Elm.Case.custom + weekdayExpression + (Type.namedWith [ "Time" ] "Weekday" []) + [ Elm.Case.branch + (Elm.Arg.customType "Mon" weekdayTags.mon) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Tue" weekdayTags.tue) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Wed" weekdayTags.wed) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Thu" weekdayTags.thu) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Fri" weekdayTags.fri) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Sat" weekdayTags.sat) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Sun" weekdayTags.sun) + Basics.identity + ] + , month = + \monthExpression monthTags -> + Elm.Case.custom + monthExpression + (Type.namedWith [ "Time" ] "Month" []) + [ Elm.Case.branch + (Elm.Arg.customType "Jan" monthTags.jan) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Feb" monthTags.feb) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Mar" monthTags.mar) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Apr" monthTags.apr) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "May" monthTags.may) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Jun" monthTags.jun) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Jul" monthTags.jul) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Aug" monthTags.aug) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Sep" monthTags.sep) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Oct" monthTags.oct) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Nov" monthTags.nov) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType "Dec" monthTags.dec) + Basics.identity + ] + , zoneName = + \zoneNameExpression zoneNameTags -> + Elm.Case.custom + zoneNameExpression + (Type.namedWith [ "Time" ] "ZoneName" []) + [ Elm.Case.branch + (Elm.Arg.customType "Name" zoneNameTags.name |> Elm.Arg.item + (Elm.Arg.varWith + "arg_0" + Type.string + ) + ) + Basics.identity + , Elm.Case.branch + (Elm.Arg.customType + "Offset" + zoneNameTags.offset |> Elm.Arg.item + (Elm.Arg.varWith + "arg_0" + Type.int + ) + ) + Basics.identity + ] + } + + +call_ : + { every : Elm.Expression -> Elm.Expression -> Elm.Expression + , posixToMillis : Elm.Expression -> Elm.Expression + , millisToPosix : Elm.Expression -> Elm.Expression + , toYear : Elm.Expression -> Elm.Expression -> Elm.Expression + , toMonth : Elm.Expression -> Elm.Expression -> Elm.Expression + , toDay : Elm.Expression -> Elm.Expression -> Elm.Expression + , toWeekday : Elm.Expression -> Elm.Expression -> Elm.Expression + , toHour : Elm.Expression -> Elm.Expression -> Elm.Expression + , toMinute : Elm.Expression -> Elm.Expression -> Elm.Expression + , toSecond : Elm.Expression -> Elm.Expression -> Elm.Expression + , toMillis : Elm.Expression -> Elm.Expression -> Elm.Expression + , customZone : Elm.Expression -> Elm.Expression -> Elm.Expression + } +call_ = + { every = + \everyArg_ everyArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "every" + , annotation = + Just + (Type.function + [ Type.float + , Type.function + [ Type.namedWith [ "Time" ] "Posix" [] ] + (Type.var "msg") + ] + (Type.namedWith [] "Sub" [ Type.var "msg" ]) + ) + } + ) + [ everyArg_, everyArg_0 ] + , posixToMillis = + \posixToMillisArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "posixToMillis" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Posix" [] ] + Type.int + ) + } + ) + [ posixToMillisArg_ ] + , millisToPosix = + \millisToPosixArg_ -> + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "millisToPosix" + , annotation = + Just + (Type.function + [ Type.int ] + (Type.namedWith [ "Time" ] "Posix" []) + ) + } + ) + [ millisToPosixArg_ ] + , toYear = + \toYearArg_ toYearArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toYear" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + ) + [ toYearArg_, toYearArg_0 ] + , toMonth = + \toMonthArg_ toMonthArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toMonth" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + (Type.namedWith [ "Time" ] "Month" []) + ) + } + ) + [ toMonthArg_, toMonthArg_0 ] + , toDay = + \toDayArg_ toDayArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toDay" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + ) + [ toDayArg_, toDayArg_0 ] + , toWeekday = + \toWeekdayArg_ toWeekdayArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toWeekday" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + (Type.namedWith [ "Time" ] "Weekday" []) + ) + } + ) + [ toWeekdayArg_, toWeekdayArg_0 ] + , toHour = + \toHourArg_ toHourArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toHour" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + ) + [ toHourArg_, toHourArg_0 ] + , toMinute = + \toMinuteArg_ toMinuteArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toMinute" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + ) + [ toMinuteArg_, toMinuteArg_0 ] + , toSecond = + \toSecondArg_ toSecondArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toSecond" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + ) + [ toSecondArg_, toSecondArg_0 ] + , toMillis = + \toMillisArg_ toMillisArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "toMillis" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + ) + [ toMillisArg_, toMillisArg_0 ] + , customZone = + \customZoneArg_ customZoneArg_0 -> + Elm.apply + (Elm.value + { importFrom = [ "Time" ] + , name = "customZone" + , annotation = + Just + (Type.function + [ Type.int + , Type.list + (Type.record + [ ( "start", Type.int ) + , ( "offset", Type.int ) + ] + ) + ] + (Type.namedWith [ "Time" ] "Zone" []) + ) + } + ) + [ customZoneArg_, customZoneArg_0 ] + } + + +values_ : + { now : Elm.Expression + , every : Elm.Expression + , posixToMillis : Elm.Expression + , millisToPosix : Elm.Expression + , utc : Elm.Expression + , here : Elm.Expression + , toYear : Elm.Expression + , toMonth : Elm.Expression + , toDay : Elm.Expression + , toWeekday : Elm.Expression + , toHour : Elm.Expression + , toMinute : Elm.Expression + , toSecond : Elm.Expression + , toMillis : Elm.Expression + , customZone : Elm.Expression + , getZoneName : Elm.Expression + } +values_ = + { now = + Elm.value + { importFrom = [ "Time" ] + , name = "now" + , annotation = + Just + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.namedWith [ "Time" ] "Posix" [] ] + ) + } + , every = + Elm.value + { importFrom = [ "Time" ] + , name = "every" + , annotation = + Just + (Type.function + [ Type.float + , Type.function + [ Type.namedWith [ "Time" ] "Posix" [] ] + (Type.var "msg") + ] + (Type.namedWith [] "Sub" [ Type.var "msg" ]) + ) + } + , posixToMillis = + Elm.value + { importFrom = [ "Time" ] + , name = "posixToMillis" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Posix" [] ] + Type.int + ) + } + , millisToPosix = + Elm.value + { importFrom = [ "Time" ] + , name = "millisToPosix" + , annotation = + Just + (Type.function + [ Type.int ] + (Type.namedWith [ "Time" ] "Posix" []) + ) + } + , utc = + Elm.value + { importFrom = [ "Time" ] + , name = "utc" + , annotation = Just (Type.namedWith [ "Time" ] "Zone" []) + } + , here = + Elm.value + { importFrom = [ "Time" ] + , name = "here" + , annotation = + Just + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x", Type.namedWith [ "Time" ] "Zone" [] ] + ) + } + , toYear = + Elm.value + { importFrom = [ "Time" ] + , name = "toYear" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + , toMonth = + Elm.value + { importFrom = [ "Time" ] + , name = "toMonth" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + (Type.namedWith [ "Time" ] "Month" []) + ) + } + , toDay = + Elm.value + { importFrom = [ "Time" ] + , name = "toDay" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + , toWeekday = + Elm.value + { importFrom = [ "Time" ] + , name = "toWeekday" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + (Type.namedWith [ "Time" ] "Weekday" []) + ) + } + , toHour = + Elm.value + { importFrom = [ "Time" ] + , name = "toHour" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + , toMinute = + Elm.value + { importFrom = [ "Time" ] + , name = "toMinute" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + , toSecond = + Elm.value + { importFrom = [ "Time" ] + , name = "toSecond" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + , toMillis = + Elm.value + { importFrom = [ "Time" ] + , name = "toMillis" + , annotation = + Just + (Type.function + [ Type.namedWith [ "Time" ] "Zone" [] + , Type.namedWith [ "Time" ] "Posix" [] + ] + Type.int + ) + } + , customZone = + Elm.value + { importFrom = [ "Time" ] + , name = "customZone" + , annotation = + Just + (Type.function + [ Type.int + , Type.list + (Type.record + [ ( "start", Type.int ) + , ( "offset", Type.int ) + ] + ) + ] + (Type.namedWith [ "Time" ] "Zone" []) + ) + } + , getZoneName = + Elm.value + { importFrom = [ "Time" ] + , name = "getZoneName" + , annotation = + Just + (Type.namedWith + [ "Task" ] + "Task" + [ Type.var "x" + , Type.namedWith [ "Time" ] "ZoneName" [] + ] + ) + } + } \ No newline at end of file diff --git a/codegen/Gen/Tuple.elm b/example-using-api/codegen/Gen/Tuple.elm similarity index 100% rename from codegen/Gen/Tuple.elm rename to example-using-api/codegen/Gen/Tuple.elm diff --git a/example-using-api/codegen/elm.codegen.json b/example-using-api/codegen/elm.codegen.json new file mode 100644 index 00000000..5d2f4695 --- /dev/null +++ b/example-using-api/codegen/elm.codegen.json @@ -0,0 +1,13 @@ +{ + "elm-codegen-version": "0.6.1", + "codegen-helpers": { + "packages": { + "elm/core": "1.0.5", + "elm/json": "1.1.3", + "elm/time": "1.0.0" + }, + "local": [ + "src/ArticleId.elm" + ] + } +} diff --git a/example-using-api/codegen/elm.json b/example-using-api/codegen/elm.json new file mode 100644 index 00000000..ee9ee2ae --- /dev/null +++ b/example-using-api/codegen/elm.json @@ -0,0 +1,33 @@ + +{ + "type": "application", + "source-directories": ["."], + "elm-version": "0.19.1", + "dependencies": { + "direct": { + "elm/browser": "1.0.2", + "elm/core": "1.0.5", + "elm/html": "1.0.0", + "elm/json": "1.1.3", + "mdgriffith/elm-codegen": "5.1.1" + }, + "indirect": { + "elm/parser": "1.1.0", + "elm/time": "1.0.0", + "elm/url": "1.0.0", + "elm/virtual-dom": "1.0.2", + "elm-community/basics-extra": "4.1.0", + "elm-community/list-extra": "8.6.0", + "miniBill/elm-unicode": "1.0.2", + "rtfeldman/elm-hex": "1.0.0", + "stil4m/elm-syntax": "7.2.9", + "stil4m/structured-writer": "1.0.3", + "the-sett/elm-pretty-printer": "3.0.0" + } + }, + "test-dependencies": { + "direct": {}, + "indirect": {} + } + } + diff --git a/example-using-api/elm.json b/example-using-api/elm.json new file mode 100644 index 00000000..8a8abd6c --- /dev/null +++ b/example-using-api/elm.json @@ -0,0 +1,25 @@ +{ + "type": "application", + "source-directories": [ + "generated", + "src" + ], + "elm-version": "0.19.1", + "dependencies": { + "direct": { + "elm/browser": "1.0.2", + "elm/core": "1.0.5", + "elm/html": "1.0.0" + }, + "indirect": { + "elm/json": "1.1.3", + "elm/time": "1.0.0", + "elm/url": "1.0.0", + "elm/virtual-dom": "1.0.4" + } + }, + "test-dependencies": { + "direct": {}, + "indirect": {} + } +} diff --git a/example-using-api/openapi.yaml b/example-using-api/openapi.yaml new file mode 100644 index 00000000..e30bc220 --- /dev/null +++ b/example-using-api/openapi.yaml @@ -0,0 +1,18 @@ +openapi: 3.0.1 +info: + title: "Example schema" + version: "1" +components: + schemas: + Article: + description: Article + type: object + properties: + id: + type: string + format: article-id + content: + type: string + required: + - id + - content diff --git a/example-using-api/package-lock.json b/example-using-api/package-lock.json new file mode 100644 index 00000000..09063b26 --- /dev/null +++ b/example-using-api/package-lock.json @@ -0,0 +1,5541 @@ +{ + "name": "example-using-api", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "example-using-api", + "version": "1.0.0", + "license": "BSD-3-Clause", + "devDependencies": { + "elm-codegen": "^0.6.1", + "elm-pages": "^3.0.24" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", + "integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz", + "integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz", + "integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz", + "integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz", + "integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz", + "integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz", + "integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz", + "integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz", + "integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz", + "integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz", + "integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz", + "integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz", + "integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz", + "integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz", + "integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz", + "integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz", + "integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz", + "integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz", + "integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz", + "integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz", + "integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz", + "integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz", + "integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz", + "integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz", + "integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@npmcli/agent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-3.0.0.tgz", + "integrity": "sha512-S79NdEgDQd/NGCay6TCoVzXSj74skRZIKJcpJjC5lOq34SZzyI6MqtiiWoiVWoVrTcGjNeC4ipbh1VIHlpfF5Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/fs": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-4.0.0.tgz", + "integrity": "sha512-/xGlezI6xfGO9NwuJlnwz/K14qD1kCSAGtacBHnGzeAIuJGazcp45KP5NuyARXoKb7cwulAGWVsbeSxdG/cb0Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@pnpm/config.env-replace": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", + "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.22.0" + } + }, + "node_modules/@pnpm/network.ca-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", + "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "4.2.10" + }, + "engines": { + "node": ">=12.22.0" + } + }, + "node_modules/@pnpm/network.ca-file/node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true, + "license": "ISC" + }, + "node_modules/@pnpm/npm-conf": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz", + "integrity": "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pnpm/config.env-replace": "^1.1.0", + "@pnpm/network.ca-file": "^1.0.1", + "config-chain": "^1.1.11" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.43.0.tgz", + "integrity": "sha512-Krjy9awJl6rKbruhQDgivNbD1WuLb8xAclM4IR4cN5pHGAs2oIMMQJEiC3IC/9TZJ+QZkmZhlMO/6MBGxPidpw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.43.0.tgz", + "integrity": "sha512-ss4YJwRt5I63454Rpj+mXCXicakdFmKnUNxr1dLK+5rv5FJgAxnN7s31a5VchRYxCFWdmnDWKd0wbAdTr0J5EA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.43.0.tgz", + "integrity": "sha512-eKoL8ykZ7zz8MjgBenEF2OoTNFAPFz1/lyJ5UmmFSz5jW+7XbH1+MAgCVHy72aG59rbuQLcJeiMrP8qP5d/N0A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.43.0.tgz", + "integrity": "sha512-SYwXJgaBYW33Wi/q4ubN+ldWC4DzQY62S4Ll2dgfr/dbPoF50dlQwEaEHSKrQdSjC6oIe1WgzosoaNoHCdNuMg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.43.0.tgz", + "integrity": "sha512-SV+U5sSo0yujrjzBF7/YidieK2iF6E7MdF6EbYxNz94lA+R0wKl3SiixGyG/9Klab6uNBIqsN7j4Y/Fya7wAjQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.43.0.tgz", + "integrity": "sha512-J7uCsiV13L/VOeHJBo5SjasKiGxJ0g+nQTrBkAsmQBIdil3KhPnSE9GnRon4ejX1XDdsmK/l30IYLiAaQEO0Cg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.43.0.tgz", + "integrity": "sha512-gTJ/JnnjCMc15uwB10TTATBEhK9meBIY+gXP4s0sHD1zHOaIh4Dmy1X9wup18IiY9tTNk5gJc4yx9ctj/fjrIw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.43.0.tgz", + "integrity": "sha512-ZJ3gZynL1LDSIvRfz0qXtTNs56n5DI2Mq+WACWZ7yGHFUEirHBRt7fyIk0NsCKhmRhn7WAcjgSkSVVxKlPNFFw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.43.0.tgz", + "integrity": "sha512-8FnkipasmOOSSlfucGYEu58U8cxEdhziKjPD2FIa0ONVMxvl/hmONtX/7y4vGjdUhjcTHlKlDhw3H9t98fPvyA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.43.0.tgz", + "integrity": "sha512-KPPyAdlcIZ6S9C3S2cndXDkV0Bb1OSMsX0Eelr2Bay4EsF9yi9u9uzc9RniK3mcUGCLhWY9oLr6er80P5DE6XA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.43.0.tgz", + "integrity": "sha512-HPGDIH0/ZzAZjvtlXj6g+KDQ9ZMHfSP553za7o2Odegb/BEfwJcR0Sw0RLNpQ9nC6Gy8s+3mSS9xjZ0n3rhcYg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.43.0.tgz", + "integrity": "sha512-gEmwbOws4U4GLAJDhhtSPWPXUzDfMRedT3hFMyRAvM9Mrnj+dJIFIeL7otsv2WF3D7GrV0GIewW0y28dOYWkmw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.43.0.tgz", + "integrity": "sha512-XXKvo2e+wFtXZF/9xoWohHg+MuRnvO29TI5Hqe9xwN5uN8NKUYy7tXUG3EZAlfchufNCTHNGjEx7uN78KsBo0g==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.43.0.tgz", + "integrity": "sha512-ruf3hPWhjw6uDFsOAzmbNIvlXFXlBQ4nk57Sec8E8rUxs/AI4HD6xmiiasOOx/3QxS2f5eQMKTAwk7KHwpzr/Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.43.0.tgz", + "integrity": "sha512-QmNIAqDiEMEvFV15rsSnjoSmO0+eJLoKRD9EAa9rrYNwO/XRCtOGM3A5A0X+wmG+XRrw9Fxdsw+LnyYiZWWcVw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.43.0.tgz", + "integrity": "sha512-jAHr/S0iiBtFyzjhOkAics/2SrXE092qyqEg96e90L3t9Op8OTzS6+IX0Fy5wCt2+KqeHAkti+eitV0wvblEoQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.43.0.tgz", + "integrity": "sha512-3yATWgdeXyuHtBhrLt98w+5fKurdqvs8B53LaoKD7P7H7FKOONLsBVMNl9ghPQZQuYcceV5CDyPfyfGpMWD9mQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.43.0.tgz", + "integrity": "sha512-wVzXp2qDSCOpcBCT5WRWLmpJRIzv23valvcTwMHEobkjippNf+C3ys/+wf07poPkeNix0paTNemB2XrHr2TnGw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.43.0.tgz", + "integrity": "sha512-fYCTEyzf8d+7diCw8b+asvWDCLMjsCEA8alvtAutqJOJp/wL5hs1rWSqJ1vkjgW0L2NB4bsYJrpKkiIPRR9dvw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.43.0.tgz", + "integrity": "sha512-SnGhLiE5rlK0ofq8kzuDkM0g7FN1s5VYY+YSMTibP7CqShxCQvqtNxTARS4xX4PFJfHjG0ZQYX9iGzI3FQh5Aw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@sindresorhus/merge-streams": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", + "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@types/configstore": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@types/configstore/-/configstore-2.1.1.tgz", + "integrity": "sha512-YY+hm3afkDHeSM2rsFXxeZtu0garnusBWNG1+7MknmDWQHqcH2w21/xOU9arJUi8ch4qyFklidANLCu3ihhVwQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/debug": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-0.0.30.tgz", + "integrity": "sha512-orGL5LXERPYsLov6CWs3Fh6203+dXzJkR7OnddIr2514Hsecwc8xRpzCapshBbKFImCsvS/mk6+FWiN5LyZJAQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@types/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha512-TiNg8R1kjDde5Pub9F9vCwZA/BNW9HeXP5b9j7Qucqncy/McfPZ6xze/EyBdXS5FhMIGN6Fx3vg75l5KHy3V1Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/glob": { + "version": "5.0.38", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.38.tgz", + "integrity": "sha512-rTtf75rwyP9G2qO5yRpYtdJ6aU1QqEhWbtW55qEgquEDa6bXW0s2TWZfDm02GuppjEozOWG/F2UnPq5hAQb+gw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/lodash": { + "version": "4.17.17", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.17.tgz", + "integrity": "sha512-RRVJ+J3J+WmyOTqnz3PiBLA501eKwXl2noseKOrNo/6+XEHjTAxO4xHvxQB6QuNm+s4WRbn6rSiap8+EA+ykFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mkdirp": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-0.5.2.tgz", + "integrity": "sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "24.0.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.3.tgz", + "integrity": "sha512-R4I/kzCYAdRLzfiCabn9hxWfbuHS573x+r0dJMkkzThEa7pbrcDWK+9zu3e7aBOouf+rQAciqPFMnxwr0aWgKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.8.0" + } + }, + "node_modules/@types/rimraf": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-2.0.5.tgz", + "integrity": "sha512-YyP+VfeaqAyFmXoTh3HChxOQMyjByRMsHU7kc5KOJkSlXudhMhQIALbYV7rHh/l8d2lX3VUQzprrcAgWdRuU8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/glob": "*", + "@types/node": "*" + } + }, + "node_modules/@types/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-gVC1InwyVrO326wbBZw+AO3u2vRXz/iRWq9jYhpG4W8LXyIgDv3ZmcLQ5Q4Gs+gFMyqx+viFoFT+l3p61QFCmQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/application-config-path": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/application-config-path/-/application-config-path-0.1.1.tgz", + "integrity": "sha512-zy9cHePtMP0YhwG+CfHm0bgwdnga2X3gZexpdCwEj//dpb+TKajtiC8REEUJUSq6Ab4f9cgNy2l8ObXzCXFkEw==", + "dev": true, + "license": "MIT" + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/bundle-name": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dev": true, + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacache": { + "version": "19.0.1", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-19.0.1.tgz", + "integrity": "sha512-hdsUxulXCi5STId78vRVYEtDAjq99ICAUktLTeTYsLoTE6Z8dS0c8pWNCxwdrk9YfJeobDZc2Y186hD/5ZQgFQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^4.0.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^7.0.2", + "ssri": "^12.0.0", + "tar": "^7.4.3", + "unique-filename": "^4.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/cacache/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/cacache/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacache/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "node_modules/connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-spawn/node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/default-browser": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz", + "integrity": "sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz", + "integrity": "sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/devcert": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/devcert/-/devcert-1.2.2.tgz", + "integrity": "sha512-UsLqvtJGPiGwsIZnJINUnFYaWgK7CroreGRndWHZkRD58tPFr3pVbbSyHR8lbh41+azR4jKvuNZ+eCoBZGA5kA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/configstore": "^2.1.1", + "@types/debug": "^0.0.30", + "@types/get-port": "^3.2.0", + "@types/glob": "^5.0.34", + "@types/lodash": "^4.14.92", + "@types/mkdirp": "^0.5.2", + "@types/node": "^8.5.7", + "@types/rimraf": "^2.0.2", + "@types/tmp": "^0.0.33", + "application-config-path": "^0.1.0", + "command-exists": "^1.2.4", + "debug": "^3.1.0", + "eol": "^0.9.1", + "get-port": "^3.2.0", + "glob": "^7.1.2", + "is-valid-domain": "^0.1.6", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "password-prompt": "^1.0.4", + "rimraf": "^2.6.2", + "sudo-prompt": "^8.2.0", + "tmp": "^0.0.33", + "tslib": "^1.10.0" + } + }, + "node_modules/devcert/node_modules/@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/devcert/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/devcert/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true, + "license": "MIT" + }, + "node_modules/elm-codegen": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/elm-codegen/-/elm-codegen-0.6.1.tgz", + "integrity": "sha512-mbVmK4fqW+wtYzTZhJSuT42KrQZMRTueYerCvo09sO5v7QdDGw3qeG/rL1vLH0q2GJF44lXhyBo4lv6azSBOQQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "chalk": "^4.1.1", + "chokidar": "^3.5.1", + "commander": "^8.3.0", + "node-elm-compiler": "^5.0.6" + }, + "bin": { + "elm-codegen": "bin/elm-codegen" + } + }, + "node_modules/elm-codegen/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/elm-codegen/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/elm-codegen/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/elm-codegen/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/elm-codegen/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/elm-doc-preview": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/elm-doc-preview/-/elm-doc-preview-6.0.1.tgz", + "integrity": "sha512-G/xgVRKpbLuqliQmBINQFE6I0YAwqET2+SabiyXE47kaVChkhIz91HlZudUvCzTG/CV2ci7AERtAwYzQ4bjOKA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "chalk": "^5.3.0", + "chokidar": "^3.6.0", + "commander": "^12.1.0", + "cross-spawn": "^7.0.6", + "express": "^4.21.2", + "express-ws": "^5.0.2", + "glob": "^11.0.0", + "latest-version": "^9.0.0", + "open": "^10.1.0", + "serve-index": "^1.9.1", + "serve-static": "^1.16.2", + "tmp": "0.2.3", + "ws": "^8.18.0" + }, + "bin": { + "edp": "cli.js", + "elm-doc-preview": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/elm-doc-preview/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/elm-doc-preview/node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/elm-doc-preview/node_modules/glob": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", + "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.0.3", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/elm-doc-preview/node_modules/jackspeak": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", + "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/elm-doc-preview/node_modules/lru-cache": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz", + "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/elm-doc-preview/node_modules/minimatch": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", + "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", + "dev": true, + "license": "ISC", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/elm-doc-preview/node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/elm-doc-preview/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/elm-doc-preview/node_modules/tmp": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.14" + } + }, + "node_modules/elm-hot": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/elm-hot/-/elm-hot-1.1.6.tgz", + "integrity": "sha512-zYZJlfs7Gt4BdjA+D+857K+XAWzwwySJmXCgFpHW1dIEfaHSZCIPYPf7/jinZBLfKRkOAlKzI32AA84DY50g7Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/elm-pages": { + "version": "3.0.24", + "resolved": "https://registry.npmjs.org/elm-pages/-/elm-pages-3.0.24.tgz", + "integrity": "sha512-rVxsEGCkddv6hqEtwFe3L+tEs2nnItBdhuhhW3W5BLvfK8vgFl1dNAVnTX7xKn09c5ZF9Y8sKe4rs0Z9RoyVNQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sindresorhus/merge-streams": "^4.0.0", + "busboy": "^1.6.0", + "chokidar": "^4.0.3", + "cli-cursor": "^5.0.0", + "commander": "^13.1.0", + "connect": "^3.7.0", + "cookie-signature": "^1.2.2", + "cross-spawn": "7.0.6", + "devcert": "^1.2.2", + "elm-doc-preview": "^6.0.1", + "elm-hot": "^1.1.6", + "esbuild": "^0.25.0", + "fs-extra": "^11.3.0", + "globby": "14.1.0", + "gray-matter": "^4.0.3", + "jsesc": "^3.1.0", + "kleur": "^4.1.5", + "make-fetch-happen": "^14.0.3", + "memfs": "^4.17.0", + "micromatch": "^4.0.8", + "serve-static": "^1.16.2", + "terser": "^5.39.0", + "vite": "^6.2.0", + "which": "^5.0.0" + }, + "bin": { + "elm-pages": "generator/src/cli.js" + } + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eol": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/eol/-/eol-0.9.1.tgz", + "integrity": "sha512-Ds/TEoZjwggRoz/Q2O7SE3i4Jm66mqTDfmdHdq/7DKVk3bro9Q8h6WdXKdPqFLMoqxrDK5SVRzHVPOS6uuGtrg==", + "dev": true, + "license": "MIT" + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.5.tgz", + "integrity": "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.5", + "@esbuild/android-arm": "0.25.5", + "@esbuild/android-arm64": "0.25.5", + "@esbuild/android-x64": "0.25.5", + "@esbuild/darwin-arm64": "0.25.5", + "@esbuild/darwin-x64": "0.25.5", + "@esbuild/freebsd-arm64": "0.25.5", + "@esbuild/freebsd-x64": "0.25.5", + "@esbuild/linux-arm": "0.25.5", + "@esbuild/linux-arm64": "0.25.5", + "@esbuild/linux-ia32": "0.25.5", + "@esbuild/linux-loong64": "0.25.5", + "@esbuild/linux-mips64el": "0.25.5", + "@esbuild/linux-ppc64": "0.25.5", + "@esbuild/linux-riscv64": "0.25.5", + "@esbuild/linux-s390x": "0.25.5", + "@esbuild/linux-x64": "0.25.5", + "@esbuild/netbsd-arm64": "0.25.5", + "@esbuild/netbsd-x64": "0.25.5", + "@esbuild/openbsd-arm64": "0.25.5", + "@esbuild/openbsd-x64": "0.25.5", + "@esbuild/sunos-x64": "0.25.5", + "@esbuild/win32-arm64": "0.25.5", + "@esbuild/win32-ia32": "0.25.5", + "@esbuild/win32-x64": "0.25.5" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express-ws": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/express-ws/-/express-ws-5.0.2.tgz", + "integrity": "sha512-0uvmuk61O9HXgLhGl3QhNSEtRsQevtmbL94/eILaliEADZBHZOQUAiHFrGPrgsjikohyrmSG5g+sCfASTt0lkQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "ws": "^7.4.6" + }, + "engines": { + "node": ">=4.5.0" + }, + "peerDependencies": { + "express": "^4.0.0 || ^5.0.0-alpha.1" + } + }, + "node_modules/express-ws/node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/express/node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/express/node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/find-elm-dependencies": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/find-elm-dependencies/-/find-elm-dependencies-2.0.4.tgz", + "integrity": "sha512-x/4w4fVmlD2X4PD9oQ+yh9EyaQef6OtEULdMGBTuWx0Nkppvo2Z/bAiQioW2n+GdRYKypME2b9OmYTw5tw5qDg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "firstline": "^1.2.0", + "lodash": "^4.17.19" + }, + "bin": { + "find-elm-dependencies": "bin/cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/firstline": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/firstline/-/firstline-1.3.1.tgz", + "integrity": "sha512-ycwgqtoxujz1dm0kjkBFOPQMESxB9uKc/PlD951dQDIG+tBXRpYZC2UmJb0gDxopQ1ZX6oyRQN3goRczYu7Deg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.4.0" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", + "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.3", + "ignore": "^7.0.3", + "path-type": "^6.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby/node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/gray-matter": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", + "integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-yaml": "^3.13.1", + "kind-of": "^6.0.2", + "section-matter": "^1.0.0", + "strip-bom-string": "^1.0.0" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/https-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/hyperdyperid": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hyperdyperid/-/hyperdyperid-1.2.0.tgz", + "integrity": "sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.18" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/ip-address/node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-valid-domain": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-valid-domain/-/is-valid-domain-0.1.6.tgz", + "integrity": "sha512-ZKtq737eFkZr71At8NxOFcP9O1K89gW3DkdrGMpp1upr/ueWjj+Weh4l9AI4rN0Gt8W2M1w7jrG2b/Yv83Ljpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.1.1" + } + }, + "node_modules/is-wsl": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", + "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ky": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/ky/-/ky-1.8.1.tgz", + "integrity": "sha512-7Bp3TpsE+L+TARSnnDpk3xg8Idi8RwSLdj6CMbNWoOARIrGrbuLGusV0dYwbZOm4bB3jHNxSw8Wk/ByDqJEnDw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sindresorhus/ky?sponsor=1" + } + }, + "node_modules/latest-version": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-9.0.0.tgz", + "integrity": "sha512-7W0vV3rqv5tokqkBAFV1LbR7HPOWzXQDpDgEuib/aJ1jsZZx6x3c2mBI+TJhJzOhkGeaLbCKEHXEXLfirtG2JA==", + "dev": true, + "license": "MIT", + "dependencies": { + "package-json": "^10.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/make-fetch-happen": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-14.0.3.tgz", + "integrity": "sha512-QMjGbFTP0blj97EeidG5hk/QhKQ3T4ICckQGLgz38QF7Vgbk6e6FTARN8KhKxyBbWn8R0HU+bnw8aSoFPD4qtQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/agent": "^3.0.0", + "cacache": "^19.0.1", + "http-cache-semantics": "^4.1.1", + "minipass": "^7.0.2", + "minipass-fetch": "^4.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^1.0.0", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "ssri": "^12.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/make-fetch-happen/node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memfs": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.17.2.tgz", + "integrity": "sha512-NgYhCOWgovOXSzvYgUW0LQ7Qy72rWQMGGFJDoWg4G30RHd3z77VbYdtJ4fembJXBy8pMIUA31XNAupobOQlwdg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/json-pack": "^1.0.3", + "@jsonjoy.com/util": "^1.3.0", + "tree-dump": "^1.0.1", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">= 4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + } + }, + "node_modules/memfs/node_modules/@jsonjoy.com/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/memfs/node_modules/@jsonjoy.com/json-pack": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.2.0.tgz", + "integrity": "sha512-io1zEbbYcElht3tdlqEOFxZ0dMTYrHz9iMf0gqn1pPjZFTCgM5R4R5IMA20Chb2UPYYsxjzs8CgZ7Nb5n2K2rA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/base64": "^1.1.1", + "@jsonjoy.com/util": "^1.1.2", + "hyperdyperid": "^1.2.0", + "thingies": "^1.20.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/memfs/node_modules/@jsonjoy.com/util": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.6.0.tgz", + "integrity": "sha512-sw/RMbehRhN68WRtcKCpQOPfnH6lLP4GJfqzi3iYej8tnzpZUDr6UkZYJjcjjC0FWEJOJbyM3PTIwxucUmDG2A==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/memfs/node_modules/thingies": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/thingies/-/thingies-1.21.0.tgz", + "integrity": "sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g==", + "dev": true, + "license": "Unlicense", + "engines": { + "node": ">=10.18" + }, + "peerDependencies": { + "tslib": "^2" + } + }, + "node_modules/memfs/node_modules/tree-dump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tree-dump/-/tree-dump-1.0.3.tgz", + "integrity": "sha512-il+Cv80yVHFBwokQSfd4bldvr1Md951DpgAGfmhydt04L+YzHgubm2tQ7zueWDcGENKHq0ZvGFR/hjvNXilHEg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/memfs/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-fetch": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-4.0.1.tgz", + "integrity": "sha512-j7U11C5HXigVuutxebFadoYBbd7VSdZWggSe64NVdvWNBqGAiXPL2QVCehjmw7lY1oF9gOllYbORh+hiNgfPgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^3.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-flush/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minizlib": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz", + "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-elm-compiler": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/node-elm-compiler/-/node-elm-compiler-5.0.6.tgz", + "integrity": "sha512-DWTRQR8b54rvschcZRREdsz7K84lnS8A6YJu8du3QLQ8f204SJbyTaA6NzYYbfUG97OTRKRv/0KZl82cTfpLhA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "cross-spawn": "6.0.5", + "find-elm-dependencies": "^2.0.4", + "lodash": "^4.17.19", + "temp": "^0.9.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/node-elm-compiler/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/node-elm-compiler/node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/node-elm-compiler/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/node-elm-compiler/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/node-elm-compiler/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/node-elm-compiler/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/node-elm-compiler/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/open/-/open-10.1.2.tgz", + "integrity": "sha512-cxN6aIDPz6rm8hbebcP7vrQNhvRcveZoJU72Y7vskh4oIm+BZwBECnx5nTmrlres1Qapvx27Qo1Auukpf8PKXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-map": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.3.tgz", + "integrity": "sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-10.0.1.tgz", + "integrity": "sha512-ua1L4OgXSBdsu1FPb7F3tYH0F48a6kxvod4pLUlGY9COeJAJQNX/sNH2IiEmsxw7lqYiAwrdHMjz1FctOsyDQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ky": "^1.2.0", + "registry-auth-token": "^5.0.2", + "registry-url": "^6.0.1", + "semver": "^7.6.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/password-prompt": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/password-prompt/-/password-prompt-1.1.3.tgz", + "integrity": "sha512-HkrjG2aJlvF0t2BMH0e2LB/EHf3Lcq3fNMzy4GYHcQblAvOl+QQji1Lx7WRBMqpVK8p+KR7bCg7oqAMXtdgqyw==", + "dev": true, + "license": "0BSD", + "dependencies": { + "ansi-escapes": "^4.3.2", + "cross-spawn": "^7.0.3" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-type": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", + "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/proc-log": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-5.0.0.tgz", + "integrity": "sha512-Azwzvl90HaF0aCz1JrDdXQykFakSSNPaPoiZ9fm5qJIMHioDZEi7OAdRwSm6rSoPtY3Qutnm3L7ogmg3dc+wbQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", + "dev": true, + "license": "ISC" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/registry-auth-token": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.1.0.tgz", + "integrity": "sha512-GdekYuwLXLxMuFTwAPg5UKGLW/UXzQrZvH/Zj791BQif5T05T0RsaLfHc9q3ZOKi7n+BoprPD9mJ0O0k4xzUlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pnpm/npm-conf": "^2.1.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/registry-url": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz", + "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "rc": "1.2.8" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/rollup": { + "version": "4.43.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.43.0.tgz", + "integrity": "sha512-wdN2Kd3Twh8MAEOEJZsuxuLKCsBEo4PVNLK6tQWAn10VhsVewQLzcucMgLolRlhFybGxfclbPeEYBaP6RvUFGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.7" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.43.0", + "@rollup/rollup-android-arm64": "4.43.0", + "@rollup/rollup-darwin-arm64": "4.43.0", + "@rollup/rollup-darwin-x64": "4.43.0", + "@rollup/rollup-freebsd-arm64": "4.43.0", + "@rollup/rollup-freebsd-x64": "4.43.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.43.0", + "@rollup/rollup-linux-arm-musleabihf": "4.43.0", + "@rollup/rollup-linux-arm64-gnu": "4.43.0", + "@rollup/rollup-linux-arm64-musl": "4.43.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.43.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.43.0", + "@rollup/rollup-linux-riscv64-gnu": "4.43.0", + "@rollup/rollup-linux-riscv64-musl": "4.43.0", + "@rollup/rollup-linux-s390x-gnu": "4.43.0", + "@rollup/rollup-linux-x64-gnu": "4.43.0", + "@rollup/rollup-linux-x64-musl": "4.43.0", + "@rollup/rollup-win32-arm64-msvc": "4.43.0", + "@rollup/rollup-win32-ia32-msvc": "4.43.0", + "@rollup/rollup-win32-x64-msvc": "4.43.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-applescript": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz", + "integrity": "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/section-matter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", + "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-index/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true, + "license": "ISC" + }, + "node_modules/serve-index/node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/serve-index/node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.5.tgz", + "integrity": "sha512-iF+tNDQla22geJdTyJB1wM/qrX9DMRwWrciEPwWLPRWAUEM8sQiyxgckLxWT1f7+9VabJS0jTGGr4QgBuvi6Ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/socks-proxy-agent/node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socks-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/ssri": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-12.0.0.tgz", + "integrity": "sha512-S7iGNosepx9RadX82oimUkvr0Ct7IjJbEbs4mJcTxst8um95J3sDYU1RBEOvdu6oL1Wek2ODI5i4MAw+dZ6cAQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sudo-prompt": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/sudo-prompt/-/sudo-prompt-8.2.5.tgz", + "integrity": "sha512-rlBo3HU/1zAJUrkY6jNxDOC9eVYliG6nS4JA8u8KAshITd07tafMc/Br7xQwCSseXwJ2iCcHCE8SNWX3q8Z+kw==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dev": true, + "license": "MIT" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", + "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", + "dev": true, + "license": "ISC", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/tar/node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/temp": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.9.4.tgz", + "integrity": "sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mkdirp": "^0.5.1", + "rimraf": "~2.6.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/temp/node_modules/rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/terser": { + "version": "5.42.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.42.0.tgz", + "integrity": "sha512-UYCvU9YQW2f/Vwl+P0GfhxJxbUGLwd+5QrrGgLajzWAtC/23AX0vcise32kkP7Eu0Wu9VlzzHAXkLObgjQfFlQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.14.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/undici-types": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", + "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "dev": true, + "license": "MIT" + }, + "node_modules/unicorn-magic": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", + "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/unique-filename": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-4.0.0.tgz", + "integrity": "sha512-XSnEewXmQ+veP7xX2dS5Q4yZAvO40cBN2MWkJ7D/6sW4Dg6wYBNwM1Vrnz1FhH5AdeLIlUXRI9e28z1YZi71NQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "unique-slug": "^5.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/unique-slug": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-5.0.0.tgz", + "integrity": "sha512-9OdaqO5kwqR+1kVgHAhsp5vPNU0hnxRa26rBFNfNgM7M6pNtgzeBn3s/xbyCQL3dcjzOatcef6UUHpB/6MaETg==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vite": { + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", + "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/fdir": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/which": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", + "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + } + } +} diff --git a/example-using-api/package.json b/example-using-api/package.json new file mode 100644 index 00000000..75c4326d --- /dev/null +++ b/example-using-api/package.json @@ -0,0 +1,15 @@ +{ + "name": "example-using-api", + "version": "1.0.0", + "description": "Example of generating OpenAPI code using the elm-open-api API", + "main": "index.js", + "scripts": { + "test": "scripts/test" + }, + "author": "", + "license": "BSD-3-Clause", + "devDependencies": { + "elm-codegen": "^0.6.1", + "elm-pages": "^3.0.24" + } +} diff --git a/example-using-api/scripts/elm.json b/example-using-api/scripts/elm.json new file mode 100644 index 00000000..7b694a79 --- /dev/null +++ b/example-using-api/scripts/elm.json @@ -0,0 +1,73 @@ +{ + "type": "application", + "source-directories": [ + "src", + "../codegen" + ], + "elm-version": "0.19.1", + "dependencies": { + "direct": { + "avh4/elm-color": "1.0.0", + "dillonkearns/elm-pages": "10.2.2", + "elm/browser": "1.0.2", + "elm/core": "1.0.5", + "elm/html": "1.0.0", + "mdgriffith/elm-codegen": "5.2.0", + "wolfadex/elm-ansi": "3.0.0", + "wolfadex/elm-open-api-codegen": "1.0.0" + }, + "indirect": { + "Chadtech/elm-bool-extra": "2.4.2", + "NoRedInk/elm-json-decode-pipeline": "1.0.1", + "danfishgold/base64-bytes": "1.1.0", + "danyx23/elm-mimetype": "4.0.1", + "dillonkearns/elm-bcp47-language-tag": "2.0.0", + "dillonkearns/elm-cli-options-parser": "3.2.0", + "dillonkearns/elm-date-or-date-time": "2.0.0", + "dillonkearns/elm-form": "3.0.1", + "dividat/elm-semver": "2.0.0", + "elm/bytes": "1.0.8", + "elm/file": "1.0.5", + "elm/http": "2.0.0", + "elm/json": "1.1.3", + "elm/parser": "1.1.0", + "elm/random": "1.0.0", + "elm/regex": "1.0.0", + "elm/time": "1.0.0", + "elm/url": "1.0.0", + "elm/virtual-dom": "1.0.3", + "elm-community/basics-extra": "4.1.0", + "elm-community/json-extra": "4.3.0", + "elm-community/list-extra": "8.7.0", + "elm-community/maybe-extra": "5.3.0", + "elmcraft/core-extra": "2.2.0", + "fredcy/elm-parseint": "2.0.1", + "jluckyiv/elm-utc-date-strings": "1.0.0", + "json-tools/json-schema": "1.0.2", + "json-tools/json-value": "1.0.1", + "justinmimbs/date": "4.1.0", + "miniBill/elm-codec": "2.2.0", + "miniBill/elm-fast-dict": "1.2.4", + "miniBill/elm-unicode": "1.1.1", + "myrho/elm-parser-extras": "1.0.1", + "myrho/yaml": "1.0.0", + "noahzgordon/elm-color-extra": "1.0.2", + "robinheghan/fnv1a": "1.0.0", + "robinheghan/murmur3": "1.0.0", + "rtfeldman/elm-css": "18.0.0", + "rtfeldman/elm-hex": "1.0.0", + "rtfeldman/elm-iso8601-date-strings": "1.1.4", + "stil4m/elm-syntax": "7.3.9", + "stil4m/structured-writer": "1.0.3", + "the-sett/elm-pretty-printer": "3.1.1", + "the-sett/elm-syntax-dsl": "6.0.3", + "turboMaCk/non-empty-list-alias": "1.4.0", + "wolfadex/elm-open-api": "2.0.0", + "zwilias/elm-utf-tools": "2.0.1" + } + }, + "test-dependencies": { + "direct": {}, + "indirect": {} + } +} diff --git a/example-using-api/scripts/src/CodeGenOpenApi.elm b/example-using-api/scripts/src/CodeGenOpenApi.elm new file mode 100644 index 00000000..9f88d443 --- /dev/null +++ b/example-using-api/scripts/src/CodeGenOpenApi.elm @@ -0,0 +1,52 @@ +module CodeGenOpenApi exposing (run) + +import Ansi.Color +import BackendTask +import Common +import Gen.ArticleId +import OpenApi.BackendTask +import OpenApi.Config +import Pages.Script + + +{-| Generate an Elm "SDK" for a hypothetical OpenAPI service. +-} +run : Pages.Script.Script +run = + let + exampleApi : OpenApi.Config.Input + exampleApi = + OpenApi.Config.inputFrom (OpenApi.Config.File "./openapi.yaml") + |> OpenApi.Config.withOutputModuleName [ "ExampleApi" ] + |> OpenApi.Config.withEffectTypes [ OpenApi.Config.ElmHttpCmd ] + + articleIdFormat : OpenApi.Config.Format + articleIdFormat = + { basicType = Common.String + , format = "article-id" + , encode = + Gen.ArticleId.call_.encode + , decoder = + Gen.ArticleId.decode + , annotation = + Gen.ArticleId.annotation_.articleId + , requiresPackages = [] + , sharedDeclarations = [] + , toParamString = + Gen.ArticleId.call_.toString + } + + config : OpenApi.Config.Config + config = + OpenApi.Config.init "./generated" + |> OpenApi.Config.withInput exampleApi + |> OpenApi.Config.withFormat articleIdFormat + in + Pages.Script.withoutCliOptions + (BackendTask.doEach + [ "Generating OpenAPI code" + |> Ansi.Color.fontColor Ansi.Color.brightGreen + |> Pages.Script.log + , OpenApi.BackendTask.withConfig config + ] + ) diff --git a/example-using-api/scripts/test b/example-using-api/scripts/test new file mode 100755 index 00000000..1f6a883d --- /dev/null +++ b/example-using-api/scripts/test @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +if ! [ -d node_modules ]; then + # elm-pages will crash with a vague error if elm-codegen is not in PATH. + npm install +fi +npx --no -- elm-pages run ./scripts/src/CodeGenOpenApi.elm diff --git a/example-using-api/src/ArticleId.elm b/example-using-api/src/ArticleId.elm new file mode 100644 index 00000000..78664e9f --- /dev/null +++ b/example-using-api/src/ArticleId.elm @@ -0,0 +1,45 @@ +module ArticleId exposing + ( ArticleId + , decode + , encode + , parse + , toString + ) + +{-| Defines an opaque Id type for Articles +-} + +import Json.Decode +import Json.Encode + + +type ArticleId + = ArticleId String + + +toString : ArticleId -> String +toString (ArticleId id) = + id + + +parse : String -> Result String ArticleId +parse raw = + if String.isEmpty raw then + Err "Article id must not be empty" + + else if String.contains "%" raw then + -- Just an example ID format rule + Err "Article id must not contain % character" + + else + Ok (ArticleId raw) + + +decode : Json.Decode.Decoder ArticleId +decode = + Json.Decode.map ArticleId Json.Decode.string + + +encode : ArticleId -> Json.Encode.Value +encode (ArticleId id) = + Json.Encode.string id diff --git a/package-lock.json b/package-lock.json index a3425734..184ca669 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,71 +13,53 @@ }, "devDependencies": { "@lydell/elm-json": "0.2.13-1", - "@redocly/cli": "1.11.0", - "elm": "0.19.1-6", + "@redocly/cli": "^1.34.4", "elm-codegen": "^0.6.1", - "elm-format": "0.8.7", - "elm-optimize-level-2": "0.3.5", - "elm-pages": "^3.0.19", - "elm-review": "2.11.1", - "elm-test": "^0.19.1-revision12", + "elm-optimize-level-2": "^0.3.5", + "elm-pages": "^3.0.24", + "run-pty": "^5.0.0", "vite": "^6.0.3" } }, - "node_modules/@avh4/elm-format-linux-x64": { - "version": "0.8.7-2", - "cpu": [ - "x64" - ], - "dev": true, - "license": "BSD-3-Clause", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@babel/runtime": { - "version": "7.26.0", + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "license": "MIT", "dependencies": { - "regenerator-runtime": "^0.14.0" + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@cfaester/enzyme-adapter-react-18": { - "version": "0.8.0", + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "dev": true, "license": "MIT", - "dependencies": { - "enzyme-shallow-equal": "^1.0.0", - "function.prototype.name": "^1.1.6", - "has": "^1.0.4", - "react-is": "^18.2.0", - "react-shallow-renderer": "^16.15.0" - }, - "peerDependencies": { - "enzyme": "^3.11.0", - "react": ">=18", - "react-dom": ">=18" + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@elm_binaries/linux_x64": { - "version": "0.19.1-0", - "cpu": [ - "x64" - ], + "node_modules/@babel/runtime": { + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz", + "integrity": "sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==", "dev": true, - "license": "BSD-3-Clause", - "optional": true, - "os": [ - "linux" - ] + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } }, "node_modules/@emotion/is-prop-valid": { "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz", + "integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==", "dev": true, "license": "MIT", "dependencies": { @@ -86,255 +68,362 @@ }, "node_modules/@emotion/memoize": { "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.8.1.tgz", + "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==", "dev": true, "license": "MIT" }, "node_modules/@emotion/unitless": { "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.8.1.tgz", + "integrity": "sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ==", "dev": true, "license": "MIT" }, - "node_modules/@esbuild/linux-x64": { - "version": "0.24.0", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", + "integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==", "cpu": [ - "x64" + "ppc64" ], "dev": true, "license": "MIT", "optional": true, "os": [ - "linux" + "aix" ], "engines": { "node": ">=18" } }, - "node_modules/@exodus/schemasafe": { - "version": "1.3.0", + "node_modules/@esbuild/android-arm": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz", + "integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==", + "cpu": [ + "arm" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", + "node_modules/@esbuild/android-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz", + "integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=12" + "node": ">=18" } }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", + "node_modules/@esbuild/android-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz", + "integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "node": ">=18" } }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz", + "integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=18" } }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz", + "integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz", + "integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=18" } }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz", + "integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "node": ">=18" } }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", + "node_modules/@esbuild/linux-arm": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz", + "integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">=18" } }, - "node_modules/@isaacs/fs-minipass": { - "version": "4.0.1", + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz", + "integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "ISC", - "dependencies": { - "minipass": "^7.0.4" - }, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=18.0.0" + "node": ">=18" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz", + "integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==", + "cpu": [ + "ia32" + ], "dev": true, "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.0.0" + "node": ">=18" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz", + "integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==", + "cpu": [ + "loong64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.0.0" + "node": ">=18" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz", + "integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==", + "cpu": [ + "mips64el" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.0.0" + "node": ">=18" } }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz", + "integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==", + "cpu": [ + "ppc64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz", + "integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==", + "cpu": [ + "riscv64" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz", + "integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==", + "cpu": [ + "s390x" + ], "dev": true, "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@jsonjoy.com/base64": { - "version": "1.1.2", + "node_modules/@esbuild/linux-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz", + "integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=10.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" - }, - "peerDependencies": { - "tslib": "2" + "node": ">=18" } }, - "node_modules/@jsonjoy.com/json-pack": { - "version": "1.1.1", + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz", + "integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jsonjoy.com/base64": "^1.1.1", - "@jsonjoy.com/util": "^1.1.2", - "hyperdyperid": "^1.2.0", - "thingies": "^1.20.0" - }, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": ">=10.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" - }, - "peerDependencies": { - "tslib": "2" + "node": ">=18" } }, - "node_modules/@jsonjoy.com/util": { - "version": "1.5.0", + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz", + "integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==", + "cpu": [ + "x64" + ], "dev": true, - "license": "Apache-2.0", + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], "engines": { - "node": ">=10.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" - }, - "peerDependencies": { - "tslib": "2" + "node": ">=18" } }, - "node_modules/@lydell/elm-json": { - "version": "0.2.13-1", + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz", + "integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==", + "cpu": [ + "arm64" + ], "dev": true, - "hasInstallScript": true, "license": "MIT", - "bin": { - "elm-json": "bin/elm-json" - }, - "optionalDependencies": { - "@lydell/elm-json-darwin-arm64": "0.2.13-0", - "@lydell/elm-json-darwin-x64": "0.2.13-0", - "@lydell/elm-json-linux-arm": "0.2.13-0", - "@lydell/elm-json-linux-x64": "0.2.13-0", - "@lydell/elm-json-win32-x64": "0.2.13-0" + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@lydell/elm-json-linux-x64": { - "version": "0.2.13-0", + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz", + "integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==", "cpu": [ "x64" ], @@ -342,2094 +431,1875 @@ "license": "MIT", "optional": true, "os": [ - "linux" - ] + "openbsd" + ], + "engines": { + "node": ">=18" + } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz", + "integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, + "optional": true, + "os": [ + "sunos" + ], "engines": { - "node": ">= 8" + "node": ">=18" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz", + "integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">= 8" + "node": ">=18" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz", + "integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==", + "cpu": [ + "ia32" + ], "dev": true, "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">= 8" + "node": ">=18" } }, - "node_modules/@npmcli/agent": { - "version": "3.0.0", + "node_modules/@esbuild/win32-x64": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz", + "integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==", + "cpu": [ + "x64" + ], "dev": true, - "license": "ISC", - "dependencies": { - "agent-base": "^7.1.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.1", - "lru-cache": "^10.0.1", - "socks-proxy-agent": "^8.0.3" - }, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=18" } }, - "node_modules/@npmcli/fs": { - "version": "4.0.0", + "node_modules/@exodus/schemasafe": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz", + "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==", "dev": true, - "license": "ISC", - "dependencies": { - "semver": "^7.3.5" - }, + "license": "MIT" + }, + "node_modules/@faker-js/faker": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@faker-js/faker/-/faker-7.6.0.tgz", + "integrity": "sha512-XK6BTq1NDMo9Xqw/YkYyGjSsg44fbNwYRx7QK2CuoQgyy+f1rrTDHoExVM5PsyXCtfl2vs2vVJ0MN0yN6LppRw==", + "dev": true, + "license": "MIT", "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=14.0.0", + "npm": ">=6.0.0" } }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", + "node_modules/@humanwhocodes/momoa": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/momoa/-/momoa-2.0.4.tgz", + "integrity": "sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA==", "dev": true, - "license": "MIT", - "optional": true, + "license": "Apache-2.0", "engines": { - "node": ">=14" + "node": ">=10.10.0" } }, - "node_modules/@redocly/ajv": { - "version": "8.11.2", + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", "dev": true, "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js-replace": "^1.0.1" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "engines": { + "node": "20 || >=22" } }, - "node_modules/@redocly/cli": { - "version": "1.11.0", + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", "dev": true, "license": "MIT", "dependencies": { - "@redocly/openapi-core": "1.11.0", - "abort-controller": "^3.0.0", - "chokidar": "^3.5.1", - "colorette": "^1.2.0", - "core-js": "^3.32.1", - "form-data": "^4.0.0", - "get-port-please": "^3.0.1", - "glob": "^7.1.6", - "handlebars": "^4.7.6", - "mobx": "^6.0.4", - "node-fetch": "^2.6.1", - "react": "^17.0.0 || ^18.2.0", - "react-dom": "^17.0.0 || ^18.2.0", - "redoc": "~2.1.3", - "semver": "^7.5.2", - "simple-websocket": "^9.0.0", - "styled-components": "^6.0.7", - "yargs": "17.0.1" - }, - "bin": { - "openapi": "bin/cli.js", - "redocly": "bin/cli.js" + "@isaacs/balanced-match": "^4.0.1" }, "engines": { - "node": ">=14.19.0", - "npm": ">=7.0.0" + "node": "20 || >=22" } }, - "node_modules/@redocly/cli/node_modules/cliui": { - "version": "7.0.4", + "node_modules/@isaacs/cliui": { + "version": "8.0.2", "dev": true, "license": "ISC", "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" } }, - "node_modules/@redocly/cli/node_modules/yargs": { - "version": "17.0.1", + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", "dev": true, "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, "engines": { "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/@redocly/cli/node_modules/yargs-parser": { - "version": "20.2.9", + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", "dev": true, - "license": "ISC", + "license": "MIT", "engines": { - "node": ">=10" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@redocly/config": { - "version": "0.2.0", + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", "dev": true, "license": "MIT" }, - "node_modules/@redocly/openapi-core": { - "version": "1.11.0", + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", "dev": true, "license": "MIT", "dependencies": { - "@redocly/ajv": "^8.11.0", - "@redocly/config": "^0.2.0", - "colorette": "^1.2.0", - "js-levenshtein": "^1.1.6", - "js-yaml": "^4.1.0", - "lodash.isequal": "^4.5.0", - "minimatch": "^5.0.1", - "node-fetch": "^2.6.1", - "pluralize": "^8.0.0", - "yaml-ast-parser": "0.0.43" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=14.19.0", - "npm": ">=7.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.1.tgz", - "integrity": "sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ==", - "cpu": [ - "arm" - ], + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", "dev": true, - "optional": true, - "os": [ - "android" - ] + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.1.tgz", - "integrity": "sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA==", - "cpu": [ - "arm64" - ], + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", "dev": true, - "optional": true, - "os": [ - "android" - ] + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.1.tgz", - "integrity": "sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ==", - "cpu": [ - "arm64" - ], + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", "dev": true, - "optional": true, - "os": [ - "darwin" - ] + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.1.tgz", - "integrity": "sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ==", + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@jsep-plugin/assignment": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz", + "integrity": "sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, + "node_modules/@jsep-plugin/regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.4.tgz", + "integrity": "sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, + "node_modules/@jsonjoy.com/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/json-pack": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.2.0.tgz", + "integrity": "sha512-io1zEbbYcElht3tdlqEOFxZ0dMTYrHz9iMf0gqn1pPjZFTCgM5R4R5IMA20Chb2UPYYsxjzs8CgZ7Nb5n2K2rA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/base64": "^1.1.1", + "@jsonjoy.com/util": "^1.1.2", + "hyperdyperid": "^1.2.0", + "thingies": "^1.20.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/util": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.6.0.tgz", + "integrity": "sha512-sw/RMbehRhN68WRtcKCpQOPfnH6lLP4GJfqzi3iYej8tnzpZUDr6UkZYJjcjjC0FWEJOJbyM3PTIwxucUmDG2A==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@lydell/elm-json": { + "version": "0.2.13-1", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "elm-json": "bin/elm-json" + }, + "optionalDependencies": { + "@lydell/elm-json-darwin-arm64": "0.2.13-0", + "@lydell/elm-json-darwin-x64": "0.2.13-0", + "@lydell/elm-json-linux-arm": "0.2.13-0", + "@lydell/elm-json-linux-x64": "0.2.13-0", + "@lydell/elm-json-win32-x64": "0.2.13-0" + } + }, + "node_modules/@lydell/elm-json-linux-x64": { + "version": "0.2.13-0", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ - "darwin" + "linux" ] }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.1.tgz", - "integrity": "sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA==", + "node_modules/@lydell/node-pty": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lydell/node-pty/-/node-pty-1.1.0.tgz", + "integrity": "sha512-VDD8LtlMTOrPKWMXUAcB9+LTktzuunqrMwkYR1DMRBkS6LQrCt+0/Ws1o2rMml/n3guePpS7cxhHF7Nm5K4iMw==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "@lydell/node-pty-darwin-arm64": "1.1.0", + "@lydell/node-pty-darwin-x64": "1.1.0", + "@lydell/node-pty-linux-arm64": "1.1.0", + "@lydell/node-pty-linux-x64": "1.1.0", + "@lydell/node-pty-win32-arm64": "1.1.0", + "@lydell/node-pty-win32-x64": "1.1.0" + } + }, + "node_modules/@lydell/node-pty-darwin-arm64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lydell/node-pty-darwin-arm64/-/node-pty-darwin-arm64-1.1.0.tgz", + "integrity": "sha512-7kFD+owAA61qmhJCtoMbqj3Uvff3YHDiU+4on5F2vQdcMI3MuwGi7dM6MkFG/yuzpw8LF2xULpL71tOPUfxs0w==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ - "freebsd" + "darwin" ] }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.1.tgz", - "integrity": "sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ==", + "node_modules/@lydell/node-pty-darwin-x64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lydell/node-pty-darwin-x64/-/node-pty-darwin-x64-1.1.0.tgz", + "integrity": "sha512-XZdvqj5FjAMjH8bdp0YfaZjur5DrCIDD1VYiE9EkkYVMDQqRUPHYV3U8BVEQVT9hYfjmpr7dNaELF2KyISWSNA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ - "freebsd" + "darwin" ] }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.1.tgz", - "integrity": "sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA==", + "node_modules/@lydell/node-pty-linux-arm64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lydell/node-pty-linux-arm64/-/node-pty-linux-arm64-1.1.0.tgz", + "integrity": "sha512-yyDBmalCfHpLiQMT2zyLcqL2Fay4Xy7rIs8GH4dqKLnEviMvPGOK7LADVkKAsbsyXBSISL3Lt1m1MtxhPH6ckg==", "cpu": [ - "arm" + "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.1.tgz", - "integrity": "sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg==", + "node_modules/@lydell/node-pty-linux-x64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lydell/node-pty-linux-x64/-/node-pty-linux-x64-1.1.0.tgz", + "integrity": "sha512-NcNqRTD14QT+vXcEuqSSvmWY+0+WUBn2uRE8EN0zKtDpIEr9d+YiFj16Uqds6QfcLCHfZmC+Ls7YzwTaqDnanA==", "cpu": [ - "arm" + "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.1.tgz", - "integrity": "sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA==", + "node_modules/@lydell/node-pty-win32-arm64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lydell/node-pty-win32-arm64/-/node-pty-win32-arm64-1.1.0.tgz", + "integrity": "sha512-JOMbCou+0fA7d/m97faIIfIU0jOv8sn2OR7tI45u3AmldKoKoLP8zHY6SAvDDnI3fccO1R2HeR1doVjpS7HM0w==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ - "linux" + "win32" ] }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.1.tgz", - "integrity": "sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A==", + "node_modules/@lydell/node-pty-win32-x64": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lydell/node-pty-win32-x64/-/node-pty-win32-x64-1.1.0.tgz", + "integrity": "sha512-3N56BZ+WDFnUMYRtsrr7Ky2mhWGl9xXcyqR6cexfuCqcz9RNWL+KoXRv/nZylY5dYaXkft4JaR1uVu+roiZDAw==", "cpu": [ - "arm64" + "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ - "linux" + "win32" ] }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.28.1.tgz", - "integrity": "sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.1.tgz", - "integrity": "sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.1.tgz", - "integrity": "sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.1.tgz", - "integrity": "sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.1.tgz", - "integrity": "sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.1.tgz", - "integrity": "sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.1.tgz", - "integrity": "sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.1.tgz", - "integrity": "sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.1.tgz", - "integrity": "sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@sindresorhus/is": { - "version": "4.6.0", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "license": "MIT", - "engines": { - "node": ">=10" + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" + "engines": { + "node": ">= 8" } }, - "node_modules/@sindresorhus/merge-streams": { - "version": "4.0.0", + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 8" } }, - "node_modules/@szmarczak/http-timer": { - "version": "4.0.6", + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "license": "MIT", "dependencies": { - "defer-to-connect": "^2.0.0" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" }, "engines": { - "node": ">=10" + "node": ">= 8" } }, - "node_modules/@types/cacheable-request": { - "version": "6.0.3", + "node_modules/@npmcli/agent": { + "version": "3.0.0", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "@types/http-cache-semantics": "*", - "@types/keyv": "^3.1.4", - "@types/node": "*", - "@types/responselike": "^1.0.0" + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/@types/configstore": { - "version": "2.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/debug": { - "version": "0.0.30", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true - }, - "node_modules/@types/get-port": { - "version": "3.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/glob": { - "version": "5.0.38", + "node_modules/@npmcli/fs": { + "version": "4.0.0", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" + "semver": "^7.3.5" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/@types/http-cache-semantics": { - "version": "4.0.4", + "node_modules/@opentelemetry/api": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", + "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", "dev": true, - "license": "MIT" + "license": "Apache-2.0", + "engines": { + "node": ">=8.0.0" + } }, - "node_modules/@types/jest": { - "version": "27.5.2", + "node_modules/@opentelemetry/api-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.53.0.tgz", + "integrity": "sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "jest-matcher-utils": "^27.0.0", - "pretty-format": "^27.0.0" + "@opentelemetry/api": "^1.0.0" + }, + "engines": { + "node": ">=14" } }, - "node_modules/@types/json-schema": { - "version": "7.0.15", + "node_modules/@opentelemetry/context-async-hooks": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.26.0.tgz", + "integrity": "sha512-HedpXXYzzbaoutw6DFLWLDket2FwLkLpil4hGCZ1xYEIMTcivdfwEOISgdbLEWyG3HW52gTq2V9mOVJrONgiwg==", "dev": true, - "license": "MIT" + "license": "Apache-2.0", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" + } }, - "node_modules/@types/keyv": { - "version": "3.1.4", + "node_modules/@opentelemetry/core": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.26.0.tgz", + "integrity": "sha512-1iKxXXE8415Cdv0yjG3G6hQnB5eVEsJce3QaawX8SjDn0mAS0ZM8fAbZZJD4ajvhC15cePvosSCut404KrIIvQ==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@types/node": "*" + "@opentelemetry/semantic-conventions": "1.27.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, - "node_modules/@types/lodash": { - "version": "4.17.13", + "node_modules/@opentelemetry/exporter-trace-otlp-http": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.53.0.tgz", + "integrity": "sha512-m7F5ZTq+V9mKGWYpX8EnZ7NjoqAU7VemQ1E2HAG+W/u0wpY1x0OmbxAXfGKFHCspdJk8UKlwPGrpcB8nay3P8A==", "dev": true, - "license": "MIT" + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "1.26.0", + "@opentelemetry/otlp-exporter-base": "0.53.0", + "@opentelemetry/otlp-transformer": "0.53.0", + "@opentelemetry/resources": "1.26.0", + "@opentelemetry/sdk-trace-base": "1.26.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } }, - "node_modules/@types/minimatch": { - "version": "5.1.2", + "node_modules/@opentelemetry/otlp-exporter-base": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.53.0.tgz", + "integrity": "sha512-UCWPreGQEhD6FjBaeDuXhiMf6kkBODF0ZQzrk/tuQcaVDJ+dDQ/xhJp192H9yWnKxVpEjFrSSLnpqmX4VwX+eA==", "dev": true, - "license": "MIT" + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "1.26.0", + "@opentelemetry/otlp-transformer": "0.53.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0" + } }, - "node_modules/@types/mkdirp": { - "version": "0.5.2", + "node_modules/@opentelemetry/otlp-transformer": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.53.0.tgz", + "integrity": "sha512-rM0sDA9HD8dluwuBxLetUmoqGJKSAbWenwD65KY9iZhUxdBHRLrIdrABfNDP7aiTjcgK8XFyTn5fhDz7N+W6DA==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@types/node": "*" + "@opentelemetry/api-logs": "0.53.0", + "@opentelemetry/core": "1.26.0", + "@opentelemetry/resources": "1.26.0", + "@opentelemetry/sdk-logs": "0.53.0", + "@opentelemetry/sdk-metrics": "1.26.0", + "@opentelemetry/sdk-trace-base": "1.26.0", + "protobufjs": "^7.3.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@types/node": { - "version": "22.10.2", + "node_modules/@opentelemetry/propagator-b3": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.26.0.tgz", + "integrity": "sha512-vvVkQLQ/lGGyEy9GT8uFnI047pajSOVnZI2poJqVGD3nJ+B9sFGdlHNnQKophE3lHfnIH0pw2ubrCTjZCgIj+Q==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "undici-types": "~6.20.0" + "@opentelemetry/core": "1.26.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, - "node_modules/@types/responselike": { - "version": "1.0.3", + "node_modules/@opentelemetry/propagator-jaeger": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.26.0.tgz", + "integrity": "sha512-DelFGkCdaxA1C/QA0Xilszfr0t4YbGd3DjxiCDPh34lfnFr+VkkrjV9S8ZTJvAzfdKERXhfOxIKBoGPJwoSz7Q==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@types/node": "*" + "@opentelemetry/core": "1.26.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, - "node_modules/@types/rimraf": { - "version": "2.0.5", + "node_modules/@opentelemetry/resources": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.26.0.tgz", + "integrity": "sha512-CPNYchBE7MBecCSVy0HKpUISEeJOniWqcHaAHpmasZ3j9o6V3AyBzhRc90jdmemq0HOxDr6ylhUbDhBqqPpeNw==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@types/glob": "*", - "@types/node": "*" + "@opentelemetry/core": "1.26.0", + "@opentelemetry/semantic-conventions": "1.27.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, - "node_modules/@types/rimraf/node_modules/@types/glob": { - "version": "8.1.0", + "node_modules/@opentelemetry/sdk-logs": { + "version": "0.53.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.53.0.tgz", + "integrity": "sha512-dhSisnEgIj/vJZXZV6f6KcTnyLDx/VuQ6l3ejuZpMpPlh9S1qMHiZU9NMmOkVkwwHkMy3G6mEBwdP23vUZVr4g==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@types/minimatch": "^5.1.2", - "@types/node": "*" + "@opentelemetry/api-logs": "0.53.0", + "@opentelemetry/core": "1.26.0", + "@opentelemetry/resources": "1.26.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.4.0 <1.10.0" } }, - "node_modules/@types/stylis": { - "version": "4.2.5", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/tmp": { - "version": "0.0.33", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/trusted-types": { - "version": "2.0.7", + "node_modules/@opentelemetry/sdk-metrics": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.26.0.tgz", + "integrity": "sha512-0SvDXmou/JjzSDOjUmetAAvcKQW6ZrvosU0rkbDGpXvvZN+pQF6JbK/Kd4hNdK4q/22yeruqvukXEJyySTzyTQ==", "dev": true, - "license": "MIT", - "optional": true + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "1.26.0", + "@opentelemetry/resources": "1.26.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.10.0" + } }, - "node_modules/abort-controller": { - "version": "3.0.0", + "node_modules/@opentelemetry/sdk-trace-base": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.26.0.tgz", + "integrity": "sha512-olWQldtvbK4v22ymrKLbIcBi9L2SpMO84sCPY54IVsJhP9fRsxJT194C/AVaAuJzLE30EdhhM1VmvVYR7az+cw==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "event-target-shim": "^5.0.0" + "@opentelemetry/core": "1.26.0", + "@opentelemetry/resources": "1.26.0", + "@opentelemetry/semantic-conventions": "1.27.0" }, "engines": { - "node": ">=6.5" + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, - "node_modules/accepts": { - "version": "1.3.8", + "node_modules/@opentelemetry/sdk-trace-node": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.26.0.tgz", + "integrity": "sha512-Fj5IVKrj0yeUwlewCRwzOVcr5avTuNnMHWf7GPc1t6WaT78J6CJyF3saZ/0RkZfdeNO8IcBl/bNcWMVZBMRW8Q==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" + "@opentelemetry/context-async-hooks": "1.26.0", + "@opentelemetry/core": "1.26.0", + "@opentelemetry/propagator-b3": "1.26.0", + "@opentelemetry/propagator-jaeger": "1.26.0", + "@opentelemetry/sdk-trace-base": "1.26.0", + "semver": "^7.5.2" }, "engines": { - "node": ">= 0.6" + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" } }, - "node_modules/accepts/node_modules/negotiator": { - "version": "0.6.3", + "node_modules/@opentelemetry/semantic-conventions": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.27.0.tgz", + "integrity": "sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "engines": { - "node": ">= 0.6" + "node": ">=14" } }, - "node_modules/acorn": { - "version": "8.14.0", + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", "dev": true, "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, + "optional": true, "engines": { - "node": ">=0.4.0" + "node": ">=14" } }, - "node_modules/agent-base": { - "version": "7.1.3", + "node_modules/@pnpm/config.env-replace": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", + "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==", "dev": true, "license": "MIT", "engines": { - "node": ">= 14" + "node": ">=12.22.0" } }, - "node_modules/ansi-escapes": { - "version": "4.3.2", + "node_modules/@pnpm/network.ca-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz", + "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==", "dev": true, "license": "MIT", "dependencies": { - "type-fest": "^0.21.3" + "graceful-fs": "4.2.10" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12.22.0" } }, - "node_modules/ansi-regex": { - "version": "5.0.1", + "node_modules/@pnpm/network.ca-file/node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } + "license": "ISC" }, - "node_modules/ansi-styles": { - "version": "4.3.0", + "node_modules/@pnpm/npm-conf": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz", + "integrity": "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "@pnpm/config.env-replace": "^1.1.0", + "@pnpm/network.ca-file": "^1.0.1", + "config-chain": "^1.1.11" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=12" } }, - "node_modules/anymatch": { - "version": "3.1.3", + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", "dev": true, - "license": "ISC", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" } }, - "node_modules/application-config-path": { - "version": "0.1.1", + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", "dev": true, - "license": "MIT" + "license": "BSD-3-Clause" }, - "node_modules/argparse": { - "version": "2.0.1", + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", "dev": true, - "license": "Python-2.0" + "license": "BSD-3-Clause" }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.1", + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@redocly/ajv": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", + "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js-replace": "^1.0.1" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/array-flatten": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/array.prototype.filter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.4.tgz", - "integrity": "sha512-r+mCJ7zXgXElgR4IRC+fkvNCeoaavWBs6EdCso5Tbcf+iEMKzBU/His60lt34WEZ9vlb8wDkZvQGcVI5GwkfoQ==", + "node_modules/@redocly/cli": { + "version": "1.34.4", + "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.34.4.tgz", + "integrity": "sha512-seH/GgrjSB1EeOsgJ/4Ct6Jk2N7sh12POn/7G8UQFARMyUMJpe1oHtBwT2ndfp4EFCpgBAbZ/82Iw6dwczNxEA==", "dev": true, - "peer": true, + "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-array-method-boxes-properly": "^1.0.0", - "es-object-atoms": "^1.0.0", - "is-string": "^1.0.7" + "@opentelemetry/api": "1.9.0", + "@opentelemetry/exporter-trace-otlp-http": "0.53.0", + "@opentelemetry/resources": "1.26.0", + "@opentelemetry/sdk-trace-node": "1.26.0", + "@opentelemetry/semantic-conventions": "1.27.0", + "@redocly/config": "^0.22.0", + "@redocly/openapi-core": "1.34.4", + "@redocly/respect-core": "1.34.4", + "abort-controller": "^3.0.0", + "chokidar": "^3.5.1", + "colorette": "^1.2.0", + "core-js": "^3.32.1", + "dotenv": "16.4.7", + "form-data": "^4.0.0", + "get-port-please": "^3.0.1", + "glob": "^7.1.6", + "handlebars": "^4.7.6", + "mobx": "^6.0.4", + "pluralize": "^8.0.0", + "react": "^17.0.0 || ^18.2.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.2.0 || ^19.0.0", + "redoc": "2.5.0", + "semver": "^7.5.2", + "simple-websocket": "^9.0.0", + "styled-components": "^6.0.7", + "yargs": "17.0.1" }, - "engines": { - "node": ">= 0.4" + "bin": { + "openapi": "bin/cli.js", + "redocly": "bin/cli.js" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=18.17.0", + "npm": ">=9.5.0" } }, - "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "node_modules/@redocly/cli/node_modules/cliui": { + "version": "7.0.4", "dev": true, - "peer": true, + "license": "ISC", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", + "node_modules/@redocly/cli/node_modules/yargs": { + "version": "17.0.1", "dev": true, "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=12" } }, - "node_modules/async-limiter": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/asynckit": { - "version": "0.4.0", + "node_modules/@redocly/config": { + "version": "0.22.2", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.2.tgz", + "integrity": "sha512-roRDai8/zr2S9YfmzUfNhKjOF0NdcOIqF7bhf4MVC5UxpjIysDjyudvlAiVbpPHp3eDRWbdzUgtkK1a7YiDNyQ==", "dev": true, "license": "MIT" }, - "node_modules/at-least-node": { - "version": "1.0.0", + "node_modules/@redocly/openapi-core": { + "version": "1.34.4", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.4.tgz", + "integrity": "sha512-hf53xEgpXIgWl3b275PgZU3OTpYh1RoD2LHdIfQ1JzBNTWsiNKczTEsI/4Tmh2N1oq9YcphhSMyk3lDh85oDjg==", "dev": true, - "license": "ISC", + "license": "MIT", + "dependencies": { + "@redocly/ajv": "^8.11.2", + "@redocly/config": "^0.22.0", + "colorette": "^1.2.0", + "https-proxy-agent": "^7.0.5", + "js-levenshtein": "^1.1.6", + "js-yaml": "^4.1.0", + "minimatch": "^5.0.1", + "pluralize": "^8.0.0", + "yaml-ast-parser": "0.0.43" + }, "engines": { - "node": ">= 4.0.0" + "node": ">=18.17.0", + "npm": ">=9.5.0" } }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", + "node_modules/@redocly/respect-core": { + "version": "1.34.4", + "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-1.34.4.tgz", + "integrity": "sha512-MitKyKyQpsizA4qCVv+MjXL4WltfhFQAoiKiAzrVR1Kusro3VhYb6yJuzoXjiJhR0ukLP5QOP19Vcs7qmj9dZg==", "dev": true, "license": "MIT", "dependencies": { - "possible-typed-array-names": "^1.0.0" + "@faker-js/faker": "^7.6.0", + "@redocly/ajv": "8.11.2", + "@redocly/openapi-core": "1.34.4", + "better-ajv-errors": "^1.2.0", + "colorette": "^2.0.20", + "concat-stream": "^2.0.0", + "cookie": "^0.7.2", + "dotenv": "16.4.7", + "form-data": "4.0.0", + "jest-diff": "^29.3.1", + "jest-matcher-utils": "^29.3.1", + "js-yaml": "4.1.0", + "json-pointer": "^0.6.2", + "jsonpath-plus": "^10.0.6", + "open": "^10.1.0", + "openapi-sampler": "^1.6.1", + "outdent": "^0.8.0", + "set-cookie-parser": "^2.3.5", + "undici": "^6.21.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=18.17.0", + "npm": ">=9.5.0" } }, - "node_modules/balanced-match": { - "version": "1.0.2", + "node_modules/@redocly/respect-core/node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true, "license": "MIT" }, - "node_modules/base64-js": { - "version": "1.5.1", + "node_modules/@redocly/respect-core/node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">= 0.6" + } }, - "node_modules/batch": { - "version": "0.6.1", - "dev": true, - "license": "MIT" - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/body-parser": { - "version": "1.20.3", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true, - "peer": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", + "node_modules/@redocly/respect-core/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, "license": "MIT", "dependencies": { - "fill-range": "^7.1.1" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" }, "engines": { - "node": ">=8" + "node": ">= 6" } }, - "node_modules/buffer": { - "version": "5.7.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.44.0.tgz", + "integrity": "sha512-xEiEE5oDW6tK4jXCAyliuntGR+amEMO7HLtdSshVuhFnKTYoeYMyXQK7pLouAJJj5KHdwdn87bfHAR2nSdNAUA==", + "cpu": [ + "arm" ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/busboy": { - "version": "1.6.0", - "dev": true, - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cacache": { - "version": "19.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "@npmcli/fs": "^4.0.0", - "fs-minipass": "^3.0.0", - "glob": "^10.2.2", - "lru-cache": "^10.0.1", - "minipass": "^7.0.3", - "minipass-collect": "^2.0.1", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "p-map": "^7.0.2", - "ssri": "^12.0.0", - "tar": "^7.4.3", - "unique-filename": "^4.0.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/cacache/node_modules/brace-expansion": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/cacache/node_modules/glob": { - "version": "10.4.5", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/cacache/node_modules/minimatch": { - "version": "9.0.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/cacheable-lookup": { - "version": "5.0.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.6.0" - } - }, - "node_modules/cacheable-request": { - "version": "7.0.4", - "dev": true, - "license": "MIT", - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/call-bind": { - "version": "1.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "get-intrinsic": "^1.2.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-me-maybe": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/camelize": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/chalk": { - "version": "4.1.2", "dev": true, "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/cheerio": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz", - "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==", - "dev": true, - "peer": true, - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "encoding-sniffer": "^0.2.0", - "htmlparser2": "^9.1.0", - "parse5": "^7.1.2", - "parse5-htmlparser2-tree-adapter": "^7.0.0", - "parse5-parser-stream": "^7.1.2", - "undici": "^6.19.5", - "whatwg-mimetype": "^4.0.0" - }, - "engines": { - "node": ">=18.17" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, - "node_modules/cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "dev": true, - "peer": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chownr": { - "version": "3.0.0", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/classnames": { - "version": "2.5.1", - "dev": true, - "license": "MIT" - }, - "node_modules/cli-cursor": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "restore-cursor": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-spinners": { - "version": "2.9.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/clone": { - "version": "1.0.4", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/clone-response": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-response": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clsx": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } + "optional": true, + "os": [ + "android" + ] }, - "node_modules/color-convert": { - "version": "2.0.1", + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.44.0.tgz", + "integrity": "sha512-uNSk/TgvMbskcHxXYHzqwiyBlJ/lGcv8DaUfcnNwict8ba9GTTNxfn3/FAoFZYgkaXXAdrAA+SLyKplyi349Jw==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "dev": true, - "license": "MIT" - }, - "node_modules/colorette": { - "version": "1.4.0", - "dev": true, - "license": "MIT" + "optional": true, + "os": [ + "android" + ] }, - "node_modules/combined-stream": { - "version": "1.0.8", + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.44.0.tgz", + "integrity": "sha512-VGF3wy0Eq1gcEIkSCr8Ke03CWT+Pm2yveKLaDvq51pPpZza3JX/ClxXOCmTYYq3us5MvEuNRTaeyFThCKRQhOA==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/command-exists": { - "version": "1.2.9", - "dev": true, - "license": "MIT" + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/commander": { - "version": "12.1.0", + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.44.0.tgz", + "integrity": "sha512-fBkyrDhwquRvrTxSGH/qqt3/T0w5Rg0L7ZIDypvBPc1/gzjJle6acCpZ36blwuwcKD/u6oCE/sRWlUAcxLWQbQ==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" + "optional": true, + "os": [ + "darwin" + ] }, - "node_modules/connect": { - "version": "3.7.0", + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.44.0.tgz", + "integrity": "sha512-u5AZzdQJYJXByB8giQ+r4VyfZP+walV+xHWdaFx/1VxsOn6eWJhK2Vl2eElvDJFKQBo/hcYIBg/jaKS8ZmKeNQ==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "finalhandler": "1.1.2", - "parseurl": "~1.3.3", - "utils-merge": "1.0.1" - }, - "engines": { - "node": ">= 0.10.0" - } + "optional": true, + "os": [ + "freebsd" + ] }, - "node_modules/content-disposition": { - "version": "0.5.4", + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.44.0.tgz", + "integrity": "sha512-qC0kS48c/s3EtdArkimctY7h3nHicQeEUdjJzYVJYR3ct3kWSafmn6jkNCA8InbUdge6PVx6keqjk5lVGJf99g==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } + "optional": true, + "os": [ + "freebsd" + ] }, - "node_modules/content-type": { - "version": "1.0.5", + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.44.0.tgz", + "integrity": "sha512-x+e/Z9H0RAWckn4V2OZZl6EmV0L2diuX3QB0uM1r6BvhUIv6xBPL5mrAX2E3e8N8rEHVPwFfz/ETUbV4oW9+lQ==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.6" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/cookie": { - "version": "0.7.1", + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.44.0.tgz", + "integrity": "sha512-1exwiBFf4PU/8HvI8s80icyCcnAIB86MCBdst51fwFmH5dyeoWVPVgmQPcKrMtBQ0W5pAs7jBCWuRXgEpRzSCg==", + "cpu": [ + "arm" + ], "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.6" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/cookie-signature": { - "version": "1.2.2", + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.44.0.tgz", + "integrity": "sha512-ZTR2mxBHb4tK4wGf9b8SYg0Y6KQPjGpR4UWwTFdnmjB4qRtoATZ5dWn3KsDwGa5Z2ZBOE7K52L36J9LueKBdOQ==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "engines": { - "node": ">=6.6.0" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/core-js": { - "version": "3.39.0", + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.44.0.tgz", + "integrity": "sha512-GFWfAhVhWGd4r6UxmnKRTBwP1qmModHtd5gkraeW2G490BpFOZkFtem8yuX2NyafIP/mGpRJgTJ2PwohQkUY/Q==", + "cpu": [ + "arm64" + ], "dev": true, - "hasInstallScript": true, "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/cross-spawn": { - "version": "7.0.6", + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.44.0.tgz", + "integrity": "sha512-xw+FTGcov/ejdusVOqKgMGW3c4+AgqrfvzWEVXcNP6zq2ue+lsYUgJ+5Rtn/OTJf7e2CbgTFvzLW2j0YAtj0Gg==", + "cpu": [ + "loong64" + ], "dev": true, "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/css-color-keywords": { - "version": "1.0.0", + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.44.0.tgz", + "integrity": "sha512-bKGibTr9IdF0zr21kMvkZT4K6NV+jjRnBoVMt2uNMG0BYWm3qOVmYnXKzx7UhwrviKnmK46IKMByMgvpdQlyJQ==", + "cpu": [ + "ppc64" + ], "dev": true, - "license": "ISC", - "engines": { - "node": ">=4" - } + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.44.0.tgz", + "integrity": "sha512-vV3cL48U5kDaKZtXrti12YRa7TyxgKAIDoYdqSIOMOFBXqFj2XbChHAtXquEn2+n78ciFgr4KIqEbydEGPxXgA==", + "cpu": [ + "riscv64" + ], "dev": true, - "peer": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/css-to-react-native": { - "version": "3.2.0", + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.44.0.tgz", + "integrity": "sha512-TDKO8KlHJuvTEdfw5YYFBjhFts2TR0VpZsnLLSYmB7AaohJhM8ctDSdDnUGq77hUh4m/djRafw+9zQpkOanE2Q==", + "cpu": [ + "riscv64" + ], "dev": true, "license": "MIT", - "dependencies": { - "camelize": "^1.0.0", - "css-color-keywords": "^1.0.0", - "postcss-value-parser": "^4.0.2" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.44.0.tgz", + "integrity": "sha512-8541GEyktXaw4lvnGp9m84KENcxInhAt6vPWJ9RodsB/iGjHoMB2Pp5MVBCiKIRxrxzJhGCxmNzdu+oDQ7kwRA==", + "cpu": [ + "s390x" + ], "dev": true, - "peer": true, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/csstype": { - "version": "3.1.3", + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.44.0.tgz", + "integrity": "sha512-iUVJc3c0o8l9Sa/qlDL2Z9UP92UZZW1+EmQ4xfjTc1akr0iUFZNfxrXJ/R1T90h/ILm9iXEY6+iPrmYB3pXKjw==", + "cpu": [ + "x64" + ], "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/data-view-buffer": { - "version": "1.0.1", + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.44.0.tgz", + "integrity": "sha512-PQUobbhLTQT5yz/SPg116VJBgz+XOtXt8D1ck+sfJJhuEsMj2jSej5yTdp8CvWBSceu+WW+ibVL6dm0ptG5fcA==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "optional": true, + "os": [ + "linux" + ] }, - "node_modules/data-view-byte-length": { - "version": "1.0.1", + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.44.0.tgz", + "integrity": "sha512-M0CpcHf8TWn+4oTxJfh7LQuTuaYeXGbk0eageVjQCKzYLsajWS/lFC94qlRqOlyC2KvRT90ZrfXULYmukeIy7w==", + "cpu": [ + "arm64" + ], "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/data-view-byte-offset": { - "version": "1.0.0", + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.44.0.tgz", + "integrity": "sha512-3XJ0NQtMAXTWFW8FqZKcw3gOQwBtVWP/u8TpHP3CRPXD7Pd6s8lLdH3sHWh8vqKCyyiI8xW5ltJScQmBU9j7WA==", + "cpu": [ + "ia32" + ], "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/debug": { - "version": "2.6.9", + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.44.0.tgz", + "integrity": "sha512-Q2Mgwt+D8hd5FIPUuPDsvPR7Bguza6yTkJxspDGkZj7tBRn2y4KSWYuIXpftFSjBra76TbKerCV7rgFPQrn+wQ==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/debug/node_modules/ms": { - "version": "2.0.0", + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true, "license": "MIT" }, - "node_modules/decko": { - "version": "1.2.0", - "dev": true - }, - "node_modules/decompress-response": { - "version": "6.0.0", + "node_modules/@sindresorhus/merge-streams": { + "version": "4.0.0", "dev": true, "license": "MIT", - "dependencies": { - "mimic-response": "^3.1.0" - }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/decompress-response/node_modules/mimic-response": { - "version": "3.1.0", + "node_modules/@types/configstore": { + "version": "2.1.1", "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "license": "MIT" }, - "node_modules/deep-extend": { - "version": "0.6.0", + "node_modules/@types/debug": { + "version": "0.0.30", "dev": true, - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } + "license": "MIT" }, - "node_modules/defaults": { - "version": "1.0.4", + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, - "license": "MIT", - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "license": "MIT" }, - "node_modules/defer-to-connect": { - "version": "2.0.1", + "node_modules/@types/get-port": { + "version": "3.2.0", "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } + "license": "MIT" }, - "node_modules/define-data-property": { - "version": "1.1.4", + "node_modules/@types/glob": { + "version": "5.0.38", "dev": true, "license": "MIT", "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "@types/minimatch": "*", + "@types/node": "*" } }, - "node_modules/define-properties": { - "version": "1.2.1", + "node_modules/@types/jest": { + "version": "27.5.2", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz", + "integrity": "sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA==", "dev": true, "license": "MIT", "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "jest-matcher-utils": "^27.0.0", + "pretty-format": "^27.0.0" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", + "node_modules/@types/jest/node_modules/diff-sequences": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", + "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=0.4.0" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/depd": { - "version": "2.0.0", + "node_modules/@types/jest/node_modules/jest-diff": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", + "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", "dev": true, "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" + }, "engines": { - "node": ">= 0.8" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/destroy": { - "version": "1.2.0", + "node_modules/@types/jest/node_modules/jest-matcher-utils": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", + "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", "dev": true, "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" + }, "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/devcert": { - "version": "1.2.2", + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true, - "license": "MIT", - "dependencies": { - "@types/configstore": "^2.1.1", - "@types/debug": "^0.0.30", - "@types/get-port": "^3.2.0", - "@types/glob": "^5.0.34", - "@types/lodash": "^4.14.92", - "@types/mkdirp": "^0.5.2", - "@types/node": "^8.5.7", - "@types/rimraf": "^2.0.2", - "@types/tmp": "^0.0.33", - "application-config-path": "^0.1.0", - "command-exists": "^1.2.4", - "debug": "^3.1.0", - "eol": "^0.9.1", - "get-port": "^3.2.0", - "glob": "^7.1.2", - "is-valid-domain": "^0.1.6", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "password-prompt": "^1.0.4", - "rimraf": "^2.6.2", - "sudo-prompt": "^8.2.0", - "tmp": "^0.0.33", - "tslib": "^1.10.0" - } + "license": "MIT" }, - "node_modules/devcert/node_modules/@types/node": { - "version": "8.10.66", + "node_modules/@types/lodash": { + "version": "4.17.13", "dev": true, "license": "MIT" }, - "node_modules/devcert/node_modules/debug": { - "version": "3.2.7", + "node_modules/@types/minimatch": { + "version": "5.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mkdirp": { + "version": "0.5.2", "dev": true, "license": "MIT", "dependencies": { - "ms": "^2.1.1" + "@types/node": "*" } }, - "node_modules/devcert/node_modules/tmp": { - "version": "0.0.33", + "node_modules/@types/node": { + "version": "22.10.2", "dev": true, "license": "MIT", "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" + "undici-types": "~6.20.0" } }, - "node_modules/devcert/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "node_modules/diff-sequences": { - "version": "27.5.1", + "node_modules/@types/rimraf": { + "version": "2.0.5", "dev": true, "license": "MIT", - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "dependencies": { + "@types/glob": "*", + "@types/node": "*" } }, - "node_modules/discontinuous-range": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", - "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==", - "dev": true, - "peer": true - }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "node_modules/@types/rimraf/node_modules/@types/glob": { + "version": "8.1.0", "dev": true, - "peer": true, + "license": "MIT", "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + "@types/minimatch": "^5.1.2", + "@types/node": "*" } }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "node_modules/@types/stylis": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.5.tgz", + "integrity": "sha512-1Xve+NMN7FWjY14vLoY5tL3BVEQ/n42YLwaqJIPYhotZ9uBHt87VceMwWQpzmdEt2TNXIorIFG+YeCUUW7RInw==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "peer": true + "license": "MIT" }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "node_modules/@types/tmp": { + "version": "0.0.33", "dev": true, - "peer": true, - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } + "license": "MIT" }, - "node_modules/dompurify": { - "version": "3.2.3", + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", "dev": true, - "license": "(MPL-2.0 OR Apache-2.0)", - "optionalDependencies": { - "@types/trusted-types": "^2.0.7" - } + "license": "MIT", + "optional": true }, - "node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "node_modules/abort-controller": { + "version": "3.0.0", "dev": true, - "peer": true, + "license": "MIT", "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" + "event-target-shim": "^5.0.0" }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" + "engines": { + "node": ">=6.5" } }, - "node_modules/dunder-proto": { - "version": "1.0.0", + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" }, "engines": { - "node": ">= 0.4" + "node": ">= 0.6" } }, - "node_modules/duplexer3": { - "version": "0.1.5", + "node_modules/accepts/node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true, - "license": "BSD-3-Clause" + "license": "MIT", + "engines": { + "node": ">= 0.6" + } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", + "node_modules/acorn": { + "version": "8.14.0", "dev": true, - "license": "MIT" + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } }, - "node_modules/ee-first": { - "version": "1.1.1", + "node_modules/agent-base": { + "version": "7.1.3", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">= 14" + } }, - "node_modules/elm": { - "version": "0.19.1-6", + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, - "hasInstallScript": true, - "license": "BSD-3-Clause", - "bin": { - "elm": "bin/elm" - }, - "engines": { - "node": ">=7.0.0" + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" }, - "optionalDependencies": { - "@elm_binaries/darwin_arm64": "0.19.1-0", - "@elm_binaries/darwin_x64": "0.19.1-0", - "@elm_binaries/linux_x64": "0.19.1-0", - "@elm_binaries/win32_x64": "0.19.1-0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/elm-codegen": { - "version": "0.6.1", + "node_modules/ansi-escapes": { + "version": "4.3.2", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "chalk": "^4.1.1", - "chokidar": "^3.5.1", - "commander": "^8.3.0", - "node-elm-compiler": "^5.0.6" + "type-fest": "^0.21.3" }, - "bin": { - "elm-codegen": "bin/elm-codegen" + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/elm-codegen/node_modules/commander": { - "version": "8.3.0", + "node_modules/ansi-regex": { + "version": "5.0.1", "dev": true, "license": "MIT", "engines": { - "node": ">= 12" + "node": ">=8" } }, - "node_modules/elm-doc-preview": { - "version": "5.0.5", + "node_modules/ansi-styles": { + "version": "4.3.0", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "chalk": "^3.0.0", - "chokidar": "^3.3.1", - "commander": "^5.0.0", - "cross-spawn": "^7.0.2", - "express": "^4.17.1", - "express-ws": "^4.0.0", - "glob": "^7.1.6", - "latest-version": "^5.1.0", - "open": "^7.0.3", - "serve-index": "^1.9.1", - "serve-static": "^1.14.1", - "tmp": "0.1.0", - "ws": "^7.2.3" - }, - "bin": { - "edp": "cli.js", - "elm-doc-preview": "cli.js" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=8.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/elm-doc-preview/node_modules/chalk": { - "version": "3.0.0", + "node_modules/anymatch": { + "version": "3.1.3", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" }, "engines": { - "node": ">=8" + "node": ">= 8" } }, - "node_modules/elm-doc-preview/node_modules/commander": { - "version": "5.1.0", + "node_modules/application-config-path": { + "version": "0.1.1", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } + "license": "MIT" }, - "node_modules/elm-format": { - "version": "0.8.7", + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, - "hasInstallScript": true, - "license": "BSD-3-Clause", - "bin": { - "elm-format": "bin/elm-format" - }, - "optionalDependencies": { - "@avh4/elm-format-darwin-arm64": "0.8.7-2", - "@avh4/elm-format-darwin-x64": "0.8.7-2", - "@avh4/elm-format-linux-arm64": "0.8.7-2", - "@avh4/elm-format-linux-x64": "0.8.7-2", - "@avh4/elm-format-win32-x64": "0.8.7-2" - } + "license": "Python-2.0" }, - "node_modules/elm-hot": { - "version": "1.1.6", + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", "dev": true, "license": "MIT" }, - "node_modules/elm-optimize-level-2": { - "version": "0.3.5", + "node_modules/asynckit": { + "version": "0.4.0", "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@types/jest": "^27.0.3", - "chalk": "^4.1.0", - "commander": "^6.0.0", - "node-elm-compiler": "^5.0.4", - "ts-union": "^2.2.1", - "typescript": "^4.5.5" - }, - "bin": { - "elm-optimize-level-2": "bin/elm-optimize-level-2" - }, - "engines": { - "node": ">=16" - } + "license": "MIT" }, - "node_modules/elm-optimize-level-2/node_modules/commander": { - "version": "6.2.1", + "node_modules/balanced-match": { + "version": "1.0.2", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } + "license": "MIT" }, - "node_modules/elm-pages": { - "version": "3.0.19", + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT" + }, + "node_modules/better-ajv-errors": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/better-ajv-errors/-/better-ajv-errors-1.2.0.tgz", + "integrity": "sha512-UW+IsFycygIo7bclP9h5ugkNH8EjCSgqyFB/yQ4Hqqa1OEYDtb0uFIkYE0b6+CjkgJYVM5UKI/pJPxjYe9EZlA==", + "dev": true, + "license": "Apache-2.0", "dependencies": { - "@sindresorhus/merge-streams": "^4.0.0", - "busboy": "^1.6.0", - "chokidar": "^4.0.1", - "cli-cursor": "^5.0.0", - "commander": "^12.1.0", - "connect": "^3.7.0", - "cookie-signature": "^1.2.2", - "cross-spawn": "7.0.6", - "devcert": "^1.2.2", - "elm-doc-preview": "^5.0.5", - "elm-hot": "^1.1.6", - "esbuild": "^0.24.0", - "fs-extra": "^11.2.0", - "globby": "14.0.2", - "gray-matter": "^4.0.3", - "jsesc": "^3.0.2", - "kleur": "^4.1.5", - "make-fetch-happen": "^14.0.3", - "memfs": "^4.14.0", - "micromatch": "^4.0.8", - "serve-static": "^1.16.2", - "terser": "^5.36.0", - "which": "^5.0.0" + "@babel/code-frame": "^7.16.0", + "@humanwhocodes/momoa": "^2.0.2", + "chalk": "^4.1.2", + "jsonpointer": "^5.0.0", + "leven": "^3.1.0 < 4" }, - "bin": { - "elm-pages": "generator/src/cli.js" + "engines": { + "node": ">= 12.13.0" + }, + "peerDependencies": { + "ajv": "4.11.8 - 8" } }, - "node_modules/elm-pages/node_modules/chokidar": { - "version": "4.0.1", + "node_modules/binary-extensions": { + "version": "2.3.0", "dev": true, "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, "engines": { - "node": ">= 14.16.0" + "node": ">=8" }, "funding": { - "url": "https://paulmillr.com/funding/" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/elm-pages/node_modules/isexe": { - "version": "3.1.1", + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dev": true, - "license": "ISC", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, "engines": { - "node": ">=16" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/elm-pages/node_modules/readdirp": { - "version": "4.0.2", + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/elm-pages/node_modules/which": { - "version": "5.0.0", + "node_modules/braces": { + "version": "3.0.3", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "isexe": "^3.1.1" - }, - "bin": { - "node-which": "bin/which.js" + "fill-range": "^7.1.1" }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=8" } }, - "node_modules/elm-review": { - "version": "2.11.1", + "node_modules/buffer-from": { + "version": "1.1.2", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT" + }, + "node_modules/bundle-name": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "dev": true, + "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "chokidar": "^3.5.2", - "cross-spawn": "^7.0.3", - "elm-solve-deps-wasm": "^1.0.2", - "fastest-levenshtein": "^1.0.16", - "find-up": "^4.1.0", - "folder-hash": "^3.3.0", - "fs-extra": "^9.0.0", - "glob": "^7.1.4", - "got": "^11.8.5", - "graceful-fs": "^4.2.11", - "minimist": "^1.2.6", - "ora": "^5.4.0", - "path-key": "^3.1.1", - "prompts": "^2.2.1", - "rimraf": "^5.0.0", - "strip-ansi": "^6.0.0", - "terminal-link": "^2.1.1", - "which": "^2.0.2", - "wrap-ansi": "^7.0.0" - }, - "bin": { - "elm-review": "bin/elm-review" + "run-applescript": "^7.0.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/jfmengels" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/elm-review/node_modules/brace-expansion": { - "version": "2.0.1", + "node_modules/busboy": { + "version": "1.6.0", "dev": true, - "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" } }, - "node_modules/elm-review/node_modules/fs-extra": { - "version": "9.1.0", + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true, "license": "MIT", - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, "engines": { - "node": ">=10" + "node": ">= 0.8" } }, - "node_modules/elm-review/node_modules/minimatch": { - "version": "9.0.5", + "node_modules/cacache": { + "version": "19.0.1", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "@npmcli/fs": "^4.0.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^7.0.2", + "ssri": "^12.0.0", + "tar": "^7.4.3", + "unique-filename": "^4.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/elm-review/node_modules/rimraf": { - "version": "5.0.10", + "node_modules/cacache/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "glob": "^10.3.7" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "balanced-match": "^1.0.0" } }, - "node_modules/elm-review/node_modules/rimraf/node_modules/glob": { + "node_modules/cacache/node_modules/glob": { "version": "10.4.5", "dev": true, "license": "ISC", @@ -2448,1657 +2318,1658 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/elm-solve-deps-wasm": { - "version": "1.0.2", + "node_modules/cacache/node_modules/minimatch": { + "version": "9.0.5", "dev": true, - "license": "MPL-2.0" + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, - "node_modules/elm-test": { - "version": "0.19.1-revision12", + "node_modules/call-bind": { + "version": "1.0.8", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "chalk": "^4.1.2", - "chokidar": "^3.5.3", - "commander": "^9.4.1", - "cross-spawn": "^7.0.3", - "elm-solve-deps-wasm": "^1.0.2", - "glob": "^8.0.3", - "graceful-fs": "^4.2.10", - "split": "^1.0.1", - "which": "^2.0.2", - "xmlbuilder": "^15.1.1" - }, - "bin": { - "elm-test": "bin/elm-test" + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" }, "engines": { - "node": ">=12.20.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/elm-test/node_modules/commander": { - "version": "9.5.0", + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", "dev": true, "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, "engines": { - "node": "^12.20.0 || >=14" + "node": ">= 0.4" } }, - "node_modules/elm-test/node_modules/glob": { - "version": "8.1.0", + "node_modules/call-bound": { + "version": "1.0.2", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "call-bind": "^1.0.8", + "get-intrinsic": "^1.2.5" }, "engines": { - "node": ">=12" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/emoji-regex": { - "version": "8.0.0", + "node_modules/call-me-maybe": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==", "dev": true, "license": "MIT" }, - "node_modules/encodeurl": { - "version": "2.0.0", + "node_modules/camelize": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.1.tgz", + "integrity": "sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.8" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/encoding": { - "version": "0.1.13", + "node_modules/chalk": { + "version": "4.1.2", "dev": true, "license": "MIT", - "optional": true, - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "node_modules/encoding-sniffer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz", - "integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==", - "dev": true, - "peer": true, "dependencies": { - "iconv-lite": "^0.6.3", - "whatwg-encoding": "^3.1.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" }, "funding": { - "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/encoding-sniffer/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "node_modules/chokidar": { + "version": "3.6.0", "dev": true, - "peer": true, + "license": "MIT", "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/encoding/node_modules/iconv-lite": { - "version": "0.6.3", + "node_modules/chownr": { + "version": "3.0.0", "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, + "license": "BlueOak-1.0.0", "engines": { - "node": ">=0.10.0" + "node": ">=18" } }, - "node_modules/end-of-stream": { - "version": "1.4.4", + "node_modules/classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", "dev": true, - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } + "license": "MIT" }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "node_modules/cli-cursor": { + "version": "5.0.0", "dev": true, - "peer": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, "engines": { - "node": ">=0.12" + "node": ">=18" }, "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/enzyme": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/enzyme/-/enzyme-3.11.0.tgz", - "integrity": "sha512-Dw8/Gs4vRjxY6/6i9wU0V+utmQO9kvh9XLnz3LIudviOnVYDEe2ec+0k+NQoMamn1VrjKgCUOWj5jG/5M5M0Qw==", + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", "dev": true, - "peer": true, - "dependencies": { - "array.prototype.flat": "^1.2.3", - "cheerio": "^1.0.0-rc.3", - "enzyme-shallow-equal": "^1.0.1", - "function.prototype.name": "^1.1.2", - "has": "^1.0.3", - "html-element-map": "^1.2.0", - "is-boolean-object": "^1.0.1", - "is-callable": "^1.1.5", - "is-number-object": "^1.0.4", - "is-regex": "^1.0.5", - "is-string": "^1.0.5", - "is-subset": "^0.1.1", - "lodash.escape": "^4.0.1", - "lodash.isequal": "^4.5.0", - "object-inspect": "^1.7.0", - "object-is": "^1.0.2", - "object.assign": "^4.1.0", - "object.entries": "^1.1.1", - "object.values": "^1.1.1", - "raf": "^3.4.1", - "rst-selector-parser": "^2.2.3", - "string.prototype.trim": "^1.2.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "license": "MIT", + "engines": { + "node": ">=6" } }, - "node_modules/enzyme-shallow-equal": { - "version": "1.0.7", + "node_modules/color-convert": { + "version": "2.0.1", "dev": true, "license": "MIT", "dependencies": { - "hasown": "^2.0.0", - "object-is": "^1.1.5" + "color-name": "~1.1.4" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=7.0.0" } }, - "node_modules/eol": { - "version": "0.9.1", + "node_modules/color-name": { + "version": "1.1.4", "dev": true, "license": "MIT" }, - "node_modules/err-code": { - "version": "2.0.3", + "node_modules/colorette": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", "dev": true, "license": "MIT" }, - "node_modules/es-abstract": { - "version": "1.23.5", + "node_modules/combined-stream": { + "version": "1.0.8", "dev": true, "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "data-view-buffer": "^1.0.1", - "data-view-byte-length": "^1.0.1", - "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", - "globalthis": "^1.0.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "hasown": "^2.0.2", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.3", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.6", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" + "delayed-stream": "~1.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.8" } }, - "node_modules/es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "node_modules/command-exists": { + "version": "1.2.9", "dev": true, - "peer": true + "license": "MIT" }, - "node_modules/es-define-property": { - "version": "1.0.1", + "node_modules/commander": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">=18" } }, - "node_modules/es-errors": { - "version": "1.3.0", + "node_modules/concat-map": { + "version": "0.0.1", "dev": true, + "license": "MIT" + }, + "node_modules/concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "dev": true, + "engines": [ + "node >= 6.0" + ], "license": "MIT", - "engines": { - "node": ">= 0.4" + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" } }, - "node_modules/es-object-atoms": { - "version": "1.0.0", + "node_modules/config-chain": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", "dev": true, "license": "MIT", "dependencies": { - "es-errors": "^1.3.0" + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "node_modules/connect": { + "version": "3.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">= 0.10.0" } }, - "node_modules/es-set-tostringtag": { - "version": "2.0.3", + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dev": true, "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.4", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" + "safe-buffer": "5.2.1" }, "engines": { - "node": ">= 0.4" + "node": ">= 0.6" } }, - "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "dev": true, - "peer": true, - "dependencies": { - "hasown": "^2.0.0" + "license": "MIT", + "engines": { + "node": ">= 0.6" } }, - "node_modules/es-to-primitive": { - "version": "1.3.0", + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "dev": true, "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7", - "is-date-object": "^1.0.5", - "is-symbol": "^1.0.4" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.6" } }, - "node_modules/es6-promise": { - "version": "3.3.1", + "node_modules/cookie-signature": { + "version": "1.2.2", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } }, - "node_modules/esbuild": { - "version": "0.24.0", + "node_modules/core-js": { + "version": "3.43.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.43.0.tgz", + "integrity": "sha512-N6wEbTTZSYOY2rYAn85CuvWWkCK6QweMn7/4Nr3w+gDBeBhk/x4EJeY6FPo4QzDoJZxVTv8U7CMvgWk6pOHHqA==", "dev": true, "hasInstallScript": true, "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/css-color-keywords": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", + "integrity": "sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==", + "dev": true, + "license": "ISC", "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.0", - "@esbuild/android-arm": "0.24.0", - "@esbuild/android-arm64": "0.24.0", - "@esbuild/android-x64": "0.24.0", - "@esbuild/darwin-arm64": "0.24.0", - "@esbuild/darwin-x64": "0.24.0", - "@esbuild/freebsd-arm64": "0.24.0", - "@esbuild/freebsd-x64": "0.24.0", - "@esbuild/linux-arm": "0.24.0", - "@esbuild/linux-arm64": "0.24.0", - "@esbuild/linux-ia32": "0.24.0", - "@esbuild/linux-loong64": "0.24.0", - "@esbuild/linux-mips64el": "0.24.0", - "@esbuild/linux-ppc64": "0.24.0", - "@esbuild/linux-riscv64": "0.24.0", - "@esbuild/linux-s390x": "0.24.0", - "@esbuild/linux-x64": "0.24.0", - "@esbuild/netbsd-x64": "0.24.0", - "@esbuild/openbsd-arm64": "0.24.0", - "@esbuild/openbsd-x64": "0.24.0", - "@esbuild/sunos-x64": "0.24.0", - "@esbuild/win32-arm64": "0.24.0", - "@esbuild/win32-ia32": "0.24.0", - "@esbuild/win32-x64": "0.24.0" + "node": ">=4" } }, - "node_modules/escalade": { + "node_modules/css-to-react-native": { "version": "3.2.0", + "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz", + "integrity": "sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">=6" + "dependencies": { + "camelize": "^1.0.0", + "css-color-keywords": "^1.0.0", + "postcss-value-parser": "^4.0.2" } }, - "node_modules/escape-html": { - "version": "1.0.3", + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", "dev": true, "license": "MIT" }, - "node_modules/esprima": { - "version": "4.0.1", + "node_modules/debug": { + "version": "2.6.9", "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" + "license": "MIT", + "dependencies": { + "ms": "2.0.0" } }, - "node_modules/etag": { - "version": "1.8.1", + "node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/decko": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decko/-/decko-1.2.0.tgz", + "integrity": "sha512-m8FnyHXV1QX+S1cl+KPFDIl6NMkxtKsy6+U/aYyjrOqWMuwAwYWu7ePqrsUHtDR5Y8Yk2pi/KIDSgF+vT4cPOQ==", + "dev": true + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">=4.0.0" } }, - "node_modules/event-target-shim": { - "version": "5.0.1", + "node_modules/default-browser": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz", + "integrity": "sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==", "dev": true, "license": "MIT", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, "engines": { - "node": ">=6" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eventemitter3": { - "version": "5.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/express": { - "version": "4.21.2", + "node_modules/default-browser-id": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz", + "integrity": "sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==", "dev": true, "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.3", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.7.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.3.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.3", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.12", - "proxy-addr": "~2.0.7", - "qs": "6.13.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.19.0", - "serve-static": "1.16.2", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, "engines": { - "node": ">= 0.10.0" + "node": ">=18" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/express-ws": { - "version": "4.0.0", + "node_modules/define-data-property": { + "version": "1.1.4", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "ws": "^5.2.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { - "node": ">=4.5.0" + "node": ">= 0.4" }, - "peerDependencies": { - "express": "^4.0.0 || ^5.0.0-alpha.1" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/express-ws/node_modules/ws": { - "version": "5.2.4", + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", "dev": true, "license": "MIT", - "dependencies": { - "async-limiter": "~1.0.0" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/express/node_modules/cookie-signature": { - "version": "1.0.6", + "node_modules/delayed-stream": { + "version": "1.0.0", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } }, - "node_modules/express/node_modules/finalhandler": { - "version": "1.3.1", + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "dev": true, "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, "engines": { "node": ">= 0.8" } }, - "node_modules/extend-shallow": { - "version": "2.0.1", + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", "dev": true, "license": "MIT", - "dependencies": { - "is-extendable": "^0.1.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.2", + "node_modules/devcert": { + "version": "1.2.2", "dev": true, "license": "MIT", "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" + "@types/configstore": "^2.1.1", + "@types/debug": "^0.0.30", + "@types/get-port": "^3.2.0", + "@types/glob": "^5.0.34", + "@types/lodash": "^4.14.92", + "@types/mkdirp": "^0.5.2", + "@types/node": "^8.5.7", + "@types/rimraf": "^2.0.2", + "@types/tmp": "^0.0.33", + "application-config-path": "^0.1.0", + "command-exists": "^1.2.4", + "debug": "^3.1.0", + "eol": "^0.9.1", + "get-port": "^3.2.0", + "glob": "^7.1.2", + "is-valid-domain": "^0.1.6", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "password-prompt": "^1.0.4", + "rimraf": "^2.6.2", + "sudo-prompt": "^8.2.0", + "tmp": "^0.0.33", + "tslib": "^1.10.0" } }, - "node_modules/fast-safe-stringify": { - "version": "2.1.1", + "node_modules/devcert/node_modules/@types/node": { + "version": "8.10.66", "dev": true, "license": "MIT" }, - "node_modules/fast-xml-parser": { - "version": "4.5.0", + "node_modules/devcert/node_modules/debug": { + "version": "3.2.7", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/NaturalIntelligence" - }, - { - "type": "paypal", - "url": "https://paypal.me/naturalintelligence" - } - ], "license": "MIT", "dependencies": { - "strnum": "^1.0.5" - }, - "bin": { - "fxparser": "src/cli/cli.js" + "ms": "^2.1.1" } }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", + "node_modules/devcert/node_modules/tmp": { + "version": "0.0.33", "dev": true, "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, "engines": { - "node": ">= 4.9.1" + "node": ">=0.6.0" } }, - "node_modules/fastq": { - "version": "1.17.1", + "node_modules/devcert/node_modules/tslib": { + "version": "1.14.1", "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } + "license": "0BSD" }, - "node_modules/fill-range": { - "version": "7.1.1", + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/finalhandler": { - "version": "1.1.2", + "node_modules/dompurify": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.6.tgz", + "integrity": "sha512-/2GogDQlohXPZe6D6NOgQvXLPSYBqIWMnZ8zzOhn09REE4eyAzb+Hed3jhoM9OkuaJ8P6ZGTTVWQKAi8ieIzfQ==", "dev": true, - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" } }, - "node_modules/finalhandler/node_modules/encodeurl": { - "version": "1.0.2", + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "engines": { - "node": ">= 0.8" + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" } }, - "node_modules/finalhandler/node_modules/on-finished": { - "version": "2.3.0", + "node_modules/dunder-proto": { + "version": "1.0.0", "dev": true, "license": "MIT", "dependencies": { - "ee-first": "1.1.1" + "call-bind-apply-helpers": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" }, "engines": { - "node": ">= 0.8" + "node": ">= 0.4" } }, - "node_modules/finalhandler/node_modules/statuses": { - "version": "1.5.0", + "node_modules/eastasianwidth": { + "version": "0.2.0", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } + "license": "MIT" }, - "node_modules/find-elm-dependencies": { - "version": "2.0.4", + "node_modules/ee-first": { + "version": "1.1.1", "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "firstline": "^1.2.0", - "lodash": "^4.17.19" - }, - "bin": { - "find-elm-dependencies": "bin/cli.js" - }, - "engines": { - "node": ">=4.0.0" - } + "license": "MIT" }, - "node_modules/find-up": { - "version": "4.1.0", + "node_modules/elm-codegen": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/elm-codegen/-/elm-codegen-0.6.1.tgz", + "integrity": "sha512-mbVmK4fqW+wtYzTZhJSuT42KrQZMRTueYerCvo09sO5v7QdDGw3qeG/rL1vLH0q2GJF44lXhyBo4lv6azSBOQQ==", "dev": true, - "license": "MIT", + "license": "BSD-3-Clause", "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "chalk": "^4.1.1", + "chokidar": "^3.5.1", + "commander": "^8.3.0", + "node-elm-compiler": "^5.0.6" }, - "engines": { - "node": ">=8" + "bin": { + "elm-codegen": "bin/elm-codegen" } }, - "node_modules/firstline": { - "version": "1.3.1", + "node_modules/elm-codegen/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", "dev": true, "license": "MIT", "engines": { - "node": ">=6.4.0" + "node": ">= 12" } }, - "node_modules/folder-hash": { - "version": "3.3.3", + "node_modules/elm-doc-preview": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/elm-doc-preview/-/elm-doc-preview-6.0.1.tgz", + "integrity": "sha512-G/xgVRKpbLuqliQmBINQFE6I0YAwqET2+SabiyXE47kaVChkhIz91HlZudUvCzTG/CV2ci7AERtAwYzQ4bjOKA==", "dev": true, - "license": "MIT", + "license": "BSD-3-Clause", "dependencies": { - "debug": "^4.1.1", - "graceful-fs": "~4.2.0", - "minimatch": "~3.0.4" + "chalk": "^5.3.0", + "chokidar": "^3.6.0", + "commander": "^12.1.0", + "cross-spawn": "^7.0.6", + "express": "^4.21.2", + "express-ws": "^5.0.2", + "glob": "^11.0.0", + "latest-version": "^9.0.0", + "open": "^10.1.0", + "serve-index": "^1.9.1", + "serve-static": "^1.16.2", + "tmp": "0.2.3", + "ws": "^8.18.0" }, "bin": { - "folder-hash": "bin/folder-hash" + "edp": "cli.js", + "elm-doc-preview": "cli.js" }, "engines": { - "node": ">=6.0.0" + "node": ">=20" } }, - "node_modules/folder-hash/node_modules/debug": { - "version": "4.4.0", + "node_modules/elm-doc-preview/node_modules/chalk": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", "dev": true, "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, "engines": { - "node": ">=6.0" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/folder-hash/node_modules/minimatch": { - "version": "3.0.8", + "node_modules/elm-doc-preview/node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, + "license": "MIT", "engines": { - "node": "*" + "node": ">=18" } }, - "node_modules/for-each": { - "version": "0.3.3", + "node_modules/elm-doc-preview/node_modules/cross-spawn": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", "dev": true, "license": "MIT", "dependencies": { - "is-callable": "^1.1.3" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" } }, - "node_modules/foreach": { - "version": "2.0.6", - "dev": true, - "license": "MIT" - }, - "node_modules/foreground-child": { - "version": "3.3.0", + "node_modules/elm-doc-preview/node_modules/glob": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", + "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", "dev": true, "license": "ISC", "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.0.3", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=14" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/form-data": { - "version": "4.0.1", + "node_modules/elm-doc-preview/node_modules/jackspeak": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", + "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", "dev": true, - "license": "MIT", + "license": "BlueOak-1.0.0", "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "@isaacs/cliui": "^8.0.2" }, "engines": { - "node": ">= 6" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/fs-extra": { - "version": "11.2.0", + "node_modules/elm-doc-preview/node_modules/lru-cache": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz", + "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==", "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, + "license": "ISC", "engines": { - "node": ">=14.14" + "node": "20 || >=22" } }, - "node_modules/fs-minipass": { - "version": "3.0.3", + "node_modules/elm-doc-preview/node_modules/minimatch": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", + "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", "dev": true, "license": "ISC", "dependencies": { - "minipass": "^7.0.3" + "@isaacs/brace-expansion": "^5.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/function-bind": { - "version": "1.1.2", + "node_modules/elm-doc-preview/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", "dev": true, "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=4" } }, - "node_modules/function.prototype.name": { - "version": "1.1.6", + "node_modules/elm-doc-preview/node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", "dev": true, - "license": "MIT", + "license": "BlueOak-1.0.0", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" }, "engines": { - "node": ">= 0.4" + "node": "20 || >=22" }, "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", + "node_modules/elm-doc-preview/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" + "bin": { + "semver": "bin/semver" } }, - "node_modules/get-intrinsic": { - "version": "1.2.6", + "node_modules/elm-doc-preview/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "dunder-proto": "^1.0.0", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "function-bind": "^1.1.2", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.0.0" + "shebang-regex": "^1.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/get-port": { - "version": "3.2.0", + "node_modules/elm-doc-preview/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/get-port-please": { - "version": "3.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/get-stream": { - "version": "5.2.0", + "node_modules/elm-doc-preview/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" + "isexe": "^2.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "bin": { + "which": "bin/which" } }, - "node_modules/get-symbol-description": { - "version": "1.0.2", + "node_modules/elm-doc-preview/node_modules/ws": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" - }, "engines": { - "node": ">= 0.4" + "node": ">=10.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, - "node_modules/glob": { - "version": "7.2.3", + "node_modules/elm-hot": { + "version": "1.1.6", "dev": true, - "license": "ISC", + "license": "MIT" + }, + "node_modules/elm-optimize-level-2": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/elm-optimize-level-2/-/elm-optimize-level-2-0.3.5.tgz", + "integrity": "sha512-t1xl8zR9UBspdmEMuLBE/qTLP+Ew3L4PzKLhSY/PsO21HU3jZ1ULmKxDtZmJPVG4ciqsY1JSl/GFbaSdQ1sX9Q==", + "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "@types/jest": "^27.0.3", + "chalk": "^4.1.0", + "commander": "^6.0.0", + "node-elm-compiler": "^5.0.4", + "ts-union": "^2.2.1", + "typescript": "^4.5.5" }, - "engines": { - "node": "*" + "bin": { + "elm-optimize-level-2": "bin/elm-optimize-level-2" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "engines": { + "node": ">=16" } }, - "node_modules/glob-parent": { - "version": "5.1.2", + "node_modules/elm-optimize-level-2/node_modules/commander": { + "version": "6.2.1", "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, + "license": "MIT", "engines": { "node": ">= 6" } }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", + "node_modules/elm-pages": { + "version": "3.0.24", + "resolved": "https://registry.npmjs.org/elm-pages/-/elm-pages-3.0.24.tgz", + "integrity": "sha512-rVxsEGCkddv6hqEtwFe3L+tEs2nnItBdhuhhW3W5BLvfK8vgFl1dNAVnTX7xKn09c5ZF9Y8sKe4rs0Z9RoyVNQ==", "dev": true, - "license": "ISC", + "license": "BSD-3-Clause", "dependencies": { - "brace-expansion": "^1.1.7" + "@sindresorhus/merge-streams": "^4.0.0", + "busboy": "^1.6.0", + "chokidar": "^4.0.3", + "cli-cursor": "^5.0.0", + "commander": "^13.1.0", + "connect": "^3.7.0", + "cookie-signature": "^1.2.2", + "cross-spawn": "7.0.6", + "devcert": "^1.2.2", + "elm-doc-preview": "^6.0.1", + "elm-hot": "^1.1.6", + "esbuild": "^0.25.0", + "fs-extra": "^11.3.0", + "globby": "14.1.0", + "gray-matter": "^4.0.3", + "jsesc": "^3.1.0", + "kleur": "^4.1.5", + "make-fetch-happen": "^14.0.3", + "memfs": "^4.17.0", + "micromatch": "^4.0.8", + "serve-static": "^1.16.2", + "terser": "^5.39.0", + "vite": "^6.2.0", + "which": "^5.0.0" }, - "engines": { - "node": "*" + "bin": { + "elm-pages": "generator/src/cli.js" } }, - "node_modules/globalthis": { - "version": "1.0.4", + "node_modules/elm-pages/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "license": "MIT", "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" + "readdirp": "^4.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">= 14.16.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://paulmillr.com/funding/" } }, - "node_modules/globby": { - "version": "14.0.2", + "node_modules/elm-pages/node_modules/cross-spawn": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", "dev": true, "license": "MIT", "dependencies": { - "@sindresorhus/merge-streams": "^2.1.0", - "fast-glob": "^3.3.2", - "ignore": "^5.2.4", - "path-type": "^5.0.0", - "slash": "^5.1.0", - "unicorn-magic": "^0.1.0" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" }, "engines": { - "node": ">=18" + "node": ">=4.8" + } + }, + "node_modules/elm-pages/node_modules/cross-spawn/node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/elm-pages/node_modules/cross-spawn/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "bin": { + "which": "bin/which" } }, - "node_modules/globby/node_modules/@sindresorhus/merge-streams": { - "version": "2.3.0", + "node_modules/elm-pages/node_modules/isexe": { + "version": "3.1.1", "dev": true, - "license": "MIT", + "license": "ISC", "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=16" } }, - "node_modules/gopd": { - "version": "1.2.0", + "node_modules/elm-pages/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4" } }, - "node_modules/got": { - "version": "11.8.6", + "node_modules/elm-pages/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", "dev": true, "license": "MIT", - "dependencies": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - }, "engines": { - "node": ">=10.19.0" + "node": ">= 14.18.0" }, "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", + "node_modules/elm-pages/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, - "license": "ISC" + "license": "ISC", + "bin": { + "semver": "bin/semver" + } }, - "node_modules/gray-matter": { - "version": "4.0.3", + "node_modules/elm-pages/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", "dev": true, "license": "MIT", "dependencies": { - "js-yaml": "^3.13.1", - "kind-of": "^6.0.2", - "section-matter": "^1.0.0", - "strip-bom-string": "^1.0.0" + "shebang-regex": "^1.0.0" }, "engines": { - "node": ">=6.0" - } - }, - "node_modules/gray-matter/node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" + "node": ">=0.10.0" } }, - "node_modules/gray-matter/node_modules/js-yaml": { - "version": "3.14.1", + "node_modules/elm-pages/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", "dev": true, "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/handlebars": { - "version": "4.7.8", + "node_modules/elm-pages/node_modules/which": { + "version": "5.0.0", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.2", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" + "isexe": "^3.1.1" }, "bin": { - "handlebars": "bin/handlebars" - }, - "engines": { - "node": ">=0.4.7" + "node-which": "bin/which.js" }, - "optionalDependencies": { - "uglify-js": "^3.1.4" - } - }, - "node_modules/has": { - "version": "1.0.4", - "dev": true, - "license": "MIT", "engines": { - "node": ">= 0.4.0" + "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/has-bigints": { - "version": "1.0.2", + "node_modules/emoji-regex": { + "version": "8.0.0", "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "MIT" }, - "node_modules/has-flag": { - "version": "4.0.0", + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 0.8" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", + "node_modules/encoding": { + "version": "0.1.13", "dev": true, "license": "MIT", + "optional": true, "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "iconv-lite": "^0.6.2" } }, - "node_modules/has-proto": { - "version": "1.2.0", + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", "dev": true, "license": "MIT", + "optional": true, "dependencies": { - "dunder-proto": "^1.0.0" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/has-symbols": { - "version": "1.1.0", + "node_modules/eol": { + "version": "0.9.1", + "dev": true, + "license": "MIT" + }, + "node_modules/err-code": { + "version": "2.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/es-define-property": { + "version": "1.0.1", "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-tostringtag": { - "version": "1.0.2", + "node_modules/es-errors": { + "version": "1.3.0", "dev": true, "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hasown": { - "version": "2.0.2", + "node_modules/es-object-atoms": { + "version": "1.0.0", "dev": true, "license": "MIT", "dependencies": { - "function-bind": "^1.1.2" + "es-errors": "^1.3.0" }, "engines": { "node": ">= 0.4" } }, - "node_modules/html-element-map": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/html-element-map/-/html-element-map-1.3.1.tgz", - "integrity": "sha512-6XMlxrAFX4UEEGxctfFnmrFaaZFNf9i5fNuV5wZ3WWQ4FVaNP1aX1LkX9j2mfEx1NpjeE/rL3nmgEn23GdFmrg==", + "node_modules/es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==", "dev": true, - "peer": true, - "dependencies": { - "array.prototype.filter": "^1.0.0", - "call-bind": "^1.0.2" + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.5.tgz", + "integrity": "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.5", + "@esbuild/android-arm": "0.25.5", + "@esbuild/android-arm64": "0.25.5", + "@esbuild/android-x64": "0.25.5", + "@esbuild/darwin-arm64": "0.25.5", + "@esbuild/darwin-x64": "0.25.5", + "@esbuild/freebsd-arm64": "0.25.5", + "@esbuild/freebsd-x64": "0.25.5", + "@esbuild/linux-arm": "0.25.5", + "@esbuild/linux-arm64": "0.25.5", + "@esbuild/linux-ia32": "0.25.5", + "@esbuild/linux-loong64": "0.25.5", + "@esbuild/linux-mips64el": "0.25.5", + "@esbuild/linux-ppc64": "0.25.5", + "@esbuild/linux-riscv64": "0.25.5", + "@esbuild/linux-s390x": "0.25.5", + "@esbuild/linux-x64": "0.25.5", + "@esbuild/netbsd-arm64": "0.25.5", + "@esbuild/netbsd-x64": "0.25.5", + "@esbuild/openbsd-arm64": "0.25.5", + "@esbuild/openbsd-x64": "0.25.5", + "@esbuild/sunos-x64": "0.25.5", + "@esbuild/win32-arm64": "0.25.5", + "@esbuild/win32-ia32": "0.25.5", + "@esbuild/win32-x64": "0.25.5" } }, - "node_modules/htmlparser2": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", - "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", + "node_modules/escalade": { + "version": "3.2.0", "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "peer": true, - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "entities": "^4.5.0" + "license": "MIT", + "engines": { + "node": ">=6" } }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", + "node_modules/escape-html": { + "version": "1.0.3", "dev": true, - "license": "BSD-2-Clause" + "license": "MIT" }, - "node_modules/http-errors": { - "version": "2.0.0", + "node_modules/esprima": { + "version": "4.0.1", "dev": true, - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" }, "engines": { - "node": ">= 0.8" + "node": ">=4" } }, - "node_modules/http-proxy-agent": { - "version": "7.0.2", + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "dev": true, "license": "MIT", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, "engines": { - "node": ">= 14" + "node": ">= 0.6" } }, - "node_modules/http-proxy-agent/node_modules/debug": { - "version": "4.4.0", + "node_modules/event-target-shim": { + "version": "5.0.1", "dev": true, "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">=6" } }, - "node_modules/http2-client": { - "version": "1.3.5", + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", "dev": true, "license": "MIT" }, - "node_modules/http2-wrapper": { - "version": "1.0.3", + "node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "dev": true, "license": "MIT", "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" }, "engines": { - "node": ">=10.19.0" + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, - "node_modules/https-proxy-agent": { - "version": "7.0.6", + "node_modules/express-ws": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/express-ws/-/express-ws-5.0.2.tgz", + "integrity": "sha512-0uvmuk61O9HXgLhGl3QhNSEtRsQevtmbL94/eILaliEADZBHZOQUAiHFrGPrgsjikohyrmSG5g+sCfASTt0lkQ==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" + "ws": "^7.4.6" }, "engines": { - "node": ">= 14" + "node": ">=4.5.0" + }, + "peerDependencies": { + "express": "^4.0.0 || ^5.0.0-alpha.1" } }, - "node_modules/https-proxy-agent/node_modules/debug": { - "version": "4.4.0", + "node_modules/express/node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/express/node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", "dev": true, "license": "MIT", "dependencies": { - "ms": "^2.1.3" + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">= 0.8" } }, - "node_modules/hyperdyperid": { - "version": "1.2.0", + "node_modules/extend-shallow": { + "version": "2.0.1", "dev": true, "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, "engines": { - "node": ">=10.18" + "node": ">=0.10.0" } }, - "node_modules/iconv-lite": { - "version": "0.4.24", + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "license": "MIT", "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" }, "engines": { - "node": ">=0.10.0" + "node": ">=8.6.0" } }, - "node_modules/ieee754": { - "version": "1.2.1", + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", + "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", "dev": true, "funding": [ { "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" + "url": "https://github.com/sponsors/fastify" }, { - "type": "consulting", - "url": "https://feross.org/support" + "type": "opencollective", + "url": "https://opencollective.com/fastify" } ], - "license": "BSD-3-Clause" - }, - "node_modules/ignore": { - "version": "5.3.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } + "license": "BSD-3-Clause", + "peer": true }, - "node_modules/imurmurhash": { - "version": "0.1.4", + "node_modules/fast-xml-parser": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.3.tgz", + "integrity": "sha512-RKihhV+SHsIUGXObeVy9AXiBbFwkVk7Syp8XgwN5U3JV416+Gwp/GO9i0JYKmikykgz/UHRrrV4ROuZEo/T0ig==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "strnum": "^1.1.1" + }, + "bin": { + "fxparser": "src/cli/cli.js" } }, - "node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "node_modules/ini": { - "version": "1.3.8", - "dev": true, - "license": "ISC" - }, - "node_modules/internal-slot": { - "version": "1.0.7", + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" + "reusify": "^1.0.4" } }, - "node_modules/ip-address": { - "version": "9.0.5", + "node_modules/fill-range": { + "version": "7.1.1", "dev": true, "license": "MIT", "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" + "to-regex-range": "^5.0.1" }, "engines": { - "node": ">= 12" - } - }, - "node_modules/ip-address/node_modules/sprintf-js": { - "version": "1.1.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.10" + "node": ">=8" } }, - "node_modules/is-array-buffer": { - "version": "3.0.4", + "node_modules/finalhandler": { + "version": "1.1.2", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.8" } }, - "node_modules/is-async-function": { - "version": "2.0.0", + "node_modules/finalhandler/node_modules/encodeurl": { + "version": "1.0.2", "dev": true, "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.8" } }, - "node_modules/is-bigint": { - "version": "1.1.0", + "node_modules/finalhandler/node_modules/on-finished": { + "version": "2.3.0", "dev": true, "license": "MIT", "dependencies": { - "has-bigints": "^1.0.2" + "ee-first": "1.1.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.8" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", + "node_modules/finalhandler/node_modules/statuses": { + "version": "1.5.0", "dev": true, "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, "engines": { - "node": ">=8" + "node": ">= 0.6" } }, - "node_modules/is-boolean-object": { - "version": "1.2.1", + "node_modules/find-elm-dependencies": { + "version": "2.0.4", "dev": true, - "license": "MIT", + "license": "BSD-3-Clause", "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" + "firstline": "^1.2.0", + "lodash": "^4.17.19" }, - "engines": { - "node": ">= 0.4" + "bin": { + "find-elm-dependencies": "bin/cli.js" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=4.0.0" } }, - "node_modules/is-callable": { - "version": "1.2.7", + "node_modules/firstline": { + "version": "1.3.1", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=6.4.0" } }, - "node_modules/is-data-view": { - "version": "1.0.2", + "node_modules/foreach": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.6.tgz", + "integrity": "sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==", "dev": true, - "license": "MIT", + "license": "MIT" + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", "dependencies": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/is-date-object": { - "version": "1.1.0", + "node_modules/foreground-child/node_modules/cross-spawn": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4.8" } }, - "node_modules/is-docker": { - "version": "2.2.1", + "node_modules/foreground-child/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", "dev": true, "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, - "node_modules/is-extendable": { - "version": "0.1.1", + "node_modules/foreground-child/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/foreground-child/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", "dev": true, "license": "MIT", + "dependencies": { + "shebang-regex": "^1.0.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-extglob": { - "version": "2.1.1", + "node_modules/foreground-child/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/is-finalizationregistry": { - "version": "1.1.0", + "node_modules/foreground-child/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/form-data": { + "version": "4.0.1", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 6" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 0.6" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "dev": true, "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.6" } }, - "node_modules/is-glob": { - "version": "4.0.3", + "node_modules/fs-extra": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", "dev": true, "license": "MIT", "dependencies": { - "is-extglob": "^2.1.1" + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=14.14" } }, - "node_modules/is-interactive": { - "version": "1.0.0", + "node_modules/fs-minipass": { + "version": "3.0.3", "dev": true, - "license": "MIT", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, "engines": { - "node": ">=8" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/is-map": { - "version": "2.0.3", + "node_modules/fs.realpath": { + "version": "1.0.0", "dev": true, - "license": "MIT", + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/is-negative-zero": { - "version": "2.0.3", + "node_modules/function-bind": { + "version": "1.1.2", "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.4" - }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-number": { - "version": "7.0.0", + "node_modules/get-caller-file": { + "version": "2.0.5", "dev": true, - "license": "MIT", + "license": "ISC", "engines": { - "node": ">=0.12.0" + "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/is-number-object": { - "version": "1.1.0", + "node_modules/get-intrinsic": { + "version": "1.2.6", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "has-tostringtag": "^1.0.2" + "call-bind-apply-helpers": "^1.0.1", + "dunder-proto": "^1.0.0", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "function-bind": "^1.1.2", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -4107,121 +3978,96 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-regex": { - "version": "1.2.1", + "node_modules/get-port": { + "version": "3.2.0", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4" } }, - "node_modules/is-set": { - "version": "2.0.3", + "node_modules/get-port-please": { + "version": "3.1.2", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "MIT" }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.3", + "node_modules/glob": { + "version": "7.2.3", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "call-bind": "^1.0.7" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">= 0.4" + "node": "*" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/is-string": { - "version": "1.1.0", + "node_modules/glob-parent": { + "version": "5.1.2", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "call-bind": "^1.0.7", - "has-tostringtag": "^1.0.2" + "is-glob": "^4.0.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 6" } }, - "node_modules/is-subset": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", - "integrity": "sha512-6Ybun0IkarhmEqxXCNw/C0bna6Zb/TkfUX9UbwJtK6ObwAVCxmAP308WWTHviM/zAqXk05cdhYsUsZeGQh99iw==", - "dev": true, - "peer": true - }, - "node_modules/is-symbol": { - "version": "1.1.1", + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "*" } }, - "node_modules/is-typed-array": { - "version": "1.1.13", + "node_modules/globby": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", + "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==", "dev": true, "license": "MIT", "dependencies": { - "which-typed-array": "^1.1.14" + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.3", + "ignore": "^7.0.3", + "path-type": "^6.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.3.0" }, "engines": { - "node": ">= 0.4" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", + "node_modules/globby/node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", "dev": true, "license": "MIT", "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-valid-domain": { - "version": "0.1.6", - "dev": true, - "license": "MIT", - "dependencies": { - "punycode": "^2.1.1" - } - }, - "node_modules/is-weakmap": { - "version": "2.0.2", + "node_modules/gopd": { + "version": "1.2.0", "dev": true, "license": "MIT", "engines": { @@ -4231,1518 +4077,1675 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-weakref": { - "version": "1.0.2", + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "ISC" }, - "node_modules/is-weakset": { - "version": "2.0.3", + "node_modules/gray-matter": { + "version": "4.0.3", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4" + "js-yaml": "^3.13.1", + "kind-of": "^6.0.2", + "section-matter": "^1.0.0", + "strip-bom-string": "^1.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=6.0" } }, - "node_modules/is-wsl": { - "version": "2.2.0", + "node_modules/gray-matter/node_modules/argparse": { + "version": "1.0.10", "dev": true, "license": "MIT", "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" + "sprintf-js": "~1.0.2" } }, - "node_modules/isarray": { - "version": "2.0.5", - "dev": true, - "license": "MIT" - }, - "node_modules/isexe": { - "version": "2.0.0", - "dev": true, - "license": "ISC" - }, - "node_modules/jackspeak": { - "version": "3.4.3", + "node_modules/gray-matter/node_modules/js-yaml": { + "version": "3.14.1", "dev": true, - "license": "BlueOak-1.0.0", + "license": "MIT", "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "argparse": "^1.0.7", + "esprima": "^4.0.0" }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jest-diff": { - "version": "27.5.1", + "node_modules/handlebars": { + "version": "4.7.8", "dev": true, "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" } }, - "node_modules/jest-get-type": { - "version": "27.5.1", + "node_modules/has-flag": { + "version": "4.0.0", "dev": true, "license": "MIT", "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=8" } }, - "node_modules/jest-matcher-utils": { - "version": "27.5.1", + "node_modules/has-property-descriptors": { + "version": "1.0.2", "dev": true, "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^27.5.1", - "jest-get-type": "^27.5.1", - "pretty-format": "^27.5.1" + "es-define-property": "^1.0.0" }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/js-levenshtein": { - "version": "1.1.6", + "node_modules/has-symbols": { + "version": "1.1.0", "dev": true, "license": "MIT", "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" + "node": ">= 0.4" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jsbn": { - "version": "1.1.0", - "dev": true, - "license": "MIT" - }, - "node_modules/jsesc": { - "version": "3.1.0", + "node_modules/hasown": { + "version": "2.0.2", "dev": true, "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" + "dependencies": { + "function-bind": "^1.1.2" }, "engines": { - "node": ">=6" + "node": ">= 0.4" } }, - "node_modules/json-buffer": { - "version": "3.0.1", + "node_modules/http-cache-semantics": { + "version": "4.1.1", "dev": true, - "license": "MIT" + "license": "BSD-2-Clause" }, - "node_modules/json-pointer": { - "version": "0.6.2", + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dev": true, "license": "MIT", "dependencies": { - "foreach": "^2.0.4" + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" } }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/jsonfile": { - "version": "6.1.0", + "node_modules/http-proxy-agent": { + "version": "7.0.2", "dev": true, "license": "MIT", "dependencies": { - "universalify": "^2.0.0" + "agent-base": "^7.1.0", + "debug": "^4.3.4" }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "engines": { + "node": ">= 14" } }, - "node_modules/keyv": { - "version": "4.5.4", + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.4.0", "dev": true, "license": "MIT", "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "dev": true, - "license": "MIT", + "ms": "^2.1.3" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/kleur": { - "version": "4.1.5", + "node_modules/http2-client": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.5.tgz", + "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } + "license": "MIT" }, - "node_modules/latest-version": { - "version": "5.1.0", + "node_modules/https-proxy-agent": { + "version": "7.0.6", "dev": true, "license": "MIT", "dependencies": { - "package-json": "^6.3.0" + "agent-base": "^7.1.2", + "debug": "4" }, "engines": { - "node": ">=8" + "node": ">= 14" } }, - "node_modules/locate-path": { - "version": "5.0.0", + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.4.0", "dev": true, "license": "MIT", "dependencies": { - "p-locate": "^4.1.0" + "ms": "^2.1.3" }, "engines": { - "node": ">=8" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.escape": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz", - "integrity": "sha512-nXEOnb/jK9g0DYMr1/Xvq6l5xMD7GDG55+GSYIYmS0G4tBk/hURD4JR9WCavs04t33WmJx9kCyp9vJ+mr4BOUw==", - "dev": true, - "peer": true - }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", - "dev": true, - "peer": true - }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "dev": true, - "license": "MIT" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } }, - "node_modules/log-symbols": { - "version": "4.1.0", + "node_modules/hyperdyperid": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hyperdyperid/-/hyperdyperid-1.2.0.tgz", + "integrity": "sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==", "dev": true, "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=10.18" } }, - "node_modules/loose-envify": { - "version": "1.4.0", + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "license": "MIT", "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" + "safer-buffer": ">= 2.1.2 < 3" }, - "bin": { - "loose-envify": "cli.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/lowercase-keys": { - "version": "2.0.0", + "node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 4" } }, - "node_modules/lru-cache": { - "version": "10.4.3", - "dev": true, - "license": "ISC" - }, - "node_modules/lunr": { - "version": "2.3.9", + "node_modules/imurmurhash": { + "version": "0.1.4", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } }, - "node_modules/make-fetch-happen": { - "version": "14.0.3", + "node_modules/inflight": { + "version": "1.0.6", "dev": true, "license": "ISC", "dependencies": { - "@npmcli/agent": "^3.0.0", - "cacache": "^19.0.1", - "http-cache-semantics": "^4.1.1", - "minipass": "^7.0.2", - "minipass-fetch": "^4.0.0", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^1.0.0", - "proc-log": "^5.0.0", - "promise-retry": "^2.0.1", - "ssri": "^12.0.0" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" + "once": "^1.3.0", + "wrappy": "1" } }, - "node_modules/mark.js": { - "version": "8.11.1", + "node_modules/inherits": { + "version": "2.0.4", "dev": true, - "license": "MIT" + "license": "ISC" }, - "node_modules/marked": { - "version": "4.3.0", + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, + "node_modules/ip-address": { + "version": "9.0.5", "dev": true, "license": "MIT", - "bin": { - "marked": "bin/marked.js" + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" }, "engines": { "node": ">= 12" } }, - "node_modules/math-intrinsics": { - "version": "1.0.0", + "node_modules/ip-address/node_modules/sprintf-js": { + "version": "1.1.3", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">= 0.10" } }, - "node_modules/media-typer": { - "version": "0.3.0", + "node_modules/is-binary-path": { + "version": "2.1.0", "dev": true, "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, "engines": { - "node": ">= 0.6" + "node": ">=8" } }, - "node_modules/memfs": { - "version": "4.15.0", + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jsonjoy.com/json-pack": "^1.0.3", - "@jsonjoy.com/util": "^1.3.0", - "tree-dump": "^1.0.1", - "tslib": "^2.0.0" + "license": "MIT", + "bin": { + "is-docker": "cli.js" }, "engines": { - "node": ">= 4.0.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/merge-descriptors": { - "version": "1.0.3", + "node_modules/is-extendable": { + "version": "0.1.1", "dev": true, "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/merge2": { - "version": "1.4.1", + "node_modules/is-extglob": { + "version": "2.1.1", "dev": true, "license": "MIT", "engines": { - "node": ">= 8" + "node": ">=0.10.0" } }, - "node_modules/methods": { - "version": "1.1.2", + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">=8" } }, - "node_modules/micromatch": { - "version": "4.0.8", + "node_modules/is-glob": { + "version": "4.0.3", "dev": true, "license": "MIT", "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" + "is-extglob": "^2.1.1" }, "engines": { - "node": ">=8.6" + "node": ">=0.10.0" } }, - "node_modules/mime": { - "version": "1.6.0", + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", "dev": true, "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, "bin": { - "mime": "cli.js" + "is-inside-container": "cli.js" }, "engines": { - "node": ">=4" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mime-db": { - "version": "1.52.0", + "node_modules/is-number": { + "version": "7.0.0", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">=0.12.0" } }, - "node_modules/mime-types": { - "version": "2.1.35", + "node_modules/is-valid-domain": { + "version": "0.1.6", "dev": true, "license": "MIT", "dependencies": { - "mime-db": "1.52.0" + "punycode": "^2.1.1" + } + }, + "node_modules/is-wsl": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", + "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" }, "engines": { - "node": ">= 0.6" + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mimic-fn": { - "version": "2.1.0", + "node_modules/isexe": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, "engines": { - "node": ">=6" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/mimic-function": { - "version": "5.0.1", + "node_modules/jest-diff/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/mimic-response": { - "version": "1.0.1", + "node_modules/jest-diff/node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/minimatch": { - "version": "5.1.6", + "node_modules/jest-diff/node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "brace-expansion": "^2.0.1" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">=10" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/minimatch/node_modules/brace-expansion": { - "version": "2.0.1", + "node_modules/jest-diff/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/jest-get-type": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", + "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/minimist": { - "version": "1.2.8", + "node_modules/jest-matcher-utils/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", + "engines": { + "node": ">=10" + }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/minipass": { - "version": "7.1.2", + "node_modules/jest-matcher-utils/node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, - "license": "ISC", + "license": "MIT", "engines": { - "node": ">=16 || 14 >=14.17" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/minipass-collect": { - "version": "2.0.1", + "node_modules/jest-matcher-utils/node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "minipass": "^7.0.3" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/minipass-fetch": { - "version": "4.0.0", + "node_modules/jest-matcher-utils/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-levenshtein": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", "dev": true, "license": "MIT", - "dependencies": { - "minipass": "^7.0.3", - "minipass-sized": "^1.0.3", - "minizlib": "^3.0.1" - }, "engines": { - "node": "^18.17.0 || >=20.5.0" - }, - "optionalDependencies": { - "encoding": "^0.1.13" + "node": ">=0.10.0" } }, - "node_modules/minipass-flush": { - "version": "1.0.5", + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true, - "license": "ISC", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", "dependencies": { - "minipass": "^3.0.0" + "argparse": "^2.0.1" }, - "engines": { - "node": ">= 8" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/minipass-flush/node_modules/minipass": { - "version": "3.3.6", + "node_modules/jsbn": { + "version": "1.1.0", "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, + "license": "MIT" + }, + "node_modules/jsep": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz", + "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==", + "dev": true, + "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 10.16.0" } }, - "node_modules/minipass-pipeline": { - "version": "1.2.4", + "node_modules/jsesc": { + "version": "3.1.0", "dev": true, - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" }, "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/minipass-pipeline/node_modules/minipass": { - "version": "3.3.6", + "node_modules/json-pointer": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", + "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" + "foreach": "^2.0.4" } }, - "node_modules/minipass-sized": { - "version": "1.0.3", + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true, - "license": "ISC", + "license": "MIT" + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "license": "MIT", "dependencies": { - "minipass": "^3.0.0" + "universalify": "^2.0.0" }, - "engines": { - "node": ">=8" + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "node_modules/minipass-sized/node_modules/minipass": { - "version": "3.3.6", + "node_modules/jsonpath-plus": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.3.0.tgz", + "integrity": "sha512-8TNmfeTCk2Le33A3vRRwtuworG/L5RrgMvdjhKZxvyShO+mBu2fP50OWUjRLNtvw344DdDarFh9buFAZs5ujeA==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "yallist": "^4.0.0" + "@jsep-plugin/assignment": "^1.3.0", + "@jsep-plugin/regex": "^1.0.4", + "jsep": "^1.4.0" + }, + "bin": { + "jsonpath": "bin/jsonpath-cli.js", + "jsonpath-plus": "bin/jsonpath-cli.js" }, "engines": { - "node": ">=8" + "node": ">=18.0.0" } }, - "node_modules/minizlib": { - "version": "3.0.1", + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", "dev": true, "license": "MIT", - "dependencies": { - "minipass": "^7.0.4", - "rimraf": "^5.0.5" - }, "engines": { - "node": ">= 18" + "node": ">=0.10.0" } }, - "node_modules/minizlib/node_modules/brace-expansion": { - "version": "2.0.1", + "node_modules/kind-of": { + "version": "6.0.3", "dev": true, "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/minizlib/node_modules/glob": { - "version": "10.4.5", + "node_modules/kleur": { + "version": "4.1.5", "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "license": "MIT", + "engines": { + "node": ">=6" } }, - "node_modules/minizlib/node_modules/minimatch": { - "version": "9.0.5", + "node_modules/ky": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/ky/-/ky-1.8.1.tgz", + "integrity": "sha512-7Bp3TpsE+L+TARSnnDpk3xg8Idi8RwSLdj6CMbNWoOARIrGrbuLGusV0dYwbZOm4bB3jHNxSw8Wk/ByDqJEnDw==", "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, + "license": "MIT", "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sindresorhus/ky?sponsor=1" } }, - "node_modules/minizlib/node_modules/rimraf": { - "version": "5.0.10", + "node_modules/latest-version": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-9.0.0.tgz", + "integrity": "sha512-7W0vV3rqv5tokqkBAFV1LbR7HPOWzXQDpDgEuib/aJ1jsZZx6x3c2mBI+TJhJzOhkGeaLbCKEHXEXLfirtG2JA==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "glob": "^10.3.7" + "package-json": "^10.0.0" }, - "bin": { - "rimraf": "dist/esm/bin.mjs" + "engines": { + "node": ">=18" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mkdirp": { - "version": "0.5.6", + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true, "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" + "engines": { + "node": ">=6" } }, - "node_modules/mobx": { - "version": "6.13.5", + "node_modules/lodash": { + "version": "4.17.21", "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mobx" - } + "license": "MIT" }, - "node_modules/mobx-react": { - "version": "9.2.0", + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "license": "MIT", "dependencies": { - "mobx-react-lite": "^4.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mobx" - }, - "peerDependencies": { - "mobx": "^6.9.0", - "react": "^16.8.0 || ^17 || ^18 || ^19" + "js-tokens": "^3.0.0 || ^4.0.0" }, - "peerDependenciesMeta": { - "react-dom": { - "optional": true - }, - "react-native": { - "optional": true - } + "bin": { + "loose-envify": "cli.js" } }, - "node_modules/mobx-react-lite": { - "version": "4.1.0", + "node_modules/lru-cache": { + "version": "10.4.3", "dev": true, - "license": "MIT", + "license": "ISC" + }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/make-fetch-happen": { + "version": "14.0.3", + "dev": true, + "license": "ISC", "dependencies": { - "use-sync-external-store": "^1.4.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mobx" - }, - "peerDependencies": { - "mobx": "^6.9.0", - "react": "^16.8.0 || ^17 || ^18 || ^19" + "@npmcli/agent": "^3.0.0", + "cacache": "^19.0.1", + "http-cache-semantics": "^4.1.1", + "minipass": "^7.0.2", + "minipass-fetch": "^4.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^1.0.0", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "ssri": "^12.0.0" }, - "peerDependenciesMeta": { - "react-dom": { - "optional": true - }, - "react-native": { - "optional": true - } + "engines": { + "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/moo": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", - "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==", - "dev": true, - "peer": true - }, - "node_modules/ms": { - "version": "2.1.3", + "node_modules/mark.js": { + "version": "8.11.1", + "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", + "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==", "dev": true, "license": "MIT" }, - "node_modules/nanoid": { - "version": "3.3.8", + "node_modules/marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], "license": "MIT", "bin": { - "nanoid": "bin/nanoid.cjs" + "marked": "bin/marked.js" }, "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "node": ">= 12" } }, - "node_modules/nearley": { - "version": "2.20.1", - "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", - "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", + "node_modules/math-intrinsics": { + "version": "1.0.0", "dev": true, - "peer": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memfs": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.17.2.tgz", + "integrity": "sha512-NgYhCOWgovOXSzvYgUW0LQ7Qy72rWQMGGFJDoWg4G30RHd3z77VbYdtJ4fembJXBy8pMIUA31XNAupobOQlwdg==", + "dev": true, + "license": "Apache-2.0", "dependencies": { - "commander": "^2.19.0", - "moo": "^0.5.0", - "railroad-diagrams": "^1.0.0", - "randexp": "0.4.6" + "@jsonjoy.com/json-pack": "^1.0.3", + "@jsonjoy.com/util": "^1.3.0", + "tree-dump": "^1.0.1", + "tslib": "^2.0.0" }, - "bin": { - "nearley-railroad": "bin/nearley-railroad.js", - "nearley-test": "bin/nearley-test.js", - "nearley-unparse": "bin/nearley-unparse.js", - "nearleyc": "bin/nearleyc.js" + "engines": { + "node": ">= 4.0.0" }, "funding": { - "type": "individual", - "url": "https://nearley.js.org/#give-to-nearley" + "type": "github", + "url": "https://github.com/sponsors/streamich" } }, - "node_modules/nearley/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", "dev": true, - "peer": true + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/negotiator": { - "version": "1.0.0", + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">= 8" } }, - "node_modules/neo-async": { - "version": "2.6.2", + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">= 0.6" + } }, - "node_modules/nice-try": { - "version": "1.0.5", + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } }, - "node_modules/node-elm-compiler": { - "version": "5.0.6", + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "cross-spawn": "6.0.5", - "find-elm-dependencies": "^2.0.4", - "lodash": "^4.17.19", - "temp": "^0.9.0" + "license": "MIT", + "bin": { + "mime": "cli.js" }, "engines": { - "node": ">=4.0.0" + "node": ">=4" } }, - "node_modules/node-elm-compiler/node_modules/cross-spawn": { - "version": "6.0.5", + "node_modules/mime-db": { + "version": "1.52.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", "dev": true, "license": "MIT", "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "mime-db": "1.52.0" }, "engines": { - "node": ">=4.8" + "node": ">= 0.6" } }, - "node_modules/node-elm-compiler/node_modules/path-key": { - "version": "2.0.1", + "node_modules/mimic-function": { + "version": "5.0.1", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/node-elm-compiler/node_modules/semver": { - "version": "5.7.2", + "node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "license": "ISC", - "bin": { - "semver": "bin/semver" + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" } }, - "node_modules/node-elm-compiler/node_modules/shebang-command": { - "version": "1.2.0", + "node_modules/minimatch/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" + "balanced-match": "^1.0.0" } }, - "node_modules/node-elm-compiler/node_modules/shebang-regex": { - "version": "1.0.0", + "node_modules/minimist": { + "version": "1.2.8", "dev": true, "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "dev": true, + "license": "ISC", "engines": { - "node": ">=0.10.0" + "node": ">=16 || 14 >=14.17" } }, - "node_modules/node-elm-compiler/node_modules/which": { - "version": "1.3.1", + "node_modules/minipass-collect": { + "version": "2.0.1", "dev": true, "license": "ISC", "dependencies": { - "isexe": "^2.0.0" + "minipass": "^7.0.3" }, - "bin": { - "which": "bin/which" + "engines": { + "node": ">=16 || 14 >=14.17" } }, - "node_modules/node-fetch": { - "version": "2.7.0", + "node_modules/minipass-fetch": { + "version": "4.0.0", "dev": true, "license": "MIT", "dependencies": { - "whatwg-url": "^5.0.0" + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^3.0.1" }, "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" + "node": "^18.17.0 || >=20.5.0" }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "optionalDependencies": { + "encoding": "^0.1.13" } }, - "node_modules/node-fetch-h2": { - "version": "2.3.0", + "node_modules/minipass-flush": { + "version": "1.0.5", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "http2-client": "^1.2.5" + "minipass": "^3.0.0" }, "engines": { - "node": "4.x || >=6.0.0" + "node": ">= 8" } }, - "node_modules/node-readfiles": { - "version": "0.2.0", + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "es6-promise": "^3.2.1" + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/normalize-path": { - "version": "3.0.0", + "node_modules/minipass-pipeline": { + "version": "1.2.4", "dev": true, - "license": "MIT", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/normalize-url": { - "version": "6.1.0", + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=8" } }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "node_modules/minipass-sized": { + "version": "1.0.3", "dev": true, - "peer": true, + "license": "ISC", "dependencies": { - "boolbase": "^1.0.0" + "minipass": "^3.0.0" }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" + "engines": { + "node": ">=8" } }, - "node_modules/oas-kit-common": { - "version": "1.0.8", + "node_modules/minipass-sized/node_modules/minipass": { + "version": "3.3.6", "dev": true, - "license": "BSD-3-Clause", + "license": "ISC", "dependencies": { - "fast-safe-stringify": "^2.0.7" + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/oas-linter": { - "version": "3.2.2", + "node_modules/minizlib": { + "version": "3.0.1", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "@exodus/schemasafe": "^1.0.0-rc.2", - "should": "^13.2.1", - "yaml": "^1.10.0" + "minipass": "^7.0.4", + "rimraf": "^5.0.5" }, - "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" + "engines": { + "node": ">= 18" } }, - "node_modules/oas-linter/node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "node_modules/minizlib/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, - "engines": { - "node": ">= 6" + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" } }, - "node_modules/oas-resolver": { - "version": "2.5.6", + "node_modules/minizlib/node_modules/glob": { + "version": "10.4.5", "dev": true, - "license": "BSD-3-Clause", + "license": "ISC", "dependencies": { - "node-fetch-h2": "^2.3.0", - "oas-kit-common": "^1.0.8", - "reftools": "^1.1.9", - "yaml": "^1.10.0", - "yargs": "^17.0.1" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, "bin": { - "resolve": "resolve.js" + "glob": "dist/esm/bin.mjs" }, "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/oas-resolver/node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "node_modules/minizlib/node_modules/minimatch": { + "version": "9.0.5", "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, "engines": { - "node": ">= 6" - } - }, - "node_modules/oas-schema-walker": { - "version": "1.1.5", - "dev": true, - "license": "BSD-3-Clause", + "node": ">=16 || 14 >=14.17" + }, "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/oas-validator": { - "version": "5.0.8", + "node_modules/minizlib/node_modules/rimraf": { + "version": "5.0.10", "dev": true, - "license": "BSD-3-Clause", + "license": "ISC", "dependencies": { - "call-me-maybe": "^1.0.1", - "oas-kit-common": "^1.0.8", - "oas-linter": "^3.2.2", - "oas-resolver": "^2.5.6", - "oas-schema-walker": "^1.1.5", - "reftools": "^1.1.9", - "should": "^13.2.1", - "yaml": "^1.10.0" + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" }, "funding": { - "url": "https://github.com/Mermade/oas-kit?sponsor=1" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/oas-validator/node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "node_modules/mkdirp": { + "version": "0.5.6", "dev": true, - "engines": { - "node": ">= 6" + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" } }, - "node_modules/object-assign": { - "version": "4.1.1", + "node_modules/mobx": { + "version": "6.13.7", + "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.13.7.tgz", + "integrity": "sha512-aChaVU/DO5aRPmk1GX8L+whocagUUpBQqoPtJk+cm7UOXUk87J4PeWCh6nNmTTIfEhiR9DI/+FnA8dln/hTK7g==", "dev": true, "license": "MIT", - "engines": { - "node": ">=0.10.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mobx" } }, - "node_modules/object-inspect": { - "version": "1.13.3", + "node_modules/mobx-react": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/mobx-react/-/mobx-react-9.2.0.tgz", + "integrity": "sha512-dkGWCx+S0/1mfiuFfHRH8D9cplmwhxOV5CkXMp38u6rQGG2Pv3FWYztS0M7ncR6TyPRQKaTG/pnitInoYE9Vrw==", "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.4" + "dependencies": { + "mobx-react-lite": "^4.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/mobx" + }, + "peerDependencies": { + "mobx": "^6.9.0", + "react": "^16.8.0 || ^17 || ^18 || ^19" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } } }, - "node_modules/object-is": { - "version": "1.1.6", + "node_modules/mobx-react-lite": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mobx-react-lite/-/mobx-react-lite-4.1.0.tgz", + "integrity": "sha512-QEP10dpHHBeQNv1pks3WnHRCem2Zp636lq54M2nKO2Sarr13pL4u6diQXf65yzXUn0mkk18SyIDCm9UOJYTi1w==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" + "use-sync-external-store": "^1.4.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/mobx" + }, + "peerDependencies": { + "mobx": "^6.9.0", + "react": "^16.8.0 || ^17 || ^18 || ^19" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } } }, - "node_modules/object-keys": { - "version": "1.1.1", + "node_modules/ms": { + "version": "2.1.3", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } + "license": "MIT" }, - "node_modules/object.assign": { - "version": "4.1.5", + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "license": "MIT", - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" + "bin": { + "nanoid": "bin/nanoid.cjs" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/object.entries": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz", - "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==", + "node_modules/negotiator": { + "version": "1.0.0", "dev": true, - "peer": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, + "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">= 0.6" } }, - "node_modules/object.values": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", - "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "node_modules/neo-async": { + "version": "2.6.2", "dev": true, - "peer": true, + "license": "MIT" + }, + "node_modules/nice-try": { + "version": "1.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/node-elm-compiler": { + "version": "5.0.6", + "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" + "cross-spawn": "6.0.5", + "find-elm-dependencies": "^2.0.4", + "lodash": "^4.17.19", + "temp": "^0.9.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4.0.0" } }, - "node_modules/on-finished": { - "version": "2.4.1", + "node_modules/node-elm-compiler/node_modules/cross-spawn": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", "dev": true, "license": "MIT", "dependencies": { - "ee-first": "1.1.1" + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" }, "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" + "node": ">=4.8" } }, - "node_modules/onetime": { - "version": "7.0.0", + "node_modules/node-elm-compiler/node_modules/path-key": { + "version": "2.0.1", "dev": true, "license": "MIT", - "dependencies": { - "mimic-function": "^5.0.0" - }, "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, - "node_modules/open": { - "version": "7.4.2", + "node_modules/node-elm-compiler/node_modules/semver": { + "version": "5.7.2", "dev": true, - "license": "MIT", - "dependencies": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "license": "ISC", + "bin": { + "semver": "bin/semver" } }, - "node_modules/openapi-sampler": { - "version": "1.6.1", + "node_modules/node-elm-compiler/node_modules/shebang-command": { + "version": "1.2.0", "dev": true, "license": "MIT", "dependencies": { - "@types/json-schema": "^7.0.7", - "fast-xml-parser": "^4.5.0", - "json-pointer": "0.6.2" + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/ora": { - "version": "5.4.1", + "node_modules/node-elm-compiler/node_modules/shebang-regex": { + "version": "1.0.0", "dev": true, "license": "MIT", - "dependencies": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10.0" } }, - "node_modules/ora/node_modules/cli-cursor": { - "version": "3.1.0", + "node_modules/node-elm-compiler/node_modules/which": { + "version": "1.3.1", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "restore-cursor": "^3.1.0" + "isexe": "^2.0.0" }, - "engines": { - "node": ">=8" + "bin": { + "which": "bin/which" } }, - "node_modules/ora/node_modules/onetime": { - "version": "5.1.2", + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dev": true, "license": "MIT", "dependencies": { - "mimic-fn": "^2.1.0" + "whatwg-url": "^5.0.0" }, "engines": { - "node": ">=6" + "node": "4.x || >=6.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, - "node_modules/ora/node_modules/restore-cursor": { - "version": "3.1.0", + "node_modules/node-fetch-h2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz", + "integrity": "sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==", "dev": true, "license": "MIT", "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" + "http2-client": "^1.2.5" }, "engines": { - "node": ">=8" + "node": "4.x || >=6.0.0" } }, - "node_modules/ora/node_modules/signal-exit": { - "version": "3.0.7", + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true, - "license": "ISC" + "license": "MIT" }, - "node_modules/os-tmpdir": { - "version": "1.0.2", + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dev": true, "license": "MIT", - "engines": { - "node": ">=0.10.0" + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } }, - "node_modules/p-cancelable": { - "version": "2.1.1", + "node_modules/node-readfiles": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/node-readfiles/-/node-readfiles-0.2.0.tgz", + "integrity": "sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==", "dev": true, "license": "MIT", - "engines": { - "node": ">=8" + "dependencies": { + "es6-promise": "^3.2.1" } }, - "node_modules/p-limit": { - "version": "2.3.0", + "node_modules/normalize-path": { + "version": "3.0.0", "dev": true, "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10.0" } }, - "node_modules/p-locate": { - "version": "4.1.0", + "node_modules/oas-kit-common": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz", + "integrity": "sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==", "dev": true, - "license": "MIT", + "license": "BSD-3-Clause", "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" + "fast-safe-stringify": "^2.0.7" } }, - "node_modules/p-map": { - "version": "7.0.3", + "node_modules/oas-linter": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.2.2.tgz", + "integrity": "sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" + "license": "BSD-3-Clause", + "dependencies": { + "@exodus/schemasafe": "^1.0.0-rc.2", + "should": "^13.2.1", + "yaml": "^1.10.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, - "node_modules/p-try": { - "version": "2.2.0", + "node_modules/oas-linter/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true, - "license": "MIT", + "license": "ISC", "engines": { - "node": ">=6" + "node": ">= 6" } }, - "node_modules/package-json": { - "version": "6.5.0", + "node_modules/oas-resolver": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.5.6.tgz", + "integrity": "sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ==", "dev": true, - "license": "MIT", + "license": "BSD-3-Clause", "dependencies": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" + "node-fetch-h2": "^2.3.0", + "oas-kit-common": "^1.0.8", + "reftools": "^1.1.9", + "yaml": "^1.10.0", + "yargs": "^17.0.1" }, - "engines": { - "node": ">=8" + "bin": { + "resolve": "resolve.js" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", + "node_modules/oas-resolver/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, - "license": "BlueOak-1.0.0" + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } }, - "node_modules/package-json/node_modules/@sindresorhus/is": { - "version": "0.14.0", + "node_modules/oas-resolver/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true, - "license": "MIT", + "license": "ISC", "engines": { - "node": ">=6" + "node": ">= 6" } }, - "node_modules/package-json/node_modules/@szmarczak/http-timer": { - "version": "1.1.2", + "node_modules/oas-resolver/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "license": "MIT", "dependencies": { - "defer-to-connect": "^1.0.1" + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=6" + "node": ">=12" } }, - "node_modules/package-json/node_modules/cacheable-request": { - "version": "6.1.0", + "node_modules/oas-resolver/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, - "license": "MIT", - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, + "license": "ISC", "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/package-json/node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", + "node_modules/oas-schema-walker": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz", + "integrity": "sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==", "dev": true, - "license": "MIT", + "license": "BSD-3-Clause", + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-validator": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-5.0.8.tgz", + "integrity": "sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw==", + "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" + "call-me-maybe": "^1.0.1", + "oas-kit-common": "^1.0.8", + "oas-linter": "^3.2.2", + "oas-resolver": "^2.5.6", + "oas-schema-walker": "^1.1.5", + "reftools": "^1.1.9", + "should": "^13.2.1", + "yaml": "^1.10.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, - "node_modules/package-json/node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", + "node_modules/oas-validator/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true, - "license": "MIT", + "license": "ISC", "engines": { - "node": ">=8" + "node": ">= 6" } }, - "node_modules/package-json/node_modules/decompress-response": { - "version": "3.3.0", + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, "license": "MIT", - "dependencies": { - "mimic-response": "^1.0.0" - }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/package-json/node_modules/defer-to-connect": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "node_modules/package-json/node_modules/get-stream": { - "version": "4.1.0", + "node_modules/object-inspect": { + "version": "1.13.3", "dev": true, "license": "MIT", - "dependencies": { - "pump": "^3.0.0" - }, "engines": { - "node": ">=6" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/package-json/node_modules/got": { - "version": "9.6.0", + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "dev": true, "license": "MIT", "dependencies": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" + "ee-first": "1.1.1" }, "engines": { - "node": ">=8.6" + "node": ">= 0.8" } }, - "node_modules/package-json/node_modules/json-buffer": { - "version": "3.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/package-json/node_modules/keyv": { - "version": "3.1.0", + "node_modules/once": { + "version": "1.4.0", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "json-buffer": "3.0.0" + "wrappy": "1" } }, - "node_modules/package-json/node_modules/lowercase-keys": { - "version": "1.0.1", + "node_modules/onetime": { + "version": "7.0.0", "dev": true, "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-json/node_modules/normalize-url": { - "version": "4.5.1", + "node_modules/open": { + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/open/-/open-10.1.2.tgz", + "integrity": "sha512-cxN6aIDPz6rm8hbebcP7vrQNhvRcveZoJU72Y7vskh4oIm+BZwBECnx5nTmrlres1Qapvx27Qo1Auukpf8PKXw==", "dev": true, "license": "MIT", + "dependencies": { + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^3.1.0" + }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-json/node_modules/p-cancelable": { - "version": "1.1.0", + "node_modules/openapi-sampler": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.6.1.tgz", + "integrity": "sha512-s1cIatOqrrhSj2tmJ4abFYZQK6l5v+V4toO5q1Pa0DyN8mtyqy2I+Qrj5W9vOELEtybIMQs/TBZGVO/DtTFK8w==", "dev": true, "license": "MIT", - "engines": { - "node": ">=6" + "dependencies": { + "@types/json-schema": "^7.0.7", + "fast-xml-parser": "^4.5.0", + "json-pointer": "0.6.2" } }, - "node_modules/package-json/node_modules/responselike": { + "node_modules/os-tmpdir": { "version": "1.0.2", "dev": true, "license": "MIT", - "dependencies": { - "lowercase-keys": "^1.0.0" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/package-json/node_modules/semver": { - "version": "6.3.1", + "node_modules/outdent": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/outdent/-/outdent-0.8.0.tgz", + "integrity": "sha512-KiOAIsdpUTcAXuykya5fnVVT+/5uS0Q1mrkRHcF89tpieSmY33O/tmc54CqwA+bfhbtEfZUNLHaPUiB9X3jt1A==", "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } + "license": "MIT" }, - "node_modules/parse5": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz", - "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==", + "node_modules/p-map": { + "version": "7.0.3", "dev": true, - "peer": true, - "dependencies": { - "entities": "^4.5.0" + "license": "MIT", + "engines": { + "node": ">=18" }, "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", - "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", + "node_modules/package-json": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-10.0.1.tgz", + "integrity": "sha512-ua1L4OgXSBdsu1FPb7F3tYH0F48a6kxvod4pLUlGY9COeJAJQNX/sNH2IiEmsxw7lqYiAwrdHMjz1FctOsyDQg==", "dev": true, - "peer": true, + "license": "MIT", "dependencies": { - "domhandler": "^5.0.3", - "parse5": "^7.0.0" + "ky": "^1.2.0", + "registry-auth-token": "^5.0.2", + "registry-url": "^6.0.1", + "semver": "^7.6.0" + }, + "engines": { + "node": ">=18" }, "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parse5-parser-stream": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", - "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", + "node_modules/package-json-from-dist": { + "version": "1.0.1", "dev": true, - "peer": true, - "dependencies": { - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } + "license": "BlueOak-1.0.0" }, "node_modules/parseurl": { "version": "1.3.3", @@ -5761,33 +5764,92 @@ "cross-spawn": "^7.0.3" } }, - "node_modules/path-browserify": { - "version": "1.0.1", + "node_modules/password-prompt/node_modules/cross-spawn": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } }, - "node_modules/path-exists": { - "version": "4.0.0", + "node_modules/password-prompt/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=4" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", + "node_modules/password-prompt/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/password-prompt/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", "dev": true, "license": "MIT", + "dependencies": { + "shebang-regex": "^1.0.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/path-key": { - "version": "3.1.1", + "node_modules/password-prompt/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=0.10.0" + } + }, + "node_modules/password-prompt/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" } }, "node_modules/path-scurry": { @@ -5807,15 +5869,19 @@ }, "node_modules/path-to-regexp": { "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", "dev": true, "license": "MIT" }, "node_modules/path-type": { - "version": "5.0.0", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", + "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5823,16 +5889,11 @@ }, "node_modules/perfect-scrollbar": { "version": "1.5.6", + "resolved": "https://registry.npmjs.org/perfect-scrollbar/-/perfect-scrollbar-1.5.6.tgz", + "integrity": "sha512-rixgxw3SxyJbCaSpo1n35A/fwI1r2rdwMKOTCg/AcG+xOEyZcE8UHVjpZMFCVImzsFoCZeJTT+M/rdEIQYO2nw==", "dev": true, "license": "MIT" }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true, - "peer": true - }, "node_modules/picocolors": { "version": "1.1.1", "dev": true, @@ -5851,6 +5912,8 @@ }, "node_modules/pluralize": { "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", "dev": true, "license": "MIT", "engines": { @@ -5859,6 +5922,8 @@ }, "node_modules/polished": { "version": "4.3.1", + "resolved": "https://registry.npmjs.org/polished/-/polished-4.3.1.tgz", + "integrity": "sha512-OBatVyC/N7SCW/FaDHrSd+vn0o5cS855TOmYi4OkdWUMSJCET/xip//ch8xGUvtr3i44X9LVyWwQlRMTN3pwSA==", "dev": true, "license": "MIT", "dependencies": { @@ -5868,16 +5933,10 @@ "node": ">=10" } }, - "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/postcss": { - "version": "8.4.38", + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", "dev": true, "funding": [ { @@ -5896,8 +5955,8 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -5905,19 +5964,15 @@ }, "node_modules/postcss-value-parser": { "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true, "license": "MIT" }, - "node_modules/prepend-http": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/pretty-format": { "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5931,6 +5986,8 @@ }, "node_modules/pretty-format/node_modules/ansi-styles": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, "license": "MIT", "engines": { @@ -5940,13 +5997,10 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/pretty-format/node_modules/react-is": { - "version": "17.0.2", - "dev": true, - "license": "MIT" - }, "node_modules/prismjs": { - "version": "1.29.0", + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", + "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==", "dev": true, "license": "MIT", "engines": { @@ -5973,28 +6027,10 @@ "node": ">=10" } }, - "node_modules/prompts": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/prompts/node_modules/kleur": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/prop-types": { "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", "dev": true, "license": "MIT", "dependencies": { @@ -6005,11 +6041,47 @@ }, "node_modules/prop-types/node_modules/react-is": { "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "dev": true, "license": "MIT" }, + "node_modules/proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", + "dev": true, + "license": "ISC" + }, + "node_modules/protobufjs": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.3.tgz", + "integrity": "sha512-sildjKwVqOI2kmFDiXQ6aEB0fjYTafpEvIBs8tOR8qI4spuL9OPROLVu2qZqi/xgCfsHIwVqlaF8JBjWFHnKbw==", + "dev": true, + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/proxy-addr": { "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "dev": true, "license": "MIT", "dependencies": { @@ -6020,15 +6092,6 @@ "node": ">= 0.10" } }, - "node_modules/pump": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "node_modules/punycode": { "version": "2.3.1", "dev": true, @@ -6039,6 +6102,8 @@ }, "node_modules/qs": { "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -6070,48 +6135,6 @@ ], "license": "MIT" }, - "node_modules/quick-lru": { - "version": "5.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/raf": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", - "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", - "dev": true, - "peer": true, - "dependencies": { - "performance-now": "^2.1.0" - } - }, - "node_modules/railroad-diagrams": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", - "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==", - "dev": true, - "peer": true - }, - "node_modules/randexp": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", - "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", - "dev": true, - "peer": true, - "dependencies": { - "discontinuous-range": "1.0.0", - "ret": "~0.1.10" - }, - "engines": { - "node": ">=0.12" - } - }, "node_modules/randombytes": { "version": "2.1.0", "dev": true, @@ -6122,6 +6145,8 @@ }, "node_modules/range-parser": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "dev": true, "license": "MIT", "engines": { @@ -6130,6 +6155,8 @@ }, "node_modules/raw-body": { "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, "license": "MIT", "dependencies": { @@ -6144,6 +6171,8 @@ }, "node_modules/rc": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", "dependencies": { @@ -6157,47 +6186,39 @@ } }, "node_modules/react": { - "version": "18.3.1", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz", + "integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==", "dev": true, "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - }, "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "18.3.1", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz", + "integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==", "dev": true, "license": "MIT", "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" + "scheduler": "^0.26.0" }, "peerDependencies": { - "react": "^18.3.1" + "react": "^19.1.0" } }, "node_modules/react-is": { - "version": "18.3.1", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", "dev": true, "license": "MIT" }, - "node_modules/react-shallow-renderer": { - "version": "16.15.0", - "dev": true, - "license": "MIT", - "dependencies": { - "object-assign": "^4.1.1", - "react-is": "^16.12.0 || ^17.0.0 || ^18.0.0" - }, - "peerDependencies": { - "react": "^16.0.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/react-tabs": { - "version": "6.0.2", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/react-tabs/-/react-tabs-6.1.0.tgz", + "integrity": "sha512-6QtbTRDKM+jA/MZTTefvigNxo0zz+gnBTVFw2CFVvq+f2BuH0nF0vDLNClL045nuTAdOoK/IL1vTP0ZLX0DAyQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6205,7 +6226,7 @@ "prop-types": "^15.5.0" }, "peerDependencies": { - "react": "^18.0.0" + "react": "^18.0.0 || ^19.0.0" } }, "node_modules/readable-stream": { @@ -6233,15 +6254,16 @@ } }, "node_modules/redoc": { - "version": "2.1.5", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.5.0.tgz", + "integrity": "sha512-NpYsOZ1PD9qFdjbLVBZJWptqE+4Y6TkUuvEOqPUmoH7AKOmPcE+hYjotLxQNTqVoWL4z0T2uxILmcc8JGDci+Q==", "dev": true, "license": "MIT", "dependencies": { - "@cfaester/enzyme-adapter-react-18": "^0.8.0", "@redocly/openapi-core": "^1.4.0", "classnames": "^2.3.2", "decko": "^1.2.0", - "dompurify": "^3.0.6", + "dompurify": "^3.2.4", "eventemitter3": "^5.0.1", "json-pointer": "^0.6.2", "lunr": "^2.3.9", @@ -6258,118 +6280,57 @@ "slugify": "~1.4.7", "stickyfill": "^1.1.1", "swagger2openapi": "^7.0.8", - "url-template": "^2.0.8" - }, - "engines": { - "node": ">=6.9", - "npm": ">=3.0.0" - }, - "peerDependencies": { - "core-js": "^3.1.4", - "mobx": "^6.0.4", - "react": "^16.8.4 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.4 || ^17.0.0 || ^18.0.0", - "styled-components": "^4.1.1 || ^5.1.1 || ^6.0.5" - } - }, - "node_modules/redoc/node_modules/@redocly/config": { - "version": "0.17.1", - "dev": true, - "license": "MIT" - }, - "node_modules/redoc/node_modules/@redocly/openapi-core": { - "version": "1.26.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@redocly/ajv": "^8.11.2", - "@redocly/config": "^0.17.0", - "colorette": "^1.2.0", - "https-proxy-agent": "^7.0.4", - "js-levenshtein": "^1.1.6", - "js-yaml": "^4.1.0", - "lodash.isequal": "^4.5.0", - "minimatch": "^5.0.1", - "node-fetch": "^2.6.1", - "pluralize": "^8.0.0", - "yaml-ast-parser": "0.0.43" - }, - "engines": { - "node": ">=14.19.0", - "npm": ">=7.0.0" - } - }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "dunder-proto": "^1.0.0", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "gopd": "^1.2.0", - "which-builtin-type": "^1.2.0" + "url-template": "^2.0.8" }, "engines": { - "node": ">= 0.4" + "node": ">=6.9", + "npm": ">=3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "peerDependencies": { + "core-js": "^3.1.4", + "mobx": "^6.0.4", + "react": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "styled-components": "^4.1.1 || ^5.1.1 || ^6.0.5" } }, "node_modules/reftools": { "version": "1.1.9", + "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz", + "integrity": "sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==", "dev": true, "license": "BSD-3-Clause", "funding": { "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "dev": true, - "license": "MIT" - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.3", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/registry-auth-token": { - "version": "4.2.2", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.1.0.tgz", + "integrity": "sha512-GdekYuwLXLxMuFTwAPg5UKGLW/UXzQrZvH/Zj791BQif5T05T0RsaLfHc9q3ZOKi7n+BoprPD9mJ0O0k4xzUlw==", "dev": true, "license": "MIT", "dependencies": { - "rc": "1.2.8" + "@pnpm/npm-conf": "^2.1.0" }, "engines": { - "node": ">=6.0.0" + "node": ">=14" } }, "node_modules/registry-url": { - "version": "5.1.0", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz", + "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==", "dev": true, "license": "MIT", "dependencies": { - "rc": "^1.2.8" + "rc": "1.2.8" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/require-directory": { @@ -6382,28 +6343,14 @@ }, "node_modules/require-from-string": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/resolve-alpn": { - "version": "1.2.1", - "dev": true, - "license": "MIT" - }, - "node_modules/responselike": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "lowercase-keys": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/restore-cursor": { "version": "5.1.0", "dev": true, @@ -6419,16 +6366,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.12" - } - }, "node_modules/retry": { "version": "0.12.0", "dev": true, @@ -6438,7 +6375,9 @@ } }, "node_modules/reusify": { - "version": "1.0.4", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, "license": "MIT", "engines": { @@ -6458,12 +6397,13 @@ } }, "node_modules/rollup": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.28.1.tgz", - "integrity": "sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg==", + "version": "4.44.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.44.0.tgz", + "integrity": "sha512-qHcdEzLCiktQIfwBq420pn2dP+30uzqYxv9ETm91wdt2R9AFcWfjNAmje4NWlnCIQ5RMTzVf0ZyisOKqHR6RwA==", "dev": true, + "license": "MIT", "dependencies": { - "@types/estree": "1.0.6" + "@types/estree": "1.0.8" }, "bin": { "rollup": "dist/bin/rollup" @@ -6473,41 +6413,46 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.28.1", - "@rollup/rollup-android-arm64": "4.28.1", - "@rollup/rollup-darwin-arm64": "4.28.1", - "@rollup/rollup-darwin-x64": "4.28.1", - "@rollup/rollup-freebsd-arm64": "4.28.1", - "@rollup/rollup-freebsd-x64": "4.28.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.28.1", - "@rollup/rollup-linux-arm-musleabihf": "4.28.1", - "@rollup/rollup-linux-arm64-gnu": "4.28.1", - "@rollup/rollup-linux-arm64-musl": "4.28.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.28.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.28.1", - "@rollup/rollup-linux-riscv64-gnu": "4.28.1", - "@rollup/rollup-linux-s390x-gnu": "4.28.1", - "@rollup/rollup-linux-x64-gnu": "4.28.1", - "@rollup/rollup-linux-x64-musl": "4.28.1", - "@rollup/rollup-win32-arm64-msvc": "4.28.1", - "@rollup/rollup-win32-ia32-msvc": "4.28.1", - "@rollup/rollup-win32-x64-msvc": "4.28.1", + "@rollup/rollup-android-arm-eabi": "4.44.0", + "@rollup/rollup-android-arm64": "4.44.0", + "@rollup/rollup-darwin-arm64": "4.44.0", + "@rollup/rollup-darwin-x64": "4.44.0", + "@rollup/rollup-freebsd-arm64": "4.44.0", + "@rollup/rollup-freebsd-x64": "4.44.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.44.0", + "@rollup/rollup-linux-arm-musleabihf": "4.44.0", + "@rollup/rollup-linux-arm64-gnu": "4.44.0", + "@rollup/rollup-linux-arm64-musl": "4.44.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.44.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.44.0", + "@rollup/rollup-linux-riscv64-gnu": "4.44.0", + "@rollup/rollup-linux-riscv64-musl": "4.44.0", + "@rollup/rollup-linux-s390x-gnu": "4.44.0", + "@rollup/rollup-linux-x64-gnu": "4.44.0", + "@rollup/rollup-linux-x64-musl": "4.44.0", + "@rollup/rollup-win32-arm64-msvc": "4.44.0", + "@rollup/rollup-win32-ia32-msvc": "4.44.0", + "@rollup/rollup-win32-x64-msvc": "4.44.0", "fsevents": "~2.3.2" } }, - "node_modules/rst-selector-parser": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz", - "integrity": "sha512-nDG1rZeP6oFTLN6yNDV/uiAvs1+FS/KlrEwh7+y7dpuApDBy6bI2HTBcc0/V8lv9OTqfyD34eF7au2pm8aBbhA==", + "node_modules/run-applescript": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz", + "integrity": "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==", "dev": true, - "peer": true, - "dependencies": { - "lodash.flattendeep": "^4.4.0", - "nearley": "^2.7.10" + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -6528,22 +6473,18 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/safe-array-concat": { - "version": "1.1.3", + "node_modules/run-pty": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-pty/-/run-pty-5.0.0.tgz", + "integrity": "sha512-0gk83+2NmrZGGPlJ88lqt0dYHvgyau/JBdRz9OqEbNyIfmbiq9E5sGCsvHdjrLoUJVh09ZX9r5rN587ACoM3vQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" + "@lydell/node-pty": "^1.0.0", + "tiny-decoders": "^23.0.0" }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "run-pty": "run-pty-bin.js" } }, "node_modules/safe-buffer": { @@ -6565,34 +6506,17 @@ ], "license": "MIT" }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/safer-buffer": { "version": "2.1.2", "dev": true, "license": "MIT" }, "node_modules/scheduler": { - "version": "0.23.2", + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.26.0.tgz", + "integrity": "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==", "dev": true, - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - } + "license": "MIT" }, "node_modules/section-matter": { "version": "1.0.0", @@ -6619,6 +6543,8 @@ }, "node_modules/send": { "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "dev": true, "license": "MIT", "dependencies": { @@ -6642,6 +6568,8 @@ }, "node_modules/send/node_modules/encodeurl": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "dev": true, "license": "MIT", "engines": { @@ -6650,6 +6578,8 @@ }, "node_modules/serve-index": { "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", "dev": true, "license": "MIT", "dependencies": { @@ -6667,6 +6597,8 @@ }, "node_modules/serve-index/node_modules/depd": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", "dev": true, "license": "MIT", "engines": { @@ -6675,6 +6607,8 @@ }, "node_modules/serve-index/node_modules/http-errors": { "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", "dev": true, "license": "MIT", "dependencies": { @@ -6689,16 +6623,22 @@ }, "node_modules/serve-index/node_modules/inherits": { "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", "dev": true, "license": "ISC" }, "node_modules/serve-index/node_modules/setprototypeof": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", "dev": true, "license": "ISC" }, "node_modules/serve-index/node_modules/statuses": { "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", "dev": true, "license": "MIT", "engines": { @@ -6707,6 +6647,8 @@ }, "node_modules/serve-static": { "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", "dev": true, "license": "MIT", "dependencies": { @@ -6719,6 +6661,13 @@ "node": ">= 0.8.0" } }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "dev": true, + "license": "MIT" + }, "node_modules/set-function-length": { "version": "1.2.2", "dev": true, @@ -6735,51 +6684,24 @@ "node": ">= 0.4" } }, - "node_modules/set-function-name": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/setprototypeof": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "dev": true, "license": "ISC" }, "node_modules/shallowequal": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", "dev": true, "license": "MIT" }, - "node_modules/shebang-command": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/should": { "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6792,6 +6714,8 @@ }, "node_modules/should-equal": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", "dev": true, "license": "MIT", "dependencies": { @@ -6800,6 +6724,8 @@ }, "node_modules/should-format": { "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q==", "dev": true, "license": "MIT", "dependencies": { @@ -6809,11 +6735,15 @@ }, "node_modules/should-type": { "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==", "dev": true, "license": "MIT" }, "node_modules/should-type-adaptors": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", "dev": true, "license": "MIT", "dependencies": { @@ -6823,6 +6753,8 @@ }, "node_modules/should-util": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", + "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==", "dev": true, "license": "MIT" }, @@ -6947,13 +6879,10 @@ } } }, - "node_modules/sisteransi": { - "version": "1.0.5", - "dev": true, - "license": "MIT" - }, "node_modules/slash": { "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", "dev": true, "license": "MIT", "engines": { @@ -6965,6 +6894,8 @@ }, "node_modules/slugify": { "version": "1.4.7", + "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.4.7.tgz", + "integrity": "sha512-tf+h5W1IrjNm/9rKKj0JU2MDMruiopx0jjVA5zCdBtcGjfp0+c5rHw/zADLC3IeKlGHtVbHtpfzvYA0OYT+HKg==", "dev": true, "license": "MIT", "engines": { @@ -7047,17 +6978,6 @@ "source-map": "^0.6.0" } }, - "node_modules/split": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "through": "2" - }, - "engines": { - "node": "*" - } - }, "node_modules/sprintf-js": { "version": "1.0.3", "dev": true, @@ -7076,6 +6996,8 @@ }, "node_modules/statuses": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "dev": true, "license": "MIT", "engines": { @@ -7084,6 +7006,8 @@ }, "node_modules/stickyfill": { "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stickyfill/-/stickyfill-1.1.1.tgz", + "integrity": "sha512-GCp7vHAfpao+Qh/3Flh9DXEJ/qSi0KJwJw6zYlZOtRYXWUIpMM6mC2rIep/dK8RQqwW0KxGJIllmjPIBOGN8AA==", "dev": true }, "node_modules/streamsearch": { @@ -7128,59 +7052,6 @@ "node": ">=8" } }, - "node_modules/string.prototype.trim": { - "version": "1.2.10", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-object-atoms": "^1.0.0", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.9", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "dev": true, @@ -7214,6 +7085,8 @@ }, "node_modules/strip-json-comments": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", "dev": true, "license": "MIT", "engines": { @@ -7221,12 +7094,22 @@ } }, "node_modules/strnum": { - "version": "1.0.5", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.1.2.tgz", + "integrity": "sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], "license": "MIT" }, "node_modules/styled-components": { - "version": "6.1.13", + "version": "6.1.19", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.19.tgz", + "integrity": "sha512-1v/e3Dl1BknC37cXMhwGomhO8AkYmN41CqyX9xhUDxry1ns3BFQy2lLDRQXJRdVVWB9OHemv/53xaStimvWyuA==", "dev": true, "license": "MIT", "dependencies": { @@ -7235,7 +7118,7 @@ "@types/stylis": "4.2.5", "css-to-react-native": "3.2.0", "csstype": "3.1.3", - "postcss": "8.4.38", + "postcss": "8.4.49", "shallowequal": "1.1.0", "stylis": "4.3.2", "tslib": "2.6.2" @@ -7254,11 +7137,15 @@ }, "node_modules/styled-components/node_modules/tslib": { "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true, "license": "0BSD" }, "node_modules/stylis": { "version": "4.3.2", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.2.tgz", + "integrity": "sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==", "dev": true, "license": "MIT" }, @@ -7278,20 +7165,10 @@ "node": ">=8" } }, - "node_modules/supports-hyperlinks": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/swagger2openapi": { "version": "7.0.8", + "resolved": "https://registry.npmjs.org/swagger2openapi/-/swagger2openapi-7.0.8.tgz", + "integrity": "sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -7316,15 +7193,60 @@ "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, + "node_modules/swagger2openapi/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/swagger2openapi/node_modules/yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true, + "license": "ISC", "engines": { "node": ">= 6" } }, + "node_modules/swagger2openapi/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/swagger2openapi/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/tar": { "version": "7.4.3", "dev": true, @@ -7386,28 +7308,15 @@ "rimraf": "bin.js" } }, - "node_modules/terminal-link": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/terser": { - "version": "5.37.0", + "version": "5.43.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.43.1.tgz", + "integrity": "sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", + "acorn": "^8.14.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -7425,6 +7334,8 @@ }, "node_modules/thingies": { "version": "1.21.0", + "resolved": "https://registry.npmjs.org/thingies/-/thingies-1.21.0.tgz", + "integrity": "sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g==", "dev": true, "license": "Unlicense", "engines": { @@ -7434,28 +7345,66 @@ "tslib": "^2" } }, - "node_modules/through": { - "version": "2.3.8", + "node_modules/tiny-decoders": { + "version": "23.0.0", + "resolved": "https://registry.npmjs.org/tiny-decoders/-/tiny-decoders-23.0.0.tgz", + "integrity": "sha512-gQB+za3EW9JN1ASDmrVl1a1I6Q/jzg4M75YLI9ToHCdCW4/9KvBTTNH4u3kFbg8e+/8Zn68VRF+ayuiPNqYAmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", "dev": true, - "license": "MIT" + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } }, - "node_modules/tmp": { - "version": "0.1.0", + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, "license": "MIT", - "dependencies": { - "rimraf": "^2.6.3" - }, "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/to-readable-stream": { - "version": "1.0.0", + "node_modules/tmp": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", "dev": true, "license": "MIT", "engines": { - "node": ">=6" + "node": ">=14.14" } }, "node_modules/to-regex-range": { @@ -7471,19 +7420,18 @@ }, "node_modules/toidentifier": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true, "license": "MIT", "engines": { "node": ">=0.6" } }, - "node_modules/tr46": { - "version": "0.0.3", - "dev": true, - "license": "MIT" - }, "node_modules/tree-dump": { - "version": "1.0.2", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tree-dump/-/tree-dump-1.0.3.tgz", + "integrity": "sha512-il+Cv80yVHFBwokQSfd4bldvr1Md951DpgAGfmhydt04L+YzHgubm2tQ7zueWDcGENKHq0ZvGFR/hjvNXilHEg==", "dev": true, "license": "Apache-2.0", "engines": { @@ -7504,6 +7452,8 @@ }, "node_modules/tslib": { "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true, "license": "0BSD" }, @@ -7520,6 +7470,8 @@ }, "node_modules/type-is": { "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "dev": true, "license": "MIT", "dependencies": { @@ -7530,78 +7482,17 @@ "node": ">= 0.6" } }, - "node_modules/typed-array-buffer": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13", - "reflect.getprototypeof": "^1.0.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.7", + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0", - "reflect.getprototypeof": "^1.0.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "MIT" }, "node_modules/typescript": { "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "license": "Apache-2.0", "bin": { @@ -7624,26 +7515,12 @@ "node": ">=0.8.0" } }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/undici": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.0.tgz", - "integrity": "sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==", + "version": "6.21.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.3.tgz", + "integrity": "sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw==", "dev": true, - "peer": true, + "license": "MIT", "engines": { "node": ">=18.17" } @@ -7654,7 +7531,9 @@ "license": "MIT" }, "node_modules/unicorn-magic": { - "version": "0.1.0", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", + "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", "dev": true, "license": "MIT", "engines": { @@ -7688,6 +7567,8 @@ }, "node_modules/universalify": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, "license": "MIT", "engines": { @@ -7704,27 +7585,22 @@ }, "node_modules/uri-js-replace": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uri-js-replace/-/uri-js-replace-1.0.1.tgz", + "integrity": "sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==", "dev": true, "license": "MIT" }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prepend-http": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/url-template": { "version": "2.0.8", + "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", + "integrity": "sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==", "dev": true, "license": "BSD" }, "node_modules/use-sync-external-store": { - "version": "1.4.0", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.5.0.tgz", + "integrity": "sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A==", "dev": true, "license": "MIT", "peerDependencies": { @@ -7746,6 +7622,8 @@ }, "node_modules/vary": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true, "license": "MIT", "engines": { @@ -7753,14 +7631,18 @@ } }, "node_modules/vite": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.3.tgz", - "integrity": "sha512-Cmuo5P0ENTN6HxLSo6IHsjCLn/81Vgrp81oaiFFMRa8gGDj5xEjIcEpf2ZymZtZR8oU0P2JX5WuUp/rlXcHkAw==", + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", + "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", "dev": true, + "license": "MIT", "dependencies": { - "esbuild": "^0.24.0", - "postcss": "^8.4.49", - "rollup": "^4.23.0" + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" }, "bin": { "vite": "bin/vite.js" @@ -7823,10 +7705,38 @@ } } }, + "node_modules/vite/node_modules/fdir": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/vite/node_modules/postcss": { - "version": "8.4.49", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", - "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", "dev": true, "funding": [ { @@ -7842,8 +7752,9 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "nanoid": "^3.3.7", + "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -7851,157 +7762,6 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/wcwidth": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-encoding": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", - "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", - "dev": true, - "peer": true, - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/whatwg-encoding/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "peer": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/whatwg-mimetype": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", - "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.0", - "is-number-object": "^1.1.0", - "is-string": "^1.1.0", - "is-symbol": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-collection": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.16", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/wordwrap": { "version": "1.0.0", "dev": true, @@ -8065,14 +7825,6 @@ } } }, - "node_modules/xmlbuilder": { - "version": "15.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0" - } - }, "node_modules/y18n": { "version": "5.0.8", "dev": true, @@ -8102,32 +7854,19 @@ }, "node_modules/yaml-ast-parser": { "version": "0.0.43", + "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz", + "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==", "dev": true, "license": "Apache-2.0" }, - "node_modules/yargs": { - "version": "17.7.2", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/yargs-parser": { - "version": "21.1.1", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, "license": "ISC", "engines": { - "node": ">=12" + "node": ">=10" } } } diff --git a/package.json b/package.json index dd4ab8ab..2c1f2292 100644 --- a/package.json +++ b/package.json @@ -8,28 +8,31 @@ "scripts": { "dev": "elm-pages run src/Cli.elm", "build": "elm-pages bundle-script src/Cli.elm --output dist/elm-open-api.js --debug", - "review": "elm-review", - "review:watch": "elm-review --watch --fix", - "format": "elm-format src tests --validate", - "test": "elm-test", + "link-local-package": "scripts/link-local-package", + "unlink-local-package": "scripts/unlink-local-package", + "review": "scripts/review", + "review:watch": "run-pty review-pty.json", + "format": "scripts/format", + "format:fix": "scripts/format --write", + "test": "scripts/test", "test:gen": "elm-pages run src/TestGenScript.elm", - "test:watch": "elm-test --watch", + "test:watch": "cd elm-open-api-codegen && elm-test --watch", "pub": "npm run build && npm publish" }, "author": "Wolfgang Schuster", "license": "MIT", "devDependencies": { "@lydell/elm-json": "0.2.13-1", - "@redocly/cli": "1.11.0", - "elm": "0.19.1-6", + "@redocly/cli": "^1.34.4", "elm-codegen": "^0.6.1", - "elm-format": "0.8.7", - "elm-optimize-level-2": "0.3.5", - "elm-pages": "^3.0.19", - "elm-review": "2.11.1", - "elm-test": "^0.19.1-revision12", + "elm-optimize-level-2": "^0.3.5", + "elm-pages": "^3.0.24", + "run-pty": "^5.0.0", "vite": "^6.0.3" }, + "overrides": { + "cross-spawn": "6.0.6" + }, "volta": { "node": "20.11.0" } diff --git a/review-pty.json b/review-pty.json new file mode 100644 index 00000000..cf0a36c1 --- /dev/null +++ b/review-pty.json @@ -0,0 +1,22 @@ +[ + { + "command": ["npx", "--no", "--", "elm-review", "--watch"], + "title": "elm-review - cli", + "cwd": ".", + "status": { + "ERROR": ["🚨", "E"], + "I found no errors!": null + }, + "defaultStatus": ["⏳", "S"] + }, + { + "command": ["npx", "--no", "--", "elm-review", "--watch"], + "title": "elm-review - package", + "cwd": "./elm-open-api-codegen", + "status": { + "ERROR": ["🚨", "E"], + "I found no errors!": null + }, + "defaultStatus": ["⏳", "S"] + } +] diff --git a/review/suppressed/NoUnused.Dependencies.json b/review/suppressed/NoUnused.Dependencies.json new file mode 100644 index 00000000..e915055a --- /dev/null +++ b/review/suppressed/NoUnused.Dependencies.json @@ -0,0 +1,8 @@ +{ + "version": 1, + "automatically created by": "elm-review suppress", + "learn more": "elm-review suppress --help", + "suppressions": [ + { "count": 1, "filePath": "elm.json" } + ] +} diff --git a/scripts/format b/scripts/format new file mode 100755 index 00000000..e8e3cdb8 --- /dev/null +++ b/scripts/format @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +set -e +cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &>/dev/null +./scripts/is-in-dev-shell + +usage() { + echo "Usage: $0 [--write]" + echo + echo "Formats all project files using elm-format." + echo + echo "--validate Check formatting (default)" + echo "--write Format files" + echo +} + +MODE=${1:---validate} +if [[ "$MODE" == "--validate" ]]; then + ACTION="Checking formatting in" +elif [[ "$MODE" == "--help" ]]; then + usage >&2 + exit +elif [[ "$MODE" == "--write" ]]; then + ACTION="Formatting" + MODE=--yes +else + usage >&2 + echo >&2 "Parameter '$MODE' not recognized" + exit 1 +fi + +echo -e "-- $ACTION root project" >&2 +elm-format src "$MODE" + +echo -e "\n-- $ACTION ./elm-open-api-codegen" >&2 +cd elm-open-api-codegen +find . \ + -wholename './src/Gen/**' -prune -o \ + -name elm-stuff -prune -o \ + -name '*.elm' \ + -exec elm-format "$MODE" {} \+ +cd .. + +echo -e "\n-- $ACTION ./example-using-api" >&2 +env -C example-using-api elm-format src scripts "$MODE" diff --git a/scripts/is-in-dev-shell b/scripts/is-in-dev-shell new file mode 100755 index 00000000..8dfde8a4 --- /dev/null +++ b/scripts/is-in-dev-shell @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +if [[ -z "$CI" && -z "$ELM_OPEN_API_CLI_DEVSHELL_ACTIVE" ]]; then + ( + echo "ERROR: Please use \`nix develop\` to enter the development shell first." + echo + echo "This ensures all development dependencies are available, and at their" + echo "intended versions. If I tried to run as-is, some commands might fail." + ) >&2 + exit 1 +fi diff --git a/scripts/link-local-package b/scripts/link-local-package new file mode 100755 index 00000000..9e80deb2 --- /dev/null +++ b/scripts/link-local-package @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -e +cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &>/dev/null +./scripts/is-in-dev-shell + +cache=$HOME/.elm/0.19.1/packages/mpizenberg/elm-placeholder-pkg/1.0.0 +rm -rf "$cache" +mkdir -p "$cache" +ln -s "$PWD/elm-open-api-codegen/elm.json" "$cache/elm.json" +ln -s "$PWD/elm-open-api-codegen/src" "$cache/src" +rm -rf elm-open-api-codegen/.elm-pages example-using-api/.elm-pages +sed -i -e 's#"wolfadex/elm-open-api-codegen"#"mpizenberg/elm-placeholder-pkg"#' elm.json example-using-api/scripts/elm.json diff --git a/scripts/review b/scripts/review new file mode 100755 index 00000000..d1911f2e --- /dev/null +++ b/scripts/review @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +set -e +cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &>/dev/null +./scripts/is-in-dev-shell + +echo >&2 -e "\n-- Running \`elm-review\` for CLI" +elm-review "$@" + +echo >&2 -e "\n-- Running \`elm-review\` for elm-open-api-codegen package" +env -C elm-open-api-codegen elm-review "$@" diff --git a/scripts/test b/scripts/test new file mode 100755 index 00000000..3d8302ea --- /dev/null +++ b/scripts/test @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -e +cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &>/dev/null +./scripts/is-in-dev-shell + +env -C elm-open-api-codegen elm-test +npm -C example-using-api test diff --git a/scripts/unlink-local-package b/scripts/unlink-local-package new file mode 100755 index 00000000..0e3bc05e --- /dev/null +++ b/scripts/unlink-local-package @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -e +cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &>/dev/null +./scripts/is-in-dev-shell + +rm -rf .elm-pages elm-open-api-codegen/.elm-pages example-using-api/.elm-pages +sed -i -e 's#"mpizenberg/elm-placeholder-pkg"#"wolfadex/elm-open-api-codegen"#' elm.json example-using-api/scripts/elm.json diff --git a/shell.nix b/shell.nix index e9683434..ddffb81b 100644 --- a/shell.nix +++ b/shell.nix @@ -1,12 +1,17 @@ -{ pkgs ? import { } }: +{pkgs ? import {}}: pkgs.mkShell { buildInputs = [ pkgs.elmPackages.elm pkgs.elmPackages.elm-format - pkgs.elmPackages.elm-test-rs + pkgs.elmPackages.elm-test pkgs.elmPackages.elm-review - pkgs.nodejs-18_x + pkgs.nodejs_20 pkgs.git pkgs.bash + pkgs.findutils + pkgs.gnused ]; + shellHook = '' + export ELM_OPEN_API_CLI_DEVSHELL_ACTIVE=1 + ''; } diff --git a/src/Cli.elm b/src/Cli.elm index 3348d737..3b001fca 100644 --- a/src/Cli.elm +++ b/src/Cli.elm @@ -1,38 +1,13 @@ -module Cli exposing (run, withConfig) +module Cli exposing (run) -import Ansi -import Ansi.Color -import BackendTask exposing (BackendTask) -import BackendTask.Extra -import BackendTask.File -import BackendTask.Http -import BackendTask.Stream import Cli.Option import Cli.OptionsParser import Cli.Program -import CliMonad -import Common -import Dict -import Dict.Extra -import Elm -import FastDict -import FastSet -import FatalError exposing (FatalError) import Json.Decode -import Json.Encode -import Json.Value -import OpenApi -import OpenApi.Common.Internal +import OpenApi.BackendTask import OpenApi.Config -import OpenApi.Generate import Pages.Script -import Pages.Script.Spinner import Result.Extra -import Set -import String.Extra -import Url -import UrlPath -import Yaml.Decode type alias CliOptions = @@ -272,7 +247,7 @@ run = (\cliOptions -> cliOptions |> parseCliOptions - |> withConfig + |> OpenApi.BackendTask.withConfig ) @@ -320,869 +295,3 @@ parseCliOptions cliOptions = (cliOptions.swaggerConversionCommand |> Maybe.map (\command -> { command = command, args = cliOptions.swaggerConversionCommandArgs }) ) - - -withInnerStep : - Int - -> Int - -> String - -> (a -> BackendTask FatalError b) - -> Pages.Script.Spinner.Steps FatalError ( a, c, d ) - -> Pages.Script.Spinner.Steps FatalError ( b, c, d ) -withInnerStep index total label toTask = - Pages.Script.Spinner.withStep (counter index total ++ " " ++ label) - (\( input, acc1, acc2 ) -> toTask input |> BackendTask.map (\result -> ( result, acc1, acc2 ))) - - -withConfig : OpenApi.Config.Config -> BackendTask FatalError () -withConfig config = - let - total : Int - total = - List.length (OpenApi.Config.inputs config) - in - List.foldl - (\input ( index, steps ) -> - ( index + 1 - , steps - |> (case OpenApi.Config.oasPath input of - OpenApi.Config.Url url -> - withInnerStep index - total - ("Download OAS from " ++ Url.toString url) - (\_ -> BackendTask.andThen (parseOriginal input) (readFromUrl url)) - - OpenApi.Config.File path -> - withInnerStep index - total - ("Read OAS from " ++ path) - (\_ -> BackendTask.andThen (parseOriginal input) (readFromFile path)) - ) - |> (\prev -> - let - overrides : List OpenApi.Config.Path - overrides = - OpenApi.Config.overrides input - in - if List.isEmpty overrides then - prev - |> withInnerStep index - total - "No overrides" - (\( _, original ) -> BackendTask.succeed (Json.Value.encode original)) - - else - List.foldl - (\override -> - case override of - OpenApi.Config.Url url -> - withInnerStep index - total - ("Download override from " ++ Url.toString url) - (\( acc, original ) -> BackendTask.map (\read -> ( ( override, read ) :: acc, original )) (readFromUrl url)) - - OpenApi.Config.File path -> - withInnerStep index - total - ("Read override from " ++ path) - (\( acc, original ) -> BackendTask.map (\read -> ( ( override, read ) :: acc, original )) (readFromFile path)) - ) - prev - overrides - |> withInnerStep index total "Merging overrides" mergeOverrides - ) - |> (case OpenApi.Config.writeMergedTo input of - Nothing -> - identity - - Just destination -> - withInnerStep index total "Writing merged OAS" (writeMerged destination) - ) - |> Pages.Script.Spinner.withStep (counter index total ++ " Parse OAS") - (\( merged, apiSpecAcc, formatsAcc ) -> - merged - |> decodeOpenApiSpecOrFail { hasAttemptedToConvertFromSwagger = False } config input - |> BackendTask.map - (\( apiSpec, formats ) -> - ( () - , ( input, apiSpec ) :: apiSpecAcc - , formats :: formatsAcc - ) - ) - ) - ) - ) - ( 1 - , Pages.Script.Spinner.steps - |> Pages.Script.Spinner.withStep "Collecting configuration" (\_ -> BackendTask.succeed ( (), [], [] )) - ) - (OpenApi.Config.inputs config) - |> Tuple.second - |> Pages.Script.Spinner.withStep "Generate Elm modules" - (\( (), apiSpecs, allFormats ) -> - OpenApi.Config.toGenerationConfig (List.concat allFormats) config apiSpecs - |> generateFilesFromOpenApiSpecs - ) - |> Pages.Script.Spinner.withStep "Format with elm-format" (onFirst attemptToFormat) - |> Pages.Script.Spinner.withStep "Write to disk" (onFirst (writeSdkToDisk (OpenApi.Config.outputDirectory config))) - |> Pages.Script.Spinner.runSteps - |> BackendTask.andThen printSuccessMessageAndWarnings - - -counter : Int -> Int -> String -counter index total = - let - totalString : String - totalString = - String.fromInt total - in - "[" - ++ String.padLeft (String.length totalString) '0' (String.fromInt index) - ++ "/" - ++ totalString - ++ "]" - - -onFirst : (a -> BackendTask.BackendTask error c) -> ( a, b ) -> BackendTask.BackendTask error ( c, b ) -onFirst f ( a, b ) = - f a |> BackendTask.map (\c -> ( c, b )) - - -parseOriginal : OpenApi.Config.Input -> String -> BackendTask.BackendTask FatalError.FatalError ( List a, Json.Value.JsonValue ) -parseOriginal input original = - case decodeMaybeYaml (OpenApi.Config.oasPath input) original of - Err e -> - e - |> jsonErrorToFatalError - |> BackendTask.fail - - Ok decoded -> - BackendTask.succeed ( [], decoded ) - - -mergeOverrides : ( List ( OpenApi.Config.Path, String ), Json.Value.JsonValue ) -> BackendTask.BackendTask FatalError.FatalError Json.Decode.Value -mergeOverrides ( overrides, original ) = - Result.map - (\overridesValues -> - List.foldl - (\override acc -> Result.andThen (overrideWith override) acc) - (Ok original) - overridesValues - |> Result.mapError FatalError.fromString - |> Result.map Json.Value.encode - ) - (overrides - |> List.reverse - |> Result.Extra.combineMap (\( path, file ) -> decodeMaybeYaml path file) - |> Result.mapError jsonErrorToFatalError - ) - |> Result.Extra.join - |> BackendTask.fromResult - - -writeMerged : String -> Json.Decode.Value -> BackendTask.BackendTask FatalError.FatalError Json.Decode.Value -writeMerged destination spec = - Pages.Script.writeFile - { path = destination - , body = spec |> Json.Encode.encode 4 - } - |> BackendTask.allowFatal - |> BackendTask.map (\_ -> spec) - - -decodeOpenApiSpecOrFail : - { hasAttemptedToConvertFromSwagger : Bool } - -> OpenApi.Config.Config - -> OpenApi.Config.Input - -> Json.Decode.Value - -> BackendTask.BackendTask FatalError.FatalError ( OpenApi.OpenApi, List { format : String, basicType : Common.BasicType } ) -decodeOpenApiSpecOrFail { hasAttemptedToConvertFromSwagger } config input value = - case - Result.map2 Tuple.pair - (Json.Decode.decodeValue OpenApi.decode value) - (extractFormats value) - of - Ok pair -> - BackendTask.succeed pair - - Err decodeError -> - if hasAttemptedToConvertFromSwagger then - jsonErrorToFatalError decodeError - |> BackendTask.fail - - else - case Json.Decode.decodeValue swaggerFieldDecoder value of - Err _ -> - jsonErrorToFatalError decodeError - |> BackendTask.fail - - Ok _ -> - let - askForConversion : BackendTask error Bool - askForConversion = - if OpenApi.Config.autoConvertSwagger config then - BackendTask.succeed True - - else - Pages.Script.question - (Ansi.Color.fontColor Ansi.Color.brightCyan (OpenApi.Config.pathToString (OpenApi.Config.oasPath input)) - ++ """ is a Swagger doc (aka Open API v2) and this tool only supports Open API v3. -Would you like to use """ - ++ Ansi.Color.fontColor Ansi.Color.brightCyan (OpenApi.Config.swaggerConversionUrl config) - ++ " to upgrade to v3? (y/n)\n" - ) - |> BackendTask.map (\response -> String.toLower response == "y") - in - askForConversion - |> BackendTask.andThen - (\shouldConvert -> - if shouldConvert then - convertToSwaggerAndThenDecode config input value - - else - ("""The input file appears to be a Swagger doc, -and the CLI was not configured to automatically convert it to an Open API spec. -See the """ - ++ Ansi.Color.fontColor Ansi.Color.brightCyan "--auto-convert-swagger" - ++ " flag for more info." - ) - |> FatalError.fromString - |> BackendTask.fail - ) - - -extractFormats : Json.Decode.Value -> Result Json.Decode.Error (List { format : String, basicType : Common.BasicType }) -extractFormats value = - Json.Decode.decodeValue formatDecoder value - - -formatDecoder : Json.Decode.Decoder (List { format : String, basicType : Common.BasicType }) -formatDecoder = - let - typeDecoder : Json.Decode.Decoder Common.BasicType - typeDecoder = - Json.Decode.string - |> Json.Decode.andThen - (\type_ -> - case type_ of - "string" -> - Json.Decode.succeed Common.String - - "integer" -> - Json.Decode.succeed Common.Integer - - "boolean" -> - Json.Decode.succeed Common.Boolean - - "number" -> - Json.Decode.succeed Common.Number - - _ -> - Json.Decode.fail "Unexpected type" - ) - in - Json.Decode.oneOf - [ Json.Decode.list (Json.Decode.lazy (\_ -> formatDecoder)) - |> Json.Decode.map List.concat - , Json.Decode.dict Json.Decode.value - |> Json.Decode.andThen - (\dict -> - case ( Dict.get "format" dict, Dict.get "type" dict ) of - ( Just format, Just type_ ) -> - Result.map2 - (\fmt basicType -> - [ { format = fmt - , basicType = basicType - } - ] - ) - (Json.Decode.decodeValue Json.Decode.string format) - (Json.Decode.decodeValue typeDecoder type_) - |> resultToDecoder - - _ -> - dict - |> Dict.values - |> Result.Extra.combineMap - (\v -> Json.Decode.decodeValue (Json.Decode.lazy (\_ -> formatDecoder)) v) - |> Result.map List.concat - |> resultToDecoder - ) - , Json.Decode.succeed [] - ] - - -resultToDecoder : Result Json.Decode.Error a -> Json.Decode.Decoder a -resultToDecoder result = - case result of - Ok ok -> - Json.Decode.succeed ok - - Err e -> - Json.Decode.fail (Json.Decode.errorToString e) - - -convertToSwaggerAndThenDecode : OpenApi.Config.Config -> OpenApi.Config.Input -> Json.Decode.Value -> BackendTask.BackendTask FatalError.FatalError ( OpenApi.OpenApi, List { format : String, basicType : Common.BasicType } ) -convertToSwaggerAndThenDecode config input value = - convertSwaggerToOpenApi config (Json.Encode.encode 0 value) - |> BackendTask.andThen - (\swagger -> - parseOriginal input swagger - |> BackendTask.andThen mergeOverrides - ) - |> Pages.Script.Spinner.runTask "Convert Swagger to Open API" - |> BackendTask.andThen (\converted -> decodeOpenApiSpecOrFail { hasAttemptedToConvertFromSwagger = True } config input converted) - - -jsonErrorToFatalError : Json.Decode.Error -> FatalError.FatalError -jsonErrorToFatalError decodeError = - decodeError - |> Json.Decode.errorToString - |> Ansi.Color.fontColor Ansi.Color.brightRed - |> FatalError.fromString - - -overrideWith : Json.Value.JsonValue -> Json.Value.JsonValue -> Result String Json.Value.JsonValue -overrideWith override original = - case override of - Json.Value.ObjectValue overrideObject -> - case original of - Json.Value.ObjectValue originalObject -> - Dict.merge - (\key value res -> Result.map (\acc -> ( key, value ) :: acc) res) - (\key originalValue overrideValue res -> - if overrideValue == Json.Value.NullValue then - res - - else if key == "security" then - Result.map (\acc -> ( key, overrideValue ) :: acc) res - - else - Result.map2 - (\acc newValue -> ( key, newValue ) :: acc) - res - (overrideWith overrideValue originalValue) - ) - (\key value res -> Result.map (\acc -> ( key, value ) :: acc) res) - (Dict.fromList originalObject) - (Dict.fromList overrideObject) - (Ok []) - |> Result.map (\list -> Json.Value.ObjectValue (List.reverse list)) - - _ -> - overrideError override original - - Json.Value.ArrayValue overrideArray -> - case original of - Json.Value.ArrayValue originalArray -> - mergeArrays overrideArray originalArray [] - - _ -> - overrideError override original - - Json.Value.BoolValue _ -> - Ok override - - Json.Value.NumericValue _ -> - Ok override - - Json.Value.StringValue _ -> - Ok override - - Json.Value.NullValue -> - Ok override - - -mergeArrays : List Json.Value.JsonValue -> List Json.Value.JsonValue -> List Json.Value.JsonValue -> Result String Json.Value.JsonValue -mergeArrays override original acc = - case original of - ogHead :: ogTail -> - case override of - Json.Value.NullValue :: ovTail -> - mergeArrays ovTail ogTail acc - - ovHead :: ovTail -> - case overrideWith ovHead ogHead of - Ok newHead -> - mergeArrays ovTail ogTail (newHead :: acc) - - Err e -> - Err e - - [] -> - if List.isEmpty original then - Ok (Json.Value.ArrayValue (List.reverse acc)) - - else - Ok (Json.Value.ArrayValue (List.reverse acc ++ original)) - - [] -> - if List.isEmpty override then - Ok (Json.Value.ArrayValue (List.reverse acc)) - - else - Ok (Json.Value.ArrayValue (List.reverse acc ++ override)) - - -overrideError : Json.Value.JsonValue -> Json.Value.JsonValue -> Result String Json.Value.JsonValue -overrideError override original = - let - toString : Json.Value.JsonValue -> String - toString v = - Json.Encode.encode 0 (Json.Value.encode v) - - message : String - message = - "Cannot override original value " ++ toString original ++ " with override " ++ toString override - in - Err message - - -convertSwaggerToOpenApi : OpenApi.Config.Config -> String -> BackendTask.BackendTask FatalError.FatalError String -convertSwaggerToOpenApi config input = - case OpenApi.Config.swaggerConversionCommand config of - Just { command, args } -> - BackendTask.Stream.fromString input - |> BackendTask.Stream.pipe (BackendTask.Stream.command command args) - |> BackendTask.Stream.read - |> BackendTask.mapError - (\error -> - FatalError.fromString <| - ("Attempted to convert the Swagger doc to an Open API spec using\n" - ++ Ansi.Color.fontColor Ansi.Color.brightCyan - (String.join " " - (command :: args) - ) - ++ "\nbut encountered an issue:\n\n" - ++ (Ansi.Color.fontColor Ansi.Color.brightRed <| - case error.recoverable of - BackendTask.Stream.StreamError err -> - err - - BackendTask.Stream.CustomError errCode maybeBody -> - case maybeBody of - Just body -> - body - - Nothing -> - String.fromInt errCode - ) - ) - ) - |> BackendTask.map .body - - Nothing -> - let - swaggerConversionUrl : String - swaggerConversionUrl = - OpenApi.Config.swaggerConversionUrl config - in - BackendTask.Http.post swaggerConversionUrl - (BackendTask.Http.stringBody "application/yaml" input) - (BackendTask.Http.expectJson Json.Decode.value) - |> BackendTask.map (Json.Encode.encode 0) - |> BackendTask.mapError - (\error -> - FatalError.fromString - ("Attempted to convert the Swagger doc to an Open API spec but encountered an issue:\n\n" - ++ (Ansi.Color.fontColor Ansi.Color.brightRed <| - case error.recoverable of - BackendTask.Http.BadUrl _ -> - "with the URL: " ++ swaggerConversionUrl - - BackendTask.Http.Timeout -> - "the request timed out" - - BackendTask.Http.NetworkError -> - "with a network error" - - BackendTask.Http.BadStatus { statusCode, statusText } _ -> - "status code " ++ String.fromInt statusCode ++ ", " ++ statusText - - BackendTask.Http.BadBody _ _ -> - "expected a string response body but got something else" - ) - ) - ) - - -swaggerFieldDecoder : Json.Decode.Decoder String -swaggerFieldDecoder = - Json.Decode.field "swagger" Json.Decode.string - - -decodeMaybeYaml : OpenApi.Config.Path -> String -> Result Json.Decode.Error Json.Value.JsonValue -decodeMaybeYaml oasPath input = - let - -- TODO: Better handling of errors: https://github.com/wolfadex/elm-open-api-cli/issues/40 - isJson : Bool - isJson = - case oasPath of - OpenApi.Config.File file -> - String.endsWith ".json" file - - OpenApi.Config.Url url -> - String.endsWith ".json" url.path - in - -- Short-circuit the error-prone yaml parsing of JSON structures if we - -- are reasonably confident that it is a JSON file - if isJson then - Json.Decode.decodeString Json.Value.decoder input - - else - case Yaml.Decode.fromString yamlToJsonValueDecoder input of - Err _ -> - Json.Decode.decodeString Json.Value.decoder input - - Ok jsonFromYaml -> - Ok jsonFromYaml - - -yamlToJsonValueDecoder : Yaml.Decode.Decoder Json.Value.JsonValue -yamlToJsonValueDecoder = - Yaml.Decode.oneOf - [ Yaml.Decode.map Json.Value.NumericValue Yaml.Decode.float - , Yaml.Decode.map Json.Value.StringValue Yaml.Decode.string - , Yaml.Decode.map Json.Value.BoolValue Yaml.Decode.bool - , Yaml.Decode.map (\_ -> Json.Value.NullValue) Yaml.Decode.null - , Yaml.Decode.map - Json.Value.ArrayValue - (Yaml.Decode.list (Yaml.Decode.lazy (\_ -> yamlToJsonValueDecoder))) - , Yaml.Decode.map - (\dict -> Json.Value.ObjectValue (Dict.toList dict)) - (Yaml.Decode.dict (Yaml.Decode.lazy (\_ -> yamlToJsonValueDecoder))) - ] - - -generateFilesFromOpenApiSpecs : - List ( OpenApi.Generate.Config, OpenApi.OpenApi ) - -> - BackendTask.BackendTask - FatalError.FatalError - ( List Elm.File - , { warnings : List CliMonad.Message - , requiredPackages : FastSet.Set String - } - ) -generateFilesFromOpenApiSpecs configs = - configs - |> BackendTask.Extra.combineMap - (\( config, apiSpec ) -> - OpenApi.Generate.files config apiSpec - |> Result.mapError - (\err -> - err - |> messageToString - |> FatalError.fromString - ) - |> BackendTask.fromResult - ) - |> BackendTask.map - (\result -> - let - groupOrder : String -> Int - groupOrder group = - case group of - "Request functions" -> - 1 - - "Types" -> - 2 - - "Encoders" -> - 3 - - "Decoders" -> - 4 - - _ -> - 5 - - commonDeclarationsFromResult : List { declaration : Elm.Declaration, group : String } - commonDeclarationsFromResult = - result - |> List.concatMap .modules - |> Dict.Extra.groupBy .moduleName - |> Dict.toList - |> List.concatMap - (\( moduleName, declarations ) -> - if moduleName == Common.commonModuleName then - declarations - |> List.foldl (\e acc -> FastDict.union e.declarations acc) FastDict.empty - |> FastDict.values - - else - [] - ) - - allEffectTypes : List OpenApi.Config.EffectType - allEffectTypes = - List.concatMap - (\( { effectTypes }, _ ) -> effectTypes) - configs - - commonFile : Elm.File - commonFile = - OpenApi.Common.Internal.declarations - { effectTypes = allEffectTypes - , requiresBase64 = List.any (\{ requiredPackages } -> FastSet.member Common.base64PackageName requiredPackages) result - } - ++ commonDeclarationsFromResult - |> fileFromGroups Common.commonModuleName - - fileFromGroups : List String -> List { group : String, declaration : Elm.Declaration } -> Elm.File - fileFromGroups moduleName declarations = - declarations - |> Dict.Extra.groupBy (\{ group } -> ( groupOrder group, group )) - |> Dict.toList - |> List.concatMap - (\( ( _, group ), decls ) -> - [ Elm.docs ("## " ++ group) - , Elm.group (List.map .declaration decls) - ] - ) - |> Elm.file moduleName - in - ( result - |> List.concatMap .modules - |> Dict.Extra.groupBy .moduleName - |> Dict.toList - |> List.filterMap - (\( moduleName, declarations ) -> - if moduleName == Common.commonModuleName then - Nothing - - else - declarations - |> List.foldl (\e acc -> FastDict.union e.declarations acc) FastDict.empty - |> FastDict.values - |> fileFromGroups moduleName - |> Just - ) - |> (::) commonFile - , { warnings = List.concatMap .warnings result - , requiredPackages = - List.foldl - (\{ requiredPackages } acc -> FastSet.union requiredPackages acc) - FastSet.empty - result - } - ) - ) - - -{-| Check to see if `elm-format` is available, and if so format the files --} -attemptToFormat : List Elm.File -> BackendTask.BackendTask FatalError.FatalError (List Elm.File) -attemptToFormat files = - Pages.Script.which "elm-format" - |> BackendTask.andThen - (\maybeFound -> - case maybeFound of - Just _ -> - files - |> BackendTask.Extra.combineMap - (\file -> - BackendTask.Stream.fromString file.contents - |> BackendTask.Stream.pipe (BackendTask.Stream.command "elm-format" [ "--stdin" ]) - |> BackendTask.Stream.read - |> BackendTask.map (\formatted -> { file | contents = formatted.body }) - -- Never fail on formatting errors - |> BackendTask.onError (\_ -> BackendTask.succeed file) - ) - - Nothing -> - BackendTask.succeed files - ) - - -writeSdkToDisk : String -> List Elm.File -> BackendTask.BackendTask FatalError.FatalError (List String) -writeSdkToDisk outputDirectory files = - BackendTask.Extra.combineMap - (\file -> - let - filePath : String - filePath = - outputDirectory - ++ "/" - ++ file.path - - outputPath : String - outputPath = - filePath - |> String.split "/" - |> UrlPath.join - |> UrlPath.toRelative - in - Pages.Script.writeFile - { path = outputPath - , body = file.contents - } - |> BackendTask.mapError - (\error -> - case error.recoverable of - Pages.Script.FileWriteError -> - FatalError.fromString <| - Ansi.Color.fontColor Ansi.Color.brightRed - ("Uh oh! Failed to write " ++ outputPath) - ) - |> BackendTask.map (\_ -> outputPath) - ) - files - - -printSuccessMessageAndWarnings : - ( List String - , { warnings : List CliMonad.Message - , requiredPackages : FastSet.Set String - } - ) - -> BackendTask.BackendTask FatalError.FatalError () -printSuccessMessageAndWarnings ( outputPaths, { requiredPackages, warnings } ) = - let - indentBy : Int -> String -> String - indentBy amount input = - String.repeat amount " " ++ input - - allRequiredPackages : List String - allRequiredPackages = - requiredPackages - |> FastSet.insert "elm/http" - |> FastSet.insert "elm/json" - |> FastSet.insert "elm/url" - |> FastSet.insert "elm/bytes" - |> FastSet.toList - - toInstall : String -> String - toInstall dependency = - indentBy 4 "elm install " ++ dependency - - toSentence : List String -> String - toSentence links = - links - |> List.map toElmDependencyLink - |> String.Extra.toSentenceOxford - - toElmDependencyLink : String -> String - toElmDependencyLink dependency = - Ansi.link - { text = dependency - , url = "https://package.elm-lang.org/packages/" ++ dependency ++ "/latest/" - } - - warningTask : BackendTask.BackendTask FatalError.FatalError () - warningTask = - warnings - |> Dict.Extra.groupBy .message - |> Dict.toList - |> List.map logWarning - |> BackendTask.doEach - - successTask : BackendTask.BackendTask error () - successTask = - [ [ "" - , "🎉 SDK generated:" - , "" - ] - , outputPaths - |> List.map (indentBy 4) - , [ "" - , "" - , "You'll also need " ++ toSentence allRequiredPackages ++ " installed. Try running:" - , "" - ] - , List.map toInstall allRequiredPackages - ] - |> List.concat - |> List.map Pages.Script.log - |> BackendTask.doEach - in - BackendTask.doEach [ successTask, warningTask ] - - -messageToString : CliMonad.Message -> String -messageToString { path, message } = - if List.isEmpty path then - "Error! " ++ message - - else - "Error! " ++ message ++ "\n Path: " ++ String.join " -> " path - - -logWarning : ( String, List CliMonad.Message ) -> BackendTask.BackendTask FatalError.FatalError () -logWarning ( message, messages ) = - let - firstLine : String - firstLine = - Ansi.Color.fontColor Ansi.Color.brightYellow "Warning: " ++ message - - paths : List String - paths = - messages - |> List.filterMap - (\{ path } -> - if List.isEmpty path then - Nothing - - else - Just (" at " ++ String.join " -> " path) - ) - |> Set.fromList - |> Set.toList - in - (firstLine :: paths) - |> List.map Pages.Script.log - |> BackendTask.doEach - - - --- HELPERS - - -readFromUrl : Url.Url -> BackendTask.BackendTask FatalError.FatalError String -readFromUrl url = - let - path : String - path = - Url.toString url - in - BackendTask.Http.get path BackendTask.Http.expectString - |> BackendTask.mapError - (\error -> - FatalError.fromString <| - Ansi.Color.fontColor Ansi.Color.brightRed <| - case error.recoverable of - BackendTask.Http.BadUrl _ -> - "Uh oh! There is no file at " ++ path - - BackendTask.Http.Timeout -> - "Uh oh! Timed out waiting for response" - - BackendTask.Http.NetworkError -> - "Uh oh! A network error happened" - - BackendTask.Http.BadStatus { statusCode, statusText } _ -> - "Uh oh! The server responded with a " ++ String.fromInt statusCode ++ " " ++ statusText ++ " status" - - BackendTask.Http.BadBody _ _ -> - "Uh oh! The body of the response was invalid" - ) - - -readFromFile : String -> BackendTask.BackendTask FatalError.FatalError String -readFromFile entryFilePath = - BackendTask.File.rawFile entryFilePath - |> BackendTask.mapError - (\error -> - FatalError.fromString <| - Ansi.Color.fontColor Ansi.Color.brightRed <| - case error.recoverable of - BackendTask.File.FileDoesntExist -> - "Uh oh! There is no file at " ++ entryFilePath - - BackendTask.File.FileReadError _ -> - "Uh oh! Can't read!" - - BackendTask.File.DecodingError _ -> - "Uh oh! Decoding failure!" - ) diff --git a/src/TestGenScript.elm b/src/TestGenScript.elm index f6f7c469..e8ffb93e 100644 --- a/src/TestGenScript.elm +++ b/src/TestGenScript.elm @@ -2,7 +2,7 @@ module TestGenScript exposing (run) import Ansi.Color import BackendTask -import Cli +import OpenApi.BackendTask import OpenApi.Config import Pages.Script @@ -104,11 +104,11 @@ run = in Pages.Script.withoutCliOptions (BackendTask.doEach - [ Cli.withConfig config + [ OpenApi.BackendTask.withConfig config , "\nCompiling Example app" |> Ansi.Color.fontColor Ansi.Color.brightGreen |> Pages.Script.log , Pages.Script.exec "sh" - [ "-c", "cd example && npx --no -- elm make src/Example.elm --output=/dev/null" ] + [ "-c", "cd example && elm make src/Example.elm --output=/dev/null" ] ] )