File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ public struct Manifest: Codable, Equatable {
135
135
136
136
extension Manifest {
137
137
public static let fileName = " .spi.yml "
138
- public static let maxByteSize = 1_000
138
+ public static let maxByteSize = 1_500
139
139
140
140
public static func load( in directory: String = " . " , maxByteSize: Int = Self . maxByteSize) -> Self ? {
141
141
let path = directory. hasSuffix ( " / " )
@@ -154,6 +154,11 @@ extension Manifest {
154
154
throw ManifestError . noData
155
155
}
156
156
157
+ return try load ( data: data)
158
+ }
159
+
160
+ @discardableResult
161
+ public static func load( data: Data , maxByteSize: Int = maxByteSize) throws -> Self {
157
162
guard data. count <= maxByteSize else {
158
163
throw ManifestError . fileTooLarge ( size: data. count)
159
164
}
You can’t perform that action at this time.
0 commit comments