mirror of
https://github.com/Start9Labs/registry.git
synced 2026-04-01 20:44:15 +00:00
clean up
This commit is contained in:
committed by
Keagan McClelland
parent
7b2684acd5
commit
bce777f991
6
src/Lib/External/AppMgr.hs
vendored
6
src/Lib/External/AppMgr.hs
vendored
@@ -59,7 +59,7 @@ getManifest appmgrPath appPath e@(Extension appId) = do
|
||||
ExitFailure n -> throwE $ AppMgrE [i|embassy-sdk inspect manifest #{appId}|] n
|
||||
|
||||
getIcon :: (MonadIO m, KnownSymbol a) => FilePath -> FilePath -> Extension a -> S9ErrT m ByteString
|
||||
getIcon appmgrPath appPath e@(Extension icon) = do
|
||||
getIcon appmgrPath appPath (Extension icon) = do
|
||||
(ec, bs) <- readProcessInheritStderr (appmgrPath <> "embassy-sdk") ["inspect", "icon", appPath] ""
|
||||
case ec of
|
||||
ExitSuccess -> pure bs
|
||||
@@ -73,14 +73,14 @@ getPackageHash appmgrPath appPath e@(Extension appId) = do
|
||||
ExitFailure n -> throwE $ AppMgrE [i|embassy-sdk inspect hash #{appId}|] n
|
||||
|
||||
getInstructions :: (MonadIO m, KnownSymbol a) => FilePath -> FilePath -> Extension a -> S9ErrT m ByteString
|
||||
getInstructions appmgrPath appPath e@(Extension appId) = do
|
||||
getInstructions appmgrPath appPath (Extension appId) = do
|
||||
(ec, bs) <- readProcessInheritStderr (appmgrPath <> "embassy-sdk") ["inspect", "instructions", appPath] ""
|
||||
case ec of
|
||||
ExitSuccess -> pure bs
|
||||
ExitFailure n -> throwE $ AppMgrE [i|embassy-sdk inspect instructions #{appId}|] n
|
||||
|
||||
getLicense :: (MonadIO m, KnownSymbol a) => FilePath -> FilePath -> Extension a -> S9ErrT m ByteString
|
||||
getLicense appmgrPath appPath e@(Extension appId) = do
|
||||
getLicense appmgrPath appPath (Extension appId) = do
|
||||
(ec, bs) <- readProcessInheritStderr (appmgrPath <> "embassy-sdk") ["inspect", "license", appPath] ""
|
||||
case ec of
|
||||
ExitSuccess -> pure bs
|
||||
|
||||
@@ -27,9 +27,6 @@ import Yesod
|
||||
import Data.Functor.Contravariant ( Contravariant(contramap) )
|
||||
import qualified GHC.Read ( Read(..) )
|
||||
import qualified GHC.Show ( Show(..) )
|
||||
import Database.PostgreSQL.Simple.ToField
|
||||
import Database.PostgreSQL.Simple.FromField
|
||||
import Data.Binary.Builder
|
||||
|
||||
newtype AppIdentifier = AppIdentifier { unAppIdentifier :: Text }
|
||||
deriving (Eq)
|
||||
@@ -62,13 +59,6 @@ instance ToContent AppIdentifier where
|
||||
toContent = toContent . toJSON
|
||||
instance ToTypedContent AppIdentifier where
|
||||
toTypedContent = toTypedContent . toJSON
|
||||
instance ToField AppIdentifier where
|
||||
toField a = toJSONField a
|
||||
-- Escape $ BS.toStrict $ encode a
|
||||
-- Plain $ inQuotes $ putStringUtf8 $ show a
|
||||
-- $ fromByteString $ BS.toStrict $ encode a
|
||||
instance FromField AppIdentifier where
|
||||
fromField = fromJSONField
|
||||
|
||||
data VersionInfo = VersionInfo
|
||||
{ versionInfoVersion :: Version
|
||||
|
||||
@@ -8,8 +8,6 @@ import Database.Persist.Postgresql
|
||||
import Data.Aeson
|
||||
import Control.Monad
|
||||
import Yesod.Core
|
||||
import Database.PostgreSQL.Simple.FromField
|
||||
import Database.PostgreSQL.Simple.ToField
|
||||
|
||||
data CategoryTitle = FEATURED
|
||||
| BITCOIN
|
||||
@@ -47,6 +45,7 @@ instance FromJSON CategoryTitle where
|
||||
instance ToContent CategoryTitle where
|
||||
toContent = toContent . toJSON
|
||||
instance ToTypedContent CategoryTitle where
|
||||
<<<<<<< HEAD
|
||||
toTypedContent = toTypedContent . toJSON
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
@@ -68,3 +67,6 @@ parseCT = \case
|
||||
"alt coin" -> ALTCOIN
|
||||
-- _ -> fail "unknown category title"
|
||||
>>>>>>> aggregate query functions
|
||||
=======
|
||||
toTypedContent = toTypedContent . toJSON
|
||||
>>>>>>> clean up
|
||||
|
||||
Reference in New Issue
Block a user