@appdirect/sfb-toolkit 4.0.11 → 4.0.13
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/bin/index.js +11 -0
- package/coverage/clover.xml +16 -3
- package/coverage/coverage-final.json +2 -1
- package/coverage/lcov-report/constants/customUserAttributesMock.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/pageUrls.js.html +1 -1
- package/coverage/lcov-report/constants/userMock.js.html +1 -1
- package/coverage/lcov-report/controllers/controllers-utils/assetsUtils.js.html +1 -1
- package/coverage/lcov-report/controllers/controllers-utils/index.html +1 -1
- package/coverage/lcov-report/controllers/data-filters/bootstrap-data-filter.js.html +1 -1
- package/coverage/lcov-report/controllers/data-filters/call-to-actions-filter.js.html +1 -1
- package/coverage/lcov-report/controllers/data-filters/index.html +1 -1
- package/coverage/lcov-report/controllers/index.html +1 -1
- package/coverage/lcov-report/controllers/index.js.html +2 -2
- package/coverage/lcov-report/front-end-utils/src/components/base/ResultItem.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/components/base/SearchBar.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/components/base/index.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/components/base/item.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/components/container.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/components/data-view.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/components/header-view.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/components/index.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/components/search.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/constants/index.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/constants/pageUrl.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/constants/roleType.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/constants/searchType.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/utils/debounce.js.html +1 -1
- package/coverage/lcov-report/front-end-utils/src/utils/index.html +1 -1
- package/coverage/lcov-report/index.html +24 -9
- package/coverage/lcov-report/middlewares/config.js.html +1 -1
- package/coverage/lcov-report/middlewares/index.html +1 -1
- package/coverage/lcov-report/tools/index.html +116 -0
- package/coverage/lcov-report/tools/proxy-fetch.js.html +133 -0
- package/coverage/lcov.info +21 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/readme.md +15 -0
- package/src/controllers/index.js +1 -1
- package/src/tools/prompt-questions.js +15 -2
- package/src/tools/proxy-fetch.js +1 -1
- package/src/tools/toolkit-common-fun.js +4 -233
- package/src/tools/toolkit-components-fun.js +259 -0
- package/src/tools/toolkit-components-info.js +24 -0
- package/src/tools/toolkit-components.js +4 -4
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
147
147
|
Code coverage generated by
|
|
148
148
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
149
|
-
at 2023-10-
|
|
149
|
+
at 2023-10-06T15:54:07.139Z
|
|
150
150
|
</div>
|
|
151
151
|
<script src="../../../prettify.js"></script>
|
|
152
152
|
<script>
|
|
@@ -967,7 +967,7 @@ export default class SearchTool extends React.Component {
|
|
|
967
967
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
968
968
|
Code coverage generated by
|
|
969
969
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
970
|
-
at 2023-10-
|
|
970
|
+
at 2023-10-06T15:54:07.139Z
|
|
971
971
|
</div>
|
|
972
972
|
<script src="../../../prettify.js"></script>
|
|
973
973
|
<script>
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
132
132
|
Code coverage generated by
|
|
133
133
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
134
|
-
at 2023-10-
|
|
134
|
+
at 2023-10-06T15:54:07.139Z
|
|
135
135
|
</div>
|
|
136
136
|
<script src="../../../prettify.js"></script>
|
|
137
137
|
<script>
|
|
@@ -76,7 +76,7 @@ export const MOCK_ADMIN_PAGE_URL = `${BASE_URL}/admin`;</pre></td></tr></table><
|
|
|
76
76
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
77
77
|
Code coverage generated by
|
|
78
78
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
79
|
-
at 2023-10-
|
|
79
|
+
at 2023-10-06T15:54:07.139Z
|
|
80
80
|
</div>
|
|
81
81
|
<script src="../../../prettify.js"></script>
|
|
82
82
|
<script>
|
|
@@ -82,7 +82,7 @@ export const NO_ROLE = "NO_ROLE";
|
|
|
82
82
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
83
83
|
Code coverage generated by
|
|
84
84
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
85
|
-
at 2023-10-
|
|
85
|
+
at 2023-10-06T15:54:07.139Z
|
|
86
86
|
</div>
|
|
87
87
|
<script src="../../../prettify.js"></script>
|
|
88
88
|
<script>
|
|
@@ -154,7 +154,7 @@ export const SEARCH_TYPES = [
|
|
|
154
154
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
155
155
|
Code coverage generated by
|
|
156
156
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
157
|
-
at 2023-10-
|
|
157
|
+
at 2023-10-06T15:54:07.139Z
|
|
158
158
|
</div>
|
|
159
159
|
<script src="../../../prettify.js"></script>
|
|
160
160
|
<script>
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
107
107
|
Code coverage generated by
|
|
108
108
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
109
|
-
at 2023-10-
|
|
109
|
+
at 2023-10-06T15:54:07.139Z
|
|
110
110
|
</div>
|
|
111
111
|
<script src="../../../prettify.js"></script>
|
|
112
112
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2023-10-
|
|
104
|
+
at 2023-10-06T15:54:07.139Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">84.
|
|
26
|
+
<span class="strong">84.98% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>430/506</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">71.
|
|
33
|
+
<span class="strong">71.13% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>175/246</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">81.
|
|
40
|
+
<span class="strong">81.95% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>109/133</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">85.
|
|
47
|
+
<span class="strong">85.14% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>424/498</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -213,6 +213,21 @@
|
|
|
213
213
|
<td data-value="18" class="abs high">18/18</td>
|
|
214
214
|
</tr>
|
|
215
215
|
|
|
216
|
+
<tr>
|
|
217
|
+
<td class="file high" data-value="tools"><a href="tools/index.html">tools</a></td>
|
|
218
|
+
<td data-value="85.71" class="pic high">
|
|
219
|
+
<div class="chart"><div class="cover-fill" style="width: 85%"></div><div class="cover-empty" style="width: 15%"></div></div>
|
|
220
|
+
</td>
|
|
221
|
+
<td data-value="85.71" class="pct high">85.71%</td>
|
|
222
|
+
<td data-value="7" class="abs high">6/7</td>
|
|
223
|
+
<td data-value="33.33" class="pct low">33.33%</td>
|
|
224
|
+
<td data-value="3" class="abs low">1/3</td>
|
|
225
|
+
<td data-value="100" class="pct high">100%</td>
|
|
226
|
+
<td data-value="1" class="abs high">1/1</td>
|
|
227
|
+
<td data-value="85.71" class="pct high">85.71%</td>
|
|
228
|
+
<td data-value="7" class="abs high">6/7</td>
|
|
229
|
+
</tr>
|
|
230
|
+
|
|
216
231
|
</tbody>
|
|
217
232
|
</table>
|
|
218
233
|
</div>
|
|
@@ -221,7 +236,7 @@
|
|
|
221
236
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
222
237
|
Code coverage generated by
|
|
223
238
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
224
|
-
at 2023-10-
|
|
239
|
+
at 2023-10-06T15:54:07.139Z
|
|
225
240
|
</div>
|
|
226
241
|
<script src="prettify.js"></script>
|
|
227
242
|
<script>
|
|
@@ -178,7 +178,7 @@ module.exports = (req, res, next) => {
|
|
|
178
178
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
179
179
|
Code coverage generated by
|
|
180
180
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
181
|
-
at 2023-10-
|
|
181
|
+
at 2023-10-06T15:54:07.139Z
|
|
182
182
|
</div>
|
|
183
183
|
<script src="../prettify.js"></script>
|
|
184
184
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2023-10-
|
|
104
|
+
at 2023-10-06T15:54:07.139Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for tools</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../index.html">All files</a> tools</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">85.71% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>6/7</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">33.33% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>1/3</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>1/1</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">85.71% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>6/7</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line high'></div>
|
|
65
|
+
<div class="pad1">
|
|
66
|
+
<table class="coverage-summary">
|
|
67
|
+
<thead>
|
|
68
|
+
<tr>
|
|
69
|
+
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
|
70
|
+
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
|
71
|
+
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
|
72
|
+
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
73
|
+
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
|
74
|
+
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
75
|
+
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
|
76
|
+
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
77
|
+
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
|
78
|
+
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
79
|
+
</tr>
|
|
80
|
+
</thead>
|
|
81
|
+
<tbody><tr>
|
|
82
|
+
<td class="file high" data-value="proxy-fetch.js"><a href="proxy-fetch.js.html">proxy-fetch.js</a></td>
|
|
83
|
+
<td data-value="85.71" class="pic high">
|
|
84
|
+
<div class="chart"><div class="cover-fill" style="width: 85%"></div><div class="cover-empty" style="width: 15%"></div></div>
|
|
85
|
+
</td>
|
|
86
|
+
<td data-value="85.71" class="pct high">85.71%</td>
|
|
87
|
+
<td data-value="7" class="abs high">6/7</td>
|
|
88
|
+
<td data-value="33.33" class="pct low">33.33%</td>
|
|
89
|
+
<td data-value="3" class="abs low">1/3</td>
|
|
90
|
+
<td data-value="100" class="pct high">100%</td>
|
|
91
|
+
<td data-value="1" class="abs high">1/1</td>
|
|
92
|
+
<td data-value="85.71" class="pct high">85.71%</td>
|
|
93
|
+
<td data-value="7" class="abs high">6/7</td>
|
|
94
|
+
</tr>
|
|
95
|
+
|
|
96
|
+
</tbody>
|
|
97
|
+
</table>
|
|
98
|
+
</div>
|
|
99
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
100
|
+
</div><!-- /wrapper -->
|
|
101
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
|
+
Code coverage generated by
|
|
103
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
+
at 2023-10-06T15:54:07.139Z
|
|
105
|
+
</div>
|
|
106
|
+
<script src="../prettify.js"></script>
|
|
107
|
+
<script>
|
|
108
|
+
window.onload = function () {
|
|
109
|
+
prettyPrint();
|
|
110
|
+
};
|
|
111
|
+
</script>
|
|
112
|
+
<script src="../sorter.js"></script>
|
|
113
|
+
<script src="../block-navigation.js"></script>
|
|
114
|
+
</body>
|
|
115
|
+
</html>
|
|
116
|
+
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for tools/proxy-fetch.js</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../index.html">All files</a> / <a href="index.html">tools</a> proxy-fetch.js</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">85.71% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>6/7</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">33.33% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>1/3</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>1/1</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">85.71% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>6/7</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line high'></div>
|
|
65
|
+
<pre><table class="coverage">
|
|
66
|
+
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
+
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
+
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
+
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
+
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
+
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
+
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
+
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
+
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
+
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
+
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
+
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
+
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
+
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
+
<a name='L17'></a><a href='#L17'>17</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">2x</span>
|
|
83
|
+
<span class="cline-any cline-yes">2x</span>
|
|
84
|
+
<span class="cline-any cline-neutral"> </span>
|
|
85
|
+
<span class="cline-any cline-neutral"> </span>
|
|
86
|
+
<span class="cline-any cline-neutral"> </span>
|
|
87
|
+
<span class="cline-any cline-yes">1x</span>
|
|
88
|
+
<span class="cline-any cline-neutral"> </span>
|
|
89
|
+
<span class="cline-any cline-neutral"> </span>
|
|
90
|
+
<span class="cline-any cline-yes">1x</span>
|
|
91
|
+
<span class="cline-any cline-no"> </span>
|
|
92
|
+
<span class="cline-any cline-neutral"> </span>
|
|
93
|
+
<span class="cline-any cline-neutral"> </span>
|
|
94
|
+
<span class="cline-any cline-yes">1x</span>
|
|
95
|
+
<span class="cline-any cline-neutral"> </span>
|
|
96
|
+
<span class="cline-any cline-neutral"> </span>
|
|
97
|
+
<span class="cline-any cline-yes">2x</span>
|
|
98
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const fetch = require("node-fetch");
|
|
99
|
+
const { ProxyAgent } = require("proxy-agent");
|
|
100
|
+
|
|
101
|
+
async function fetchProxied(url, fetchOptions = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> {
|
|
102
|
+
// Check if the URL should use a proxy
|
|
103
|
+
const useProxy = process.env.HTTPS_PROXY;
|
|
104
|
+
|
|
105
|
+
// If we should use a proxy, set the agent
|
|
106
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (useProxy) {
|
|
107
|
+
<span class="cstat-no" title="statement not covered" > fetchOptions.agent = new ProxyAgent(process.env.HTTPS_PROXY);</span>
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return fetch(url, fetchOptions);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
module.exports = fetchProxied;
|
|
114
|
+
</pre></td></tr></table></pre>
|
|
115
|
+
|
|
116
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
117
|
+
</div><!-- /wrapper -->
|
|
118
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
119
|
+
Code coverage generated by
|
|
120
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
121
|
+
at 2023-10-06T15:54:07.139Z
|
|
122
|
+
</div>
|
|
123
|
+
<script src="../prettify.js"></script>
|
|
124
|
+
<script>
|
|
125
|
+
window.onload = function () {
|
|
126
|
+
prettyPrint();
|
|
127
|
+
};
|
|
128
|
+
</script>
|
|
129
|
+
<script src="../sorter.js"></script>
|
|
130
|
+
<script src="../block-navigation.js"></script>
|
|
131
|
+
</body>
|
|
132
|
+
</html>
|
|
133
|
+
|
package/coverage/lcov.info
CHANGED
|
@@ -1167,3 +1167,24 @@ BRDA:31,1,1,1
|
|
|
1167
1167
|
BRF:4
|
|
1168
1168
|
BRH:3
|
|
1169
1169
|
end_of_record
|
|
1170
|
+
TN:
|
|
1171
|
+
SF:src/tools/proxy-fetch.js
|
|
1172
|
+
FN:4,fetchProxied
|
|
1173
|
+
FNF:1
|
|
1174
|
+
FNH:1
|
|
1175
|
+
FNDA:1,fetchProxied
|
|
1176
|
+
DA:1,2
|
|
1177
|
+
DA:2,2
|
|
1178
|
+
DA:6,1
|
|
1179
|
+
DA:9,1
|
|
1180
|
+
DA:10,0
|
|
1181
|
+
DA:13,1
|
|
1182
|
+
DA:16,2
|
|
1183
|
+
LF:7
|
|
1184
|
+
LH:6
|
|
1185
|
+
BRDA:4,0,0,0
|
|
1186
|
+
BRDA:9,1,0,0
|
|
1187
|
+
BRDA:9,1,1,1
|
|
1188
|
+
BRF:3
|
|
1189
|
+
BRH:1
|
|
1190
|
+
end_of_record
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appdirect/sfb-toolkit",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.13",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@appdirect/sfb-toolkit",
|
|
9
|
-
"version": "4.0.
|
|
9
|
+
"version": "4.0.13",
|
|
10
10
|
"license": "SEE LICENSE IN https://help.appdirect.com/sfb-eula.pdf",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@appdirect/public-custom-app-ui": "^0.0.17",
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -10,6 +10,21 @@ It can be easily mixed with eg. HTML, CSS, JavaScript, jQuery, SASS.
|
|
|
10
10
|
|
|
11
11
|
### Release Notes:
|
|
12
12
|
|
|
13
|
+
**4.0.13**
|
|
14
|
+
- Added new command `sfb-toolkit components-info`
|
|
15
|
+
- shows which custom components could override our internal UI library (`sfb-theme-components`)
|
|
16
|
+
- Updated warning prompt for `sfb-toolkit install @appdirect/sfb-theme-components`
|
|
17
|
+
- includes the current version of `sfb-theme-components` used
|
|
18
|
+
- indicates which custom components should potentially be tested when updating the `sfb-theme-components` version
|
|
19
|
+
|
|
20
|
+
**4.0.12**
|
|
21
|
+
- Bug fix: fixed proxy issue
|
|
22
|
+
|
|
23
|
+
**4.0.11**
|
|
24
|
+
- Added warning prompt to `sfb-toolkit components` command
|
|
25
|
+
- Added warning prompt to `sfb-toolkit install @appdirect/sfb-theme-components` command
|
|
26
|
+
- Bug fix: fixed node_modules issue
|
|
27
|
+
|
|
13
28
|
**4.0.10**
|
|
14
29
|
- Add Node 18 support
|
|
15
30
|
- Add prompts when enabling custom components and updating sfb-theme-component version
|
package/src/controllers/index.js
CHANGED
|
@@ -5,7 +5,7 @@ const fs = require("fs")
|
|
|
5
5
|
const objectAssignDeep = require("object-assign-deep")
|
|
6
6
|
const storefrontUtils = require("@appdirect/storefront-utils")
|
|
7
7
|
const URI = require("urijs")
|
|
8
|
-
const fetch = require("
|
|
8
|
+
const fetch = require("../tools/proxy-fetch");
|
|
9
9
|
const { merge } = require("lodash")
|
|
10
10
|
|
|
11
11
|
const { callToActionsFilter } = require("./data-filters/call-to-actions-filter")
|
|
@@ -9,6 +9,8 @@ const {
|
|
|
9
9
|
EXTENSION_PROMPT,
|
|
10
10
|
} = require("./toolkit-common-vars");
|
|
11
11
|
|
|
12
|
+
const { getCustomComponentsInfo, getSfbThemeComponentsVersion } = require('./toolkit-components-fun');
|
|
13
|
+
|
|
12
14
|
// small function to check if item has been defined
|
|
13
15
|
const isDefined = (answer) => !!answer;
|
|
14
16
|
|
|
@@ -77,6 +79,16 @@ const isValidMarketplaceURL = async (toTest) => {
|
|
|
77
79
|
|
|
78
80
|
const licenseText = ` In order to use this software, please type 'agree' to accept the license agreement that can be found at https://help.appdirect.com/sfb-eula.pdf`;
|
|
79
81
|
|
|
82
|
+
const customComponentsHints = () => {
|
|
83
|
+
const { overridesJavaScript, overridesSass } = getCustomComponentsInfo();
|
|
84
|
+
return (overridesJavaScript.length || overridesSass.length)
|
|
85
|
+
? '\nSee below a list (none exhaustive) of custom components that should be ' +
|
|
86
|
+
`tested after changing the ${chalk.cyan("@appdirect/sfb-theme-components")} version:` +
|
|
87
|
+
(overridesJavaScript.length ? `\n\nOverrides Components JS:\n ` + chalk.green(overridesJavaScript.join(',\n ')) : '') +
|
|
88
|
+
(overridesSass.length ? `\n\nOverrides Components SCSS:\n ` + chalk.green(overridesSass.join(',\n ')) : '')
|
|
89
|
+
: '';
|
|
90
|
+
}
|
|
91
|
+
|
|
80
92
|
// list of default questions that could be prompt to user
|
|
81
93
|
const QUESTIONS = [
|
|
82
94
|
{
|
|
@@ -110,14 +122,15 @@ const QUESTIONS = [
|
|
|
110
122
|
)} library.` +
|
|
111
123
|
` Please note your current ${chalk.cyan(
|
|
112
124
|
"@appdirect/sfb-theme-components"
|
|
113
|
-
)} version before going forward in the event you need to revert.
|
|
125
|
+
)} version (${chalk.bgRed.yellowBright(getSfbThemeComponentsVersion())}) before going forward in the event you need to revert.
|
|
114
126
|
\u2022 ${chalk.bgRed.yellowBright(
|
|
115
127
|
"Ensure you thoroughly test your theme before deploying this new version."
|
|
116
128
|
)}
|
|
117
129
|
\u2022 Please see our documentation for more information.
|
|
118
130
|
${chalk.cyan(
|
|
119
131
|
"https://developer.appdirect.com/storefront/how-tos/components/storefront-custom-components#update-custom-components-ui-library-sfb-theme-components."
|
|
120
|
-
)}
|
|
132
|
+
)}
|
|
133
|
+
${customComponentsHints()}
|
|
121
134
|
\nDo you wish to proceed? (y/n)`
|
|
122
135
|
),
|
|
123
136
|
},
|
package/src/tools/proxy-fetch.js
CHANGED