@zohodesk/client_build_tool 0.0.1 → 0.0.2
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 +25 -4
- package/ConfigurationDocumentation.md +239 -73
- package/README.md +27 -4
- package/README_backup.md +2 -0
- package/TODO.md +1 -1
- package/coverage/addFilesNamesToManifestJson.js.html +148 -0
- package/coverage/bundler/webpack/custom_plugins/AddManifestJson/addFilesNamesToManifestJson.js.html +148 -0
- package/coverage/bundler/webpack/custom_plugins/AddManifestJson/createInitialEntries.js.html +136 -0
- package/coverage/bundler/webpack/custom_plugins/AddManifestJson/createManifestJson.js.html +181 -0
- package/coverage/bundler/webpack/custom_plugins/AddManifestJson/findInitialFileNames.js.html +133 -0
- package/coverage/bundler/webpack/custom_plugins/AddManifestJson/index.html +146 -0
- package/coverage/bundler/webpack/custom_plugins/AddManifestJson/index.js.html +199 -0
- package/coverage/bundler/webpack/custom_plugins/AddManifestJson/removeHashFromFileName.js.html +127 -0
- package/coverage/bundler/webpack/custom_plugins/VariableConversionCollector/ErrorHandler.js.html +346 -0
- package/coverage/bundler/webpack/custom_plugins/VariableConversionCollector/index.html +116 -0
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/constants.js.html +94 -0
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/handleIgnores.js.html +259 -0
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/index.html +236 -0
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/index.js.html +442 -0
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/insertBefore.js.html +154 -0
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/isPreviouslyProcessed.js.html +142 -0
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/replaceUtils.js.html +127 -0
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/separateHoveredSelectorAndNormalSelector.js.html +139 -0
- package/coverage/{updateArrayWithDefault.js.html → bundler/webpack/custom_postcss_plugins/HoverActivePlugin/specialCases.js.html} +55 -67
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/typeCheckUtils.js.html +193 -0
- package/coverage/bundler/webpack/custom_postcss_plugins/SelectorReplace.js.html +292 -0
- package/coverage/bundler/webpack/custom_postcss_plugins/ValueReplacer.js.html +223 -0
- package/coverage/bundler/webpack/custom_postcss_plugins/VariableModificationPlugin/index.html +116 -0
- package/coverage/bundler/webpack/custom_postcss_plugins/VariableModificationPlugin/index.js.html +1126 -0
- package/coverage/bundler/webpack/custom_postcss_plugins/index.html +131 -0
- package/coverage/bundler/webpack/loaderConfigs/getSpecificPostCssPlugin.js.html +247 -0
- package/coverage/bundler/webpack/loaderConfigs/index.html +116 -0
- package/coverage/coverage-final.json +3 -1
- package/coverage/coverage-summary.json +4 -2
- package/coverage/createInitialEntries.js.html +136 -0
- package/coverage/dummy.js.html +238 -0
- package/coverage/index.html +51 -21
- package/coverage/index.js.html +169 -0
- package/coverage/isObject.js.html +94 -0
- package/coverage/isValid.js.html +106 -0
- package/coverage/removeHashFromFileName.js.html +127 -0
- package/docs/BabelCustomizations.md +55 -0
- package/lib/commands/build/preProcessor.js +12 -0
- package/lib/commands/buildEs/preProcessor.js +17 -0
- package/lib/commands/buildLib/preProcessor.js +17 -0
- package/lib/commands/pre_process/commandExecutor.js +18 -0
- package/lib/commands/pre_process/config.js +12 -0
- package/lib/commands/start/preProcessor.js +3 -1
- package/lib/schemas/defaultConfigValues.js +65 -29
- package/lib/schemas/defaultConfigValuesOnly.js +20 -1
- package/lib/shared/babel/addDefaultPlugins.js +15 -0
- package/lib/shared/babel/babelWebConfig.js +2 -2
- package/lib/shared/babel/getBabelPlugin.js +37 -0
- package/lib/shared/bundler/webpack/common/nameTemplates.js +31 -8
- package/lib/shared/bundler/webpack/configCustomLoaders.js +1 -1
- package/lib/shared/bundler/webpack/custom_plugins/TPHashMappingPlugin/index.js +1 -1
- package/lib/shared/bundler/webpack/custom_plugins/custom_attribute_plugin/index.js +80 -0
- package/lib/shared/bundler/webpack/getCSSLoaders.js +2 -0
- package/lib/shared/bundler/webpack/loaderConfigs/configsAssetsLoaders.js +1 -53
- package/lib/shared/bundler/webpack/loaders/miniCssFallBackLoader.js +7 -0
- package/lib/shared/bundler/webpack/outputConfig.js +9 -2
- package/lib/shared/bundler/webpack/pluginConfigs/configCustomAttributesPlugin.js +20 -0
- package/lib/shared/bundler/webpack/pluginConfigs/configEnvVariables.js +25 -10
- package/lib/shared/bundler/webpack/pluginConfigs/configTPHashMappingPlugin.js +2 -2
- package/lib/shared/bundler/webpack/pluginConfigs/dummy.js +23 -0
- package/lib/shared/bundler/webpack/plugins.js +3 -1
- package/lib/shared/bundler/webpack/statsConfig.js +11 -2
- package/lib/shared/commands-utils/spawnSyncIO.js +5 -5
- package/lib/shared/pre_process/runPreProcess.js +58 -0
- package/lib/shared/server/mockApiHandler.js +1 -1
- package/npm-shrinkwrap.json +552 -2209
- package/package.json +8 -3
- package/result.json +1 -1
- package/unittest/index.html +33 -35
- package/lib/shared/babel/defaultBabelPlugins.js +0 -26
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for index.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> index.js</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>11/11</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>8/8</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'>3/3</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>11/11</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>
|
|
83
|
+
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
+
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
+
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
+
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
+
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
+
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
+
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
+
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
+
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
+
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
+
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
+
<a name='L29'></a><a href='#L29'>29</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
95
|
+
<span class="cline-any cline-neutral"> </span>
|
|
96
|
+
<span class="cline-any cline-neutral"> </span>
|
|
97
|
+
<span class="cline-any cline-neutral"> </span>
|
|
98
|
+
<span class="cline-any cline-neutral"> </span>
|
|
99
|
+
<span class="cline-any cline-yes">126x</span>
|
|
100
|
+
<span class="cline-any cline-neutral"> </span>
|
|
101
|
+
<span class="cline-any cline-neutral"> </span>
|
|
102
|
+
<span class="cline-any cline-yes">137x</span>
|
|
103
|
+
<span class="cline-any cline-yes">137x</span>
|
|
104
|
+
<span class="cline-any cline-yes">137x</span>
|
|
105
|
+
<span class="cline-any cline-yes">74x</span>
|
|
106
|
+
<span class="cline-any cline-yes">49x</span>
|
|
107
|
+
<span class="cline-any cline-neutral"> </span>
|
|
108
|
+
<span class="cline-any cline-neutral"> </span>
|
|
109
|
+
<span class="cline-any cline-neutral"> </span>
|
|
110
|
+
<span class="cline-any cline-neutral"> </span>
|
|
111
|
+
<span class="cline-any cline-yes">25x</span>
|
|
112
|
+
<span class="cline-any cline-neutral"> </span>
|
|
113
|
+
<span class="cline-any cline-yes">63x</span>
|
|
114
|
+
<span class="cline-any cline-neutral"> </span>
|
|
115
|
+
<span class="cline-any cline-yes">126x</span>
|
|
116
|
+
<span class="cline-any cline-yes">137x</span>
|
|
117
|
+
<span class="cline-any cline-neutral"> </span>
|
|
118
|
+
<span class="cline-any cline-yes">124x</span>
|
|
119
|
+
<span class="cline-any cline-neutral"> </span>
|
|
120
|
+
<span class="cline-any cline-neutral"> </span>
|
|
121
|
+
<span class="cline-any cline-neutral"> </span>
|
|
122
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">
|
|
123
|
+
import { isObject } from './isObject';
|
|
124
|
+
import { isValid } from './isValid';
|
|
125
|
+
|
|
126
|
+
export function applyValuesToSchema(schemas, customOptions, processEnv) {
|
|
127
|
+
const output = {};
|
|
128
|
+
|
|
129
|
+
function decideValue(schema, key, customOptions) {
|
|
130
|
+
const specificSchema = schema[key];
|
|
131
|
+
const correspondingValue = customOptions && customOptions[key];
|
|
132
|
+
if (isObject(specificSchema)) {
|
|
133
|
+
if (typeof specificSchema.cli === 'string') {
|
|
134
|
+
return (
|
|
135
|
+
processEnv[specificSchema.cli] ??
|
|
136
|
+
isValid(correspondingValue, specificSchema.value)
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
return applyValuesToSchema(specificSchema, correspondingValue, processEnv);
|
|
140
|
+
}
|
|
141
|
+
return isValid(correspondingValue, specificSchema);
|
|
142
|
+
}
|
|
143
|
+
Object.keys(schemas).forEach(key => {
|
|
144
|
+
output[key] = decideValue(schemas, key, customOptions);
|
|
145
|
+
});
|
|
146
|
+
return output;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
</pre></td></tr></table></pre>
|
|
151
|
+
|
|
152
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
153
|
+
</div><!-- /wrapper -->
|
|
154
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
155
|
+
Code coverage generated by
|
|
156
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
157
|
+
at 2023-06-05T06:40:45.702Z
|
|
158
|
+
</div>
|
|
159
|
+
<script src="prettify.js"></script>
|
|
160
|
+
<script>
|
|
161
|
+
window.onload = function () {
|
|
162
|
+
prettyPrint();
|
|
163
|
+
};
|
|
164
|
+
</script>
|
|
165
|
+
<script src="sorter.js"></script>
|
|
166
|
+
<script src="block-navigation.js"></script>
|
|
167
|
+
</body>
|
|
168
|
+
</html>
|
|
169
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for isObject.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> isObject.js</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>1/1</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>3/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">100% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>1/1</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></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
70
|
+
<span class="cline-any cline-yes">137x</span>
|
|
71
|
+
<span class="cline-any cline-neutral"> </span>
|
|
72
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">export function isObject(obj) {
|
|
73
|
+
return obj !== null && typeof obj === 'object' && !Array.isArray(obj);
|
|
74
|
+
}
|
|
75
|
+
</pre></td></tr></table></pre>
|
|
76
|
+
|
|
77
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
78
|
+
</div><!-- /wrapper -->
|
|
79
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
80
|
+
Code coverage generated by
|
|
81
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
82
|
+
at 2023-06-05T06:40:45.702Z
|
|
83
|
+
</div>
|
|
84
|
+
<script src="prettify.js"></script>
|
|
85
|
+
<script>
|
|
86
|
+
window.onload = function () {
|
|
87
|
+
prettyPrint();
|
|
88
|
+
};
|
|
89
|
+
</script>
|
|
90
|
+
<script src="sorter.js"></script>
|
|
91
|
+
<script src="block-navigation.js"></script>
|
|
92
|
+
</body>
|
|
93
|
+
</html>
|
|
94
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for isValid.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> isValid.js</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>1/1</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>6/6</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">100% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>1/1</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></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
74
|
+
<span class="cline-any cline-yes">81x</span>
|
|
75
|
+
<span class="cline-any cline-neutral"> </span>
|
|
76
|
+
<span class="cline-any cline-neutral"> </span>
|
|
77
|
+
<span class="cline-any cline-neutral"> </span>
|
|
78
|
+
<span class="cline-any cline-neutral"> </span>
|
|
79
|
+
<span class="cline-any cline-neutral"> </span>
|
|
80
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">export function isValid(correspondingValue, specificSchema) {
|
|
81
|
+
return (
|
|
82
|
+
(isNaN(correspondingValue) && typeof correspondingValue === 'number'
|
|
83
|
+
? specificSchema
|
|
84
|
+
: correspondingValue) ?? specificSchema
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
</pre></td></tr></table></pre>
|
|
88
|
+
|
|
89
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
90
|
+
</div><!-- /wrapper -->
|
|
91
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
92
|
+
Code coverage generated by
|
|
93
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
94
|
+
at 2023-06-05T06:40:45.702Z
|
|
95
|
+
</div>
|
|
96
|
+
<script src="prettify.js"></script>
|
|
97
|
+
<script>
|
|
98
|
+
window.onload = function () {
|
|
99
|
+
prettyPrint();
|
|
100
|
+
};
|
|
101
|
+
</script>
|
|
102
|
+
<script src="sorter.js"></script>
|
|
103
|
+
<script src="block-navigation.js"></script>
|
|
104
|
+
</body>
|
|
105
|
+
</html>
|
|
106
|
+
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for removeHashFromFileName.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> removeHashFromFileName.js</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>7/7</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>4/4</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'>2/2</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>7/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></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
81
|
+
<span class="cline-any cline-neutral"> </span>
|
|
82
|
+
<span class="cline-any cline-neutral"> </span>
|
|
83
|
+
<span class="cline-any cline-yes">37x</span>
|
|
84
|
+
<span class="cline-any cline-neutral"> </span>
|
|
85
|
+
<span class="cline-any cline-yes">37x</span>
|
|
86
|
+
<span class="cline-any cline-yes">137x</span>
|
|
87
|
+
<span class="cline-any cline-yes">37x</span>
|
|
88
|
+
<span class="cline-any cline-yes">100x</span>
|
|
89
|
+
<span class="cline-any cline-yes">63x</span>
|
|
90
|
+
<span class="cline-any cline-neutral"> </span>
|
|
91
|
+
<span class="cline-any cline-neutral"> </span>
|
|
92
|
+
<span class="cline-any cline-neutral"> </span>
|
|
93
|
+
<span class="cline-any cline-yes">37x</span>
|
|
94
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">
|
|
95
|
+
|
|
96
|
+
export function removeHashFromFileName(fileName, hashDigestLength) {
|
|
97
|
+
let outputFileName = '';
|
|
98
|
+
|
|
99
|
+
fileName.split('.').forEach(iterateValue => {
|
|
100
|
+
if (outputFileName === '') {
|
|
101
|
+
outputFileName += iterateValue;
|
|
102
|
+
} else if (iterateValue.length < hashDigestLength) {
|
|
103
|
+
outputFileName += `.${iterateValue}`;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
return outputFileName;
|
|
108
|
+
}</pre></td></tr></table></pre>
|
|
109
|
+
|
|
110
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
111
|
+
</div><!-- /wrapper -->
|
|
112
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
113
|
+
Code coverage generated by
|
|
114
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
115
|
+
at 2023-06-01T11:14:08.700Z
|
|
116
|
+
</div>
|
|
117
|
+
<script src="prettify.js"></script>
|
|
118
|
+
<script>
|
|
119
|
+
window.onload = function () {
|
|
120
|
+
prettyPrint();
|
|
121
|
+
};
|
|
122
|
+
</script>
|
|
123
|
+
<script src="sorter.js"></script>
|
|
124
|
+
<script src="block-navigation.js"></script>
|
|
125
|
+
</body>
|
|
126
|
+
</html>
|
|
127
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
## Babel Customizations Configuration Documentation
|
|
2
|
+
|
|
3
|
+
The `babelCustomizations` object in the provided code represents a set of customizations that can be applied to the Babel configuration within the context of the Client Build Tool (CBT). These customizations allow you to fine-tune how JavaScript code is transpiled and transformed during the build process. Below is the documentation for the individual customizations:
|
|
4
|
+
|
|
5
|
+
### babelCustomizations.browserList
|
|
6
|
+
|
|
7
|
+
> Type: (null or string array)
|
|
8
|
+
|
|
9
|
+
This configuration option allows you to define a custom `browserslist` for Babel, which specifies the targeted browsers and their versions. If set to `null`, the default `browserslist` of the environment will be used.
|
|
10
|
+
|
|
11
|
+
### babelCustomizations.removeAttribute
|
|
12
|
+
|
|
13
|
+
This customization is used to remove specific HTML attributes from JSX elements during transpilation.
|
|
14
|
+
|
|
15
|
+
- **enable** (boolean): Determines whether the removal of attributes is enabled (`true`) or not (`false`).
|
|
16
|
+
|
|
17
|
+
- **options** (object): Contains settings related to attribute removal.
|
|
18
|
+
|
|
19
|
+
- **attributeNames** (string array): Specifies the names of HTML attributes that should be removed from JSX elements during transpilation.
|
|
20
|
+
|
|
21
|
+
### babelCustomizations.removePropTypes
|
|
22
|
+
|
|
23
|
+
This customization is used to remove `prop-types` declarations from React components.
|
|
24
|
+
|
|
25
|
+
- **enable** (boolean): Determines whether the removal of `prop-types` is enabled (`true`) or not (`false`).
|
|
26
|
+
|
|
27
|
+
- **options** (object): Contains settings related to `prop-types` removal.
|
|
28
|
+
|
|
29
|
+
- **mode** ('remove'): Specifies the removal mode. Currently, only `'remove'` mode is supported.
|
|
30
|
+
|
|
31
|
+
- **removeImport** (boolean): Determines whether the import statement for `prop-types` should also be removed when `prop-types` declarations are removed.
|
|
32
|
+
|
|
33
|
+
### babelCustomizations.devConsoleExclude
|
|
34
|
+
|
|
35
|
+
This customization is used to exclude certain types of console messages from the build output in development mode.
|
|
36
|
+
|
|
37
|
+
- **enable** (boolean or object): If a boolean, determines whether console message exclusion is enabled (`true`) or not (`false`). If an object, it can have two properties:
|
|
38
|
+
|
|
39
|
+
- **value** (boolean): Determines whether the exclusion is enabled (`true`) or not (`false`).
|
|
40
|
+
|
|
41
|
+
- **cli** (string): Provides an option to control the behavior through the CLI by using the specified command line argument.
|
|
42
|
+
|
|
43
|
+
- **options** (object): Contains settings related to console message exclusion.
|
|
44
|
+
|
|
45
|
+
- **exclude** (string array): Specifies the types of console messages that should be excluded from the build output. For example, `['error', 'warn']` would exclude both error and warning messages.
|
|
46
|
+
|
|
47
|
+
### babelCustomizations.plugins
|
|
48
|
+
|
|
49
|
+
> Type: (array)
|
|
50
|
+
|
|
51
|
+
This customization allows you to specify an array of Babel plugins that will be applied during transpilation.
|
|
52
|
+
|
|
53
|
+
- **plugins** (array): An array of Babel plugins that will be used for transpilation.
|
|
54
|
+
|
|
55
|
+
By customizing the `babelCustomizations` configuration, you can tailor the Babel transpilation process to meet the specific requirements of your project, such as removing certain attributes, optimizing for development console messages, or adding custom Babel plugins.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.preProcessor = preProcessor;
|
|
7
|
+
|
|
8
|
+
var _runPreProcess = require("../../shared/pre_process/runPreProcess");
|
|
9
|
+
|
|
10
|
+
function preProcessor(options) {
|
|
11
|
+
(0, _runPreProcess.runPreProcess)(options, 'node');
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.preProcessor = preProcessor;
|
|
7
|
+
|
|
8
|
+
var _runPreProcess = require("../../shared/pre_process/runPreProcess");
|
|
9
|
+
|
|
10
|
+
function preProcessor(options) {
|
|
11
|
+
const {
|
|
12
|
+
extraArgs = []
|
|
13
|
+
} = options;
|
|
14
|
+
const index = extraArgs.indexOf('-w');
|
|
15
|
+
const canWatch = index !== -1;
|
|
16
|
+
(0, _runPreProcess.runPreProcess)(options, canWatch ? 'nodemon' : 'node');
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.preProcessor = preProcessor;
|
|
7
|
+
|
|
8
|
+
var _runPreProcess = require("../../shared/pre_process/runPreProcess");
|
|
9
|
+
|
|
10
|
+
function preProcessor(options) {
|
|
11
|
+
const {
|
|
12
|
+
extraArgs = []
|
|
13
|
+
} = options;
|
|
14
|
+
const index = extraArgs.indexOf('-w');
|
|
15
|
+
const canWatch = index !== -1;
|
|
16
|
+
(0, _runPreProcess.runPreProcess)(options, canWatch ? 'nodemon' : 'node');
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.commandExecutor = commandExecutor;
|
|
7
|
+
|
|
8
|
+
var _runPreProcess = require("../../shared/pre_process/runPreProcess");
|
|
9
|
+
|
|
10
|
+
function commandExecutor(options) {
|
|
11
|
+
const {
|
|
12
|
+
extraArgs = []
|
|
13
|
+
} = options;
|
|
14
|
+
const index = extraArgs.indexOf('-w');
|
|
15
|
+
const canWatch = index !== -1;
|
|
16
|
+
const result = (0, _runPreProcess.runPreProcess)(options, canWatch ? 'nodemon' : 'node');
|
|
17
|
+
!canWatch && process.exit(result ? result.status : 0);
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _default = {
|
|
8
|
+
name: 'pre_process',
|
|
9
|
+
alias: ['preprocess', 'pre:process', 'preProcess'],
|
|
10
|
+
dirname: __dirname
|
|
11
|
+
};
|
|
12
|
+
exports.default = _default;
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.preProcessor = preProcessor;
|
|
7
7
|
|
|
8
|
+
var _runPreProcess = require("../../shared/pre_process/runPreProcess");
|
|
9
|
+
|
|
8
10
|
function preProcessor(options) {
|
|
9
|
-
|
|
11
|
+
(0, _runPreProcess.runPreProcess)(options, 'nodemon');
|
|
10
12
|
}
|