We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f3bb6e1 + d77a9dd commit 7396decCopy full SHA for 7396dec
Sources/SPIManifest/Manifest.swift
@@ -135,7 +135,7 @@ public struct Manifest: Codable, Equatable {
135
136
extension Manifest {
137
public static let fileName = ".spi.yml"
138
- public static let maxByteSize = 1_000
+ public static let maxByteSize = 1_500
139
140
public static func load(in directory: String = ".", maxByteSize: Int = Self.maxByteSize) -> Self? {
141
let path = directory.hasSuffix("/")
@@ -154,6 +154,11 @@ extension Manifest {
154
throw ManifestError.noData
155
}
156
157
+ return try load(data: data)
158
+ }
159
+
160
+ @discardableResult
161
+ public static func load(data: Data, maxByteSize: Int = maxByteSize) throws -> Self {
162
guard data.count <= maxByteSize else {
163
throw ManifestError.fileTooLarge(size: data.count)
164
0 commit comments