From 57a8f4f2543cf4d5243caff318c929d4876d429e Mon Sep 17 00:00:00 2001 From: Yurii Samsoniuk Date: Sat, 14 Oct 2023 14:26:26 +0200 Subject: [PATCH] Removed an explicit `LingueeOnAlfred` executable target (#46) --- Package.swift | 6 +----- Sources/LingueeOnAlfred/Runner.swift | 8 -------- Sources/LingueeSearchWorkflow/LingueeSearchWorkflow.swift | 1 + 3 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 Sources/LingueeOnAlfred/Runner.swift diff --git a/Package.swift b/Package.swift index f69e301..7ff5108 100644 --- a/Package.swift +++ b/Package.swift @@ -9,7 +9,7 @@ let package = Package( .macOS(.v10_15) ], products: [ - .executable(name: "LingueeOnAlfred", targets: ["LingueeOnAlfred"]) + .executable(name: "LingueeOnAlfred", targets: ["LingueeSearchWorkflow"]) ], dependencies: [ .package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"), @@ -17,10 +17,6 @@ let package = Package( ], targets: [ .executableTarget( - name: "LingueeOnAlfred", - dependencies: ["LingueeSearchWorkflow"]), - - .target( name: "LingueeSearchWorkflow", dependencies: [ "Alfred", diff --git a/Sources/LingueeOnAlfred/Runner.swift b/Sources/LingueeOnAlfred/Runner.swift deleted file mode 100644 index c93d8a8..0000000 --- a/Sources/LingueeOnAlfred/Runner.swift +++ /dev/null @@ -1,8 +0,0 @@ -import LingueeSearchWorkflow - -@main -class Runner { - public static func main() async throws { - try await LingueeSearchWorkflow.main() - } -} diff --git a/Sources/LingueeSearchWorkflow/LingueeSearchWorkflow.swift b/Sources/LingueeSearchWorkflow/LingueeSearchWorkflow.swift index 0045f57..28911e0 100644 --- a/Sources/LingueeSearchWorkflow/LingueeSearchWorkflow.swift +++ b/Sources/LingueeSearchWorkflow/LingueeSearchWorkflow.swift @@ -11,6 +11,7 @@ fileprivate let kFiveMituneSeconds = 5 * kMinuteSeconds /// The new release caching period. fileprivate let kReleaseCacheExpirationInterval = kMinuteSeconds * 60 * 24 * 3 // 3 days +@main public class LingueeSearchWorkflow { private static let logger = Logger( label: "\(LingueeSearchWorkflow.self)", factory: StreamLogHandler.standardError(label:))