File tree Expand file tree Collapse file tree 5 files changed +501
-429
lines changed Expand file tree Collapse file tree 5 files changed +501
-429
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ COPY Public ./Public/
1313RUN npx webpack --config webpack.prod.js
1414
1515
16- FROM swift:5.10-focal as swift
16+ FROM swift:6.1-jammy as swift
1717RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
1818 && apt-get -q update \
1919 && apt-get -q dist-upgrade -y\
@@ -40,7 +40,7 @@ RUN [ -d /build/Public ] && { mv /build/Public ./Public && chmod -R a-w ./Public
4040RUN [ -d /build/Resources ] && { mv /build/Resources ./Resources && chmod -R a-w ./Resources; } || true
4141
4242
43- FROM swift:5.10-focal -slim
43+ FROM swift:6.1-jammy -slim
4444RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
4545 && apt-get -q update \
4646 && apt-get -q dist-upgrade -y \
Original file line number Diff line number Diff line change 11"use strict" ;
22
3- import Plausible from "plausible-tracker" ;
4-
5- const { enableAutoPageviews } = Plausible ( {
6- domain : "swift-format.com" ,
7- } ) ;
8- enableAutoPageviews ( ) ;
9-
103import "./scss/default.scss" ;
114
125import "codemirror/lib/codemirror.css" ;
Original file line number Diff line number Diff line change 11import Vapor
2- import Dispatch
3- import Logging
4-
5- /// This extension is temporary and can be removed once Vapor gets this support.
6- private extension Vapor . Application {
7- static let baseExecutionQueue = DispatchQueue ( label: " vapor.codes.entrypoint " )
8-
9- func runFromAsyncMainEntrypoint( ) async throws {
10- try await withCheckedThrowingContinuation { continuation in
11- Vapor . Application. baseExecutionQueue. async { [ self ] in
12- do {
13- try self . run ( )
14- continuation. resume ( )
15- } catch {
16- continuation. resume ( throwing: error)
17- }
18- }
19- }
20- }
21- }
222
233@main
244enum Entrypoint {
255 static func main( ) async throws {
266 var env = try Environment . detect ( )
277 try LoggingSystem . bootstrap ( from: & env)
288
29- let app = Application ( env)
30- defer { app. shutdown ( ) }
9+ let app = try await Application . make ( env)
3110
32- try await configure ( app)
33- try await app. runFromAsyncMainEntrypoint ( )
11+ do {
12+ try await configure ( app)
13+ try await app. execute ( )
14+ } catch {
15+ app. logger. report ( error: error)
16+ try ? await app. asyncShutdown ( )
17+ throw error
18+ }
19+ try await app. asyncShutdown ( )
3420 }
3521}
You can’t perform that action at this time.
0 commit comments