mod-build 4.0.6 → 4.0.7
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 +4 -0
- package/package.json +1 -1
- package/public/resources/scripts/abandonment/abandonment-1df90ee155f6c0893d90.min.js +2 -0
- package/public/resources/scripts/abandonment/abandonment.min.js +2 -0
- package/public/resources/scripts/callrail/callrail-5c7c537f04af468600cf.min.js +2 -0
- package/public/resources/scripts/callrail/callrail.min.js +2 -0
- package/public/resources/scripts/footer/footer-component-7b5e263f64568573ecc0.min.js +2 -0
- package/public/resources/scripts/footer/footer-component.min.js +2 -0
- package/public/resources/scripts/helpers/initNumericOnlyFields.min.js +2 -0
- package/public/resources/scripts/helpers/initNumericOnlyFields.min.js.map +1 -0
- package/public/resources/scripts/helpers/isZipCodeValid.min.js +2 -0
- package/public/resources/scripts/helpers/isZipCodeValid.min.js.map +1 -0
- package/public/resources/scripts/jornaya.hbs +35 -0
- package/public/resources/scripts/jornaya.html +35 -0
- package/public/resources/scripts/mod-alytics/modalytics-0ac7d7a5a72ea67a0f47.min.js +2 -0
- package/public/resources/scripts/mod-alytics/modalytics.min.js +2 -0
- package/public/resources/scripts/mod-form/form/homeowner-62292fdc874b2d2f5c82.min.js +2 -0
- package/public/resources/scripts/mod-form/form/homeowner.min.js +2 -0
- package/public/resources/scripts/mod-utils/modutils-15069d7b728a555fb3f7.min.js +2 -0
- package/public/resources/scripts/mod-utils/modutils.min.js +2 -0
- package/public/resources/scripts/trusted-form.hbs +38 -0
- package/public/resources/scripts/trusted-form.html +38 -0
- package/public/resources/styles/components/abandonment/abandonment-a8571a9e32ed6ef9acb4.min.css +1 -0
- package/public/resources/styles/components/abandonment/abandonment.min.css +1 -0
- package/public/resources/styles/components/footer/mod-footer-1fb2cec3278f29df57d0.min.css +1 -0
- package/public/resources/styles/components/footer/mod-footer.min.css +1 -0
- package/public/resources/styles/components/footer/qs-footer-9a3b0ab00428b03e6e9e.min.css +1 -0
- package/public/resources/styles/components/footer/qs-footer.min.css +1 -0
- package/siteconfig.js +1 -0
- package/src/accessible-components/button/_button.scss +319 -0
- package/src/accessible-components/button/back-button.html +8 -0
- package/src/accessible-components/button/button.html +17 -0
- package/src/accessible-components/carousel/_carousel.scss +112 -0
- package/src/accessible-components/carousel/carousel.html +25 -0
- package/src/accessible-components/carousel/carousel.js +3426 -0
- package/src/accessible-components/carousel/carousel.js.map +1 -0
- package/src/accessible-components/carousel/carousel.min.js +6 -0
- package/src/accessible-components/carousel/carousel.min.js.map +1 -0
- package/src/accessible-components/checkbox/_checkbox.scss +153 -0
- package/src/accessible-components/checkbox/checkbox-group.html +18 -0
- package/src/accessible-components/checkbox/checkbox.html +8 -0
- package/src/accessible-components/expand-collapse/_expand-collapse.scss +129 -0
- package/src/accessible-components/expand-collapse/expand-collapse.html +14 -0
- package/src/accessible-components/expand-collapse/expand-collapse.js +52 -0
- package/src/accessible-components/expand-collapse/expand-collapse.min.js +2 -0
- package/src/accessible-components/expand-collapse/expand-collapse.min.js.map +1 -0
- package/src/accessible-components/featured-block/_featured-block.scss +221 -0
- package/src/accessible-components/featured-block/featured-block.html +54 -0
- package/src/accessible-components/foot-assets/foot-assets.html +112 -0
- package/src/accessible-components/footer/footer.html +2 -0
- package/src/accessible-components/gtm-body/gtm-body.html +4 -0
- package/src/accessible-components/head/head.html +187 -0
- package/src/accessible-components/header/_header.scss +289 -0
- package/src/accessible-components/header/header.html +66 -0
- package/src/accessible-components/hero/_hero.scss +405 -0
- package/src/accessible-components/hero/hero.html +53 -0
- package/src/accessible-components/how-it-works/_how-it-works.scss +217 -0
- package/src/accessible-components/how-it-works/how-it-works-carousel.html +12 -0
- package/src/accessible-components/how-it-works/how-it-works-static.html +12 -0
- package/src/accessible-components/how-it-works/how-it-works.html +14 -0
- package/src/accessible-components/information/_information.scss +96 -0
- package/src/accessible-components/information/information.html +32 -0
- package/src/accessible-components/input/_input.scss +204 -0
- package/src/accessible-components/input/input.html +22 -0
- package/src/accessible-components/input/textarea.html +9 -0
- package/src/accessible-components/partners/_partners.scss +234 -0
- package/src/accessible-components/partners/partners.html +56 -0
- package/src/accessible-components/picture/picture.html +19 -0
- package/src/accessible-components/preloader/_preloader.scss +61 -0
- package/src/accessible-components/preloader/preloader.html +23 -0
- package/src/accessible-components/progress-bar/_progress-bar.scss +140 -0
- package/src/accessible-components/progress-bar/progress-bar.html +21 -0
- package/src/accessible-components/progress-bar/progress-bar.js +37 -0
- package/src/accessible-components/progress-bar/progress-bar.min.js +2 -0
- package/src/accessible-components/progress-bar/progress-bar.min.js.map +1 -0
- package/src/accessible-components/radio-button/_radio-button.scss +586 -0
- package/src/accessible-components/radio-button/radio-button.html +33 -0
- package/src/accessible-components/reviews/_reviews.scss +180 -0
- package/src/accessible-components/reviews/reviews-carousel.html +12 -0
- package/src/accessible-components/reviews/reviews-static.html +12 -0
- package/src/accessible-components/reviews/reviews.html +37 -0
- package/src/accessible-components/select/_select.scss +87 -0
- package/src/accessible-components/select/select.html +10 -0
- package/src/accessible-components/steps/_steps.scss +640 -0
- package/src/accessible-components/steps/defaultFormFieldConfig.json +109 -0
- package/src/accessible-components/steps/step-fields.html +38 -0
- package/src/accessible-components/steps/steps.html +168 -0
- package/src/accessible-components/tcpa/_tcpa.scss +49 -0
- package/src/accessible-components/tcpa/tcpa.html +9 -0
- package/src/accessible-components/tile/_tile.scss +117 -0
- package/src/accessible-components/tile/tile.html +14 -0
- package/src/accessible-components/value-props/_value-props.scss +102 -0
- package/src/accessible-components/value-props/value-props.html +17 -0
- package/src/accessible-components/zip-control/_zip-control.scss +79 -0
- package/src/accessible-components/zip-control/zip-control.html +10 -0
- package/src/resources/data/tcpa.json +4 -0
- package/src/resources/templates/modals/about/index.hbs +9 -0
- package/src/resources/templates/modals/about/index.html +9 -0
- package/src/resources/templates/modals/contact-us/index.hbs +348 -0
- package/src/resources/templates/modals/contact-us/index.html +348 -0
- package/src/resources/templates/modals/faq/index.hbs +9 -0
- package/src/resources/templates/modals/faq/index.html +9 -0
- package/src/resources/templates/modals/privacy/index.hbs +236 -0
- package/src/resources/templates/modals/privacy/index.html +236 -0
- package/src/resources/templates/modals/terms/index.hbs +166 -0
- package/src/resources/templates/modals/terms/index.html +166 -0
- package/src/scripts/retry-axios.js +21 -0
- package/tasks/grab-cdn.js +7 -1
- package/tasks/grab-form-helpers.js +11 -2
- package/tasks/grab-shared-components.js +10 -3
- package/tasks/grab-shared-scripts.js +8 -1
- package/tasks/templates.js +11 -2
|
@@ -4,9 +4,13 @@ import { createWriteStream } from 'node:fs';
|
|
|
4
4
|
import * as stream from 'node:stream';
|
|
5
5
|
import { promisify } from 'node:util';
|
|
6
6
|
import fs from 'node:fs';
|
|
7
|
+
import { responseInterceptor } from '../src/scripts/retry-axios.js';
|
|
7
8
|
|
|
8
9
|
const resourcePath = 'quote/resources/mod-site';
|
|
9
10
|
|
|
11
|
+
const axiosInstance = axios.create();
|
|
12
|
+
responseInterceptor(axiosInstance);
|
|
13
|
+
|
|
10
14
|
const streamSharedCompsToDestination = (defaultSettings, folder, fileName) => {
|
|
11
15
|
const finished = promisify(stream.finished);
|
|
12
16
|
|
|
@@ -52,9 +56,9 @@ const getListOfSharedComponents = (defaultSettings, componentFolders) => {
|
|
|
52
56
|
if (fs.existsSync(`${folderPath}/`)) {
|
|
53
57
|
return;
|
|
54
58
|
}
|
|
55
|
-
|
|
59
|
+
|
|
56
60
|
return new Promise(resolve => {
|
|
57
|
-
|
|
61
|
+
axiosInstance.get(`https://${defaultSettings.nodeEnv}/${resourcePath}/${folder}/all.json`)
|
|
58
62
|
.then(resp => {
|
|
59
63
|
if (resp.status !== 200) {
|
|
60
64
|
throw new Error(`${resp.status}: Error while fetching ${folder}/all.json`);
|
|
@@ -63,12 +67,15 @@ const getListOfSharedComponents = (defaultSettings, componentFolders) => {
|
|
|
63
67
|
const componentPromises = listOfComponents.map(resource => {
|
|
64
68
|
return streamSharedCompsToDestination(defaultSettings, folder, `${resource}`);
|
|
65
69
|
});
|
|
66
|
-
|
|
70
|
+
|
|
67
71
|
resolve(Promise.all(componentPromises));
|
|
68
72
|
})
|
|
69
73
|
.catch(err => {
|
|
70
74
|
console.log(defaultSettings.nodeEnv);
|
|
71
75
|
throw new Error(`Error while fetching ${folder}/all.json: ${err.message}`);
|
|
76
|
+
})
|
|
77
|
+
.finally(() => {
|
|
78
|
+
axiosInstance.interceptors.response.eject(responseInterceptor);
|
|
72
79
|
});
|
|
73
80
|
});
|
|
74
81
|
});
|
|
@@ -9,6 +9,7 @@ import tap from 'gulp-tap';
|
|
|
9
9
|
import hash from 'gulp-hash';
|
|
10
10
|
import replace from 'gulp-replace';
|
|
11
11
|
import { getFileFromURL } from '../src/scripts/utils.js';
|
|
12
|
+
import { responseInterceptor } from '../src/scripts/retry-axios.js';
|
|
12
13
|
|
|
13
14
|
let fileNames = {};
|
|
14
15
|
let componentFolderPath = '';
|
|
@@ -16,6 +17,9 @@ let replacementFunctions = [];
|
|
|
16
17
|
|
|
17
18
|
let pathSubdirectory = '';
|
|
18
19
|
|
|
20
|
+
const axiosInstance = axios.create();
|
|
21
|
+
responseInterceptor(axiosInstance);
|
|
22
|
+
|
|
19
23
|
function replaceModalyticsSrc(gulp, defaultSettings) {
|
|
20
24
|
const resourcePath = '/resources/scripts/mod-alytics/';
|
|
21
25
|
return new Promise((resolve) => {
|
|
@@ -181,7 +185,7 @@ function getResource(task, fileNames, resourcePath = 'quote/resources') {
|
|
|
181
185
|
method: 'get',
|
|
182
186
|
responseType: 'stream'
|
|
183
187
|
}
|
|
184
|
-
|
|
188
|
+
axiosInstance(options).then(resp => {
|
|
185
189
|
if (resp.status !== 200) {
|
|
186
190
|
throw new Error(`${resp.status}: Error while fetching ${url}`);
|
|
187
191
|
}
|
|
@@ -227,6 +231,9 @@ function getResource(task, fileNames, resourcePath = 'quote/resources') {
|
|
|
227
231
|
})
|
|
228
232
|
.catch((error) => {
|
|
229
233
|
console.error('Error:', error);
|
|
234
|
+
})
|
|
235
|
+
.finally(() => {
|
|
236
|
+
axiosInstance.interceptors.response.eject(responseInterceptor);
|
|
230
237
|
});
|
|
231
238
|
}
|
|
232
239
|
})
|
package/tasks/templates.js
CHANGED
|
@@ -2,10 +2,15 @@ import axios from 'axios';
|
|
|
2
2
|
import footer from '../src/data/footer.js';
|
|
3
3
|
import fs from 'node:fs';
|
|
4
4
|
import merge from 'lodash.merge';
|
|
5
|
+
import { responseInterceptor } from '../src/scripts/retry-axios.js';
|
|
5
6
|
|
|
6
7
|
import { defaultSettings } from '../src/data/config.js';
|
|
7
8
|
import { getActiveSeasons } from '../src/scripts/utils.js';
|
|
8
9
|
|
|
10
|
+
const axiosInstance = axios.create();
|
|
11
|
+
const tcpaAxiosInstance = axios.create();
|
|
12
|
+
responseInterceptor(axiosInstance);
|
|
13
|
+
responseInterceptor(tcpaAxiosInstance);
|
|
9
14
|
|
|
10
15
|
function mergeDefaultFormFieldConfig(defaultConfig, config) {
|
|
11
16
|
const { steps } = config;
|
|
@@ -46,7 +51,7 @@ const getDefaultFormFieldConfig = async (config, folder = 'accessible-components
|
|
|
46
51
|
console.log('Starting fetch-default-form-config: ');
|
|
47
52
|
|
|
48
53
|
await new Promise((resolve) => {
|
|
49
|
-
|
|
54
|
+
axiosInstance.get(`https://${defaultSettings.nodeEnv}/quote/resources/mod-site/${folder}/steps/defaultFormFieldConfig.json`)
|
|
50
55
|
.then(async resp => {
|
|
51
56
|
if (resp.status !== 200) {
|
|
52
57
|
throw new Error(`${resp.status}: Error while fetching ${folder}/defaultFormFieldConfig.json`);
|
|
@@ -59,6 +64,8 @@ const getDefaultFormFieldConfig = async (config, folder = 'accessible-components
|
|
|
59
64
|
}).catch(error => {
|
|
60
65
|
console.error(error);
|
|
61
66
|
resolve();
|
|
67
|
+
}).finally(() => {
|
|
68
|
+
axiosInstance.interceptors.response.eject(responseInterceptor);
|
|
62
69
|
});
|
|
63
70
|
});
|
|
64
71
|
|
|
@@ -82,7 +89,7 @@ const fetchTcpaFromSitegenie = async (config, tempConfig) => {
|
|
|
82
89
|
|
|
83
90
|
console.log('Starting fetch-tcpa-from-sitegenie: ', url);
|
|
84
91
|
return new Promise((resolve) => {
|
|
85
|
-
|
|
92
|
+
tcpaAxiosInstance(options)
|
|
86
93
|
.then(async resp => {
|
|
87
94
|
if (resp.status !== 200) {
|
|
88
95
|
throw new Error(`${resp.status}: Error while fetching TCPA`);
|
|
@@ -107,6 +114,8 @@ const fetchTcpaFromSitegenie = async (config, tempConfig) => {
|
|
|
107
114
|
let defaultTcpa = JSON.parse(fs.readFileSync('src/resources/data/tcpa.json', 'utf8'));
|
|
108
115
|
tempConfig.tcpaText = defaultTcpa.tcpaText;
|
|
109
116
|
resolve(error);
|
|
117
|
+
}).finally(() => {
|
|
118
|
+
tcpaAxiosInstance.interceptors.response.eject(responseInterceptor);
|
|
110
119
|
});
|
|
111
120
|
});
|
|
112
121
|
};
|