Releases: coenttb/swift-web-foundation
Releases · coenttb/swift-web-foundation
v0.1.0: URL Routing Href Helper
What's New
Features
- 🔗 Href Helper: Added convenient
href(for:)method to ParserPrinter for URL routing- Converts routes directly to Href instances
- Provides cleaner API for generating hrefs from URL routes
Usage Example
let router = MyRouter()
let href = router.href(for: .myRoute(id: 123))
// Equivalent to: Href(router.url(for: .myRoute(id: 123)))Technical Details
- Extension on ParserPrinter where Input == URLRequestData
- Returns Href instances for better type safety
- Simplifies href generation in web applications
Installation
.package(url: "https://github.com/coenttb/swift-web-foundation.git", from: "0.1.0")Full Changelog: 0.0.2...0.1.0
0.0.1
Swift Web Foundation 0.0.1
A comprehensive glue library that consolidates essential Swift packages for web development into a single, convenient import.
What's Included
Type Safety & Domain Modeling
- EmailAddress - Domain-accurate and type-safe email address handling
- Domain - Type-safe domain model consistent with web standards
- JWT - Standards-compliant JSON Web Token creation, signing, and verification
Date & Time Handling
- DateParsing - Comprehensive date parsing for RFC 2822, RFC 5322, and Unix epoch timestamps
- FoundationExtensions - Powerful extensions for date manipulation and formatting
Web Standards & Routing
- URLFormCoding - Type-safe encoding/decoding of form data
- URLFormCodingURLRouting - Integration between form data and URL routing
- URLMultipartFormCodingURLRouting - Multipart form data handling with file uploads
- URLRouting - Point-Free's powerful URL routing library
Content Generation
- HTML - Type-safe HTML and CSS generation with SwiftUI-like syntax
- Sitemap - XML sitemap generation following sitemaps.org protocol
- Builders - Result builders for creating collections and content
Parsing & Infrastructure
- Parsing - Point-Free's composable parsing library
- Dependencies - SwiftUI Environment-inspired dependency management
Installation
Add to your Package.swift:
dependencies: [
.package(url: "https://github.com/coenttb/swift-web-foundation.git", from: "0.0.1")
]Then import everything with a single line:
import WebFoundationThis foundation eliminates the need to manage 15+ individual dependencies while maintaining full type safety and performance.