Files
resgen.swift/Sources/ResgenSwift/Analytics/AnalyticsOptions.swift
Thibaut Schmitt b9aac55a76
Some checks failed
openium/resgen.swift/pipeline/head There was a failure building this commit
Add new analytics parameters pathSuffix
2026-01-21 11:39:46 +01:00

53 lines
1.4 KiB
Swift

//
// AnalyticsOptions.swift
//
//
// Created by Loris Perret on 08/12/2023.
//
import ArgumentParser
import Foundation
import ToolCore
struct AnalyticsOptions: ParsableArguments {
@Flag(
name: [.customShort("f"), .customShort("F")],
help: "Should force generation"
)
var forceGeneration = false
@Argument(
help: "Input files where tags ared defined.",
transform: { $0.replaceTiltWithHomeDirectoryPath() }
)
var inputFile: String
@Option(
help: "Target(s) analytics to generate. (\"matomo\" | \"firebase\")",
completion: .list(["matotmo", "firebase"])
)
var target: String
@Option(
help: "Where to generate the analytics manager (path with filename)",
transform: { $0.replaceTiltWithHomeDirectoryPath() }
)
var outputFile: String
@Option(help: "Tell if it will generate static properties or not")
var staticMembers: Bool = false
@Option(
name: .customLong("visibility"),
help: "Visibility of extension and properties. Possibles values: public, private, package, internal. Default is internal",
completion: .list(["public", "private", "package", "internal"])
)
var extensionVisibility: ExtensionVisibility = .internal
@Option(
help: "Suffix to add to every path parameters. Default is 'iOS'."
)
var pathSuffix: String = "iOS"
}