From 86a344fa9f9971d4bdb73b6dcd72a8f3089390f5 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Thu, 26 Dec 2024 07:58:01 -0500 Subject: [PATCH] feat: Removes old configuration merging file from cli-client. --- .../Internal/Configuration+merging.swift | 82 ------------------- 1 file changed, 82 deletions(-) delete mode 100644 Sources/CliClient/Internal/Configuration+merging.swift diff --git a/Sources/CliClient/Internal/Configuration+merging.swift b/Sources/CliClient/Internal/Configuration+merging.swift deleted file mode 100644 index 21a1adf..0000000 --- a/Sources/CliClient/Internal/Configuration+merging.swift +++ /dev/null @@ -1,82 +0,0 @@ -// import ConfigurationClient -// import Dependencies -// import FileClient -// import Foundation -// -// extension Configuration { -// -// func mergingTarget(_ otherTarget: Configuration.Target?) -> Self { -// .init( -// target: otherTarget ?? target, -// strategy: strategy -// ) -// } -// -// func mergingStrategy(_ otherStrategy: Configuration.VersionStrategy?) -> Self { -// .init( -// target: target, -// strategy: strategy?.merging(otherStrategy) -// ) -// } -// } -// -// extension Configuration.PreRelease { -// func merging(_ other: Self?) -> Self { -// .init( -// prefix: other?.prefix ?? prefix, -// strategy: other?.strategy ?? strategy -// ) -// } -// } -// -// extension Configuration.Branch { -// func merging(_ other: Self?) -> Self { -// return .init(includeCommitSha: other?.includeCommitSha ?? includeCommitSha) -// } -// } -// -// extension Configuration.SemVar { -// // TODO: Merge strategy ?? -// func merging(_ other: Self?) -> Self { -// .init( -// allowPreRelease: other?.allowPreRelease ?? allowPreRelease, -// preRelease: preRelease?.merging(other?.preRelease), -// requireExistingFile: other?.requireExistingFile ?? requireExistingFile, -// requireExistingSemVar: other?.requireExistingSemVar ?? requireExistingSemVar, -// strategy: other?.strategy ?? strategy -// ) -// } -// } -// -// extension Configuration.VersionStrategy { -// func merging(_ other: Self?) -> Self { -// guard let branch else { -// guard let semvar else { return self } -// return .semvar(semvar.merging(other?.semvar)) -// } -// return .branch(branch.merging(other?.branch)) -// } -// } -// -// extension Configuration { -// func merging(_ other: Self?) -> Self { -// var output = self -// output = output.mergingTarget(other?.target) -// output = output.mergingStrategy(other?.strategy) -// return output -// } -// } -// -// @discardableResult -// func withConfiguration( -// path: String?, -// _ operation: (Configuration) async throws -> T -// ) async throws -> T { -// @Dependency(\.configurationClient) var configurationClient -// -// let configuration = try await configurationClient.findAndLoad( -// path != nil ? URL(filePath: path!) : nil -// ) -// -// return try await operation(configuration) -// }