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.60.0
πŸ’§ A server-side Swift HTTP web framework.
⭐️ 21,727
πŸ•“ 8 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.
4.60.0
8 hours ago
## What's Changed * Add international email validator by @BennyDeBock in https://github.com/vapor/vapor/pull/2829 * Add flag to enable/disable metrics by @valerianb in https://github.com/vapor/vapor/pull/2827 * Update AHC version which allows us to enable missing tests by @0xTim in https://github.com/vapor/vapor/pull/2814 * Expose the Channel's `ByteBufferAllocator` in `Request` and `Response` by @0xTim in https://github.com/vapor/vapor/pull/2595 ## New Contributors * @valerianb made their first contribution in https://github.com/vapor/vapor/pull/2827 **Full Changelog**: https://github.com/vapor/vapor/compare/4.59.1...4.60.0
Fix handling unicode characters in multipart filenames
3 days ago
###### _This patch was authored and released by @BennyDeBock._ Correctly handle the filename* ContentDisposition header to be compliant with [RFC-5987](https://www.rfc-editor.org/rfc/rfc5987) as described in [RFC 6266](https://datatracker.ietf.org/doc/html/rfc6266#section-4.3). This allows handling of unicode and other format characters in filenames. Resolves https://github.com/vapor/vapor/issues/2802
Update Supported Swift Versions
4 days 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/)
Adds `cache.delete(_:)`
1 week ago
###### _This patch was authored and released by @BennyDeBock._ closes #2659 Adds a function called `delete` to remove a cached value. I wasn't able to override the method with `ExpressableByNilLiteral?` instead of `T?` without making breaking changes
Add `.mjs` for `application/javascript` media type
1 week ago
###### _This patch was authored by @MaxDesiatov and released by @0xTim._ [According to MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), `.mjs` is an extension that JavaScript files with support for EcmaScript Module system can use. The lack of this extension in the mapping causes some browsers to throw `'text/plain' is not a valid JavaScript MIME type.` error. <!-- πŸš€ 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. -->
Provide async closures in XCTVapor
4 weeks ago
###### _This patch was authored by @AndreYonadam and released by @0xTim._ This adds the ability to perform asynchronous work in the `beforeRequest` and `afterResponse` closures in XCTVapor. E.g. ```swift try await app.test(.GET, "/hello", beforeRequest: { req async throws in let currentUsersCount = try await User.query(on: app.db).count() }, afterResponse: { res async throws in let newUsersCount = try await User.query(on: app.db).count() }) ```
Added custom failure descriptions to Validation Errors
5 weeks ago
###### _This patch was authored by @AndreYonadam and released by @0xTim._ This adds support for custom failure descriptions when running validations. This allows you to customise the any unreadable keys and allows you to provide localized failure descriptions for each Validation.
Fix ambiguous error with Swift nightlies
5 weeks ago
###### _This patch was authored by @SusanDoggie and released by @0xTim._ Fix a compilation error in the latest Swift nightlies due to using `String.lazy.split(separator:)`, which is not needed
Update Server Configuration after start
9 weeks ago
###### _This patch was authored and released by @0xTim._ This ensures that the `Application`'s configuration is updated correctly when the server starts. This allows you to retrieve correct hostname and ports from the `Application`. Resolves #2755
Require version of swift-nio-http2 with security fix
10 weeks ago
###### _This patch was authored and released by @gwynne._ Per https://github.com/apple/swift-nio-http2/security/advisories/GHSA-q36x-r5x4-h4q6
iOS macOS watchOS tvOS linux macOS iOS
vapor/fluent 4.4.0
Vapor ORM (queries, models, and relations) for NoSQL and SQL databases
⭐️ 1,142
πŸ•“ 29 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 async/await
29 weeks ago
###### _This patch was authored and released by @0xTim._ Adds initial support for async/await
Fix conditional Codable conformance
50 weeks 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
51 weeks 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
1 year 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
1 year 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
1 year 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.
Fix deprecated renamed fix for ModelTokenAuthenticatable
2 years ago
###### _This patch was authored by @0xTim and released by @tanner0101._ Fixes incorrect rename deprecation for `ModelTokenAuthenticatable` (#677).
macOS linux macOS iOS
vapor/redis 5.0.0-alpha.1
Vapor provider for RediStack
⭐️ 450
πŸ•“ 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.
Redis 5.0.0 Alpha 1
4 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
13 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`
29 weeks ago
###### _This patch was authored and released by @0xTim._ Add `async` APIs for Redis
Expose method on Redis objects to lease connections
33 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.3.0
πŸ’» APIs for creating interactive CLI tools.
⭐️ 354
πŸ•“ 6 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.
Add support for async `Command`s
7 hours 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.
40 weeks 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.
Log metadata at all log levels.
1 year ago
###### _This patch was authored by @ileitch and released by @tanner0101._ Log metadata at all log levels. Previously, metadata was only logged at the `debug` log level. (#149)
Add CommandSignature.outputHelp method
1 year ago
###### _This patch was authored and released by @tanner0101._ Adds `outputHelp` method to `CommandSignature` (#148). This allows for the creation of formatted help commands using `CommandSignature` requiring conformance to `Command`. `Command.outputHelp` now uses this method internally.
Fix double-output of "Error: " label for command errors
1 year ago
###### _This patch was authored and released by @gwynne._ Because `CommandError.description` includes the "Error: " label in the returned text, practically all formatted error output (especially such as found in vapor/toolbox) ends up printing `Error: Error: ...` for command errors. Since this table is redundant in the `description` of an `Error` anyway, we just remove it. The `description` of an `Error` is human-readable and therefore not parseable, and is thus not considered API, so this is considered a `semver-patch` change.
macOS linux macOS iOS
vapor/leaf 4.2.0
πŸƒ An expressive, performant, and extensible templating language built for Swift.
⭐️ 353
πŸ•“ 4 days ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Update Supported Swift Versions
4 days 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
15 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
22 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`
40 weeks 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
Leaf 4.0.0
1 year ago
Docs can be found at https://docs.vapor.codes/4.0/leaf/getting-started/
4.0.0 Zeta 1
1 year ago
This release reverses the changes made by Tau. Tau became an awesomely complex and advanced renderer that outgrew Leaf's original view and Vapor. The core team made the decision to release Leaf in it's original form as something we could commit to maintaining and offer a simple HTML renderer. This means that Tau will be split out and offered as a separate renderer for those that want it and Tau won't be constrained by the requirements of the core team. If you want to keep using Tau we encourage you to do so! You can find it in the fork [here](https://github.com/tdotclare/leaf/tree/tau). Note that the location may change in the future. This release reflects the final API that will be tagged as 4.0.0 soon unless any glaring bugs come up.
iOS macOS linux macOS iOS
vapor/jwt 4.2.0
Vapor JWT provider
⭐️ 287
πŸ•“ 5 days ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Drop support for Swift 5.2 and 5.3
5 days 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`
29 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
1 year 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
1 year 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
1 year 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
1 year 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).
Release Candidate 1
2 years ago
Upgrades to Swift 5.2. > 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.
macOS linux macOS iOS
vapor/http 3.4.0
πŸš€ Non-blocking, event-driven HTTP built on Swift NIO.
⭐️ 234
πŸ•“ 32 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
1 year 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
2 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.4.1
Simplifies common command line tasks when using Vapor
⭐️ 230
πŸ•“ 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.
Allow dynamic file names in template manifest
7 hours 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
Yesterday
###### _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`
10 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
11 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
11 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
Fix default branch name
1 year ago
Renames the branch used from `master` to `main` #356
Don't try to build the app when using only the `-h` or `--help` flags on the `run` command
1 year ago
###### _This patch was authored by @tkrajacic and released by @0xTim._ Also add an explanatory line to the output with the equivalent swift package manager command. ![image](https://user-images.githubusercontent.com/873717/94997912-95c38800-05ae-11eb-8e44-a8c2fb270a36.png) Fixes #341
Add better support for --feature and --no-feature
1 year ago
In the past, "positive" options passed to `vapor new`, such as `--fluent`, would only work if the type of the variable in the `manifest.yml` corresponding to the option was `nested`. This update adds the following capabilities: - Variables of type `bool` will now recognize positive option flags as well, and will no longer throw an error. - Both `bool` and `nested` variables now _also_ recognize an inverted "negative" option flag, e.g. `--no-fluent`. A negative option flag has the same effect on a single variable that `--no` has on all of them. - `bool` variables are now correctly handled by the `if:` condition in a `manifest.yml`, rather than acting as if they're always `true`. Not all of these changes are immediately visible in the toolbox by itself, but when combined with updates to [vapor/template](https://github.com/vapor/template), it is now possible to request relatively complex configurations for a new Vapor project with no user interaction required at all. Some examples: ``` $ vapor new test_simple --no-fluent --no-leaf Cloning template... name: test_simple fluent: No leaf: No Generating project files $ vapor new test_with_db --fluent.db postgres --no-leaf Cloning template... name: test_with_db fluent: Yes db: Postgres leaf: No Generating project files $ vapor new test_with_leaf --no-fluent --leaf Cloning template... name: test_with_leaf fluent: No leaf: Yes Generating project files $ vapor new test_with_everything --fluent.db sqlite --leaf Cloning template... name: test_with_everything fluent: Yes db: SQLite leaf: Yes Generating project files ```
Add Makefile + optional static version
1 year ago
###### _This patch was authored and released by @tanner0101._ Adds a Makefile with `build`, `install`, and `uninstall` commands (#340, #339, fixes #338) Using `make build` will attempt to infer the current toolbox version number and compile it into the executable for lookup via `--version`. Sample output: ``` $ vapor --version framework: 4.27.1 toolbox: master (90e3d12) ```
macOS
vapor/mysql-kit 4.5.0
🐬 Pure Swift MySQL client built on non-blocking, event-driven sockets.
⭐️ 191
πŸ•“ 21 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 SwiftCrypto version pin
21 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
22 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
28 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
37 weeks 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
1 year ago
###### _This patch was authored by @zengxs and released by @gwynne._
MySQLKit 4.0.0
1 year 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
1 year 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
1 year 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() ```
Add dialect trigger options
1 year ago
###### _This patch was authored and released by @tanner0101._ Adds supported SQL trigger options to `MySQLDialect` (#284). Also improves CI.
Require the new semver-major RC of mysql-nio
2 years ago
###### _This patch was authored and released by @gwynne._ Semver-major is more trouble than it's worth sometimes. Need a new release to bump `Package.swift`. There's no change to MySQLKit's API whatsoever so it's semver-patch here.
macOS linux macOS iOS
vapor/websocket-kit 2.3.1
WebSocket client library built on SwiftNIO
⭐️ 183
πŸ•“ 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 content length header on initial handshake
7 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
21 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
36 weeks 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`
39 weeks 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()' ```
Fix issue where web sockets don't close on TLS connections
1 year ago
###### _This patch was authored by @EthanLozano and released by @0xTim._ Resolves an issue where web socket connections weren't being closed after being sent a `close()` from the client on TLS connections (#89). Resolves (#86)
Fix miscellaneous issues with WebSocket closing
1 year ago
###### _This patch was authored by @tanner0101 and released by @siemensikkema._ Fixes miscellaneous issues with regards to closing a WebSocket connection (#77)
Fix force try in connect method
1 year ago
###### _This patch was authored by @jameshartt and released by @tanner0101._ Fix force try in `wss://` connect method (#71).
Automatic WebSocket pings
2 years ago
###### _This patch was authored by @bridger and released by @tanner0101._ Adds a `pingInterval` property on WebSocket which will trigger automatic pings to the peer to ensure that the connection is still active (#68).
Send correct close code to peer
2 years ago
###### _This patch was authored by @bridger and released by @tanner0101._ Updates WebSocket close to send correct code to peer according to [RFC6455](https://tools.ietf.org/html/rfc6455#section-7.4) (#67).
WebSocketKit 2.0.0
2 years ago
Docs: https://docs.vapor.codes/4.0/websockets/ More information on Vapor 4 official release: https://forums.swift.org/t/vapor-4-official-release-begins/34802
macOS linux macOS iOS
vapor/postgres-nio 1.10.0
🐘 Non-blocking, event-driven Swift client for PostgreSQL.
⭐️ 167
πŸ•“ 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.
PostgresNIO 1.10.0
3 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
9 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 checkout@v3 in https://github.com/vapor/postgres-nio/pull/269 **Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.8.0...1.9.0
PostgresNIO 1.8.0 (async/await)
10 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
24 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.
24 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`
25 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
25 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
25 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.
Make password hashing fast
30 weeks ago
###### _This patch was authored by @fabianfett and released by @gwynne._ This is just a really quick patch to reduce the 320 allocations we have for hashing the password to something sensible (less than 10). ### Result In allocation analysis, password hashing doesn't appear as a biggy anymore.
PostgresNIO 1.6.2
34 weeks ago
### Semver Patch - PSQLBackendMessageDecoder is a SingleStepDecoder (#174) - Add conveniences to PSQLFrontendMessage (#173) - Add RowStreamStateMachine (#176) - Extract PSQLRow (#177) - Add BufferedMessageEncoder, fix PSQLFrontendMessageEncoder (#179) - Batch rows for consumption (#180) - Depend on Swift Crypto `"1.0.0" ..< "3.0.0"` (#183) - Move Decoding into PSQLChannelHandler (#182) - Move message encoding into PSQLChannelHandler (#181) - Bump SwiftNIO dependency to 2.33.0 (#184) ### Other changes - Add PSQLBackendMessageEncoder (#175) - Add PSQLFrontendMessageDecoder (#178)
iOS macOS watchOS tvOS
vapor/sql-kit 3.18.0
*️⃣ Build SQL queries in Swift. Extensible, protocol-based design that supports DQL, DML, and DDL.
⭐️ 152
πŸ•“ 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.
Add support for MySQL's DROP INDEX syntax
3 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
5 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
22 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
23 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 ...`
24 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)
24 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.
Add Concurrency extensions for SQLKit
25 weeks ago
###### _This patch was authored and released by @gwynne._ Shockingly little effort required here! SQLKit doesn't do very much asynchronous work, in and of itself.
MySQL chokes on supplemental plane Unicode
30 weeks ago
###### _This patch was authored and released by @gwynne._ So don't use it in the benchmarks. Sigh.
Support for UPSERT/conflict resolution clauses
30 weeks ago
###### _This patch was authored and released by @gwynne._ Currently, the emitted syntax is compatible with SQLite and PostgreSQL, but not MySQL. Because MySQL diverges radically from the standard, considerable additional work would be needed to support it. Some design flaws still exist in this implementation, but it is possible to specify all of the common clauses needed for `UPSERT`. There is no support for SQLite's `ON CONFLICT ROLLBACK/ABORT/FAIL/IGNORE/REPLACE` syntax, nor for any of the more esoteric clauses supported by PostgreSQL. It doesn't seem useful to add that support; it's unlikely that a query requiring such specialized facilities would be portable across databases in any event.
Add convenience extensions to simplify some common use cases
31 weeks ago
###### _This patch was authored and released by @gwynne._ I mean, I could go on adding methods like these to SQLKit for a week and not cover the entire API surface...
macOS linux macOS iOS
vapor/fluent-kit 1.25.0
Swift ORM (queries, models, and relations) for NoSQL and SQL databases
⭐️ 139
πŸ•“ 5 days ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Drop Support for Swift 5.2 and 5.3
5 days ago
###### _This patch was authored and released by @0xTim._ Remove support for 5.2 and 5.3
Add basic support for further qualifying model schemas
1 week ago
###### _This patch was authored and released by @gwynne._ This supports the partitioning of individual Fluent models between PostgreSQL schemas, MySQL databases, and multiple attached SQLite databases.
Make accessing `model.id` safe
3 weeks ago
###### _This patch was authored by @ahmdyasser and released by @0xTim._ This removes force unwraps when accessing a model's ID in the CRUD operations and changes them to throw an error instead to make the code safer. Resolves #495
Fix input handling for `EnumProperty` and `OptionalEnumProperty`
5 weeks ago
###### _This patch was authored by @grahamburgsma and released by @gwynne._ `input(to input: DatabaseInput)` on `EnumProperty` and `OptionalEnumProperty` was incorrectly using the value instead of the inputValue. This caused `Model.hasChanges` to always return true for any model with an Enum property. Additionally Enum properties would always be updated in queries generated by `Model.update(on:)`.
Further improve the workaround for Mirror's slowness
6 weeks ago
###### _This patch was authored and released by @gwynne._ Refactors the workaround into its own `IteratorProtocol` and `Sequence` implementation, and starts using the workaround for `AnyModel.anyID` for good measure (this was not happening before). Also removes unneeded `@testable` imports from the tests.
Enable looking up database names of multiple model key paths at once
8 weeks ago
###### _This patch was authored and released by @gwynne._ This loosens the requirement on the value of a `KeyPath` passed to `Fields.path(for:)` to `AnyQueryableProperty`, which has no associated types or `Self` requirements, and can thus be treated as an existential (e.g. `any AnyQueryableProperty`). While existentials are best avoided when possible, in this case, the relaxed definition allows usefully operating on the resolved database field names of an arbitrary set of key paths without the use of variadic generics. As this is a very confusing and opaque description of the behavior, here is an example of a helper method which was impossible to write before: ```swift extension SchemaBuilder { func fields<M: FluentKit.Model>(from _: M.Type = M.self, _ keypaths: KeyPath<M, AnyQueryableProperty>...) -> Self { return keypaths.reduce(self) { builder, keypath in // N.B.: Despite the name and array type, `Fields.path(for:)` never returns more than one `FieldKey` in practice. // Implementing `figureOutDataType(for:)` is left as an exercise for the reader. return builder.field(M.path(for: keypath).first!, figureOutDataType(for: keypath)) } } } // Usage would be something like: database.schema(M.schema) .fields(\.$id, \.$foo, \.$bar, \$.baz) .create() ``` Previously, such a helper could only have taken a single `KeyPath` parameter. This is admittedly a contrived example (and by design very far from a complete "automatic migration" implementation), and it's a fairly small convenience to call `.fields(a,b,c,d)` versus `.field(a).field(b).field(c).field(d)`, but it's nonetheless useful. The generic constraint should never have been so strict in any event. (And field keys should not be wrapped in arrays all the time, but that's a PR for another day.) _Note: While technically the relaxed constraint is a "new" public API, the change is small enough and the difference invisible enough that I've marked this semver-patch; even for me, there's such a thing as being too pedantic about the rules πŸ™‚._
Address performance regression in Swift 5.6
9 weeks ago
###### _This patch was authored and released by @gwynne._ Bump maximum allowed compiler version for the use of runtime SPI to speeds up reflection, as the SPI is still valid for 5.6. Restores previous performance improvement.
Adds a page count to `PageMetadata`
9 weeks ago
###### _This patch was authored by @fwgreen and released by @0xTim._ Adds the page count as a computed property to `PageMetadata` so it doesn't need to be manually calculated based off the total number of items and items per page. Fixes https://github.com/vapor/fluent-kit/issues/481
Make it easier to save and restore models with relations outside the database
12 weeks ago
###### _This patch was authored and released by @gwynne._ When trying to cache database lookup results in a faster storage, such as Redis, it is often difficult to store models, as the `Children`, `OptionalChild`, and `Siblings` property wrappers do not round-trip correctly through `Codable`. This doesn't solve the issue, but it does enable users to work around it by manually restoring the necessary ID value, which is not currently possible except by faking a database output (and doing so in turn incurs much of the overhead of Fluent decoding which is otherwise bypassed by cache storage).
Fix NULL handling for OptionalFieldProperty and OptionalEnumProperty
12 weeks ago
###### _This patch was authored and released by @gwynne._ `OptionalFieldProperty.value.getter` was incorrectly returning `.none(.none)` instead of `.some(.none)` when `self.inputValue` was `DatabaseQuery.Value.null`, preventing explicitly set `nil` values set by properties that wrap optional field properties (i.e. `OptionalEnumProperty`) from taking effect as they should. Additionally, `OptionalEnumProperty.value.setter` was not correctly forwarding the double-optional state of `newValue`, causing a `fatalError()` due to non-uniform input sets on bulk inserts. This fixes both of those issues and updates the appropriate tests. The behavior of `OptionalEnumProperty` is noticeably different now, so even though this does not change any public API, it will be released as `semver-minor` to lessen impact for those who were relying on the incorrect old behavior. Fixes #396. Fixes #444.
iOS macOS
vapor/queues 1.8.1
A queue system for Vapor.
⭐️ 137
πŸ•“ 29 weeks ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Make AsyncScheduledJob public so clients can conform to it
29 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.
29 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
29 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
38 weeks 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
47 weeks 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.
Job Event Delegate Hooks
1 year ago
###### _This patch was authored and released by @jdmcd._ This release adds a protocol called `JobEventDelegate` which allows ends users to "hook" into the status of jobs that are being run. Each notification hook can specify a success handler, an error handler, or both. To get started, conform an object to `JobEventDelegate` and implement any of the methods you'd like: ```swift struct MyEventDelegate: JobEventDelegate { public func dispatched(job: JobEventData, eventLoop: EventLoop) -> EventLoopFuture<Void> { eventLoop.future() } public func didDequeue(jobId: String, eventLoop: EventLoop) -> EventLoopFuture<Void> { eventLoop.future() } public func success(jobId: String, eventLoop: EventLoop) -> EventLoopFuture<Void> { eventLoop.future() } public func error(jobId: String, error: Error, eventLoop: EventLoop) -> EventLoopFuture<Void> { eventLoop.future() } } ``` Then, add it in your configuration file: ```swift app.queues.add(MyEventDelegate()) ``` This PR also adds a bunch of `trace` logging for better debugging
Allow worker count to be configured
1 year ago
###### _This patch was authored and released by @tanner0101._ Adds a new `workerCount` property to `QueuesConfiguration` (#86, fixes #84). This property lets you configure how many workers will be used for handling jobs. The default value is `.default` which uses one worker per event loop. You can set a custom number of workings using `.custom(_:)` or an integer literal. ```swift // Use two workers for handling jobs. app.queues.configuration.workerCount = 2 ``` Each worker will be assigned an event loop round-robin. If the number of workers is larger than the number of event loops, some event loops will have multiple workers.
Logging metadata improvements
1 year ago
###### _This patch was authored by @ileitch and released by @jdmcd._ (#83) * Log the job ID rather than the whole struct when a job is dispatched * Log the queue name when a job is dequeued * Move queue name into metadata for worker starting notice
Print log if scheduled job fails
1 year ago
###### _This patch was authored and released by @tanner0101._ A log message will now be printed if any `ScheduledJob` returns a failure (#82).
macOS
vapor/postgres-kit 2.6.0
🐘 Non-blocking, event-driven Swift client for PostgreSQL.
⭐️ 126
πŸ•“ 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.
Improve row decoding performance
8 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
16 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/postgres-nio@1.4.0` 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
22 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
28 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
33 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).
Fix passing the logger through on `PostgresConnectionSource`
39 weeks ago
###### _This patch was authored by @joshuawright11 and released by @0xTim._ Pass the correct logger through to `PostgresConnectionSource` to bring it in line with [MySQLKit](https://github.com/vapor/mysql-kit/blob/master/Sources/MySQLKit/MySQLConnectionSource.swift#L21).
Fix `TLSConfiguration.forClient()` deprecation
39 weeks ago
###### _This patch was authored by @axtonpitt and released by @0xTim._ Fixes: ``` warning: 'forClient(cipherSuites:minimumTLSVersion:maximumTLSVersion:certificateVerification:trustRoots:certificateChain:privateKey:applicationProtocols:shutdownTimeout:keyLogCallback:)' is deprecated: renamed to 'makeClientConfiguration()' ```
Add static `ianaPortNumber` property to `PostgresConfiguration`
1 year ago
###### _This patch was authored and released by @gwynne._ Allows referencing the default PostgreSQL TCP port number (as assigned by the IANA) without hardcoding the number `5432` all over the place.
Use correct minimal dependency of PostgresNIO
1 year ago
###### _This patch was authored by @siemensikkema and released by @0xTim._ PostgresKit relies on APIs introduced in PostgresNIO 1.4.0 and `Package.swift` now reflects that (#200, fixes #199).
Use PostgresNIO's default JSON coders
1 year ago
###### _This patch was authored by @jordanebelanger and released by @tanner0101._ This adds support for using non-Foundation JSON coders when decoding and encoding JSON columns (#195). For example, if you want to use the [pure-swift JSON coders](https://github.com/fabianfett/pure-swift-json), you can now do this during the configuration of your application: ```swift import PureSwiftJSON PostgresNIO._defaultJSONDecoder = PSJSONDecoder() PostgresNIO._defaultJSONEncoder = PSJSONEncoder() ``` **Do note that the JSON coders used here MUST be thread safe internally.**
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.
⭐️ 124
πŸ•“ 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.
Crypto 3.4.1
1 year ago
Fixes a compile error when using OpenSSL 1.1 introduced in 3.4.0.
Crypto 3.4.0
1 year 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
2 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
2 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
3 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
3 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.2.6
🐘 PostgreSQL driver for Fluent.
⭐️ 114
πŸ•“ 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.
Clean up row decoding
8 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
9 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
9 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
15 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
22 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
31 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
35 weeks 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
44 weeks 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.
2.1.2
1 year ago
Update the Postgres NIO dependency to the correct version with the APIs Fluent Postgres Driver uses (#175 )
Use `PostgresConfiguration.ianaPortNumber` where possible
1 year ago
###### _This patch was authored and released by @gwynne._ This is a follow-on from vapor/postgres-kit#201.
macOS linux macOS iOS
vapor/multipart-kit 4.5.2
🏞 Parses and serializes multipart-encoded data with Codable support.
⭐️ 102
πŸ•“ 4 days ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Depend on Swift Collections
5 days 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
29 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
32 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
34 weeks 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
34 weeks 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
49 weeks 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
49 weeks ago
###### _This patch was authored and released by @siemensikkema._ Add support for encoding and decoding `UUID`s (#64)
Support nested multipart encoding
49 weeks 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.5.0
🚍 High-performance trie-node router.
⭐️ 94
πŸ•“ 2 days ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Pass a `Logger` to `Parameters`
2 days 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
4 days 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
23 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
1 year 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).
RoutingKit 4.0.0
2 years ago
Docs: https://docs.vapor.codes/4.0/routing/ More information on Vapor 4 official release: https://forums.swift.org/t/vapor-4-official-release-begins/34802
macOS linux macOS iOS
vapor/service 1.0.2
πŸ“¦ Dependency injection / inversion of control framework.
⭐️ 80
πŸ•“ 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/apns 2.3.0
Helpful extensions and abstractions for using APNSwift
⭐️ 70
πŸ•“ 4 days ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Update Supported Swift Versions
4 days 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
29 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.
Fix infinite recursion on APNSwift release
1 year ago
APNS 1.0.0
1 year ago
###### _This patch was authored and released by @tanner0101._ Docs: https://docs.vapor.codes/4.0/apns/ More information on Vapor 4 official release: https://forums.swift.org/t/vapor-4-official-release-begins/34802
Vapor is out of RC, require the released version
1 year ago
###### _This patch was authored by @gwynne and released by @kylebrowning._ _No additional notes._
Release Candidate 1
2 years ago
Upgrades APNs to APNSwift 2.0
Beta 3
2 years ago
- Match Vapor's new minimum OS requirement - Bump minimum required version of Vapor - Major beta server due to compatibility break of new minimum OS requirement. There are no actual changes to this driver or to the underlying APNS implementation. This patch was authored by @gwynne and released by @0xTim.
macOS
vapor/fluent-mysql-driver 4.0.3
πŸ–‹πŸ¬ Swift ORM (queries, models, relations, etc) built on MySQL.
⭐️ 66
πŸ•“ 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.
Support the models-with-spaces FluentKit work
1 week ago
###### _This patch was authored and released by @gwynne._ See https://github.com/vapor/fluent-kit/pull/503
Improved error reporting via `DatabaseError`
22 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
36 weeks ago
###### _This patch was authored and released by @gwynne._ A bit of simple cleanup for the deprecations in NIOSSL.
FluentMySQLDriver 4.0.0
1 year 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
1 year 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
1 year 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
1 year 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
1 year 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
Date and Bool fixes
2 years ago
###### _This patch was authored by @mcdappdev and released by @tanner0101._ Fixes some regressions around `Date` and `Bool` handling (#168). - `Foundation.Date` can now be decoded from `.date` (`DATE`) columns. > Note: Time information will be silently discarded when `Foundation.Date` is stored in `.date` column. Use `.datetime` (`DATETIME(6)`) to store date + time. - Fluent's `.bool` data type and `Swift.Bool` now use MySQL's `BOOL` (`TINYINT`) column type instead of `BIT`.
macOS linux macOS iOS
vapor/jwt-kit 4.5.0
πŸ”‘ JSON Web Token signing and verification (HMAC, RSA, ECDSA) using BoringSSL.
⭐️ 66
πŸ•“ 4 days ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Update supported Swift Versions and BoringSSL
5 days 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
9 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
29 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
33 weeks ago
###### _This patch was authored by @mbutan and released by @0xTim._ Adds support for tvOS
Expand Crypto Dependencies
33 weeks 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
39 weeks ago
###### _This patch was authored and released by @0xTim._ - Update vendor script - Update BoringSSL to 80df7398ce52574801821ce7a76c031c35d6b882
Add `is_private_email` claim to `AppleIdentityToken`
43 weeks 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.
Unify Vendor Claim Verification Failure Message
1 year ago
###### _This patch was authored by @hiimtmac and released by @0xTim._ Unify messaging for issuer `JWTError.claimVerificationFailure` for Apple, Microsoft and Google to read `Token not provided by INSERT_VENDOR`. Also fixes a typo in the `Microsoft` error. (#49)
Make CJWTKitBoringSSL implementation only
1 year ago
###### _This patch was authored and released by @0xTim._ Makes CJWTKitBoringSSL implementation only to avoid leaking C types from BoringSSL. Resolves #51 Also updates BoringSSL to f6bd54efbcafcf4625ce99b5f702dc4850b0ca50
Add `ECDSAKey` support to `JWKS`
1 year ago
###### _This patch was authored and released by @JaapWijnen._ - Allows to create `JWK`'s using `ECDSAKey`s - Allows use of `ECDSAKey`s with `JWTSigner`. - Prevents a crash when using the `.es384` curve for `ECDSAKey`s ```swift let key = ECDSAKey.generate(curve: .p384) let jwks = JWKS(keys: [ JWK.ecdsa(.es384, identifier: JWKIdentifier(string: "token-kid"), x: key.parameters!.x, y: key.parameters!.y, curve: .p384) ]) ``` ```swift let key = ECDSAKey.generate(curve: .p384) let signer = JWTSigner.es384(key: key) ```
iOS macOS tvOS
vapor/core SR-6922
🌎 Utility package containing tools for byte manipulation, Codable, OS APIs, and debugging.
⭐️ 65
πŸ•“ 34 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.
3.10.1
34 weeks 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
2 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
2 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/async-kit 1.12.0
Sugary extensions for the SwiftNIO library
⭐️ 58
πŸ•“ 4 days ago
πŸ”– Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
Update Supported Swift Versions
4 days 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
18 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(_:)`
25 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
29 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
29 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
33 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
34 weeks 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.
35 weeks 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
36 weeks ago
###### _This patch was authored and released by @gwynne._ This is effectively a convenience for using `EventLoopFuture.andAllSucceed(_:on:)`.
Add `strictMap()` and `EventLoopFuture.whenTheySucceed()`
36 weeks ago
###### _This patch was authored and released by @gwynne._ - `strictMap()` is a global function providing the services of `Optional.map()` for multiple optionals at once: `strictMap(a, b, { foo($0, $1) })` is equivalent to (but slightly more efficient than) `a.flatMap { a in b.map { b in foo(a, b) } }`. - `EventLoopFuture.whenTheySucceed()` provides the "wait for all to succeed or any to fail" semantics of `.whenAllSucceed()` for a heterogenous set of futures. Or in other words, it's a more-than-two-futures version of `.and()`: `EventLoopFuture.whenTheySucceed(f1, f2, f3)` is equivalent to (but _much_ more efficient than) `f1.and(f2).and(f3).map { ($0.0, $0.1, $1) }`.
macOS
vapor/fluent-sqlite-driver 4.1.0
Fluent driver for SQLite
⭐️ 57
πŸ•“ 49 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 configurable connection pool timeout
50 weeks 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
1 year 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
1 year 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
1 year 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
1 year 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.
FluentKit Beta 4
2 years ago
Updates to https://github.com/vapor/fluent-kit/releases/tag/1.0.0-beta.4.
iOS macOS linux macOS iOS
vapor/validation 2.1.1
βœ… Extensible data validation library (name, email, etc)
⭐️ 50
πŸ•“ 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.
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
3 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
⭐️ 49
πŸ•“ 22 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
22 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
1 year 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
1 year ago
Updates to SQLite 3.29.0 and enables extensions similar to macOS's included SQLite (#55).
Fix Package.swift to use release versions
1 year ago
###### _This patch was authored and released by @tanner0101._ Fixes the package's dependencies to require release versions (#89).
SQLiteKit 4.0.0
1 year 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
1 year 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
1 year 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
1 year 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
1 year 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/mysql-nio 1.4.0
🐬 Non-blocking, event-driven Swift client for MySQL.
⭐️ 47
πŸ•“ 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.
Improve error handling
23 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"`
34 weeks ago
###### _This patch was authored by @fabianfett and released by @gwynne._ Needs patch release.
Clean up the ByteBuffer utility methods
34 weeks 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
36 weeks 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
1 year 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
1 year 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
1 year 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
1 year 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
1 year 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/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
2 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
2 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
3 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/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
3 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
3 years ago
New: - Adds a new `connectionPool` parameter when requesting a cached connection from a container. (#43, #44).
DatabaseKit 1.2.0
3 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
3 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/url-encoded-form 1.1.0
πŸ“ Parse and serialize url-encoded form data with Codable support.
⭐️ 38
πŸ•“ 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
3 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
3 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/sqlite-nio 1.1.0
Non-blocking wrapper for libsqlite3-dev using SwiftNIO
⭐️ 30
πŸ•“ 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.
Improve SQLite Boolean decoding
1 year 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
1 year 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
1 year 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
2 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)
⭐️ 16
πŸ•“ 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/queues-redis-driver 1.0.3
A Redis implementation for https://github.com/vapor/queues
⭐️ 15
πŸ•“ 28 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/fluent-mongo-driver 1.1.1
MongoDB support for Fluent built on MongoKittten.
⭐️ 14
πŸ•“ 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.
Support the models-with-spaces FluentKit work
1 week ago
###### _This patch was authored and released by @gwynne._ See vapor/fluent-kit#503
Make `FluentMongoError` public
10 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
1 year ago
###### _This patch was authored and released by @tanner0101._ Adds support for the contains (`~~`) operator (#35).
Release FluentMongoDriver 1.0.0
1 year 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
1 year 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
Exports the Document type for flexible data support, and adds tests
2 years ago
###### _This patch was authored and released by @Joannis._ Exports the Document type for flexible data support, and adds tests.
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
1 year 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
2 years ago
## Major - Updates to latest RedisNIO (now called RediStack) #17
RedisKit 1.0.0 Alpha 1.1
2 years ago
Fixed: - `isClosed` now returns the correct value. (#16)
RedisKit 1.0.0 Alpha 1
2 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