mod-build 4.0.89-beta.1 → 4.0.89-beta.3

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## 4.0.89
4
4
 
5
- - Updated the `${apiDomain}utils/vendor-display-name` API to use `publicKey=` as the param to grab the branded display name (which is needed for QMP2.0)
5
+ - Updated the `${apiDomain}utils/vendor-display-name` API to use `publicKey=` as the param to grab the branded display name (which is needed for QMP2.0). Also updated all instances of `vendorPublicIdentifier` to `publicKey` since that is what the field is called now.
6
6
 
7
7
  ## 4.0.88
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "4.0.89-beta.1",
3
+ "version": "4.0.89-beta.3",
4
4
  "description": "Share components for S3 sites.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -228,16 +228,16 @@ const getConsentCaptureLanguage = async function(config, tempConfig) {
228
228
 
229
229
  let apiUrl = '';
230
230
 
231
- if (brandedSiteIdentifiers.data[websiteName] && (brandedSiteIdentifiers.data[websiteName].vendorPublicIdentifier || brandedSiteIdentifiers.data[websiteName][companyName] && brandedSiteIdentifiers.data[websiteName][companyName].vendorPublicIdentifier)) {
232
- const vendorPublicIdentifier = brandedSiteIdentifiers.data[websiteName][companyName] ? brandedSiteIdentifiers.data[websiteName][companyName].vendorPublicIdentifier : brandedSiteIdentifiers.data[websiteName].vendorPublicIdentifier;
231
+ if (brandedSiteIdentifiers.data[websiteName] && (brandedSiteIdentifiers.data[websiteName].publicKey || brandedSiteIdentifiers.data[websiteName][companyName] && brandedSiteIdentifiers.data[websiteName][companyName].publicKey)) {
232
+ const publicKey = brandedSiteIdentifiers.data[websiteName][companyName] ? brandedSiteIdentifiers.data[websiteName][companyName].publicKey : brandedSiteIdentifiers.data[websiteName].publicKey;
233
233
 
234
- apiUrl = `${apiDomain}utils/vendor-display-name?publicKey=${vendorPublicIdentifier}`;
234
+ apiUrl = `${apiDomain}utils/vendor-display-name?publicKey=${encodeURIComponent(publicKey)}`;
235
235
  const getBrandedDisplayName = await axios.get(apiUrl);
236
236
  if (getBrandedDisplayName.status !== 200) {
237
237
  throw new Error(`${resp.status}: Error while getting branded display name from HS Form Service`);
238
238
  }
239
239
 
240
- await embedBrandedDisplayName(apiUrl, consentCaptureObject, vendorPublicIdentifier, service);
240
+ await embedBrandedDisplayName(apiUrl, consentCaptureObject, publicKey, service);
241
241
  } else {
242
242
  const vendorKeys = findVendorKey(config);
243
243
  const vendorKey = vendorKeys?.length > 0 ? vendorKeys[0] : null;