Skip to content

Commit 196ea29

Browse files
authored
Merge pull request #58 from fpseverino/update
Update package
2 parents 66cde42 + 169f71f commit 196ea29

33 files changed

Lines changed: 681 additions & 458 deletions

.env.testing

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
API_KEY=test-api-key

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: test
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.ref }}
4+
cancel-in-progress: true
5+
on:
6+
pull_request: { types: [opened, reopened, synchronize, ready_for_review] }
7+
push: { branches: [ main ] }
8+
permissions:
9+
contents: read
10+
jobs:
11+
unit-tests:
12+
uses: vapor/ci/.github/workflows/run-unit-tests.yml@main
13+
with:
14+
with_linting: true
15+
secrets:
16+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.spi.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
version: 1
2+
builder:
3+
configs:
4+
- documentation_targets: [Mailgun]

.swift-format

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"fileScopedDeclarationPrivacy": {
3+
"accessLevel": "private"
4+
},
5+
"indentation": {
6+
"spaces": 4
7+
},
8+
"indentConditionalCompilationBlocks": false,
9+
"indentSwitchCaseLabels": false,
10+
"lineBreakAroundMultilineExpressionChainComponents": false,
11+
"lineBreakBeforeControlFlowKeywords": false,
12+
"lineBreakBeforeEachArgument": false,
13+
"lineBreakBeforeEachGenericRequirement": false,
14+
"lineLength": 140,
15+
"maximumBlankLines": 1,
16+
"multiElementCollectionTrailingCommas": true,
17+
"noAssignmentInExpressions": {
18+
"allowedFunctions": [
19+
"XCTAssertNoThrow"
20+
]
21+
},
22+
"prioritizeKeepingFunctionOutputTogether": false,
23+
"respectsExistingLineBreaks": true,
24+
"rules": {
25+
"AllPublicDeclarationsHaveDocumentation": false,
26+
"AlwaysUseLiteralForEmptyCollectionInit": false,
27+
"AlwaysUseLowerCamelCase": true,
28+
"AmbiguousTrailingClosureOverload": true,
29+
"BeginDocumentationCommentWithOneLineSummary": false,
30+
"DoNotUseSemicolons": true,
31+
"DontRepeatTypeInStaticProperties": true,
32+
"FileScopedDeclarationPrivacy": true,
33+
"FullyIndirectEnum": true,
34+
"GroupNumericLiterals": true,
35+
"IdentifiersMustBeASCII": true,
36+
"NeverForceUnwrap": false,
37+
"NeverUseForceTry": false,
38+
"NeverUseImplicitlyUnwrappedOptionals": false,
39+
"NoAccessLevelOnExtensionDeclaration": true,
40+
"NoAssignmentInExpressions": true,
41+
"NoBlockComments": true,
42+
"NoCasesWithOnlyFallthrough": true,
43+
"NoEmptyTrailingClosureParentheses": true,
44+
"NoLabelsInCasePatterns": true,
45+
"NoLeadingUnderscores": false,
46+
"NoParensAroundConditions": true,
47+
"NoPlaygroundLiterals": true,
48+
"NoVoidReturnOnFunctionSignature": true,
49+
"OmitExplicitReturns": false,
50+
"OneCasePerLine": true,
51+
"OneVariableDeclarationPerLine": true,
52+
"OnlyOneTrailingClosureArgument": true,
53+
"OrderedImports": true,
54+
"ReplaceForEachWithForLoop": true,
55+
"ReturnVoidInsteadOfEmptyTuple": true,
56+
"TypeNamesShouldBeCapitalized": true,
57+
"UseEarlyExits": false,
58+
"UseExplicitNilCheckInConditions": true,
59+
"UseLetInEveryBoundCaseVariable": true,
60+
"UseShorthandTypeNames": true,
61+
"UseSingleLinePropertyGetter": true,
62+
"UseSynthesizedInitializer": true,
63+
"UseTripleSlashForDocumentationComments": true,
64+
"UseWhereClausesInForLoops": false,
65+
"ValidateDocumentationComments": false
66+
},
67+
"spacesAroundRangeFormationOperators": false,
68+
"tabWidth": 8,
69+
"version": 1
70+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Vapor Community
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Package.swift

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,46 @@
1-
// swift-tools-version:5.2
2-
// The swift-tools-version declares the minimum version of Swift required to build this package.
3-
1+
// swift-tools-version:6.1
42
import PackageDescription
53

64
let package = Package(
75
name: "mailgun",
86
platforms: [
9-
.macOS(.v10_15)
7+
.macOS(.v15)
108
],
119
products: [
12-
// Products define the executables and libraries produced by a package, and make them visible to other packages.
13-
.library(
14-
name: "Mailgun",
15-
targets: ["Mailgun"]),
10+
.library(name: "Mailgun", targets: ["Mailgun"])
1611
],
1712
dependencies: [
18-
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0")
13+
.package(url: "https://github.com/vapor/vapor.git", from: "4.117.0"),
14+
.package(url: "https://github.com/apple/swift-configuration.git", from: "0.1.1"),
1915
],
2016
targets: [
21-
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
22-
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
2317
.target(
2418
name: "Mailgun",
2519
dependencies: [
2620
.product(name: "Vapor", package: "vapor"),
27-
]),
21+
.product(name: "Configuration", package: "swift-configuration"),
22+
],
23+
swiftSettings: swiftSettings
24+
),
2825
.testTarget(
2926
name: "MailgunTests",
3027
dependencies: [
3128
.target(name: "Mailgun"),
32-
]),
29+
.product(name: "VaporTesting", package: "vapor"),
30+
.product(name: "Configuration", package: "swift-configuration"),
31+
],
32+
swiftSettings: swiftSettings
33+
),
3334
]
3435
)
36+
37+
var swiftSettings: [SwiftSetting] {
38+
[
39+
.enableUpcomingFeature("ExistentialAny"),
40+
.enableUpcomingFeature("InternalImportsByDefault"),
41+
.enableUpcomingFeature("MemberImportVisibility"),
42+
.enableUpcomingFeature("InferIsolatedConformances"),
43+
//.enableUpcomingFeature("NonisolatedNonsendingByDefault"),
44+
.enableUpcomingFeature("ImmutableWeakCaptures"),
45+
]
46+
}

0 commit comments

Comments
 (0)