Swiftpack.co - Swift Packages by swhitty

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

Packages published by swhitty

swhitty/FlyingFox 0.14.0
Lightweight, HTTP server written in Swift using async/await.
⭐️ 389
πŸ•“ 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.
0.14.0 RangeReplaceableCollection
1 week ago
- `RoutedHTTPHandler` now conforms to [`RangeReplaceableCollection`](https://developer.apple.com/documentation/swift/rangereplaceablecollection) https://github.com/swhitty/FlyingFox/issues/77 - Some internal continuations are now [`swhitty/IdentifiableContinuation`](https://github.com/swhitty/IdentifiableContinuation) making it easier to manage continuations with cancellation handlers.
Fix Percent Encoded Paths Swift 5.7+
22 weeks ago
- Fixes support for parsing and matching requests and routes with percent encoded paths. https://github.com/swhitty/FlyingFox/issues/74 Thanks @wirrareka - Drops support for Swift 5.5 and 5.6.
Fix crash in HTTPServer.stop()
26 weeks ago
- Fixes a crash in `HTTPServer.stop()` ensuring socket is not closed twice https://github.com/swhitty/FlyingFox/issues/66 πŸ™πŸ» Thanks @samlapse
Fix Buffer leak
35 weeks ago
- Initial support Swift 5.9 - Fixes a small buffer leak https://github.com/swhitty/FlyingFox/issues/62. πŸ™πŸ» Thanks @lhoward
Initial Support for Swift 5.9 & DiscardingTaskGroup
43 weeks ago
* Adds support for Swift 5.9 and DiscardingTaskGroup (when available). https://github.com/swhitty/FlyingFox/pull/60 * Xcode 15 Beta 2 support * Support `image/x-icon`, `image/webp`, `image/jp2` Content-Type.
Initial Support for Swift 5.9 & DiscardingTaskGroup
45 weeks ago
* Adds support for Swift 5.9 and DiscardingTaskGroup (when available). https://github.com/swhitty/FlyingFox/pull/60 * `isListening` public API https://github.com/swhitty/FlyingFox/pull/59 * Support `image/svg+xml` Content-Type.
Large Requests with HTTPBodySequence
1 year ago
Adds support for very large bodies within `HTTPRequest` and `HTTPResponse` that can be processed in `Data` chunks. ### HTTPRequest Requests now include a `bodySequence: HTTPBodySequence` which allows the request body to be iterated in small chunks as they arrive: ```swift func saveBody(request: HTTPRequest) async throws -> HTTPResponse { let file = URL(fileURLWithPath: "/tmp/file") _ = FileManager.default.createFile(atPath: file.path, contents: nil) let handle = try FileHandle(forWritingTo: file) for try await chunk in req.bodySequence { try handle.write(contentsOf: chunk) } return HTTPResponse(statusCode: .ok) } ``` The existing `var data: Data` property has been deprecated, but is still supported and synchronously returns the uploaded data for requests less than 10 MiB. ### HTTPResponse Response payloads can provide a `HTTPBodySequence` which allows the response body to be provided in small chunks as they are sent: ```swift func getXcode(request: HTTPRequest) async throws -> HTTPResponse { try HTTPResponse( statusCode: .ok, body: HTTPBodySequence(file: URL(fileURLWithPath: "/tmp/Xcode_14.3.xip")) ) } ``` Providing a `Data` instance for the `body` property is still supported. The existing `var data: Data?` property has been deprecated, but is still supported and synchronously returns response payload if the response is not a web socket or `HTTPBodySequence`. ### FileHTTPHandler The existing `FileHTTPHandler` now serves all files larger than 10 MiB in small chunks, while files smaller are still served via a complete `Data` instance.
Large Requests with HTTPBodySequence
1 year ago
Adds support for very large bodies within `HTTPRequest` and `HTTPResponse` that can be processed in `Data` chunks. ### HTTPRequest Requests now include a `bodySequence: HTTPBodySequence` which allows the request body to be iterated in small chunks as the arrive: ```swift func saveBody(request: HTTPRequest) async throws -> HTTPResponse { let file = URL(fileURLWithPath: "/tmp/file") _ = FileManager.default.createFile(atPath: file.path, contents: nil) let handle = try FileHandle(forWritingTo: file) for try await chunk in req.bodySequence { try handle.write(contentsOf: chunk) } return HTTPResponse(statusCode: .ok) } ``` The existing `var data: Data` property has been deprecated, but is still supported and synchronously returns the uploaded data for requests less than 10 MiB. ### HTTPResponse Response payloads can provide a `HTTPBodySequence` which allows the response body to be provided in small chunks as they are sent: ```swift func getXcode(request: HTTPRequest) async throws -> HTTPResponse { try HTTPResponse( statusCode: .ok, body: HTTPBodySequence(file: URL(fileURLWithPath: "/tmp/Xcode_14.3.xip")) ) } ``` Providing a `Data` instance for the `body` property is still supported. The existing `var data: Data?` property has been deprecated, but is still supported and synchronously returns response payload if the response is not a web socket or `HTTPBodySequence`. ### FileHTTPHandler The existing `FileHTTPHandler` now serves all files larger than 10 MiB in small chunks, while files smaller are still served via a complete `Data` instance.
SocketPool kqueue / epoll
1 year ago
- [`kqueue(2)`](https://www.freebsd.org/cgi/man.cgi?kqueue) / [`epoll(7)`](https://man7.org/linux/man-pages/man7/epoll.7.html) events are now used to suspend and resume socket using `SocketPool<EventQueue>` - `SocketPool<EventQueue>` is now the default pool used by `HTTPServer` - `PollingSocketPool` has been replaced by `SocketPool<Poll>` - Windows uses `SocketPool<Poll>` - Moved `HTTPLogging` to `FlyingSocks.Logging` enabling logs within sockets and pools. - Decreased compilation time
epoll Fix
1 year ago
Small bug fix for issue within the `epoll` event queue which can be used on Linux platforms.
iOS macOS tvOS linux
swhitty/SwiftDraw 0.16.2
Swift library and command line tool to convert SVGs into SFSymbol, PNG, PDF and Swift source code.
⭐️ 281
πŸ•“ 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.
Swift 5.7 (iOS12+, macOS 10.14+)
23 weeks ago
Removes support for older OS and Swift versions. SwiftDraw now supports: - Swift 5.7+ - iOS 12+ - macOS 10.14+ Fixes issue #32 where some SFSymbols would not correctly wind evenodd paths.
Swift 5.7 (iOS12+, macOS 10.14+)
23 weeks ago
Removes support for older OS and Swift versions. SwiftDraw now supports: - Swift 5.7+ - iOS 12+ - macOS 10.14+ Fixes issue #32 where some SFSymbols would not correctly wind evenodd paths.
Preserve all SFSymbol classes
25 weeks ago
Bug fix release that fixes a few issues - Only wind `.nonZero` paths that are filled https://github.com/swhitty/SwiftDraw/pull/31 - Correctly pad 3 digit hex colors https://github.com/swhitty/SwiftDraw/issues/24 - Flip base64 images https://github.com/swhitty/SwiftDraw/issues/26 - Preserve all SFSymbol classes https://github.com/swhitty/SwiftDraw/issues/27
Fix Typo
35 weeks ago
Fixes typo https://github.com/swhitty/SwiftDraw/pull/23. πŸ™πŸ» thanks @2n
SFSymbol Multicolor
42 weeks ago
Includes changes - SFSymbols now include[ support for multicolour layers](https://github.com/swhitty/SwiftDraw/issues/19) by preserving specific CSS selectors. Thank you @tinder-darraghburke - Adds [fix](https://github.com/swhitty/SwiftDraw/pull/20) symbols with greater width than height. Thank you @rcancro. - Samples is now Samples.bundle ``` swiftdraw, version 0.14.1 copyright (c) 2023 Simon Whitty usage: swiftdraw <file.svg> [--format png | pdf | jpeg | swift | sfsymbol] [--size wxh] [--scale 1x | 2x | 3x] <file> svg file to be processed Options: --format format to output image: png | pdf | jpeg | swift | sfsymbol --size size of output image: 100x200 --scale scale of output image: 1x | 2x | 3x --insets crop inset of output image: top,left,bottom,right --precision maximum number of decimal places --output optional path of output file --hideUnsupportedFilters hide elements with unsupported filters. Available keys for --format swift: --api api of generated code: appkit | uikit Available keys for --format sfymbol: --insets alignment of regular variant: top,left,bottom,right | auto --ultralight svg file of ultralight variant --ultralightInsets alignment of ultralight variant: top,left,bottom,right | auto --black svg file of black variant --blackInsets alignment of black variant: top,left,bottom,right | auto ```
SFSymbol Multicolor
47 weeks ago
Includes changes - SFSymbols now include[ support for multicolour layers](https://github.com/swhitty/SwiftDraw/issues/19) by preserving specific CSS selectors. Thank you @tinder-darraghburke - Adds [fix](https://github.com/swhitty/SwiftDraw/pull/20) symbols with greater width than height. Thank you @rcancro. ``` swiftdraw, version 0.14.0 copyright (c) 2023 Simon Whitty usage: swiftdraw <file.svg> [--format png | pdf | jpeg | swift | sfsymbol] [--size wxh] [--scale 1x | 2x | 3x] <file> svg file to be processed Options: --format format to output image: png | pdf | jpeg | swift | sfsymbol --size size of output image: 100x200 --scale scale of output image: 1x | 2x | 3x --insets crop inset of output image: top,left,bottom,right --precision maximum number of decimal places --output optional path of output file --hideUnsupportedFilters hide elements with unsupported filters. Available keys for --format swift: --api api of generated code: appkit | uikit Available keys for --format sfymbol: --insets alignment of regular variant: top,left,bottom,right | auto --ultralight svg file of ultralight variant --ultralightInsets alignment of ultralight variant: top,left,bottom,right | auto --black svg file of black variant --blackInsets alignment of black variant: top,left,bottom,right | auto ```
SFSymbol
1 year ago
Adds optional `--output` to Command-line tool. If provided this path is used, otherwise a suffix is automatically appended to input path. Fixes bugs - `UIImage` was scaled twice https://github.com/swhitty/SwiftDraw/issues/12. - `fill-rule` was defaulting to `evenodd` when it should be `nonzero` - macCatalyst support - Better support for stroke gradients https://github.com/swhitty/SwiftDraw/issues/17 ``` swiftdraw, version 0.13.2 copyright (c) 2022 Simon Whitty usage: swiftdraw <file.svg> [--format png | pdf | jpeg | swift | sfsymbol] [--size wxh] [--scale 1x | 2x | 3x] <file> svg file to be processed Options: --format format to output image: png | pdf | jpeg | swift | sfsymbol --size size of output image: 100x200 --scale scale of output image: 1x | 2x | 3x --insets crop inset of output image: top,left,bottom,right --precision maximum number of decimal places --output optional path of output file --hideUnsupportedFilters hide elements with unsupported filters. Available keys for --format swift: --api api of generated code: appkit | uikit Available keys for --format sfymbol: --insets alignment of regular variant: top,left,bottom,right | auto --ultralight svg file of ultralight variant --ultralightInsets alignment of ultralight variant: top,left,bottom,right | auto --black svg file of black variant --blackInsets alignment of black variant: top,left,bottom,right | auto ```
SFSymbol
1 year ago
Adds optional `--output` to Command-line tool. If provided this path is used, otherwise a suffix is automatically appended to input path. Fixes bugs - `UIImage` was scaled twice https://github.com/swhitty/SwiftDraw/issues/12. - `fill-rule` was defaulting to `evenodd` when it should be `nonzero` - macCatalyst support ``` swiftdraw, version 0.13.2 copyright (c) 2022 Simon Whitty usage: swiftdraw <file.svg> [--format png | pdf | jpeg | swift | sfsymbol] [--size wxh] [--scale 1x | 2x | 3x] <file> svg file to be processed Options: --format format to output image: png | pdf | jpeg | swift | sfsymbol --size size of output image: 100x200 --scale scale of output image: 1x | 2x | 3x --insets crop inset of output image: top,left,bottom,right --precision maximum number of decimal places --output optional path of output file --hideUnsupportedFilters hide elements with unsupported filters. Available keys for --format swift: --api api of generated code: appkit | uikit Available keys for --format sfymbol: --insets alignment of regular variant: top,left,bottom,right | auto --ultralight svg file of ultralight variant --ultralightInsets alignment of ultralight variant: top,left,bottom,right | auto --black svg file of black variant --blackInsets alignment of black variant: top,left,bottom,right | auto ```
SFSymbol
1 year ago
Adds optional `--output` to Command-line tool. If provided this path is used, otherwise a suffix is automatically appended to input path. Fixes bugs - `UIImage` was scaled twice https://github.com/swhitty/SwiftDraw/issues/12. - `fill-rule` was defaulting to `evenodd` when it should be `nonzero` ``` swiftdraw, version 0.13.1 copyright (c) 2022 Simon Whitty usage: swiftdraw <file.svg> [--format png | pdf | jpeg | swift | sfsymbol] [--size wxh] [--scale 1x | 2x | 3x] <file> svg file to be processed Options: --format format to output image: png | pdf | jpeg | swift | sfsymbol --size size of output image: 100x200 --scale scale of output image: 1x | 2x | 3x --insets crop inset of output image: top,left,bottom,right --precision maximum number of decimal places --output optional path of output file --hideUnsupportedFilters hide elements with unsupported filters. Available keys for --format swift: --api api of generated code: appkit | uikit Available keys for --format sfymbol: --insets alignment of regular variant: top,left,bottom,right | auto --ultralight svg file of ultralight variant --ultralightInsets alignment of ultralight variant: top,left,bottom,right | auto --black svg file of black variant --blackInsets alignment of black variant: top,left,bottom,right | auto ```
SF Symbol
1 year ago
Renames `SwiftDraw.Image` -> `SwiftDraw.SVG` avoiding name collisions with `SwiftUI.Image`. Updates command line tool: - officially support SF Symbol creation using `--format sfsymbol` - add ability to crop or align images with `--insets 10,0,0,10` - adds AppKit support with `--format swift --api appkit` - fixes PDFs rendering with unsupported transparency ``` copyright (c) 2022 Simon Whitty usage: swiftdraw <file.svg> [--format png | pdf | jpeg | swift | sfsymbol] [--size wxh] [--scale 1x | 2x | 3x] <file> svg file to be processed Options: --format format to output image: png | pdf | jpeg | swift | sfsymbol --size size of output image: 100x200 --scale scale of output image: 1x | 2x | 3x --insets crop inset of output image: top,left,bottom,right --precision maximum number of decimal places --hideUnsupportedFilters hide elements with unsupported filters. Available keys for --format swift: --api api of generated code: appkit | uikit Available keys for --format sfymbol: --insets alignment of regular variant: top,left,bottom,right | auto --ultralight svg file of ultralight variant --ultralightInsets alignment of ultralight variant: top,left,bottom,right | auto --black svg file of black variant --blackInsets alignment of black variant: top,left,bottom,right | auto ```
iOS macOS
swhitty/Awaiting 0.6.0
Swift @propertyWrapper that waits asynchronously until the value matches a predicate.
⭐️ 20
πŸ•“ 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.
Element where predicate passes
3 days ago
Adds new method to wrapped `Collection` where an element passes a predicate ```swift @Awaiting var numbers = [Int]() // suspends until a multiple of 7 is appended to the array e.g. `numbers.append(21)` let value: Int = try await $numbers.element(where: { $0.isMultiple(of: 7) }) ```
Equatable Waiter
1 year ago
Adds a specialized waiters for `Equatable` elements: ```swift @Awaiting var name: String? // Suspends until name == "Fish" try await $name.equals("Fish") ```
Modify
1 year ago
Adds `func modify()` that allows the property to be mutated using the inner lock and then notifying all waiters once the mutation is complete.
@Awaiting.Waiter is Sendable
1 year ago
`@Awaiting.Waiter` is threadsafe and should be `Sendable`
Swift 5.7
1 year ago
minor update to fix concurrency warnings within Swift 5.7
Specialized Waiter
1 year ago
Adds some specialized waiters for collections and optionals: ```swift @Awaiting var name: String? // Suspends until name != nil let name = try await $name.some() ``` ```swift @Awaiting var entries = [String]() // Suspends until entries[2] exists let entry = try await $entries.value(at: 2)
Initial Release
2 years ago
iOS macOS
swhitty/DictionaryDecoder 0.24.0
A Swift library for serializing Codable types to and from [String: Any].
⭐️ 20
πŸ•“ 39 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.
KeyValueCoder Update
39 weeks ago
Updates DictionaryDecoder to use KeyValueCoder internally. 🚨This library has been moved. Future releases will be found at [KeyValueCoder](https://github.com/swhitty/KeyValueCoder)
39 weeks ago
39 weeks ago
Swift Compatibility Update
1 year ago
Updates minimum Swift version to Swift 5.4 Fixes warnings when testing with Swift 5.8
iOS macOS watchOS tvOS

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