Renamed the "archivesFolder" property for the AppBuilder builder in the library target as "folderArchives".
This commit is contained in:
parent
fa50c77421
commit
08d296ef1a
@ -11,10 +11,7 @@ struct App: AsyncParsableCommand {
|
||||
// MARK: Functions
|
||||
|
||||
mutating func run() async throws {
|
||||
let appBuilder = AppBuilder(
|
||||
appName: "Doxy",
|
||||
archivesFolder: "Resources/Archives"
|
||||
)
|
||||
let appBuilder = AppBuilder(appName: "Doxy")
|
||||
|
||||
let app = try await appBuilder(options)
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user