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/
13
13
RUN npx webpack --config webpack.prod.js
14
14
15
15
16
- FROM swift:5.10-focal as swift
16
+ FROM swift:6.1-jammy as swift
17
17
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
18
18
&& apt-get -q update \
19
19
&& apt-get -q dist-upgrade -y\
@@ -40,7 +40,7 @@ RUN [ -d /build/Public ] && { mv /build/Public ./Public && chmod -R a-w ./Public
40
40
RUN [ -d /build/Resources ] && { mv /build/Resources ./Resources && chmod -R a-w ./Resources; } || true
41
41
42
42
43
- FROM swift:5.10-focal -slim
43
+ FROM swift:6.1-jammy -slim
44
44
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
45
45
&& apt-get -q update \
46
46
&& apt-get -q dist-upgrade -y \
Original file line number Diff line number Diff line change 1
1
"use strict" ;
2
2
3
- import Plausible from "plausible-tracker" ;
4
-
5
- const { enableAutoPageviews } = Plausible ( {
6
- domain : "swift-format.com" ,
7
- } ) ;
8
- enableAutoPageviews ( ) ;
9
-
10
3
import "./scss/default.scss" ;
11
4
12
5
import "codemirror/lib/codemirror.css" ;
Original file line number Diff line number Diff line change 1
1
import 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
- }
22
2
23
3
@main
24
4
enum Entrypoint {
25
5
static func main( ) async throws {
26
6
var env = try Environment . detect ( )
27
7
try LoggingSystem . bootstrap ( from: & env)
28
8
29
- let app = Application ( env)
30
- defer { app. shutdown ( ) }
9
+ let app = try await Application . make ( env)
31
10
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 ( )
34
20
}
35
21
}
You can’t perform that action at this time.
0 commit comments