Swiftpack.co - Swift Packages by skelpo

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

Packages published by skelpo

skelpo/UserManager 0.1.8
A small, useful user manager made for production application setups.
⭐️ 79
🕓 4 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
v0.1.7
5 years ago
# Fixed Compiler Errors from Dependency Updates A couple of pre-1.0 dependencies had source breaking changes which caused compiler errors. These have been fixed.
v0.1.6
5 years ago
Compiles with all new vapor releases as well as with Swift 4.2 now! Additionally a few bookkeeping tasks have been completed.
v0.1.5
5 years ago
# The Name Doesn't Always Equal the Use Updated JWTVapor version to 0.11.1, to use more appropriately named JWT env vars on configuration.
v0.1.4
5 years ago
# Permission to Restriction Updated to `JWTMIddleware` 0.8.0, replacing `RouteRestrictionMiddleware` with `PermissionsMiddleware`.
v0.1.3
5 years ago
# Breaking Changes! Fluent 3 RC-3! `QueryBuilder`'s first generic type is now required to be a database type, not a model type. For some reason you have to manually conform enum types to `ReflectDecodable` now, so that is taken care of. And lastly, filtering to longer requires a `try` statement, so those where removed.
v0.1.2
5 years ago
# To Sync or Not to Sync? You should only use `syncGet` for small pieces of data and only once in a route handler. I broke this rule and was caught (almost) red-handed. I have made amends for this. Thanks [@mcdappdev](https://github.com/mcdappdev)
v0.1.1
5 years ago
# The Patch to Start all Patches Use a lot a environment variables and fix the content of the SendGrid email.
skelpo/JWTMiddleware v0.10.0
Middleware to Authenticate and Authorize Requests in Vapor
⭐️ 33
🕓 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.
1.0.0
2 years ago
Update dependencies for Vapor 4.
Release Candidate 1
4 years ago
- Fully ready for Vapor 4 - Has tests now - Switching to the Vapor style of semver - CI enabled - Repo cleaned up
v0.10.0 Dependencies Updated
4 years ago
v0.9.0
5 years ago
# Type Less, Type Less Removed the `Status` generic type from `PermissionsMiddleware` because we can get that type information from the `Payload` generic type. We also create a static `String.payloadKey` value so the key where the JWT payload is stored is type safe. In the `JWTVerificationMiddleware`, if an `Authorization` header is not found, status code 402 (Unauthorized) is returned instead of 400 (Bad Request).
v0.8.2
5 years ago
Adjusting usernameKey to now be a `WritableKeyPath` Thanks @Joebayld
v0.8.1
5 years ago
# Back to Where it Came From In the `JWTStorageMiddleware`, we where pulling the payload from the request's private container, saving it back again, and continuing. Yeah, not point in doing that! So now we get the JWT from the auth header, verify it, and store the payload in the request's private container. A _much_ better idea.
v0.8.0
5 years ago
# The Middleware Became Agnostic `RouteRestrictionMiddleware` was deemed to restrictive and relied to heavily on the parent route path. It has been replaced with `PermissionsMiddleware` and any route registered with the middleware is protected by it, making it agnostic to the route path it is on.
v0.7.0
5 years ago
# This Route is Rather Restricting And it should be, considering admins should be the only ones supposed to access the data. And you can add this functionality yourself, with `RouteRestrictionMiddeware`: ```swift route.group(RouteRestrictionMiddleware( restrictions: [ RouteRestriction(.DELETE, at: "users", User.parameter, allowed: [.admin, .moderator]), ... ], parameters: [User.routingSlug: User.resolveParameter] )) ```
v0.6.1
5 years ago
# If They Break it, You Must Unbreak it. The Auth package's `Authenticatable` protocol no longer requires conformance to `Model`, so we add it ourselves to `JWTAuthenticatable`: https://github.com/skelpo/JWTMiddleware/pull/9
v0.6.0
5 years ago
# Vapor Things: Season 3 Lets get away from the strangness of betas for a while. We now use the official Vapor 3.0 release.
macOS
skelpo/CSV 1.1.2
A simple CSV file parser and serializer
⭐️ 32
🕓 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.
1.1.2
2 years ago
`Serializer` will now properly handle serializing columns of different lengths instead of crashing.
1.1.1
3 years ago
With the current implementation, when encoding an array of dictionaries, the elements would not always be encoded in the same order, resulting in values ending up in the wrong column. The AsyncEncoder now tracks the column indexes so cells will always be in the correct column.
v1.1.0
4 years ago
# Configurable CSV Structures You can now pass in a `Config` instance to the initializers for any of the Encoder/Decoder/Serializer/Parser types to define what characters are used for separating rows and as cell delimiters. ```swift let config = Config(separator: "|", delimiter: "'") let parser = SyncParser(config: config) let csv = """ 'first_name'|'last_name' 'Jonathan ''Jon'''|'Kernney' """ let data = parser.parse(Array(csv.utf8)) print(data) // ["first_name": ["Jonathan 'Jon'"], "last_name": ["Kerrney"]] ```
v1.0.1
4 years ago
# We Must Escape Quotes that are inside of cells and headers are now escaped, so your CSV isn't all broken when you serialize or encode data. Oh, we also have a [shiny new README](https://github.com/skelpo/CSV)!
v1.0.0
5 years ago
# Streaming ```swift let chunks: [[UInt8]] = // ... var parser = Parser(onHeader: nil, onCell: { header, cell in print(String(decoding: header, as: UTF8.self) + ":", String(decoding: cell, as: UTF8.self)) }) chunks.forEach { chunk in parser.parse(chunk) } ``` ```swift // Array<Dictionary<Title, Cell?>> let data: [[UInt8]: [[UInt8]?]] = // ... var serializer = Serializer(onRow: { row in print(String(decoding: row, as: UTF8.self)) }) data.forEach { row in serializer.serialize(row) } ```
skelpo/PayPal 0.3.2
A PayPal Provider for the Vapor Server-Side Swift Framework
⭐️ 13
🕓 4 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
v0.3.2
5 years ago
# Padded Currency Values Format money decimal values with trailing 0 characters, so there are as many fraction digits as the currency exponent number: ``` 85.8 USD => 85.80 10 USD => 10.00 10 XXX => 10 ``` This is because some endpoint returned validation errors if this padding wasn't there.
v0.3.1
5 years ago
# Decoding Int and String for `quantity` Properties The `Order.Item.quantity` and `Payment.Item.quantity` properties are documented as strings in the PayPal API documentation, but you actually get ints back when you create a payment or order. Because of this, we attempt to decode an int, and fall back to a string if we get a type mismatch decoding error.
v0.3.0
5 years ago
# Failing Properties The biggest change in this release is that properties themselves handle validations, instead of the parent type. You will notice that quite a few initializers don't accept the primitive types like `String` or `Int`, but instead something like `Failable<Int, ...>`. You can wrap the those value in `.init(value)` and everything should work again: ```swift try Name( prefix: .init("Mr."), given: .init("Caleb"), surname: .init("Kleveter"), middle: .init("J"), suffix: .init(nil), full: .init("Caleb J Kleveter") ) ``` Instead of setting the properties with the `.set` method like you used to: ```swift try name.set(\.prefix <~ nil)` ``` You can use plain old property setting: ```swift try name.prefix <~ nil ``` The `Environment.domain` property is now public, so you can easily get the API domain for the endpoints you are using.
v0.2.0
5 years ago
# No Environmental Variation - Pass client ID and secret into `PayPalProvider` initializer for flexibility during app configuration, instead of requiring environment variables. - Remove all ID assignment from initializers. - Made some types into sub-types, i.e. AgreementState => Agreement.State. - Replaced `Money` and `Amount` structs with generic `AmountType` struct. - Created `Country` struct which encodes/decodes using a single value container to handle country code validation. - Created a `Province` enum that represents the states or provinces a country can have. - Extended `HTTPHeaderName` with custom PayPal headers.
v0.1.0
5 years ago
# You'll Pay. No, the Buyer Will. A mostly incomplete and partially broken interface for PayPal's REST API, but hey, that's what pre-releases are for, right? The only thing that we know works are basic payments. You can read about how to implement that in the README. Be sure to leave feed back and suggestions for the next releases!
skelpo/JSON 1.1.4
For dealing with ambiguous JSON that doesn't connect to a specific type
⭐️ 11
🕓 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.
Handle Encoding/Decoding of UInt Type
2 years ago
Version Fix
3 years ago
Fixes Swift Version Isssues
3 years ago
v1.0.0
5 years ago
# Swift 5 `JSON` has been streamlined a bit to make working with it more ergonomic. Here is a basic rundown of the updates: - Before there where a lot of methods that only worked on certain `JSON` cases. These have been removed in favor of the type properties (`.string`, `.int`, `.array`, etc.) where you can call native operations on the value. - Dynamic accessors! - JSONKit has been removed. Adding the functionality manually is really easy and adding Vapor as a dependency was overkill. Checkout the [API docs](http://www.skelpo.codes/JSON/) for the whole feature set.
0.13.0
5 years ago
skelpo/Storage 1.0.0
An interface for storing files with any API.
⭐️ 7
🕓 4 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
v0.1.2
4 years ago
# Allow Whitespace in Write File Paths - https://github.com/skelpo/Storage/issues/5. The implementation for the `LocalStorage.write(file:data:options:)` method would throw an error if the path passed in had whitespace in it. The issue was fixed by using the `URL(fileURLWithPath:)` initializer.
v0.1.1
5 years ago
# More Descriptive File Open Failure Errors When we call `open` in the `LocalStorage.store` method, we might get a failure, but we are only notified by the call returning `-1`. Instead of throwing an error with that ambiguous number, we read `errno` and use that code returned and its string value as the error reason.
v0.1.0
5 years ago
# Local Storage Use the `Storage` protocol to create types that can create, read, update, and delete resources. Use the `LocalStorage` implementation to store files in your local file system.
skelpo/S3Storage 1.0.0-alpha.1
A skelpo/Storage implementation for Amazon S3
⭐️ 4
🕓 4 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
v0.1.0
5 years ago
# S3 Storage `S3Storage` is a fully implemented version of the `Storage` protocol. Check out the docs and tests for usage.
skelpo/Countries 1.0.0
An Enum with All the Countries and Their Abbreviations
⭐️ 4
🕓 5 years ago
skelpo/JWTVapor 0.14.0
An integration between the Vapor and vapor/jwt packages
⭐️ 2
🕓 4 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
v0.14.0
4 years ago
Dependencies updated
v0.13.0
5 years ago
Small adjustments to support Vapor 3.2.1
v0.12.0
5 years ago
# Debug JWT Tokens Added a `NewJWTCommand` console command, so you can get debug JWT's from the command-line: ```swift // In `configure.swift` var commands = CommandConfig() commands.use(NewJWTCommand(payload: Token()), as: "jwt") services.register(commands) ``` ```bash $ vapor run jwt Running MyApp ... [ INFO ] Migrating 'mysql' database (/Users/myself/dev/MyApp/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Migration/MigrationConfig.swift:69) [ INFO ] Migrations complete (/Users/myself/dev/MyApp/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Migration/MigrationConfig.swift:73) Auth Token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImNyaXQiOlsiZXhwIiwiYXVkIl19.eyJleHAiOjY0MDkyMjExMjAwLCJpYXQiOjE1NDA5MDQ3OTEuMzc2NTI4LCJlbWFpbCI6Imd1ZXN0RUI4QThGQ0ItNDNDMi00OEExLThGMzktQkQyNDg3REE5MEI4QG9yZGVyc3lzdGVtLmV4YW1wbGUuY29tIn0.JN82Ws9r1gfJeWhoqwWaSsLNSBTUXFSXOVkk53IE-HPRcYgs1PLtqmrXcuiJ3RN7ZFLSz1_KhjmznA39kP-2VjybTNkq87jWlY2cj59B_31p28uMcNDoP1qN5N4PjgdcLEvhi7hDPGTKHPQJZ8A5Iwa3bJFoSF4UeQKIr3IoYxi5PTqOZ7gkUvB7ghZuLlr5gV2GO2lF0Jjv-n16i5O5oRVrZmeA5te-A0OuTvnvX5uJ_TMoqI9xMpq2E82bmtXKaZ1ObrjGy5ar6AqXC7cAhIsVkhb8OfIU4U6Px6A3nMw3kuixBd1z1tFnkXW5CtdGmM_n2etUSoeF91Fwfc7HRQ ``` # JWKS Tokens Adds support for `JWKS` authentication with a new `JWKSService`: ```swift services.register(JWKSConfig(jwks: "https://somedomain.com/v2.0/.well-known/openid-configuration", following: "jwks_uri")) services.register(JWKSService.self) ```
v0.11.2
5 years ago
# JWT 3.0 Updated `vapor/jwt` dependency version to 3.0. 🎉
v0.11.1
5 years ago
# The Secret wasn't a Secret The `JWT_SECRET` was used to store the signer's public key, which more then one person thought sounded like a name conflict. The public key now gets registered in the `JWT_PUBLIC` env var and the secret key (if the signer format supports it) gets stored in the `JWT_SECRET` env var.
skelpo/media-manager 0.1.0
A Vapor micro-service for resource storage
⭐️ 2
🕓 4 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
v0.1.0
5 years ago
# Resource Storage The first release of MediaManager! Be sure to checkout the README. Handles resource storage for multiple services at a time, such as Amazon S3, Google Cloud Storage, and BackBlaze B2 (coming soon).
skelpo/ModelResponse 0.1.0
A simple protocol for converting Vapor models to public facing types
⭐️ 1
🕓 5 years ago
skelpo/Failable 0.4.0
Property validation for constraining the valid values of a type
⭐️ 1
🕓 4 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
v0.4.0
5 years ago
# Swift 5 `Failable` now works with Swift 5. chances are it doesn't work with Swift 4 anymore, but as they say, 'move fast and break things'.
v0.2.0
5 years ago
# Failable Validation Renamed the package to Failable so it doesn't conflict with the vapor/validation package.
V0.1.0
5 years ago
# Check, Check, Check Got the basics of the `Failable` type working. It lets you have a value with constrained values. Foe example, if you have a string that needs to be 256 characters or less, you can do this: ```swift struct Length1028: LengthValidation { typealias Supported = String static var maxLength: Int { return 1028 } } var str = try Failable<String, Length1028>("Hello World") ``` Every time you set the value (using `<~`), the validations for its type are run and if they fail, you get an error: ```swift try str <~ "This passes" // Success! try str <~ String(repeating: "n", count: 257) // Fails ```
skelpo/GoogleCloudStorage 0.1.0
A skelpo/Storage implementation for Google Cloud Storage
⭐️ 1
🕓 4 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
v0.1.0
5 years ago
# Google Cloud Storage This is a working implementation of the Google Cloud version of the Storage API. Feel free to check out the README and propose updates!

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