@meith/plugin-dues 0.2.0 → 0.3.0

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.
package/README.md CHANGED
@@ -16,6 +16,14 @@ every guarantee that capability makes applies here. The load-bearing one:
16
16
  stop, or Stripe closes the account, every sold membership drains away at its
17
17
  own boundary and the board is left correct.
18
18
 
19
+ **A purchase makes the plan's group the member's primary group**, and the group
20
+ they were in — Registered, on most boards — becomes a secondary membership
21
+ alongside it. So a member who buys shows as what they bought: its title, its
22
+ colour, its badge. When the membership lapses or is revoked, the board hands
23
+ the old primary group straight back. A member who would rather be shown as
24
+ something else can pick any group they are in under UserCP → Profile; the
25
+ choice is theirs, and it drops away with the membership it names.
26
+
19
27
  **Try it before you read any of this**: [demo.meith.dev](https://demo.meith.dev)
20
28
  runs this plugin against a Stripe that is not Stripe — a shop with a year of
21
29
  history behind it, and a checkout a visitor can actually go through. See
@@ -26,8 +34,9 @@ history behind it, and a checkout a visitor can actually go through. See
26
34
  1. **Register the plugin** where plugins are registered:
27
35
 
28
36
  ```ts
29
- // apps/community/community.plugins.ts (this repository's board uses
30
- // DUES_TEST_BOARD=1 to switch a test-shaped version of this on)
37
+ // apps/community/community.plugins.ts (this repository's own demo and
38
+ // test boards register their versions in community.demo.plugins.ts,
39
+ // behind DEMO_MODE and DUES_TEST_BOARD)
31
40
  import { dues } from '@meith/plugin-dues'
32
41
 
33
42
  export const INSTALLED_PLUGINS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meith/plugin-dues",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Membership dues for a Meith board: Stripe-backed subscriptions as a contained plugin.",
5
5
  "license": "LGPL-3.0-or-later",
6
6
  "repository": {
@@ -20,7 +20,7 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@meith/plugin-kit": "^0.2.0"
23
+ "@meith/plugin-kit": "^0.3.0"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": "^19.2.0"
@@ -121,6 +121,7 @@ export async function settlePaidOrder(
121
121
  groupKey: order.groupKey,
122
122
  until: clampGrantUntil(graceUntil, now),
123
123
  reason: grantReason(order),
124
+ primary: true,
124
125
  })
125
126
  } catch (error) {
126
127
  const reason = error instanceof Error ? error.message : String(error)
@@ -255,6 +256,7 @@ export async function applyInternalEvent(
255
256
  groupKey: membership.groupKey,
256
257
  until: clampGrantUntil(graceUntil, deps.now()),
257
258
  reason: `dues renewal of subscription ${event.subscriptionId}`,
259
+ primary: true,
258
260
  })
259
261
  } catch (error) {
260
262
  const reason = error instanceof Error ? error.message : String(error)