mod-build 3.6.99 → 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 +8 -0
- package/gulp-tasks/js-lint.js +2 -2
- package/gulp-tasks/templates.js +17 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
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
|
+
|
|
7
|
+
## 3.6.100
|
|
8
|
+
|
|
9
|
+
- JSLint failure is back! *(needed a brief pause while implementing modernize consent)*
|
|
10
|
+
|
|
3
11
|
## 3.6.99
|
|
4
12
|
|
|
5
13
|
- Updating final TCPA text from `fetchTcpaFromSitegenie()` with the Modernize consent checkbox + Privacy & Terms of Use modal links.
|
package/gulp-tasks/js-lint.js
CHANGED
|
@@ -20,7 +20,7 @@ module.exports = function(gulp, _gulpPlugins, siteSettings) {
|
|
|
20
20
|
])
|
|
21
21
|
.pipe(gulpESLintNew(siteSettings.jsLint))
|
|
22
22
|
.pipe(gulpESLintNew.format())
|
|
23
|
-
.pipe(gulpESLintNew.format('junit', fs.createWriteStream('eslint-results.xml')))
|
|
24
|
-
|
|
23
|
+
.pipe(gulpESLintNew.format('junit', fs.createWriteStream('eslint-results.xml')))
|
|
24
|
+
.pipe(gulpESLintNew.failAfterError());
|
|
25
25
|
};
|
|
26
26
|
};
|
package/gulp-tasks/templates.js
CHANGED
|
@@ -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) {
|