From 52e103da42ce5f692c274f13b5bb8d95ad3e0b06 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 9 Oct 2026 02:57:05 +0000 Subject: [PATCH] Release Platform packages --- .changeset/billing-lifecycle-mechanics.md | 18 ------- .changeset/cancel-at-period-end.md | 11 ---- .changeset/dodo-brand-webhooks.md | 10 ---- .changeset/fake-provider-name.md | 5 -- .changeset/lemon-squeezy-adapter.md | 22 -------- .changeset/platform-billing-adapters.md | 10 ---- .changeset/replace-open-checkout.md | 13 ----- packages/billing/CHANGELOG.md | 63 ++++++++++++++++++++++ packages/billing/package.json | 2 +- packages/design-system/CHANGELOG.md | 4 ++ packages/design-system/package.json | 2 +- packages/mcp-server-kit/CHANGELOG.md | 7 +++ packages/mcp-server-kit/package.json | 4 +- packages/oauth-server-kit/CHANGELOG.md | 4 ++ packages/oauth-server-kit/package.json | 2 +- packages/observability/CHANGELOG.md | 4 ++ packages/observability/package.json | 2 +- packages/platform-cli/CHANGELOG.md | 4 ++ packages/platform-cli/package.json | 2 +- packages/platform-cli/src/preset.json | 16 +++--- packages/platform-conformance/CHANGELOG.md | 7 +++ packages/platform-conformance/package.json | 4 +- packages/platform/CHANGELOG.md | 21 ++++++++ packages/platform/package.json | 2 +- 24 files changed, 132 insertions(+), 107 deletions(-) delete mode 100644 .changeset/billing-lifecycle-mechanics.md delete mode 100644 .changeset/cancel-at-period-end.md delete mode 100644 .changeset/dodo-brand-webhooks.md delete mode 100644 .changeset/fake-provider-name.md delete mode 100644 .changeset/lemon-squeezy-adapter.md delete mode 100644 .changeset/platform-billing-adapters.md delete mode 100644 .changeset/replace-open-checkout.md diff --git a/.changeset/billing-lifecycle-mechanics.md b/.changeset/billing-lifecycle-mechanics.md deleted file mode 100644 index 61b407f..0000000 --- a/.changeset/billing-lifecycle-mechanics.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -"@codelitdev/billing": minor ---- - -The engine now owns the lifecycle mechanics that products re-implemented (ADR 0011). - -- `runReconciliationBatch` first queues stuck checkouts, interrupted plan changes, and subscriptions not reconciled recently. Thresholds are set with `createBilling({ reconciliation })`; pass `discover: false` to skip. -- A cancellation scheduled for the period end stops counting as paid once `paidThroughAt` passes. `commercialState` re-checks the clock, `runDeadlineBatch` releases the subscription and queues a reconciliation, and `startCheckout` releases a lapsed entitlement itself. -- `commercialState(entityId, { transaction })` reads inside the caller's transaction; the Drizzle store locks the rows it reads. -- `cancel`, `resumeCancellation`, and `startPlanChange` read the subscription back from the provider, so read models update before the webhook arrives. -- `billing.store` is internal. - -**Product changes for this release** - -- Remove product sweeps that query billing tables to queue reconciliation, and product expiry checks for paid access. -- Decide paid access from `commercialState`, inside your transaction when you reserve quota, instead of copying it into product tables or reading billing tables. -- Stop reading or writing billing state through `billing.store`. -- Custom `BillingStore` implementations must add `listUnreconciledSubscriptions`, `listStuckCreatingCheckouts`, `listStuckPlanChanges`, and `runInTransaction`. diff --git a/.changeset/cancel-at-period-end.md b/.changeset/cancel-at-period-end.md deleted file mode 100644 index 2abef5d..0000000 --- a/.changeset/cancel-at-period-end.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@codelitdev/billing": minor ---- - -Cancelling a subscription now keeps it active until the end of the paid period (ADR 0010). Previously the Dodo adapter ended it immediately, so the customer lost the time they had paid for. `commercialState` reports `cancelAtPeriodEnd: true` and `paidThroughAt` while a cancellation is scheduled, and the new `resumeCancellation` clears it. While a worker is sending a retried cancellation, `resumeCancellation` fails with a retryable `operation_conflicted`, so the cancellation cannot land after the resume. - -**Product changes for this release** - -- Show the end date from `commercialState().paidThroughAt` when `cancelAtPeriodEnd` is true, and offer to resume. -- Resume with `billing.resumeCancellation({ grant, entity, payer })`, using a `cancellation` grant. Do not start a new checkout while the subscription is still active. -- Custom provider adapters must implement `resumeSubscription`, and `cancelSubscription` must schedule the cancellation at period end. diff --git a/.changeset/dodo-brand-webhooks.md b/.changeset/dodo-brand-webhooks.md deleted file mode 100644 index 54487fa..0000000 --- a/.changeset/dodo-brand-webhooks.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@codelitdev/billing": minor ---- - -`createDodoBillingProvider` accepts an optional `brandId` (ADR 0009). When products share one Dodo business, Dodo sends every event to every webhook endpoint. With `brandId` set, a verified webhook whose `brand_id` names another brand is stored as `ignored` instead of being processed and quarantined. Webhooks without a `brand_id` are processed as before. - -**Product changes for this release** - -- Create the product's Dodo products under its own Dodo brand. -- Pass that brand's ID as `brandId`, for example from a `DODO_BRAND_ID` environment variable. diff --git a/.changeset/fake-provider-name.md b/.changeset/fake-provider-name.md deleted file mode 100644 index 05eec48..0000000 --- a/.changeset/fake-provider-name.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@codelitdev/billing": patch ---- - -`FakeBillingProvider` takes an optional `provider` name, so tests can compose two providers. A new test covers serving subscriptions on one provider after checkout moves to another. diff --git a/.changeset/lemon-squeezy-adapter.md b/.changeset/lemon-squeezy-adapter.md deleted file mode 100644 index 1c3391b..0000000 --- a/.changeset/lemon-squeezy-adapter.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -"@codelitdev/billing": minor ---- - -Add a Lemon Squeezy provider adapter and subscription adoption (ADR 0014). - -- `@codelitdev/billing/providers/lemonsqueezy` exports `createLemonSqueezyBillingProvider({ apiKey, storeId, webhookSecrets })`. Catalog offers use Lemon Squeezy variant IDs. Webhooks from other stores are stored as `ignored`. A checkout offers only the chosen variant, so the buyer cannot switch plans on the Lemon Squeezy page. -- `adoptProviderSubscription` (engine and `createOperations`) takes over a subscription created outside the engine, such as one started with the provider before the product used this package. The subscription's product must be in the active catalog revision. -- `commercialState` reports the `provider` holding the paid subscription. -- `resumeCancellation` accepts a subscription whose status is `cancelled` while its cancellation is only scheduled, which is how Lemon Squeezy reports it until the period ends. -- Providers can declare `checkoutAssignsCustomer`. For those, the first subscription from a payer's checkout moves the payer's customer record to the customer the provider chose. Lemon Squeezy declares it, because its checkout can create a new customer. -- Providers can declare `intervalChangesBillImmediately`. For those, `startPlanChange` with `do_not_bill` to another billing interval fails with `plan_change_not_supported` before the provider is called. Lemon Squeezy declares it, because such a change restarts and bills the period. -- Providers can declare `immediatePlanChangesOnly`. For those, `startPlanChange` with `effectiveAt: "next_billing_date"` fails with `plan_change_not_supported` before an attempt is created. Lemon Squeezy declares it. -- Plan changes back to an offer used before on the same subscription no longer fail with a database unique-key error. Each attempt now has its own idempotency key. -- Requesting a catalog revision number that another provider already uses now fails with `catalog_revision_used_by_another_provider` instead of a database unique-key error. - -**Product changes for this release** - -- To switch to Lemon Squeezy, compose its adapter, set `checkoutProvider: "lemonsqueezy"`, use variant IDs in the catalog, and mount its webhook at `/webhooks/billing/lemonsqueezy`. -- Turn off plan changes in the Lemon Squeezy store's customer portal settings. The engine quarantines a plan change it did not start. -- Adopt existing provider subscriptions once with `adoptProviderSubscription` after the catalog is verified. -- Code that builds `CommercialBillingState` objects, such as test fixtures, must add `provider`. diff --git a/.changeset/platform-billing-adapters.md b/.changeset/platform-billing-adapters.md deleted file mode 100644 index ea7deb7..0000000 --- a/.changeset/platform-billing-adapters.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@codelitdev/platform": minor ---- - -Add `@codelitdev/platform/billing` and `@codelitdev/platform/billing/drizzle` with the adapters products wrote themselves around `@codelitdev/billing` (ADR 0013): single-use action grants stored in Better Auth's `verification` table, AES-256-GCM encryption for stored billing values, a return-URL validator, a maintenance worker runner, a webhook handler for `POST /webhooks/billing/` (400 for a rejected signature or body, 503 when a verified webhook cannot be stored, so the provider retries), and HTTP mapping for billing errors. `@codelitdev/billing` and `drizzle-orm` are optional peer dependencies; the root export is unchanged. - -**Product changes for this release** - -- Replace a custom `BillingAuthorizationPort` with `createBillingActionGrants`. Issue a token from an authenticated route, send it with the billing request, and handle `recent_authentication_required`. -- Replace custom encryption, return-URL checks, maintenance timers, webhook handlers, and billing error mapping with the matching adapters. Existing encrypted values stay readable. diff --git a/.changeset/replace-open-checkout.md b/.changeset/replace-open-checkout.md deleted file mode 100644 index b06f3c8..0000000 --- a/.changeset/replace-open-checkout.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@codelitdev/billing": minor ---- - -A payer can switch offers while a checkout is open. - -- `startCheckout` for another offer, such as yearly after monthly, now replaces the payer's own open checkout instead of failing with `checkout_pending` until it expires. The old checkout becomes `abandoned`. If it is paid anyway, it becomes `conflicted`; it grants access when nothing else does, and otherwise the second subscription is quarantined. Another payer's open checkout still returns `checkout_pending`. -- An expired checkout for another offer or payer is no longer reopened for the new request. -- `CreateCheckoutInput` gains an optional `expiresAt`. The Lemon Squeezy adapter sends it as the checkout's `expires_at`, so the old page stops working when the attempt expires. Dodo checkout sessions take no expiry. - -**Product changes for this release** - -- None required. A product that showed a message for `checkout_pending` when a person switched intervals can keep it for the other-payer case. diff --git a/packages/billing/CHANGELOG.md b/packages/billing/CHANGELOG.md index e07b0af..401c9f8 100644 --- a/packages/billing/CHANGELOG.md +++ b/packages/billing/CHANGELOG.md @@ -1,5 +1,68 @@ # @codelitdev/billing +## 0.4.0 + +### Minor Changes + +- 7b4a9ad: The engine now owns the lifecycle mechanics that products re-implemented (ADR 0011). + + - `runReconciliationBatch` first queues stuck checkouts, interrupted plan changes, and subscriptions not reconciled recently. Thresholds are set with `createBilling({ reconciliation })`; pass `discover: false` to skip. + - A cancellation scheduled for the period end stops counting as paid once `paidThroughAt` passes. `commercialState` re-checks the clock, `runDeadlineBatch` releases the subscription and queues a reconciliation, and `startCheckout` releases a lapsed entitlement itself. + - `commercialState(entityId, { transaction })` reads inside the caller's transaction; the Drizzle store locks the rows it reads. + - `cancel`, `resumeCancellation`, and `startPlanChange` read the subscription back from the provider, so read models update before the webhook arrives. + - `billing.store` is internal. + + **Product changes for this release** + + - Remove product sweeps that query billing tables to queue reconciliation, and product expiry checks for paid access. + - Decide paid access from `commercialState`, inside your transaction when you reserve quota, instead of copying it into product tables or reading billing tables. + - Stop reading or writing billing state through `billing.store`. + - Custom `BillingStore` implementations must add `listUnreconciledSubscriptions`, `listStuckCreatingCheckouts`, `listStuckPlanChanges`, and `runInTransaction`. +- 7b4a9ad: Cancelling a subscription now keeps it active until the end of the paid period (ADR 0010). Previously the Dodo adapter ended it immediately, so the customer lost the time they had paid for. `commercialState` reports `cancelAtPeriodEnd: true` and `paidThroughAt` while a cancellation is scheduled, and the new `resumeCancellation` clears it. While a worker is sending a retried cancellation, `resumeCancellation` fails with a retryable `operation_conflicted`, so the cancellation cannot land after the resume. + + **Product changes for this release** + + - Show the end date from `commercialState().paidThroughAt` when `cancelAtPeriodEnd` is true, and offer to resume. + - Resume with `billing.resumeCancellation({ grant, entity, payer })`, using a `cancellation` grant. Do not start a new checkout while the subscription is still active. + - Custom provider adapters must implement `resumeSubscription`, and `cancelSubscription` must schedule the cancellation at period end. +- 7b4a9ad: `createDodoBillingProvider` accepts an optional `brandId` (ADR 0009). When products share one Dodo business, Dodo sends every event to every webhook endpoint. With `brandId` set, a verified webhook whose `brand_id` names another brand is stored as `ignored` instead of being processed and quarantined. Webhooks without a `brand_id` are processed as before. + + **Product changes for this release** + + - Create the product's Dodo products under its own Dodo brand. + - Pass that brand's ID as `brandId`, for example from a `DODO_BRAND_ID` environment variable. +- 7b4a9ad: Add a Lemon Squeezy provider adapter and subscription adoption (ADR 0014). + + - `@codelitdev/billing/providers/lemonsqueezy` exports `createLemonSqueezyBillingProvider({ apiKey, storeId, webhookSecrets })`. Catalog offers use Lemon Squeezy variant IDs. Webhooks from other stores are stored as `ignored`. A checkout offers only the chosen variant, so the buyer cannot switch plans on the Lemon Squeezy page. + - `adoptProviderSubscription` (engine and `createOperations`) takes over a subscription created outside the engine, such as one started with the provider before the product used this package. The subscription's product must be in the active catalog revision. + - `commercialState` reports the `provider` holding the paid subscription. + - `resumeCancellation` accepts a subscription whose status is `cancelled` while its cancellation is only scheduled, which is how Lemon Squeezy reports it until the period ends. + - Providers can declare `checkoutAssignsCustomer`. For those, the first subscription from a payer's checkout moves the payer's customer record to the customer the provider chose. Lemon Squeezy declares it, because its checkout can create a new customer. + - Providers can declare `intervalChangesBillImmediately`. For those, `startPlanChange` with `do_not_bill` to another billing interval fails with `plan_change_not_supported` before the provider is called. Lemon Squeezy declares it, because such a change restarts and bills the period. + - Providers can declare `immediatePlanChangesOnly`. For those, `startPlanChange` with `effectiveAt: "next_billing_date"` fails with `plan_change_not_supported` before an attempt is created. Lemon Squeezy declares it. + - Plan changes back to an offer used before on the same subscription no longer fail with a database unique-key error. Each attempt now has its own idempotency key. + - Requesting a catalog revision number that another provider already uses now fails with `catalog_revision_used_by_another_provider` instead of a database unique-key error. + + **Product changes for this release** + + - To switch to Lemon Squeezy, compose its adapter, set `checkoutProvider: "lemonsqueezy"`, use variant IDs in the catalog, and mount its webhook at `/webhooks/billing/lemonsqueezy`. + - Turn off plan changes in the Lemon Squeezy store's customer portal settings. The engine quarantines a plan change it did not start. + - Adopt existing provider subscriptions once with `adoptProviderSubscription` after the catalog is verified. + - Code that builds `CommercialBillingState` objects, such as test fixtures, must add `provider`. +- 7b4a9ad: A payer can switch offers while a checkout is open. + + - `startCheckout` for another offer, such as yearly after monthly, now replaces the payer's own open checkout instead of failing with `checkout_pending` until it expires. The old checkout becomes `abandoned`. If it is paid anyway, it becomes `conflicted`; it grants access when nothing else does, and otherwise the second subscription is quarantined. Another payer's open checkout still returns `checkout_pending`. + - An expired checkout for another offer or payer is no longer reopened for the new request. + - `CreateCheckoutInput` gains an optional `expiresAt`. The Lemon Squeezy adapter sends it as the checkout's `expires_at`, so the old page stops working when the attempt expires. Dodo checkout sessions take no expiry. + + **Product changes for this release** + + - None required. A product that showed a message for `checkout_pending` when a person switched intervals can keep it for the other-payer case. + +### Patch Changes + +- 7b4a9ad: `FakeBillingProvider` takes an optional `provider` name, so tests can compose two providers. A new test covers serving subscriptions on one provider after checkout moves to another. + ## 0.3.0 No changes in this release. diff --git a/packages/billing/package.json b/packages/billing/package.json index a458da1..30a7649 100644 --- a/packages/billing/package.json +++ b/packages/billing/package.json @@ -1,6 +1,6 @@ { "name": "@codelitdev/billing", - "version": "0.3.0", + "version": "0.4.0", "description": "Provider-neutral billing engine for CodeLit products", "author": "CodeLit", "type": "module", diff --git a/packages/design-system/CHANGELOG.md b/packages/design-system/CHANGELOG.md index c60cc2b..af18dbd 100644 --- a/packages/design-system/CHANGELOG.md +++ b/packages/design-system/CHANGELOG.md @@ -1,5 +1,9 @@ # @codelitdev/design-system +## 0.4.0 + +No changes in this release. + ## 0.3.0 No changes in this release. diff --git a/packages/design-system/package.json b/packages/design-system/package.json index cc34f79..9bbc5b9 100644 --- a/packages/design-system/package.json +++ b/packages/design-system/package.json @@ -1,6 +1,6 @@ { "name": "@codelitdev/design-system", - "version": "0.3.0", + "version": "0.4.0", "description": "Shared CodeLit design tokens, Tailwind preset, and React primitives for CourseLit, MediaLit, SendLit, and FrontLit.", "license": "Apache-2.0", "author": "CodeLit", diff --git a/packages/mcp-server-kit/CHANGELOG.md b/packages/mcp-server-kit/CHANGELOG.md index 3003c0a..413331f 100644 --- a/packages/mcp-server-kit/CHANGELOG.md +++ b/packages/mcp-server-kit/CHANGELOG.md @@ -1,5 +1,12 @@ # @codelitdev/mcp-server-kit +## 0.4.0 + +### Patch Changes + +- Updated dependencies [7b4a9ad] + - @codelitdev/platform@0.4.0 + ## 0.3.0 ### Patch Changes diff --git a/packages/mcp-server-kit/package.json b/packages/mcp-server-kit/package.json index ca2abc7..a2b6d2b 100644 --- a/packages/mcp-server-kit/package.json +++ b/packages/mcp-server-kit/package.json @@ -1,6 +1,6 @@ { "name": "@codelitdev/mcp-server-kit", - "version": "0.3.0", + "version": "0.4.0", "description": "MCP transport, session, auth hooks, and error mapping for CodeLit products", "author": "CodeLit", "type": "module", @@ -37,7 +37,7 @@ "zod": "^3.25.76" }, "peerDependencies": { - "@codelitdev/platform": ">=0.3.0" + "@codelitdev/platform": ">=0.4.0" }, "devDependencies": { "@codelitdev/platform": "workspace:*", diff --git a/packages/oauth-server-kit/CHANGELOG.md b/packages/oauth-server-kit/CHANGELOG.md index 392c9d1..3263aa9 100644 --- a/packages/oauth-server-kit/CHANGELOG.md +++ b/packages/oauth-server-kit/CHANGELOG.md @@ -1,5 +1,9 @@ # @codelitdev/oauth-server-kit +## 0.4.0 + +No changes in this release. + ## 0.3.0 No changes in this release. diff --git a/packages/oauth-server-kit/package.json b/packages/oauth-server-kit/package.json index 91559e7..1890ec7 100644 --- a/packages/oauth-server-kit/package.json +++ b/packages/oauth-server-kit/package.json @@ -1,6 +1,6 @@ { "name": "@codelitdev/oauth-server-kit", - "version": "0.3.0", + "version": "0.4.0", "description": "Lean Better Auth OAuth authentication framework for web, mobile, REST, and MCP surfaces.", "author": "CodeLit", "license": "MIT", diff --git a/packages/observability/CHANGELOG.md b/packages/observability/CHANGELOG.md index 4f002dc..6693b2b 100644 --- a/packages/observability/CHANGELOG.md +++ b/packages/observability/CHANGELOG.md @@ -1,5 +1,9 @@ # @codelitdev/observability +## 0.4.0 + +No changes in this release. + ## 0.3.0 No changes in this release. diff --git a/packages/observability/package.json b/packages/observability/package.json index 68324ea..3387d50 100644 --- a/packages/observability/package.json +++ b/packages/observability/package.json @@ -1,6 +1,6 @@ { "name": "@codelitdev/observability", - "version": "0.3.0", + "version": "0.4.0", "description": "Provider-neutral logging and optional telemetry for CodeLit products", "author": "CodeLit", "type": "module", diff --git a/packages/platform-cli/CHANGELOG.md b/packages/platform-cli/CHANGELOG.md index fe03d22..c8cf586 100644 --- a/packages/platform-cli/CHANGELOG.md +++ b/packages/platform-cli/CHANGELOG.md @@ -1,5 +1,9 @@ # @codelitdev/platform-cli +## 0.4.0 + +No changes in this release. + ## 0.3.0 ### Minor Changes diff --git a/packages/platform-cli/package.json b/packages/platform-cli/package.json index 8d7d86a..2dd64a6 100644 --- a/packages/platform-cli/package.json +++ b/packages/platform-cli/package.json @@ -1,6 +1,6 @@ { "name": "@codelitdev/platform-cli", - "version": "0.3.0", + "version": "0.4.0", "description": "Create, check, and sync CodeLit Platform products", "author": "CodeLit", "type": "module", diff --git a/packages/platform-cli/src/preset.json b/packages/platform-cli/src/preset.json index d938580..5011a08 100644 --- a/packages/platform-cli/src/preset.json +++ b/packages/platform-cli/src/preset.json @@ -5,42 +5,42 @@ }, "packages": { "@codelitdev/platform": { - "recommended": "0.3.0", + "recommended": "0.4.0", "supported": ">=0.1.0-alpha.0 <2", "minimumSecure": "0.1.0-alpha.0" }, "@codelitdev/observability": { - "recommended": "0.3.0", + "recommended": "0.4.0", "supported": ">=0.1.0-alpha.0 <2", "minimumSecure": "0.1.0-alpha.0" }, "@codelitdev/mcp-server-kit": { - "recommended": "0.3.0", + "recommended": "0.4.0", "supported": ">=0.1.0-alpha.0 <2", "minimumSecure": "0.1.0-alpha.0" }, "@codelitdev/platform-conformance": { - "recommended": "0.3.0", + "recommended": "0.4.0", "supported": ">=0.1.0-alpha.0 <2", "minimumSecure": "0.1.0-alpha.0" }, "@codelitdev/platform-cli": { - "recommended": "0.3.0", + "recommended": "0.4.0", "supported": ">=0.1.0-alpha.0 <2", "minimumSecure": "0.1.0-alpha.0" }, "@codelitdev/billing": { - "recommended": "0.3.0", + "recommended": "0.4.0", "supported": ">=0.1.0-alpha.4 <1", "minimumSecure": "0.1.0-alpha.4" }, "@codelitdev/oauth-server-kit": { - "recommended": "0.3.0", + "recommended": "0.4.0", "supported": ">=0.1.0-alpha.2 <1", "minimumSecure": "0.1.0-alpha.2" }, "@codelitdev/design-system": { - "recommended": "0.3.0", + "recommended": "0.4.0", "supported": ">=0.1.0-alpha.7 <1", "minimumSecure": "0.1.0-alpha.7" } diff --git a/packages/platform-conformance/CHANGELOG.md b/packages/platform-conformance/CHANGELOG.md index 5d475f7..ce6b985 100644 --- a/packages/platform-conformance/CHANGELOG.md +++ b/packages/platform-conformance/CHANGELOG.md @@ -1,5 +1,12 @@ # @codelitdev/platform-conformance +## 0.4.0 + +### Patch Changes + +- Updated dependencies [7b4a9ad] + - @codelitdev/platform@0.4.0 + ## 0.3.0 ### Patch Changes diff --git a/packages/platform-conformance/package.json b/packages/platform-conformance/package.json index c23b975..6005a8a 100644 --- a/packages/platform-conformance/package.json +++ b/packages/platform-conformance/package.json @@ -1,6 +1,6 @@ { "name": "@codelitdev/platform-conformance", - "version": "0.3.0", + "version": "0.4.0", "description": "Shared HTTP conformance suites for CodeLit Platform products", "author": "CodeLit", "type": "module", @@ -37,7 +37,7 @@ "tag": "latest" }, "peerDependencies": { - "@codelitdev/platform": ">=0.3.0" + "@codelitdev/platform": ">=0.4.0" }, "devDependencies": { "@codelitdev/platform": "workspace:*", diff --git a/packages/platform/CHANGELOG.md b/packages/platform/CHANGELOG.md index faeeb9c..11ba23d 100644 --- a/packages/platform/CHANGELOG.md +++ b/packages/platform/CHANGELOG.md @@ -1,5 +1,26 @@ # @codelitdev/platform +## 0.4.0 + +### Minor Changes + +- 7b4a9ad: Add `@codelitdev/platform/billing` and `@codelitdev/platform/billing/drizzle` with the adapters products wrote themselves around `@codelitdev/billing` (ADR 0013): single-use action grants stored in Better Auth's `verification` table, AES-256-GCM encryption for stored billing values, a return-URL validator, a maintenance worker runner, a webhook handler for `POST /webhooks/billing/` (400 for a rejected signature or body, 503 when a verified webhook cannot be stored, so the provider retries), and HTTP mapping for billing errors. `@codelitdev/billing` and `drizzle-orm` are optional peer dependencies; the root export is unchanged. + + **Product changes for this release** + + - Replace a custom `BillingAuthorizationPort` with `createBillingActionGrants`. Issue a token from an authenticated route, send it with the billing request, and handle `recent_authentication_required`. + - Replace custom encryption, return-URL checks, maintenance timers, webhook handlers, and billing error mapping with the matching adapters. Existing encrypted values stay readable. + +### Patch Changes + +- Updated dependencies [7b4a9ad] +- Updated dependencies [7b4a9ad] +- Updated dependencies [7b4a9ad] +- Updated dependencies [7b4a9ad] +- Updated dependencies [7b4a9ad] +- Updated dependencies [7b4a9ad] + - @codelitdev/billing@0.4.0 + ## 0.3.0 ### Patch Changes diff --git a/packages/platform/package.json b/packages/platform/package.json index 28c413d..e102da7 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@codelitdev/platform", - "version": "0.3.0", + "version": "0.4.0", "description": "Composition kernel for CodeLit Platform products", "author": "CodeLit", "type": "module",