@zohodesk/react-cli 0.0.1-exp.169.2 → 0.0.1-exp.175.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (245) hide show
  1. package/.eslintignore +7 -7
  2. package/.eslintrc.js +180 -179
  3. package/.prettierrc +6 -6
  4. package/README.md +1028 -951
  5. package/bin/cli.js +483 -483
  6. package/cert/Tsicsezwild-22-23.crt +37 -37
  7. package/cert/Tsicsezwild-22-23.key +27 -27
  8. package/docs/CustomChunks.md +26 -26
  9. package/docs/DevStart.md +18 -18
  10. package/docs/HoverActive.md +12 -12
  11. package/docs/InstallNode.md +28 -28
  12. package/docs/TODOS.md +10 -10
  13. package/docs/ValueReplacer.md +60 -60
  14. package/docs/VariableConversion.md +678 -0
  15. package/docs/warnings_while_install.txt +35 -35
  16. package/files/eslintrc.js +62 -62
  17. package/files/prettierrc.js +3 -3
  18. package/lib/babel/cmjs-plugins-presets.js +0 -4
  19. package/lib/babel/es-plugins-presets.js +0 -4
  20. package/lib/common/getEntries.js +0 -10
  21. package/lib/common/getPublicPathConfig.js +0 -6
  22. package/lib/common/index.js +0 -5
  23. package/lib/common/splitChunks.js +2 -13
  24. package/lib/common/sslcertUpdater.js +6 -17
  25. package/lib/common/templateParameters.js +0 -2
  26. package/lib/common/testPattern.js +10 -21
  27. package/lib/common/valueReplacer.js +0 -15
  28. package/lib/configs/jest.config.js +8 -21
  29. package/lib/configs/libAlias.js +11 -2
  30. package/lib/configs/webpack.component.umd.config.js +0 -5
  31. package/lib/configs/webpack.css.umd.config.js +5 -13
  32. package/lib/configs/webpack.dev.config.js +13 -24
  33. package/lib/configs/webpack.docs.config.js +6 -12
  34. package/lib/configs/webpack.impact.config.js +6 -10
  35. package/lib/configs/webpack.prod.config.js +15 -26
  36. package/lib/hooks/docsProptypeHook.js +3 -7
  37. package/lib/jest/commitedFilesResult.js +3 -45
  38. package/lib/jest/coverageCollector.js +0 -11
  39. package/lib/jest/jsonMaker.js +0 -6
  40. package/lib/jest/preProcessors/cssPreprocessor.js +14 -13
  41. package/lib/jest/preProcessors/jsPreprocessor.js +0 -2
  42. package/lib/jest/preProcessors/otherFilesPreprocessor.js +0 -3
  43. package/lib/jest/result.js +0 -22
  44. package/lib/jest/run.js +6 -17
  45. package/lib/jest/setup.js +5 -57
  46. package/lib/loaderUtils/configsAssetsLoaders.js +34 -44
  47. package/lib/loaderUtils/getCSSLoaders.js +41 -28
  48. package/lib/loaderUtils/getDevJsLoaders.js +0 -8
  49. package/lib/loaderUtils/index.js +0 -3
  50. package/lib/loaders/docsLoader.js +0 -7
  51. package/lib/loaders/docsPropsLoader.js +3 -7
  52. package/lib/loaders/fileBountryLoader.js +0 -2
  53. package/lib/loaders/fileLoader.js +11 -22
  54. package/lib/loaders/scriptInstrumentLoader.js +5 -13
  55. package/lib/loaders/selectorMappingLoader.js +7 -25
  56. package/lib/loaders/workerLoader.js +13 -29
  57. package/lib/middlewares/HMRMiddleware.js +13 -26
  58. package/lib/middlewares/SSTMiddleware.js +0 -3
  59. package/lib/pluginUtils/configHtmlWebpackPlugins.js +53 -0
  60. package/lib/pluginUtils/getDevPlugins.js +20 -64
  61. package/lib/pluginUtils/getDocsPlugins.js +1 -10
  62. package/lib/pluginUtils/getLibraryImactPlugins.js +4 -5
  63. package/lib/pluginUtils/getLibraryPlugins.js +0 -5
  64. package/lib/pluginUtils/getProdPlugins.js +32 -78
  65. package/lib/pluginUtils/getServerPlugins.js +0 -5
  66. package/lib/pluginUtils/getUMDCSSPlugins.js +0 -7
  67. package/lib/pluginUtils/getUMDComponentPlugins.js +0 -7
  68. package/lib/pluginUtils/index.js +0 -8
  69. package/lib/plugins/CdnChangePlugin.js +0 -14
  70. package/lib/plugins/CleanupStatsPlugin.js +0 -5
  71. package/lib/plugins/EFCPlugin.js +23 -34
  72. package/lib/plugins/EFCPlugin.md +6 -6
  73. package/lib/plugins/EFCTemplatePlugin.js +23 -32
  74. package/lib/plugins/I18NInjectIntoIndexPlugin.js +12 -38
  75. package/lib/plugins/I18nSplitPlugin/I18nDebugPlugin.js +12 -17
  76. package/lib/plugins/I18nSplitPlugin/I18nDependency.js +4 -10
  77. package/lib/plugins/I18nSplitPlugin/I18nDownlodLogic.js +46 -77
  78. package/lib/plugins/I18nSplitPlugin/I18nFilesEmitter.js +44 -59
  79. package/lib/plugins/I18nSplitPlugin/I18nKeysIdentifer.js +21 -30
  80. package/lib/plugins/I18nSplitPlugin/I18nSplit.md +95 -95
  81. package/lib/plugins/I18nSplitPlugin/README.md +25 -25
  82. package/lib/plugins/I18nSplitPlugin/index.js +70 -80
  83. package/lib/plugins/I18nSplitPlugin/utils/collectI18nKeys.js +2 -12
  84. package/lib/plugins/I18nSplitPlugin/utils/getI18nFileUrlPathTemplate.js +0 -1
  85. package/lib/plugins/I18nSplitPlugin/utils/getI18nKeysFormModules.js +0 -5
  86. package/lib/plugins/I18nSplitPlugin/utils/hashUtils.js +0 -6
  87. package/lib/plugins/I18nSplitPlugin/utils/index.js +0 -4
  88. package/lib/plugins/I18nSplitPlugin/utils/propertiesUtils.js +2 -20
  89. package/lib/plugins/ManifestPlugin.js +0 -17
  90. package/lib/plugins/ModuleStatsPlugin.js +0 -23
  91. package/lib/plugins/OptimizeJSPlugin.js +0 -7
  92. package/lib/plugins/PublicPathCallbackPlugin.js +0 -10
  93. package/lib/plugins/PublicPathChangePlugin.js +4 -36
  94. package/lib/plugins/ReportGeneratePlugin.js +4 -30
  95. package/lib/plugins/RequireVariablePublicPlugin.js +0 -6
  96. package/lib/plugins/ResourceHintsPlugin.js +20 -27
  97. package/lib/plugins/RtlSplitPlugin/OverwriteCssPathForRTL.js +12 -17
  98. package/lib/plugins/RtlSplitPlugin/RtlCssPlugin.js +23 -38
  99. package/lib/plugins/RtlSplitPlugin/RtrSplit.md +30 -30
  100. package/lib/plugins/RtlSplitPlugin/replaceCssDirTemplate.js +2 -5
  101. package/lib/plugins/ScriptInstrumentPlugin.js +0 -7
  102. package/lib/plugins/ServiceWorkerPlugin.js +13 -29
  103. package/lib/plugins/ShadowDOMSupportPlugin.js +3 -40
  104. package/lib/plugins/SourceMapHookPlugin.js +0 -9
  105. package/lib/plugins/TPHashMappingPlugin.js +5 -19
  106. package/lib/plugins/UglifyCSSPlugin.js +0 -9
  107. package/lib/plugins/UnusedFilesFindPlugin.js +2 -35
  108. package/lib/plugins/index.js +0 -19
  109. package/lib/plugins/libraryImpactPlugin.js +0 -32
  110. package/lib/plugins/webpackwatchrunplugin.js +0 -5
  111. package/lib/postcss-plugins/ExcludePlugin.js +0 -4
  112. package/lib/postcss-plugins/RTLSplitPlugin.js +24 -37
  113. package/lib/postcss-plugins/ValueReplacer.js +9 -6
  114. package/lib/postcss-plugins/__test__/hoverActivePlugin.spec.js +0 -3
  115. package/lib/postcss-plugins/__test__/test1Input.css +38 -38
  116. package/lib/postcss-plugins/__test__/test1Output.css +38 -38
  117. package/lib/postcss-plugins/hoverActivePlugin.js +80 -92
  118. package/lib/postcss-plugins/variableModificationPlugin/ErrorHandler.js +31 -0
  119. package/lib/postcss-plugins/variableModificationPlugin/index.js +232 -0
  120. package/lib/postcss-plugins/variableModifier.js +14 -20
  121. package/lib/schemas/index.js +28 -13
  122. package/lib/servers/clusterHubServer.js +0 -10
  123. package/lib/servers/devBuild.js +13 -24
  124. package/lib/servers/docsServer.js +0 -2
  125. package/lib/servers/docsServerCore.js +0 -21
  126. package/lib/servers/getCliPath.js +1 -10
  127. package/lib/servers/helpServer.js +0 -5
  128. package/lib/servers/httpsOptions.js +0 -4
  129. package/lib/servers/impactServer.js +2 -34
  130. package/lib/servers/mockserver.js +0 -9
  131. package/lib/servers/nowatchserver.js +12 -34
  132. package/lib/servers/scrServer.js +13 -20
  133. package/lib/servers/server.js +7 -35
  134. package/lib/servers/ssServer.js +0 -16
  135. package/lib/sh/pre-commit.sh +34 -34
  136. package/lib/sh/reportPublish.sh +45 -45
  137. package/lib/templates/CoverageScriptTemplate.js +0 -14
  138. package/lib/templates/WMSTemplate.js +6 -12
  139. package/lib/utils/babelPresets.js +0 -2
  140. package/lib/utils/buildstats.html +148 -148
  141. package/lib/utils/clean.js +2 -8
  142. package/lib/utils/copy.js +0 -6
  143. package/lib/utils/copyTimezones.js +0 -8
  144. package/lib/utils/createEventStream.js +0 -4
  145. package/lib/utils/cssClassNameGenerate.js +3 -19
  146. package/lib/utils/cssURLReplacer.js +0 -25
  147. package/lib/utils/dependencyPostPublish.js +0 -9
  148. package/lib/utils/fileUtils.js +0 -26
  149. package/lib/utils/folderIterator.js +0 -10
  150. package/lib/utils/getComponents.js +0 -21
  151. package/lib/utils/getCurrentBranch.js +0 -5
  152. package/lib/utils/getDependenciesImpactList.js +0 -21
  153. package/lib/utils/getHash.js +0 -7
  154. package/lib/utils/getIp.js +0 -2
  155. package/lib/utils/getOptions.js +38 -35
  156. package/lib/utils/getServerURL.js +0 -7
  157. package/lib/utils/index.js +2 -47
  158. package/lib/utils/init.js +0 -1
  159. package/lib/utils/initPreCommitHook.js +6 -29
  160. package/lib/utils/jsonHelper.js +2 -19
  161. package/lib/utils/libraryImpactConfig.js +0 -2
  162. package/lib/utils/lint/addScripts.js +2 -5
  163. package/lib/utils/lint/checkExistingConfig.js +3 -12
  164. package/lib/utils/lint/copyConfigs.js +0 -3
  165. package/lib/utils/lint/index.js +0 -9
  166. package/lib/utils/lint/lintScripts.js +0 -1
  167. package/lib/utils/lint/lintSetup.js +3 -4
  168. package/lib/utils/lint/lintStagedPreCommitHook.js +0 -1
  169. package/lib/utils/lint/question.js +0 -7
  170. package/lib/utils/lintReporter.js +0 -20
  171. package/lib/utils/mailSender.js +0 -7
  172. package/lib/utils/pullOrigin.js +0 -4
  173. package/lib/utils/reinstallDependencies.js +0 -28
  174. package/lib/utils/removeAttributes.js +0 -7
  175. package/lib/utils/repoClone.js +2 -27
  176. package/lib/utils/request.js +0 -12
  177. package/lib/utils/resultSchema.json +73 -73
  178. package/lib/utils/rtl.js +4 -16
  179. package/lib/utils/setEnvVariables.js +0 -2
  180. package/lib/utils/ssTestHack.js +0 -10
  181. package/lib/utils/switchBranch.js +0 -4
  182. package/lib/utils/urlConcat.js +0 -4
  183. package/lib/utils/useExitCleanup.js +9 -10
  184. package/npm8.md +9 -9
  185. package/package.json +146 -148
  186. package/postpublish.js +6 -6
  187. package/templates/app/.eslintrc.js +140 -140
  188. package/templates/app/README.md +12 -12
  189. package/templates/app/app/index.html +24 -24
  190. package/templates/app/app/properties/ApplicationResources_en_US.properties +1 -1
  191. package/templates/app/app/properties/i18nkeys.json +3 -3
  192. package/templates/app/docs/all.html +69 -69
  193. package/templates/app/mockapi/index.js +18 -18
  194. package/templates/app/package.json +37 -37
  195. package/templates/app/src/actions/SampleActions/index.js +37 -37
  196. package/templates/app/src/actions/index.js +65 -65
  197. package/templates/app/src/appUrls.js +19 -19
  198. package/templates/app/src/components/Alert/Alert.js +134 -134
  199. package/templates/app/src/components/Alert/Alert.module.css +79 -79
  200. package/templates/app/src/components/FreezeLayer/FreezeLayer.css +37 -37
  201. package/templates/app/src/components/FreezeLayer/FreezeLayer.js +84 -84
  202. package/templates/app/src/components/Sample/Sample.module.css +11 -11
  203. package/templates/app/src/components/Sample/SampleList.js +61 -61
  204. package/templates/app/src/components/Slider/Slider.css +41 -41
  205. package/templates/app/src/components/Slider/Slider.js +55 -55
  206. package/templates/app/src/containers/AlertContainer/index.js +15 -15
  207. package/templates/app/src/containers/AppContainer/index.js +96 -96
  208. package/templates/app/src/containers/AppContainer/index.module.css +27 -27
  209. package/templates/app/src/containers/CustomMatch/index.js +65 -65
  210. package/templates/app/src/containers/DevTools/index.js +10 -10
  211. package/templates/app/src/containers/Header/index.js +67 -67
  212. package/templates/app/src/containers/Header/index.module.css +43 -43
  213. package/templates/app/src/containers/Redirect/index.js +63 -63
  214. package/templates/app/src/containers/Redirector/index.js +47 -47
  215. package/templates/app/src/containers/SampleListContainer/ListContainer.js +42 -42
  216. package/templates/app/src/containers/SampleListContainer/ListContainer.module.css +3 -3
  217. package/templates/app/src/historyChange.js +5 -5
  218. package/templates/app/src/index.html +10 -10
  219. package/templates/app/src/index.js +24 -24
  220. package/templates/app/src/middleware/PromiseMiddleware.js +59 -59
  221. package/templates/app/src/reducers/alertData.js +11 -11
  222. package/templates/app/src/reducers/index.js +6 -6
  223. package/templates/app/src/reducers/samples.js +19 -19
  224. package/templates/app/src/store/configureStore.dev.js +51 -51
  225. package/templates/app/src/store/configureStore.js +5 -5
  226. package/templates/app/src/store/configureStore.prod.js +26 -26
  227. package/templates/app/src/util/Common.js +5 -5
  228. package/templates/app/src/util/RequestAPI.js +132 -132
  229. package/templates/docs/all.html +249 -249
  230. package/templates/docs/component.html +178 -178
  231. package/templates/docs/components.html +221 -221
  232. package/templates/docs/css/b.min.css +6 -6
  233. package/templates/docs/css/component.css +42 -42
  234. package/templates/docs/css/componentTest.css +6 -6
  235. package/templates/docs/css/hopscotch.css +585 -585
  236. package/templates/docs/css/style.css +1022 -1022
  237. package/templates/docs/impactReportTemplate.html +154 -154
  238. package/templates/docs/index.html +1501 -1493
  239. package/templates/docs/js/active-line.js +72 -72
  240. package/templates/docs/js/b.min.js +7 -7
  241. package/templates/docs/js/codemirror.js +9680 -9680
  242. package/templates/docs/js/designTokens.js +334 -334
  243. package/templates/docs/js/j.min.js +4 -4
  244. package/templates/docs/js/javascript.js +874 -874
  245. package/templates/docs/js/matchbrackets.js +145 -145
