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.65.2
πŸ’§ A server-side Swift HTTP web framework.
⭐️ 22,107
πŸ•“ 1 week 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.
Fixing issue #2755: updating config storage inside HTTPServer
1 week ago
###### _This patch was authored by @rkreutz and released by @gwynne._ We can update application.storage from within HTTPServer, this way we can keep any changes that happen to the configuration internally up-to-date with the application storage. This possibly has the least changes and less surface of potential flaws, since we are only adding an extra param and working on top of it. However, now we are setting the application storage from within `HTTPServer`, there is no issue with that, is just that now we have 2 places changing the storage for the config. Resolves #2755
Add missing protocol `ExpressibleByStringLiteral` to `HTTPHeaders.Name`
5 weeks ago
###### _This patch was authored by @grahamburgsma and released by @0xTim._ Add missing protocol `ExpressibleByStringLiteral` to `HTTPHeaders.Name`. The implementation `init(stringLiteral:)` was there, but the actual protocol was missing.
Implement support for custom verify callbacks
7 weeks ago
###### _This patch was authored by @Lukasa and released by @0xTim._ Motivation When using NIOSSL it is sometimes necessary to completely take over the certificate verification logic. NIOSSL exposes a callback for this, but it's currently hidden from Vapor users. We should let them get access to this callback. Modifications - Added the callback to the HTTPServer configuration struct. - Plumbed the callback through. - Added some invalid test certs to the resources for the tests. - Added a test to confirm the override functions correctly. Result Users can override client cert validation.
Add support for regular expression validations
9 weeks ago
###### _This patch was authored by @K1NXZ and released by @0xTim._ Validate a regular expression pattern Example: ```swift struct TestContent: Codable, Validatable { static func validations(_ validations: inout Validations) { validations.add("numbersOnly", as: String.self, is: .pattern("^[0-9]*$")) } let numbersOnly: String init(numbersOnly: String) { self.numbersOnly = numbersOnly } } ```
Add documentation comments and a defaulting subscript to `Storage`.
9 weeks ago
###### _This patch was authored and released by @gwynne._ The new subscript simplifies "provider" implementations that extend `Application` and use its `Storage` instance without complex initialization requirements: ```swift extension Application { public struct Foo { final class Storage { /* content which needs no special initialization */ } struct Key: StorageKey { typealias Value = Storage } let application: Application // Before: var storage: Storage { if self.application.storage[Key.self] == nil { self.initialize() } return self.application.storage[Key.self]! } func initialize() { self.application.storage[Key.self] = .init() } // After: var storage: Storage { self.application.storage[Key.self, default: .init()] } ```
fix: validate each not taking required parameter into account
9 weeks ago
###### _This patch was authored by @BasPeter and released by @0xTim._ - Required parameter in add(each) now taken into account for validation - Add tests for required false test case
Fix CredentialsAuthenticator not receiving all the body
12 weeks ago
###### _This patch was authored and released by @0xTim._ This is a workaround for #2742. This ensures the request body is available in the middleware rather than it failing silently.
Conform `Bool` to `Content`
14 weeks ago
###### _This patch was authored by @josercc and released by @0xTim._ Conform `Bool` to `Content` to allow `Bool` types to be returned to the top level ```swift app.get("isOK") { req in return true } ```
4.61.1
16 weeks ago
⚠️ Security Update ⚠️ This release fixes an issue where the `URLEncodedFormDecoder ` was vulnerable to a Denial of Service attack. Largely nested data would cause a stack overflow crash. We recommend upgrading to this release as soon as possible. For more details see the [security advisory GHSA-qvxg-wjxc-r4gg](https://github.com/vapor/vapor/security/advisories/GHSA-qvxg-wjxc-r4gg). This has been designated as `CVE-2022-31019`
4.61.0
16 weeks ago
## What's Changed * Fix issue with tail content-range headers by @BennyDeBock in https://github.com/vapor/vapor/pull/2840 * Clean up use of C targets in Vapor by @gwynne in https://github.com/vapor/vapor/pull/2832 * Update depencendy as it's now required by @0xTim in https://github.com/vapor/vapor/pull/2842 * Expose `Response`'s `Upgrader` field by @GNMoseke in https://github.com/vapor/vapor/pull/2817 * Support for `peerAddress` on `Request` by @paunik in https://github.com/vapor/vapor/pull/2822 ## New Contributors * @GNMoseke made their first contribution in https://github.com/vapor/vapor/pull/2817 * @paunik made their first contribution in https://github.com/vapor/vapor/pull/2822 **Full Changelog**: https://github.com/vapor/vapor/compare/4.60.3...4.61.0
iOS macOS watchOS tvOS linux macOS iOS
vapor/fluent 4.5.0
Vapor ORM (queries, models, and relations) for NoSQL and SQL databases
⭐️ 1,170
πŸ•“ 6 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 `asyncCredentialsAuthenticator` to `ModelCredentialsAuthenticatable`
6 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
48 weeks ago
###### _This patch was authored and released by @0xTim._ Adds initial support for async/await
Fix conditional Codable conformance
1 year 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
1 year 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
1 year 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
1 year 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
Fluent 4.0.0
2 years ago
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
Adds the ability to retrieve query history
2 years ago
###### _This patch was authored and released by @mcdappdev._ Tracks database query history for a `Request` or `Application` (#689). To use on the `Application`: ```swift app.fluent.history.start() app.fluent.history.stop() app.fluent.history.clear() ``` Access the history by calling: ```swift app.fluent.history.queries ``` The same methods/properties exist on `Request`: ```swift req.fluent.history.start() req.fluent.history.stop() req.fluent.history.clear() req.fluent.history ```
FluentKit 1.0.0 GM
2 years ago
###### _This patch was authored and released by @tanner0101._ Updates this package for compatibility with latest version of FluentKit.
Add unique index to SessionRecord key
2 years ago
###### _This patch was authored by @SusanDoggie and released by @tanner0101._ Adds a unique index to `SessionRecord.key` to improve data integrity and key lookup performance (#680). ⚠️ If you have already added the `SessionRecord` migration in production, you will need to add this unique index manually.
macOS linux macOS iOS
vapor/redis 5.0.0-alpha.1
Vapor provider for RediStack
⭐️ 452
πŸ•“ 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.
Redis 5.0.0 Alpha 1
23 weeks 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
31 weeks 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`
48 weeks ago
###### _This patch was authored and released by @0xTim._ Add `async` APIs for Redis
Expose method on Redis objects to lease connections
51 weeks 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
1 year 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) ```
Add cache protocol
1 year ago
###### _This patch was authored and released by @tanner0101._ Add Redis implementation for Vapor's new cache protocol: https://github.com/vapor/vapor/pull/2558 ```swift // Use redis as application cache app.caches.use(.redis) ```
Use passed-in eventloop when acquiring RedisConnectionPool
1 year ago
###### _This patch was authored and released by @siemensikkema._ Use the passed-in eventloop when acquiring RedisConnectionPool to prevent triggering a precondition related to ending up in a wrong eventloop (fixes #180, replaces: #183).
Support for Multiple Redis instances
1 year ago
###### _This patch was authored by @danramteke and released by @Mordil. #120_ ## Usage Assuming a `redis1` ID has been defined, ```swift extension RedisID { static var redis1: RedisID { RedisID("redis1") } } ``` The Redis configuration in `configure.swift` can look like this: ```swift app.redis.configuration = try RedisConfiguration(url: Environment.get("REDIS_URL")!) app.redis(.redis1).configuration = try RedisConfiguration(url: Environment.get("REDIS_URL_1")!) app.redis(.redis2).configuration = try RedisConfiguration(url: Environment.get("REDIS_URL_2")!) ``` and then the routes in `routes.swift` can look like this: ```swift app.get("redis") { req in req.redis.get("name").map { respValue in return respValue.string ?? "name not found in default Redis" } } app.get("redis1") { req in req.redis(.redis1).get("name").map { respValue in return respValue.string ?? "name not found in Redis 1" } } ``` ### Default Redis All previous syntax is still supported. If the `redis` property is used rather than the `redis(_:)` method, it will always refer to the `default` `RedisID`.
Redis 4.0.0
1 year ago
Docs can be found at https://docs.vapor.codes/4.0/redis/overview/
Change Sessions driver to be generic
1 year ago
###### _This patch was co-authored by @Mordil and @gwynne and released by @Mordil._ This changes the `RedisSessionsDriver` to be generic over the `RedisSessionsDelegate` to drop the performance overhead of the delegate existential. In general, no one should see a breaking change unless you were passing a `RedisSessionsDelegate` as an existential - as you will see the "RedisSessionsDelegate cannot be passed to a generic context" message
macOS linux macOS iOS
vapor/console-kit 4.5.0
πŸ’» APIs for creating interactive CLI tools.
⭐️ 368
πŸ•“ 8 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 Supported Swift Versions
8 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
15 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
18 weeks 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
18 weeks 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
1 year 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
1 year 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
1 year 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"
1 year ago
###### _This patch was authored and released by @MrLotU._ Reverts vapor/console-kit#153 to fix build errors introduced in 4.2.2
Modernization of secure input using Console
1 year ago
###### _This patch was authored and released by @gwynne._ `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.
iOS macOS linux macOS iOS
vapor/leaf 4.2.2
πŸƒ An expressive, performant, and extensible templating language built for Swift.
⭐️ 361
πŸ•“ 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.
Add Swift Algorithms as an explicit dependency
Yesterday
###### _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
5 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
19 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/)
Add experimental support for iOS
33 weeks 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
40 weeks 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
1 year 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`
1 year 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
Extend 'LeafRenderer' so that it can render 'Encodable' contexts
1 year ago
###### _This patch was authored by @glbrntt and released by @0xTim._ Out of the box, the `LeafRenderer` offers a base API which can render Leaf templates to a `ByteBuffer`. This requires the context to be provided as a dictionary. With `ViewRenderer` conformance the `LeafRenderer` can render `View`'s using an `Encodable` context. However, there's no middle ground: the `LeafRenderer` can't render templates to a `ByteBuffer` using an `Encodable` context. Since `LeafEncoder` is internal users can't make the extra hop from `Encodable` context to dictionary to use the base API either. This functionality is helpful when Leaf is used to render documents which aren't HTML. As such this change adds an extension to `LeafRenderer` to render a template to serialized bytes using an `Encodable` context.
Disable Leaf Cache for the Renderer in development
1 year ago
###### _This patch was authored and released by @0xTim._ Disable the cache in Leaf's renderer when the environment is set to development. Resolves #185
iOS macOS linux macOS iOS
vapor/jwt 4.2.1
Vapor JWT provider
⭐️ 293
πŸ•“ 11 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 `@discardableResult` attribute to `verify(as:)` functions
11 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
19 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/)
Add support for `async`/`await`
48 weeks 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
2 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
2 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
2 years ago
###### _This patch was authored by @grosch and released by @gwynne._ Updated based on the recent changes to JWT-Kit
Make HMAC signers thread safe
2 years ago
Makes HMAC JWT signers (`hs256`, `hs384`, `hs512`) thread safe (#117).
macOS linux macOS iOS
vapor/http 3.4.0
πŸš€ Non-blocking, event-driven HTTP built on Swift NIO.
⭐️ 235
πŸ•“ 51 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.
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
2 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
3 years ago
New: - Publicize `HTTPMessageDecoder.decode` extension. (#359) - Added support for decoding `jsonAPI` media type. (#359)
HTTP 3.1.11
3 years ago
Fixed: - Silenced a Swift 5 warning. (#351)
HTTP 3.1.10
3 years ago
Fixed: - Fixed an issue that could cause unnecessary re-allocations during large file uploads. (#346)
HTTP 3.1.9
3 years ago
Fixed: - Fixed a bug that could cause cookies to be duplicated if added one-by-one. (#343)
HTTP 3.1.8
3 years ago
Fixed: - HTTP upgrade requests now forward bytes buffered during upgrade. (#324)
HTTP 3.1.7
3 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
3 years ago
Fixed: - Improved `HTTPProtocolUpgrader`'s error handling (leaking promise assertion). (#316, #315)
linux macOS iOS
vapor/toolbox 18.6.0
Simplifies common command line tasks when using Vapor
⭐️ 235
πŸ•“ 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.
Add support for Package.resolved v2
2 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
2 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
14 weeks ago
Fixes a typo in the message when creating a new project
18.5.0
15 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
18 weeks 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
18 weeks 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`
28 weeks 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
30 weeks 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
Improve the messaging for the version command
30 weeks ago
###### _This patch was authored by @BennyDeBock and released by @0xTim._ When using _vapor --version_, the output in a non vapor directory would be ```bash # note: no Package.resolved was found. # framework: not found # toolbox: 18.3.3 ``` This pr changes those framework and note texts to: ```bash # note: no Package.resolved file was found. Possibly not currently in a Swift package directory # framework: vapor framework for this project: no Package.resolved file found. Please ensure you are in a Vapor project directory. If you are, ensure you have built the project with 'swift build'. You can create a new project with 'vapor new MyProject' ``` in projects that have no Package.resolved. in projects that do have a Package.resolved but that aren't Vapor projects it changes the framework text to: ```bash # framework: vapor framework for this project: this Swift project does not depend on Vapor. Please ensure you are in a Vapor project directory. If you are, ensure you have built the project with 'swift build'. You can create a new project with 'vapor new MyProject' ``` closes #345
Add Kebab case support to TemplateScaffolder context
1 year ago
###### _This patch was authored by @marzvrover and released by @0xTim._ This adds support for `kebab_names` in templates to avoid issues where certain contexts require lowercase variables (such as Docker compose). Fixes #334
macOS
vapor/mysql-kit 4.5.2
🐬 Pure Swift MySQL client built on non-blocking, event-driven sockets.
⭐️ 193
πŸ•“ 8 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 locking clause syntax to dialect
8 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
9 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
39 weeks 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
41 weeks 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
46 weeks 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.
Address issues in decoding data from the database
1 year ago
###### _This patch was authored and released by @gwynne._ See commit log for details; in short, the `MySQLDataDecoder` logic has been retooled to fix some usage errors, address a couple of very minor bugs, and slightly improve performance. Additional changes: - Fixes `TLSConfiguration.forClient()` deprecation warnings by using `.makeClientConfiguration()` instead as recommended. - Some well-overdue updates to CI for this package. Note: While these changes do not add any new public API, they are nonetheless marked as `semver-minor` to reflect the addition of a new explicit dependency on a recent version of NIOSSL.
Set default mysql port to 3306
2 years ago
###### _This patch was authored by @zengxs and released by @gwynne._
MySQLKit 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
Improve encode/decode error messages
2 years ago
###### _This patch was authored and released by @tanner0101._ Improves encode / decode error messages by including the actual value (#287, fixes #283).
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 conforming to SQLKit's APIs (#285, fixes #252). ```swift // Some existing conformer to `MySQLDatabase` let mysql: MySQLDatabase = ... // Setup custom JSON coders that use unix timestamps let encoder = JSONEncoder() encoder.dateEncodingStrategy = .secondsSince1970 let decoder = JSONDecoder() decoder.dateDecodingStrategy = .secondsSince1970 // Use `sql()` method to create a `SQLDatabase` passing in // MySQL coders that use the custom JSON coders. let sql = mysql.sql( encoder: MySQLDataEncoder(json: encoder), decoder: MySQLDataDecoder(json: decoder) ) // Sample model with nested JSON field. struct Foo: Codable, Equatable { struct Bar: Codable, Equatable { var baz: Date } var bar: Bar } // New instance to create. let foo = Foo( bar: Bar( baz: Date(timeIntervalSince1970: 1337) ) ) // INSERT INTO `foo` (`bar`) VALUES (?) ["{\"baz\":1337}"] try db.insert(into: "foo").model(foo).run().wait() ```
macOS linux macOS iOS
vapor/websocket-kit 2.6.1
WebSocket client library built on SwiftNIO
⭐️ 191
πŸ•“ 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.
Remove use of NIOAtomics in favor of Atomics
7 weeks ago
###### _This patch was authored by @MahdiBM and released by @0xTim._ ### The Problem Starting with [`SwiftNIO` 2.41.0](https://github.com/apple/swift-nio/releases/tag/2.41.0), `NIOAtomics` is deprecated in favor of `Atomics`. This produces a warning if you use `SwiftNIO` 2.41.0 or higher. ### Modifications This PR add a dependency to `Atomics` to change the only use of `NIOAtomics` to `Atomics`, and suppress the warning. ### What Warning?! ``` path/to/package/.build/checkouts/websocket-kit/Sources/WebSocketKit/WebSocketClient.swift:40:22: warning: 'NIOAtomic' is deprecated: please use ManagedAtomic from https://github.com/apple/swift-atomics instead let isShutdown = NIOAtomic.makeAtomic(value: false) ^ ```
Add support for NIOTransportServices
9 weeks ago
###### _This patch was authored by @PopFlamingo and released by @0xTim._ This PR intends to fix #29 by using the NIOTransportServices library
Don't use IP addresses for SNI
9 weeks ago
###### _This patch was authored by @olivernyc and released by @0xTim._ TLS forbids the use of literal IPv4 and IPv6 addresses in server name indication. However, websocket-kit passes IP addresses to `NIOSSLClientHandler` as `serverHostname`, which triggers an error when the underlying `validateSNIServerName` is called. See https://github.com/apple/swift-nio-ssl/pull/380 for more context. This PR adds a do / catch statement to pass `nil` for `serverHostname` in case of the specific `cannotUseIPAddressInSNI` error, which allows for secure connections to IP addresses.
Enable compilation on iOS
12 weeks ago
###### _This patch was authored by @makleso6 and released by @0xTim._ This adds experimental support for building WebsocketKit on iOS from iOS 11 onwards Closing #117
Make sure onPing is called and account for control frames being able to be interspersed with message fragments
16 weeks ago
###### _This patch was authored by @tkrajacic and released by @0xTim._ Control frames can appear in the middle of fragmented messages. Therefor they must not be part of the `frameSequence`. Also expose the frame data of the control frames, as that might be usable application data. Before this PR, `onPing` was never called at all. <!-- πŸš€ 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 Supported Swift Versions
16 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/)
Remove content length header on initial handshake
26 weeks ago
###### _This patch was authored by @GNMoseke and released by @0xTim._ This removes the `content-length: 0` header being automatically applied to outgoing websocket handshakes. As per [RFC 7230 Section 3.3.2:](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.2) > A user agent SHOULD NOT send a Content-Length header field when the request message does not contain a payload body and the method semantics do not anticipate such a body. This was causing issues with certain cloud providers, most notably Google Cloud Run, that would force close the websocket as soon as data was received from a client.
Add support for async/await
40 weeks ago
###### _This patch was authored by @madsodgaard and released by @0xTim._ Adds support for async/await in WebsocketKit. Partially fixes: https://github.com/vapor/vapor/issues/2641
Persist query parameters in WebSocket URI
1 year ago
###### _This patch was authored by @JakeTiritilli and released by @0xTim._ Prevents query parameters passed in the WebSocket URI from being silently dropped on connection (#101, fixes #94). Calling `WebSocket.connect` with the URI `wss://localhost:443?foo=bar&bar=baz` now sends the full URI, including the query parameters, to the server.
Fix deprecation in `WebSocketClient`
1 year ago
###### _This patch was authored by @axtonpitt and released by @0xTim._ Fix `TLSConfiguration.forClient()` deprecation warning ``` warning: 'forClient(cipherSuites:minimumTLSVersion:maximumTLSVersion:certificateVerification:trustRoots:certificateChain:privateKey:applicationProtocols:shutdownTimeout:keyLogCallback:)' is deprecated: renamed to 'makeClientConfiguration()' ```
iOS macOS tvOS linux macOS iOS
vapor/postgres-nio 1.11.1
🐘 Non-blocking, event-driven Swift client for PostgreSQL.
⭐️ 178
πŸ•“ 7 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.
PostgresNIO 1.11.1
10 hours 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
1.11.0
16 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
21 weeks 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
PostgresNIO 1.9.0
27 weeks ago
### SemVer Minor * Allow unescaped SQL in `PostgresQuery` in https://github.com/vapor/postgres-nio/pull/258 * Remove connection state machine log in https://github.com/vapor/postgres-nio/pull/266 * Add EventLoop API that uses `PostgresQuery` in https://github.com/vapor/postgres-nio/pull/265 * Add `contains(_:)` to `PostgresRandomAccessRow` in https://github.com/vapor/postgres-nio/pull/270 ### SemVer Patch * Use `Int(exactly:)` instead of restricting to 64 bit platforms in https://github.com/vapor/postgres-nio/pull/267 * Continue to make forward progress when cancelled in https://github.com/vapor/postgres-nio/pull/261 ### Other Changes * Fix CI test link in README in https://github.com/vapor/postgres-nio/pull/260 * Update CI to 5.6 release and [email protected] in https://github.com/vapor/postgres-nio/pull/269 **Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.8.0...1.9.0
PostgresNIO 1.8.0 (async/await)
28 weeks ago
This release adds Swift structured concurrency APIs (async/await). It is now possible to run queries like this: ```swift let role = "admin" let rows = try await connection.query("SELECT id, username, birthday FROM users WHERE role = \(role)", logger: logger) for try await (id, username, birthday) in rows.decode((Int, String, Date).self, context: .default) { // do something with the returned values } ``` For more information please read the updated README. ## What's Changed * Fix typo in README.md by @flix477 in https://github.com/vapor/postgres-nio/pull/208 * Remove PSQLJSONDecoder from PSQLConnection in https://github.com/vapor/postgres-nio/pull/214 * Merge type PSQLFormat into PostgresFormat in https://github.com/vapor/postgres-nio/pull/212 * Remove PSQLJSONDecoder in https://github.com/vapor/postgres-nio/pull/216 * Merge PSQLDataType with PostgresDataType in https://github.com/vapor/postgres-nio/pull/213 * Remove PSQLJSONEncoder in https://github.com/vapor/postgres-nio/pull/215 * PSQLDecodingError improvements in https://github.com/vapor/postgres-nio/pull/211 * Add async option to PSQLRowStream in https://github.com/vapor/postgres-nio/pull/206 * Make PSQLDecodingContext generic in https://github.com/vapor/postgres-nio/pull/217 * Cut back on number of CI jobs in https://github.com/vapor/postgres-nio/pull/218 * Extend PostgresCastingError in https://github.com/vapor/postgres-nio/pull/221 * Add PostgresCell in https://github.com/vapor/postgres-nio/pull/220 * Add PSQLRow multi decode in https://github.com/vapor/postgres-nio/pull/222 * Add PostgresQuery in https://github.com/vapor/postgres-nio/pull/223 * Rename PSQLDecodable to PostgresDecodable in https://github.com/vapor/postgres-nio/pull/224 * Rename PSQLCodable to PostgresCodable in https://github.com/vapor/postgres-nio/pull/225 * Rename PSQLRowSequence to PostgresRowSequence in https://github.com/vapor/postgres-nio/pull/226 * Rename PSQLEncodingContext to PostgresEncodingContext in https://github.com/vapor/postgres-nio/pull/227 * Move all PostgresConnection code into one file in https://github.com/vapor/postgres-nio/pull/228 * Deprecate unused postgres messages in https://github.com/vapor/postgres-nio/pull/229 * Cleanup encoding and decoding in https://github.com/vapor/postgres-nio/pull/230 * Merge PSQLRow into PostgresRow in https://github.com/vapor/postgres-nio/pull/219 * Replace all EncoderContext/DecoderContext uses of `.forTests` with `.default` in https://github.com/vapor/postgres-nio/pull/231 * Add an async query API (internal for now) in https://github.com/vapor/postgres-nio/pull/233 * Add PostgresRowSequence multi decode in https://github.com/vapor/postgres-nio/pull/232 * [BufferMessageEncoder] Reduce the number of force unwraps in https://github.com/vapor/postgres-nio/pull/234 * [PostgresRowSequence] Make StateMachine private in https://github.com/vapor/postgres-nio/pull/235 * Rename PSQLRow multi decode to PostgresRow multi decode in https://github.com/vapor/postgres-nio/pull/236 * Explicit TLS config in https://github.com/vapor/postgres-nio/pull/237 * Rename PSQLFrontendMessage to PostgresFrontendMessage in https://github.com/vapor/postgres-nio/pull/239 * Rename PSQLBackendMessage to PostgresBackendMessage in https://github.com/vapor/postgres-nio/pull/238 * Merge PSQLConnection into PostgresConnection in https://github.com/vapor/postgres-nio/pull/240 * Cleanup PostgresDecodable in https://github.com/vapor/postgres-nio/pull/241 * Make PostgresEncodingContext & PostgresDecodingContext public in https://github.com/vapor/postgres-nio/pull/243 * Add Sendable checking in https://github.com/vapor/postgres-nio/pull/242 * Add good first issue project board workflow to repository by @BennyDeBock in https://github.com/vapor/postgres-nio/pull/246 * New PostgresConnection connect API in https://github.com/vapor/postgres-nio/pull/245 * Make new Postgres decoding public in https://github.com/vapor/postgres-nio/pull/244 * Make PostgresRowSequence public in https://github.com/vapor/postgres-nio/pull/247 * Make Postgres Encodable public in https://github.com/vapor/postgres-nio/pull/248 * Make Postgres async query public in https://github.com/vapor/postgres-nio/pull/249 * Rename PostgresBackendMessageDecoder in https://github.com/vapor/postgres-nio/pull/252 * Add support for Network.framework in https://github.com/vapor/postgres-nio/pull/253 * Make DataRow Sendable in https://github.com/vapor/postgres-nio/pull/250 * Rename PostgresChannelHandler in https://github.com/vapor/postgres-nio/pull/251 * README update for async/await in https://github.com/vapor/postgres-nio/pull/254 * Fix missing links in https://github.com/vapor/postgres-nio/pull/255 ## New Contributors * @flix477 made their first contribution in https://github.com/vapor/postgres-nio/pull/208 * @BennyDeBock made their first contribution in https://github.com/vapor/postgres-nio/pull/246 **Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.7.2...1.8.0
Refactor PSQLRowStream to make async/await easier
43 weeks ago
###### _This patch was authored and released by @fabianfett._ ### Motivation `PSQLRowStream`'s current implementation is interesting. It should be better tested and easier to follow for async/await support later. ### Changes - Make `PSQLRowStream`'s implementation more sensible - Add unit tests for `PSQLRowStream` ### Result Adding async/await support becomes easier.
Faster decoding, thanks to fewer bound checks.
43 weeks ago
###### _This patch was authored by @fabianfett and released by @gwynne._ ### Motivation We like faster code. This removes a ton of unnecessary bounds checks. ### Result Faster code In draft since it requires a new NIO release.
Add proper support for `Decimal`
43 weeks ago
###### _This patch was authored by @madsodgaard and released by @gwynne._ Fixes an issue when trying to decode/encode `numeric` columns as `Decimal`, that would result in an error such as: `server: column "balance" is of type numeric but expression is of type text (transformAssignedExpr)`.
ByteBuffer extension, prevent naming conflicts
44 weeks ago
###### _This patch was authored and released by @fabianfett._ ### Motivation We currently extend ByteBuffer with non prefixed utility methods. This may lead to breaking code, if NIO introduces those utilities itself. As potentially planned here: https://github.com/apple/swift-nio/pull/1990 ### Changes Prefix all ByteBuffer utility methods ### Result Chances reduced of breaking code.
DataRow without allocation; DataRow as Collection; RowDescription top level
44 weeks ago
###### _This patch was authored and released by @fabianfett._ This is a cherry pick of #188. ### Modifications - `DataRow` and `RowDescription` have been moved out of the `PSQLBackendMessage` namespace. This allows us to mark them as `@inlinable` or `@usableFromInline` at a later point, without marking everything in `PSQLBackendMessage` as `@inlinable` - `DataRow` does not use an internal array for its columns anymore. Instead all read operations are directly done on its ByteBuffer slice. - `DataRow` implements the `Collection` protocol now. ### Result One allocation fewer per queried row.
iOS macOS watchOS tvOS
vapor/sql-kit 3.21.0
*️⃣ Build SQL queries in Swift. Extensible, protocol-based design that supports DQL, DML, and DDL.
⭐️ 162
πŸ•“ 8 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 support for varying syntax of SELECT locking clauses.
8 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
8 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
9 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
9 weeks ago
###### _This patch was authored and released by @gwynne._ Also fills in some missing documentation.
Add support for MySQL's DROP INDEX syntax
21 weeks ago
###### _This patch was authored and released by @gwynne._ MySQL's version of `DROP INDEX` differs from PostgreSQL's in that it requires an `ON <table name>` clause in order to identify the index to drop, since MySQL treats indexes as table-level objects rather than schema-level. This PR adds support for optionally specifying the table name. Also deprecates `SQLDataType.type(_:)`, which should never have been public - it is a utility method used in one place by a single test case; its behavior is only valid in PostgreSQL, and even then only for custom-typed enums, but its name and placement give no hint of this to callers. Since it is public API, it can not be summarily removed without a `semver-major` break, but we can at least remove the single call site and discourage any further use. Also updates the CI workflows as per the usual in my PRs πŸ™‚. _Note: `semver-minor` not only due to the new public API on `SQLDropIndexBuilder` but also because the deprecation of a public API is, while not source-breaking, annoying for anyone who actually used it._
Adds `ALTER _ RENAME TO _` support
24 weeks ago
###### _This patch was authored by @NeedleInAJayStack and released by @0xTim._ <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> Adds table-renaming support to `SQLAlterTableBuilder`. This produces SQL queries of the form: ```sql ALTER `table_name` RENAME TO `new_table_name` ``` <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
Fix several issues with UNION query support
41 weeks ago
###### _This patch was authored and released by @gwynne._ - Fixes `SQLUnionBuilder` lacking `SQLQueryFetcher` conformance. - Fixes support for SQLite. - Adds support for `INTERSECT [DISTINCT|ALL]` and `EXCEPT [DISTINCT|ALL]` unions. - Adds documentation for `SQLDialect` and its subtypes. - Improves test infrastructure.
Add support for UNION queries
42 weeks ago
###### _This patch was authored by @finestructure and released by @gwynne._ Adds support for `UNION SELECT` queries: ```swift try db.select() .column("id") .from("t1") .where("f1", .equal, "foo") .limit(1) .union({ $0.column("id") .from("t2") .where("f2", .equal, "bar") .limit(2) }).union(all: { $0.column("id") .from("t3") .where("f3", .equal, "baz") .limit(3) }) .run().wait() ```
Add support for `CREATE TABLE ... SELECT ...`
42 weeks ago
###### _This patch was authored and released by @gwynne._ Adds SQLKit support for creating tables populated by `SELECT` queries: ```swift try await sqlDatabase.create(table: "populated") .column("id", type: .bigint, .primaryKey, .notNull) .column("data", type: .text) .select { $0 .column(SQLLiteral.default, as: "id") .column(SQLFunction("UPPER", args: SQLFunction("LTRIM", args: SQLColumn("data")) ), as: "data") .from("original_table") .where("id", .in, Array(1 ... 10)) } .run() ``` ```sql CREATE TABLE "populated" ( "id" BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY NOT NULL, "data" TEXT ) AS SELECT DEFAULT AS "id", UPPER(LTRIM("data")) AS "data" FROM "original_table" WHERE "id" IN ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) ``` Additional changes: - Significant internal reorganization of SQLKit, specifically in `SQLSelectBuilder`. - The `.where()`, `.orWhere()`, `.having()`, and `.orHaving()` families of methods on `SQLSelectBuilder` (and other `SQLPredicateBuilders`) have been normalized so that all four sets of methods offer the same series of overloads as all the others. - More `async` tests. - Support for MySQL's `DROP TEMPORARY TABLE` syntax, as `sqlDatabase.drop(table: "table").temporary()`. Note: Despite what may seem appearances to the contrary, the public API of `SQLSelectBuilder` has not lost any methods, though it has gained a small number of overloads. A concerted effort was made to avoid changing any existing API in any source-incompatible way.
Fix Swift compiler choosing wrong overload for SQLInsertBuilder.values(Encodable)
43 weeks ago
###### _This patch was authored and released by @gwynne._ Under certain specific circumstances, the Swift compiler will choose the wrong overload of `SQLInsertBuilder.values(_:)` for the variants that take `Encodable` (specifically when an explicit Array is used in a generic context). Since it's too late to fix the API (it's public now), adding @_disfavoredOverload works around the issue in what should be a backwards-compatible fashion.
macOS linux macOS iOS
vapor/fluent-kit 1.35.1
Swift ORM (queries, models, and relations) for NoSQL and SQL databases
⭐️ 152
πŸ•“ 6 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.
Remove several sources of fatal errors from @Group
6 weeks ago
###### _This patch was authored and released by @gwynne._ This removes most of the easier ways to cause fatal errors (esp. from user input) from `@Group`'s implementation. Fixes #530
Performance and behavior improvements for encoding/decoding Fluent relations
6 weeks ago
###### _This patch was authored and released by @gwynne._ This PR addresses the following items: - The performance of eager loading for `@Parent` and `@OptionalParent` relations should now scale more strictly linearly rather than exhibiting eventually quadratic behavior. This only affects the last step of eager loading, and will probably only be noticeable in queries which eager load a very large number of small models. - The information contained by a `FluentError.missingParent()` error is now more complete and consistent. - The default `Codable` conformance provided to any type conforming to `Fields` (which includes all `Model`s) should now be slightly but noticeably more performant; a number of unnecessary extra intermediate steps and repeated actions have been removed. - Errors thrown from the default `Codable` conformance on `Fields` now retain the full coding path of the entire coding operation, rather than only the failing key. - Setting an `@OptionalParent` property's `value` to `nil` (or more precisely, `.some(.none)`) no longer results in the property failing to encode its `id`. There is a new protocol requirement on `AnyCodableProperty` - while it is not expected that external users need to be concerned with said requirement, it does technically make this a `semver-minor` update (see the comments on `AnyCodableProperty.skipPropertyEncoding` for details of the new property).
Add Siblings's `async`/`await` `detachAll(on:)` API
8 weeks ago
###### _This patch was authored by @jiahan-wu and released by @0xTim._ Adds missing async API for a sibling's `detachAll(on:)`
Log start and finish of migration prepares and reverts
9 weeks ago
###### _This patch was authored and released by @gwynne._ Also adds some documentation comments to the confusion that is `Property.swift`. Shoutout to @dmonagle for being the first to point out to me that this logging was missing!
SchemaBuilder functions with @discardableResult
9 weeks ago
###### _This patch was authored by @dmonagle and released by @gwynne._ Added https://github.com/discardableResult to all functions in SchemaBuilder that modify Self and return Self. This brings it in line with QueryBuilder and also allows more complicated migrations that use conditional logic (ie not chained) to work without having to use let _ = to avoid Result of call to 'xxx' is unused warnings.
Add experimental watchOS support
10 weeks ago
###### _This patch was authored by @krippz and released by @0xTim._ Add experimental support for watchOS Resolves #500
Make it possible to drop foreign key constraints with MySQL 5.7
11 weeks ago
###### _This patch was authored and released by @gwynne._ This makes `database.schema("table").deleteConstraint(.constraint(.foreignKey(...))).update()` work correctly with a MySQL 5.7 server. `semver-minor` because it deprecates a "public" API and adds a new one, even though neither API should actually be public.
Formatted boolean properties
12 weeks ago
###### _This patch was authored and released by @gwynne._ Adds two new property types to Fluent: `@Boolean` and `@OptionalBoolean`. These properties always have `Bool` values, and can be configured with a storage format, similarly to `@Timestamp`. For example, the `.trueFalse` format stores the strings `"true"` and `"false"` in the database, and parses those strings on load. If no format is specified, the database's default native format for `Bool` is used, equivalently to using `@Field` or `@OptionalField`. An appropriate column data type must be specified in the migration for the model.
Add ability to control transactions
12 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 or when you need more control over a transaction. Introduces a new `TransactionControlDatabase` protocol to implement, that conforms to `Database` > **Warning**: It is the users' responsibility to ensure the handle errors and rollback when necessary and commit transactions
Additional API for pagination to access individual page
12 weeks ago
###### _This patch was authored by @nashysolutions and released by @0xTim._ Adds the ability to get a single page when paginating a request: ```swift let page = try await Model.query(on: req.db).page(withIndex: 2, size: 10) ```
iOS macOS watchOS
vapor/queues 1.11.1
A queue system for Vapor.
⭐️ 141
πŸ•“ 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.
Fix typos in QueueWorker log messages
4 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
4 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`
7 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
8 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
47 weeks 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.
48 weeks 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
48 weeks 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) } } ```
Wait for notifications to be dispatched
1 year ago
###### _This patch was authored and released by @jdmcd._ Fixes a race condition where a job could be marked as "running" in your notification consumer while it had actually succeeded. **Note:** If you don't have any notification delegates registered this release will have no performance impact. If you are using notification delegates the `dispatch` function will now wait until all notifications have been sent to return.
Fix building with Swift 5.2
1 year ago
###### _This patch was authored and released by @siemensikkema._ Enables Queues to be built with Swift 5.2 again by adding missing `self` where needed. Also adds a test scenario for Swift 5.2 to prevent this from breaking in the future.
macOS
vapor/postgres-kit 2.8.2
🐘 Non-blocking, event-driven Swift client for PostgreSQL.
⭐️ 139
πŸ•“ 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.
Migrate to Swift Atomics
5 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
8 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.
1.7.0
12 weeks ago
## What's Changed * Ignore ParamaterStatus messages when handling response by @baarde in https://github.com/vapor/postgres-kit/pull/218 **Full Changelog**: https://github.com/vapor/postgres-kit/compare/1.6.0...1.7.0
Allow `backendKeyData` to be set
16 weeks ago
###### _This patch was authored by @rausnitz and released by @0xTim._ This change provides access to the new functionality provided in this postgres-nio PR: https://github.com/vapor/postgres-nio/pull/296. In short, apps can enable integration with Amazon RDS Proxy by setting `requireBackendKeyData` to false. See the postgres-nio PR for more details.
Drop support for Swift 5.2/5.3 + Yet another CI overhaul
16 weeks ago
###### _This patch was authored and released by @gwynne._ 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/)
Improve row decoding performance
27 weeks ago
###### _This patch was authored and released by @gwynne._ - Leverage new APIs available in PostgresNIO to improve row decoding performance, making up for some speed regressions and then some, especially for queries with lots of result fields. - Minor improvements to connection handling, also partially courtesy of improved APIs in PostgresNIO. _Note: No new APIs, but marked semver-minor due to requiring an updated minor release of `postgres-nio`._
Version bump postgres-nio dependency to prevent build error against swift-nio
35 weeks ago
###### _This patch was authored by @eob and released by @gwynne._ Hi folks! I'm not sure what this project's process for version-bumping is, but the current `vapor/[email protected]` dependency can't build against the more current `swift-nio` versions because of a duplicate addition of `writeNullTerminatedString` to `ByteBuffer` by extension: ``` /path/to/.build/checkouts/postgres-nio/Sources/PostgresNIO/New/Extensions/ByteBuffer+PSQL.swift:4:19: note: found this candidate mutating func writeNullTerminatedString(_ string: String) { ^ /path/to/.build/checkouts/swift-nio/Sources/NIOCore/ByteBuffer-aux.swift:100:26: note: found this candidate public mutating func writeNullTerminatedString(_ string: String) -> Int { ``` The `postgres-nio` project has since removed the duplicate method definition, so rolling forward the dependency to `1.7.2` (in this PR) fixes the build error. <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
Declare supported UNION features
41 weeks 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 PostgreSQL's support. The increased SQLKit version requirement makes this a `semver-minor` change.
Declare UPSERT support for PostgreSQL
46 weeks ago
###### _This patch was authored and released by @gwynne._ semver-minor because the new SQLKit version requirement is a semver-minor bump.
Address issues in decoding data from the database
51 weeks ago
###### _This patch was authored and released by @gwynne._ Basically this just cleans up `PostgresDataDecoder` quite a bit, along with the `PostgresKit` unit tests, such as they are. It's difficult to say whether this will have any performance impact (probably not).
macOS linux macOS iOS
vapor/open-crypto 4.0.0-beta.2
πŸ”‘ Hashing (BCrypt, SHA2, HMAC), encryption (AES), public-key (RSA), and random data generation.
⭐️ 128
πŸ•“ 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
2 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
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/crypto-kit/master/CryptoKit/index.html
Crypto 3.3.3
3 years ago
Fixed: - Trying to parse a malformed RSA key no longer causes a fatalError (#87 - #88)
Crypto 3.3.2
3 years ago
Fixed: - Removed dependency on private `CNIOOpenSSL` package. (#81)
Crypto 3.3.1
3 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
4 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.4.0
🐘 PostgreSQL driver for Fluent.
⭐️ 119
πŸ•“ 12 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 ability to control transactions
12 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
15 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.
Clean up row decoding
27 weeks ago
###### _This patch was authored and released by @gwynne._ Instead of duplicating logic implemented by `postgres-kit` for row decoding - and incorrectly, at that - we now always call through to that logic. Despite the additional indirection through the `SQLRow` existential, this should yield a minor improvement in performance, as we perform fewer unnecessary checks and retain fewer copies of data. _Note: Depends on vapor/postgres-kit#221 to receive the full benefit of these changes._
Fix logging of enum builder queries
27 weeks ago
###### _This patch was authored and released by @gwynne._ Queries issued for creation, updating, and dropping of enum types in databases which use custom data types for enumeration support (e.g. Postgres) were not being logged properly.
Support adding multiple enum cases at once
28 weeks ago
###### _This patch was authored by @seeppp and released by @0xTim._ Fixes an issue where updating a table to add multiple new enum cases would only add the last case to the database. Fixes #189
Bump postgres-kit to 2.5.1
33 weeks ago
###### _This patch was authored by @SketchMaster2001 and released by @0xTim._ postgres-kit has been updated to fix build conflicts with swift-nio. This bumps the postgres-kit version to fix build errors. <!-- πŸš€ 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. -->
Make `DatabaseError.isConnectionClosed` functional
41 weeks ago
###### _This patch was authored and released by @gwynne._ `DatabaseError.isConnectionClosed` now has the value `true` when the underlying error is `PostgresError.connectionClosed`. Also avoids double-running the FluentBenchmark tests (same change as [fluent-sqlite-driver#75](https://github.com/vapor/fluent-sqlite-driver/pull/75)) and actually runs the tests on Linux now.
Ensure SQLExpression executes are logged
50 weeks ago
###### _This patch was authored and released by @0xTim._ Adds logging to calls to `SQLDatabase.execute(sql:)` to match the calls used by Fluent so queries such as raw queries are logged
Make SQL Log Level Configurable
1 year ago
###### _This patch was authored and released by @0xTim._ Adds the option to set the log level at which SQL queries are logged. Defaults to `.debug`.
Log SQL of queries in when log level set to debug mode
1 year ago
###### _This patch was authored and released by @0xTim._ Brings back logging when the log level is set to debug mode for queries. Will print the SQL and any binds depending on the queries being executed.
macOS linux macOS iOS
vapor/multipart-kit 4.5.2
🏞 Parses and serializes multipart-encoded data with Codable support.
⭐️ 106
πŸ•“ 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.
Depend on Swift Collections
19 weeks 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
47 weeks 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
51 weeks 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`.
Fix: MultipartParser cannot decode Non-ASCII header correctly
1 year ago
###### _This patch was authored by @t-ae and released by @siemensikkema._ Fix the bug that `MultipartParser` cannot decode headers that contains non-ASCII characters correctly.
Optimize and simplify parser
1 year ago
###### _This patch was authored by @siemensikkema and released by @0xTim._ Use more efficient parsing of multipart bodies to improve performance to near the level of the old C parser (~8% slower). Resolves #58 and replaces #59. Thanks to @edwellbrook for the initial test case and @weissi for help on parser performance πŸ™πŸ»
vapor/routing-kit 4.6.0
🚍 High-performance trie-node router.
⭐️ 98
πŸ•“ 12 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.6.0
12 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`
18 weeks 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
19 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/)
Clarify "same route with different parameter names" error message
42 weeks 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
1 year 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`
1 year 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)") ```
Add access to components matched by catchall ('**')
2 years ago
###### _This patch was authored and released by @stevapple._ <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> Allows using `Parameters.getCatchall()` to get the components matched by catchall (`**`) (#94). <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
Fix String description of the router and add tests
2 years ago
###### _This patch was authored and released by @stevapple._ <!-- πŸš€ Thank you for contributing! --> <!-- Describe your changes clearly and use examples if possible. --> Fixes `TrieRouter.Node.description` (#93): - To match `PathComponent`'s `stringLiteral` expression, - To match the routing strategy of `TrieRouter`, And adds tests for `description`s (#93). <!-- When this PR is merged, the title and body will be --> <!-- used to generate a release automatically. -->
Require catchall ('**') appears at end of path
2 years ago
###### _This patch was authored by @stevapple and released by @tanner0101._ Adds a precondition requiring that the catchall path component (`**`) only appear as the last component in a path (#95).
iOS macOS linux macOS iOS
vapor/service 1.0.2
πŸ“¦ Dependency injection / inversion of control framework.
⭐️ 82
πŸ•“ 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.
Service 1.0.2
3 years ago
Fixed: - Silenced a Swift 5 warning. (#38)
Service 1.0.1
3 years ago
Fixed: - `ServiceType.makeService(_:)`'s internal variable was renamed to `container`. (#27)
Service 1.0.0
4 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
4 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
4 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
4 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
4 years ago
Service 1.0.0 Beta 2
4 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
4 years ago
Service 1.0.0 Beta 1
4 years ago
linux macOS iOS
vapor/jwt-kit 4.7.0
πŸ”‘ JSON Web Token signing and verification (HMAC, RSA, ECDSA) using BoringSSL.
⭐️ 82
πŸ•“ 8 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 `JWTSigner.unsecuredNone`
8 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
11 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
15 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
19 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/) Updates the version of BoringSSL vended to ce2a353d0147bac03ef883d91dcd9c405ab527fa
Expose the curve on ECDSA Keys
28 weeks 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
48 weeks 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
52 weeks ago
###### _This patch was authored by @mbutan and released by @0xTim._ Adds support for tvOS
Expand Crypto Dependencies
1 year ago
###### _This patch was authored and released by @0xTim._ Expand the versions of Swift Crypto we depend on to include Swift Crypto 2.0.0 and up
Update BoringSSL to 80df7398ce52574801821ce7a76c031c35d6b882
1 year ago
###### _This patch was authored and released by @0xTim._ - Update vendor script - Update BoringSSL to 80df7398ce52574801821ce7a76c031c35d6b882
Add `is_private_email` claim to `AppleIdentityToken`
1 year ago
###### _This patch was authored by @gargs and released by @0xTim._ This adds the missing `is_private_email ` claim to `AppleIdentityToken`. This is helpful to determine whether the user is using a proxy email address.
iOS macOS watchOS tvOS
vapor/apns 4.0.0-beta.1
Helpful extensions and abstractions for using APNSwift
⭐️ 74
πŸ•“ 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.
4.0.0-beta.1
3 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
3 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
14 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
15 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
15 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
19 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/)
async/await
48 weeks 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
1 year 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
Licence the project as MIT
1 year ago
###### _This patch was authored by @PSchmiedmayer and released by @0xTim._ Adds the MIT License
2.0.0
1 year ago
bump upstream release.
iOS macOS
vapor/core SR-6922
🌎 Utility package containing tools for byte manipulation, Codable, OS APIs, and debugging.
⭐️ 72
πŸ•“ 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
2 years ago
`File` now conforms to `ReflectionDecodable`.
Core 3.9.3
2 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
3 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
3 years ago
Fixed: - `File.ext` now returns `nil` if the file does not have an extension. (#198)
Core 3.8.0
3 years ago
New: - Add `MediaType.jsonAPI`. (#202) Fixed: - Improve performance of `Future.flatten`. (#199)
Core 3.7.3
3 years ago
Fixed: - Got rid of the last two pesky warnings for Swift 5. (#197, #196)
Core 3.7.2
3 years ago
Fixed: - Fixed some Swift 5 warnings.
linux macOS iOS
vapor/fluent-mysql-driver 4.1.0
πŸ–‹πŸ¬ Swift ORM (queries, models, relations, etc) built on MySQL.
⭐️ 66
πŸ•“ 15 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.
Explicitly handle a custom ID key set to the empty string
15 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
20 weeks ago
###### _This patch was authored and released by @gwynne._ See https://github.com/vapor/fluent-kit/pull/503
Improved error reporting via `DatabaseError`
41 weeks 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)) ```
FluentKit 1.0.0 GM
2 years ago
###### _This patch was authored and released by @tanner0101._ Updates this package for compatibility with latest version of FluentKit.
Makes `isConstraintFailure` return true on duplicate constraint failure.
2 years ago
###### _This patch was authored by @JetForMe and released by @gwynne._ Makes `isConstraintFailure` return true on duplicate constraint failure. Depends on this PR: https://github.com/vapor/mysql-nio/pull/27
macOS linux macOS iOS
vapor/async-kit 1.13.0
Sugary extensions for the SwiftNIO library
⭐️ 63
πŸ•“ 12 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.
Enable compilation on iOS
12 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
19 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/)
Removed file:line: from signature and code in Future+Try.swift
37 weeks 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(_:)`
43 weeks 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
47 weeks 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
47 weeks 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. -->
Add `EventLoopFuture.tryFlatMap()` by popular demand
52 weeks ago
###### _This patch was authored by @vzsg and released by @0xTim._ One of the most common hurdles of working with EventLoopFutures, and a very oft-repeated question on the Discord server is interacting with error-throwing code. The `tryFlatMap` extension alleviates that by handling any errors thrown by the closure, causing the ELF to fail. This is the most common error handling pattern anyway.
Add EventLoopFuture utility methods for handling empty collection values
1 year ago
###### _This patch was authored and released by @gwynne._ Provides: - `EventLoopFuture.nonempty(orError:)`: If the future's `Collection`-conforming value is empty, fails the future with the provided error. - `EventLoopFuture.nonemptyMap(or:_:)`: If the future's `Collection`-conforming value is empty, returns the provided alternate value, otherwise acts like `.map(_:)`. - `EventLoopFuture.nonemptyMap(_:)`: If the future's `Collection`-conforming value is empty, returns an empty instance of the `RangeReplaceableCollection`-conforming result value, otherwise acts like `.map(_:)`. - `EventLoopFuture.nonemptyFlatMapThrowing(or:_:)`: If the future's `Collection`-conforming value is empty, returns the provided alternate value, otherwise acts like `.flatMapThrowing(_:)`. - `EventLoopFuture.nonemptyFlatMapThrowing(_:)`: If the future's `Collection`-conforming value is empty, returns an empty instance of the `RangeReplaceableCollection`-conforming result value, otherwise acts like `.flatMapThrowing(_:)`. - `EventLoopFuture.nonemptyFlatMap(or:_:)`: If the future's `Collection`-conforming value is empty, returns a future with the provided alternate value, otherwise acts like `.flatMap(_:)`. - `EventLoopFuture.nonemptyFlatMap(orFlat:_:)`: If the future's `Collection`-conforming value is empty, returns the provided alternate future, otherwise acts like `.flatMap(_:)`. - `EventLoopFuture.nonemptyFlatMap(_:)`: If the future's `Collection`-conforming value is empty, returns a future with an empty instance of the `RangeReplaceableCollection`-conforming result value, otherwise acts like `.flatMap(_:)`. Example usage: ```swift return MyModel.query(on: request.db) .filter(\.foo == bar) .all() .nonempty(orError: Abort(.notFound)) .map { ... ``` ```swift return MyModel.query(on: request.db) .filter(\.foo == bar) .all() .nonemptyMap { models -> [Something] in ... ```
Add some more `EventLoopFuture<Collection>` utilities.
1 year ago
###### _This patch was authored and released by @gwynne._ I have to admit, everyone - this one's just a little bit for fun. But with Swift 5.5 and its concurrency magic around the corner, why not?! πŸ˜€ Changes: - Add `EventLoopFuture.mapEachFlat(_:)`, shorthand for `future.map { $0.flatMap(...) }`. Complements `.mapEach(_:)` and `.mapEachCompact(_:)`. Per the existing naming "convention", this is the "map a sequence of sequences to a sequence" utility, and `.flatMapEach(_:)` is the "map a sequence to a sequence of futures" utility. It's not confusing at all! Totally!! - Add variants of `.mapEach(_:)`, `.mapEachCompact(_:)`, and `.mapEachFlat(_:)` which accept `KeyPath`s in place of transformation closures. If you find yourself trying to articulate your argument against having these additions, you've already missed the point πŸ™‚.
Add overload of flatMapEach(on:_:) for Void futures
1 year ago
###### _This patch was authored and released by @gwynne._ This is effectively a convenience for using `EventLoopFuture.andAllSucceed(_:on:)`.
iOS macOS
vapor/fluent-sqlite-driver 4.2.0
Fluent driver for SQLite
⭐️ 59
πŸ•“ 15 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.
Explicitly handle a custom ID key set to the empty string
15 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
2 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
2 years ago
###### _This patch was authored and released by @calebkleveter._
Fix SQLiteError's DatabaseError conformance
2 years ago
###### _This patch was authored and released by @tanner0101._ `SQLiteError` now correctly conforms to `DatabaseError` (#50, fixes #49).
Release Candidate 1
2 years ago
Updates to FluentKit Release Candidate 1. > Release candidates represent the final shift toward focusing on bug fixes and documentation. Breaking changes will only be accepted for critical issues. We expect a final release of this package shortly after Swift 5.2's release date.
FluentKit Beta 5
2 years ago
Updates for https://github.com/vapor/fluent-kit/releases/tag/1.0.0-beta.5.
iOS macOS linux macOS iOS
vapor/mysql-nio 1.4.0
🐬 Non-blocking, event-driven Swift client for MySQL.
⭐️ 54
πŸ•“ 42 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.
Improve error handling
42 weeks 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
1 year 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.
Major fixes to authentication support
2 years ago
###### _This patch was authored and released by @gwynne._ Fixes the following failure modes: - In tests, certain errors would crash instead of failing - The `xor(_:_:)` utility did not correctly apply the operation to the entire buffer. - Most protocol errors now throw a much more specific error. - Trace logging is now more verbose during authentication. - The `AuthSwitchRequest` packet (tagged with `0xfe` during the authentication phase, incorrectly treated as EOF before) is now correctly handled; this permits both the use of arbitrary auth plugins and the use of the "fast auth" mechanism. - The `caching_sha2_password` handling would previously incorrectly treat the trailing `NUL` as part of the auth data. - The `fast_auth_success` (`0x1 0x3`) packet during authentication is now correctly handled. - When the `caching_sha2_password` plugin fails to authenticate on non-TLS connections, we now log a useful error message and throw a meaningful error. The framework is in place to implement this fully as soon as a usable implementation of the RSA public-key encrypt operation (with PEM armor and PKCS#1-OAEP padding support) is available. This massively increases compatibility with all supported versions of MySQL and MariaDB and paves the way for further improvements. Tagged `semver-minor` due to the new enumerators for the more specific errors.
Fix MYSQL_TIME data type
2 years ago
###### _This patch was authored and released by @tanner0101._ Fixes an issue causing `MYSQL_TIME` to use an incorrect data type when sending time or date only values (#54).
Docs + missing functionality
2 years ago
###### _This patch was authored and released by @tanner0101._ Adds docs and implements missing functionality from PostgresNIO (#52). - Adds `README` docs. - Adds `contributing.md` docs - Adds missing `MySQLData` fixed-width integer properties (`int8`, `int16`, `uint32`, etc). - Adds `serverHostname` parameter to `MySQLConnection.connect`.
MYSQL_TIME improvements
2 years ago
###### _This patch was authored and released by @tanner0101._ Adds support for 8 and 12 byte (time only) `MYSQL_TIME` formats (#50, fixes #49). ⚠️ Breaking change: Makes `MySQLTime` stored properties and `date` optional. Previously these methods could crash when used with a time-only value.
macOS
vapor/validation 2.1.1
βœ… Extensible data validation library (name, email, etc)
⭐️ 53
πŸ•“ 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
3 years ago
Fixed: - Improved error messages for `CountValidator` and `RangeValidator`. (#31)
Validation 1.1.2
3 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
4 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
4 years ago
New: - Use `Core.Reflectable` protocol. [Milestone](https://github.com/vapor/validation/milestone/6?closed=1)
Validation 2.0.0 RC 2
4 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
4 years ago
Validation 2.0.0 Beta 2
4 years ago
New: - Update to latest core dependency.
Validation 2.0.0 Beta 1.1
4 years ago
Validation 2.0.0 Beta 1
4 years ago
linux macOS iOS
vapor/sqlite-kit 4.1.0
Non-blocking SQLite client library with SQL builder built on SwiftNIO
⭐️ 50
πŸ•“ 41 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.
Declare supported UNION features
41 weeks 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.
Dialect trigger + version fixes
2 years ago
###### _This patch was authored and released by @tanner0101._ Adds SQL dialect trigger options plus updates to latest SQLiteNIO changes (#85).
SQLiteRow.decodeNil check value
2 years ago
###### _This patch was authored and released by @tanner0101._ Adds a missing check to ensure the value is not `.null` when calling `SQLiteRow.decodeNil` (#82).
Release Candidate 1
2 years ago
Updates to Swift 5.2 and macOS 10.15. Adds additional CI testing. > Release candidates represent the final shift toward focusing on bug fixes and documentation. Breaking changes will only be accepted for critical issues. We expect a final release of this package shortly after Swift 5.2's release date.
iOS macOS linux macOS iOS
vapor/template-kit 1.5.0
πŸ“„ Easy-to-use foundation for building powerful templating languages in Swift.
⭐️ 42
πŸ•“ 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.
Support rendering URLs
2 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
3 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
3 years ago
Fixed: - Fixed an issue with `UnsafeBufferPointer` in Swift 5. (#46)
TemplateKit 1.1.1
3 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
4 years ago
Fixed: - Re-added `ViewRenderer`. Milestone: [1.0.1](https://github.com/vapor/template-kit/milestone/5?closed=1)
TemplateKit 1.0.0
4 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
4 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.
⭐️ 40
πŸ•“ 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.
Add support for Codable types with URL properties.
2 years ago
Add support for encoding and decode URLs. Fixes #24
URLEncodedForm 1.0.7
2 years ago
Encodes reserved characters like `&` in URL-encoded form keys and values.
URL-Encoded Form 1.0.6
3 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
4 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
4 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
4 years ago
Fixed: - Fixed a warning about `fileprivate` extensions.
URL-Encoded Form 1.0.0
4 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
πŸ•“ 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.
DatabaseKit 1.3.3
3 years ago
Fixed: - `KeyedCache.get(_:)` is no longer internal. (#50, #57)
DatabaseKit 1.3.2
3 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
4 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
4 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
4 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
4 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/sqlite-nio 1.1.0
Non-blocking wrapper for libsqlite3-dev using SwiftNIO
⭐️ 30
πŸ•“ 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.
Improve SQLite Boolean decoding
2 years ago
###### _This patch was authored by @wibed and released by @tanner0101._ Allows for a boolean field to be stored as string. ```swift .field("is_true", .string, .required) ``` Additionally it is now its separate type, together with the other types, instead of referring to an anonymous int for a return, which makes It cleaner. Before: If the field type of a presumed boolean is set to string. it results in below error msg ``` typeMismatch(Swift.Bool, Swift.DecodingError.Context(codingPath: [], debugDescription: "Could not initialize Bool from \"0\".", underlyingError: nil)) ```
SQLiteNIO 1.0.0
2 years ago
More information on Vapor 4 official release: https://forums.swift.org/t/vapor-4-official-release-begins/34802
Add support for duplicate column names
2 years ago
###### _This patch was authored and released by @tanner0101._ Adds support for duplicate column names to `SQLiteRow` (#21, fixes #12). `SQLiteRow.columns` is now an array of columns instead of a dictionary. `SQLiteRow.column` uses a lookup table to keep `O(1)` performance.
Date decode from integer values
2 years ago
###### _This patch was authored by @Frizlab and released by @tanner0101._ Adds support for decoding `Swift.Date` from SQLite integer values (#16).
Release Candidate 1
2 years ago
Updates to Swift 5.2, macOS 10.15, and iOS 13. > Release candidates represent the final shift toward focusing on bug fixes and documentation. Breaking changes will only be accepted for critical issues. We expect a final release of this package shortly after Swift 5.2's release date.
Fix Reference Date
2 years ago
`Date` was inadvertently storing `secondsSinceReferenceDate` values in the database. This should use `secondsSince1970` to match Vapor 3's behavior and use a more sensible value.
SQLiteNIO 1.0.0 Beta 2.1
2 years ago
Publicized useful `SQLiteRow` properties (#11)
SQLiteNIO 1.0.0 Beta 2
2 years ago
- Add support for passing custom `Logger` - Enabled test discovery on Linux (#8) - Fixed package manifest provider name
Now supported on iOS
2 years ago
This release enables usage on iOS devices.
SQLiteNIO 1.0.0 Alpha 1.2
3 years ago
- Fixed a crash related to selecting zero-length `BLOB`s. (#3)
iOS macOS
vapor/kafka 0.0.0
Swift Apacha Kafka (real-time data pipelines and streaming apps)
⭐️ 18
πŸ•“ 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.
First initial release
4 years ago
vapor/fluent-mongo-driver 1.1.2
MongoDB support for Fluent built on MongoKittten.
⭐️ 17
πŸ•“ 15 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 build error with new Fluent support for models with composite primary keys
15 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
20 weeks ago
###### _This patch was authored and released by @gwynne._ See vapor/fluent-kit#503
Make `FluentMongoError` public
28 weeks 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
1 year 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
FluentKit 1.0.0 GM
2 years ago
###### _This patch was authored and released by @tanner0101._ Updates this package for compatibility with latest version of FluentKit.
Fix breaking change in MongoKitten
2 years ago
###### _This patch was authored and released by @Joannis._
Add change stream and GridFS support
2 years ago
###### _This patch was authored and released by @Joannis._ Add support for change streams on entities and GridFS file reading/writing
Added debug logging to all queries
2 years ago
###### _This patch was authored and released by @Joannis._ This PR adds debug logging to all MongoDB queries
macOS
vapor/queues-redis-driver 1.0.3
A Redis implementation for https://github.com/vapor/queues
⭐️ 14
πŸ•“ 47 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.
Use `context.eventLoop` for executing redis commands
1 year 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.
1 year 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.
1 year 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
1 year ago
Please see the [docs](https://docs.vapor.codes/4.0/queues/) for using queues.
Use Redis v4 release
1 year ago
###### _This patch was authored and released by @Mordil._
Drop RedisKit dependency to use Vapor/Redis directly
1 year ago
###### _This patch was authored by @Mordil and released by @0xTim._ Drop RedisKit and use Vapor/Redis directly (#19)
Updated Vapor and Queues Releases
2 years ago
- Updates to official Vapor and Queues releases. - Adds doc blocks.
update to latest Redis version
2 years ago
###### _This patch was authored and released by @mcdappdev._ Looking for feedback on how to implement `isConnected` - right now it's just returning `true`
Release Candidate 1
2 years ago
Update to Queues and Vapor release candidates (#14).
1.0.0 Beta 2.1.0
2 years ago
Updates to latest Redis
macOS
vapor/redis-kit 1.0.0-beta.5.1
Helpful extensions and abstractions for using RediStack
⭐️ 8
πŸ•“ 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.
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
2 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
2 years ago
Updates package requirements. This patch was authored and released by @tanner0101.
RedisStack Alpha 7 updates
2 years ago
Updates to RedisStack 1.0.0 Alpha 7 with support for `Logger` passing (#26)
RedisKit 1.0.0 Beta 2
2 years ago
Update to AsyncKit beta 2.
RedisKit 1.0.0 Beta 1
2 years ago
Update to AsyncKit 1.0.0 Beta 1.
RedisKit 1.0.0 alpha 3
2 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