@nuskin/ns-product-lib 2.8.2-cx24-4101.1 → 2.8.2

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,9 @@
1
- ## [2.8.2-cx24-4101.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.1...v2.8.2-cx24-4101.1) (2023-06-01)
1
+ ## [2.8.2](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.1...v2.8.2) (2023-06-21)
2
2
 
3
3
 
4
4
  ### Fix
5
5
 
6
- * version bump ns-common-lib (#CX24-4101) ([dbf9f8a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/dbf9f8aa81ae8b472a775deb8dd0222660a4cb34)), closes [#CX24-4101](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-4101)
6
+ * added shopping context checking ([8714953](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/8714953113f4f1970cacd4f4f6b59ecc61e767eb))
7
7
 
8
8
  ## [2.8.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.0...v2.8.1) (2023-05-23)
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.8.2-cx24-4101.1",
3
+ "version": "2.8.2",
4
4
  "description": "This project contains shared Product models and code between the backend and frontend.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@nuskin/configuration-sdk": "2.2.3",
35
- "@nuskin/ns-common-lib": "1.4.7-cx24-4101.1",
35
+ "@nuskin/ns-common-lib": "1.4.5",
36
36
  "@nuskin/ns-util": "4.3.2",
37
37
  "axios": "0.27.2",
38
38
  "qs": "6.11.0"
@@ -57,6 +57,12 @@ const ProductData = {
57
57
  searchEquinoxProduct: async function (skus, locale, config) {
58
58
  let skuFilter = [];
59
59
 
60
+ const shoppingContext = window && window.aem && window.aem.ShoppingContext && window.aem.ShoppingContext.getShoppingContext();
61
+
62
+ if ((shoppingContext && shoppingContext.context === 'storefront') || window.location.hostname.includes(".mynuskin.com")) {
63
+ config.API_Base_URLs = config.MySite_API_Base_URLs
64
+ }
65
+
60
66
  if (Array.isArray(skus)) {
61
67
  skus.forEach((sku) => {
62
68
  skuFilter.push(`index_key_productId="${sku}" OR index_key_skuId="${sku}"`)