mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-25 12:52:27 +03:00
Hide hidden Secrets functions from package, put under Pages module namespace.
This commit is contained in:
parent
fa7ac18fc1
commit
022e9e9016
2
elm.json
2
elm.json
@ -11,7 +11,7 @@
|
||||
"Pages.ImagePath",
|
||||
"Pages.PagePath",
|
||||
"StaticHttp",
|
||||
"Secrets",
|
||||
"Pages.Secrets",
|
||||
"Pages.Directory",
|
||||
"Pages.Platform",
|
||||
"Pages.Internal",
|
||||
|
36
src/Pages/Secrets.elm
Normal file
36
src/Pages/Secrets.elm
Normal file
@ -0,0 +1,36 @@
|
||||
module Pages.Secrets exposing (Value, map, succeed, with)
|
||||
|
||||
{-| TODO
|
||||
|
||||
@docs Value, map, succeed, with
|
||||
|
||||
-}
|
||||
|
||||
import Secrets
|
||||
|
||||
|
||||
{-| TODO
|
||||
-}
|
||||
type alias Value value =
|
||||
Secrets.Value value
|
||||
|
||||
|
||||
{-| TODO
|
||||
-}
|
||||
succeed : value -> Value value
|
||||
succeed =
|
||||
Secrets.succeed
|
||||
|
||||
|
||||
{-| TODO
|
||||
-}
|
||||
map : (valueA -> valueB) -> Value valueA -> Value valueB
|
||||
map =
|
||||
Secrets.map
|
||||
|
||||
|
||||
{-| TODO
|
||||
-}
|
||||
with : String -> Value (String -> value) -> Value value
|
||||
with =
|
||||
Secrets.with
|
@ -24,6 +24,7 @@ module StaticHttp exposing
|
||||
import Dict exposing (Dict)
|
||||
import Dict.Extra
|
||||
import Json.Decode.Exploration as Decode exposing (Decoder)
|
||||
import Pages.Secrets
|
||||
import Pages.StaticHttpRequest exposing (Request(..))
|
||||
import Secrets
|
||||
|
||||
@ -189,7 +190,7 @@ lookup requestInfo rawResponses =
|
||||
Ok ( rawResponses, value )
|
||||
|
||||
|
||||
addUrls : List (Secrets.Value { url : String, method : String, headers : List ( String, String ) }) -> Pages.StaticHttpRequest.Request value -> Pages.StaticHttpRequest.Request value
|
||||
addUrls : List (Pages.Secrets.Value { url : String, method : String, headers : List ( String, String ) }) -> Pages.StaticHttpRequest.Request value -> Pages.StaticHttpRequest.Request value
|
||||
addUrls urlsToAdd requestInfo =
|
||||
case requestInfo of
|
||||
Request ( initialUrls, function ) ->
|
||||
@ -199,7 +200,7 @@ addUrls urlsToAdd requestInfo =
|
||||
Done value
|
||||
|
||||
|
||||
lookupUrls : Pages.StaticHttpRequest.Request value -> List (Secrets.Value RequestDetails)
|
||||
lookupUrls : Pages.StaticHttpRequest.Request value -> List (Pages.Secrets.Value RequestDetails)
|
||||
lookupUrls requestInfo =
|
||||
case requestInfo of
|
||||
Request ( urls, lookupFn ) ->
|
||||
@ -244,7 +245,7 @@ succeed value =
|
||||
{-| TODO
|
||||
-}
|
||||
get :
|
||||
Secrets.Value String
|
||||
Pages.Secrets.Value String
|
||||
-> Decoder a
|
||||
-> Request a
|
||||
get url decoder =
|
||||
@ -279,7 +280,7 @@ requestToString requestDetails =
|
||||
{-| TODO
|
||||
-}
|
||||
request :
|
||||
Secrets.Value RequestDetails
|
||||
Pages.Secrets.Value RequestDetails
|
||||
-> Decoder a
|
||||
-> Request a
|
||||
request urlWithSecrets decoder =
|
||||
|
Loading…
Reference in New Issue
Block a user