Renamed the "archivesFolder" property for the AppBuilder builder in the library target as "folderArchives".

This commit is contained in:
2025-03-12 00:37:31 +01:00
parent fa50c77421
commit 08d296ef1a
2 changed files with 8 additions and 11 deletions
@@ -7,7 +7,7 @@ public struct AppBuilder {
// MARK: Properties
private let appName: String
private let archivesFolder: String
private let folderArchives: String
private let environment: Environment
// MARK: Initialisers
@@ -15,13 +15,13 @@ public struct AppBuilder {
/// Initialises this type.
/// - Parameters:
/// - appName: A name for the app to build.
/// - archivesFolder: A relative path to the location of the *DocC* archive containers.
/// - folderArchives: A relative path to the location of the *DocC* archive containers.
public init(
appName: String,
archivesFolder: String
folderArchives: String = "Resources/Archives"
) {
self.appName = appName
self.archivesFolder = archivesFolder
self.folderArchives = folderArchives
self.environment = Environment()
}
@@ -30,7 +30,7 @@ public struct AppBuilder {
/// Sets and builds a ready-to-use application.
///
/// The application this function builds have the following features:
/// * proxy requests to any available *DocC* archive container in the `archivesFolder` location;
/// * proxy requests to any available *DocC* archive container in the `folderArchives` location;
/// * log any request to any available *DocC* archive container in the application console.
///
/// - Parameter arguments: A set in input parameters used while building the application.
@@ -76,10 +76,10 @@ private extension AppBuilder {
router.addMiddleware {
LogRequestsMiddleware(logger.logLevel)
DocCMiddleware(archivesFolder)
DocCMiddleware(folderArchives)
}
ArchiveController().register(to: router)
ArchiveController(folderArchives).register(to: router)
return router
}