diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7810eff --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,24 @@ +version: 2 +enable-beta-ecosystems: true +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + allow: + - dependency-type: all + groups: + dependencies: + patterns: + - "*" + - package-ecosystem: "swift" + directory: "/" + schedule: + interval: "daily" + open-pull-requests-limit: 6 + allow: + - dependency-type: all + groups: + all-dependencies: + patterns: + - "*" diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 7d4c180..7a07d2b 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -11,4 +11,4 @@ jobs: with: package_name: multipart-kit modules: MultipartKit - pathsToInvalidate: /multipartkit + pathsToInvalidate: /multipartkit/* diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e85be00..dc2abf2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,5 +6,3 @@ on: jobs: unit-tests: uses: vapor/ci/.github/workflows/run-unit-tests.yml@reusable-workflows - with: - with_coverage: false diff --git a/Package.swift b/Package.swift index c86538b..168a4af 100644 --- a/Package.swift +++ b/Package.swift @@ -13,15 +13,23 @@ let package = Package( .library(name: "MultipartKit", targets: ["MultipartKit"]), ], dependencies: [ - .package(url: "https://github.com/apple/swift-nio.git", from: "2.2.0"), - .package(url: "https://github.com/apple/swift-collections.git", from: "1.0.2") + .package(url: "https://github.com/apple/swift-nio.git", from: "2.61.1"), + .package(url: "https://github.com/apple/swift-collections.git", from: "1.0.5"), ], targets: [ - .target(name: "MultipartKit", dependencies: [ - .product(name: "NIO", package: "swift-nio"), - .product(name: "NIOHTTP1", package: "swift-nio"), - .product(name: "Collections", package: "swift-collections") - ]), - .testTarget(name: "MultipartKitTests", dependencies: ["MultipartKit"]), + .target( + name: "MultipartKit", + dependencies: [ + .product(name: "NIO", package: "swift-nio"), + .product(name: "NIOHTTP1", package: "swift-nio"), + .product(name: "Collections", package: "swift-collections"), + ] + ), + .testTarget( + name: "MultipartKitTests", + dependencies: [ + .target(name: "MultipartKit"), + ] + ), ] ) diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift index 1e85788..f939bc5 100644 --- a/Package@swift-5.9.swift +++ b/Package@swift-5.9.swift @@ -14,7 +14,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/apple/swift-nio.git", from: "2.61.1"), - .package(url: "https://github.com/apple/swift-collections.git", from: "1.0.5") + .package(url: "https://github.com/apple/swift-collections.git", from: "1.0.5"), ], targets: [ .target( @@ -22,12 +22,20 @@ let package = Package( dependencies: [ .product(name: "NIO", package: "swift-nio"), .product(name: "NIOHTTP1", package: "swift-nio"), - .product(name: "Collections", package: "swift-collections") + .product(name: "Collections", package: "swift-collections"), ], - swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]), + swiftSettings: [ + .enableExperimentalFeature("StrictConcurrency=complete"), + ] + ), .testTarget( name: "MultipartKitTests", - dependencies: ["MultipartKit"], - swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]), + dependencies: [ + .target(name: "MultipartKit"), + ], + swiftSettings: [ + .enableExperimentalFeature("StrictConcurrency=complete"), + ] + ), ] ) diff --git a/README.md b/README.md index ed6b393..6de03ec 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,22 @@
🏞 Multipart parser and serializer with `Codable` support for Multipart Form Data. -### Major Releases +### Installation The table below shows a list of MultipartKit major releases alongside their compatible NIO and Swift versions. @@ -37,15 +29,31 @@ The table below shows a list of MultipartKit major releases alongside their comp Use the SPM string to easily include the dependency in your `Package.swift` file. +Add MultiPartKit to your package dependencies: + +```swift +dependencies: [ + // ... + .package(url: "https://github.com/vapor/multipart-kit.git", from: "4.0.0"), +] +``` + +Add MultiPartKit to your target's dependencies: + ```swift -.package(url: "https://github.com/vapor/multipart-kit.git", from: ...) +targets: [ + .target(name: "MyAppTarget", dependencies: [ + // ... + .product(name: "MultiPartKit", package: "multipart-kit"), + ]) +] ``` ### Supported Platforms MultipartKit supports the following platforms: -- All Linux distributions supported by Swift +- All Linux distributions supported by Swift 5.7+ - macOS 10.15+ ## Overview diff --git a/Sources/MultipartKit/Docs.docc/images/vapor-multipartkit-logo.svg b/Sources/MultipartKit/Docs.docc/images/vapor-multipartkit-logo.svg new file mode 100644 index 0000000..d3f0ee3 --- /dev/null +++ b/Sources/MultipartKit/Docs.docc/images/vapor-multipartkit-logo.svg @@ -0,0 +1,21 @@ + diff --git a/Sources/MultipartKit/Docs.docc/theme-settings.json b/Sources/MultipartKit/Docs.docc/theme-settings.json new file mode 100644 index 0000000..09c9bb3 --- /dev/null +++ b/Sources/MultipartKit/Docs.docc/theme-settings.json @@ -0,0 +1,21 @@ +{ + "theme": { + "aside": { "border-radius": "6px", "border-style": "double", "border-width": "3px" }, + "border-radius": "0", + "button": { "border-radius": "16px", "border-width": "1px", "border-style": "solid" }, + "code": { "border-radius": "16px", "border-width": "1px", "border-style": "solid" }, + "color": { + "multipartkit": "#392048", + "documentation-intro-fill": "radial-gradient(circle at top, var(--color-multipartkit) 30%, #000 100%)", + "documentation-intro-accent": "var(--color-multipartkit)", + "logo-base": { "dark": "#fff", "light": "#000" }, + "logo-shape": { "dark": "#000", "light": "#fff" }, + "fill": { "dark": "#000", "light": "#fff" } + }, + "icons": { "technology": "/multipartkit/images/vapor-multipartkit-logo.svg" } + }, + "features": { + "quickNavigation": { "enable": true }, + "i18n": { "enable": true } + } +}