@nuskin/ns-product-lib 2.8.2-cx24-4101.2.1 → 2.8.2-mysitedomainfix.1

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,10 @@
1
- ## [2.8.2-cx24-4101.2.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.1...v2.8.2-cx24-4101.2.1) (2023-05-30)
1
+ ## [2.8.2-mysitedomainfix.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.8.1...v2.8.2-mysitedomainfix.1) (2023-06-20)
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 the logic to change the domain using the shopping context. ([91449cb](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/91449cb1463eaacb0bc80ba4308c4c8fb6ace777))
7
+ * changing the equinox api domain so that it stays on the same domain as the mysite domain ([b3e672a](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/b3e672a4dae57012cf61d9a1f4454eaab674c3e7))
7
8
 
8
9
  ## [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
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.8.2-cx24-4101.2.1",
3
+ "version": "2.8.2-mysitedomainfix.1",
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": {
@@ -19,21 +19,21 @@
19
19
  "license": "ISC",
20
20
  "homepage": "https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/blob/master/README.md",
21
21
  "devDependencies": {
22
+ "@babel/preset-env": "^7.22.5",
22
23
  "axios-mock-adapter": "1.21.2",
23
24
  "eslint": "5.16.0",
24
25
  "eslint-config-google": "0.14.0",
25
26
  "eslint-config-prettier": "4.1.0",
26
27
  "eslint-plugin-json": "2.1.1",
27
28
  "eslint-plugin-prettier": "3.1.2",
28
- "jest": "29.2.2",
29
+ "jest": "29.5.0",
29
30
  "jest-environment-jsdom": "29.2.2",
30
31
  "jest-sonar-reporter": "2.0.0",
31
32
  "prettier": "1.19.1"
32
33
  },
33
34
  "dependencies": {
34
35
  "@nuskin/configuration-sdk": "2.2.3",
35
- "@nuskin/ns-common-lib": "1.4.7-cx24-4101.1",
36
- "@nuskin/ns-util": "4.3.2",
36
+ "@nuskin/ns-common-lib": "1.4.5",
37
37
  "axios": "0.27.2",
38
38
  "qs": "6.11.0"
39
39
  },
@@ -57,6 +57,10 @@ const ProductData = {
57
57
  searchEquinoxProduct: async function (skus, locale, config) {
58
58
  let skuFilter = [];
59
59
 
60
+ if (window && window.aem && window.aem.ShoppingContext && window.aem.ShoppingContext.getShoppingContext().context === 'storefront') {
61
+ config.API_Base_URLs = config.MySite_API_Base_URLs
62
+ }
63
+
60
64
  if (Array.isArray(skus)) {
61
65
  skus.forEach((sku) => {
62
66
  skuFilter.push(`index_key_productId="${sku}" OR index_key_skuId="${sku}"`)