Module CPM.PackageCopy

Contains functions that operate on a package copy. And some functions that don't quite fit anywhere else.

Summary of exported operations:

resolveDependenciesForPackageCopy :: Config -> Package -> Repository -> GlobalCache -> String -> IO ([LogEntry],Either LogEntry ResolutionResult)   
Resolves dependencies for a package copy.
acquireAndInstallPackageWithDependencies :: Config -> Repository -> Package -> IO ([LogEntry],Either LogEntry ())   
Acquires a package and its dependencies and installs them to the global package cache.
upgradeAllPackages :: Config -> Repository -> String -> IO ([LogEntry],Either LogEntry ())   
Upgrades all dependencies of a package copy.
upgradeSinglePackage :: Config -> Repository -> String -> String -> IO ([LogEntry],Either LogEntry ())   
Upgrades a single package and its transitive dependencies.
installLocalDependencies :: Config -> Repository -> String -> IO ([LogEntry],Either LogEntry (Package,[Package]))   
Installs the dependencies of a package.
linkToLocalCache :: String -> String -> IO ([LogEntry],Either LogEntry ())   
Links a directory into the local package cache.
getLocalPackageSpec :: Config -> String -> IO ([LogEntry],Either LogEntry String)   
Tries to find a package specification in the given directory or one of its ancestors.
resolveAndCopyDependencies :: Config -> Repository -> GlobalCache -> String -> IO ([LogEntry],Either LogEntry [Package])   
Resolves the dependencies for a package copy and fills the package caches.
resolveAndCopyDependenciesForPackage :: Config -> String -> Package -> IO ([LogEntry],Either LogEntry [Package])   
Resolves the dependencies for a package copy and fills the package caches.
resolveDependencies :: Config -> String -> IO ([LogEntry],Either LogEntry ResolutionResult)   
Resolves the dependencies for a package copy.
renderPackageInfo :: Bool -> Bool -> Bool -> Package -> String   
Renders information on a package.

Exported operations:

resolveDependenciesForPackageCopy :: Config -> Package -> Repository -> GlobalCache -> String -> IO ([LogEntry],Either LogEntry ResolutionResult)   

Resolves dependencies for a package copy.

acquireAndInstallPackageWithDependencies :: Config -> Repository -> Package -> IO ([LogEntry],Either LogEntry ())   

Acquires a package and its dependencies and installs them to the global package cache.

upgradeAllPackages :: Config -> Repository -> String -> IO ([LogEntry],Either LogEntry ())   

Upgrades all dependencies of a package copy.

upgradeSinglePackage :: Config -> Repository -> String -> String -> IO ([LogEntry],Either LogEntry ())   

Upgrades a single package and its transitive dependencies.

installLocalDependencies :: Config -> Repository -> String -> IO ([LogEntry],Either LogEntry (Package,[Package]))   

Installs the dependencies of a package.

linkToLocalCache :: String -> String -> IO ([LogEntry],Either LogEntry ())   

Links a directory into the local package cache. Used for cypm link.

getLocalPackageSpec :: Config -> String -> IO ([LogEntry],Either LogEntry String)   

Tries to find a package specification in the given directory or one of its ancestors. If there is no package specifiction in these directories, the home package specification (i.e., ~/.cpm/home-package/package.json is returned (and created if it does not exist). In order to avoid infinite loops due to cyclic file structures, the search is limited to the number of directories occurring in the current absolute path.

resolveAndCopyDependencies :: Config -> Repository -> GlobalCache -> String -> IO ([LogEntry],Either LogEntry [Package])   

Resolves the dependencies for a package copy and fills the package caches.

resolveAndCopyDependenciesForPackage :: Config -> String -> Package -> IO ([LogEntry],Either LogEntry [Package])   

Resolves the dependencies for a package copy and fills the package caches.

resolveDependencies :: Config -> String -> IO ([LogEntry],Either LogEntry ResolutionResult)   

Resolves the dependencies for a package copy.

renderPackageInfo :: Bool -> Bool -> Bool -> Package -> String   

Renders information on a package.