feat: Removes cli-client
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
import ArgumentParser
|
||||
import CliClient
|
||||
import CommandClient
|
||||
import PandocClient
|
||||
|
||||
@dynamicMemberLookup
|
||||
struct GenerateOptions: ParsableArguments {
|
||||
|
||||
@OptionGroup var basic: BasicGlobalOptions
|
||||
|
||||
@Option(
|
||||
name: .shortAndLong,
|
||||
help: "Custom build directory path.",
|
||||
completion: .directory
|
||||
)
|
||||
var buildDirectory: String?
|
||||
|
||||
@Option(
|
||||
name: [.short, .customLong("file")],
|
||||
help: "Files used to generate the output, can be specified multiple times.",
|
||||
@@ -65,20 +73,20 @@ struct GenerateOptions: ParsableArguments {
|
||||
|
||||
extension GenerateOptions {
|
||||
|
||||
func loggingOptions(commandName: String) -> CliClient.LoggingOptions {
|
||||
func loggingOptions(commandName: String) -> LoggingOptions {
|
||||
basic.loggingOptions(commandName: commandName)
|
||||
}
|
||||
|
||||
func pandocOptions(
|
||||
_ fileType: CliClient.PandocOptions.FileType
|
||||
) -> CliClient.PandocOptions {
|
||||
func pandocRunOptions(commandName: String) -> PandocClient.RunOptions {
|
||||
.init(
|
||||
buildDirectory: buildDirectory,
|
||||
extraOptions: extraOptions.count > 0 ? extraOptions : nil,
|
||||
files: files.count > 0 ? files : nil,
|
||||
loggingOptions: .init(commandName: commandName, logLevel: .init(globals: basic, quietOnlyPlaybook: false)),
|
||||
includeInHeader: includeInHeader.count > 0 ? includeInHeader : nil,
|
||||
outputDirectory: outputDirectory,
|
||||
outputFileName: outputFileName,
|
||||
outputFileType: fileType,
|
||||
projectDirectory: projectDirectory,
|
||||
outputFileName: outputFileName,
|
||||
quiet: basic.quiet,
|
||||
shell: basic.shell,
|
||||
shouldBuild: !noBuild
|
||||
|
||||
Reference in New Issue
Block a user