mod-build 3.7.35 → 3.7.36

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.36
4
+
5
+ - Fix issues with templates.js due to last version updates.
6
+
3
7
  ## 3.7.35
4
8
 
5
9
  - Add 'grab-b2b-data' task to build/serve
@@ -45,7 +45,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
45
45
  field.options[0] = lastOption;
46
46
  field.options[field.options.length - 1] = firstOption;
47
47
  }
48
-
48
+
49
49
  field.options.some(function(option) {
50
50
  if (option.checked) {
51
51
  option.checked = false;
@@ -100,6 +100,8 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
100
100
  // Apply seasonal updates
101
101
  applySeasonalUpdates();
102
102
 
103
+ var templatesData = Object.assign(commonData(), qsFooterData(siteData), quoteFooterData(siteData), siteData, { isLocal, nodeEnv, assetsPath, buildPath });
104
+
103
105
  // This is helper function to evaluate JS expressions
104
106
  // in Handlebars, e.g. for conditions
105
107
  var handlebarsX = function(expression, context) {
@@ -329,7 +331,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
329
331
  return steps;
330
332
  };
331
333
 
332
- var getDefaultFormFieldConfig = async function(folder, templatesData) {
334
+ var getDefaultFormFieldConfig = async function(folder) {
333
335
  console.time('Finished fetch-default-form-config after');
334
336
  console.log('Starting fetch-default-form-config: ');
335
337
  await new Promise((resolve) => {
@@ -352,7 +354,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
352
354
  console.timeEnd('Finished fetch-default-form-config after');
353
355
  };
354
356
 
355
- var fetchTcpaFromSitegenie = async function(templatesData) {
357
+ var fetchTcpaFromSitegenie = async function() {
356
358
  const website = templatesData.website_name;
357
359
  const c_level = templatesData.cLevel ? templatesData.cLevel : 'default';
358
360
  const affiliateKey = templatesData.affiliateKey ? templatesData.affiliateKey : 0;
@@ -389,7 +391,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
389
391
  console.timeEnd('Finished fetch-tcpa-from-sitegenie after');
390
392
  };
391
393
 
392
- var getConsentCaptureLanguage = async function(templatesData) {
394
+ var getConsentCaptureLanguage = async function() {
393
395
  const requestPromise = (url) => {
394
396
  return new Promise((resolve, reject) => {
395
397
  request(url, (error, xhr, response) => {
@@ -454,8 +456,6 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
454
456
  };
455
457
 
456
458
  return async function() {
457
- var templatesData = Object.assign(commonData(), qsFooterData(siteData), quoteFooterData(siteData), siteData, { isLocal, nodeEnv, assetsPath, buildPath });
458
-
459
459
  // Ensure B2B data is explicitly included in templatesData
460
460
  if (siteData.leadForm) {
461
461
  templatesData.leadForm = siteData.leadForm;
@@ -467,18 +467,18 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
467
467
  if (Object.keys(siteData).length > 0) {
468
468
  if (!templatesData.doNotUseDefaultFieldConfig && !templatesData.defaultConfigCompleted) {
469
469
  if (templatesData.siteData && templatesData.siteData.useAccessibleConfig) {
470
- await getDefaultFormFieldConfig('accessible-components', templatesData);
470
+ await getDefaultFormFieldConfig('accessible-components');
471
471
  } else {
472
- await getDefaultFormFieldConfig('shared-components', templatesData);
472
+ await getDefaultFormFieldConfig('shared-components');
473
473
  }
474
474
  }
475
475
 
476
476
  if (!templatesData.tcpaText && templatesData.primary_trade) {
477
- await fetchTcpaFromSitegenie(templatesData);
477
+ await fetchTcpaFromSitegenie();
478
478
  }
479
479
 
480
480
  if (!templatesData.consentCapture) {
481
- await getConsentCaptureLanguage(templatesData);
481
+ await getConsentCaptureLanguage();
482
482
  }
483
483
  }
484
484
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.7.35",
3
+ "version": "3.7.36",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",