@namiml/sdk-core 3.4.11-dev.202609120011 → 3.4.11-dev.202609152019
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/dist/index.cjs +21 -3
- package/dist/index.mjs +21 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -106,7 +106,7 @@ const {
|
|
|
106
106
|
// version — stamped by scripts/version.sh
|
|
107
107
|
NAMI_SDK_VERSION: exports.NAMI_SDK_VERSION = "3.4.11",
|
|
108
108
|
// full package version including dev suffix — stamped by scripts/version.sh
|
|
109
|
-
NAMI_SDK_PACKAGE_VERSION: exports.NAMI_SDK_PACKAGE_VERSION = "3.4.11-dev.
|
|
109
|
+
NAMI_SDK_PACKAGE_VERSION: exports.NAMI_SDK_PACKAGE_VERSION = "3.4.11-dev.202609152019",
|
|
110
110
|
// environments
|
|
111
111
|
PRODUCTION: exports.PRODUCTION = "production", DEVELOPMENT: exports.DEVELOPMENT = "development",
|
|
112
112
|
// error messages
|
|
@@ -60853,6 +60853,11 @@ class PaywallState extends SimpleEventTarget {
|
|
|
60853
60853
|
};
|
|
60854
60854
|
const initState = paywall.template?.initialState;
|
|
60855
60855
|
state = { ...state, ...initState };
|
|
60856
|
+
// NAM-4244: the Nami app platform id is a per-configuration constant, not paywall data.
|
|
60857
|
+
// Read it once here so `${platform.id}` / `${state.platformId}` conditions resolve without
|
|
60858
|
+
// touching storage on the per-assertion render path. Assigned after the template's
|
|
60859
|
+
// initialState so an authored `platformId` cannot shadow the real one.
|
|
60860
|
+
state.platformId = storageService.getNamiConfig()?.appPlatformID ?? '';
|
|
60856
60861
|
const launch = normalizeLaunchContext(state.launch, context, paywall.sku_menus);
|
|
60857
60862
|
this.filteredSkuMenus = paywall.sku_menus ?? [];
|
|
60858
60863
|
if (launch.productGroups.length) {
|
|
@@ -62629,11 +62634,24 @@ class FlowLiquidResolver {
|
|
|
62629
62634
|
const screenState = flow?.component;
|
|
62630
62635
|
// Handle launchContext paths
|
|
62631
62636
|
if (key.startsWith("launchContext.")) {
|
|
62632
|
-
const launchContext =
|
|
62637
|
+
const launchContext = flow?.context;
|
|
62633
62638
|
if (launchContext) {
|
|
62634
62639
|
const contextPath = key.substring("launchContext.".length);
|
|
62635
|
-
|
|
62640
|
+
// `placement` and `tags` are read off the campaign, so omitting it here
|
|
62641
|
+
// left both permanently dead. Deliberately `flow.campaign` (constructor-
|
|
62642
|
+
// assigned, and what the condition-evaluator wiring already passes) and
|
|
62643
|
+
// not `flow.component.campaign`, which is renderer-assigned state — the
|
|
62644
|
+
// class of source that blanked {{ pageId }} in NAM-4371. (NAM-3637)
|
|
62645
|
+
const resolver = new LaunchContextResolver(launchContext, flow?.campaign);
|
|
62636
62646
|
const resolvedValue = resolver['resolveValue'](contextPath);
|
|
62647
|
+
// `tags` and `productGroups` resolve to arrays, which the condition
|
|
62648
|
+
// evaluator needs in array form for contains/notContains — so flatten
|
|
62649
|
+
// for text here, not in the resolver. Comma, no space: what
|
|
62650
|
+
// Array.prototype.toString already yielded for productGroups, joined
|
|
62651
|
+
// explicitly so the separator stays a visible decision. (NAM-3637)
|
|
62652
|
+
if (Array.isArray(resolvedValue)) {
|
|
62653
|
+
return resolvedValue.join(",");
|
|
62654
|
+
}
|
|
62637
62655
|
return resolvedValue?.toString();
|
|
62638
62656
|
}
|
|
62639
62657
|
return undefined;
|
package/dist/index.mjs
CHANGED
|
@@ -104,7 +104,7 @@ const {
|
|
|
104
104
|
// version — stamped by scripts/version.sh
|
|
105
105
|
NAMI_SDK_VERSION = "3.4.11",
|
|
106
106
|
// full package version including dev suffix — stamped by scripts/version.sh
|
|
107
|
-
NAMI_SDK_PACKAGE_VERSION = "3.4.11-dev.
|
|
107
|
+
NAMI_SDK_PACKAGE_VERSION = "3.4.11-dev.202609152019",
|
|
108
108
|
// environments
|
|
109
109
|
PRODUCTION = "production", DEVELOPMENT = "development",
|
|
110
110
|
// error messages
|
|
@@ -60851,6 +60851,11 @@ class PaywallState extends SimpleEventTarget {
|
|
|
60851
60851
|
};
|
|
60852
60852
|
const initState = paywall.template?.initialState;
|
|
60853
60853
|
state = { ...state, ...initState };
|
|
60854
|
+
// NAM-4244: the Nami app platform id is a per-configuration constant, not paywall data.
|
|
60855
|
+
// Read it once here so `${platform.id}` / `${state.platformId}` conditions resolve without
|
|
60856
|
+
// touching storage on the per-assertion render path. Assigned after the template's
|
|
60857
|
+
// initialState so an authored `platformId` cannot shadow the real one.
|
|
60858
|
+
state.platformId = storageService.getNamiConfig()?.appPlatformID ?? '';
|
|
60854
60859
|
const launch = normalizeLaunchContext(state.launch, context, paywall.sku_menus);
|
|
60855
60860
|
this.filteredSkuMenus = paywall.sku_menus ?? [];
|
|
60856
60861
|
if (launch.productGroups.length) {
|
|
@@ -62627,11 +62632,24 @@ class FlowLiquidResolver {
|
|
|
62627
62632
|
const screenState = flow?.component;
|
|
62628
62633
|
// Handle launchContext paths
|
|
62629
62634
|
if (key.startsWith("launchContext.")) {
|
|
62630
|
-
const launchContext =
|
|
62635
|
+
const launchContext = flow?.context;
|
|
62631
62636
|
if (launchContext) {
|
|
62632
62637
|
const contextPath = key.substring("launchContext.".length);
|
|
62633
|
-
|
|
62638
|
+
// `placement` and `tags` are read off the campaign, so omitting it here
|
|
62639
|
+
// left both permanently dead. Deliberately `flow.campaign` (constructor-
|
|
62640
|
+
// assigned, and what the condition-evaluator wiring already passes) and
|
|
62641
|
+
// not `flow.component.campaign`, which is renderer-assigned state — the
|
|
62642
|
+
// class of source that blanked {{ pageId }} in NAM-4371. (NAM-3637)
|
|
62643
|
+
const resolver = new LaunchContextResolver(launchContext, flow?.campaign);
|
|
62634
62644
|
const resolvedValue = resolver['resolveValue'](contextPath);
|
|
62645
|
+
// `tags` and `productGroups` resolve to arrays, which the condition
|
|
62646
|
+
// evaluator needs in array form for contains/notContains — so flatten
|
|
62647
|
+
// for text here, not in the resolver. Comma, no space: what
|
|
62648
|
+
// Array.prototype.toString already yielded for productGroups, joined
|
|
62649
|
+
// explicitly so the separator stays a visible decision. (NAM-3637)
|
|
62650
|
+
if (Array.isArray(resolvedValue)) {
|
|
62651
|
+
return resolvedValue.join(",");
|
|
62652
|
+
}
|
|
62635
62653
|
return resolvedValue?.toString();
|
|
62636
62654
|
}
|
|
62637
62655
|
return undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@namiml/sdk-core",
|
|
3
|
-
"version": "3.4.11-dev.
|
|
3
|
+
"version": "3.4.11-dev.202609152019",
|
|
4
4
|
"description": "Platform-agnostic core for the Nami SDK — business logic, API, types, and state management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|