@namiml/sdk-core 3.4.9-dev.202608172305 → 3.4.9
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 +11 -3
- package/dist/index.mjs +11 -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.9",
|
|
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.9
|
|
109
|
+
NAMI_SDK_PACKAGE_VERSION: exports.NAMI_SDK_PACKAGE_VERSION = "3.4.9",
|
|
110
110
|
// environments
|
|
111
111
|
PRODUCTION: exports.PRODUCTION = "production", DEVELOPMENT: exports.DEVELOPMENT = "development",
|
|
112
112
|
// error messages
|
|
@@ -62534,6 +62534,11 @@ function formTagValue(value) {
|
|
|
62534
62534
|
}
|
|
62535
62535
|
|
|
62536
62536
|
const LIQUID_VAR_REGEX = /\{\{\s*([^}]+?)\s*\}\}/g;
|
|
62537
|
+
// Legacy `${...}` smart text has no resolver in the flow context — core has no smart-text engine,
|
|
62538
|
+
// and web's lives in sdk/web behind a PaywallContextProvider that core cannot import. Blank the
|
|
62539
|
+
// token rather than let it reach the payload verbatim. Resolution parity is NAM-3817.
|
|
62540
|
+
// (NAM-3815)
|
|
62541
|
+
const SMART_TEXT_VAR_REGEX = /\$\{[^}]+\}/g;
|
|
62537
62542
|
/**
|
|
62538
62543
|
* Resolver for liquid-style flow variables, without requiring namespace prefixes.
|
|
62539
62544
|
* We drop BaseNamespaceResolver since we don't need namespace registration or stripping.
|
|
@@ -62625,10 +62630,13 @@ class FlowLiquidResolver {
|
|
|
62625
62630
|
* Replaces {{key}} in a string using FlowLiquidResolver.
|
|
62626
62631
|
*/
|
|
62627
62632
|
interpolateLiquidVariables(text) {
|
|
62628
|
-
|
|
62633
|
+
// Liquid runs first so a `{{ }}` token whose value contains `${` is still blanked.
|
|
62634
|
+
return text
|
|
62635
|
+
.replace(LIQUID_VAR_REGEX, (_, key) => {
|
|
62629
62636
|
const value = this.resolve(key) ?? this.urlParams[key];
|
|
62630
62637
|
return value != null ? value : "";
|
|
62631
|
-
})
|
|
62638
|
+
})
|
|
62639
|
+
.replace(SMART_TEXT_VAR_REGEX, "");
|
|
62632
62640
|
}
|
|
62633
62641
|
/**
|
|
62634
62642
|
* Deeply interpolates strings in objects/arrays without any namespace logic.
|
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.9",
|
|
106
106
|
// full package version including dev suffix — stamped by scripts/version.sh
|
|
107
|
-
NAMI_SDK_PACKAGE_VERSION = "3.4.9
|
|
107
|
+
NAMI_SDK_PACKAGE_VERSION = "3.4.9",
|
|
108
108
|
// environments
|
|
109
109
|
PRODUCTION = "production", DEVELOPMENT = "development",
|
|
110
110
|
// error messages
|
|
@@ -62532,6 +62532,11 @@ function formTagValue(value) {
|
|
|
62532
62532
|
}
|
|
62533
62533
|
|
|
62534
62534
|
const LIQUID_VAR_REGEX = /\{\{\s*([^}]+?)\s*\}\}/g;
|
|
62535
|
+
// Legacy `${...}` smart text has no resolver in the flow context — core has no smart-text engine,
|
|
62536
|
+
// and web's lives in sdk/web behind a PaywallContextProvider that core cannot import. Blank the
|
|
62537
|
+
// token rather than let it reach the payload verbatim. Resolution parity is NAM-3817.
|
|
62538
|
+
// (NAM-3815)
|
|
62539
|
+
const SMART_TEXT_VAR_REGEX = /\$\{[^}]+\}/g;
|
|
62535
62540
|
/**
|
|
62536
62541
|
* Resolver for liquid-style flow variables, without requiring namespace prefixes.
|
|
62537
62542
|
* We drop BaseNamespaceResolver since we don't need namespace registration or stripping.
|
|
@@ -62623,10 +62628,13 @@ class FlowLiquidResolver {
|
|
|
62623
62628
|
* Replaces {{key}} in a string using FlowLiquidResolver.
|
|
62624
62629
|
*/
|
|
62625
62630
|
interpolateLiquidVariables(text) {
|
|
62626
|
-
|
|
62631
|
+
// Liquid runs first so a `{{ }}` token whose value contains `${` is still blanked.
|
|
62632
|
+
return text
|
|
62633
|
+
.replace(LIQUID_VAR_REGEX, (_, key) => {
|
|
62627
62634
|
const value = this.resolve(key) ?? this.urlParams[key];
|
|
62628
62635
|
return value != null ? value : "";
|
|
62629
|
-
})
|
|
62636
|
+
})
|
|
62637
|
+
.replace(SMART_TEXT_VAR_REGEX, "");
|
|
62630
62638
|
}
|
|
62631
62639
|
/**
|
|
62632
62640
|
* Deeply interpolates strings in objects/arrays without any namespace logic.
|
package/package.json
CHANGED