zuraffa_purchase 0.1.1
zuraffa_purchase: ^0.1.1 copied to clipboard
Purchase support for the Zuraffa ecosystem: a typed in-app purchase port behind a service, with the StoreKit / Play Billing adapters shipped as federated siblings.
Changelog #
0.1.1 #
PurchaseSubscriptionStorenow speaks the port's own error vocabulary: aPurchaseExceptionraised by the purchase port leaves the adapter as aSubscriptionExceptioncarrying the same machine code and message. A consumer that catcheson SubscriptionException— aszuraffa_subscriptionsdocuments the port — now catches the failure too. Any other error propagates unchanged, and an unrecognised purchase-domain code surfaces asstore_unavailable.ScriptedPurchasePort— the scriptable double for the purchase port seam, the twin ofRecordingStoreApion the store seam. A consumer can now drive the purchase domain, including its failure paths, without a device and without a platform adapter.
0.1.0 #
- Initial release of the app-facing purchase domain:
PurchasePort,PurchaseService,CatalogProduct,PurchaseOutcome,PurchaseStatus,PurchaseIntentand the typedPurchaseExceptiontaxonomy. StoreApiPurchasePortadapts the store seam (StoreApi) to the port, andRecordingStoreApiis the scriptable test double the package ships for apps that want to drive the store in tests.PurchaseSubscriptionStoreimplements theSubscriptionStorePortofzuraffa_subscriptions, so a consuming app hands a real store straight toSubscriptionServiceinstead of writing its own adapter.registerPurchaseDependencieswires the port, the service and the subscription store as lazy singletons; the registration order does not matter, and an unwired store surfaces the typedPurchaseNotWiredfailure.