Skip to content

Commit a9a62ce

Browse files
committed
initial
0 parents  commit a9a62ce

27 files changed

Lines changed: 1887 additions & 0 deletions

.dockerignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.build
2+
.git
3+
.swiftpm
4+
.DS_Store
5+
*.xcworkspace
6+
*.xcodeproj
7+
DerivedData

.github/workflows/deployment.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Deployment
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
- '[0-9]*'
8+
workflow_dispatch:
9+
10+
jobs:
11+
12+
create-docc-and-deploy:
13+
uses: BinaryBirds/github-workflows/.github/workflows/docc_deploy.yml@main
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write

.github/workflows/testing.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Testing
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
10+
api_breakage:
11+
name: Check API breakage
12+
uses: BinaryBirds/github-workflows/.github/workflows/api_breakage.yml@main
13+
14+
swiftlang_checks:
15+
name: Swiftlang Checks
16+
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
17+
with:
18+
license_header_check_project_name: "project"
19+
format_check_enabled : true
20+
broken_symlink_check_enabled : true
21+
unacceptable_language_check_enabled : true
22+
shell_check_enabled : false
23+
docs_check_enabled : false
24+
api_breakage_check_enabled : false
25+
license_header_check_enabled : false
26+
yamllint_check_enabled : false
27+
python_lint_check_enabled : false
28+
29+
bb_checks:
30+
name: BB Checks
31+
uses: BinaryBirds/github-workflows/.github/workflows/extra_soundness.yml@main
32+
with:
33+
local_swift_dependencies_check_enabled : true
34+
run_tests_with_cache_enabled : true
35+
headers_check_enabled : false
36+
docc_warnings_check_enabled : true
37+
run_tests_swift_versions: '["6.1","6.2"]'

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.DS_Store
2+
.build
3+
Packages
4+
*.xcodeproj
5+
xcuserdata
6+
DerivedData
7+
.swiftpm
8+
*.xctestplan

.swift-format

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

.swiftformatignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Package.swift

LICENSE

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

Makefile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
SHELL=/bin/bash
2+
3+
baseUrl = https://raw.githubusercontent.com/BinaryBirds/github-workflows/refs/heads/main/scripts
4+
5+
check: symlinks language deps lint docc-warnings headers package
6+
7+
package:
8+
curl -s $(baseUrl)/check-swift-package.sh | bash
9+
10+
breakage:
11+
curl -s $(baseUrl)/check-api-breakage.sh | bash
12+
13+
symlinks:
14+
curl -s $(baseUrl)/check-broken-symlinks.sh | bash
15+
16+
language:
17+
curl -s $(baseUrl)/check-unacceptable-language.sh | bash
18+
19+
deps:
20+
curl -s $(baseUrl)/check-local-swift-dependencies.sh | bash
21+
22+
lint:
23+
curl -s $(baseUrl)/run-swift-format.sh | bash
24+
25+
format:
26+
curl -s $(baseUrl)/run-swift-format.sh | bash -s -- --fix
27+
28+
docc-local:
29+
curl -s $(baseUrl)/generate-docc.sh | bash -s -- --local
30+
31+
run-docc:
32+
curl -s $(baseUrl)/run-docc-docker.sh | bash
33+
34+
docc-warnings:
35+
curl -s $(baseUrl)/check-docc-warnings.sh | bash
36+
37+
headers:
38+
curl -s $(baseUrl)/check-swift-headers.sh | bash
39+
40+
fix-headers:
41+
curl -s $(baseUrl)/check-swift-headers.sh | bash -s -- --fix
42+
43+
test:
44+
swift test --parallel
45+
46+
docker-test:
47+
docker build -t tests . -f ./docker/tests/Dockerfile && docker run --rm tests
48+

Package.resolved

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// swift-tools-version:6.1
2+
import PackageDescription
3+
4+
// NOTE: https://github.com/swift-server/swift-http-server/blob/main/Package.swift
5+
var defaultSwiftSettings: [SwiftSetting] =
6+
[
7+
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0441-formalize-language-mode-terminology.md
8+
.swiftLanguageMode(.v6),
9+
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0444-member-import-visibility.md
10+
.enableUpcomingFeature("MemberImportVisibility"),
11+
// https://forums.swift.org/t/experimental-support-for-lifetime-dependencies-in-swift-6-2-and-beyond/78638
12+
.enableExperimentalFeature("Lifetimes"),
13+
// https://github.com/swiftlang/swift/pull/65218
14+
.enableExperimentalFeature("AvailabilityMacro=featherHTTP 1.0:macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0"),
15+
]
16+
17+
#if compiler(>=6.2)
18+
defaultSwiftSettings.append(
19+
// https://github.com/swiftlang/swift-evolution/blob/main/proposals/0461-async-function-isolation.md
20+
.enableUpcomingFeature("NonisolatedNonsendingByDefault")
21+
)
22+
#endif
23+
24+
let package = Package(
25+
name: "feather-http",
26+
platforms: [
27+
.macOS(.v15),
28+
.iOS(.v18),
29+
.tvOS(.v18),
30+
.watchOS(.v11),
31+
.visionOS(.v2),
32+
],
33+
products: [
34+
.library(name: "FeatherHTTP", targets: ["FeatherHTTP"]),
35+
],
36+
dependencies: [
37+
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.4.0"),
38+
// [docc-plugin-placeholder]
39+
],
40+
targets: [
41+
.target(
42+
name: "FeatherHTTP",
43+
dependencies: [
44+
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
45+
],
46+
swiftSettings: defaultSwiftSettings
47+
),
48+
49+
.testTarget(
50+
name: "FeatherHTTPTests",
51+
dependencies: [
52+
.target(name: "FeatherHTTP"),
53+
],
54+
swiftSettings: defaultSwiftSettings
55+
),
56+
]
57+
)

0 commit comments

Comments
 (0)