Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Types and functions related to Stack's upload
command.
Synopsis
- data UploadOpts = UploadOpts {
- uoItemsToWorkWith :: ![String]
- uoDocumentation :: !Bool
- uoPvpBounds :: !(Maybe PvpBounds)
- uoCheck :: !Bool
- uoBuildPackage :: !Bool
- uoTarPath :: !(Maybe FilePath)
- uoUploadVariant :: !UploadVariant
- data SDistOpts = SDistOpts {}
- data UploadContent
- = SDist
- | DocArchive
- data UploadVariant
- uploadCmd :: UploadOpts -> RIO Runner ()
- upload :: (HasLogFunc m, HasTerm m) => String -> HackageAuth -> UploadContent -> Maybe String -> FilePath -> UploadVariant -> RIO m ()
- uploadBytes :: HasTerm m => String -> HackageAuth -> UploadContent -> Maybe String -> String -> UploadVariant -> ByteString -> RIO m ()
- uploadRevision :: (HasLogFunc m, HasTerm m) => String -> HackageAuth -> PackageIdentifier -> ByteString -> RIO m ()
- data HackageCreds
- data HackageAuth
- newtype HackageKey = HackageKey Text
- loadAuth :: (HasLogFunc m, HasTerm m) => Config -> RIO m HackageAuth
- writeFilePrivate :: MonadIO m => FilePath -> Builder -> m ()
- maybeGetHackageKey :: RIO m (Maybe HackageKey)
Upload
data UploadOpts Source #
Type representing command line options for the stack upload
command.
UploadOpts | |
|
Type representing command line options for stack sdist
command.
SDistOpts | |
|
data UploadContent Source #
Type representing forms of content for upload to Hackage.
data UploadVariant Source #
Type representing variants for uploading to Hackage.
Publishing | Publish the package/a published package. |
Candidate | Create a package candidate/a package candidate. |
uploadCmd :: UploadOpts -> RIO Runner () Source #
Function underlying the stack upload
command. Upload to Hackage.
:: (HasLogFunc m, HasTerm m) | |
=> String | Hackage base URL |
-> HackageAuth | |
-> UploadContent | |
-> Maybe String | Optional package identifier name, applies only to the upload of documentation. |
-> FilePath | Path to archive file. |
-> UploadVariant | |
-> RIO m () |
Upload a single tarball with the given Uploader
.
Since 0.1.0.0
:: HasTerm m | |
=> String | Hackage base URL |
-> HackageAuth | |
-> UploadContent | Form of the content to be uploaded. |
-> Maybe String | Optional package identifier name, applies only to the upload of documentation. |
-> String | tar file name |
-> UploadVariant | |
-> ByteString | tar file contents |
-> RIO m () |
Upload a single tarball with the given Uploader
. Instead of sending a
file like upload
, this sends a lazy bytestring.
Since 0.1.2.1
:: (HasLogFunc m, HasTerm m) | |
=> String | Hackage base URL |
-> HackageAuth | |
-> PackageIdentifier | |
-> ByteString | |
-> RIO m () |
Credentials
data HackageCreds Source #
Username and password to log into Hackage.
Since 0.1.0.0
Instances
ToJSON HackageCreds Source # | |
Defined in Stack.Upload toJSON :: HackageCreds -> Value # toEncoding :: HackageCreds -> Encoding # toJSONList :: [HackageCreds] -> Value # toEncodingList :: [HackageCreds] -> Encoding # | |
Show HackageCreds Source # | |
Defined in Stack.Upload showsPrec :: Int -> HackageCreds -> ShowS # show :: HackageCreds -> String # showList :: [HackageCreds] -> ShowS # | |
Eq HackageCreds Source # | |
Defined in Stack.Upload (==) :: HackageCreds -> HackageCreds -> Bool # (/=) :: HackageCreds -> HackageCreds -> Bool # | |
FromJSON (FilePath -> HackageCreds) Source # | |
Defined in Stack.Upload parseJSON :: Value -> Parser (FilePath -> HackageCreds) # parseJSONList :: Value -> Parser [FilePath -> HackageCreds] # |
data HackageAuth Source #
Instances
Show HackageAuth Source # | |
Defined in Stack.Upload showsPrec :: Int -> HackageAuth -> ShowS # show :: HackageAuth -> String # showList :: [HackageAuth] -> ShowS # | |
Eq HackageAuth Source # | |
Defined in Stack.Upload (==) :: HackageAuth -> HackageAuth -> Bool # (/=) :: HackageAuth -> HackageAuth -> Bool # |
newtype HackageKey Source #
Instances
Show HackageKey Source # | |
Defined in Stack.Upload showsPrec :: Int -> HackageKey -> ShowS # show :: HackageKey -> String # showList :: [HackageKey] -> ShowS # | |
Eq HackageKey Source # | |
Defined in Stack.Upload (==) :: HackageKey -> HackageKey -> Bool # (/=) :: HackageKey -> HackageKey -> Bool # |
loadAuth :: (HasLogFunc m, HasTerm m) => Config -> RIO m HackageAuth Source #
writeFilePrivate :: MonadIO m => FilePath -> Builder -> m () Source #
Write contents to a file which is always private.
For history of this function, see:
Internal
maybeGetHackageKey :: RIO m (Maybe HackageKey) Source #