mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-24 15:12:01 +03:00
elm-review fixes.
This commit is contained in:
parent
0cc2ea519b
commit
fad00c6186
@ -185,6 +185,7 @@ distill :
|
||||
-> DataSource raw
|
||||
-> DataSource distilled
|
||||
distill uniqueKey encode decode dataSource =
|
||||
-- elm-review: known-unoptimized-recursion
|
||||
case dataSource of
|
||||
RequestError error ->
|
||||
RequestError error
|
||||
@ -192,7 +193,7 @@ distill uniqueKey encode decode dataSource =
|
||||
Request partiallyStripped ( urls, lookupFn ) ->
|
||||
Request partiallyStripped
|
||||
( urls
|
||||
, \keepOrDiscard appType rawResponses ->
|
||||
, \_ appType rawResponses ->
|
||||
case appType of
|
||||
ApplicationType.Browser ->
|
||||
rawResponses
|
||||
@ -228,7 +229,7 @@ distill uniqueKey encode decode dataSource =
|
||||
(Pages.StaticHttpRequest.DistilledResponse (encode value))
|
||||
)
|
||||
( []
|
||||
, \keepOrDiscard appType rawResponses ->
|
||||
, \_ _ _ ->
|
||||
value
|
||||
|> encode
|
||||
|> decode
|
||||
@ -236,7 +237,7 @@ distill uniqueKey encode decode dataSource =
|
||||
)
|
||||
|
||||
|
||||
toResult : Result Pages.StaticHttpRequest.Error ( Dict.Dict String Pages.StaticHttpRequest.WhatToDo, b ) -> RawRequest b
|
||||
toResult : Result Pages.StaticHttpRequest.Error ( Dict String WhatToDo, b ) -> RawRequest b
|
||||
toResult result =
|
||||
case result of
|
||||
Err error ->
|
||||
|
@ -368,7 +368,7 @@ unoptimizedRequest requestWithSecrets expect =
|
||||
ExpectUnoptimizedJson decoder ->
|
||||
Request Dict.empty
|
||||
( [ requestWithSecrets ]
|
||||
, \keepOrDiscard _ rawResponseDict ->
|
||||
, \_ _ rawResponseDict ->
|
||||
rawResponseDict
|
||||
|> RequestsAndPending.get (Secrets.maskedLookup requestWithSecrets |> HashRequest.hash)
|
||||
|> (\maybeResponse ->
|
||||
@ -419,7 +419,7 @@ unoptimizedRequest requestWithSecrets expect =
|
||||
ExpectString mapStringFn ->
|
||||
Request Dict.empty
|
||||
( [ requestWithSecrets ]
|
||||
, \keepOrDiscard _ rawResponseDict ->
|
||||
, \_ _ rawResponseDict ->
|
||||
rawResponseDict
|
||||
|> RequestsAndPending.get (Secrets.maskedLookup requestWithSecrets |> HashRequest.hash)
|
||||
|> (\maybeResponse ->
|
||||
|
@ -11,7 +11,7 @@ import HtmlPrinter exposing (htmlToString)
|
||||
import Internal.ApiRoute exposing (Done(..))
|
||||
import NotFoundReason exposing (NotFoundReason)
|
||||
import Pages.Internal.ApplicationType as ApplicationType
|
||||
import Pages.Internal.Platform.Mode as Mode exposing (Mode)
|
||||
import Pages.Internal.Platform.Mode exposing (Mode)
|
||||
import Pages.Internal.Platform.ToJsPayload as ToJsPayload exposing (ToJsPayload)
|
||||
import Pages.SiteConfig exposing (SiteConfig)
|
||||
import Pages.StaticHttp.Request as HashRequest
|
||||
@ -167,7 +167,7 @@ update newEntry model =
|
||||
|
||||
|
||||
encode : RequestsAndPending -> Mode -> Dict String StaticHttpResult -> Result (List BuildError) (Dict String (Dict String String))
|
||||
encode requestsAndPending mode staticResponses =
|
||||
encode requestsAndPending _ staticResponses =
|
||||
staticResponses
|
||||
|> Dict.filter
|
||||
(\key _ ->
|
||||
|
@ -2,7 +2,6 @@ module Pages.StaticHttpRequest exposing (Error(..), RawRequest(..), Status(..),
|
||||
|
||||
import BuildError exposing (BuildError)
|
||||
import Dict exposing (Dict)
|
||||
import Dict.Extra
|
||||
import Internal.OptimizedDecoder
|
||||
import Json.Decode.Exploration
|
||||
import Json.Encode
|
||||
|
@ -29,7 +29,7 @@ import SimulatedEffect.Cmd
|
||||
import SimulatedEffect.Http as Http
|
||||
import SimulatedEffect.Ports
|
||||
import SimulatedEffect.Task
|
||||
import Test exposing (Test, describe, only, test)
|
||||
import Test exposing (Test, describe, test)
|
||||
import Test.Http
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user