at main 679 B view raw
1// SPDX-FileCopyrightText: 2025 The Project Pterodactyl Developers 2// 3// SPDX-License-Identifier: MPL-2.0 4 5import Foundation 6import PterodactylSyntax 7import llbuild2fx 8 9extension Keys.Blob { 10 public struct GetLineMap: BuildKey { 11 public let blobId: LLBDataID 12 public init(blobId: LLBDataID) { 13 self.blobId = blobId 14 } 15 16 public typealias ValueType = PterodactylSyntax.LineMap 17 18 public static let versionDependencies: [any FXVersioning.Type] = [ReadContents.self] 19 20 public func computeValue(_ ctx: BuildContext<Self>) async throws -> ValueType { 21 let code = try await ctx.request(ReadContents(blobId: blobId)) 22 return PterodactylSyntax.LineMap(source: code) 23 } 24 } 25}