-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,11 +13,13 @@ import App.Fossa.Snippets qualified as Snippets | |
import App.Fossa.Subcommand (GetCommonOpts, GetSeverity, SubCommand (..), runSubCommand) | ||
import App.Fossa.Test qualified as Test | ||
import App.Fossa.VSI.IAT.AssertUserDefinedBinaries qualified as LinkBins | ||
import App.Support (supportUrl) | ||
import App.Version (fullVersionDescription) | ||
import Control.Concurrent.CGroup (initRTSThreads) | ||
import Control.Monad (join) | ||
import Data.Aeson (ToJSON) | ||
import Data.String.Conversion (toString) | ||
import Effect.Logger (indent, newlinePreceding, newlineTrailing, pretty, putDoc, vsep) | ||
import Options.Applicative ( | ||
CommandFields, | ||
InfoMod, | ||
|
@@ -74,7 +76,7 @@ helperOpt = | |
progData :: InfoMod (IO ()) | ||
progData = | ||
fullDesc | ||
<> header "fossa-cli - Flexible, performant dependency analysis" | ||
<> header "FOSSA CLI - Flexible, performant dependency analysis" | ||
<> footer "Subcommands have additional options, run 'fossa COMMAND -h' for more details" | ||
|
||
subcommands :: Parser (IO ()) | ||
|
@@ -99,6 +101,7 @@ subcommands = public <|> private | |
, decodeSubCommand LinkBins.linkBinsSubCommand | ||
, decodeSubCommand Snippets.snippetsSubCommand | ||
, initCommand | ||
, feedbackCommand | ||
] | ||
|
||
experimentalLicenseScanCommand :: Mod CommandFields (IO ()) | ||
|
@@ -107,6 +110,26 @@ experimentalLicenseScanCommand = command "experimental-license-scan" (info runIn | |
runInit :: Parser (IO ()) | ||
runInit = pure $ putStrLn "The 'experimental-license-scan' has been deprecated and renamed to 'license-scan'. Please use the 'license-scan' command instead." | ||
|
||
feedbackCommand :: Mod CommandFields (IO ()) | ||
feedbackCommand = command "feedback" (info feedbackPrompt $ progDescDoc $ formatStringToDoc "Provide feedback on your FOSSA CLI experience, submit feature requests, and report bugs/issues") | ||
where | ||
feedbackPrompt :: Parser (IO ()) | ||
feedbackPrompt = | ||
pure $ | ||
putDoc $ | ||
vsep | ||
[ newlinePreceding "At FOSSA, we are committed to delivering an exceptional user experience and are continously working towards improving our product." | ||
, "Your feedback is crucial in shaping our ongoing efforts to innovate and provide an even better user experience!" | ||
, "" | ||
, "* Report bugs and issues at:" | ||
, newlineTrailing . newlinePreceding $ indent 4 $ pretty supportUrl | ||
, "* Submit feature requests:" | ||
, newlineTrailing . newlinePreceding $ indent 4 "Business / Enterprise customers: Contact your CSM / CSE representative" | ||
, newlineTrailing $ indent 4 "General: [email protected]" | ||
, "* Provide feedback on overall cli experience at:" | ||
, newlineTrailing . newlineTrailing . newlinePreceding $ indent 4 "https://go.fossa.com/cli-feedback" | ||
] | ||
|
||
decodeSubCommand :: (GetSeverity a, GetCommonOpts a, Show b, ToJSON b) => SubCommand a b -> Mod CommandFields (IO ()) | ||
decodeSubCommand cmd@SubCommand{..} = command commandName $ info (runSubCommand cmd) commandInfo | ||
|
||
|