mod-build 4.0.85 → 4.0.86
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 +7 -4
- package/package.json +2 -2
- package/src/scripts/retry-axios.js +3 -1
- package/tasks/grab-b2b-data.js +2 -2
- package/tasks/grab-cdn.js +2 -2
- package/tasks/grab-form-helpers.js +4 -4
- package/tasks/grab-jsdoc.js +5 -5
- package/tasks/grab-shared-components.js +2 -2
- package/tasks/grab-shared-scripts.js +2 -2
- package/tasks/templates.js +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.86
|
|
4
|
+
|
|
5
|
+
- Passing interceptor id instead of callback to axios `eject`.
|
|
6
|
+
|
|
3
7
|
## 4.0.85
|
|
4
8
|
|
|
5
9
|
- Updated regex in 'replace-img-src-with-data-src' task to only swap `src` with `data-src` if 'loading' is present in the class list.
|
|
@@ -133,7 +137,7 @@
|
|
|
133
137
|
|
|
134
138
|
## 4.0.52
|
|
135
139
|
|
|
136
|
-
- Replacing spaces with '_' in primary trade value in default trade questions.
|
|
140
|
+
- Replacing spaces with '\_' in primary trade value in default trade questions.
|
|
137
141
|
- Fixed bug in the seasonal updates task.
|
|
138
142
|
|
|
139
143
|
## 4.0.51
|
|
@@ -186,13 +190,12 @@
|
|
|
186
190
|
|
|
187
191
|
## 4.0.39
|
|
188
192
|
|
|
189
|
-
- Added the E-Sign Consent modal to be grabbed as part of the
|
|
193
|
+
- Added the E-Sign Consent modal to be grabbed as part of the `grab-cdn` task.
|
|
190
194
|
|
|
191
195
|
## 4.0.37
|
|
192
196
|
|
|
193
197
|
- Updated `getConsentCaptureLanguage` to include the `profileId` version of the display name API.
|
|
194
|
-
|
|
195
|
-
|
|
198
|
+
_Currently being used for Best Company branded form pages._
|
|
196
199
|
## 4.0.36
|
|
197
200
|
|
|
198
201
|
- Included an option for `service` to be appended to the `brandedIncludeServiceConsentCapture` for consent capture.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const responseInterceptor = (instance) => {
|
|
2
2
|
let retryCount = 0;
|
|
3
3
|
|
|
4
|
-
instance.interceptors.response.use(
|
|
4
|
+
const interceptorId = instance.interceptors.response.use(
|
|
5
5
|
(response) => {
|
|
6
6
|
return response;
|
|
7
7
|
},
|
|
@@ -18,4 +18,6 @@ export const responseInterceptor = (instance) => {
|
|
|
18
18
|
return Promise.reject(error);
|
|
19
19
|
}
|
|
20
20
|
);
|
|
21
|
+
|
|
22
|
+
return interceptorId;
|
|
21
23
|
};
|
package/tasks/grab-b2b-data.js
CHANGED
|
@@ -7,7 +7,7 @@ import fs from 'node:fs';
|
|
|
7
7
|
import { responseInterceptor } from '../src/scripts/retry-axios.js';
|
|
8
8
|
|
|
9
9
|
const axiosInstance = axios.create();
|
|
10
|
-
responseInterceptor(axiosInstance);
|
|
10
|
+
const axiosResponseInterceptor = responseInterceptor(axiosInstance);
|
|
11
11
|
|
|
12
12
|
function streamToDestination(inputPath, destPath, fileName) {
|
|
13
13
|
const finished = promisify(stream.finished);
|
|
@@ -54,7 +54,7 @@ function streamToDestination(inputPath, destPath, fileName) {
|
|
|
54
54
|
console.error(`Error fetching ${url}:`, error.message);
|
|
55
55
|
process.exit(1);
|
|
56
56
|
}).finally(() => {
|
|
57
|
-
axiosInstance.interceptors.response.eject(
|
|
57
|
+
axiosInstance.interceptors.response.eject(axiosResponseInterceptor);
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
60
|
}
|
package/tasks/grab-cdn.js
CHANGED
|
@@ -8,7 +8,7 @@ import path from 'node:path';
|
|
|
8
8
|
import { responseInterceptor } from '../src/scripts/retry-axios.js';
|
|
9
9
|
|
|
10
10
|
const axiosInstance = axios.create();
|
|
11
|
-
responseInterceptor(axiosInstance);
|
|
11
|
+
const axiosResponseInterceptor = responseInterceptor(axiosInstance);
|
|
12
12
|
|
|
13
13
|
async function duplicateHtmlFilestoHbs(externalResources) {
|
|
14
14
|
for (const inputPath in externalResources) {
|
|
@@ -61,7 +61,7 @@ function streamToDestination(inputPath, destPath, fileName) {
|
|
|
61
61
|
console.error(error);
|
|
62
62
|
process.exit(1);
|
|
63
63
|
}).finally(() => {
|
|
64
|
-
axiosInstance.interceptors.response.eject(
|
|
64
|
+
axiosInstance.interceptors.response.eject(axiosResponseInterceptor);
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
});
|
|
@@ -9,8 +9,8 @@ import { responseInterceptor } from '../src/scripts/retry-axios.js';
|
|
|
9
9
|
const resourcePath = 'quote/resources/mod-form/form';
|
|
10
10
|
const axiosInstance = axios.create();
|
|
11
11
|
const helpersAxiosInstance = axios.create();
|
|
12
|
-
responseInterceptor(axiosInstance);
|
|
13
|
-
responseInterceptor(helpersAxiosInstance);
|
|
12
|
+
const axiosResponseInterceptor = responseInterceptor(axiosInstance);
|
|
13
|
+
const helpersAxiosResponseInterceptor = responseInterceptor(helpersAxiosInstance);
|
|
14
14
|
|
|
15
15
|
// helper to allow us to define an "end" event to multiple streams
|
|
16
16
|
const streamToDestination = (destPath, fileName) => {
|
|
@@ -52,7 +52,7 @@ const streamToDestination = (destPath, fileName) => {
|
|
|
52
52
|
console.error(error);
|
|
53
53
|
process.exit(1);
|
|
54
54
|
}).finally(() => {
|
|
55
|
-
axiosInstance.interceptors.response.eject(
|
|
55
|
+
axiosInstance.interceptors.response.eject(axiosResponseInterceptor);
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
});
|
|
@@ -78,7 +78,7 @@ async function getHelpers() {
|
|
|
78
78
|
console.error(error);
|
|
79
79
|
resolve();
|
|
80
80
|
}).finally(() => {
|
|
81
|
-
helpersAxiosInstance.interceptors.response.eject(
|
|
81
|
+
helpersAxiosInstance.interceptors.response.eject(helpersAxiosResponseInterceptor);
|
|
82
82
|
});
|
|
83
83
|
});
|
|
84
84
|
|
package/tasks/grab-jsdoc.js
CHANGED
|
@@ -10,8 +10,8 @@ import addFilesToGitignore from './add-files-to-gitignore.js';
|
|
|
10
10
|
const resourcePath = 'quote/resources/mod-form';
|
|
11
11
|
const axiosInstance = axios.create();
|
|
12
12
|
const jsdocAxiosInstance = axios.create();
|
|
13
|
-
responseInterceptor(axiosInstance);
|
|
14
|
-
responseInterceptor(jsdocAxiosInstance);
|
|
13
|
+
const axiosResponseInterceptor = responseInterceptor(axiosInstance);
|
|
14
|
+
const jsdocResponseInterceptor = responseInterceptor(jsdocAxiosInstance);
|
|
15
15
|
|
|
16
16
|
// Helper to stream a JSDoc file to the destination directory
|
|
17
17
|
const streamToDestination = async (filePath) => {
|
|
@@ -59,7 +59,7 @@ const streamToDestination = async (filePath) => {
|
|
|
59
59
|
console.error(error);
|
|
60
60
|
process.exit(1);
|
|
61
61
|
} finally {
|
|
62
|
-
axiosInstance.interceptors.response.eject(
|
|
62
|
+
axiosInstance.interceptors.response.eject(axiosResponseInterceptor);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -88,7 +88,7 @@ async function getJSDocFiles() {
|
|
|
88
88
|
console.error(error);
|
|
89
89
|
throw error;
|
|
90
90
|
} finally {
|
|
91
|
-
jsdocAxiosInstance.interceptors.response.eject(
|
|
91
|
+
jsdocAxiosInstance.interceptors.response.eject(jsdocResponseInterceptor);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -106,7 +106,7 @@ export default async function grabJSDoc() {
|
|
|
106
106
|
const files = await getJSDocFiles();
|
|
107
107
|
const filesPromiseMap = files.map(filePath => streamToDestination(filePath));
|
|
108
108
|
await Promise.all(filesPromiseMap);
|
|
109
|
-
|
|
109
|
+
|
|
110
110
|
const gitignoreFiles = [
|
|
111
111
|
'jsdoc-types/',
|
|
112
112
|
'modform.jsdoc.js'
|
|
@@ -9,7 +9,7 @@ import { responseInterceptor } from '../src/scripts/retry-axios.js';
|
|
|
9
9
|
const resourcePath = 'quote/resources/mod-site';
|
|
10
10
|
|
|
11
11
|
const axiosInstance = axios.create();
|
|
12
|
-
responseInterceptor(axiosInstance);
|
|
12
|
+
const axiosResponseInterceptor = responseInterceptor(axiosInstance);
|
|
13
13
|
|
|
14
14
|
const streamSharedCompsToDestination = (defaultSettings, folder, fileName) => {
|
|
15
15
|
const finished = promisify(stream.finished);
|
|
@@ -75,7 +75,7 @@ const getListOfSharedComponents = (defaultSettings, componentFolders) => {
|
|
|
75
75
|
throw new Error(`Error while fetching ${folder}/all.json: ${err.message}`);
|
|
76
76
|
})
|
|
77
77
|
.finally(() => {
|
|
78
|
-
axiosInstance.interceptors.response.eject(
|
|
78
|
+
axiosInstance.interceptors.response.eject(axiosResponseInterceptor);
|
|
79
79
|
});
|
|
80
80
|
});
|
|
81
81
|
});
|
|
@@ -19,7 +19,7 @@ let pathSubdirectory = '';
|
|
|
19
19
|
let useAccessibleComponents = false;
|
|
20
20
|
|
|
21
21
|
const axiosInstance = axios.create();
|
|
22
|
-
responseInterceptor(axiosInstance);
|
|
22
|
+
const axiosResponseInterceptor = responseInterceptor(axiosInstance);
|
|
23
23
|
|
|
24
24
|
function replaceHeadScripts(gulp, defaultSettings) {
|
|
25
25
|
const resourcePath = '/resources/scripts';
|
|
@@ -301,7 +301,7 @@ function getResource(task, fileNames, resourcePath = 'quote/resources') {
|
|
|
301
301
|
console.error('Error:', error);
|
|
302
302
|
})
|
|
303
303
|
.finally(() => {
|
|
304
|
-
axiosInstance.interceptors.response.eject(
|
|
304
|
+
axiosInstance.interceptors.response.eject(axiosResponseInterceptor);
|
|
305
305
|
});
|
|
306
306
|
}
|
|
307
307
|
})
|
package/tasks/templates.js
CHANGED
|
@@ -13,9 +13,9 @@ import addSeasonalchanges from './addSeasonalchanges.js';
|
|
|
13
13
|
const axiosInstance = axios.create();
|
|
14
14
|
const tcpaAxiosInstance = axios.create();
|
|
15
15
|
const consentCaptureAxiosInstance = axios.create();
|
|
16
|
-
responseInterceptor(axiosInstance);
|
|
17
|
-
responseInterceptor(tcpaAxiosInstance);
|
|
18
|
-
responseInterceptor(consentCaptureAxiosInstance);
|
|
16
|
+
const axiosResponseInterceptor = responseInterceptor(axiosInstance);
|
|
17
|
+
const tcpaAxiosResponseInterceptor = responseInterceptor(tcpaAxiosInstance);
|
|
18
|
+
const consentCaptureAxiosResponseInterceptor = responseInterceptor(consentCaptureAxiosInstance);
|
|
19
19
|
|
|
20
20
|
async function mergeDefaultFormFieldConfigOnSteps(defaultConfig, data, parentConfig) {
|
|
21
21
|
if (!data || typeof data !== 'object') {
|
|
@@ -87,7 +87,7 @@ const getDefaultFormFieldConfig = async (config, folder = 'accessible-components
|
|
|
87
87
|
console.error(error);
|
|
88
88
|
process.exit(1);
|
|
89
89
|
}).finally(() => {
|
|
90
|
-
axiosInstance.interceptors.response.eject(
|
|
90
|
+
axiosInstance.interceptors.response.eject(axiosResponseInterceptor);
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
93
|
};
|
|
@@ -163,7 +163,7 @@ const fetchTcpaFromSitegenie = async (config, tempConfig, pathSubdirectory) => {
|
|
|
163
163
|
tempConfig.tcpaText = defaultTcpa.tcpaText;
|
|
164
164
|
resolve(error);
|
|
165
165
|
}).finally(() => {
|
|
166
|
-
tcpaAxiosInstance.interceptors.response.eject(
|
|
166
|
+
tcpaAxiosInstance.interceptors.response.eject(tcpaAxiosResponseInterceptor);
|
|
167
167
|
});
|
|
168
168
|
});
|
|
169
169
|
};
|
|
@@ -264,7 +264,7 @@ const getConsentCaptureLanguage = async function(config, tempConfig) {
|
|
|
264
264
|
console.error(error);
|
|
265
265
|
process.exit(1);
|
|
266
266
|
}).finally(() => {
|
|
267
|
-
consentCaptureAxiosInstance.interceptors.response.eject(
|
|
267
|
+
consentCaptureAxiosInstance.interceptors.response.eject(consentCaptureAxiosResponseInterceptor);
|
|
268
268
|
});
|
|
269
269
|
});
|
|
270
270
|
};
|