@nuskin/ns-product-lib 2.7.2-cdb-1.1 → 2.7.2-cx24-3964.1
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 +2 -2
- package/package.json +2 -2
- package/src/productData.js +0 -37
    
        package/CHANGELOG.md
    CHANGED
    
    | @@ -1,9 +1,9 @@ | |
| 1 | 
            -
            ## [2.7.2- | 
| 1 | 
            +
            ## [2.7.2-cx24-3964.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.1...v2.7.2-cx24-3964.1) (2023-04-28)
         | 
| 2 2 |  | 
| 3 3 |  | 
| 4 4 | 
             
            ### Fix
         | 
| 5 5 |  | 
| 6 | 
            -
            *  | 
| 6 | 
            +
            * Products in sales event not showing adjusted price and sales ribbon #CX24-3964 ([1242901](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/124290157798010c82b5e30a273b342fe707e884)), closes [#CX24-3964](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX24-3964)
         | 
| 7 7 |  | 
| 8 8 | 
             
            ## [2.7.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.7.0...v2.7.1) (2023-04-15)
         | 
| 9 9 |  | 
    
        package/package.json
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "name": "@nuskin/ns-product-lib",
         | 
| 3 | 
            -
              "version": "2.7.2- | 
| 3 | 
            +
              "version": "2.7.2-cx24-3964.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": {
         | 
| @@ -33,7 +33,7 @@ | |
| 33 33 | 
             
              "dependencies": {
         | 
| 34 34 | 
             
                "@nuskin/configuration-sdk": "2.2.3",
         | 
| 35 35 | 
             
                "@nuskin/ns-common-lib": "1.4.5",
         | 
| 36 | 
            -
                "@nuskin/ns-util": "4. | 
| 36 | 
            +
                "@nuskin/ns-util": "4.4.0",
         | 
| 37 37 | 
             
                "axios": "0.27.2",
         | 
| 38 38 | 
             
                "qs": "6.11.0"
         | 
| 39 39 | 
             
              },
         | 
    
        package/src/productData.js
    CHANGED
    
    | @@ -21,48 +21,20 @@ const ProductData = { | |
| 21 21 | 
             
               * @param {boolean} isEquinoxEnabled
         | 
| 22 22 | 
             
               */
         | 
| 23 23 | 
             
              getProductData: async function (skus, locale, market, isEquinoxEnabled = false) {
         | 
| 24 | 
            -
                console.trace({
         | 
| 25 | 
            -
                  where: 'productData getProductData',
         | 
| 26 | 
            -
                  skus,
         | 
| 27 | 
            -
                  locale,
         | 
| 28 | 
            -
                  market,
         | 
| 29 | 
            -
                  isEquinoxEnabled
         | 
| 30 | 
            -
                })
         | 
| 31 24 | 
             
                const localeMarket = `${locale}_${market}`;
         | 
| 32 25 |  | 
| 33 26 | 
             
                if (isEquinoxEnabled) {
         | 
| 34 27 | 
             
                  const config = (await getConfiguration(['Equinox_Markets'])).Equinox_Markets;
         | 
| 35 | 
            -
                  console.trace({
         | 
| 36 | 
            -
                    where: 'productData getProductData',
         | 
| 37 | 
            -
                    config
         | 
| 38 | 
            -
                  })
         | 
| 39 28 |  | 
| 40 29 | 
             
                  if (config.country_code === market && config.active) {
         | 
| 41 | 
            -
                    console.trace({
         | 
| 42 | 
            -
                      where: 'productData getProductData equinox path',
         | 
| 43 | 
            -
                      config
         | 
| 44 | 
            -
                    })
         | 
| 45 30 | 
             
                    return await this.getProductFromEquinox(skus, localeMarket, config);
         | 
| 46 31 | 
             
                  }
         | 
| 47 32 | 
             
                }
         | 
| 48 | 
            -
                console.trace({
         | 
| 49 | 
            -
                  where: 'productData getProductData legacy path'
         | 
| 50 | 
            -
                })
         | 
| 51 33 | 
             
                return await this.getProductFromLegacy(skus, localeMarket);
         | 
| 52 34 | 
             
              },
         | 
| 53 35 |  | 
| 54 36 | 
             
              getProductFromEquinox: async function (skus, locale, config) {
         | 
| 55 | 
            -
                console.trace({
         | 
| 56 | 
            -
                  where: 'productData getProductFromEquinox',
         | 
| 57 | 
            -
                  skus,
         | 
| 58 | 
            -
                  locale,
         | 
| 59 | 
            -
                  config
         | 
| 60 | 
            -
                })
         | 
| 61 37 | 
             
                const response = await this.searchEquinoxProduct(skus, locale, config);
         | 
| 62 | 
            -
                console.trace({
         | 
| 63 | 
            -
                  where: 'productData getProductFromEquinox',
         | 
| 64 | 
            -
                  response
         | 
| 65 | 
            -
                })
         | 
| 66 38 |  | 
| 67 39 | 
             
                if (response.data.product) {
         | 
| 68 40 | 
             
                  return await this.eqProductMapper(response.data.product, skus);
         | 
| @@ -122,16 +94,7 @@ const ProductData = { | |
| 122 94 | 
             
              },
         | 
| 123 95 |  | 
| 124 96 | 
             
              getProductFromLegacy: async function (skus, locale) {
         | 
| 125 | 
            -
                console.trace({
         | 
| 126 | 
            -
                  where: 'productData getProductFromLegacy',
         | 
| 127 | 
            -
                  skus,
         | 
| 128 | 
            -
                  locale
         | 
| 129 | 
            -
                })
         | 
| 130 97 | 
             
                const marketConfig = await contentstack.getAEMConfig();
         | 
| 131 | 
            -
                console.trace({
         | 
| 132 | 
            -
                  where: 'productData getProductFromLegacy',
         | 
| 133 | 
            -
                  marketConfig
         | 
| 134 | 
            -
                })
         | 
| 135 98 |  | 
| 136 99 | 
             
                if (marketConfig === null) {
         | 
| 137 100 | 
             
                  return null;
         |