@revturbine/sdk 0.10.4 → 0.10.5
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/CHANGELOG.md +59 -0
- package/dist/headless.js +1 -1
- package/dist/headless.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/web-sdk/customer-side.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -47,6 +47,61 @@ also require a changelog entry.
|
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
50
|
+
## 0.10.5
|
|
51
|
+
|
|
52
|
+
### Trial-only local integrations get provider context (BL-0120)
|
|
53
|
+
|
|
54
|
+
**What changed.** `synthesizeProviderContext()` — the fallback that builds
|
|
55
|
+
`DomainProvider` state from `userContext` when no explicit domain provider is
|
|
56
|
+
registered — dropped an integration's trial data whenever no commercial
|
|
57
|
+
`plan` / `plan_handle` was also present. An app supplying **only**
|
|
58
|
+
`initialData.trialStatus` (or `setTrialInstances()` / `setTrialStatus()` with
|
|
59
|
+
no plan) got no provider context at all: `providers.plan` came back
|
|
60
|
+
`undefined`, so `{{trial_days_remaining}}` (and every other `trial*` token
|
|
61
|
+
`derivePlacementPersonalizationTokens` derives from `providers.plan`) stayed
|
|
62
|
+
raw, unresolved, in placement copy. Reported against the CybeDefend demo
|
|
63
|
+
(SDK 0.7.13): a `trial_ending` placement with `in_trial: true,
|
|
64
|
+
days_remaining: 3` left `{{trial_days_remaining}}` literal in the rendered
|
|
65
|
+
body.
|
|
66
|
+
|
|
67
|
+
Two omissions, same root cause — trial was never checked alongside
|
|
68
|
+
`plan` / `plan_handle` / `usage` / `tiers` / `experiments`:
|
|
69
|
+
|
|
70
|
+
- the early-return guard (`if (!plan && !planHandle && !usage && !hasTiers
|
|
71
|
+
&& !hasExperiments) return undefined;`) treated a trial-only integration as
|
|
72
|
+
having no signal whatsoever;
|
|
73
|
+
- even past that guard, the returned `plan` key itself was gated on
|
|
74
|
+
`plan || planHandle` — so the trial fields (`trialActive`,
|
|
75
|
+
`trialDaysRemaining`, etc.) it computed were still discarded for a
|
|
76
|
+
plan-less trial.
|
|
77
|
+
|
|
78
|
+
Both gates now also check `hasTrial` (an explicit trial signal — the default
|
|
79
|
+
untouched `{ in_trial: false }` sentinel does not count, so the omitted-signal
|
|
80
|
+
short-circuit is otherwise unchanged for integrations that supply nothing at
|
|
81
|
+
all). `usage`-only, `tiers`-only, and `experiments`-only integrations already
|
|
82
|
+
threaded through correctly before this change; trial was the only signal
|
|
83
|
+
missing from both checks.
|
|
84
|
+
|
|
85
|
+
No public API change — `synthesizeProviderContext` is private, and the fix is
|
|
86
|
+
additive: a plan-less trial integration now gets a `providers.plan` it never
|
|
87
|
+
got before, with an empty `currentPlanHandle: ''` (no plan name/handle was
|
|
88
|
+
ever supplied to derive one from).
|
|
89
|
+
|
|
90
|
+
**Landed in** `0.10.5`. **Fail-closed in** n/a — a previously-dropped signal
|
|
91
|
+
is now included; nothing that resolved before stops resolving.
|
|
92
|
+
|
|
93
|
+
**Proving test:** `web-sdk/customer-side-trial-token-signal.test.ts` — a
|
|
94
|
+
trial-only local integration now gets a non-empty provider context with
|
|
95
|
+
`trialActive`/`trialDaysRemaining` set, and feeding those through
|
|
96
|
+
`derivePlacementPersonalizationTokens` + `resolveContent` renders
|
|
97
|
+
`{{trial_days_remaining}}` as `"3"` instead of leaving it literal. Includes
|
|
98
|
+
the positive control (trial + plan together — unchanged), the negative
|
|
99
|
+
control (no trial data at all — the token stays absent, never coerced to
|
|
100
|
+
`"0"`), and a sibling check confirming usage-only integrations were already
|
|
101
|
+
unaffected by the guard.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
50
105
|
## 0.10.4
|
|
51
106
|
|
|
52
107
|
### Every payload is a selection candidate, not just the first (BL-0122)
|
|
@@ -94,6 +149,8 @@ placement where payload 1 is not the payload a given user matches. Those users
|
|
|
94
149
|
now see the payload their chips select — which is the fix, and is a live
|
|
95
150
|
behaviour change for such configs. Single-payload placements are unaffected.
|
|
96
151
|
|
|
152
|
+
---
|
|
153
|
+
|
|
97
154
|
## 0.10.3
|
|
98
155
|
|
|
99
156
|
### The Rust port gains the decision surfaces Python already shipped (BL-0145)
|
|
@@ -124,6 +181,8 @@ and the crate could lack the capability entirely without a single fixture
|
|
|
124
181
|
going red. The runner now calls `revturbine::plans`, and the inline copies are
|
|
125
182
|
deleted; all 102 comparisons stay byte-identical.
|
|
126
183
|
|
|
184
|
+
---
|
|
185
|
+
|
|
127
186
|
## 0.10.2
|
|
128
187
|
|
|
129
188
|
### Local mode resolves placements by slot id (BL-0119)
|