Files
resgen.swift/Sources/ResgenSwift/Analytics/AnalyticsOptions.swift
Thibaut Schmitt 5ad219ae89
All checks were successful
gitea-openium/resgen.swift/pipeline/head This commit looks good
feat(RES-57): Add visibility to control scope of generated code (#18)
Add visibility parameter: public, package, internal, private
Impacted command: analytics, colors, fonts, images, strings, tags

Reviewed-on: #18
2025-07-21 16:56:05 +02:00

48 lines
1.3 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
}