mod-build 3.6.100 → 3.7.0-beta.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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.7.0
4
+
5
+ - Updating `templates.js` gulp task to grab the O&O Consent Capture TCPA language.
6
+
3
7
  ## 3.6.100
4
8
 
5
9
  - JSLint failure is back! *(needed a brief pause while implementing modernize consent)*
@@ -319,6 +319,19 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
319
319
  console.timeEnd('Finished fetch-tcpa-from-sitegenie after');
320
320
  };
321
321
 
322
+ var getConsentCaptureLanguage = async function() {
323
+ await new Promise(function(resolve) {
324
+ request(`https://${siteSettings.nodeEnv}/quote/resources/mod-site/consent-capture/tcpa.json`, async function(_err, xhr, response) {
325
+ if (xhr.statusCode !== 200) {
326
+ throw new Error(`${xhr.statusCode}: Error while fetching Consent Capture Language`);
327
+ }
328
+ const consentCapture = await JSON.parse(response);
329
+ Object.assign(templatesData, consentCapture);
330
+ resolve();
331
+ });
332
+ });
333
+ };
334
+
322
335
  return async function() {
323
336
  if (Object.keys(siteData).length > 0) {
324
337
  if (!templatesData.doNotUseDefaultFieldConfig && !templatesData.defaultConfigCompleted) {
@@ -332,6 +345,10 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
332
345
  if (!templatesData.tcpaText && templatesData.primary_trade) {
333
346
  await fetchTcpaFromSitegenie();
334
347
  }
348
+
349
+ if (!templatesData.consentCapture) {
350
+ await getConsentCaptureLanguage();
351
+ }
335
352
  }
336
353
 
337
354
  return new Promise(function(resolve) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.100",
3
+ "version": "3.7.0-beta.1",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",