Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ let package = Package(
.package(url: "https://github.com/SwiftPackageIndex/SemanticVersion.git", from: "0.3.0"),
.package(url: "https://github.com/SwiftPackageIndex/ShellOut.git", from: "3.1.4"),
.package(url: "https://github.com/swiftlang/swift-package-manager.git", branch: "release/5.10"),
.package(url: "https://github.com/dankinsoid/VaporToOpenAPI.git", from: "4.4.4"),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VaporToOpenAPI is not thread-safe. It causes crashes when running tests in parallel. Rather than create openapi.json dynamically on the fly from the routes, we should switch to using the swift-openapi-generator.

Since the OpenAPI spec isn't a critical piece I've simply removed it for now.

.package(url: "https://github.com/pointfreeco/swift-custom-dump.git", from: "1.0.0"),
.package(url: "https://github.com/pointfreeco/swift-dependencies", from: "1.8.0"),
.package(url: "https://github.com/pointfreeco/swift-parsing.git", from: "0.12.0"),
Expand Down Expand Up @@ -75,7 +74,6 @@ let package = Package(
.product(name: "SwiftPMDataModel-auto", package: "swift-package-manager"),
.product(name: "SwiftPMPackageCollections", package: "swift-package-manager"),
.product(name: "Vapor", package: "vapor"),
.product(name: "VaporToOpenAPI", package: "VaporToOpenAPI"),
.product(name: "SotoCognitoAuthentication", package: "soto-cognito-authentication")
],
swiftSettings: swiftSettings,
Expand Down
296 changes: 0 additions & 296 deletions Sources/App/Controllers/API/Types+WithExample.swift

This file was deleted.

7 changes: 4 additions & 3 deletions Sources/App/Core/AppMetrics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@
import Dependencies
import Metrics
import Prometheus
import Synchronization
import Vapor


enum AppMetrics {

nonisolated(unsafe) static var initialized = false
static let initialized = Mutex(false)

static func bootstrap() {
// prevent tests from boostrapping multiple times
guard !initialized else { return }
defer { initialized = true }
guard !initialized.withLock({ $0 }) else { return }
defer { initialized.withLock{ $0 = true } }
let client = PrometheusClient()
MetricsSystem.bootstrap(PrometheusMetricsFactory(client: client))
}
Expand Down
13 changes: 0 additions & 13 deletions Sources/App/Core/Authentication/User.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import Authentication
import Dependencies
import JWTKit
import Vapor
import VaporToOpenAPI


struct User: Authenticatable, Equatable {
Expand Down Expand Up @@ -67,15 +66,3 @@ extension User {
}
}
}


extension AuthSchemeObject {
static var apiBearerToken: Self {
.bearer(id: "api_token",
description: "Token used for API access.")
}
static var builderBearerToken: Self {
.bearer(id: "builder_token",
description: "Token used for build result reporting.")
}
}
Loading
Loading