feat: Updates configuration, uses json for configuration files and drops toml support.

This commit is contained in:
2024-12-24 09:02:38 -05:00
parent 7d23172c71
commit f2a2374c4f
14 changed files with 127 additions and 395 deletions

View File

@@ -1,7 +1,6 @@
import Dependencies
import DependenciesMacros
import Foundation
import TOMLKit
public extension DependencyValues {
var coders: Coders {
@@ -14,17 +13,13 @@ public extension DependencyValues {
public struct Coders: Sendable {
public var jsonDecoder: @Sendable () -> JSONDecoder = { .init() }
public var jsonEncoder: @Sendable () -> JSONEncoder = { .init() }
public var tomlDecoder: @Sendable () -> TOMLDecoder = { .init() }
public var tomlEncoder: @Sendable () -> TOMLEncoder = { .init() }
}
extension Coders: DependencyKey {
public static var testValue: Coders {
.init(
jsonDecoder: { .init() },
jsonEncoder: { defaultJsonEncoder },
tomlDecoder: { .init() },
tomlEncoder: { .init() }
jsonEncoder: { defaultJsonEncoder }
)
}