@umohpyro/better-auth-nuvion 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +10 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,7 +1,13 @@
1
- # better-auth-nuvion
1
+ # @umohpyro/better-auth-nuvion
2
2
 
3
3
  Accept payments with [Nuvion](https://nuvion.co) from your [Better Auth](https://better-auth.com) app, and split every payment across your platform, resellers and merchants automatically.
4
4
 
5
+ ```bash
6
+ npm install @umohpyro/better-auth-nuvion better-auth zod
7
+ ```
8
+
9
+ [npm](https://www.npmjs.com/package/@umohpyro/better-auth-nuvion) · [Documentation](https://better-auth-nuvion.umoh.name.ng) · [Live example](https://better-auth-nuvion-example.umoh.name.ng)
10
+
5
11
  - **Multi-level merchants.** Organizations form a hierarchy (platform, reseller, merchant; depth up to 3). Each payment cascades child to parent.
6
12
  - **Flexible fees.** Per-merchant flat fee, basis points, or both, with a minimum and a cap. The payer or the merchant can bear the fee.
7
13
  - **Exact money math.** Integer minor units only. Splits always sum to the amount charged, and rounding remainders go to the platform.
@@ -25,7 +31,7 @@ One package, three entry points:
25
31
  | `@umohpyro/better-auth-nuvion/client` | The typed client plugin |
26
32
  | `@umohpyro/better-auth-nuvion/engine` | The provider-agnostic split engine (fee math, hierarchy rules, ledger, leg executor) for use on its own |
27
33
 
28
- ESM and CommonJS are both supported. The package is published under the author's scope while it is unofficial and pre-release.
34
+ ESM and CommonJS are both supported. It is published under the author's npm scope (`@umohpyro`) while it is unofficial; the name will change if it is adopted.
29
35
 
30
36
  ## Setup
31
37
 
@@ -120,11 +126,11 @@ Nuvion has no atomic multi-recipient settlement, so each leg is its own transfer
120
126
 
121
127
  ```bash
122
128
  npm install
123
- npm test # builds, then runs 31 tests; no network or keys needed
129
+ npm test # builds, then runs the 42 tests; no network or keys needed
124
130
  npm run typecheck
125
131
  ```
126
132
 
127
- `npm run build` compiles each package with `tsc` to `dist/` (ESM plus `.d.ts`), in dependency order. The integration tests run the same scenarios against Better Auth's in-memory adapter, SQLite (`node:sqlite`) and Postgres (PGlite), using migrations generated from the plugin schema, with a simulated Nuvion API.
133
+ `npm run build` bundles the single package with tsup into `dist/` (ESM, CommonJS and `.d.ts` for `index`, `client` and `engine`). The integration tests run the same scenarios against Better Auth's in-memory adapter, SQLite (`node:sqlite`) and Postgres (PGlite), using migrations generated from the plugin schema, with a simulated Nuvion API.
128
134
 
129
135
  ## Status and limits
130
136
 
@@ -134,7 +140,6 @@ Verified: migration and queries on SQLite and Postgres (PGlite). Verified on the
134
140
 
135
141
  Not yet implemented: authentication of payment endpoints by API key, a reconciliation job for legs stuck in `sent`, mapping refund events to payments, subscriptions, multi-currency splits, and attribution of Nuvion's own fees to legs. Amounts use JavaScript numbers (safe for fiat). See [Status and limits](https://better-auth-nuvion.umoh.name.ng/docs/status) in the documentation for what is verified and what is not built yet.
136
142
 
137
- The package is published under the author's npm scope (`@umohpyro`) while it is unofficial; the name will change if it is adopted.
138
143
 
139
144
  ## License
140
145
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umohpyro/better-auth-nuvion",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Better Auth plugin for Nuvion: hosted checkout, multi-level fee splits and child merchants. Unofficial pre-release.",
5
5
  "license": "MIT",
6
6
  "type": "module",