@cosmicdrift/kumiko-bundled-features 0.47.0 → 0.48.1
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/package.json +1 -1
- package/src/subscription-stripe/__tests__/plugin-methods.test.ts +1 -1
- package/src/subscription-stripe/__tests__/stripe-foundation.integration.test.ts +1 -1
- package/src/subscription-stripe/__tests__/verify-webhook.test.ts +1 -1
- package/src/subscription-stripe/constants.ts +0 -4
- package/src/subscription-stripe/runtime.ts +4 -2
- package/src/user-data-rights/feature.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-bundled-features",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.1",
|
|
4
4
|
"description": "Built-in features — tenant, user, auth, delivery. The stuff you'd rewrite anyway, already typed.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -24,7 +24,7 @@ import type { StripeCtxRuntime } from "../runtime";
|
|
|
24
24
|
const TEST_API_KEY = "sk_test_dummy";
|
|
25
25
|
|
|
26
26
|
function buildStripe(): Stripe {
|
|
27
|
-
return new Stripe(TEST_API_KEY
|
|
27
|
+
return new Stripe(TEST_API_KEY);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/** Test-runtime: gibt den gespyten Client zurück + ein billing-live-Gate
|
|
@@ -66,7 +66,7 @@ let webhookApp: Hono;
|
|
|
66
66
|
let webhookAppWithSecrets: Hono;
|
|
67
67
|
let secretsCtx: SecretsContext;
|
|
68
68
|
|
|
69
|
-
const stripeForFixtures = new Stripe(TEST_API_KEY
|
|
69
|
+
const stripeForFixtures = new Stripe(TEST_API_KEY);
|
|
70
70
|
|
|
71
71
|
beforeAll(async () => {
|
|
72
72
|
// subscription-stripe requires jetzt config + secrets. Scenarios 1–4
|
|
@@ -27,7 +27,7 @@ const TEST_API_KEY = "sk_test_dummy_apikey";
|
|
|
27
27
|
// Test-helpers
|
|
28
28
|
// =============================================================================
|
|
29
29
|
|
|
30
|
-
const stripeForFixtures = new Stripe(TEST_API_KEY
|
|
30
|
+
const stripeForFixtures = new Stripe(TEST_API_KEY);
|
|
31
31
|
|
|
32
32
|
/** Test-runtime: liefert den fixture-Client + TEST_SECRET (statt sie aus
|
|
33
33
|
* system-secrets aufzulösen — die Resolution testet runtime.test.ts). */
|
|
@@ -6,10 +6,6 @@ export const SUBSCRIPTION_STRIPE_FEATURE = "subscription-stripe" as const;
|
|
|
6
6
|
// `/api/subscription/webhook/stripe`.
|
|
7
7
|
export const STRIPE_PROVIDER_NAME = "stripe" as const;
|
|
8
8
|
|
|
9
|
-
// Stripe-API-version-pin. Zentral, damit jeder Client (egal ob mount-time-
|
|
10
|
-
// fallback oder runtime-rotiert) dieselbe API-Version spricht.
|
|
11
|
-
export const STRIPE_API_VERSION = "2026-04-22.dahlia" as const;
|
|
12
|
-
|
|
13
9
|
// Secret- + config-key short-names. Qualified zu `subscription-stripe:<name>`
|
|
14
10
|
// (secrets) bzw. `subscription-stripe:config:<name>` (config) beim
|
|
15
11
|
// registry-build.
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
import { FeatureDisabledError, UnconfiguredError } from "@cosmicdrift/kumiko-framework/errors";
|
|
36
36
|
import type { SecretsContext } from "@cosmicdrift/kumiko-framework/secrets";
|
|
37
37
|
import Stripe from "stripe";
|
|
38
|
-
import {
|
|
38
|
+
import { SUBSCRIPTION_STRIPE_FEATURE } from "./constants";
|
|
39
39
|
|
|
40
40
|
const API_KEY_HINT =
|
|
41
41
|
"Set the system-scoped Stripe API key via secrets:write:set (or seed it from STRIPE_API_KEY during the env bridge).";
|
|
@@ -48,7 +48,9 @@ export function createStripeClientCache(): (apiKey: string) => Stripe {
|
|
|
48
48
|
return (apiKey) => {
|
|
49
49
|
const cached = cache.get(apiKey);
|
|
50
50
|
if (cached) return cached;
|
|
51
|
-
|
|
51
|
+
// No apiVersion pin — a string literal breaks consumers' typecheck on newer
|
|
52
|
+
// stripe SDKs (#256); the SDK's own default keeps wire-version and types aligned.
|
|
53
|
+
const client = new Stripe(apiKey);
|
|
52
54
|
cache.set(apiKey, client);
|
|
53
55
|
return client;
|
|
54
56
|
};
|
|
@@ -104,7 +104,7 @@ export type UserDataRightsOptions = {
|
|
|
104
104
|
export function createUserDataRightsFeature(opts: UserDataRightsOptions = {}): FeatureDefinition {
|
|
105
105
|
return defineFeature("user-data-rights", (r) => {
|
|
106
106
|
r.describe(
|
|
107
|
-
'Implements GDPR Art. 15 (access / `my-audit-log` query), Art. 17 (erasure / `request-deletion` + `cancel-deletion` + cron cleanup with grace period), Art. 18 (restriction / `restrict-account` + `lift-restriction`), and Art. 20 (portability / async `request-export` \u2192 ZIP via `file-foundation`, Magic-Link download) as first-class HTTP handlers and cron jobs. Each domain feature opts in by calling `r.useExtension(EXT_USER_DATA, "<entity>", { export, delete })` \u2014 the feature then orchestrates the export and forget pipelines across all registered hooks automatically. Requires `user`, `data-retention`, `compliance-profiles`, and `sessions`.',
|
|
107
|
+
'Implements GDPR Art. 15 (access / `my-audit-log` query), Art. 17 (erasure / `request-deletion` + `cancel-deletion`, plus the anonymous email-verified `request-deletion-by-email` + `confirm-deletion-by-token` flow for lockout-safe self-service, + cron cleanup with grace period), Art. 18 (restriction / `restrict-account` + `lift-restriction`), and Art. 20 (portability / async `request-export` \u2192 ZIP via `file-foundation`, Magic-Link download) as first-class HTTP handlers and cron jobs. Each domain feature opts in by calling `r.useExtension(EXT_USER_DATA, "<entity>", { export, delete })` \u2014 the feature then orchestrates the export and forget pipelines across all registered hooks automatically. Requires `user`, `data-retention`, `compliance-profiles`, and `sessions`.',
|
|
108
108
|
);
|
|
109
109
|
r.requires("user", "data-retention", "compliance-profiles", "sessions");
|
|
110
110
|
r.usesApi("compliance.forTenant");
|