mod-build 3.6.40-beta.3 → 3.6.40-beta.4

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,8 +1,7 @@
1
1
  # Changelog
2
2
 
3
3
  ## 3.6.40
4
-
5
- - added functionality to fetch & merge default form filed config in templateData
4
+ - Adding tree services to valid list of trade parameter values
6
5
 
7
6
  ## 3.6.39
8
7
 
@@ -3,7 +3,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings) {
3
3
  return function() {
4
4
  return gulp.src(siteSettings.distFolder + '/**')
5
5
  .pipe(gulpPlugins.revAll.revision({
6
- dontSearchFile: [/(resources)\/.*/],
6
+ dontSearchFile: [/(resources)\/.*/, /(scripts\/components)\/.*/],
7
7
  dontRenameFile: [/^\/favicon.ico$/g, '.html', '.txt', /modlogo([\w|\s|-])*\.(?:svg)/g, /(resources)\/.*/],
8
8
  dontUpdateReference: [/^\/favicon.ico$/g, '.html', '.txt', /modlogo([\w|\s|-])*\.(?:svg)/g, /(resources)\/.*/],
9
9
  transformFilename: function (file, hash) {
@@ -1,5 +1,4 @@
1
1
  var merge = require('lodash.merge');
2
- var request = require('request');
3
2
 
4
3
  module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
5
4
  // Merge site's data with shared data
@@ -145,7 +144,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
145
144
  fn: function(obj) {
146
145
  var output = '';
147
146
  var ignoreKeys = Array.prototype.slice.call(arguments, 1, -1);
148
-
147
+
149
148
  for (var key in obj.attributes) {
150
149
  if (ignoreKeys.indexOf(key) === -1) {
151
150
  if (typeof obj.attributes[key] !== 'object') {
@@ -166,36 +165,7 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
166
165
  }
167
166
  ];
168
167
 
169
- var getDefaultFormFieldConfig = async function() {
170
- const siteData = templatesData;
171
- await new Promise((resolve) => {
172
- request(`https://${siteSettings.nodeEnv}/quote/resources/mod-site/shared-components/steps/defaultFormFieldConfig.json`, async function(err, xhr, response) {
173
- if (xhr.statusCode !== 200) {
174
- throw new Error(`${xhr.statusCode}: Error while fetching shared-components/defaultFormFieldConfig.json`);
175
- }
176
- if (!siteData.steps) {
177
- throw new Error('steps not found!');
178
- }
179
- response = await JSON.parse(response);
180
- siteData.steps.items.forEach(item => {
181
- item.fields = item.fields.map(field => {
182
- if (field.name && response[field.name]) {
183
- field = Object.assign(response[field.name], field);
184
- }
185
- return field;
186
- });
187
- });
188
- resolve();
189
- })
190
- });
191
- return siteData;
192
- };
193
-
194
- return async function() {
195
- if (!templatesData.doNotUseDefaultFieldConfig) {
196
- await getDefaultFormFieldConfig();
197
- }
198
-
168
+ return function() {
199
169
  return gulp.src([
200
170
  siteSettings.srcFolder + '/' + siteSettings.templatesSubfolder + '/**/*.html',
201
171
  '!' + siteSettings.srcFolder + '/' + siteSettings.templatesSubfolder + '/_partials/**/*.html'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.40-beta.3",
3
+ "version": "3.6.40-beta.4",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -17,7 +17,7 @@
17
17
  */
18
18
 
19
19
  modForm.getTradeFromUrl = function() {
20
- var trades = ['solar', 'roofing', 'windows', 'hvac', 'siding', 'gutters', 'bathrooms', 'kitchen-remodeling', 'cabinets', 'home-security', 'home-warranty', 'medical-alerts', 'stair-lifts', 'walk-in-tubs', 'hot-tubs', 'flooring'],
20
+ var trades = ['solar', 'roofing', 'windows', 'hvac', 'siding', 'gutters', 'bathrooms', 'kitchen-remodeling', 'cabinets', 'home-security', 'home-warranty', 'medical-alerts', 'stair-lifts', 'walk-in-tubs', 'hot-tubs', 'flooring', 'tree-services'],
21
21
  queryParamString = (location.search.slice(1) !== '') ? location.search.slice(1) : '',
22
22
  params = queryParamString.toLowerCase(),
23
23
  filteredTrades = trades.filter(function(trade) {