Swiftpack.co - Swift Packages by alchemy-swift

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

Packages published by alchemy-swift

alchemy-swift/alchemy v0.4.0
Modern, batteries included web framework for Swift.
โญ๏ธ 325
๐Ÿ•“ 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.
v0.4.0
1 year ago
## What's Changed * Adds Testing by @joshuawright11 in https://github.com/alchemy-swift/alchemy/pull/75 * Hummingbird by @joshuawright11 in https://github.com/alchemy-swift/alchemy/pull/76 * Add convenience APIs around accessing Content, Files & Attachments by @joshuawright11 in https://github.com/alchemy-swift/alchemy/pull/77 * async / await & testing by @joshuawright11 in https://github.com/alchemy-swift/alchemy/pull/72 * Events & Model Improvements by @joshuawright11 in https://github.com/alchemy-swift/alchemy/pull/82 * Handle null values when converting PostgresCell to SQLValue by @seanmiller802 in https://github.com/alchemy-swift/alchemy/pull/83 * [Redis] Add TLS support by @joshuawright11 in https://github.com/alchemy-swift/alchemy/pull/84 * Add Encryption, Hashing, and expand Filesystem for better S3 support by @joshuawright11 in https://github.com/alchemy-swift/alchemy/pull/85 * Add Type to relationshipWasNil RuneError by @seanmiller802 in https://github.com/alchemy-swift/alchemy/pull/86 ## New Contributors * @seanmiller802 made their first contribution in https://github.com/alchemy-swift/alchemy/pull/83 **Full Changelog**: https://github.com/alchemy-swift/alchemy/compare/v0.3.2...v0.4.0
v0.3.2
2 years ago
Fix an issue with package versions. Thanks @shonfrazier for the report.
v0.3.1
2 years ago
Fixes an issue with a crash when there's no Queue registered to the app. Also updates the README. Thanks @adam-fowler for the report.
v0.3.0
2 years ago
# Commands This release adds commands to make it easy to run custom maintenance, cleanup or productivity tasks with your app. Commands are built on top of [Swift Argument Parser](https://github.com/apple/swift-argument-parser) which means there is a ton of baked in functionality for custom flags, options, arguments and automatically generated help details. Commands also have access to your application's services meaning your can easily use your configured Databases, Queues, etc inside commands. To create a command, first conform to the `Command` interface and implement `func start()`. You may add options, flags and configuration provided by Swift Argument Parser. ```swift final class SyncUserData: Command { static var configuration = CommandConfiguration(commandName: "sync", discussion: "Sync all data for all users.") @Option(help: "Sync data for a specific user only.") var id: Int? @Flag(help: "Should data be loaded but not saved.") var dry: Bool = false func start() -> EventLoopFuture<Void> { if let userId = id { // sync only a specific user's data } else { // sync all users' data } } } ``` Next, register your command type. ```swift app.registerCommand(SyncUserData.self) ``` Now you may run your Alchemy app with your new command. ```bash $ swift run MyApp sync --id 2 --dry ``` ## Make Commands Also new are a suite of commands to increase productivity by generate typical interfaces you might use such as models, controllers, migrations, middleware, jobs, etc. Run `$ swift run MyApp help` for a list of all make commands. For example, the `make:model` command makes it easy to generate a model with the given fields. You can event generate a full populated Migration and Controller with CRUD routes by passing the `--migration` and `--controller` flags. ```bash $ swift run Server make:model Todo id:increments:primary name:string is_done:bool user_id:bigint:references.users.id --migration --controller ๐Ÿงช create Sources/App/Models/Todo.swift ๐Ÿงช create Sources/App/Migrations/2021_09_24_11_07_02CreateTodos.swift โ””โ”€ remember to add migration to a Database.migrations! ๐Ÿงช create Sources/App/Controllers/TodoController.swift ``` Like all commands, you may view the details & arguments of each make command with `swift run MyApp help <command>`. ## Additional Model CRUD functions Also new are a few functions to help quickly look up, update, or delete models. Check out `Model.find`, `Model.delete`, and `Model.update` for what's new. For a more in depth summary, check out the [Commands guide](https://github.com/alchemy-swift/alchemy/blob/main/Docs/13_Commands.md).
v0.2.2
2 years ago
This release adds support for running your server over TLS and HTTP/2. By default, the server runs unencrypted over HTTP/1.1. ## Enable TLS To enable running HTTP/1.1 over TLS, use `useHTTPS`. ```swift func boot() throws { try useHTTPS(key: "/path/to/private-key.pem", cert: "/path/to/cert.pem") } ``` ## Enable HTTP/2 To enable HTTP/2 upgrades (will prefer HTTP/2 but still accept HTTP/1.1 over TLS), use `useHTTP2`. ```swift func boot() throws { try useHTTP2(key: "/path/to/private-key.pem", cert: "/path/to/cert.pem") } ``` Note that the HTTP/2 protocol is only supported over TLS, so implies using it. Thus, there's no need to call both useHTTPS and useHTTP2; useHTTP2 sets up both TLS and HTTP/2 support.
v0.2.1
2 years ago
Fix an issue with named services being registered
v0.2.0
2 years ago
Lots of new APIs including... - Robust job queues - Redis interfaces - Powerful, cron-based scheduler - Advanced Rune relationship configurations - Service container & `Service` protocol for injecting services - Persisted cache backed by Redis or SQL - `@main` support - Tons of convenience, bug fixes & cleanup Check out the new README & `Docs/` for the lowdown on what's new.
v0.1.4
3 years ago
Adds grouping of routes by path prefix. Courtesy of @slashmo
v0.1.3
3 years ago
Adds MySQL support for JSON types
v0.1.2
3 years ago
Fixes some issues around MySQL, also adds support for `ON DELETE`, `ON UPDATE`, and `bigInt` in migrations.
macOS linux macOS iOS

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