mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-26 02:11:53 +00:00
adds list-unindexed
This commit is contained in:
@@ -108,6 +108,7 @@ import Startlude ( ($)
|
||||
, snd
|
||||
, sortBy
|
||||
, throwIO
|
||||
, toS
|
||||
, void
|
||||
)
|
||||
import System.FSNotify ( ActionPredicate
|
||||
@@ -163,6 +164,12 @@ newtype EosRepo = EosRepo
|
||||
{ eosRepoFileRoot :: FilePath
|
||||
}
|
||||
|
||||
getPackages :: (MonadIO m, MonadReader r m, Has PkgRepo r) => m [PkgId]
|
||||
getPackages = do
|
||||
root <- asks pkgRepoFileRoot
|
||||
paths <- listDirectory root
|
||||
pure $ PkgId . toS <$> paths
|
||||
|
||||
getVersionsFor :: (MonadIO m, MonadReader r m, Has PkgRepo r, MonadLogger m) => PkgId -> m [Version]
|
||||
getVersionsFor pkg = do
|
||||
root <- asks pkgRepoFileRoot
|
||||
|
||||
Reference in New Issue
Block a user