Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt swift-wallet and fluent-wallet #19

Merged
merged 22 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ jobs:
with:
with_linting: true
test_filter: --no-parallel
with_tsan: false
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .spi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1
builder:
configs:
- documentation_targets: [PassKit, Passes, Orders]
- documentation_targets: [VaporWallet, VaporWalletPasses, VaporWalletOrders]
57 changes: 28 additions & 29 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,71 @@
import PackageDescription

let package = Package(
name: "PassKit",
name: "wallet",
platforms: [
.macOS(.v13)
],
products: [
.library(name: "Passes", targets: ["Passes"]),
.library(name: "Orders", targets: ["Orders"]),
.library(name: "VaporWalletPasses", targets: ["VaporWalletPasses"]),
.library(name: "VaporWalletOrders", targets: ["VaporWalletOrders"]),
],
dependencies: [
.package(url: "https://github.com/vapor/vapor.git", from: "4.108.0"),
.package(url: "https://github.com/vapor/vapor.git", from: "4.111.0"),
.package(url: "https://github.com/vapor/fluent.git", from: "4.12.0"),
.package(url: "https://github.com/fpseverino/fluent-wallet.git", from: "0.1.0"),
.package(url: "https://github.com/vapor/apns.git", from: "4.2.0"),
.package(url: "https://github.com/vapor-community/Zip.git", from: "2.2.4"),
.package(url: "https://github.com/apple/swift-certificates.git", from: "1.6.1"),
// used in tests
.package(url: "https://github.com/vapor/fluent-sqlite-driver.git", from: "4.8.0"),
],
targets: [
.target(
name: "PassKit",
name: "VaporWallet",
dependencies: [
.product(name: "Fluent", package: "fluent"),
.product(name: "Vapor", package: "vapor"),
.product(name: "Fluent", package: "fluent"),
.product(name: "VaporAPNS", package: "apns"),
.product(name: "Zip", package: "zip"),
.product(name: "X509", package: "swift-certificates"),
],
swiftSettings: swiftSettings
),
.target(
name: "Passes",
dependencies: [
.target(name: "PassKit")
],
swiftSettings: swiftSettings
),
// MARK: - Wallet Passes
.target(
name: "Orders",
name: "VaporWalletPasses",
dependencies: [
.target(name: "PassKit")
.target(name: "VaporWallet"),
.product(name: "FluentWalletPasses", package: "fluent-wallet"),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "PassesTests",
name: "VaporWalletPassesTests",
dependencies: [
.target(name: "Passes"),
.target(name: "PassKit"),
.product(name: "XCTVapor", package: "vapor"),
.target(name: "VaporWalletPasses"),
.product(name: "VaporTesting", package: "vapor"),
.product(name: "FluentSQLiteDriver", package: "fluent-sqlite-driver"),
],
resources: [
.copy("Templates")
.copy("SourceFiles")
],
swiftSettings: swiftSettings
),
// MARK: - Wallet Orders
.target(
name: "VaporWalletOrders",
dependencies: [
.target(name: "VaporWallet"),
.product(name: "FluentWalletOrders", package: "fluent-wallet"),
],
swiftSettings: swiftSettings
),
.testTarget(
name: "OrdersTests",
name: "VaporWalletOrdersTests",
dependencies: [
.target(name: "Orders"),
.target(name: "PassKit"),
.product(name: "XCTVapor", package: "vapor"),
.target(name: "VaporWalletOrders"),
.product(name: "VaporTesting", package: "vapor"),
.product(name: "FluentSQLiteDriver", package: "fluent-sqlite-driver"),
],
resources: [
.copy("Templates")
.copy("SourceFiles")
],
swiftSettings: swiftSettings
),
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<div align="center">
<img src="https://avatars.githubusercontent.com/u/26165732?s=200&v=4" width="100" height="100" alt="avatar" />
<h1>PassKit</h1>
<a href="https://swiftpackageindex.com/vapor-community/PassKit/documentation">
<h1>Vapor Wallet</h1>
<a href="https://swiftpackageindex.com/vapor-community/wallet/documentation">
<img src="https://design.vapor.codes/images/readthedocs.svg" alt="Documentation">
</a>
<a href="https://discord.gg/vapor"><img src="https://design.vapor.codes/images/discordchat.svg" alt="Team Chat"></a>
<a href="LICENSE"><img src="https://design.vapor.codes/images/mitlicense.svg" alt="MIT License"></a>
<a href="https://github.com/vapor-community/PassKit/actions/workflows/test.yml">
<img src="https://img.shields.io/github/actions/workflow/status/vapor-community/PassKit/test.yml?event=push&style=plastic&logo=github&label=tests&logoColor=%23ccc" alt="Continuous Integration">
<a href="https://github.com/vapor-community/wallet/actions/workflows/test.yml">
<img src="https://img.shields.io/github/actions/workflow/status/vapor-community/wallet/test.yml?event=push&style=plastic&logo=github&label=tests&logoColor=%23ccc" alt="Continuous Integration">
</a>
<a href="https://codecov.io/github/vapor-community/PassKit">
<img src="https://img.shields.io/codecov/c/github/vapor-community/PassKit?style=plastic&logo=codecov&label=codecov">
<a href="https://codecov.io/github/vapor-community/wallet">
<img src="https://img.shields.io/codecov/c/github/vapor-community/wallet?style=plastic&logo=codecov&label=codecov">
</a>
<a href="https://swift.org">
<img src="https://design.vapor.codes/images/swift60up.svg" alt="Swift 6.0+">
Expand All @@ -23,37 +23,37 @@
Use the SPM string to easily include the dependendency in your `Package.swift` file.

```swift
.package(url: "https://github.com/vapor-community/PassKit.git", from: "0.6.0")
.package(url: "https://github.com/vapor-community/wallet.git", from: "0.6.0")
```

> Note: This package is made for Vapor 4.

## 🎟️ Wallet Passes

The Passes framework provides a set of tools to help you create, build, and distribute digital passes for the Apple Wallet app using a Vapor server.
The `VaporWalletPasses` framework provides a set of tools to help you create, build, and distribute digital passes for the Apple Wallet app using a Vapor server.
It also provides a way to update passes after they have been distributed, using APNs, and models to store pass and device data.

Add the `Passes` product to your target's dependencies:
Add the `VaporWalletPasses` product to your target's dependencies:

```swift
.product(name: "Passes", package: "PassKit")
.product(name: "VaporWalletPasses", package: "wallet")
```

See the framework's [documentation](https://swiftpackageindex.com/vapor-community/PassKit/documentation/passes) for information and guides on how to use it.
See the framework's [documentation](https://swiftpackageindex.com/vapor-community/wallet/documentation/passes) for information and guides on how to use it.

For information on Apple Wallet passes, see the [Apple Developer Documentation](https://developer.apple.com/documentation/walletpasses).

## 📦 Wallet Orders

The Orders framework provides a set of tools to help you create, build, and distribute orders that users can track and manage in Apple Wallet using a Vapor server.
The `VaporWalletOrders` framework provides a set of tools to help you create, build, and distribute orders that users can track and manage in Apple Wallet using a Vapor server.
It also provides a way to update orders after they have been distributed, using APNs, and models to store order and device data.

Add the `Orders` product to your target's dependencies:
Add the `VaporWalletOrders` product to your target's dependencies:

```swift
.product(name: "Orders", package: "PassKit")
.product(name: "VaporWalletOrders", package: "wallet")
```

See the framework's [documentation](https://swiftpackageindex.com/vapor-community/PassKit/documentation/orders) for information and guides on how to use it.
See the framework's [documentation](https://swiftpackageindex.com/vapor-community/wallet/documentation/orders) for information and guides on how to use it.

For information on Apple Wallet orders, see the [Apple Developer Documentation](https://developer.apple.com/documentation/walletorders).
106 changes: 0 additions & 106 deletions Sources/Orders/DTOs/OrderJSON.swift

This file was deleted.

11 changes: 0 additions & 11 deletions Sources/Orders/DTOs/OrdersForDeviceDTO.swift

This file was deleted.

63 changes: 0 additions & 63 deletions Sources/Orders/Models/Concrete Models/Order.swift

This file was deleted.

Loading
Loading