this repo has no description
www.jonmsterling.com/01HC/
1// SPDX-FileCopyrightText: 2025 The Project Pterodactyl Developers
2//
3// SPDX-License-Identifier: MPL-2.0
4
5import Foundation
6import llbuild2fx
7import PterodactylSyntax
8
9extension Keys.Blob {
10 struct ParseImports: BuildKey {
11 let blobId: LLBDataID
12
13 typealias ValueType = [UnitName]
14
15 static let versionDependencies: [any FXVersioning.Type] = [ReadContents.self]
16
17 func computeValue(_ ctx: BuildContext<Self>) async throws -> [UnitName] {
18 let code = try await ctx.request(ReadContents(blobId: blobId))
19 var importParser = ImportParser(input: code)
20 importParser.parseHeader()
21
22 return importParser.imports.map { name in
23 UnitName(basename: name)
24 }
25 }
26 }
27}
28
29
30
31