@zohodesk/react-cli 0.0.1-exp.160.1 → 0.0.1-exp.161.2
Sign up to get free protection for your applications and to get access to all the features.
- package/.eslintignore +7 -7
- package/.eslintrc.js +183 -183
- package/README.md +785 -746
- package/bin/cli.js +421 -421
- package/cert/cert.pem +37 -37
- package/cert/key.pem +27 -27
- package/files/eslintrc.js +62 -62
- package/files/prettierrc.js +3 -3
- package/lib/common/index.js +6 -6
- package/lib/configs/webpack.css.umd.config.js +4 -4
- package/lib/loaderUtils/index.js +4 -4
- package/lib/loaders/scriptInstrumentLoader.js +2 -2
- package/lib/loaders/workerLoader.js +9 -9
- package/lib/pluginUtils/getDevPlugins.js +7 -5
- package/lib/pluginUtils/getProdPlugins.js +7 -5
- package/lib/pluginUtils/index.js +12 -12
- package/lib/plugins/EFCPlugin.js +43 -13
- package/lib/plugins/EFCPlugin.md +6 -6
- package/lib/plugins/EFCTemplatePlugin.js +151 -0
- package/lib/plugins/I18NInjectIntoIndexPlugin.js +4 -4
- package/lib/plugins/I18nSplitPlugin/I18nDownlodLogic.js +38 -38
- package/lib/plugins/I18nSplitPlugin/I18nFilesEmitter.js +30 -30
- package/lib/plugins/I18nSplitPlugin/I18nKeysIdentifer.js +8 -8
- package/lib/plugins/I18nSplitPlugin/I18nSplit.md +86 -86
- package/lib/plugins/I18nSplitPlugin/README.md +25 -25
- package/lib/plugins/I18nSplitPlugin/index.js +57 -57
- package/lib/plugins/I18nSplitPlugin/utils/hashUtils.js +2 -2
- package/lib/plugins/I18nSplitPlugin/utils/propertiesUtils.js +1 -1
- package/lib/plugins/ManifestPlugin.js +8 -0
- package/lib/plugins/ResourceHintsPlugin.js +17 -17
- package/lib/plugins/RtlSplitPlugin/RtlCssPlugin.js +6 -6
- package/lib/plugins/RtlSplitPlugin/RtrSplit.md +30 -30
- package/lib/plugins/ServiceWorkerPlugin.js +9 -9
- package/lib/plugins/TPHashMappingPlugin.js +4 -4
- package/lib/plugins/index.js +36 -36
- package/lib/postcss-plugins/RTLSplitPlugin.js +13 -13
- package/lib/schemas/index.js +3 -0
- package/lib/sh/pre-commit.sh +34 -34
- package/lib/sh/reportPublish.sh +45 -45
- package/lib/templates/linterConstant.js +1 -1
- package/lib/utils/buildstats.html +148 -148
- package/lib/utils/cssClassNameGenerate.js +9 -2
- package/lib/utils/cssURLReplacer.js +1 -1
- package/lib/utils/index.js +21 -19
- package/lib/utils/jsonHelper.js +1 -1
- package/lib/utils/reinstallDependencies.js +1 -1
- package/lib/utils/resultSchema.json +73 -73
- package/node_modules0/history/CHANGES.md +395 -0
- package/node_modules0/history/DOMUtils.js +3 -0
- package/node_modules0/history/ExecutionEnvironment.js +3 -0
- package/node_modules0/history/LICENSE +21 -0
- package/node_modules0/history/LocationUtils.js +3 -0
- package/node_modules0/history/PathUtils.js +3 -0
- package/node_modules0/history/README.md +282 -0
- package/node_modules0/history/cjs/history.js +933 -0
- package/node_modules0/history/cjs/history.min.js +1 -0
- package/node_modules0/history/createBrowserHistory.js +3 -0
- package/node_modules0/history/createHashHistory.js +3 -0
- package/node_modules0/history/createMemoryHistory.js +3 -0
- package/node_modules0/history/createTransitionManager.js +3 -0
- package/node_modules0/history/es/DOMUtils.js +7 -0
- package/node_modules0/history/es/ExecutionEnvironment.js +7 -0
- package/node_modules0/history/es/LocationUtils.js +7 -0
- package/node_modules0/history/es/PathUtils.js +7 -0
- package/node_modules0/history/es/createBrowserHistory.js +7 -0
- package/node_modules0/history/es/createHashHistory.js +7 -0
- package/node_modules0/history/es/createMemoryHistory.js +7 -0
- package/node_modules0/history/es/createTransitionManager.js +7 -0
- package/node_modules0/history/es/warnAboutDeprecatedESMImport.js +35 -0
- package/node_modules0/history/esm/history.js +904 -0
- package/node_modules0/history/index.js +7 -0
- package/node_modules0/history/package.json +120 -0
- package/node_modules0/history/umd/history.js +1059 -0
- package/node_modules0/history/umd/history.min.js +1 -0
- package/node_modules0/history/warnAboutDeprecatedCJSRequire.js +35 -0
- package/package.json +145 -145
- package/templates/app/.eslintrc.js +140 -140
- package/templates/app/README.md +12 -12
- package/templates/app/app/index.html +24 -24
- package/templates/app/app/properties/ApplicationResources_en_US.properties +1 -1
- package/templates/app/app/properties/i18nkeys.json +3 -3
- package/templates/app/docs/all.html +69 -69
- package/templates/app/mockapi/index.js +18 -18
- package/templates/app/package.json +37 -37
- package/templates/app/src/actions/SampleActions/index.js +37 -37
- package/templates/app/src/actions/index.js +65 -65
- package/templates/app/src/appUrls.js +19 -19
- package/templates/app/src/components/Alert/Alert.js +134 -134
- package/templates/app/src/components/Alert/Alert.module.css +79 -79
- package/templates/app/src/components/FreezeLayer/FreezeLayer.css +37 -37
- package/templates/app/src/components/FreezeLayer/FreezeLayer.js +84 -84
- package/templates/app/src/components/Sample/Sample.module.css +11 -11
- package/templates/app/src/components/Sample/SampleList.js +61 -61
- package/templates/app/src/components/Slider/Slider.css +41 -41
- package/templates/app/src/components/Slider/Slider.js +55 -55
- package/templates/app/src/containers/AlertContainer/index.js +15 -15
- package/templates/app/src/containers/AppContainer/index.js +96 -96
- package/templates/app/src/containers/AppContainer/index.module.css +27 -27
- package/templates/app/src/containers/CustomMatch/index.js +65 -65
- package/templates/app/src/containers/DevTools/index.js +10 -10
- package/templates/app/src/containers/Header/index.js +67 -67
- package/templates/app/src/containers/Header/index.module.css +43 -43
- package/templates/app/src/containers/Redirect/index.js +63 -63
- package/templates/app/src/containers/Redirector/index.js +47 -47
- package/templates/app/src/containers/SampleListContainer/ListContainer.js +42 -42
- package/templates/app/src/containers/SampleListContainer/ListContainer.module.css +3 -3
- package/templates/app/src/historyChange.js +5 -5
- package/templates/app/src/index.html +10 -10
- package/templates/app/src/index.js +24 -24
- package/templates/app/src/middleware/PromiseMiddleware.js +59 -59
- package/templates/app/src/reducers/alertData.js +11 -11
- package/templates/app/src/reducers/index.js +6 -6
- package/templates/app/src/reducers/samples.js +19 -19
- package/templates/app/src/store/configureStore.dev.js +51 -51
- package/templates/app/src/store/configureStore.js +5 -5
- package/templates/app/src/store/configureStore.prod.js +26 -26
- package/templates/app/src/util/Common.js +5 -5
- package/templates/app/src/util/RequestAPI.js +132 -132
- package/templates/docs/all.html +249 -249
- package/templates/docs/component.html +178 -178
- package/templates/docs/components.html +221 -221
- package/templates/docs/css/b.min.css +6 -6
- package/templates/docs/css/component.css +42 -42
- package/templates/docs/css/componentTest.css +6 -6
- package/templates/docs/css/hopscotch.css +585 -585
- package/templates/docs/css/style.css +1022 -1022
- package/templates/docs/impactReportTemplate.html +154 -154
- package/templates/docs/index.html +1493 -1493
- package/templates/docs/js/active-line.js +72 -72
- package/templates/docs/js/b.min.js +7 -7
- package/templates/docs/js/codemirror.js +9680 -9680
- package/templates/docs/js/designTokens.js +334 -334
- package/templates/docs/js/j.min.js +4 -4
- package/templates/docs/js/javascript.js +874 -874
- package/templates/docs/js/matchbrackets.js +145 -145
package/lib/sh/reportPublish.sh
CHANGED
@@ -1,45 +1,45 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
branchName=$2
|
3
|
-
url=$1
|
4
|
-
zipUrl=$3
|
5
|
-
unique=$(date +"%d_%m_%y_Time_%H_%M_%S")
|
6
|
-
publishFolder=$branchName"_"$unique
|
7
|
-
|
8
|
-
rm -rf ./reports
|
9
|
-
rm -rf ./scrTemplate
|
10
|
-
rm -rf ./errTemplate
|
11
|
-
rm -rf ./css
|
12
|
-
rm -rf ./js
|
13
|
-
rm -rf ./index.html
|
14
|
-
|
15
|
-
curl $zipUrl | tar xz
|
16
|
-
|
17
|
-
cp -rf ./reports/css ./css
|
18
|
-
cp -rf ./reports/js ./js
|
19
|
-
cp -rf ./reports/index.html ./index.html
|
20
|
-
if [ -d "./screenShots" ] ; then
|
21
|
-
cp -rf ./scrTemplate/* ./screenShots/
|
22
|
-
else
|
23
|
-
mkdir ./screenShots
|
24
|
-
cp -rf ./scrTemplate/* ./screenShots/
|
25
|
-
fi
|
26
|
-
|
27
|
-
[ ! -f "./result.json" ] && touch result.json && cp -rf ./errTemplate/* ./result.json
|
28
|
-
[ ! -d "./commitCoverage" ] && mkdir commitCoverage && cp -rf ./errTemplate/* ./commitCoverage/
|
29
|
-
[ ! -d "./unittest" ] && mkdir unittest && cp -rf ./errTemplate/* ./unittest/
|
30
|
-
[ ! -d "./coverageTest" ] && mkdir coverageTest && cp -rf ./errTemplate/* ./coverageTest/
|
31
|
-
[ ! -d "./coverage" ] && mkdir coverage && cp -rf ./errTemplate/* ./coverage/
|
32
|
-
|
33
|
-
tar -czvf $publishFolder.tar.gz coverage screenShots unittest coverageTest commitCoverage ./css ./js ./index.html ./result.json
|
34
|
-
|
35
|
-
curl -i -F name=file -F file=@$publishFolder.tar.gz $url"/cgi-bin/upload.py"
|
36
|
-
replace=$publishFolder
|
37
|
-
reportUrl=$url"/"$replace
|
38
|
-
subject="Client Report - React - $publishFolder"
|
39
|
-
msg="<p><b>Report URL - <a href='$reportUrl'>Link</a></b></p>
|
40
|
-
<p><b>Report Branchname - $branchName</b></p>
|
41
|
-
<p><b>Report Unique ID - $unique</b></p>
|
42
|
-
<p><b>Report Developer - $6</b></p>"
|
43
|
-
#node mailSender.js <from> <pass> <to> <subject> <text>
|
44
|
-
BASEDIR=$(dirname "$0")
|
45
|
-
node $BASEDIR"/../utils/mailSender" $4 $5 $6 "$subject" "$msg" $7 $8 "$reportUrl"
|
1
|
+
#!/bin/bash
|
2
|
+
branchName=$2
|
3
|
+
url=$1
|
4
|
+
zipUrl=$3
|
5
|
+
unique=$(date +"%d_%m_%y_Time_%H_%M_%S")
|
6
|
+
publishFolder=$branchName"_"$unique
|
7
|
+
|
8
|
+
rm -rf ./reports
|
9
|
+
rm -rf ./scrTemplate
|
10
|
+
rm -rf ./errTemplate
|
11
|
+
rm -rf ./css
|
12
|
+
rm -rf ./js
|
13
|
+
rm -rf ./index.html
|
14
|
+
|
15
|
+
curl $zipUrl | tar xz
|
16
|
+
|
17
|
+
cp -rf ./reports/css ./css
|
18
|
+
cp -rf ./reports/js ./js
|
19
|
+
cp -rf ./reports/index.html ./index.html
|
20
|
+
if [ -d "./screenShots" ] ; then
|
21
|
+
cp -rf ./scrTemplate/* ./screenShots/
|
22
|
+
else
|
23
|
+
mkdir ./screenShots
|
24
|
+
cp -rf ./scrTemplate/* ./screenShots/
|
25
|
+
fi
|
26
|
+
|
27
|
+
[ ! -f "./result.json" ] && touch result.json && cp -rf ./errTemplate/* ./result.json
|
28
|
+
[ ! -d "./commitCoverage" ] && mkdir commitCoverage && cp -rf ./errTemplate/* ./commitCoverage/
|
29
|
+
[ ! -d "./unittest" ] && mkdir unittest && cp -rf ./errTemplate/* ./unittest/
|
30
|
+
[ ! -d "./coverageTest" ] && mkdir coverageTest && cp -rf ./errTemplate/* ./coverageTest/
|
31
|
+
[ ! -d "./coverage" ] && mkdir coverage && cp -rf ./errTemplate/* ./coverage/
|
32
|
+
|
33
|
+
tar -czvf $publishFolder.tar.gz coverage screenShots unittest coverageTest commitCoverage ./css ./js ./index.html ./result.json
|
34
|
+
|
35
|
+
curl -i -F name=file -F file=@$publishFolder.tar.gz $url"/cgi-bin/upload.py"
|
36
|
+
replace=$publishFolder
|
37
|
+
reportUrl=$url"/"$replace
|
38
|
+
subject="Client Report - React - $publishFolder"
|
39
|
+
msg="<p><b>Report URL - <a href='$reportUrl'>Link</a></b></p>
|
40
|
+
<p><b>Report Branchname - $branchName</b></p>
|
41
|
+
<p><b>Report Unique ID - $unique</b></p>
|
42
|
+
<p><b>Report Developer - $6</b></p>"
|
43
|
+
#node mailSender.js <from> <pass> <to> <subject> <text>
|
44
|
+
BASEDIR=$(dirname "$0")
|
45
|
+
node $BASEDIR"/../utils/mailSender" $4 $5 $6 "$subject" "$msg" $7 $8 "$reportUrl"
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.htmlTemplate = exports.endTag = void 0;
|
7
7
|
const htmlTemplate = '<!DOCTYPE html><html> <head> <title>Eslint Security Rule</title> <style type="text/css"> body{margin: 0; font: 93.75%/1.6 -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;}body, html{width: 100%; height: 100%;}.pkCont{}.pkEmpty{height: 300px;display: flex;align-items: center;justify-content: center;font-size: 20px;}.pkUl{margin: 0; padding: 0; list-style-type: none;}.pkLi{}.pkRow{display: flex; padding: 12px 16px;}.pkArrowCont{cursor: pointer; width: 50px; display: flex; align-items: center; justify-content: center; background-color: #f4f5f5; border-radius: 4px;}.pkArrow{width: 1px; height: 1px; border: 5px solid; border-color: #000 transparent transparent; margin-top: 7px;}.pkDetailsOpen .pkArrow{margin: 0 0 7px; border-color: transparent transparent #000;}.pkFileName{font-weight: 600; margin: 0 8px;}.pkUrl{flex: 1; min-width: 0; min-height: 0; word-break: break-word; word-wrap: break-word; color: blue;}.pkDetails{margin-left: 66px; display: none;}.pkDetailsOpen .pkDetails{display: block;}.pkDetailsHead{font-weight: 600; display: flex; border: 1px solid #e5e5e5; padding: 3px 8px;}.pkDetailsBody{max-height: 400px; overflow: auto;}.pkDetailsRow{display: flex; padding: 10px 8px;}.pkDetailsRow:nth-child(even){background-color: #f4f5f5;}.pkDetailsCol{word-break: break-word; word-wrap: break-word;}.pkError{color: red;}.pkDetailsCol:nth-child(1){width: 10%;}.pkDetailsCol:nth-child(2){width: 10%;}.pkDetailsCol:nth-child(3){width: 40%;}.pkDetailsCol:nth-child(4){width: 40%;}</style> <script>function toggleWrapper(element){var classArray=element.parentElement.parentElement.className; if (classArray.includes("pkDetailsOpen")){element.parentElement.parentElement.className="pkLi";}else{element.parentElement.parentElement.className="pkLi pkDetailsOpen";}}</script> </head> <body> <div class="pkCont">';
|
8
8
|
exports.htmlTemplate = htmlTemplate;
|
9
9
|
const endTag = '</div></body></html>';
|
@@ -1,148 +1,148 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
|
5
|
-
<style>
|
6
|
-
#file {
|
7
|
-
font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif;
|
8
|
-
border-collapse: collapse;
|
9
|
-
width: 100%;
|
10
|
-
}
|
11
|
-
#redTd {
|
12
|
-
color: red;
|
13
|
-
}
|
14
|
-
#greenTD {
|
15
|
-
color: green;
|
16
|
-
}
|
17
|
-
#file td,
|
18
|
-
#file th {
|
19
|
-
border: 1px solid #ddd;
|
20
|
-
padding: 8px;
|
21
|
-
text-align: center;
|
22
|
-
}
|
23
|
-
|
24
|
-
#file tr:nth-child(even) {
|
25
|
-
background-color: #f2f2f2;
|
26
|
-
}
|
27
|
-
|
28
|
-
#file tr:hover {
|
29
|
-
background-color: #ddd;
|
30
|
-
}
|
31
|
-
|
32
|
-
#file th {
|
33
|
-
padding-top: 12px;
|
34
|
-
padding-bottom: 12px;
|
35
|
-
background-color: #2a2d36;
|
36
|
-
color: white;
|
37
|
-
}
|
38
|
-
#sizeTable {
|
39
|
-
float: left;
|
40
|
-
width: 50%;
|
41
|
-
}
|
42
|
-
#hashTable {
|
43
|
-
display: inline-block;
|
44
|
-
width: 50%;
|
45
|
-
}
|
46
|
-
</style>
|
47
|
-
<script type="text/javascript" src="./buildtrack.js"></script>
|
48
|
-
</head>
|
49
|
-
<body>
|
50
|
-
<div>
|
51
|
-
<div style="float: left;margin-right: 10px;">Branch Name:</div>
|
52
|
-
<h4 id="h4" style="margin: 0px;"></h4>
|
53
|
-
</div>
|
54
|
-
<div id="sizeTable">
|
55
|
-
<div>
|
56
|
-
<h3>Size changes</h3>
|
57
|
-
<h3></h3>
|
58
|
-
</div>
|
59
|
-
<table id="file" class="table table-bordered table-hover table-condensed">
|
60
|
-
<thead>
|
61
|
-
<tr>
|
62
|
-
<th title="Field #1">Name</th>
|
63
|
-
<th title="Field #2">Size / Diff</th>
|
64
|
-
<th title="Field #3">Size / Old</th>
|
65
|
-
<th title="Field #4">Size / New</th>
|
66
|
-
</tr>
|
67
|
-
</thead>
|
68
|
-
<tbody id="sizeTbody"></tbody>
|
69
|
-
</table>
|
70
|
-
</div>
|
71
|
-
<div id="hashTable">
|
72
|
-
<div>
|
73
|
-
<h3>Hash changes</h3>
|
74
|
-
<h3></h3>
|
75
|
-
</div>
|
76
|
-
<table id="file" class="table table-bordered table-hover table-condensed">
|
77
|
-
<thead>
|
78
|
-
<tr>
|
79
|
-
<th style="background-color: #4CAF50;" title="Field #1">Name</th>
|
80
|
-
<th style="background-color: #4CAF50;" title="Field #2">
|
81
|
-
Hash / Old
|
82
|
-
</th>
|
83
|
-
<th style="background-color: #4CAF50;" title="Field #3">
|
84
|
-
Hash / New
|
85
|
-
</th>
|
86
|
-
</tr>
|
87
|
-
</thead>
|
88
|
-
<tbody id="hashTbody"></tbody>
|
89
|
-
</table>
|
90
|
-
</div>
|
91
|
-
|
92
|
-
<script type="text/javascript">
|
93
|
-
function load() {
|
94
|
-
if (statsJson) {
|
95
|
-
var tdStringSize = '';
|
96
|
-
var tdStringHash = '';
|
97
|
-
if (statsJson.increased.length > 0) {
|
98
|
-
statsJson.increased.forEach(fileObj => {
|
99
|
-
let colorTD = '</td><td>';
|
100
|
-
if (fileObj.size.diff.split(' ').length > 2) {
|
101
|
-
colorTD = '</td><td id="greenTd">';
|
102
|
-
} else {
|
103
|
-
colorTD = '</td><td id="redTd">';
|
104
|
-
}
|
105
|
-
|
106
|
-
tdStringSize =
|
107
|
-
tdStringSize +
|
108
|
-
'<tr><td>' +
|
109
|
-
fileObj.name +
|
110
|
-
colorTD +
|
111
|
-
fileObj.size.diff +
|
112
|
-
'</td><td>' +
|
113
|
-
fileObj.size.old +
|
114
|
-
'</td><td>' +
|
115
|
-
fileObj.size.new +
|
116
|
-
'</td><tr>';
|
117
|
-
});
|
118
|
-
} else {
|
119
|
-
tdStringSize = '<tr><td></td><td></td><td></td></tr>';
|
120
|
-
}
|
121
|
-
document.getElementById('sizeTbody').innerHTML = tdStringSize;
|
122
|
-
if (statsJson.hashChanged.length > 0) {
|
123
|
-
statsJson.hashChanged.forEach(fileObj => {
|
124
|
-
tdStringHash =
|
125
|
-
tdStringHash +
|
126
|
-
'<tr><td>' +
|
127
|
-
fileObj.name +
|
128
|
-
'</td><td>' +
|
129
|
-
fileObj.hash.old +
|
130
|
-
'</td><td>' +
|
131
|
-
fileObj.hash.new +
|
132
|
-
'</td><tr>';
|
133
|
-
});
|
134
|
-
} else {
|
135
|
-
tdStringHash = '<tr><td></td><td></td><td></td></tr>';
|
136
|
-
}
|
137
|
-
document.getElementById('hashTbody').innerHTML = tdStringHash;
|
138
|
-
if (statsJson.branchName) {
|
139
|
-
document.getElementById('h4').innerHTML = statsJson.branchName;
|
140
|
-
} else {
|
141
|
-
document.getElementById('h4').innerHTML = 'Not specified';
|
142
|
-
}
|
143
|
-
}
|
144
|
-
}
|
145
|
-
load();
|
146
|
-
</script>
|
147
|
-
</body>
|
148
|
-
</html>
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
|
5
|
+
<style>
|
6
|
+
#file {
|
7
|
+
font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif;
|
8
|
+
border-collapse: collapse;
|
9
|
+
width: 100%;
|
10
|
+
}
|
11
|
+
#redTd {
|
12
|
+
color: red;
|
13
|
+
}
|
14
|
+
#greenTD {
|
15
|
+
color: green;
|
16
|
+
}
|
17
|
+
#file td,
|
18
|
+
#file th {
|
19
|
+
border: 1px solid #ddd;
|
20
|
+
padding: 8px;
|
21
|
+
text-align: center;
|
22
|
+
}
|
23
|
+
|
24
|
+
#file tr:nth-child(even) {
|
25
|
+
background-color: #f2f2f2;
|
26
|
+
}
|
27
|
+
|
28
|
+
#file tr:hover {
|
29
|
+
background-color: #ddd;
|
30
|
+
}
|
31
|
+
|
32
|
+
#file th {
|
33
|
+
padding-top: 12px;
|
34
|
+
padding-bottom: 12px;
|
35
|
+
background-color: #2a2d36;
|
36
|
+
color: white;
|
37
|
+
}
|
38
|
+
#sizeTable {
|
39
|
+
float: left;
|
40
|
+
width: 50%;
|
41
|
+
}
|
42
|
+
#hashTable {
|
43
|
+
display: inline-block;
|
44
|
+
width: 50%;
|
45
|
+
}
|
46
|
+
</style>
|
47
|
+
<script type="text/javascript" src="./buildtrack.js"></script>
|
48
|
+
</head>
|
49
|
+
<body>
|
50
|
+
<div>
|
51
|
+
<div style="float: left;margin-right: 10px;">Branch Name:</div>
|
52
|
+
<h4 id="h4" style="margin: 0px;"></h4>
|
53
|
+
</div>
|
54
|
+
<div id="sizeTable">
|
55
|
+
<div>
|
56
|
+
<h3>Size changes</h3>
|
57
|
+
<h3></h3>
|
58
|
+
</div>
|
59
|
+
<table id="file" class="table table-bordered table-hover table-condensed">
|
60
|
+
<thead>
|
61
|
+
<tr>
|
62
|
+
<th title="Field #1">Name</th>
|
63
|
+
<th title="Field #2">Size / Diff</th>
|
64
|
+
<th title="Field #3">Size / Old</th>
|
65
|
+
<th title="Field #4">Size / New</th>
|
66
|
+
</tr>
|
67
|
+
</thead>
|
68
|
+
<tbody id="sizeTbody"></tbody>
|
69
|
+
</table>
|
70
|
+
</div>
|
71
|
+
<div id="hashTable">
|
72
|
+
<div>
|
73
|
+
<h3>Hash changes</h3>
|
74
|
+
<h3></h3>
|
75
|
+
</div>
|
76
|
+
<table id="file" class="table table-bordered table-hover table-condensed">
|
77
|
+
<thead>
|
78
|
+
<tr>
|
79
|
+
<th style="background-color: #4CAF50;" title="Field #1">Name</th>
|
80
|
+
<th style="background-color: #4CAF50;" title="Field #2">
|
81
|
+
Hash / Old
|
82
|
+
</th>
|
83
|
+
<th style="background-color: #4CAF50;" title="Field #3">
|
84
|
+
Hash / New
|
85
|
+
</th>
|
86
|
+
</tr>
|
87
|
+
</thead>
|
88
|
+
<tbody id="hashTbody"></tbody>
|
89
|
+
</table>
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<script type="text/javascript">
|
93
|
+
function load() {
|
94
|
+
if (statsJson) {
|
95
|
+
var tdStringSize = '';
|
96
|
+
var tdStringHash = '';
|
97
|
+
if (statsJson.increased.length > 0) {
|
98
|
+
statsJson.increased.forEach(fileObj => {
|
99
|
+
let colorTD = '</td><td>';
|
100
|
+
if (fileObj.size.diff.split(' ').length > 2) {
|
101
|
+
colorTD = '</td><td id="greenTd">';
|
102
|
+
} else {
|
103
|
+
colorTD = '</td><td id="redTd">';
|
104
|
+
}
|
105
|
+
|
106
|
+
tdStringSize =
|
107
|
+
tdStringSize +
|
108
|
+
'<tr><td>' +
|
109
|
+
fileObj.name +
|
110
|
+
colorTD +
|
111
|
+
fileObj.size.diff +
|
112
|
+
'</td><td>' +
|
113
|
+
fileObj.size.old +
|
114
|
+
'</td><td>' +
|
115
|
+
fileObj.size.new +
|
116
|
+
'</td><tr>';
|
117
|
+
});
|
118
|
+
} else {
|
119
|
+
tdStringSize = '<tr><td></td><td></td><td></td></tr>';
|
120
|
+
}
|
121
|
+
document.getElementById('sizeTbody').innerHTML = tdStringSize;
|
122
|
+
if (statsJson.hashChanged.length > 0) {
|
123
|
+
statsJson.hashChanged.forEach(fileObj => {
|
124
|
+
tdStringHash =
|
125
|
+
tdStringHash +
|
126
|
+
'<tr><td>' +
|
127
|
+
fileObj.name +
|
128
|
+
'</td><td>' +
|
129
|
+
fileObj.hash.old +
|
130
|
+
'</td><td>' +
|
131
|
+
fileObj.hash.new +
|
132
|
+
'</td><tr>';
|
133
|
+
});
|
134
|
+
} else {
|
135
|
+
tdStringHash = '<tr><td></td><td></td><td></td></tr>';
|
136
|
+
}
|
137
|
+
document.getElementById('hashTbody').innerHTML = tdStringHash;
|
138
|
+
if (statsJson.branchName) {
|
139
|
+
document.getElementById('h4').innerHTML = statsJson.branchName;
|
140
|
+
} else {
|
141
|
+
document.getElementById('h4').innerHTML = 'Not specified';
|
142
|
+
}
|
143
|
+
}
|
144
|
+
}
|
145
|
+
load();
|
146
|
+
</script>
|
147
|
+
</body>
|
148
|
+
</html>
|
@@ -40,6 +40,13 @@ var _default = (unique = true, {
|
|
40
40
|
filenames,
|
41
41
|
packages
|
42
42
|
}, classNamePrefix) => (context, localIdentName, localName) => {
|
43
|
+
// NOTE: in build macine we use date as folder path.
|
44
|
+
// So every time we create new build there is path will alway different
|
45
|
+
// in order to minmaze that problem we try in relative path;
|
46
|
+
// console.log('context.resourcePath', context.resourcePath, context);
|
47
|
+
// let contextResourcePath = context.resourcePath;
|
48
|
+
let relativePath = _path.default.relative(context.rootContext, context.resourcePath);
|
49
|
+
|
43
50
|
if (context.resourcePath.endsWith('.plain.css')) {
|
44
51
|
return localName;
|
45
52
|
}
|
@@ -47,7 +54,7 @@ var _default = (unique = true, {
|
|
47
54
|
|
48
55
|
|
49
56
|
if (unique) {
|
50
|
-
let h = (0, _getHash.default)(
|
57
|
+
let h = (0, _getHash.default)(`${relativePath}-${localName}`, 10);
|
51
58
|
return `${classNamePrefix}${h}`;
|
52
59
|
}
|
53
60
|
/* old production mode end*/
|
@@ -60,7 +67,7 @@ var _default = (unique = true, {
|
|
60
67
|
//let local = localName.toLowerCase()
|
61
68
|
|
62
69
|
if (isSelectorPackage(context.resourcePath, packages) || filenames.indexOf(cleanFileName) !== -1) {
|
63
|
-
let h = (0, _getHash.default)(
|
70
|
+
let h = (0, _getHash.default)(`${relativePath}-${localName}`, 10);
|
64
71
|
return `${classNamePrefix}${h}`;
|
65
72
|
}
|
66
73
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.getUrls = exports.getFileType = exports.cssUrlReplacer = void 0;
|
7
7
|
|
8
8
|
var _fs = _interopRequireDefault(require("fs"));
|
9
9
|
|
package/lib/utils/index.js
CHANGED
@@ -21,22 +21,16 @@ var _exportNames = {
|
|
21
21
|
getComponents: true,
|
22
22
|
ssTestHack: true
|
23
23
|
};
|
24
|
-
Object.defineProperty(exports, "getOptions", {
|
25
|
-
enumerable: true,
|
26
|
-
get: function () {
|
27
|
-
return _getOptions.default;
|
28
|
-
}
|
29
|
-
});
|
30
24
|
Object.defineProperty(exports, "createEventStream", {
|
31
25
|
enumerable: true,
|
32
26
|
get: function () {
|
33
27
|
return _createEventStream.default;
|
34
28
|
}
|
35
29
|
});
|
36
|
-
Object.defineProperty(exports, "
|
30
|
+
Object.defineProperty(exports, "getComponents", {
|
37
31
|
enumerable: true,
|
38
32
|
get: function () {
|
39
|
-
return
|
33
|
+
return _getComponents.default;
|
40
34
|
}
|
41
35
|
});
|
42
36
|
Object.defineProperty(exports, "getCurrentBranch", {
|
@@ -45,22 +39,23 @@ Object.defineProperty(exports, "getCurrentBranch", {
|
|
45
39
|
return _getCurrentBranch.default;
|
46
40
|
}
|
47
41
|
});
|
48
|
-
Object.defineProperty(exports, "
|
42
|
+
Object.defineProperty(exports, "getDependenciesImpactList", {
|
49
43
|
enumerable: true,
|
50
44
|
get: function () {
|
51
|
-
return
|
45
|
+
return _getDependenciesImpactList.default;
|
52
46
|
}
|
53
47
|
});
|
54
|
-
|
48
|
+
exports.getLibraryConflict = exports.getInfoFromPublicPaths = void 0;
|
49
|
+
Object.defineProperty(exports, "getOptions", {
|
55
50
|
enumerable: true,
|
56
51
|
get: function () {
|
57
|
-
return
|
52
|
+
return _getOptions.default;
|
58
53
|
}
|
59
54
|
});
|
60
|
-
Object.defineProperty(exports, "
|
55
|
+
Object.defineProperty(exports, "getServerURL", {
|
61
56
|
enumerable: true,
|
62
57
|
get: function () {
|
63
|
-
return
|
58
|
+
return _getServerURL.default;
|
64
59
|
}
|
65
60
|
});
|
66
61
|
Object.defineProperty(exports, "jsonHelper", {
|
@@ -69,16 +64,17 @@ Object.defineProperty(exports, "jsonHelper", {
|
|
69
64
|
return _jsonHelper.default;
|
70
65
|
}
|
71
66
|
});
|
72
|
-
|
67
|
+
exports.makeDir = exports.log = void 0;
|
68
|
+
Object.defineProperty(exports, "pullOrigin", {
|
73
69
|
enumerable: true,
|
74
70
|
get: function () {
|
75
|
-
return
|
71
|
+
return _pullOrigin.default;
|
76
72
|
}
|
77
73
|
});
|
78
|
-
Object.defineProperty(exports, "
|
74
|
+
Object.defineProperty(exports, "request", {
|
79
75
|
enumerable: true,
|
80
76
|
get: function () {
|
81
|
-
return
|
77
|
+
return _request.default;
|
82
78
|
}
|
83
79
|
});
|
84
80
|
Object.defineProperty(exports, "ssTestHack", {
|
@@ -87,7 +83,13 @@ Object.defineProperty(exports, "ssTestHack", {
|
|
87
83
|
return _ssTestHack.default;
|
88
84
|
}
|
89
85
|
});
|
90
|
-
|
86
|
+
Object.defineProperty(exports, "switchBranch", {
|
87
|
+
enumerable: true,
|
88
|
+
get: function () {
|
89
|
+
return _switchBranch.default;
|
90
|
+
}
|
91
|
+
});
|
92
|
+
exports.writeFile = void 0;
|
91
93
|
|
92
94
|
var _stream = require("stream");
|
93
95
|
|
package/lib/utils/jsonHelper.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.setTestInfoStatus = exports.jsonHelper = exports.jsonConcate = exports.
|
6
|
+
exports.setTestInfoStatus = exports.jsonHelper = exports.jsonConcate = exports.getRunnerDetail = exports.fileHandler = void 0;
|
7
7
|
|
8
8
|
let fs = require('fs');
|
9
9
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.reinstallDependencies1 = exports.reinstallDependencies = exports.collectPackageDiff = void 0;
|
7
7
|
|
8
8
|
var _fs = _interopRequireDefault(require("fs"));
|
9
9
|
|