@@ -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>
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
 
3
3
  var _rimraf = _interopRequireDefault(require("rimraf"));
4
-
5
4
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
-
7
5
  let help = false;
8
- let dashdash = false; //eslint-disable-next-line array-callback-return
9
-
6
+ let dashdash = false;
7
+ //eslint-disable-next-line array-callback-return
10
8
  let args = process.argv.slice(2).filter(arg => {
11
9
  if (dashdash) {
12
10
  return !!arg;
@@ -18,21 +16,17 @@ let args = process.argv.slice(2).filter(arg => {
18
16
  return !!arg;
19
17
  }
20
18
  });
21
-
22
19
  let go = n => {
23
20
  if (n >= args.length) {
24
21
  return;
25
22
  }
26
-
27
23
  (0, _rimraf.default)(args[n], er => {
28
24
  if (er) {
29
25
  throw er;
30
26
  }
31
-
32
27
  go(n + 1);
33
28
  });
34
29
  };
35
-
36
30
  if (help || args.length === 0) {
37
31
  // If they didn't ask for help, then this is not a "success"
38
32
  // eslint-disable-next-line no-console
package/lib/utils/copy.js CHANGED
@@ -1,17 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  var _path = _interopRequireDefault(require("path"));
4
-
5
4
  var _fs = _interopRequireDefault(require("fs"));
6
-
7
5
  var _fileUtils = require("./fileUtils");
8
-
9
6
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
-
11
7
  let args = process.argv.slice(2);
12
-
13
8
  let appPath = _fs.default.realpathSync(process.cwd());
14
-
15
9
  let [srcPath, targetPath, exts, isCopy = true, flatten = '', changeExt = ''] = args;
16
10
  exts = exts ? exts.split(',').map(ext => `.${ext.trim()}`) : false;
17
11
  srcPath = _path.default.join(appPath, srcPath);
@@ -1,21 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _path = _interopRequireDefault(require("path"));
4
-
5
4
  var _fs = _interopRequireDefault(require("fs"));
6
-
7
5
  var _fileUtils = require("./fileUtils");
8
-
9
6
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
-
11
7
  let args = process.argv.slice(2);
12
-
13
8
  let appPath = _fs.default.realpathSync(process.cwd());
14
-
15
9
  let [targetPath] = args;
16
10
  targetPath = targetPath === '."' || !targetPath ? '' : targetPath;
17
11
  targetPath = _path.default.join(appPath, targetPath);
18
-
19
12
  let srcPath = _path.default.resolve(_path.default.dirname(require.resolve('@zohodesk/datetimejs')), '../data/timezones/');
20
-
21
13
  (0, _fileUtils.copy)(srcPath, targetPath, true, null, 'flatten');
@@ -4,17 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  let createEventStream = (heartbeat, heartbeatInfo = null) => {
9
8
  let clientId = 0;
10
9
  let clients = {};
11
-
12
10
  let everyClient = fn => {
13
11
  Object.keys(clients).forEach(id => {
14
12
  fn(clients[id]);
15
13
  });
16
14
  };
17
-
18
15
  setInterval(() => {
19
16
  everyClient(client => {
20
17
  if (heartbeatInfo) {
@@ -52,6 +49,5 @@ let createEventStream = (heartbeat, heartbeatInfo = null) => {
52
49
  }
53
50
  };
54
51
  };
55
-
56
52
  var _default = createEventStream;
57
53
  exports.default = _default;
@@ -4,38 +4,27 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _os = _interopRequireDefault(require("os"));
9
-
10
8
  var _path = _interopRequireDefault(require("path"));
11
-
12
9
  var _getHash = _interopRequireDefault(require("./getHash"));
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  let isWindows = _os.default.platform().toLowerCase() === 'win32';
17
-
18
12
  let isSelectorPackage = (resourcePath, packages) => {
19
13
  if (!resourcePath.includes('node_modules')) {
20
14
  return false;
21
15
  }
22
-
23
16
  let isValid = false;
24
-
25
17
  for (let pack of packages) {
26
18
  if (isWindows) {
27
19
  pack = pack.replace(/\//g, '\\');
28
20
  }
29
-
30
21
  if (resourcePath.includes(pack)) {
31
22
  isValid = true;
32
23
  break;
33
24
  }
34
25
  }
35
-
36
26
  return isValid;
37
27
  };
38
-
39
28
  var _default = (unique = true, {
40
29
  filenames,
41
30
  packages
@@ -46,32 +35,27 @@ var _default = (unique = true, {
46
35
  // console.log('context.resourcePath', context.resourcePath, context);
47
36
  // let contextResourcePath = context.resourcePath;
48
37
  let relativePath = _path.default.relative(context.rootContext, context.resourcePath);
49
-
50
38
  if (context.resourcePath.endsWith('.plain.css')) {
51
39
  return localName;
52
40
  }
53
- /* old production mode start without breaking so added. may be removed in future*/
54
-
55
41
 
42
+ /* old production mode start without breaking so added. may be removed in future*/
56
43
  if (unique) {
57
44
  let h = (0, _getHash.default)(`${relativePath}-${localName}`, 10);
58
45
  return `${classNamePrefix}${h}`;
59
46
  }
60
47
  /* old production mode end*/
61
48
 
62
-
63
49
  let filePaths = context.resourcePath.split(_path.default.sep);
64
50
  let fileName = filePaths[filePaths.length - 1];
65
51
  let [fileNameWithoutExt] = fileName.split('.');
66
- let cleanFileName = fileNameWithoutExt.replace(/-/g, '_').toLowerCase(); //css file has casesensitive selector issue so can't toLowerCase
52
+ let cleanFileName = fileNameWithoutExt.replace(/-/g, '_').toLowerCase();
53
+ //css file has casesensitive selector issue so can't toLowerCase
67
54
  //let local = localName.toLowerCase()
68
-
69
55
  if (isSelectorPackage(context.resourcePath, packages) || filenames.indexOf(cleanFileName) !== -1) {
70
56
  let h = (0, _getHash.default)(`${relativePath}-${localName}`, 10);
71
57
  return `${classNamePrefix}${h}`;
72
58
  }
73
-
74
59
  return `${classNamePrefix}-${cleanFileName}-${localName}`;
75
60
  };
76
-
77
61
  exports.default = _default;
@@ -4,35 +4,25 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getUrls = exports.getFileType = exports.cssUrlReplacer = void 0;
7
-
8
7
  var _fs = _interopRequireDefault(require("fs"));
9
-
10
8
  var _path = _interopRequireDefault(require("path"));
11
-
12
9
  var _crypto = _interopRequireDefault(require("crypto"));
13
-
14
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
11
  let urlRegex = /url\(.*?\)/g;
17
-
18
12
  let getHash = (file, isPath = false, needSubStr = true) => {
19
13
  let hash = _crypto.default.createHash('md5');
20
-
21
14
  if (isPath) {
22
15
  hash.update(_fs.default.readFileSync(file));
23
16
  } else {
24
17
  hash.update(file);
25
18
  }
26
-
27
19
  hash = hash.digest('hex');
28
20
  return hash ? needSubStr ? hash.substring(0, 20) : hash : null;
29
21
  };
30
-
31
22
  let getFileType = file => {
32
23
  let {
33
24
  ext
34
25
  } = _path.default.parse(file);
35
-
36
26
  if (ext === '.gif' || ext === '.png' || ext === '.jpg' || ext === '.jpeg' || ext === '.ico') {
37
27
  return 'image';
38
28
  } else if (ext === '.svg' || ext === '.woff' || ext === '.eot' || ext === '.ttf' || ext === '.woff2') {
@@ -42,12 +32,9 @@ let getFileType = file => {
42
32
  } else if (ext === '.css') {
43
33
  return 'css';
44
34
  }
45
-
46
35
  return null;
47
36
  };
48
-
49
37
  exports.getFileType = getFileType;
50
-
51
38
  let formatUrl = str => {
52
39
  let char = str.includes('"') ? '"' : str.includes('\'') ? '\'' : '(';
53
40
  let statingIdx = str.indexOf(char) + 1;
@@ -55,11 +42,9 @@ let formatUrl = str => {
55
42
  char = char === '(' ? ')' : char;
56
43
  return substr.substring(0, substr.indexOf(char));
57
44
  };
58
-
59
45
  let getUrls = css => {
60
46
  let urlMatches = css.match(urlRegex);
61
47
  let src = css;
62
-
63
48
  if (urlMatches) {
64
49
  let patterns = {};
65
50
  urlMatches.forEach(pattern => {
@@ -75,20 +60,16 @@ let getUrls = css => {
75
60
  };
76
61
  }
77
62
  };
78
-
79
63
  exports.getUrls = getUrls;
80
-
81
64
  let cssUrlReplacer = (css, domains, chunkHash = {}) => {
82
65
  let obj = getUrls(css);
83
66
  let src = css;
84
-
85
67
  if (obj) {
86
68
  let patterns = obj.urls;
87
69
  src = obj.css;
88
70
  Object.keys(patterns).forEach(pattern => {
89
71
  let urlParts = pattern.split('/');
90
72
  let fileName = urlParts.pop();
91
-
92
73
  if (fileName.includes('#')) {
93
74
  if (fileName.includes('?')) {
94
75
  fileName = fileName.replace(/\?.*#/g, '#');
@@ -96,14 +77,12 @@ let cssUrlReplacer = (css, domains, chunkHash = {}) => {
96
77
  } else {
97
78
  fileName = fileName.replace(/\?.*$/g, '');
98
79
  }
99
-
100
80
  let hash = patterns[pattern];
101
81
  let filename = fileName.replace(/(\?|#).*?$/g, '');
102
82
  let regex = new RegExp(hash, 'g');
103
83
  let {
104
84
  hashedName
105
85
  } = chunkHash[filename] || fileName;
106
-
107
86
  if (domains && typeof urlParts[0] === 'string' && !urlParts[0].includes('http')) {
108
87
  let {
109
88
  font,
@@ -113,7 +92,6 @@ let cssUrlReplacer = (css, domains, chunkHash = {}) => {
113
92
  let customPath = type === 'image' ? `${image}/images` : type === 'font' ? `${font}/fonts` : urlParts.join('/');
114
93
  urlParts = customPath.split('/');
115
94
  }
116
-
117
95
  if (hashedName) {
118
96
  if (fileName.includes('#')) {
119
97
  if (fileName.includes('?')) {
@@ -123,14 +101,11 @@ let cssUrlReplacer = (css, domains, chunkHash = {}) => {
123
101
  }
124
102
  }
125
103
  }
126
-
127
104
  urlParts.push(hashedName || fileName);
128
105
  urlParts = urlParts.join('/');
129
106
  src = src.replace(regex, `url('${urlParts}')`);
130
107
  });
131
108
  }
132
-
133
109
  return src;
134
110
  };
135
-
136
111
  exports.cssUrlReplacer = cssUrlReplacer;
@@ -1,31 +1,22 @@
1
1
  "use strict";
2
2
 
3
3
  var _child_process = require("child_process");
4
-
5
4
  var _path = _interopRequireDefault(require("path"));
6
-
7
5
  var _request = _interopRequireDefault(require("./request"));
8
-
9
6
  var _index = require("./index");
10
-
11
7
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
-
13
8
  let changeset = (0, _child_process.execSync)('git rev-parse HEAD', {
14
9
  cwd: process.cwd()
15
10
  }).toString() || '';
16
11
  changeset = changeset.trim();
17
-
18
12
  if (!changeset) {
19
13
  throw new Error('Changeset doesn\'t exists');
20
14
  }
21
-
22
15
  (0, _index.log)(changeset, 'changeset');
23
-
24
16
  let {
25
17
  version,
26
18
  name
27
19
  } = require(_path.default.join(process.cwd(), './package.json'));
28
-
29
20
  (0, _request.default)({
30
21
  url: `${'ht'}${'tp'}://tsi-desk-mock.tsi.zohocorpin.com:8080/Hbase/addKey?method=addkey`,
31
22
  method: 'POST',