Make the secrets optional. (#3966)

This commit is contained in:
Doug
2025-04-01 16:14:05 +01:00
committed by GitHub
parent 620616da63
commit 6a8f35db9c
8 changed files with 32 additions and 36 deletions
+12 -6
View File
@@ -7,11 +7,17 @@
// Analytics and Diagnostics
sentryDSN = read("env:SENTRY_DSN")
postHogHost = read("env:POSTHOG_HOST")
postHogAPIKey = read("env:POSTHOG_API_KEY")
rageshakeServerURL = read("env:RAGESHAKE_SERVER_URL")
import "package://pkg.pkl-lang.org/github.com/element-hq/pkl-tools/staticcode@1.0.0#/StaticCode.pkl"
// Maps
sentryDSN: String? = read?("env:SENTRY_DSN")
postHogHost: String? = read?("env:POSTHOG_HOST")
postHogAPIKey: String? = read?("env:POSTHOG_API_KEY")
rageshakeServerURL: String? = read?("env:RAGESHAKE_SERVER_URL")
mapLibreAPIKey: String? = read?("env:MAPLIBRE_API_KEY")
mapLibreAPIKey = read("env:MAPLIBRE_API_KEY")
output {
renderer = new StaticCode.Renderer {
language = "Swift"
objectName = "Secrets"
}
}
+7 -18
View File
@@ -1,19 +1,8 @@
// swiftlint:disable all
// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen
enum Secrets {
static let sentryDSN: String? = "https://sentry.localhost"
static let postHogHost: String? = "https://posthog.localhost"
static let postHogAPIKey: String? = "your_key"
static let rageshakeServerURL: String? = "https://rageshake.localhost"
static let mapLibreAPIKey: String? = "your_key"
import Foundation
// swiftlint:disable superfluous_disable_command
// swiftlint:disable file_length
// MARK: - YAML Files
// swiftlint:disable identifier_name line_length number_separator type_body_length
internal enum Secrets {
internal static let mapLibreAPIKey: String = "your_key"
internal static let postHogAPIKey: String = "your_key"
internal static let postHogHost: String = "https://posthog.localhost"
internal static let rageshakeServerURL: String = "https://rageshake.localhost"
internal static let sentryDSN: String = "https://sentry.localhost"
}
// swiftlint:enable identifier_name line_length number_separator type_body_length
}