Files
resgen.swift/Sources/ResgenSwift/Analytics/AnalyticsOptions.swift
Thibaut Schmitt 7162f13166
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
Add visibility parameters to control scope of generated extension
2025-07-18 11:53:46 +02:00

50 lines
1.3 KiB
Swift

//
// AnalyticsOptions.swift
//
//
// Created by Loris Perret on 08/12/2023.
//
import ArgumentParser
import Foundation
import ToolCore
// swiftlint:disable no_grouping_extension
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
}