Latest Vapor SDKs
vapor
v4.55.3š§ A server-side Swift HTTP web framework.
VaporBot
4.55.3Update Server Configuration after start
This patch was authored and released by @0xTim.
This ensures that the
Application
's configuration is updated correctly when the server starts. This allows you to retrieve correct hostname and ports from theApplication
.Resolves #2755
fluent
v4.4.0Vapor ORM (queries, models, and relations) for NoSQL and SQL databases
VaporBot
4.4.0Add support for async/await
This patch was authored and released by @0xTim.
Adds initial support for async/await
redis
v4.6.0Vapor provider for RediStack
VaporBot
4.6.0Allow customizing encoding and decoding of RedisCache values
This patch was authored and released by @gwynne.
It is now possible to specify a custom
Encoder
andDecoder
to use in place ofJSONEncoder
andJSONDecoder
for storing and retrieving values cached in Redis via theCache
interface.fluent-mysql-driver
v4.0.2šš¬ Swift ORM (queries, models, relations, etc) built on MySQL.
VaporBot
4.0.2Improved error reporting via `DatabaseError`
This patch was authored and released by @gwynne.
DatabaseError
'sisSyntaxError
andisConnectionClosed
properties now correctly respectMySQLError.invalidSyntax
andMySQLError.closed
errors. A unit tests for these behaviors is included.Also avoids double-running the FluentBenchmark tests (same change as fluent-sqlite-driver#75).
mysql-kit
v4.5.0š¬ Pure Swift MySQL client built on non-blocking, event-driven sockets.
VaporBot
4.5.0Fix SwiftCrypto version pin
This patch was authored and released by @gwynne.
This solves users of Fluent's MySQL driver getting silently stuck on version 1.1.6 of
swift-crypto
(the current, source-compatible version is 2.0.3).It would be far preferable to replace the usage of
Insecure.SHA1
inMySQLDialect
with something better suited to the purpose and thus drop the Crypto dependency in MySQLKit altogether, but we can't do that without breaking migrations in existing databases.Due to the change in dependency version requirement, this is
semver-minor
.console-kit
v4.2.7š» APIs for creating interactive CLI tools.
VaporBot
4.2.7[android] support `Android` platform.
This patch was authored by @Guang1234567 and released by @gwynne.
Hello dev:
Just support android, thanks.
Usage:
#!/usr/bin/env bash export ANDROID_HOME=$HOME/dev_kit/sdk/android_sdk export ANDROID_SDK=$ANDROID_HOME export ANDROID_SDK_ROOT=$ANDROID_HOME export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/21.4.7075529 export ANDROID_NDK=$ANDROID_NDK_HOME export NDK_ROOT=$ANDROID_NDK_HOME export ANDROID_NDK_ROOT=$ANDROID_NDK_HOME export ANDROID_NDK_PATH=$ANDROID_NDK_HOME export NDK_TOOLCHAINS=$HOME/dev_kit/sdk/toolchain-wrapper ALL_IN_ONE_FOLDER=$(dirname $(pwd)) export SWIFT_ANDROID_HOME=$ALL_IN_ONE_FOLDER/swift-android-5.4.2-release-ndk21 export SWIFT_ANDROID_ARCH=aarch64 #export SWIFT_ANDROID_ARCH=armv7 #export SWIFT_ANDROID_ARCH=x86_64 export SWIFT_ANDROID_API=23 cd console-kit #echo -e "\n\n\nRunning on macOS:\n=======================================\n" #swift build #.build/x86_64-apple-macosx/debug/ConsoleKitExample demo --color --frames "ā ,ā ,ā ¹,ā ø,ā ¼,ā “,ā ¦,ā §,ā ,ā " echo -e "\n\n\nRunning on androidOS:\n=======================================\n" ${SWIFT_ANDROID_HOME}/build-tools/1.9.7-swift5.4/swift-build --configuration debug -Xswiftc -DDEBUG -Xswiftc -g echo -e "\n\n\nCopy ELF to real android device :\n_______________________________________\n" adb push .build/aarch64-unknown-linux-android/debug/ConsoleKitExample /data/local/tmp echo -e "\n\n\nCopy swift runtime SO to real android device :\n_______________________________________\n" adb push ${SWIFT_ANDROID_HOME}/toolchain/usr/lib/swift/android/aarch64/*.so /data/local/tmp echo -e "\n\n\nRunning on real android device :\n_______________________________________\n" adb shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/ConsoleKitExample demo --color --frames "ā ,ā ,ā ¹,ā ø,ā ¼,ā “,ā ¦,ā §,ā ,ā " cd ..
http
v3.4.0š Non-blocking, event-driven HTTP built on Swift NIO.
tanner0101
3.4.0SameSite Attribute support none, default = lax
Adds the none attribute to SameSite cookies (#376). This resolves vapor/vapor#375.
ā ļø This contains an additional case in a public enum which may cause a breaking change if you're switching on it
sqlite-kit
v4.1.0Non-blocking SQLite client library with SQL builder built on SwiftNIO
VaporBot
4.1.0Declare supported UNION features
This patch was authored and released by @gwynne.
Leverages the new dialect flags from vapor/sql-kit#144 to enable full
UNION
queries according to SQLite's support.The increased SQLKit version requirement makes this a
semver-minor
change.core
v3.10.1š Utility package containing tools for byte manipulation, Codable, OS APIs, and debugging.
0xTim
3.10.13.10.1
Fix a compilation error when building in Xcode 13
leaf
v4.1.5š An expressive, performant, and extensible templating language built for Swift.
VaporBot
4.1.5Add experimental support for iOS
This patch was authored by @BeauNouvelle and released by @0xTim.
This change allows Leaf to be used within iOS environments. Without it we get the following error:
The package product 'Vapor' requires minimum platform version 13.0 for the iOS platform, but this target supports 9.0
jwt
v4.1.0Vapor JWT provider
VaporBot
4.1.0Add support for `async`/`await`
This patch was authored and released by @0xTim.
Adds
async
APIs for JWT calls when interacting with JWKS serversrouting-kit
v4.3.1š High-performance trie-node router.
VaporBot
4.3.1Clarify "same route with different parameter names" error message
This patch was authored and released by @gwynne.
An attempt to improve the error message for this unusual case.
Also ensures the error appears in release builds.
multipart-kit
v4.5.1š Parses and serializes multipart-encoded data with Codable support.
VaporBot
4.5.1Remove platform requirements
This patch was authored and released by @0xTim.
Remove the platform requirements as they're not needed and it allows MultipartKit to be used on more platforms.
Resolves #77
auth
v2.0.4š¤ Authentication and Authorization framework for Fluent.
tanner0101
2.0.4Auth 2.0.4
Fixed:
- Session authentication middleware now correctly short-circuits if authentication already succeeded (#68, #69)
database-kit
v1.3.3š Core services for creating database integrations.
tanner0101
1.3.3template-kit
v1.5.0š Easy-to-use foundation for building powerful templating languages in Swift.
tanner0101
1.5.0Support rendering URLs
This patch was authored and released by @tanner0101.
Adds support for serializing URLs in templates (#38, fixes #64).
postgres-kit
v2.6.0š Non-blocking, event-driven Swift client for PostgreSQL.
VaporBot
2.6.0Improve row decoding performance
This patch was authored and released by @gwynne.
- Leverage new APIs available in PostgresNIO to improve row decoding performance, making up for some speed regressions and then some, especially for queries with lots of result fields.
- Minor improvements to connection handling, also partially courtesy of improved APIs in PostgresNIO.
Note: No new APIs, but marked semver-minor due to requiring an updated minor release of
postgres-nio
.fluent-postgres-driver
v2.2.6š PostgreSQL driver for Fluent.
VaporBot
2.2.6Clean up row decoding
This patch was authored and released by @gwynne.
Instead of duplicating logic implemented by
postgres-kit
for row decoding - and incorrectly, at that - we now always call through to that logic. Despite the additional indirection through theSQLRow
existential, this should yield a minor improvement in performance, as we perform fewer unnecessary checks and retain fewer copies of data.Note: Depends on vapor/postgres-kit#221 to receive the full benefit of these changes.
fluent-sqlite-driver
v4.1.0Fluent driver for SQLite
VaporBot
4.1.0Add configurable connection pool timeout
This patch was authored by @madsodgaard and released by @0xTim.
Adds option to configure the connection pool timeout (#74)
databases.use(.sqlite(.memory, connectionPoolTimeout: .minutes(1)), as: .sqlite)
websocket-kit
v2.3.1WebSocket client library built on SwiftNIO
VaporBot
2.3.1Remove content length header on initial handshake
This patch was authored by @GNMoseke and released by @0xTim.
This removes the
content-length: 0
header being automatically applied to outgoing websocket handshakes.As per RFC 7230 Section 3.3.2:
A user agent SHOULD NOT send a Content-Length header field when the request message does not contain a payload body and the method semantics do not anticipate such a body.
This was causing issues with certain cloud providers, most notably Google Cloud Run, that would force close the websocket as soon as data was received from a client.
sql-kit
v3.16.0*ļøā£ Build SQL queries in Swift. Extensible, protocol-based design that supports DQL, DML, and DDL.
VaporBot
3.16.0Fix several issues with UNION query support
This patch was authored and released by @gwynne.
- Fixes
SQLUnionBuilder
lackingSQLQueryFetcher
conformance. - Fixes support for SQLite.
- Adds support for
INTERSECT [DISTINCT|ALL]
andEXCEPT [DISTINCT|ALL]
unions. - Adds documentation for
SQLDialect
and its subtypes. - Improves test infrastructure.
- Fixes
postgres-nio
v1.9.0š Non-blocking, event-driven Swift client for PostgreSQL.
VaporBot
1.9.0PostgresNIO 1.9.0
SemVer Minor
- Allow unescaped SQL in
PostgresQuery
in https://github.com/vapor/postgres-nio/pull/258 - Remove connection state machine log in https://github.com/vapor/postgres-nio/pull/266
- Add EventLoop API that uses
PostgresQuery
in https://github.com/vapor/postgres-nio/pull/265 - Add
contains(_:)
toPostgresRandomAccessRow
in https://github.com/vapor/postgres-nio/pull/270
SemVer Patch
- Use
Int(exactly:)
instead of restricting to 64 bit platforms in https://github.com/vapor/postgres-nio/pull/267 - Continue to make forward progress when cancelled in https://github.com/vapor/postgres-nio/pull/261
Other Changes
- Fix CI test link in README in https://github.com/vapor/postgres-nio/pull/260
- Update CI to 5.6 release and checkout@v3 in https://github.com/vapor/postgres-nio/pull/269
Full Changelog: https://github.com/vapor/postgres-nio/compare/1.8.0...1.9.0
- Allow unescaped SQL in
async-kit
v1.11.1Sugary extensions for the SwiftNIO library
VaporBot
1.11.1Removed file:line: from signature and code in Future+Try.swift
This patch was authored by @rjhancock and released by @gwynne.
removed due to depreciation warnings issued with latest Vapor.
<!-- š Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. -->Removes depreciated parameters
<!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->file:line:
from method signature and calling method.queues
v1.8.1A queue system for Vapor.
VaporBot
1.8.1Make AsyncScheduledJob public so clients can conform to it
This patch was authored by @iKenndac and released by @0xTim.
This PR allows client apps to conform to the previously-added
AsyncScheduledJob
protocol by making it, and the associated adapter function fromScheduledJob
, public.queues-redis-driver
v1.0.3A Redis implementation for https://github.com/vapor/queues
VaporBot
1.0.3Use `context.eventLoop` for executing redis commands
This patch was authored by @Andrewangeta and released by @jdmcd.
Adds full conformance to the
RedisClient
protocol to use the context's eventLoop for commands vs the defaultRedisConnectionPool
sRedisConnection
eventLoop for commands.leaf-kit
v1.5.0VaporBot
1.5.0Fix warning from compiler issue in Swift 5.6
This patch was authored and released by @0xTim.
Resolves a compiler warning introduced in Swift 5.6
Resolves #99
fluent-kit
v1.23.2Swift ORM (queries, models, and relations) for NoSQL and SQL databases
VaporBot
1.23.2Enable looking up database names of multiple model key paths at once
This patch was authored and released by @gwynne.
This loosens the requirement on the value of a
KeyPath
passed toFields.path(for:)
toAnyQueryableProperty
, which has no associated types orSelf
requirements, and can thus be treated as an existential (e.g.any AnyQueryableProperty
). While existentials are best avoided when possible, in this case, the relaxed definition allows usefully operating on the resolved database field names of an arbitrary set of key paths without the use of variadic generics.As this is a very confusing and opaque description of the behavior, here is an example of a helper method which was impossible to write before:
extension SchemaBuilder { func fields<M: FluentKit.Model>(from _: M.Type = M.self, _ keypaths: KeyPath<M, AnyQueryableProperty>...) -> Self { return keypaths.reduce(self) { builder, keypath in // N.B.: Despite the name and array type, `Fields.path(for:)` never returns more than one `FieldKey` in practice. // Implementing `figureOutDataType(for:)` is left as an exercise for the reader. return builder.field(M.path(for: keypath).first!, figureOutDataType(for: keypath)) } } } // Usage would be something like: database.schema(M.schema) .fields(\.$id, \.$foo, \.$bar, \$.baz) .create()
Previously, such a helper could only have taken a single
KeyPath
parameter. This is admittedly a contrived example (and by design very far from a complete "automatic migration" implementation), and it's a fairly small convenience to call.fields(a,b,c,d)
versus.field(a).field(b).field(c).field(d)
, but it's nonetheless useful. The generic constraint should never have been so strict in any event. (And field keys should not be wrapped in arrays all the time, but that's a PR for another day.)Note: While technically the relaxed constraint is a "new" public API, the change is small enough and the difference invisible enough that I've marked this semver-patch; even for me, there's such a thing as being too pedantic about the rules š.
mysql-nio
v1.4.0š¬ Non-blocking, event-driven Swift client for MySQL.
VaporBot
1.4.0Improve error handling
This patch was authored and released by @gwynne.
- "Connection closed" errors are now correctly reported when trying to issue queries on closed connections, instead of throwing various NIO errors.
- Query syntax errors are now explicitly reported.
- Unique constraint violation errors are now more consistently reported.
semver-minor
due to adding a new case onMySQLError
.sqlite-nio
v1.1.0Non-blocking wrapper for libsqlite3-dev using SwiftNIO
tanner0101
1.1.0Improve SQLite Boolean decoding
This patch was authored by @wibed and released by @tanner0101.
Allows for a boolean field to be stored as string.
.field("is_true", .string, .required)
Additionally it is now its separate type, together with the other types, instead of referring to an anonymous int for a return, which makes It cleaner.
Before: If the field type of a presumed boolean is set to string. it results in below error msg
typeMismatch(Swift.Bool, Swift.DecodingError.Context(codingPath: [], debugDescription: "Could not initialize Bool from \"0\".", underlyingError: nil))
jwt-kit
v4.4.0š JSON Web Token signing and verification (HMAC, RSA, ECDSA) using BoringSSL.
VaporBot
4.4.0Expose the curve on ECDSA Keys
This patch was authored by @danramteke and released by @0xTim.
Exposes the
Curve
onECDSAKey
sfluent-mongo-driver
v1.1.0MongoDB support for Fluent built on MongoKittten.
VaporBot
1.1.0Make `FluentMongoError` public
This patch was authored by @MFranceschi6 and released by @0xTim.
Make
FluentMongoError
public so it can be examined by end-users.Fixes #45