mod-build 3.6.61-beta.2 → 3.6.61-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,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.6.61
4
+
5
+ - Adding the accessible components to the `grab-shared-components` task
6
+
3
7
  ## 3.6.60
4
8
 
5
9
  - Adding consoles allllll throughout the `grab-shared-scripts` task. It is still breaking down somewhere; and the first step to trying to force-fail our builds is figure out where the issue is
@@ -186,13 +186,13 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
186
186
  return steps;
187
187
  };
188
188
 
189
- var getDefaultFormFieldConfig = async function() {
189
+ var getDefaultFormFieldConfig = async function(folder) {
190
190
  console.time('Finished fetch-default-form-config after');
191
191
  console.log('Starting fetch-default-form-config: ');
192
192
  await new Promise((resolve) => {
193
- request(`https://${siteSettings.nodeEnv}/quote/resources/mod-site/shared-components/steps/defaultFormFieldConfig.json`, async function(err, xhr, response) {
193
+ request(`https://${siteSettings.nodeEnv}/quote/resources/mod-site/${folder}/steps/defaultFormFieldConfig.json`, async function(err, xhr, response) {
194
194
  if (xhr.statusCode !== 200) {
195
- throw new Error(`${xhr.statusCode}: Error while fetching shared-components/defaultFormFieldConfig.json`);
195
+ throw new Error(`${xhr.statusCode}: Error while fetching ${folder}/defaultFormFieldConfig.json`);
196
196
  }
197
197
 
198
198
  const defaultConfig = await JSON.parse(response);
@@ -244,7 +244,11 @@ module.exports = function(gulp, gulpPlugins, siteSettings, siteData) {
244
244
  return async function() {
245
245
  if (Object.keys(siteData).length > 0) {
246
246
  if (!templatesData.doNotUseDefaultFieldConfig && !templatesData.defaultConfigCompleted) {
247
- await getDefaultFormFieldConfig();
247
+ if (templatesData.siteData.useAccessibleFormConfig) {
248
+ await getDefaultFormFieldConfig('accessible-components');
249
+ } else {
250
+ await getDefaultFormFieldConfig('shared-components');
251
+ }
248
252
  }
249
253
 
250
254
  if (!templatesData.tcpaText && templatesData.primary_trade) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mod-build",
3
- "version": "3.6.61-beta.2",
3
+ "version": "3.6.61-beta.4",
4
4
  "description": "Share components for S3 sites.",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",