// SPDX-FileCopyrightText: 2025 The Project Pterodactyl Developers // // SPDX-License-Identifier: MPL-2.0 import Foundation import llbuild2fx extension Keys.Blob { public struct ReadContents: BuildKey { let blobId: LLBDataID public init(blobId: LLBDataID) { self.blobId = blobId } public typealias ValueType = String public static let versionDependencies: [any FXVersioning.Type] = [] public func computeValue(_ ctx: BuildContext) async throws -> String { let contents = try await ctx.load(blobId) return try await String(decoding: Data(ctx.read(blob: contents.blob!)), as: UTF8.self) } } }