Swiftpack.co - Swift Packages by vapor

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

Packages published by vapor

vapor/vapor 4.77.0
πŸ’§ A server-side Swift HTTP web framework.
⭐️ 22,876
πŸ•“ 4 days ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Add `ContentContainer.decode(_:as:)`
5 days ago
###### _This patch was authored by @MahdiBM and released by @0xTim._ Adds `ContentContainer.decode(_:as:)` to compliment `ContentContainer.encode(_:as:)` to make it easy to override the `Content-Type` if calling an API or decoding a request that returns erroneous headers for the body type.
Fixed drain handler call order in case of asynchronous buffer handling
5 days ago
###### _This patch was authored by @salpieiev and released by @0xTim._ During request body drain each chunk of data may be handled asynchronously. This may lead to a call of handler with `.end` parameter before previous call with `.buffer(buffer)` finished it's execution. For example: 1. Open new file descriptor 2. During `.collected` stage write ByteBuffer on disc using this file descriptor 3. During `.end` stage close file descriptor This fix ensures that file descriptor won't be closed until disc write completes
Don't use UnsafeRawBufferPointer.withMemoryRebound(to:_:) before Swift 5.7.2
1 week ago
###### _This patch was authored and released by @gwynne._ This API did not exist yet in Swift 5.7.0. It will now only be called in 5.7.2 or later. (This being said, those still using Xcode 14.0.x - the only known affected version - should upgrade to 14.2 (if still running Monterey) or 14.3 (if running Ventura).)
Fix `Range: bytes=0-0` header not working properly
2 weeks ago
###### _This patch was authored by @ptoffy and released by @0xTim._ This aims to fix the bug found in https://discord.com/channels/431917998102675485/519613337638797315/1104341522473812039, which returned a `Bad Response` rather then returning the first byte of the requested content when the `Range: bytes=0-0` request header was used
Improved error logging
2 weeks ago
###### _This patch was authored and released by @gwynne._ Some kinds of errors provide additional "debug" information, which can give much more detail than the "plain" description of the error. In many cases this debug info can contain sensitive data, such as specifics about a database schema, so Vapor only uses the plain description when sending errors to clients (and in release environments, _all_ details are suppressed). To date, the plain description has also been used for logging errors. This can make it very difficult for developers to figure out what's going wrong with their code if the error in question only provides meaningful information in its debug data - for example, the PostgreSQL database driver implementation does this rather than relying on a higher-level layer like Vapor to obfuscate potentially sensitive information. This PR changes the logging of errors to include the debug information (and _only_ the logging; the responses sent to clients are unchanged).
Update Minimum Swift Version to 5.6
7 weeks ago
###### _This patch was authored and released by @0xTim._ Inline with the Swift version support and NIO's supported version, this sets the minimum supported Swift version to 5.6 now that Swift 5.8 is released. This is also the first step in adopting `Sendable` properly across Vapor
Fix crash when collecting the body
7 weeks ago
###### _This patch was authored and released by @0xTim._ Fixes an issue where users may experience a crash when collecting the body in async routes due to pre-concurrency assumptions made by Vapor. Resolves #2990
Fix multiple correctness issues
8 weeks ago
###### _This patch was authored and released by @gwynne._ Here's a list of changes: - `StackTrace` no longer severely misuses pointers or invokes undefined behavior when gathering backtraces on Linux. It also no longer has a number of implicit fatal error code paths. - Several deprecation warnings that show up when building with 5.8+ are gone. - Concurrency support now correctly back-deploys as far as macOS 10.15. As a side effect, the minimum Swift version has increased from 5.5 to 5.5.2. - The `Deployment` example target has been significantly improved and no longer references local paths on @tanner0101's computer πŸ˜† - The TOTP/HOTP logic is now both faster and safer (no more use of unsafe pointers, in particular). - `DecoderWrapper`, an unsafe `Codable` hack with serious pitfalls, has been hard-deprecated. - `PlaintextEncoder` and `PlaintextDecoder` have been significantly cleaned up and improved. All `fatalError()`s have been removed, performance has been noticeably improved, and errors are more accurate. - `URLEncodedFormEncoder` and `URLEncodedFormDecoder` got the same treatment. - The entire `Validation` submodule has been overhauled to fix systemic misuses of `Codable` that were starting to cause noticeable problems. - As a side effect of said overhaul, `ValidationKey` is now deprecated in favor of using the essentially identical `BasicCodingKey` type. - `ContentContainer` and `URLQueryContainer` received the same "fix `Codable` usage" treatment. - `ContentConfiguration` now throws more useful errors. - When `CodingKeyRepresentable` is available in the stdlib (Swift 5.6+), Vapor's protocol of the same name now becomes a `typealias` for it.
Imports fixes
10 weeks ago
###### _This patch was authored and released by @gwynne._ <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
Correctly handle invalid numbers in range validations
11 weeks ago
###### _This patch was authored by @fred-sch and released by @0xTim._ Previously trying to perform a range validation check on `Float.nan` would cause a `fatalError` - this correctly handles it and throws an error instead. Closes https://github.com/vapor/vapor/issues/2965.
iOS macOS watchOS tvOS linux macOS iOS
vapor/fluent 4.8.0
Vapor ORM (queries, models, and relations) for NoSQL and SQL databases
⭐️ 1,216
πŸ•“ 7 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Update min Swift version to 5.6 and make platform versions consistent
7 weeks ago
###### _This patch was authored and released by @gwynne._
Update to match FluentKit's declared version minimums
10 weeks ago
###### _This patch was authored and released by @gwynne._ This should help fix building in Xcode. Also bumps minimum Swift version to 5.5.2 and removes outdated compiler conditionals on concurrency support, incidentally enabling back-deployment in the process.
Add migrationLogLevel configuration
15 weeks ago
###### _This patch was authored by @madsodgaard and released by @gwynne._ Adds the possibility to configure the log level for migrations with: ```swift app.fluent.migrationLogLeveL = .debug ```
Update minimum Swift version to 5.5
27 weeks ago
###### _This patch was authored and released by @gwynne._ Also updates very ancient CI.
Add `asyncCredentialsAuthenticator` to `ModelCredentialsAuthenticatable`
41 weeks ago
###### _This patch was authored by @fatto and released by @0xTim._ Adds `asyncCredentialsAuthenticator` to `ModelCredentialsAuthenticatable` to allow it to be overridden if needs be
Add support for async/await
1 year ago
###### _This patch was authored and released by @0xTim._ Adds initial support for async/await
Fix conditional Codable conformance
2 years ago
###### _This patch was authored and released by @siemensikkema._ This fixes an issue introduced in https://github.com/vapor/fluent-kit/pull/435 where `Page` does not automatically conform to `Codable` anymore (#730)
Add page size limit
2 years ago
###### _This patch was authored by @pulpn0ir and released by @siemensikkema._ Adds a means to prevent server overloads by limiting the maximum amount of elements returned in a single page. `Application` and `Request` have been extended with setters for page size limits. Set limits using the newly introduced `PageLimit` type. ```swift // Set page size limit for the current request. Default is `nil`, which means no limit. request.fluent.pagination.pageSizeLimit = 3 // Setting the request-level limit to `nil` will cause the application-level limit to be used instead. request.fluent.pagination.pageSizeLimit = nil // Use `.noLimit` if you intend to override a limit set on application level. request.fluent.pagination.pageSizeLimit = .noLimit // Set application-wide page size limit. Default is `nil`, which means no limit. application.fluent.pagination.pageSizeLimit = 3 ``` This PR depends on: https://github.com/vapor/fluent-kit/pull/412
Add cache protocol
2 years ago
###### _This patch was authored and released by @tanner0101._ Add Fluent implementation for Vapor's new cache protocol: https://github.com/vapor/vapor/pull/2558 ```swift app.caches.use(.fluent) // Or with specific database id app.caches.use(.fluent(.foo)) ``` Make sure to add the `CacheEntry` migration (similar to `SessionRecord`). ```swift app.migrations.add(CacheEntry.migration) ```
Add default implementation for CredentialsAuthenticatable
2 years ago
###### _This patch was authored and released by @0xTim._ Improves the experience for users writing web applications. Adds a `ModelCredentialsAuthenticator` to automatically conform `Model` types to `CredentialsAuthenticatable` and provide a middleware to use. This can be used when logging in users via a web form, as shown in the tests. This also backfills some tests for ModelSessionAuthenticatable. Also fixes a bug where the SessionAuthenticator was not using the provided `DatabaseID` Resolves #710 Resolves #701 Docs here vapor/docs#576
iOS macOS watchOS tvOS linux macOS iOS
vapor/redis 5.0.0-alpha.2.1
Vapor provider for RediStack
⭐️ 458
πŸ•“ 23 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
General overdue cleanups
10 weeks ago
###### _This patch was authored and released by @gwynne._ - Bump Swift minimum to match Vapor - Add platform versions - Update README - Fix imports - Remove old Concurrency conditionals
4.7.0
17 weeks ago
## What's Changed * Add good first issue project board workflow to repository by @BennyDeBock in https://github.com/vapor/redis/pull/198 * Update good first issue workflow to work for multiple labels by @BennyDeBock in https://github.com/vapor/redis/pull/200 * Update good first issue workflow to work for multiple labels by @BennyDeBock in https://github.com/vapor/redis/pull/202 * Add support for TLS-backed connections to Redis by @iKenndac in https://github.com/vapor/redis/pull/205 ## New Contributors * @BennyDeBock made their first contribution in https://github.com/vapor/redis/pull/198 * @Rubenfer made their first contribution in https://github.com/vapor/redis/pull/204 * @iKenndac made their first contribution in https://github.com/vapor/redis/pull/205 **Full Changelog**: https://github.com/vapor/redis/compare/4.6.0...4.7.0
change Lock to NIOLock
23 weeks ago
###### _This patch was authored by @Rubenfer and released by @Mordil._ This PR renames Lock to NIOLock as it is deprecated
Redis 5.0.0 Alpha 2
28 weeks ago
Updates the Alpha branch to use RediStack 2.0.0 Beta See RediStack's releases for more details - [Beta 1](https://gitlab.com/Mordil/RediStack/-/releases/2.0.0-beta.1) ## Major - Significant refactor the `RedisConfiguration` type: it is now a `typealias` of **RediStack**'s `RedisConnectionPool.Configuration` - The same initializers are supported, with new optional arguments for configuring the behavior of the pool.
Redis 5.0.0 Alpha 1.1
28 weeks ago
> _This release does not contain any new changes, it's just a proper tagging of the initial Alpha release which was improperly tagged._ Initial support for RediStack 2.0.0 and Vapor See RediStack's releases for more details - [Alpha 1](https://gitlab.com/Mordil/RediStack/-/releases/2.0.0-alpha.1) - [Alpha 2](https://gitlab.com/Mordil/RediStack/-/releases/2.0.0-alpha.2) - [Alpha 3](https://gitlab.com/Mordil/RediStack/-/releases/2.0.0-alpha.3) - [Alpha 4](https://gitlab.com/Mordil/RediStack/-/releases/2.0.0-alpha.4)
Redis 5.0.0 Alpha 1
1 year ago
Initial support for RediStack 2.0.0 and Vapor See RediStack's releases for more details - [Alpha 1](https://gitlab.com/Mordil/RediStack/-/releases/2.0.0-alpha.1) - [Alpha 2](https://gitlab.com/Mordil/RediStack/-/releases/2.0.0-alpha.2) - [Alpha 3](https://gitlab.com/Mordil/RediStack/-/releases/2.0.0-alpha.3) - [Alpha 4](https://gitlab.com/Mordil/RediStack/-/releases/2.0.0-alpha.4)
Allow customizing encoding and decoding of RedisCache values
1 year ago
###### _This patch was authored and released by @gwynne._ It is now possible to specify a custom `Encoder` and `Decoder` to use in place of `JSONEncoder` and `JSONDecoder` for storing and retrieving values cached in Redis via the `Cache` interface.
Add support for `async`/`await`
1 year ago
###### _This patch was authored and released by @0xTim._ Add `async` APIs for Redis
Expose method on Redis objects to lease connections
1 year ago
###### _This patch was authored and released by @Mordil._ Adds a `withBorrowedClient` method on both `Application.Redis` and `Request.Redis` for being able to lease a `RedisClient` for a specified amount of time to execute commands serially with. This allows for a custom execution of `MULTI` commands in the following way ```swift request.redis.withBorrowedClient { return client .send(command: "MULTI") .flatMap { _ in client.send(command: "PING") } .flatMap { _ in client.send(command: "EXEC") } } // this is now an 'EventLoopFuture<RESPValue>' with the value being an array of RESPValue result of every queued command ``` This fixes #190
Add support for Vapor `Cache` protocol expiration time
2 years ago
###### _This patch was authored by @madsodgaard and released by @0xTim._ Adds support for setting an expiration time when using Redis as the Vapor cache via `app.caches.use(.redis)`. See [v4.44.0](https://github.com/vapor/vapor/releases/tag/4.44.0) for more info. This PR also fixes #187 by adding a function to set an expiration time when setting a key to JSON: ```swift app.redis.setex("user", toJSON: User(name: "mads"), expirationInSeconds: 10) ```
iOS macOS watchOS tvOS linux macOS iOS
vapor/console-kit 4.6.0
πŸ’» APIs for creating interactive CLI tools.
⭐️ 398
πŸ•“ 19 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Add MetadataProvider support
19 weeks ago
###### _This patch was authored by @MahdiBM and released by @0xTim._ This PR: * Adds `MetadataProvider` support to `ConsoleLogger`. * Makes it so the the package requires `swift-log` `1.5.1`+. * Fixes these warnings: ``` [ WARNING ] Attempted to set metadataProvider on ConsoleLogger that did not implement support for them. Please contact the log handler maintainer to implement metadata provider support. ```
Update Supported Swift Versions
43 weeks ago
###### _This patch was authored and released by @0xTim._ This removes support for Swift 5.2 and Swift 5.3, making Swift 5.4 the earliest supported version [as announced](https://blog.vapor.codes/posts/vapor-swift-versions-update/)
Fix compilation on older OSes
51 weeks ago
###### _This patch was authored and released by @0xTim._ Fixes an issue where compilation would fail on older versions of macOS when using Swift 5.5
Add experimental support for iOS
1 year ago
###### _This patch was authored and released by @0xTim._ This adds experimental support for iOS and fixes up the concurrency stuff by making sure concurrency is available. Resolves #172
Add support for async `Command`s
1 year ago
###### _This patch was authored by @BennyDeBock and released by @0xTim._ Adds support for async commands with a new `AsyncCommand` type
[android] support `Android` platform.
1 year ago
###### _This patch was authored by @Guang1234567 and released by @gwynne._ Hello dev: Just support android, thanks. **Usage:** ```ruby #!/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 .. ```
Fix warnings from Swift 5.4 compiler
2 years ago
###### _This patch was authored by @kemchenj and released by @0xTim._ Fixes the following warnings now produced by the Swift 5.4 compiler: ``` warning: using 'class' keyword for protocol inheritance is deprecated; use 'AnyObject' instead public protocol Console: class { ^~~~~ AnyObject ```
Fixed compilation error when not building for MacOS, Linux or Windows
2 years ago
###### _This patch was authored by @cgrindel and released by @0xTim._ Moved the declaration of the `pass` variable in `Terminal.input(isSecure:)` function so that it will compile for all OS targets. <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
Modernization of secure input using Console - take two
2 years ago
###### _This patch was authored and released by @gwynne._ This is a rehash of #153 with improved compatibility and a better testing matrix. `getpass()` is very, very old, and deprecated everywhere it exists. This PR switches to `readpassphrase()` on macOS, provides a (incomplete but sufficient) re-implementation of `readpassphrase()` based on that of `libbsd` for Linux, and adds an implementation for Windows using the `conio` interface.
Revert "Modernization of secure input using Console"
2 years ago
###### _This patch was authored and released by @MrLotU._ Reverts vapor/console-kit#153 to fix build errors introduced in 4.2.2
iOS macOS linux macOS iOS
vapor/leaf 4.2.4
πŸƒ An expressive, performant, and extensible templating language built for Swift.
⭐️ 383
πŸ•“ 26 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Fix Algorithms Dependency Declaration
26 weeks ago
###### _This patch was authored by @dankinsoid and released by @0xTim._ Swift Algorithms was used in Leaf but never explicitly declared as a dependency on the target. That resulted in compiler errors in some scenarios. The dependency is now correctly declared.
Fix retain cycle(s) in encoder implementation
27 weeks ago
###### _This patch was authored by @petrpavlik and released by @0xTim._ This PR addresses issue https://github.com/vapor/leaf/issues/215 and server as an alternative of PR https://github.com/vapor/leaf/pull/216, that somehow got stuck in it's efforts of being merged in. I've done 2 things to discover the issue and confirm the fix - Xcode would show a bunch of memory leaks when using it's memory graph debugger, those are gone after the changes introduced in this PR - I've switched https://swiftpack.co, which uses leaf heavily, to using my fork with this fix. The heroku graph bellow shows significantly lower memory consumption and does not seem to be crashing, though I still do do seem to have memory leaks somewhere in the codebase. <img width="1223" alt="Screenshot 2022-10-11 at 8 09 09" src="https://user-images.githubusercontent.com/1067678/196025866-b2610ab8-de21-4dba-9add-87b30b2919d6.png"> <img width="1512" alt="Screenshot 2022-10-09 at 18 38 05" src="https://user-images.githubusercontent.com/1067678/196025908-ac231a1f-a87e-4955-9119-e5c94f76403d.png"> <img width="1512" alt="Screenshot 2022-10-09 at 18 35 00" src="https://user-images.githubusercontent.com/1067678/196025912-40c8fe04-0fae-4c71-bf53-602339af9921.png"> <img width="1512" alt="Screenshot 2022-10-09 at 18 36 58" src="https://user-images.githubusercontent.com/1067678/196025915-8ca9b7b3-3b76-42ba-9bf3-8bc0d01a97be.png"> <img width="1512" alt="Screenshot 2022-10-09 at 18 32 46" src="https://user-images.githubusercontent.com/1067678/196025916-58676f06-210c-48eb-b66c-079817cd9df0.png"> <img width="1512" alt="Screenshot 2022-10-09 at 18 35 33" src="https://user-images.githubusercontent.com/1067678/196025917-20870599-1853-4532-96aa-ced9b8a81588.png">
Add Swift Algorithms as an explicit dependency
35 weeks ago
###### _This patch was authored by @Joannis and released by @0xTim._ Adds Swift Algorithms as an explicit dependency as we depend on it
Fix behavior of Leaf context encoding and improve Leaf errors
41 weeks ago
###### _This patch was authored and released by @gwynne._ Types which use `superEncoder(forKey:)` in their `Codable` conformance (such as Fluent models) can now safely be provided to Leaf views as context objects. In general, handling of context encoding is significantly improved. `LeafError` now conforms to `AbortError` and `DebuggableError` for improved error UI/UX.
Update Supported Swift Versions
1 year ago
###### _This patch was authored and released by @0xTim._ This removes support for Swift 5.2 and Swift 5.3, making Swift 5.4 the earliest supported version [as announced](https://blog.vapor.codes/posts/vapor-swift-versions-update/)
Add experimental support for iOS
1 year ago
###### _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`
Fix UnkeyedContainer crash for collections with nil
1 year ago
###### _This patch was authored by @fananek and released by @0xTim._ <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> UnkeyedContainer throw fatal error in case of encoding collection with one or more nil values. This change removes force unwrap of the input data and skip any nil value in a collection. Resolves #197 <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
Export `UnsafeUnescapedLeafTag`
1 year ago
###### _This patch was authored and released by @0xTim._ Exports the new `UnsafeUnescapedLeafTag` so it's easy to use for anyone importing Leaf
Remove Starting Renderer with Caching Enabled Log
2 years ago
###### _This patch was authored and released by @0xTim._ This removes the log message that states that the application is starting the Leaf Renderer with caching enabled. Because the `userInfo` is unique per request we can't cache the `renderer` so it needs to be created for each request (which is fine as everything else is stored in the request's storage). However this means that we get the log for each request. Additionally the log might not be true if the application is configured to disable caching. Resolves #192
Remove `fatalError()` when using array for `Context`
2 years ago
###### _This patch was authored and released by @0xTim._ Using arrays for top-level `Context`s in Leaf is not support. This changes the behaviour of Leaf to throw an error instead of `fatalError`ing and taking down the app. Resolves #190
iOS macOS linux macOS iOS
vapor/jwt 4.2.2
Vapor JWT provider
⭐️ 301
πŸ•“ 10 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Add missing platform specifiers
10 weeks ago
###### _This patch was authored and released by @gwynne._ JWTKit and Vapor both already have the additional platforms.
Add `@discardableResult` attribute to `verify(as:)` functions
47 weeks ago
###### _This patch was authored by @jiahan-wu and released by @0xTim._ Marks JWT's `verify(as:)` functions with `@discardableResult` so you can verify then without reading the contents in a clean way. For example ```swift let _ = try req.jwt.verify(as: Payload.self) ``` Can become: ```swift try req.jwt.verify(as: Payload.self) ```
Drop support for Swift 5.2 and 5.3
1 year ago
###### _This patch was authored and released by @0xTim._ This removes support for Swift 5.2 and Swift 5.3, making Swift 5.4 the earliest supported version [as announced](https://blog.vapor.codes/posts/vapor-swift-versions-update/)
Add support for `async`/`await`
1 year ago
###### _This patch was authored and released by @0xTim._ Adds `async` APIs for JWT calls when interacting with JWKS servers
JWT 4.0.0
2 years ago
###### _This patch was authored and released by @tanner0101._ Docs: https://docs.vapor.codes/4.0/jwt/ More information on Vapor 4 official release: https://forums.swift.org/t/vapor-4-official-release-begins/34802
Make JWT helpers extendable
2 years ago
###### _This patch was authored and released by @tanner0101._ This change publicizes internal properties on JWT helpers to make them more easily extendable (#131, fixes #125). ```swift // Custom extension extension Request.JWT { // Methods now have access to the request func myVerifier() { print(self._request) // Current request } } // Usage req.jwt.myVerifier() ``` The property names have been prefixed with `_` to prevent autocomplete from suggesting things like: ```swift req.jwt.request ``` ⚠️ Note: `Application.JWT` and `Request.JWT`'s initializers have been removed. These were redundant and can be declared much more concisely: ```diff - Application.JWT(application: app) + app.jwt ``` ```diff - Request.JWT(request: req) + req.jwt ```
Add Microsoft JWT helpers
2 years ago
###### _This patch was authored and released by @tanner0101._ Adds new helper methods for verifying Microsoft JWTs (#130, #121). ```swift // Configure your Microsoft application identifier. app.jwt.microsoft.applicationIdentifier = "..." // Fetch and verify Microsoft identity token from Bearer header. // Microsoft's JWKS is downloaded and cached automatically. req.jwt.microsoft.verify().map { token in print(token) // MicrosoftIdentityToken } ```
Added a public initializer to Request.JWT
3 years ago
###### _This patch was authored and released by @grosch._ People couldn't make their own verifiers since `request` was internal.
Update to Vapor 4 GM
3 years ago
###### _This patch was authored by @gwynne and released by @tanner0101._ Updated for final Vapor 4.0.0 release, with (improved) tests passing (#119).
Updates audience claim check for apple/google
3 years ago
###### _This patch was authored by @grosch and released by @gwynne._ Updated based on the recent changes to JWT-Kit
iOS macOS watchOS tvOS linux macOS iOS
vapor/toolbox 18.7.1
Simplifies common command line tasks when using Vapor
⭐️ 251
πŸ•“ 5 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Backport support for Swift 5.5
5 weeks ago
###### _This patch was authored and released by @0xTim._ We need to support 5.5 for Homebrew
Update Toolbox for new Templates
5 weeks ago
###### _This patch was authored and released by @0xTim._ * Bumps the minimum required Swift version to 5.6 to match SwiftNIO * Adds deprecation warnings to all the old commands * Handle the new Vapor templates with a different executable name (you should still use `swift run` anyway)
Add support for Package.resolved v2
37 weeks ago
###### _This patch was authored by @Kyle-Ye and released by @0xTim._ - Add Package.resolved v2 decoding support - Align PackageResolvedV1 definition with [swift-package-manager](https://github.com/apple/swift-package-manager)
Fix Package.resolved version decoding issue
37 weeks ago
###### _This patch was authored by @Kyle-Ye and released by @0xTim._ Fixes issue when trying to decode V2 Package.resolved files
18.5.1
50 weeks ago
Fixes a typo in the message when creating a new project
18.5.0
51 weeks ago
## What's Changed * Give a generic message to open the project by @ahmdyasser in https://github.com/vapor/toolbox/pull/391 * Compatibility with official swift container images by @Jeffrey-de-Bruijn in https://github.com/vapor/toolbox/pull/390 * Use new API for build script by @jroya1 in https://github.com/vapor/toolbox/pull/394 * Update Supported Swift Versions by @0xTim in https://github.com/vapor/toolbox/pull/395 ## New Contributors * @ahmdyasser made their first contribution in https://github.com/vapor/toolbox/pull/391 * @Jeffrey-de-Bruijn made their first contribution in https://github.com/vapor/toolbox/pull/390 * @jroya1 made their first contribution in https://github.com/vapor/toolbox/pull/394 **Full Changelog**: https://github.com/vapor/toolbox/compare/18.4.1...18.5.0
Allow dynamic file names in template manifest
1 year ago
###### _This patch was authored by @s-k and released by @0xTim._ By adding `dynamic_name` parameters to files or folders in manifest.yml, their names in the created package can depend on variables or the name of the new package. Example: ``` - folder: xcschemes files: - file: Server.xcscheme dynamic_name: "{{name}}.xcscheme" ``` In this case, the original name of the file in the template repository is 'Server.xscheme'. In the created package, its name will be '\[Package Name\].xscheme'. The dynamic file name may also depend on variables defined in manifest.yml.
Allow not adding a Git repo when creating a new project
1 year ago
###### _This patch was authored by @s-k and released by @0xTim._ This change allows users to create a project without automatically creating a Git repository in the new folder. This can be helpful when creating the project inside another project already using Git. To use the new feature, add `--no-git` to the `vapor new` command.
Remove backslash from Procfile created by `vapor heroku init`
1 year ago
###### _This patch was authored by @e28eta and released by @0xTim._ Running `vapor heroku init`, and choosing to use the buildpack (vs docker), creates a Procfile with the following: ``` web: Run serve --env production --hostname 0.0.0.0 --port \$PORT ``` This works okay when deployed to heroku (note the `--port \4386`): ``` 2022-03-08T07:07:33.775125+00:00 heroku[web.1]: Starting process with command `Run serve --env production --hostname 0.0.0.0 --port \4386` 2022-03-08T07:07:35.820116+00:00 app[web.1]: [ NOTICE ] Server starting on http://0.0.0.0:4386 ``` However, it doesn't work when using the `heroku local` command: ``` $ heroku local 10:54:26 PM web.1 | [1/1] Planning build 10:54:31 PM web.1 | [0/0] Build complete! 10:54:31 PM web.1 | [ WARNING ] Could not convert option for `port` to Int 10:54:31 PM web.1 | Swift/ErrorType.swift:200: Fatal error: Error raised at top level: .invalidOptionType("port", type: Int) [DONE] Killing all processes with signal SIGILL 10:54:31 PM web.1 Exited with exit code SIGILL ``` ---- This PR removes the backslash. The new Procfile contents are simply: ``` web: Run serve --env production --hostname 0.0.0.0 --port $PORT ``` I've verified this works with heroku remote & local. ``` 2022-03-08T07:18:31.543631+00:00 heroku[web.1]: Starting process with command `Run serve --env production --hostname 0.0.0.0 --port 32664` 2022-03-08T07:18:32.671361+00:00 app[web.1]: [ NOTICE ] Server starting on http://0.0.0.0:32664 2022-03-08T07:18:33.310530+00:00 heroku[web.1]: State changed from starting to up 2022-03-08T07:19:57.000000+00:00 app[api]: Build succeeded ```
18.3.5
1 year ago
## What's Changed * Changing info screen to instruct user to open Package.swift by @dannflor in https://github.com/vapor/toolbox/pull/372 * Removed deprecated --enable-test-discovery flag from build and run commands by @Ventus218 in https://github.com/vapor/toolbox/pull/373 ## New Contributors * @dannflor made their first contribution in https://github.com/vapor/toolbox/pull/372 * @Ventus218 made their first contribution in https://github.com/vapor/toolbox/pull/373 **Full Changelog**: https://github.com/vapor/toolbox/compare/18.3.4...18.3.5
macOS linux macOS iOS
vapor/http 3.4.0
πŸš€ Non-blocking, event-driven HTTP built on Swift NIO.
⭐️ 239
πŸ•“ 1 year ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
SameSite Attribute support none, default = lax
2 years ago
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
HTTP 3.3.2
3 years ago
Swift NIO vulnerability fix: https://forums.swift.org/t/swiftnio-security-releases-2-13-1-and-1-14-2/33671
HTTP 3.2.1
3 years ago
Fixed: - `HTTPClient` no longer overrides `User-Agent` and `Host` headers. (#365)
HTTP 3.2.0
4 years ago
New: - Publicize `HTTPMessageDecoder.decode` extension. (#359) - Added support for decoding `jsonAPI` media type. (#359)
HTTP 3.1.11
4 years ago
Fixed: - Silenced a Swift 5 warning. (#351)
HTTP 3.1.10
4 years ago
Fixed: - Fixed an issue that could cause unnecessary re-allocations during large file uploads. (#346)
HTTP 3.1.9
4 years ago
Fixed: - Fixed a bug that could cause cookies to be duplicated if added one-by-one. (#343)
HTTP 3.1.8
4 years ago
Fixed: - HTTP upgrade requests now forward bytes buffered during upgrade. (#324)
HTTP 3.1.7
4 years ago
Fixed: - `HTTPScheme.https` now enables certificate verification by default. (#328) Note: This may cause `HTTPClient` to fail with `NIOOpenSSLError.unableToValidateCertificate` if the remote you are connecting to does not have a verifiable certificate. To work around this, use the new `HTTPScheme.customHTTPS(_:)` method. ```swift let res = try HTTPClient.connect( scheme: .customHTTPS(.forClient(certificateVerification: .none)), hostname: "127.0.0.1" ).send(req).wait() ``` - `HTTPScheme.https` now configures SNI. (#314)
HTTP 3.1.6
4 years ago
Fixed: - Improved `HTTPProtocolUpgrader`'s error handling (leaking promise assertion). (#316, #315)
linux macOS iOS
vapor/websocket-kit 2.14.0
WebSocket client library built on SwiftNIO
⭐️ 219
πŸ•“ 5 days ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Pass a copy of the control frame buffer to ping/pong callbacks
6 days ago
###### _This patch was authored by @tkrajacic and released by @0xTim._ This PR enables access to the data in the control frames handled via `onPing`/`onPong` via a new API with the existing `onPing` and `onPong` methods being deprecated.
Bump the swift-tools-version to 5.7
1 week ago
###### _This patch was authored by @Joannis and released by @0xTim._ Set the minimum supported Swift version to 5.7. This is due to the usage of `@preconcurrency`
Revert Sendable Take 2
1 week ago
Reverts 2.12.0, in order to maintain compatibility with Swift 5.6 users.
Sendable Take 2
1 week ago
###### _This patch was authored and released by @0xTim._ Adds `Sendable` annotations where possible. This time we're using `@preconcurrency` to suppress errors in unsafe code from downstream users
Revert "Add Sendable conformances to WebsocketKit (#131)"
1 week ago
###### _This patch was authored and released by @gwynne._ Due to unforeseen source compatibility breakage, this backs out the changes from release 2.10.0 for now.
Add Sendable conformances to WebsocketKit
1 week ago
###### _This patch was authored and released by @0xTim._ Bump minimum Swift version to 5.6 and add Sendable conformances where appropriate
Work around apple/swift#66099
1 week ago
###### _This patch was authored and released by @gwynne._ Avoids hitting apple/swift#66099. Holding off on reenabling TSan in CI for now due to remaining warnings about race conditions managing callbacks.
Update for new NIOSSL
2 weeks ago
###### _This patch was authored and released by @gwynne._ Fix for [SwiftNIOSSL 2.23.1](https://github.com/apple/swift-nio-ssl/releases/tag/2.23.1) breaking the build of the WebSocket tests due to `EVP_PKEY` no longer being visible. Shoutout and thanks to @jhoughjr for reporting the problem! Additional changes: - Require Swift 5.6 (matching the rest of Vapor) - Update CI (wouldn't be an @gwynne PR without CI tweaks!) - Enable Concurrency back-deployment - Normalize platform support - Some very minor code quality cleanups - Added several missing tests (binary frames, manual pings, automatic pings, various connect methods)
Add support for proxying in `WebsocketClient`
7 weeks ago
###### _This patch was authored by @rnro and released by @0xTim._ Added support for TLS and plain text proxying of Websocket traffic. * In the TLS case a `CONNECT` header is first sent establishing the proxied traffic. * In the plain text case the modified URI in the initial upgrade request header indicates to the proxy server that the traffic is to be proxied. * Use `NIOWebSocketFrameAggregator` to handle aggregating frame fragments. This brings with it more protections e.g. against memory exhaustion. * Accompanying config has been added to support this change. This change also includes some performance gains by reducing the allocation and copies necessary to send `ByteBuffer` and `ByteBufferView` through `WebSocket.send`. * Sending `ByteBuffer` or `ByteBufferView` doesn’t require any allocation or copy of the data. Sending a `String` now correctly pre allocates the `ByteBuffer` if multibyte characters are present in the `String`. * Remove custom random websocket mask generation which would only generate bytes between `UInt8.min..<UInt8.max`, therefore excluding `UInt8.max` i.e. `255`.
Do not add a `Content-Type` header to the HTTP upgrade request
12 weeks ago
###### _This patch was authored by @fumoboy007 and released by @0xTim._ ⚠️ **WARNING**: This release removes the hard-coded `content-type` header from the upgrade request. If you were relying on this you'll need to manually add it now, but since there's no body it shouldn't be required [Some](https://alpaca.markets/docs/api-references/trading-api/streaming/) WebSocket servers use the `Content-Type` header to determine which serialization format to use for its WebSocket messages. However, `HTTPInitialRequestHandler` [adds](https://github.com/vapor/websocket-kit/blob/62f568aa9d338aa33790534fa7b5800976f93af8/Sources/WebSocketKit/HTTPInitialRequestHandler.swift#L24) a hard-coded `Content-Type: text/plain; charset=utf-8` header to the WebSocket client’s HTTP upgrade request, so the client cannot customize the header value. Given that the HTTP upgrade request body is empty, there is no need for `HTTPInitialRequestHandler` to add the `Content-Type` header. This will allow the client to add their own, if desired. Fixes #126.
iOS macOS watchOS tvOS linux macOS iOS
vapor/postgres-nio 1.15.0
🐘 Non-blocking, event-driven Swift client for PostgreSQL.
⭐️ 216
πŸ•“ Yesterday
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
PostgresNIO 1.15.0
Yesterday
### SemVer Minor * Make PostgresCodable typealias public (https://github.com/vapor/postgres-nio/pull/363) * Add support for int4range, int8range, int4range[], int8range[] (https://github.com/vapor/postgres-nio/pull/330 by @rausnitz) ### SemVer Patch * Decode `.bpchar` as `String` (https://github.com/vapor/postgres-nio/pull/368) * Rename generic type from B to Bound in PostgresRange (https://github.com/vapor/postgres-nio/pull/367) ### Other Changes * Various cleanups to CI (https://github.com/vapor/postgres-nio/pull/359, https://github.com/vapor/postgres-nio/pull/362, https://github.com/vapor/postgres-nio/pull/369) * Add `testSelectActiveConnection` test (https://github.com/vapor/postgres-nio/pull/364) * Add Postgres 15 to docker compose (https://github.com/vapor/postgres-nio/pull/366 by @marius-se) ### New Contributors * @marius-se made their first contribution in https://github.com/vapor/postgres-nio/pull/366 **Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.14.2...1.15.0
PostgresNIO 1.14.2
4 weeks ago
Address CVE-2023-31136 - PostgresNIO processes unencrypted bytes from man-in-the-middle. See the [CVE-2023-31136 security advisory](https://github.com/vapor/postgres-nio/security/advisories/GHSA-9cfh-vx93-84vv) for details. Thanks to PostgreSQL's Tom Lane <[[email protected]](mailto:[email protected])> for reporting this issue!
PostgresNIO 1.14.1
4 weeks ago
### SemVer Patch * Use `#fileID` and `#filePath` instead of `#file` (#348, #355) * Fix crash in row streams that are cancelled and timeout (#347, #351, #353) * Add PostgresRow decoding tests, reformat Package.swift (#346) ### Other Changes * Update README (#344, #345) **Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.14.0...1.14.1
PostgresNIO 1.14.0
6 weeks ago
### SemVer Minor * Make `PostgresBindings.append(PostgresData)` public (#332) * Drop support for Swift 5.5 (#336) * Mark `RowDescription.Column` (#338) * Make `PSQLError` public (#342) * Deprecating PostgresDataConvertible, PostgresMessageType (#313) * Add support for UDS and existing Channels (#335) ### SemVer Patch * Require new swift-nio versions (#343) ### Other changes * Update CI in preparation for bumping to 5.6 min version (#337) **Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.13.0...1.14.0
PostgresNIO 1.13.0
11 weeks ago
### SemVer Minor - Add new protocol `PostgresNonThrowingEncodable` (#322) - `PostgresQuery` and `PostgresBindings` should be Sendable (#328) - Make `Decodable` autoconformance to `PostgresDecodable` public (#331 by @jtouzy) ### SemVer Patch - Use NIOFoundationCompat for `UUID` <-> `ByteBuffer` (#319) - `PostgresCodable` should be a `typealias` (#321) - Fix en- and decoding of NULL values in arrays (#324 by @ehpi) ### Other Changes - Update SPI info to point to our hosted docs (#325) - Update API Docs Workflow (#329) ### New Contributors * @ehpi made their first contribution in https://github.com/vapor/postgres-nio/pull/324 * @jtouzy made their first contribution in https://github.com/vapor/postgres-nio/pull/331 **Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.12.1...1.13.0
PostgresNIO 1.12.1
31 weeks ago
### SemVer Patch * Use `NIOThrowingAsyncSequenceProducer` (#316, #317) ### Other Changes * Link to swiftpackageindex for documentation (#308) * CI update for PostgreSQL 15 (#318) **Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.12.0...1.12.1
PostgresNIO 1.12.0
34 weeks ago
### SemVer Minor * Increase bind parameters limit (#298 - by @MahdiBM) * Raise minimum Swift version to 5.5 (#310, #306 by @MahdiBM) * Remove need to supply PostgresDecodingContext on decode (#307, #312) ### Other changes * Add docc catalog (#311) * Add docs outlining changes we made to `PostgresRow/column(name:)` (#312) * Update CI (#306 by @MahdiBM) ## New Contributors * @MahdiBM made their first contribution in https://github.com/vapor/postgres-nio/pull/298 **Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.11.1...1.12.0
PostgresNIO 1.11.1
35 weeks ago
### SemVer Patch * Use provided logger consistently in `PostgresConnection.send(_:logger:)` (#299) * Replace deprecated `NIOAtomics` with Swift Atomics (#300) * Replace `Lock` with new `NIOLock` (#305) ### Other Changes * Enable SwiftPackageIndex docc hosting (#297) **Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.11.0...1.11.1
PostgresNIO 1.11.0
52 weeks ago
### SemVer Minor * Expose `connectTimeout` as a configuration option by @trasch in https://github.com/vapor/postgres-nio/pull/276 * Make backend key data optional allowing use with AWS RDS Proxy by @rausnitz in https://github.com/vapor/postgres-nio/pull/296 ### Other Changes * Update good first issue workflow to work for multiple labels by @BennyDeBock in https://github.com/vapor/postgres-nio/pull/291 * Update README.md in https://github.com/vapor/postgres-nio/pull/293 ### New Contributors * @trasch made their first contribution in https://github.com/vapor/postgres-nio/pull/276 * @rausnitz made their first contribution in https://github.com/vapor/postgres-nio/pull/296 **Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.10.0...1.11.0
PostgresNIO 1.10.0
1 year ago
### SemVer Minor * Drop Swift 5.2 and 5.3 support #287 * Make `PostgresRowSequence.collect` public by @nicholas-otto in #281 * Rename `PostgresCastingError` to `PostgresDecodingError` and make public by @nicholas-otto in https://github.com/vapor/postgres-nio/pull/286 ### Other Changes * Switch this repo to doing its CI independently, plus some updates #284 * Remove unused scripts #288 * Update README to reflect latest changes #289 ### New Contributors * @nicholas-otto made their first contribution in #281 **Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.9.0...1.10.0
iOS macOS watchOS tvOS linux macOS iOS
vapor/mysql-kit 4.7.0
🐬 Pure Swift MySQL client built on non-blocking, event-driven sockets.
⭐️ 204
πŸ•“ 7 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Update min Swift version to 5.6 and make platform versions consistent
7 weeks ago
###### _This patch was authored and released by @gwynne._
Add `hostname` to `MySQLConnection.connect()`
7 weeks ago
###### _This patch was authored by @programVeins and released by @gwynne._ <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> Prior to this, hostname in `MySQLConnection.connect()` was optional and defaulted to nil. This resulted in an error where upon entering url for connection string, apple's swift-nio-ssl threw: `NIOSSLExtraError.failedToValidateHostname: Couldn't find <none> in certificate from peer` By adding hostname from user given configuration, this is fixed. Fixes #311
Fix bug in hex encoding of normalized constraint hashes
29 weeks ago
###### _This patch was authored and released by @gwynne._ #314 included a new routine for hex-formatting the hash used for constraint name normalization. This PR fixes a bug in that routine which caused the 4th bit of every byte to be ignored when formatting.
Drop support for Swift 5.4
29 weeks ago
###### _This patch was authored and released by @gwynne._ Also includes: - Another round of CI improvements - A huge speed boost for `MySQLDialect.normalizeSQLConstraint(identifier:)` (converting the hash result to hexadecimal no longer relies on the use of printf formatting)
Revise MySQLDataEncoder implementation to better handle various Codable conformances
31 weeks ago
###### _This patch was authored and released by @gwynne._ This avoids possible incorrect/corrupted output for various legal Encodable uses.
Add locking clause syntax to dialect
43 weeks ago
###### _This patch was authored and released by @gwynne._ Leverages the new functionality in vapor/sql-kit#154 to provide the correct syntax for both shared and exclusive locking clauses in MySQL.
Allow `MySQLConfiguration` to be updated
45 weeks ago
###### _This patch was authored by @lodenrogue and released by @0xTim._ Addresses issue: https://github.com/vapor/fluent-mysql-driver/issues/211 This allows the `MySQLConfiguration` to be edited after it has been instantiated, for example setting a `TLSConfiguration`
Fix SwiftCrypto version pin
1 year ago
###### _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` in `MySQLDialect` 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`.
Declare supported UNION features
1 year ago
###### _This patch was authored and released by @gwynne._ Leverages the new dialect flags from [vapor/sql-kit#144](https://github.com/vapor/sql-kit#144) to enable full `UNION` queries according to MySQL's support. The increased SQLKit version requirement makes this a `semver-minor` change.
Enable UPSERT support for MySQL
1 year ago
###### _This patch was authored and released by @gwynne._ Also enables correctly running the expanded SQLKit benchmark suite. semver-minor because the new SQLKit version requirement is a semver-minor bump.
iOS macOS watchOS tvOS linux macOS iOS
vapor/sql-kit 3.27.0
*️⃣ Build SQL queries in Swift. Extensible, protocol-based design that supports DQL, DML, and DDL.
⭐️ 182
πŸ•“ 4 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Major codebase cleanup
4 weeks ago
###### _This patch was authored and released by @gwynne._ A massive pass across the entirety of SQLKit, doing the following: - Fix, correct, clarify, add, and streamline documentation comments across the board. - Use `any` in all places it should appear. - Normalize coding style (esp. omitting unneeded `return`s and consistent use of `self.`). - Add `@inlinable` and `@usableFromInline` to a significant amount of the API, hopefully improving performance. - Fix some minor copy-pasta bugs, mostly in `SQLCreateTrigger`. - Deprecate use of non-trivial raw SQL strings outside of `SQLQueryString` or `SQLRaw`.
Add support for specifying a query logging level at the SQLKit layer
4 weeks ago
###### _This patch was authored and released by @gwynne._ Add `SQLDatabase.queryLogLevel` protocol requirement, defaulting to `.debug` for databases which don't implement it. Each individual driver must implement support for this logging. This corresponds to the `sqlLogLevel` configuration in [FluentPostgresDriver](https://github.com/vapor/fluent-postgres-driver) and is the first step in normalizing support for it at the `PostgresKit`/`MySQLKit`/`SQLiteKit` layer.
Update min Swift version to 5.6 and make platform versions consistent
7 weeks ago
###### _This patch was authored and released by @gwynne._
Make SQLList's properties mutable
17 weeks ago
###### _This patch was authored and released by @gwynne._ Improves consistency with other SQLKit types (and is incidentally convenient for Fluent).
Support += operator for SQLQueryString.
28 weeks ago
###### _This patch was authored by @maciejtrybilo and released by @gwynne._ Very simple change to support the += operator for appending SQLQueryStrings.
Bump minimum Swift version to 5.5
28 weeks ago
###### _This patch was authored and released by @gwynne._ Also syncs up CI with the latest refinements.
Add support for varying syntax of SELECT locking clauses.
43 weeks ago
###### _This patch was authored and released by @gwynne._ The `FOR SHARE` syntax previously provided by adding `.for(.share)` to a `SELECT` query is specific to PostgreSQL. This update allows each database driver to specify the correct syntax for locking clauses - or to signal that it doesn't implement that functionality - via its `SQLDialect`. The default is to assume locking clauses are not supported. Because new public API is added to `SQLStatement` and `SQLDialect`, this update is `semver-minor`. PR for MySQL support: vapor/mysql-kit#310 PR for PostgreSQL support: vapor/postgres-kit#230 PR for SQLite support: <not required, SQLite does not support locking clauses>
Adds `LIMIT`, `OFFSET` and `ORDER BY` to Union results
43 weeks ago
###### _This patch was authored by @NeedleInAJayStack and released by @gwynne._ <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> Previously it was not easy to do pagination on the result of `SELECT ... UNION queries`. For example: ```sql (SELECT * FROM "Table" WHERE "name" = 'first thing') UNION ALL (SELECT * FROM "Zone" WHERE "name" = 'second thing') LIMIT 5 OFFSET 3 ORDER BY "name" ``` This pull request adds `LIMIT`, `OFFSET`, and `ORDER BY` functionality to the `SQLUnion`/`SQLUnionBuilder`, primarily by copying over the `SQLSelect` and `SQLSubqueryClauseBuilder` implementations. I also have a protocol-based approach that reduces code copying but it comes with it's own smells. I'm happy to elaborate if desired. <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
UNION handles single entry
44 weeks ago
###### _This patch was authored by @NeedleInAJayStack and released by @gwynne._ <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> This PR simplifies dynamically building UNION statements. To be specific, it loosens the restriction that a SQLUnion must contain multiple select statements. While this is common usage, it makes building up `UNION`s in client code difficult. For example, building up a UNION in a for loop is awkward right now: ```swift let ids = [1, 2, 3, ...] guard let firstId = ids.first else { ... } // Must manually short-circuit as a SQLSelectBuilder guard ids.count > 1 else { return sql.select.column("id").from("t1").where("id", .equals, firstId).all() } let unionBuilder = sql.union { select in select.column("id").from("t1").where("id", .equals, firstId) } for id in ids[1..<ids.count] { unionBuilder.union(all: { select in select.column("id").from("t1").where("id", .equals, id) }) } return unionBuilder.all() ``` This PR removes the need for the commented `guard` in the code above. It also improves code safety by removing a runtime fatal error condition. <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
Add ability for SQLKit drivers to expose version numbers
45 weeks ago
###### _This patch was authored and released by @gwynne._ Also fills in some missing documentation.
iOS macOS watchOS tvOS linux macOS iOS
vapor/fluent-kit 1.42.3
Swift ORM (queries, models, and relations) for NoSQL and SQL databases
⭐️ 173
πŸ•“ 23 hours ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Generate deterministic column ordering in insert and update queries
4 weeks ago
###### _This patch was authored and released by @gwynne._ This is an updated version of #556 by @rausnitz which updates the generation of `INSERT` queries to be both deterministic and more performant by eliding pointless repetition of the Fluent -> SQL conversion of the field list. Additional kudos for @rausnitz for his enthusiasm, which inspired me to take another hard look at the existing logic! Closes #543
Improved migration performance, better error reporting, and other cleanups
4 weeks ago
###### _This patch was authored and released by @gwynne._ - `FluentError` is now `CustomDebugStringConvertible` - Fixes #542 by conditionally conforming `LoggingOverrideDatabase` to `SQLDatabase` - Migration no longer spends time checking for prerelease migration names or allocating excess futures - The `Mirror` bypass is now enabled for Swift 5.9 - Fluent benchmark suite now has much better error handling - Fluent benchmarks now run ~5-10% faster (up to 15% for SQL databases)
Update min Swift version to 5.6 and make platform versions consistent
7 weeks ago
###### _This patch was authored and released by @gwynne._
Allow eager-loading of deleted models
10 weeks ago
###### _This patch was authored by @tarag and released by @gwynne._ Allows eager-loading of soft-deleted models. For maximum flexibility, choosing whether to load soft-deleted models or not is performed for each relation at each query call. Usage is as follows: `let galaxies = try Galaxy.query(on: self.database).with(\.$stars, withDeleted: true)` Use of default argument value of false requires no change to existing code to keep existing behaviour. Fixes #375.
Enforce correct @ID(key:) usage at compile time
13 weeks ago
###### _This patch was authored and released by @gwynne._ Using `@ID(key:)` with a key other than `.id` or a value that is not a `UUID` is now a compile-time error instead of a runtime crash. Additional changes: - The legacy `@ID(key: "id")` syntax, where the key is specified as a string rather than using the `.id` enumeration case, is hard-deprecated. Replace such usages with `@ID(key: .id)`. This deprecation does _not_ apply to custom IDs. - The `@ID(key: .id)` syntax is now considered soft-deprecated. `@ID` is now the recommend usage. - Minor CI improvements ## ⚠️ **IMPORTANT** ⚠️ 1. Incorrect usage of `@ID(key: "...")` with any string other than `"id"` will still trigger a fatal error at runtime as well as the deprecation warning. This is unavoidable without a source-breaking change, since the contents of the string can not be checked at compile time. 2. Incorrect usage of `@ID` where the type of the property is not `UUID` - for example, `@ID var id: Int?` - usually results in the extremely unhelpful compiler error "`Type of expression is ambiguous without more context.`" Unfortunately, there doesn't seem to be a way to make this less opaque at the moment.
Remove limitations on nested relations in CompositeIDs
13 weeks ago
###### _This patch was authored and released by @gwynne._ This update enables embedding `@Composite[Optional]Parent` properties in a `@CompositeID`, as well as: - Removes some more `fatalError()`s and uses of force-unwrapping from Fluent - Improves suggestions in fatal errors from Parent/OptionalParent/Siblings - More reliable behavior of `QueryBuilder.count()` when the queried model has a composite ID - Minor performance improvements in `Collection<Model>.delete(force:on:)`
Additional relations support for CompositeID models
14 weeks ago
###### _This patch was authored and released by @gwynne._ This update includes the following: - `Model.joined(_:)` now works correctly with both aliased models and models with spaces. - Lots more documentation comments in various places. - `DatabaseInput` got a new flag to allow explicitly requesting that all properties - not just modified ones - be included. See the inline documentation for more details. All built-in FluentKit property types appropriately respect this flag. - Fix completely incorrect implementation of `KeyPrefixingStrategy`'s `.camelCase` strategy, including adding unit tests. - Removed outdated checks for Swift version and OS minimums in Concurrency support since we require those minimums already. - `@Group` properties with unset values no longer crash when encoded. - `@CompositeID` properties can now be encoded/decoded even when explicitly given `nil` value. - Implemented `@CompositeOptionalParent`, `@CompositeChildren`, and `@CompositeOptionalChild` properties to go with `@CompositeParent`, all of which allow fully describing relations even when the parent side of the relationship has a composite ID. - The minimum Swift version requirement has been bumped from 5.5 to 5.5.2. The recommended minimum version is 5.6.
Add ability to control migration log level
15 weeks ago
###### _This patch was authored by @madsodgaard and released by @gwynne._ Adds a `migrationLogLevel` configuration to control what log level to use for logging prepare & revert statements.
Complex join conditions and composite-key parent relations
16 weeks ago
###### _This patch was authored and released by @gwynne._ This release includes significant feature additions, cleanups, and improvements: - More complex conditions are now supported when using `.join()` in queries; the `!=` operator is now supported, and conditions may be combined using `&&`. - The new `@CompositeParent` property type may be used to reference a model which uses `@CompositeID` as the parent of another model. - `ModelAlias` now works in most cases that were previously broken; among other cases, it is now possible to alias models which specify a `space`. - The poorly-considered "duplicate" `SQLList` type previously available in `FluentSQL` is now deprecated; use `SQLKit`'s version instead. - Various code cleanups and minor performance improvements. - `Fields` and `ModelAlias` now have detailed code documentation. - A new type, `SomeCodingKey`, is now available, providing a complete implementation of `CodingKey` for convenience in various cases when arbitrary string or integer keys are desired. - The SQL generated by FluentKit queries should now be slightly more consistent.
Fix support for composite ID models with QueryBuilder.count()
30 weeks ago
###### _This patch was authored and released by @gwynne._ This functionality appeared to exist before but would actually crash at runtime. We now handle it correctly, including a test.
iOS macOS watchOS tvOS linux macOS iOS
vapor/postgres-kit 2.11.2
🐘 Non-blocking, event-driven Swift client for PostgreSQL.
⭐️ 154
πŸ•“ 2 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Temporary bandaid workaround for lack of PSQLError usefulness
2 weeks ago
###### _This patch was authored and released by @gwynne._ This is a temporary workaround while waiting for vapor/postgres-nio#360 to be finished.
Add workaround for decoding `NUMERIC` as `Double`
3 weeks ago
###### _This patch was authored and released by @gwynne._ The `PostgresData` implementation allowed this, and it's a halfway reasonable code path, so support it at the driver level.
Remove all use of deprecated PostgresNIO APIs
3 weeks ago
###### _This patch was authored and released by @gwynne._ This is a major cleanup pass that deprecates `PostgresDataEncoder`, `PostgresDataDecoder`, and `PostgresConfiguration` in favor of working with the newer, better-designed APIs now available from PostgresNIO. As a side effect of this work, the minimum Swift version has been bumped to 5.7. Every effort has been made to maintain backwards-compatible behavior whenever possible.
Require PostgresNIO 1.14.2 for CVE-2023-31136 fix
4 weeks ago
###### _This patch was authored and released by @gwynne._
Update min Swift version to 5.6 and make platform versions consistent
7 weeks ago
###### _This patch was authored and released by @gwynne._
Update to match FluentKit's declared version minimums
10 weeks ago
###### _This patch was authored and released by @gwynne._ This should help fix building in Xcode.
Update minimum Swift version to 5.5
27 weeks ago
###### _This patch was authored and released by @gwynne._ This space boringly left blank.
Revise PostgresDataEncoder implementation to better handle various Codable conformances
31 weeks ago
###### _This patch was authored and released by @gwynne._ This avoids unconditional `fatalError()`s firing for various legal Encodable uses.
Migrate to Swift Atomics
41 weeks ago
###### _This patch was authored by @fatto and released by @0xTim._ Fix deprecation warnings from `NIOAtomic` and migrate any uses to `swift-atomics`
Add locking clause syntax to dialect
43 weeks ago
###### _This patch was authored and released by @gwynne._ Leverages the new functionality in vapor/sql-kit#154 to provide the correct syntax for both shared and exclusive locking clauses in PostgreSQL.
iOS macOS watchOS tvOS linux macOS iOS
vapor/queues 1.12.1
A queue system for Vapor.
⭐️ 146
πŸ•“ 10 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Add missing platform specifiers
10 weeks ago
###### _This patch was authored and released by @gwynne._ Match Vapor's support
Add async job hooks
17 weeks ago
###### _This patch was authored by @madsodgaard and released by @0xTim._ * Bump Swift version to 5.5.2 * Backport concurrency to older platforms * Add `AsyncJobEventDelegate` for async hooks * Replace `Lock` with `NIOLock`
Fix typos in QueueWorker log messages
39 weeks ago
###### _This patch was authored by @heldersrvio and released by @jdmcd._ Fixes a few typo'd log messages.
Allow public access to set ScheduleBuilder Calendar
40 weeks ago
###### _This patch was authored by @dylanshine and released by @0xTim._ Adds a new `using(_:)` API to the `ScheduleBuilder` to allow the calendar to be set when creating jobs on a schedule
Add ability to use custom `Calendar` in `ScheduleBuilder`
42 weeks ago
###### _This patch was authored by @dylanshine and released by @jdmcd._ This PR introduces the ability to pass a custom `Calendar` to the `ScheduleBuilder`. I ran into an edge case where I have queues deployed across multiple regions and needed to schedule jobs based on specific time zones. I also cleaned up some unused computed properties in the `ScheduleBuilderTests` suite.
Update Supported Swift Versions
43 weeks ago
###### _This patch was authored and released by @0xTim._ This removes support for Swift 5.2 and Swift 5.3, making Swift 5.4 the earliest supported version [as announced](https://blog.vapor.codes/posts/vapor-swift-versions-update/)
Make AsyncScheduledJob public so clients can conform to it
1 year ago
###### _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 from `ScheduledJob`, public.
Added AsyncScheduledJob and cleaned up AsyncJob.
1 year ago
###### _This patch was authored by @Andrewangeta and released by @jdmcd._ Allows `AsyncJob`s to be added to the app via `app.queues.add(...)` method.
Async Await Support via AsyncJob
1 year ago
###### _This patch was authored by @jdmcd and released by @0xTim._ Adds `AsyncJob` which allows you to specify a job that has async body implementations: ```swift struct MyJobPayload: Content { let name: String } struct MyAsyncJob: AsyncJob { func dequeue(context: QueueContext, payload: MyJobPayload) async throws { print(payload.name) } func error(context: QueueContext, error: Error, payload: MyJobPayload) async throws { print(error) } } // In configure.swift app.queues.add(MyAsyncJob()) ```
Allow delaying retires of failed job
1 year ago
###### _This patch was authored by @kacperk and released by @jdmcd._ Added possibility of delaying retires of failed jobs. Example usage ```swift struct SomeJob: Job { func dequeue(_ context: QueueContext, _ payload: Payload) -> EventLoopFuture<Void> { .... } // Exponential backoff func nextRetryIn(attempt: Int) -> Int { return pow(2, attempt) } } ```
iOS macOS watchOS tvOS linux macOS iOS
vapor/open-crypto 4.0.0-beta.2
πŸ”‘ Hashing (BCrypt, SHA2, HMAC), encryption (AES), public-key (RSA), and random data generation.
⭐️ 133
πŸ•“ 2 years ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Crypto 3.4.1
2 years ago
Fixes a compile error when using OpenSSL 1.1 introduced in 3.4.0.
Crypto 3.4.0
2 years ago
Add support for DER encoded x509 certificate. ```swift import Crypto let rsa = try RSAKey.public(der: urlEncodedDer) ```
OpenCrypto 4.0.0 Beta 2
3 years ago
- Enabled test discovery on Linux. (#98)
OpenCrypto 4.0.0 Alpha 2
3 years ago
`CryptoKit` is now called `OpenCrypto`. OpenCrypto is a drop-in replacement for Apple's CryptoKit built on OpenSSL. This package is meant for use on platforms where CryptoKit is not available, like Linux. Most features from CryptoKit are available, but some are still missing: - βœ… MD5 - βœ… SHA1 - βœ… SHA2 (256, 384, 512) - βœ… HMAC - βœ… AES GCM (128, 192, 256) - βœ… ChaChaPoly (1305) - ❌ Curve25519 - ❌ NIST P (256, 384, 521)
CryptoKit 4.0.0 Alpha 1
4 years ago
More information on Vapor 4 alpha releases: https://medium.com/@codevapor/vapor-4-alpha-1-releases-begin-94a4bc79dd9a API Docs: https://api.vapor.codes/crypto-kit/master/CryptoKit/index.html
Crypto 3.3.3
4 years ago
Fixed: - Trying to parse a malformed RSA key no longer causes a fatalError (#87 - #88)
Crypto 3.3.2
4 years ago
Fixed: - Removed dependency on private `CNIOOpenSSL` package. (#81)
Crypto 3.3.1
4 years ago
Fixed: - Fixed a crash that could happen when using RSA with incorrect key type. (#79, #78) - Fixed an issue causing OpenSSL error messages to always yield "unknown error". (#79)
Crypto 3.3.0
4 years ago
New: - OpenSSL 1.1 support. (#74, #75) - [AES GCM](https://api.vapor.codes/crypto/latest/Crypto/Global%20Variables.html#/s:6Crypto9AES256GCMAA19AuthenticatedCipherCvp) now properly supports tags. (#68, #71) - [TOTP](https://api.vapor.codes/crypto/latest/Crypto/Structs/TOTP.html) and [HOTP](https://api.vapor.codes/crypto/latest/Crypto/Structs/HOTP.html) support have been added. (#72) ```swift import Crypto let code = TOTP.SHA1.generate(secret: "hi") print(code) "123456" ``` Fixed: - This package's private C libraries have been renamed and updated. (#75)
Crypto 3.2.0
5 years ago
New: - RSA now has `encrypt` and `decrypt` static methods (#64). - New `secureCompare(to:)` method on `Collection` (#67). Fixed: - Default AES mode is no longer ECB (#59, #66). - New AES cipher modes have been added (#60). - Fixed some incorrect usages of `withUnsafeBuffer` (#64). - `BCryptDigest` now uses secure compare when verifying hashes (#67). - `CryptoRandom` and `OSRandom` are now structs (#65).
macOS linux macOS iOS
vapor/fluent-postgres-driver 2.7.2
🐘 PostgreSQL driver for Fluent.
⭐️ 129
πŸ•“ 3 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Warn about deprecation of old config methods instead of breaking existing code
3 weeks ago
###### _This patch was authored and released by @gwynne._ Previously working code which uses the now-deprecated `PostgresConfiguration` type with the `.postgres` factory methods (rather than its replacement, `SQLPostgresConfiguration`) while specifying neither a data encoder or decoder was throwing compiler errors. Such code now issues the intended deprecation warning instead, while continuing to work as before. Fixes #211
Add missing deprecated method
3 weeks ago
###### _This patch was authored and released by @gwynne._ Without this addition, those using the original version of the method receive extremely unhelpful "unable to type-check this expression in reasonable time" errors.
Updated to use new PostgresKit/PostgresNIO APIs
3 weeks ago
###### _This patch was authored and released by @gwynne._ [PostgresKit 2.11.0](https://github.com/vapor/postgres-kit/releases/tag/2.11.0) heavily revamped PostgresKit to take full (or near to it) advantage of the modern PostgresNIO APIs. These changes do the same for FluentPostgresDriver, including adopting the revisions made to PostgresKit's API. This incidentally results in a significant improvement in the layering of the three packages, with FluentPostgresDriver now relying almost entirely on PostgresKit alone rather than needing to separately know details of PostgresNIO (with one or two exceptions). The end result is much cleaner code and moderate performance improvements. Swift 5.7 or later is now required. Users who previously specified custom `PostgresDataEncoder` and/or `PostgresDataDecoder` instances in their database configurations will begin receiving deprecation warnings; the replacements are PostgresNIO's `PostgresEncodingContext` and `PostgresDecodingContext`: ```swift let postgresEncoder = PostgresDataEncoder(json: JSONEncoder()) // deprecated let postgresEncodingContext = PostgresEncodingContext(jsonEncoder: JSONEncoder()) // new let defaultPostgresEncoder = PostgresDataEncoder() // deprecated let defaultPostgresEncodingContext = PostgresEncodingContext.default // new let postgresDecoder = PostgresDataDecoder(json: JSONDecoder()) // deprecated let postgresDecodingContext = PostgresDecodingContext(jsonDecoder: JSONDecoder()) // new let defaultPostgresDecoder = PostgresDataDecoder() // deprecated let defaultPostgresDecodingContext = PostgresDecodingContext.default // new ```
Update PostgresError's DatabaseError conformance for new PostgresNIO behavior
4 weeks ago
###### _This patch was authored and released by @gwynne._ This makes `DatabaseError.isSyntaxError` and `.isConstraintFailure` work again.
Require PostgresKit 2.10.1 for CVE-2023-31136 fix
4 weeks ago
###### _This patch was authored and released by @gwynne._ <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
Update min Swift version to 5.6 and make platform versions consistent
7 weeks ago
###### _This patch was authored and released by @gwynne._
Update to match FluentKit's declared version minimums
10 weeks ago
###### _This patch was authored and released by @gwynne._ This should help fix building in Xcode.
Update minimum Swift version to 5.5
27 weeks ago
###### _This patch was authored and released by @gwynne._ And a couple of minor cleanups to tests.
Add ability to control transactions
48 weeks ago
###### _This patch was authored and released by @0xTim._ Adds the ability to control starting, committing and rolling back transactions outside of the main Fluent API. This could be used for setting up tests. Since the new APIs give you manual control over a transaction, you should not use `Database.transaction(_:)` when using the manual transaction control. The `inTransactionFlag` will not be set when manually controlling a transaction > **Warning**: It is the users' responsibility to ensure the handle errors and rollback when necessary and commit transactions Related to vapor/fluent-kit#520
Explicitly handle a custom ID key set to the empty string
50 weeks ago
###### _This patch was authored and released by @gwynne._ Treat it as meaning not to retrieve an inserted ID value. This is in support of upcoming FluentKit feature work.
iOS macOS watchOS tvOS linux macOS iOS
vapor/multipart-kit 4.5.4
🏞 Parses and serializes multipart-encoded data with Codable support.
⭐️ 118
πŸ•“ 7 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Fix recursion loop in decoding of a `SingleValueContainer`
7 weeks ago
###### _This patch was authored by @dkolas and released by @0xTim._ Fixes an issue where the `Decodable` object is expecting a single part, but receives a set of keys causing the `FormDataDecoder` to get stuck in an infinite loop and eventually crash. This changes the behaviour to throw an error in this case
Add platform specifiers
10 weeks ago
###### _This patch was authored and released by @gwynne._ Match Vapor's support
Depend on Swift Collections
1 year ago
###### _This patch was authored by @ahmdyasser and released by @0xTim._ Removes the vended copy of Swift Collections and adds it as a dependency. Resolves #82
Remove platform requirements
1 year ago
###### _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
Add `FormDataDecoder.decode` with `ByteBuffer` parameter
1 year ago
###### _This patch was authored by @adam-fowler and released by @0xTim._ <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> Add `FormDataDecoder.decode` with `ByteBuffer` parameter and use this function in the other `decode` functions. This avoids unnecessary conversions from ByteBuffer to [UInt8] and back. <!-- When this PR is merged, the title and body will be --> Add `FormDataDecoder.decode` with `ByteBuffer` parameter <!-- used to generate a release automatically. --> Resolves #75
Support Indexed Arrays
1 year ago
###### _This patch was authored and released by @siemensikkema._ Supports indexed array elements when decoding and encoding form data (fixes #67, replaces #69). Indicating that a value belongs to an array can now be done by appending `[0]`, `[1]`, etc. to the name, as an alternative to the already supported `[]`. This allows for representing nested data _inside_ elements in an array. For instance, `let matrix: [[Int]] = [[42,21]]` can now be represented using part names `matrix[0][0]` and `matrix[0][1]`. Without indexed array elements there is no way to distinguish the above from `[[42],[21]]`. > Note: `FormDataEncoder` now also includes indexes for array types in its output. Credits go to @chocoford for identifying the issue, the test cases and the initial PR!
Redesign FormDataEncoder and FormDataDecoder
1 year ago
###### _This patch was authored and released by @siemensikkema._ Redesign FormDataEncoder and FormDataDecoder to better align with Codable's intended behavior. - Support decoding top level optionals (fixes #68) - Adds a `userInfo` property to `FormDataDecoder` and `FormDataEncoder` - More correct handling of "superDecoder" and "superEncoder" - When nesting depth is exceeded we first fail when we’re actually trying to grab data from beyond the nesting limit - Add some missing API docs
Fix regression that broke falling back to Codable
1 year ago
###### _This patch was authored and released by @siemensikkema._ Fixes regression that broke falling back to `Codable` for types not conforming to `MultipartPartConvertible` (#66, fixes #65) Note: this removes conformance of `UUID` to `MultipartPartConvertible` introduced in 4.2.0 because it is no longer needed.
Add support for encoding/decoding UUIDs
1 year ago
###### _This patch was authored and released by @siemensikkema._ Add support for encoding and decoding `UUID`s (#64)
Support nested multipart encoding
1 year ago
###### _This patch was authored and released by @siemensikkema._ Add encoding and decoding support for nested objects (#57) In order to avoid overflows by malicious actors there is a maximum nesting depth associated with `FormDataDecoder`. It defaults to `8` but is configurable in the initializer like so: `FormDataEncoder(nestingDepth: 8)`. This update also deprecates `MultipartError`.
iOS macOS watchOS tvOS linux macOS iOS
vapor/jwt-kit 4.10.0
πŸ”‘ JSON Web Token signing and verification (HMAC, RSA, ECDSA) using BoringSSL.
⭐️ 114
πŸ•“ Yesterday
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Update the vendored BoringSSL
Yesterday
###### _This patch was authored and released by @gwynne._ Update the vendored BoringSSL to the latest. This also brings in the latest updates to the vendoring scripts themselves from upstream, updates CI (what? In a PR from Gwynne? Say it ain't so!), and bumps the minimum Swift version to 5.6 to be in line with Vapor.
JWS/x5c support with ES256 keys
9 weeks ago
###### _This patch was authored by @WFT and released by @gwynne._ <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> Verify JWS tokens using x5c header parameters (ES256 keys only right now). This PR is based on @0xTim’s work in #75, but uses the X509_STORE/X509_verify_cert API rather than re-implementing that logic in Swift. <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. --> Details on x5c: https://www.rfc-editor.org/rfc/rfc7515#section-4.1.6
Add support for Octet Key Pairs with the EdDSA algorithm using the ED25519 curve
19 weeks ago
###### _This patch was authored by @mgratzer and released by @0xTim._ This implements support for Octet Key Pairs ([RFC8037](https://www.rfc-editor.org/rfc/rfc8037.html#section-2)) with the EdDSA algorithm and ED25519 curves. It closes #50.
Add `JWTSigner.unsecuredNone`
43 weeks ago
###### _This patch was authored by @baarde and released by @0xTim._ This PR adds support for the "none" algorithm described in [Section 6 of RFC 7519](https://datatracker.ietf.org/doc/html/rfc7519#section-6).
Add experimental watchOS support
47 weeks ago
###### _This patch was authored by @thebabufrik and released by @0xTim._ Adds experimental watchOS support by providing a watchOS platform to match the minimum version of the dependencies so it will compile
Fix Base64URL JWK conversion for ECDSA keys
50 weeks ago
###### _This patch was authored by @MFranceschi6 and released by @0xTim._ Fixes an issue where JWTKit does not follow [RFC7517](https://datatracker.ietf.org/doc/html/rfc7517) An jwk representing an ecdsa key is represented with the parameters x and y in base64url-encoded form. Previously the parameters were converted as Base64 encoded instead of Base64URL encoded. Adds new APIs for converting to and from base64 URL encoded data
Update supported Swift Versions and BoringSSL
1 year ago
###### _This patch was authored and released by @0xTim._ This removes support for Swift 5.2 and Swift 5.3, making Swift 5.4 the earliest supported version [as announced](https://blog.vapor.codes/posts/vapor-swift-versions-update/) Updates the version of BoringSSL vended to ce2a353d0147bac03ef883d91dcd9c405ab527fa
Expose the curve on ECDSA Keys
1 year ago
###### _This patch was authored by @danramteke and released by @0xTim._ Exposes the `Curve` on `ECDSAKey`s
Add ability to specify typ of JWT when signing
1 year ago
###### _This patch was authored by @Frizlab and released by @0xTim._ Allows for a custom `typ` to be set in the signer instead of defaulting to `JWT`. Resolves #64
Added tvOS support
1 year ago
###### _This patch was authored by @mbutan and released by @0xTim._ Adds support for tvOS
iOS macOS watchOS tvOS linux macOS iOS
vapor/routing-kit 4.7.2
🚍 High-performance trie-node router.
⭐️ 107
πŸ•“ 9 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Make Parameters.allNames more compatible
9 weeks ago
###### _This patch was authored and released by @gwynne._ Apparently, the use of `some Collection<String>` is broken with some versions of Swift on macOS. This fix specifies an explicit concrete type instead, which is not API-breaking.
Add missing platform specifiers
10 weeks ago
###### _This patch was authored and released by @gwynne._ Match Vapor's support
Make set of found parameter names from a route more easily accessible
10 weeks ago
###### _This patch was authored and released by @gwynne._ Fixes #120
4.6.0
48 weeks ago
## What's Changed * Enable compilation on iOS by @makleso6 in https://github.com/vapor/routing-kit/pull/118 ## New Contributors * @makleso6 made their first contribution in https://github.com/vapor/routing-kit/pull/118 **Full Changelog**: https://github.com/vapor/routing-kit/compare/4.5.0...4.6.0
Pass a `Logger` to `Parameters`
1 year ago
###### _This patch was authored by @BennyDeBock and released by @0xTim._ Adds SwiftLog as a dependency. Adds a `Logger` to `Parameters` and a new initialiser to pass in your own `Logger`. This allows errors to be logged out.
Update Supported Swift Versions
1 year ago
###### _This patch was authored and released by @0xTim._ This removes support for Swift 5.2 and Swift 5.3, making Swift 5.4 the earliest supported version [as announced](https://blog.vapor.codes/posts/vapor-swift-versions-update/)
Clarify "same route with different parameter names" error message
1 year ago
###### _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.
Add `AnyRouter` type-eraser
2 years ago
###### _This patch was authored by @maciesielka and released by @0xTim._ Adds `AnyRouter` type-eraser for storing arbitrary routing strategy over a type controlled by Vapor within its `DefaultResponder`
Treat `.anything` and `.parameter` as part of the same node in `TrieRouter`
2 years ago
###### _This patch was authored by @maciesielka and released by @0xTim._ Treat named parameters (`:name`) and anything (`*`) components as the same node of the `TrieRouter` (#108) Resolves #91
Add support for string interpolation to PathComponent
2 years ago
###### _This patch was authored by @dimitribouniol and released by @tanner0101._ Enables call sites that use `PathComponent`s to allow for string literals that make use of interpolation (#101). In Vapor, this enables constants and other variables to be used in routes: ```swift let api = app.grouped("version-\(Constants.apiVersion)") ```
iOS macOS watchOS tvOS linux macOS iOS
vapor/apns 4.0.0-beta.3
Helpful extensions and abstractions for using APNSwift
⭐️ 86
πŸ•“ 2 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
4.0.0-beta.3
2 weeks ago
## What's Changed * Add support for new version of APNSwift by @Gerzer in https://github.com/vapor/apns/pull/51 ## New Contributors * @Gerzer made their first contribution in https://github.com/vapor/apns/pull/51 **Full Changelog**: https://github.com/vapor/apns/compare/4.0.0-beta.2...4.0.0-beta.3
4.0.0-beta.2
27 weeks ago
Updating beta number
4.0.0-beta.1
39 weeks ago
## What's Changed * Use HTTP Client from vapor and update APNS library, add multiple configs by @kylebrowning in https://github.com/vapor/apns/pull/46 * Update package to use Beta 1 by @kylebrowning in https://github.com/vapor/apns/pull/48 **Full Changelog**: https://github.com/vapor/apns/compare/3.0.0...4.0.0-beta.1
4.0.0-alpha.3
39 weeks ago
## What's Changed * Use HTTP Client from vapor and update APNS library, add multiple configs by @kylebrowning in https://github.com/vapor/apns/pull/46 * Update package to use Alpha 5 by @kylebrowning in https://github.com/vapor/apns/pull/48 **Full Changelog**: https://github.com/vapor/apns/compare/3.0.0...4.0.0-alpha.3
4.0.0-alpha.2
50 weeks ago
## What's Changed * Use HTTP Client from vapor and update APNS library, add multiple configs by @kylebrowning in https://github.com/vapor/apns/pull/46 This is a breaking change and requires new configuration when starting up vapor. ```swift let authenticationConfig: APNSConfiguration.Authentication = .init( privateKey: try .loadFrom(string: appleECP8PrivateKey), teamIdentifier: "ABBM6U9RM5", keyIdentifier: "9UC9ZLQ8YW" ) let apnsConfig: APNSConfiguration = .init( authenticationConfig: authenticationConfig, topic: "MY_TOPIC", environment: .sandbox, eventLoopGroupProvider: .shared(app.eventLoopGroup), logger: app.logger ) app.apns.containers.use(apnsConfig, as: .default) ``` if you're loading your p8 file from disk, use `loadFrom(filePath:)` ```swift let authenticationConfig: APNSConfiguration.Authentication = .init( privateKey: try .loadFrom(filePath: "/Users/kylebrowning/Documents/AuthKey_9UC9ZLQ8YW.p8"), teamIdentifier: "ABBM6U9RM5", keyIdentifier: "9UC9ZLQ8YW" ) ``` You can also choose to send sandbox/prod environment on the notification send function ```swift try await apns.client.send(aps, to: deviceToken, on: .sandbox) ``` **Full Changelog**: https://github.com/vapor/apns/compare/3.0.0...4.0.0-alpha.2
4.0.0-alpha.1
50 weeks ago
## What's Changed * Use HTTP Client from vapor and update APNS library, add multiple configs by @kylebrowning in https://github.com/vapor/apns/pull/46 This is a breaking change and requires new configuration when starting up vapor. ```swift let authenticationConfig: APNSConfiguration.Authentication = .init( privateKey: try .loadFrom(string: appleECP8PrivateKey), teamIdentifier: "ABBM6U9RM5", keyIdentifier: "9UC9ZLQ8YW" ) let apnsConfig: APNSConfiguration = .init( authenticationConfig: authenticationConfig, topic: "MY_TOPIC", environment: .sandbox, eventLoopGroupProvider: .shared(app.eventLoopGroup), logger: app.logger ) app.apns.containers.use(apnsConfig, as: .default) ``` if you're loading your p8 file from disk, use `loadFrom(filePath:)` ```swift let authenticationConfig: APNSConfiguration.Authentication = .init( privateKey: try .loadFrom(filePath: "/Users/kylebrowning/Documents/AuthKey_9UC9ZLQ8YW.p8"), teamIdentifier: "ABBM6U9RM5", keyIdentifier: "9UC9ZLQ8YW" ) ``` You can also choose to send sandbox/prod environment on the notification send function ```swift try await apns.client.send(aps, to: deviceToken, on: .sandbox) ``` **Full Changelog**: https://github.com/vapor/apns/compare/3.0.0...4.0.0-alpha.1
Update to new major version of APNSwift
51 weeks ago
###### _This patch was authored by @code28 and released by @0xTim._ Updates the dependency to the new major version of APNSwift and new location for the package. This is a major release because of API changes but should be backwards compatible for the most part.
Update Supported Swift Versions
1 year ago
###### _This patch was authored and released by @0xTim._ This removes support for Swift 5.2 and Swift 5.3, making Swift 5.4 the earliest supported version [as announced](https://blog.vapor.codes/posts/vapor-swift-versions-update/)
async/await
1 year ago
###### _This patch was authored and released by @0xTim._ Adds `async` APIs to `Application.APNS` and `Request.APNS` to match existing `EventLoopFuture` APIs
Allow multiple notifications to be sent
2 years ago
###### _This patch was authored by @MrWoWander and released by @0xTim._ Adds a new `batchSend` API to allow multiple notifications to be sent with the same call
iOS macOS
vapor/service 1.0.2
πŸ“¦ Dependency injection / inversion of control framework.
⭐️ 83
πŸ•“ 4 years ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Service 1.0.2
4 years ago
Fixed: - Silenced a Swift 5 warning. (#38)
Service 1.0.1
4 years ago
Fixed: - `ServiceType.makeService(_:)`'s internal variable was renamed to `container`. (#27)
Service 1.0.0
5 years ago
πŸ“¦ Introducing **Service**, a dependency injection / inversion of control framework. Getting Started: [https://docs.vapor.codes/3.0/service/getting-started/](https://docs.vapor.codes/3.0/service/getting-started/) API Docs: [https://api.vapor.codes/service/1.0.0/Service](https://api.vapor.codes/service/1.0.0/Service/index.html) -------- Changes since [1.0.0-rc.2.2](https://github.com/vapor/service/releases/tag/1.0.0-rc.2.2): New: - Cleaned up code, organized files, added many missing API docs. Converted some APIs to `internal` to reduce API surface. - Added [`ContainerAlias`](https://api.vapor.codes/service/latest/Service/Protocols/ContainerAlias.html) type allows a type to simply be an alias for another container. This allows `SubContainer` to become more specialized, reducing confusion. Milestone: [1.0.0](https://github.com/vapor/service/milestone/1?closed=1)
Service 1.0.0 RC 2.2
5 years ago
New: - Added `arguments` stored property to [`Environment`](https://api.vapor.codes/service/1.0.0-rc.2.2/Service/Structs/Environment.html). This can be used going forward to get and mutate the command line arguments in a non-static way. API Docs: [https://api.vapor.codes/service/1.0.0-rc.2.2/Service/](https://api.vapor.codes/service/1.0.0-rc.2.2/Service/) Milestone: [1.0.0-rc.2.2](https://github.com/vapor/service/milestone/5?closed=10)
Service 1.0.0 RC 2.1
5 years ago
New: - Added some convenience methods for working with `Extend`. [Milestone](https://github.com/vapor/service/milestone/4?closed=1)
Service 1.0.0 RC 2
5 years ago
New: - Vapor is now running on Swift NIO! - Providers now have separate `willBoot` and `didBoot` methods. Providers are expected to do as much work as possible in the `didBoot` method, making it much simpler for other providers to pre-empt that typical work (such as running something _before_ migrations run in Fluent). - Provider lifecycle methods now return a Future<Void> to ensure proper handling of async work. Note, this does not include the `register` services method since no async work should be done before there is a container available. Fixed: - Service tags and "needed by/for" have been removed. They were not really useful for anything and unnecessarily complicated the API. [Milestone](https://github.com/vapor/service/milestone/3?closed=1)
Service 1.0.0 RC 1
5 years ago
Service 1.0.0 Beta 2
5 years ago
New: - Removed `isSingleton: Bool` option from all service types. All `class` services will now be singletons. - `ServiceType` now includes conformance to `Service` - Better error messages [Milestone](https://github.com/vapor/service/milestone/2?closed=1)
Service 1.0.0 Beta 1.1
5 years ago
Service 1.0.0 Beta 1
5 years ago
linux macOS iOS
vapor/core SR-6922
🌎 Utility package containing tools for byte manipulation, Codable, OS APIs, and debugging.
⭐️ 76
πŸ•“ 1 year ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
3.10.1
1 year ago
Fix a compilation error when building in Xcode 13
Conform File to ReflectionDecodable
3 years ago
`File` now conforms to `ReflectionDecodable`.
Core 3.9.3
3 years ago
Updated: * Use NIO's primitive functions for flatMap and its siblings (#211, @MrMage).
Core 3.9.2
3 years ago
- Fixed an issue with `DirectoryConfig.detect()` in Xcode 11 when using native SPM integration. (#208) Working directory detection methods used in Xcode projects created with `swift package generate-xcodeproj` no longer work in Xcode 11 when using native SPM integration. The Xcode team [has indicated](https://github.com/vapor/core/pull/208#issuecomment-525934546) to us that they are not planning on providing any workarounds to allow for this automatic directory detection to work in Xcode 11. Because of this, `DirectoryConfig.detect()` will no longer attempt to automatically determine the current working directory if it detects Xcode >= 11 using native SPM integration. Instead, it will always return the current working directory. By default, this current working directory will be a temporary folder used by Xcode. To change this, you must enable `Use custom working directory` in the scheme editor for your `Run` scheme: ![59303398-2365c080-8c64-11e9-87ad-dfcb239fa99f](https://user-images.githubusercontent.com/1342803/65252156-769ea900-dac6-11e9-94fc-071b1be091cd.png) You should set the custom working directory to the folder that contains the `Package.swift` file for your project. Once you have set a custom working directory for your scheme, `DirectoryConfig.detect()` will correctly detect and return that path to your application. This change should only need to be made once since Xcode project settings are persisted in the `.swiftpm` folder. Note that this change should only affect projects using Xcode >= 11 with native SPM integration. Projects using `swift package generate-xcodeproj` should continue to work without needing to make changes to the `Run` scheme.
Core 3.9.1
3 years ago
New: - Allows integration with iOS through SPM and Xcode 11 beta 1 (#206)
Core 3.9.0
4 years ago
New: - `Array.flatten` now uses NIO's `whenAll` method under the hood. This change [improves performance](https://github.com/vapor/core/pull/203#issue-269485433) of future flattening by ~3x. (#203)
Core 3.8.1
4 years ago
Fixed: - `File.ext` now returns `nil` if the file does not have an extension. (#198)
Core 3.8.0
4 years ago
New: - Add `MediaType.jsonAPI`. (#202) Fixed: - Improve performance of `Future.flatten`. (#199)
Core 3.7.3
4 years ago
Fixed: - Got rid of the last two pesky warnings for Swift 5. (#197, #196)
Core 3.7.2
4 years ago
Fixed: - Fixed some Swift 5 warnings.
linux macOS iOS
vapor/fluent-mysql-driver 4.3.0
πŸ–‹πŸ¬ Swift ORM (queries, models, relations, etc) built on MySQL.
⭐️ 71
πŸ•“ 7 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Update min Swift version to 5.6 and make platform versions consistent
7 weeks ago
###### _This patch was authored and released by @gwynne._
Drop support for Swift 5.4
29 weeks ago
###### _This patch was authored and released by @gwynne._ Also incudes a round of CI modernizations. There are no API or functional changes in this version, but the minimum Swift version bump nonetheless requires this to be a semver-minor release.
Explicitly handle a custom ID key set to the empty string
50 weeks ago
###### _This patch was authored and released by @gwynne._ Treat it as meaning not to retrieve an inserted ID value. This is in support of upcoming FluentKit feature work.
Support the models-with-spaces FluentKit work
1 year ago
###### _This patch was authored and released by @gwynne._ See https://github.com/vapor/fluent-kit/pull/503
Improved error reporting via `DatabaseError`
1 year ago
###### _This patch was authored and released by @gwynne._ `DatabaseError`'s `isSyntaxError` and `isConnectionClosed` properties now correctly respect `MySQLError.invalidSyntax` and `MySQLError.closed` errors. A unit tests for these behaviors is included. Also avoids double-running the FluentBenchmark tests (same change as [fluent-sqlite-driver#75](https://github.com/vapor/fluent-sqlite-driver/pull/75)).
Fix deprecation warnings for TLSConfiguration
1 year ago
###### _This patch was authored and released by @gwynne._ A bit of simple cleanup for the deprecations in NIOSSL.
FluentMySQLDriver 4.0.0
2 years ago
###### _This patch was authored and released by @tanner0101._ Docs: https://docs.vapor.codes/4.0/fluent/overview/ https://docs.vapor.codes/4.0/fluent/model/ https://docs.vapor.codes/4.0/fluent/relations/ https://docs.vapor.codes/4.0/fluent/migration/ https://docs.vapor.codes/4.0/fluent/query/ https://docs.vapor.codes/4.0/fluent/schema/ https://docs.vapor.codes/4.0/fluent/advanced/ More information on Vapor 4 official release: https://forums.swift.org/t/vapor-4-official-release-begins/34802
Fix .references field constraint
2 years ago
###### _This patch was authored and released by @tanner0101._ Adds a fix for a MySQL [syntax quirk](https://stackoverflow.com/questions/14672872/difference-between-references-and-foreign-key) that caused `.references` constraints to be ignored (#191, fixes #170). MySQL does not allow the `REFERENCES foreign_table (column_name)` syntax like Fluent's other drivers do. When it sees this syntax, it simply ignores it with no warning. The only supported method for declaring for keys is to declare them as "table level" constraints. In other words, as a separate item in the create list. This change causes MySQL's `SQLSchemaConverter` to automatically translate field-level foreign key constraints (`.references`) to their table-level counterparts.
Add custom JSON encoder / decoder support
2 years ago
###### _This patch was authored and released by @tanner0101._ Adds support for configuring which JSON coders MySQL uses when serializing nested data to the database (#189). ```swift // Setup custom JSON coders that use unix timestamps let encoder = JSONEncoder() encoder.dateEncodingStrategy = .secondsSince1970 let decoder = JSONDecoder() decoder.dateDecodingStrategy = .secondsSince1970 // Configure MySQL database. app.databaes.use(.mysql( configuration: ..., encoder: MySQLDataEncoder(json: encoder), decoder: MySQLDataDecoder(json: decoder) )) ``` Note that for dates specifically, you can use [`@Timestamp` formats](https://docs.vapor.codes/4.0/fluent/model/#timestamp-format) to configure formatting per field.
Support connection pool timeout configuration
2 years ago
###### _This patch was authored and released by @tanner0101._ Adds `connectionPoolTimeout` (`TimeAmount`) parameter to MySQL configuration methods (#187). ```swift app.databases.use(.mysql(..., connectionPoolTimeout: .seconds(10)) ```
iOS macOS watchOS tvOS linux macOS iOS
vapor/mysql-nio 1.7.0
🐬 Non-blocking, event-driven Swift client for MySQL.
⭐️ 66
πŸ•“ 3 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Parse timestamp columns in text format. Fixes vapor/mysql-nio#71
3 weeks ago
###### _This patch was authored by @samalone and released by @gwynne._ Add support for reading timestamp columns in text format. Fixes #71
Several very long overdue crash fixes
3 weeks ago
###### _This patch was authored and released by @gwynne._ Items of note: - Replaced all the `assert()`s, `precondition()`s, and `fatalError()`s with thrown errors as appropriate. Removes almost every source of crashes - especially ones caused by input the user has no control over - in the package. - Fixes #87 (unexpected packets with no active command cause an assertion failure) - Fixes #91 (server error before handshake throws `invalidProtocolVersion()` instead of the appropriate `.server(ERR_Packet)`) - CI and README updates - Fixes the unit tests so they don't leave stale tables lying around. With the rewrite finally back to being actively worked on, it became really obvious how easy these fixes were to make even in the existing code, and I decided users shouldn't have to wait any longer for them, even if the rewrite drops the next day.
Update min Swift version to 5.6 and make platform versions consistent
7 weeks ago
###### _This patch was authored and released by @gwynne._
Add package minimum versions for all platforms
18 weeks ago
###### _This patch was authored by @elGeekalpha and released by @0xTim._ Adds the correct platform versions to match the Swift Crypto dependency to enable building on all platforms. Solves #81
Improve error handling
1 year ago
###### _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 on `MySQLError`.
Widen our pin on Crypto versions: `"1.0.0" ..< "3.0.0"`
1 year ago
###### _This patch was authored by @fabianfett and released by @gwynne._ Needs patch release.
Clean up the ByteBuffer utility methods
1 year ago
###### _This patch was authored and released by @gwynne._ - Replace the `readNullTerminatedString()` implementation with the much more efficient version used by PostgresNIO. - Made `writeNullTerminatedString()`, `writeLengthEncodedInteger()`, and `writeLengthEncodedSlice()` return the number of bytes written, to match `ByteBuffer` method conventions. - Simplified `[read|write]LengthEncodedInteger()`, might be slightly faster but probably not enough to notice. - Remove a couple of unused utility methods altogether.
Fix hard crash when describing "zero" datetime
1 year ago
###### _This patch was authored and released by @gwynne._ Fixes #63. Also fixes a minor thread-safety issue and clears up deprecation warnings from NIOSSL.
Fix handling of null columns in TextResultSetRow
2 years ago
###### _This patch was authored by @NobodyNada and released by @tanner0101._ When `TextResultSetRow` encountered a null column, it did not increment the buffer index, and so it would repeatedly read `NULL` into every remaining column. This patch fixes the issue and adds regression tests (#57).
Fix auth using empty password with MySQL 5.7
2 years ago
###### _This patch was authored and released by @gwynne._ The following changes have been made: - When using the `mysql_native_password` auth plugin (or when authenticating with MySQL 5.7 in general), an empty password is now correctly treated as specifying no password at all. Fixes https://github.com/vapor/fluent-mysql-driver/issues/195. - The `.CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA` capability, which improves and simplifies auth handling in some common cases, is now correctly supported and reported as such. - The unit tests now support the `MYSQL_USERNAME`, `MYSQL_PASSWORD`, `MYSQL_DATABASE`, and `MYSQL_PORT` env vars. - Small code cleanups.
iOS macOS watchOS tvOS linux macOS iOS
vapor/async-kit 1.17.0
Sugary extensions for the SwiftNIO library
⭐️ 66
πŸ•“ 7 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Update min Swift version to 5.6 and make platform versions consistent
7 weeks ago
###### _This patch was authored and released by @gwynne._
Deprecate EventLoop.performWithTask() in favor of NIO's version
20 weeks ago
###### _This patch was authored and released by @gwynne._
Back deploy concurrency to older Apple Platforms
23 weeks ago
###### _This patch was authored by @sevki and released by @0xTim._ Enables concurrency features on macOS 10.15 et al. Drops support for Swift 5.5.0 and 5.5.1 to match SwiftNIO
Fix NIO "Lock" deprecation warnings
30 weeks ago
###### _This patch was authored and released by @gwynne._ Also drops support for Swift 5.4, since NIO has already done so. More than half of the changes included in this update were contributed by @Colgates in #95 - thanks again!
Enable compilation on iOS
48 weeks ago
###### _This patch was authored by @makleso6 and released by @0xTim._ This adds experimental support for building AsyncKit on iOS from iOS 11 onwards Close #93
Update Supported Swift Versions
1 year ago
###### _This patch was authored and released by @0xTim._ This removes support for Swift 5.2 and Swift 5.3, making Swift 5.4 the earliest supported version [as announced](https://blog.vapor.codes/posts/vapor-swift-versions-update/)
Removed file:line: from signature and code in Future+Try.swift
1 year ago
###### _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 `file:line:` from method signature and calling method. <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
Add `EventLoop.performWithTask(_:)` to complement `EventLoopGroup.performWithTask(_:)`
1 year ago
###### _This patch was authored and released by @gwynne._ Additional changes: - Reimplement `EventLoopGroup.performWithTask(_:)` in terms of `EventLoop.performWithTask(_:)`. - Match implementations to NIO's code patterns for consistency. - Major cleanup of AsyncKit source and tests layout (no functional changes). - Better tests for the `performWithTask()` utilities; somehow we missed that it was originally implemented only on ELG and not EL, even though the exist test should have shown that by not even compiling successfully. - Improvements to the CI workflows to match latest advances. Semver-minor release due to the addition of the missing public API.
adding `performWithTask` convenience func to convert async works to futures
1 year ago
###### _This patch was authored by @MahdiBM and released by @gwynne._ This PR adds a convenience function to convert async works to futures, and reduces the need to directly use promises. As an example, if you have the code below: ```swift let promise = eventLoop.makePromise(of: SomeType.self) promise.completeWithTask { try await myAsyncFunc() } return promise.futureResult ``` It can be reduced to: ```swift return eventLoop.performWithTask { try await myAsyncFunc() } ```
Submit Closure of .tryFuture to Event Loop Thread
1 year ago
###### _This patch was authored and released by @calebkleveter._ Resolves #76 <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
iOS macOS watchOS tvOS linux macOS iOS
vapor/fluent-sqlite-driver 4.4.0
Fluent driver for SQLite
⭐️ 63
πŸ•“ 7 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Update min Swift version to 5.6 and make platform versions consistent
7 weeks ago
###### _This patch was authored and released by @gwynne._
Add experimental support for watchOS
13 weeks ago
###### _This patch was authored by @hyouuu and released by @0xTim._ Adds watchOS adds a target platform to enable it to be built for that platform. **Note:** watchOS support is very much experimental and not currently a supported platform, though there is no reason why it shouldn't work
Drop support for Swift 5.4
29 weeks ago
###### _This patch was authored and released by @gwynne._ Minimum supported version is now Swift 5.5. Also includes the same upgrades to CI as those found in vapor/sqlite-kit#100 (most notably, adding the API breakage check and code coverage).
Explicitly handle a custom ID key set to the empty string
50 weeks ago
###### _This patch was authored and released by @gwynne._ Treat it as meaning not to retrieve an inserted ID value. This is in support of upcoming FluentKit feature work.
Add configurable connection pool timeout
1 year ago
###### _This patch was authored by @madsodgaard and released by @0xTim._ Adds option to configure the connection pool timeout (#74) ```swift databases.use(.sqlite(.memory, connectionPoolTimeout: .minutes(1)), as: .sqlite) ```
Minimum iOS version is 13
2 years ago
###### _This patch was authored and released by @calebkleveter._ The minimum iOS version supported by this package is now iOS 13 since the SqliteKit dependency requires it.
FluentSQLiteDriver 4.0.0
2 years ago
###### _This patch was authored and released by @tanner0101._ Docs: https://docs.vapor.codes/4.0/fluent/overview/ https://docs.vapor.codes/4.0/fluent/model/ https://docs.vapor.codes/4.0/fluent/relations/ https://docs.vapor.codes/4.0/fluent/migration/ https://docs.vapor.codes/4.0/fluent/query/ https://docs.vapor.codes/4.0/fluent/schema/ https://docs.vapor.codes/4.0/fluent/advanced/ More information on Vapor 4 official release: https://forums.swift.org/t/vapor-4-official-release-begins/34802
Clarify ALTER TABLE restrictions
2 years ago
###### _This patch was authored and released by @tanner0101._ Adds new checks and error messages to clarify SQLite's `ALTER TABLE` restrictions (#66, fixes #62).
FluentKit 1.0.0 GM
3 years ago
###### _This patch was authored and released by @tanner0101._ Updates this package for compatibility with latest version of FluentKit.
Removed '.' from FluentKit Dependency Version Identifier
3 years ago
###### _This patch was authored and released by @calebkleveter._
iOS macOS watchOS tvOS linux macOS iOS
vapor/validation 2.1.1
βœ… Extensible data validation library (name, email, etc)
⭐️ 54
πŸ•“ 3 years ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Validation 2.1.1
4 years ago
Fixed: - Improved error messages for `CountValidator` and `RangeValidator`. (#31)
Validation 1.1.2
4 years ago
Validation 2.1.0
4 years ago
New: - Added `.url` validator. (#28) ```swift try validations.add(\.profilePictureURL, .url || .nil) ``` - Added `.empty` validator. (#27) ```swift try validations.add(\.preferedColors, !.empty) ```
Validation 2.0.0
5 years ago
Validation **2.0** is here! πŸŽ‰ βœ… Extensible data validation library (name, email, etc) Docs: [https://docs.vapor.codes/3.0/validation/getting-started/](https://docs.vapor.codes/3.0/validation/getting-started/) API Docs: [https://api.vapor.codes/validation/latest/Validation](https://api.vapor.codes/validation/latest/Validation/index.html) Milestone: [2.0.0](https://github.com/vapor/validation/milestone/4?closed=1) ----------------- Changes since final release candidate: Validation was in need of some love before the official release. The APIs have been streamlined quite a bit. - `Validators` are now accessed via leading-dot syntax instead of globally available types. - `Validatable` now requires a static function instead of a static property. - `Validations` are now generic. - `ValidationData` has been removed in favor of type-safe alternative. - Separate Range and Count validators. - New CharacterSet validator. Here's an example of how the API looks now compared to previous release: ### 2.0.0 ```swift struct User: Validatable, Reflectable, Codable { var id: Int? var name: String var age: Int var email: String? static func validations() throws -> Validations<User> { var validations = Validations(User.self) try validations.add(\.name, .count(5...) && .alphanumeric) try validations.add(\.age, .range(18...)) try validations.add(\.email, .email || .nil) return validations } } ``` ### 2.0.0-rc ```swift struct User: Validatable, Reflectable, Codable { var id: Int? var name: String var age: Int var email: String? static var validations: Validations = [ key(\.name): IsCount(5...) && IsAlphanumeric(), key(\.age): IsCount(18...), key(\.email): IsEmail() || IsNil() ] } ```
Validation 2.0.0 RC 2.1
5 years ago
New: - Use `Core.Reflectable` protocol. [Milestone](https://github.com/vapor/validation/milestone/6?closed=1)
Validation 2.0.0 RC 2
5 years ago
New: - Vapor is now running on Swift NIO! [Milestone](https://github.com/vapor/validation/milestone/5?closed=1)
Validation 2.0.0 RC 1
5 years ago
Validation 2.0.0 Beta 2
5 years ago
New: - Update to latest core dependency.
Validation 2.0.0 Beta 1.1
5 years ago
Validation 2.0.0 Beta 1
5 years ago
linux macOS iOS
vapor/sqlite-kit 4.3.0
Non-blocking SQLite client library with SQL builder built on SwiftNIO
⭐️ 51
πŸ•“ 7 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Update min Swift version to 5.6 and make platform versions consistent
7 weeks ago
###### _This patch was authored and released by @gwynne._
4.2.1
13 weeks ago
## What's Changed * Add API Docs by @0xTim in https://github.com/vapor/sqlite-kit/pull/101 * Switch to reusable CI workflow by @gwynne in https://github.com/vapor/sqlite-kit/pull/102 **Full Changelog**: https://github.com/vapor/sqlite-kit/compare/4.2.0...4.2.1
Modernize SQLite feature support
29 weeks ago
###### _This patch was authored and released by @gwynne._ The following changes have been made: - `SQLiteDatabase` now vends the version of SQLite in use per the `SQLDatabaseReportedVersion` protocol. - `UPSERT` syntax is now available for SQLite when the runtime library version is new enough (3.24.0 or newer) - `RETURNING` syntax is now available for SQLite when the runtime library version is new enough (3.35.0 or newer) - When emitting placeholders for bound parameters, the numbered `?NNN` syntax is now used instead of plain `?` placeholders. - Requests to create columns of type `.bigint` (via `SQLCreateTable` or Fluent's `SchemaBuilder`) now map explicitly to the `INTEGER` type name, which has the same data size but will correctly enable auto-increment behavior if the column is a table's primary key (previously this only worked when specifying `SQLDataType.int` or Fluent equivalent). - Dropped support for Swift up to and including 5.4, 5.5 is now the minimum. - CI was heavily updated, with the same changes as were made to SQLiteNIO. These changes depend on vapor/sqlite-nio#34.
Declare supported UNION features
1 year ago
###### _This patch was authored and released by @gwynne._ Leverages the new dialect flags from [vapor/sql-kit#144](https://github.com/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.
Minimum iOS version is 13
2 years ago
###### _This patch was authored and released by @calebkleveter._ The minimum iOS version supported by this package is now iOS 13 since the SqliteNIO dependency requires it.
Update SQLite to 3.29, match extensions with macOS
2 years ago
Updates to SQLite 3.29.0 and enables extensions similar to macOS's included SQLite (#55).
Fix Package.swift to use release versions
2 years ago
###### _This patch was authored and released by @tanner0101._ Fixes the package's dependencies to require release versions (#89).
SQLiteKit 4.0.0
2 years ago
###### _This patch was authored and released by @tanner0101._ More information on Vapor 4 official release: https://forums.swift.org/t/vapor-4-official-release-begins/34802
Support storing json in text columns
2 years ago
###### _This patch was authored and released by @tanner0101._ Adds support for storing JSON in `TEXT` columns (#87, fixes #54).
Support multiple in-memory databases
2 years ago
###### _This patch was authored and released by @tanner0101._ Adds a new parameter `identifier` to `SQLiteConfiguration.Storage.memory` (#86, fixes #79). This string uniquely identifies the in-memory database. Connections that use the same memory identifier share data. ```swift let configuration = SQLiteConfiguration(storage: .memory(identifier: "foo")) ``` Using `.memory` without specifying an identifier will generate a random value. Only connections using that specific configuration will share data. This means multiple connection sources can now be initialized with separate configuration structs in the same process.
iOS macOS watchOS tvOS linux macOS iOS
vapor/template-kit 1.5.0
πŸ“„ Easy-to-use foundation for building powerful templating languages in Swift.
⭐️ 42
πŸ•“ 3 years ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Support rendering URLs
3 years ago
###### _This patch was authored and released by @tanner0101._ Adds support for serializing URLs in templates (#38, fixes #64).
TemplateKit 1.4.0
3 years ago
New: - Adds a new init method `DateFormat(defaultDateFormatterFactory: () -> DateFormatter)` (#45) - Adds a new static `DateFormat.iso8601` tag that uses ISO-8601 formatting (#45)
TemplateKit 1.3.0
3 years ago
New: - Performance improvements to HTML string escaping (#56) - New `String.htmlEscaped()` method (#56)
TemplateKit 1.2.0
4 years ago
New: - `TemplateDataEncoder` has been refactored for improved performance. (#50) - `DateFormatter`s are now cached during rendering for improved performance. (#51) Fixed: - `DateFormat` now returns null when arguments are null. (#44) - Context `userInfo` does now get passed to nested scopes. (#53, #54) - Using `#for` on null array now returns null. (#55)
TemplateKit 1.1.2
4 years ago
Fixed: - Fixed an issue with `UnsafeBufferPointer` in Swift 5. (#46)
TemplateKit 1.1.1
4 years ago
Fixed: - `userInfo` is now correctly passed when using `#embed`. (#41, #42)
TemplateKit 1.1.0
4 years ago
New: - Performance improvements for files loaded from disk. (#24) - `ViewRenderer` now supports passing a `userInfo` dictionary that will be accessible by `TagRenderer`s. (#17, #28) ```swift return req.view().render("welcome", ["name": "Vapor"], userInfo: ["foo": "bar"]) ``` ```swift final class FooTag: TagRenderer { func render(_ tag: TagContext) -> ... { print(tag.context.userInfo["foo"]) } } ``` Fixed: - Fixed issue which could cause incorrect views to be returned from cache. (#26, #25, #31). - Fixed `LeafDataEncoder` to properly recognize custom encoding methods. (#29, #20, #30). - Fixed `#date` tag crasher. (#23)
TemplateKit 1.0.1
5 years ago
Fixed: - Re-added `ViewRenderer`. Milestone: [1.0.1](https://github.com/vapor/template-kit/milestone/5?closed=1)
TemplateKit 1.0.0
5 years ago
Introducing **Template Kit** 1.0 πŸŽ‰ Template Kit is an easy-to-use foundation for building powerful templating languages in Swift. Docs: [https://docs.vapor.codes/3.0/template-kit/getting-started/](https://docs.vapor.codes/3.0/template-kit/getting-started/) API Docs: [https://api.vapor.codes/template-kit/latest/TemplateKit](https://api.vapor.codes/template-kit/latest/TemplateKit/index.html) Milestone: [1.0.0](https://github.com/vapor/template-kit/milestone/1?closed=1) ----------------- Changes since final release candidate: Fixed: - Audited and internalized several APIs to minimize API surface. - Removed `TemplateData.future` case in favor of `TagRenderer`s returning `Future<TemplateData>` (was redundant previously). - Added lots of missing doc blocks, now at 100% docs coverage.
Template Kit 1.0.0 RC 2.0.1
5 years ago
New: - Adds `isFirst` and `isLast` variables alongside `index` while using iterators.
linux macOS iOS
vapor/url-encoded-form 1.1.0
πŸ“ Parse and serialize url-encoded form data with Codable support.
⭐️ 41
πŸ•“ 3 years ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Add support for Codable types with URL properties.
3 years ago
Add support for encoding and decode URLs. Fixes #24
URLEncodedForm 1.0.7
3 years ago
Encodes reserved characters like `&` in URL-encoded form keys and values.
URL-Encoded Form 1.0.6
4 years ago
Fixed: - Silenced a Swift 5 warning.
URL-Encoded Form 1.0.5
4 years ago
Fixed: - Fixes an issue that prevented nested structs from being properly decoded. (#16, #15) - Added tests to ensure nested enums decode properly. (#10) - Added special `Decimal` conformance to decode / encode as a `String`. (#11)
URL-Encoded Form 1.0.4
4 years ago
Fixed: - Worked around a compiler bug that prevented building on Swift 4.2 (#12, #13).
URL-Encoded Form 1.0.3
5 years ago
Fixed: - Percent encoded ampersands are now decoded properly (#8). - Keyed decoding errors now have correct key path (#7). Milestone: [1.0.3](https://github.com/vapor/url-encoded-form/milestone/4?closed=1)
URL-Encoded Form 1.0.2
5 years ago
Fixed: - `RawRepresentable` enums should now work properly (#5). - Added support for fuzzy `Bool` (#3, #5) Milestone: [1.0.2](https://github.com/vapor/url-encoded-form/milestone/3?closed=1)
URL-Encoded Form 1.0.1
5 years ago
Fixed: - Fixed a warning about `fileprivate` extensions.
URL-Encoded Form 1.0.0
5 years ago
Introducing URL-encoded Form 1.0! πŸŽ‰ πŸ“ Previously this package was part of Vapor, but now it has been separated so that any Swift project can take advantage of it. This package parses and serializes url-encoded form data with Codable support. Docs: [https://docs.vapor.codes/3.0/url-encoded-form/getting-started/](https://docs.vapor.codes/3.0/url-encoded-form/getting-started/) API Docs: [https://api.vapor.codes/url-encoded-form/latest/URLEncodedForm](https://api.vapor.codes/url-encoded-form/latest/URLEncodedForm/index.html) Milestone: [1.0.0](https://github.com/vapor/url-encoded-form/milestone/1?closed=1)
linux macOS iOS
vapor/database-kit 1.3.3
πŸ—„ Core services for creating database integrations.
⭐️ 39
πŸ•“ 4 years ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
DatabaseKit 1.3.3
4 years ago
Fixed: - `KeyedCache.get(_:)` is no longer internal. (#50, #57)
DatabaseKit 1.3.2
4 years ago
Fixed: - Fixed an error that could cause connection pool to be exhausted when creating new connections failed. (#51)
DatabaseKit 1.3.1
4 years ago
Fixed: - `DatabaseConnectionPoolConfig` now defaults to a max of `10` connections per pool. (#47, #45, #48) Previously, the max connections per pool would default to `System.coreCount`. This could create hanging request issues on some Linux deploys where the core count was `1`. If a max of `10` is too high, you can still of course configure this to any value you want using the following snippet during service configuration. ```swift services.register { container in return DatabaseConnectionPoolConfig(maxConnections: 5) } ```
DatabaseKit 1.3.0
4 years ago
New: - Adds a new `connectionPool` parameter when requesting a cached connection from a container. (#43, #44).
DatabaseKit 1.2.0
4 years ago
New: - Adds [`DatabaseQueryable`](https://api.vapor.codes/database-kit/latest/DatabaseKit/Protocols/DatabaseQueryable.html) protocol for uniting DB query APIs across drivers (#39).
DatabaseKit 1.1.0
4 years ago
New: - `DatabaseConnection` now has an associated database type (#38).
Database Kit 1.0.1
5 years ago
Fixed: - Added deprecations for `requestConnection(...)` and `releaseConnection(...)` extensions on `Container`. Milestone: [1.0.1](https://github.com/vapor/database-kit/milestone/11?closed=1)
Database Kit 1.0.0
5 years ago
Introducing Database Kit **1.0** πŸŽ‰ πŸ—„ Core services for creating database integrations. Docs: [https://docs.vapor.codes/3.0/database-kit/getting-started/](https://docs.vapor.codes/3.0/database-kit/getting-started/) API Docs: [https://api.vapor.codes/database-kit/latest/DatabaseKit](https://api.vapor.codes/database-kit/latest/DatabaseKit/index.html) ------------- Changes since last RC: New: - `ConfiguredDatabase` type for more consistent connection configuration. - `DatabaseKeyedCache` type replaces Fluent keyed cache. Fixed: - `DatabaseConfig` renamed to `DatabasesConfig` to make it clear that it is for configuring _multiple_ dbs. - `withConnection(...)` renamed to `withNewConnection(...)` to better distinguish it from the pooled methods. Milestone: [1.0.0](https://github.com/vapor/database-kit/milestone/10?closed=1)
DatabaseKit 1.0.0 RC 2.2.1
5 years ago
New: - Added a [`databaseName`](https://api.vapor.codes/database-kit/1.0.0-rc.2.2.1/DatabaseKit/Extensions/URL.html#/s:10Foundation3URLV11DatabaseKitE12databaseNameSSSgv) property to `URL`. API Docs: [https://api.vapor.codes/database-kit/1.0.0-rc.2.2.1/DatabaseKit/](https://api.vapor.codes/database-kit/1.0.0-rc.2.2.1/DatabaseKit/index.html) [https://api.vapor.codes/database-kit/1.0.0-rc.2.2.1/SQL/](https://api.vapor.codes/database-kit/1.0.0-rc.2.2.1/SQL/index.html)
Database Kit 1.0.0 RC 2.1.1
5 years ago
Fixed: - Fixed an issue where IN/NOT-IN predicates with 0 or 1 values would serialize incorrectly. Milestone: [1.0.0-rc.2.1.1](https://github.com/vapor/database-kit/milestone/9?closed=1)
linux macOS iOS
vapor/leaf-kit 1.10.2
πŸƒ An expressive, performant, and extensible templating language built for Swift.
⭐️ 38
πŸ•“ 10 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Add missing platform specifiers
10 weeks ago
###### _This patch was authored and released by @gwynne._ Match Vapor's support
Fix error message in loop syntax
12 weeks ago
###### _This patch was authored and released by @0xTim._ Syntax errors thrown from loops now show the correct error message!
add isEmpty tag
12 weeks ago
###### _This patch was authored by @fananek and released by @0xTim._ Adds a new `isEmpty` tag for checking empty Strings. Equivalent of Swift's `isEmpty` Example: ```leaf #if(isEmpty(emptyString)): This is an empty string. #endif ```
Extend for loops with custom index support
12 weeks ago
###### _This patch was authored by @vzsg and released by @0xTim._ Traditionally, the `for` loops in Leaf declare three variables in the loop's local context: `isFirst`, `isLast` and `index`. The first two aren't particularly interesting, but being able to access all indices in a *nested* for loop situation is sometimes useful when working with two dimensions at once. Not to mention it just popped up on Discord earlier today. This PR extends Loop with the option of renaming `index`. Example syntax: ```leaf #for(i, array in arrays): #for(j, element in array): (#(i), #(j)): #(element) #endfor #endfor ``` --- Should be semver-minor.
Add #dumpContext tag
41 weeks ago
###### _This patch was authored by @marius-se and released by @0xTim._ Adds a new tag, `#dumpContext()` that renders the whole context for easy debugging
Adds a new `#with()` tag to make it easier to embed and extend tags
41 weeks ago
###### _This patch was authored by @pontaoski and released by @0xTim._ Adds a new `#with()` tag to make it easier to work with extend and embed tags: ```leaf #with(parent): #(child) #endwith ```
Update Supported Swift Versions
1 year ago
###### _This patch was authored and released by @0xTim._ This removes support for Swift 5.2 and Swift 5.3, making Swift 5.4 the earliest supported version [as announced](https://blog.vapor.codes/posts/vapor-swift-versions-update/)
Fix warning from compiler issue in Swift 5.6
1 year ago
###### _This patch was authored and released by @0xTim._ Resolves a compiler warning introduced in Swift 5.6 Resolves #99
Ignore unfound import
1 year ago
###### _This patch was authored by @fananek and released by @0xTim._ This makes the renderer and serializer ignore imports in case no corresponding export has been found rather than erroring by default. This also adds a new configuration flag `ignoreUnfoundImports` to allow you to set the behaviour to error on non-existent imports Fixes #84
Fix variable ambiguity
1 year ago
###### _This patch was authored and released by @0xTim._ Fix variable ambiguity in the LeafSerializer introduced in 1.3.0 that causes build failures in some vesions of Swiftο»Ώ
iOS macOS watchOS tvOS linux macOS iOS
vapor/sqlite-nio 1.5.2
Non-blocking wrapper for libsqlite3-dev using SwiftNIO
⭐️ 38
πŸ•“ 2 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Embed sqlite amalgamation v3.42.0 source code
2 weeks ago
###### _This patch was authored and released by @gwynne._ Update embedded SQLite from 3.41.2 to 3.42.0 ([SQLite release notes](https://sqlite.org/releaselog/3_42_0.html))
fix: Corrects possible leaking promise in `query`
3 weeks ago
###### _This patch was authored by @NeedleInAJayStack and released by @gwynne._ <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> Similar to https://github.com/vapor/sqlite-nio/pull/44, this removes a leaking promise when calling `query` on an inactive thread pool. <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
Update min Swift version to 5.6 and make platform versions consistent
7 weeks ago
###### _This patch was authored and released by @gwynne._
Patch SQLite to silence spurious C warnings and fix data race in sqlite3_last_insert_rowid()
10 weeks ago
###### _This patch was authored and released by @gwynne._ The patch is automatically applied when updating SQLite and is carefully designed to be as minimal as possible.
Embed sqlite amalgamation v3.41.2 source code
10 weeks ago
###### _This patch was authored and released by @gwynne._ Update embedded SQLite from 3.41.1 to 3.41.2 ([SQLite release notes](https://sqlite.org/releaselog/3_41_2.html))
fix: No longer fatal errors on inactive thread pool
11 weeks ago
###### _This patch was authored by @NeedleInAJayStack and released by @gwynne._ Previously, trying to open a connection on an inactive thread pool would throw `Fatal error: leaking promise created at (file: "SQLiteNIO/SQLiteConnection.swift", line: 101)`. This was because the promise created on line 101 of SQLiteConnection.swift would not be succeeded or failed when the `runIfActive` was called on an inactive thread pool. To resolve this, we avoid creating a new `Promise` altogether, just using the one that `runIfActive` provides. <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
Embed SQLite 3.41.1, add string datetime support, and support custom functions
11 weeks ago
## [Add support for datetime string formats](https://github.com/vapor/sqlite-nio/pull/42) _by @NeedleInAJayStack_ Previously, dates were only interpreted from `Double` or `Int` SQLite representations, which caused issues with decoding values of `CURRENT_DATE` and `CURRENT_TIMESTAMP`, which output formatted strings. This PR adds support to interpret dates from strings, matching the formats output by the `date()` and `datetime()` [SQLite functions](https://www.sqlite.org/lang_datefunc.html), which includes the `CURRENT_DATE` and `CURRENT_TIMESTAMP` constants. ## [SQLite Custom Functions are now supported](https://github.com/vapor/sqlite-nio/pull/25) _by @danramteke_ This PR adds custom function support to `sqlite-nio`. Both custom functions and custom aggregates are supported. To find out more about these features, please see the SQLite website about them: https://www.sqlite.org/appfunc.html There are some queries only possible using custom functions. And further, custom function help soften the need for custom builds of SQLite with various parts of the SQLite amalgamation enabled or disabled: one can simply write a custom function instead. I have adapted this code from `https://github.com/groue/GRDB.swift/blob/master/GRDB/Core/DatabaseFunction.swift` by @groue. Because GRDB doesn't support Linux or NIO, I was motivated to adapt his code. Example: ```swift func testFunctionArgumentString() throws { let conn = try SQLiteConnection.open(storage: .memory, threadPool: self.threadPool, on: self.eventLoop).wait() defer { try! conn.close().wait() } let fn = SQLiteCustomFunction("f", argumentCount: 1) { (values: [SQLiteData]) in return values[0].string } try conn.install(customFunction: fn).wait() XCTAssertNil(try conn.query("SELECT f(NULL) as result") .map { rows in rows[0].column("result")?.string }.wait()) XCTAssertEqual("foo", try conn.query("SELECT f('foo') as result") .map { rows in rows[0].column("result")?.string }.wait()) } ``` There are many more examples in the new unit test file. ## [Embed sqlite amalgamation v3.41.1 source code](https://github.com/vapor/sqlite-nio/pull/43) _by @gwynne_ Update embedded SQLite from 3.41.0 to 3.41.1 ([SQLite release notes](https://sqlite.org/releaselog/3_41_1.html))
Embed sqlite amalgamation v3.41.0 source code
14 weeks ago
###### _This patch was authored and released by @gwynne._ Update embedded SQLite from 3.40.0 to 3.40.1 ([SQLite release notes](https://sqlite.org/releaselog/3_41_0.html))
Revert warning flags change
17 weeks ago
###### _This patch was authored and released by @gwynne._ SwiftPM does not want it to be possible to work around Xcode's abysmal quality control. Oh well πŸ™‚. Fixes #38
Fix SQLite build configuration
18 weeks ago
###### _This patch was authored and released by @gwynne._ SQLite is now build with the intended thread safety configuration. Warnings emitted when building in Xcode (due to Xcode not matching SwiftPM's default compiler flags) are now silenced.
iOS macOS watchOS tvOS linux macOS iOS
vapor/fluent-mongo-driver 1.3.1
MongoDB support for Fluent built on MongoKittten.
⭐️ 21
πŸ•“ 2 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Work around dependency conflict in latest DNSClient
2 weeks ago
###### _This patch was authored and released by @gwynne._ Pins DNSClient to a version that doesn't exhibit the conflict for now.
Update min Swift version and platforms requirements
4 weeks ago
###### _This patch was authored and released by @gwynne._ Swift 5.6 is now the minimum supported version.
Add minimal support for the new `.advancedJoin()` join type in Fluent
16 weeks ago
###### _This patch was authored and released by @gwynne._ Restores compatibility with FluentKit 1.37.0
Update minimum Swift version to 5.5
27 weeks ago
###### _This patch was authored and released by @gwynne._ Also modernize CI.
Fix build error with new Fluent support for models with composite primary keys
50 weeks ago
###### _This patch was authored and released by @gwynne._ Also follows suit with other Vapor packages, plus NIO, by dropping support for Swift 5.2 and 5.3.
Support the models-with-spaces FluentKit work
1 year ago
###### _This patch was authored and released by @gwynne._ See vapor/fluent-kit#503
Make `FluentMongoError` public
1 year ago
###### _This patch was authored by @MFranceschi6 and released by @0xTim._ Make `FluentMongoError` public so it can be examined by end-users. Fixes #45
Upgrade MongoKitten Version
2 years ago
###### _This patch was authored by @qi-shun-wang and released by @0xTim._ When receiving a lot of MongoDB traffic (millions of requests), a small leak in MongoKitten would become a performance and memory problems in services. This patch depends on the MongoKitten version with that fix. See: https://github.com/OpenKitten/MongoKitten/issues/254
Add contains operator support
2 years ago
###### _This patch was authored and released by @tanner0101._ Adds support for the contains (`~~`) operator (#35).
Release FluentMongoDriver 1.0.0
2 years ago
###### _This patch was authored and released by @Joannis._ Docs: https://docs.vapor.codes/4.0/fluent/overview/ https://docs.vapor.codes/4.0/fluent/model/ https://docs.vapor.codes/4.0/fluent/relations/ https://docs.vapor.codes/4.0/fluent/migration/ https://docs.vapor.codes/4.0/fluent/query/ https://docs.vapor.codes/4.0/fluent/schema/ https://docs.vapor.codes/4.0/fluent/advanced/#mongodb More information on Vapor 4 official release: https://forums.swift.org/t/vapor-4-official-release-begins/34802
iOS macOS watchOS tvOS linux macOS iOS
vapor/kafka 0.0.0
Swift Apacha Kafka (real-time data pipelines and streaming apps)
⭐️ 19
πŸ•“ 2 years ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
First initial release
5 years ago
vapor/queues-redis-driver 1.1.1
A Redis implementation for https://github.com/vapor/queues
⭐️ 17
πŸ•“ 5 days ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Implemented redisTLSClient and add it to the RedisConnectionPool
5 days ago
###### _This patch was authored by @Kishimotovn and released by @gwynne._ This PR is to mirror the updates from https://github.com/vapor/redis/pull/205 to the Queues Redis Driver to support SSL connection for Redis.
Misc cleanups
5 days ago
###### _This patch was authored and released by @gwynne._ - Updates min Swift version to 5.6 to match Vapor - Updates CI (it's a Gwynne PR, what were you expecting?) - Updates README
Add missing platform specifiers
10 weeks ago
###### _This patch was authored and released by @gwynne._ Also bump Swift version minimum to something closer to Vapor's
Use `context.eventLoop` for executing redis commands
2 years ago
###### _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 default `RedisConnectionPool`s `RedisConnection` eventLoop for commands.
Fixes delayed jobs being kept in the processing queue.
2 years ago
###### _This patch was authored by @Andrewangeta and released by @jdmcd._ Pushing delayed jobs back into the queue should also remove them from the processing queue. <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
Sets the Date encoding/decoding strategy for getting and setting values.
2 years ago
###### _This patch was authored by @Andrewangeta and released by @jdmcd._ <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> Sets the Date encoding/decoding strategy for getting and setting values. (This should only effect top level properties like `queuedAt` and `delayUntil` not the custom payload) <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
1.0.0
2 years ago
Please see the [docs](https://docs.vapor.codes/4.0/queues/) for using queues.
Use Redis v4 release
2 years ago
###### _This patch was authored and released by @Mordil._
Drop RedisKit dependency to use Vapor/Redis directly
2 years ago
###### _This patch was authored by @Mordil and released by @0xTim._ Drop RedisKit and use Vapor/Redis directly (#19)
Updated Vapor and Queues Releases
3 years ago
- Updates to official Vapor and Queues releases. - Adds doc blocks.
iOS macOS watchOS tvOS linux macOS iOS
vapor/redis-kit 1.0.0-beta.5.1
Helpful extensions and abstractions for using RediStack
⭐️ 8
πŸ•“ 2 years ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
RedisKit 1.0.0 Beta 5.1
2 years ago
The package manifest now pins exactly to the last RediStack alpha release (`1.0.0-alpha.10`) #34
Update to RediStack Alpha 8
3 years ago
###### _This patch was authored by @Mordil and released by @tanner0101._ Updates to latest RedisStack alpha (#31, #30).
Swift 5.2 + macOS 10.15
3 years ago
Updates package requirements. This patch was authored and released by @tanner0101.
RedisStack Alpha 7 updates
3 years ago
Updates to RedisStack 1.0.0 Alpha 7 with support for `Logger` passing (#26)
RedisKit 1.0.0 Beta 2
3 years ago
Update to AsyncKit beta 2.
RedisKit 1.0.0 Beta 1
3 years ago
Update to AsyncKit 1.0.0 Beta 1.
RedisKit 1.0.0 alpha 3
3 years ago
- Added `RedisSet` helper for working with Redis' set API. (#18) - Added `get` / `set` helpers for working with JSON encoded data using `Codable`. (#15, #19)
RedisKit 1.0.0 Alpha 2
3 years ago
## Major - Updates to latest RedisNIO (now called RediStack) #17
RedisKit 1.0.0 Alpha 1.1
3 years ago
Fixed: - `isClosed` now returns the correct value. (#16)
RedisKit 1.0.0 Alpha 1
3 years ago
More information on Vapor 4 alpha releases: https://medium.com/@codevapor/vapor-4-alpha-1-releases-begin-94a4bc79dd9a API Docs: https://api.vapor.codes/redis-kit/master/RedisKit/index.html
macOS

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics