@zohodesk/client_build_tool 0.0.6 → 0.0.7-exp.1

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.
Files changed (90) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +13 -0
  3. package/index.html +600 -0
  4. package/lib/schemas/defaultConfigValues.js +23 -1
  5. package/lib/schemas/readOptions.js +33 -0
  6. package/lib/shared/babel/babelWebConfig.js +4 -1
  7. package/lib/shared/babel/runBabelForTsFile.js +30 -0
  8. package/lib/shared/bundler/webpack/common/decidePublicPath.js +5 -0
  9. package/lib/shared/bundler/webpack/common/nameTemplates.js +13 -9
  10. package/lib/shared/bundler/webpack/custom_plugins/{CdnChangePlugin.js → CdnChangePlugin/index.js} +29 -5
  11. package/lib/shared/bundler/webpack/custom_plugins/CdnChangePlugin/webpackCustomJsUrlLoader.js +46 -0
  12. package/lib/shared/bundler/webpack/custom_plugins/CustomScriptLoadingPlugin.js +109 -0
  13. package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nLoadingRuntimeModule.js +1 -1
  14. package/lib/shared/bundler/webpack/custom_plugins/InitialHtmlPlugin.js +4 -0
  15. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/addFilesNamesToManifestJson.js +8 -2
  16. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createInitialEntries.js +7 -1
  17. package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createManifestJson.js +1 -1
  18. package/lib/shared/bundler/webpack/custom_plugins/ResourceHintsPlugin.js +1 -0
  19. package/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPlugin.js +5 -1
  20. package/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPluginUtils.js +13 -0
  21. package/lib/shared/bundler/webpack/custom_plugins/SourceMapPlugin/index.js +20 -2
  22. package/lib/shared/bundler/webpack/custom_plugins/TPHashMappingPlugin/index.js +1 -1
  23. package/lib/shared/bundler/webpack/custom_plugins/getInitialAssetsFuncTemplate.js +4 -4
  24. package/lib/shared/bundler/webpack/custom_plugins/getInitialI18nAssetsArrayStr.js +1 -1
  25. package/lib/shared/bundler/webpack/devtoolConfig.js +4 -1
  26. package/lib/shared/bundler/webpack/externals.js +5 -1
  27. package/lib/shared/bundler/webpack/loaderConfigs/configsAssetsLoaders.js +1 -1
  28. package/lib/shared/bundler/webpack/loaderConfigs/cssClassNameGenerate.js +6 -1
  29. package/lib/shared/bundler/webpack/optimizationConfig.js +15 -2
  30. package/lib/shared/bundler/webpack/pluginConfigs/configCSSMinifierPlugin.js +5 -1
  31. package/lib/shared/bundler/webpack/pluginConfigs/configCustomScriptLoadingStrategyPlugin.js +76 -0
  32. package/lib/shared/bundler/webpack/pluginConfigs/configI18nSplitPlugin.js +1 -1
  33. package/lib/shared/bundler/webpack/pluginConfigs/configManifestJsonPlugin.js +25 -13
  34. package/lib/shared/bundler/webpack/pluginConfigs/configMiniCSSExtractPlugin.js +2 -1
  35. package/lib/shared/bundler/webpack/plugins.js +3 -1
  36. package/lib/shared/bundler/webpack/resolvers.js +2 -1
  37. package/lib/shared/bundler/webpack/tsLoaders.js +17 -0
  38. package/lib/shared/bundler/webpack/utils/index.js +6 -1
  39. package/lib/shared/bundler/webpack/webpackConfig.js +3 -1
  40. package/lib/shared/fileUtils/watchRun.js +13 -1
  41. package/lib/shared/postcss/custom_postcss_plugins/ValueReplacer.js +1 -1
  42. package/lib/shared/postcss/custom_postcss_plugins/VariableModificationPlugin/index.js +4 -0
  43. package/lib/shared/server/getServerURL.js +9 -2
  44. package/npm-shrinkwrap.json +412 -7328
  45. package/package.json +5 -2
  46. package/coverage/addFilesNamesToManifestJson.js.html +0 -148
  47. package/coverage/base.css +0 -224
  48. package/coverage/block-navigation.js +0 -87
  49. package/coverage/bundler/webpack/custom_plugins/AddManifestJson/addFilesNamesToManifestJson.js.html +0 -148
  50. package/coverage/bundler/webpack/custom_plugins/AddManifestJson/createInitialEntries.js.html +0 -136
  51. package/coverage/bundler/webpack/custom_plugins/AddManifestJson/createManifestJson.js.html +0 -181
  52. package/coverage/bundler/webpack/custom_plugins/AddManifestJson/findInitialFileNames.js.html +0 -133
  53. package/coverage/bundler/webpack/custom_plugins/AddManifestJson/index.html +0 -146
  54. package/coverage/bundler/webpack/custom_plugins/AddManifestJson/index.js.html +0 -199
  55. package/coverage/bundler/webpack/custom_plugins/AddManifestJson/removeHashFromFileName.js.html +0 -127
  56. package/coverage/bundler/webpack/custom_plugins/VariableConversionCollector/ErrorHandler.js.html +0 -346
  57. package/coverage/bundler/webpack/custom_plugins/VariableConversionCollector/index.html +0 -116
  58. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/constants.js.html +0 -94
  59. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/handleIgnores.js.html +0 -259
  60. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/index.html +0 -236
  61. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/index.js.html +0 -442
  62. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/insertBefore.js.html +0 -154
  63. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/isPreviouslyProcessed.js.html +0 -142
  64. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/replaceUtils.js.html +0 -127
  65. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/separateHoveredSelectorAndNormalSelector.js.html +0 -139
  66. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/specialCases.js.html +0 -184
  67. package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/typeCheckUtils.js.html +0 -193
  68. package/coverage/bundler/webpack/custom_postcss_plugins/SelectorReplace.js.html +0 -292
  69. package/coverage/bundler/webpack/custom_postcss_plugins/ValueReplacer.js.html +0 -223
  70. package/coverage/bundler/webpack/custom_postcss_plugins/VariableModificationPlugin/index.html +0 -116
  71. package/coverage/bundler/webpack/custom_postcss_plugins/VariableModificationPlugin/index.js.html +0 -1126
  72. package/coverage/bundler/webpack/custom_postcss_plugins/index.html +0 -131
  73. package/coverage/bundler/webpack/loaderConfigs/getSpecificPostCssPlugin.js.html +0 -247
  74. package/coverage/bundler/webpack/loaderConfigs/index.html +0 -116
  75. package/coverage/coverage-final.json +0 -4
  76. package/coverage/coverage-summary.json +0 -5
  77. package/coverage/createInitialEntries.js.html +0 -136
  78. package/coverage/dummy.js.html +0 -238
  79. package/coverage/favicon.png +0 -0
  80. package/coverage/index.html +0 -146
  81. package/coverage/index.js.html +0 -169
  82. package/coverage/isObject.js.html +0 -94
  83. package/coverage/isValid.js.html +0 -106
  84. package/coverage/prettify.css +0 -1
  85. package/coverage/prettify.js +0 -2
  86. package/coverage/removeHashFromFileName.js.html +0 -127
  87. package/coverage/sort-arrow-sprite.png +0 -0
  88. package/coverage/sorter.js +0 -196
  89. package/result.json +0 -1
  90. package/unittest/index.html +0 -35
@@ -1,199 +0,0 @@
1
-
2
- <!doctype html>
3
- <html lang="en">
4
-
5
- <head>
6
- <title>Code coverage report for bundler/webpack/custom_plugins/AddManifestJson/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> / <a href="index.html">bundler/webpack/custom_plugins/AddManifestJson</a> index.js</h1>
23
- <div class='clearfix'>
24
-
25
- <div class='fl pad1y space-right2'>
26
- <span class="strong">11.11% </span>
27
- <span class="quiet">Statements</span>
28
- <span class='fraction'>1/9</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'>0/0</span>
36
- </div>
37
-
38
-
39
- <div class='fl pad1y space-right2'>
40
- <span class="strong">0% </span>
41
- <span class="quiet">Functions</span>
42
- <span class='fraction'>0/5</span>
43
- </div>
44
-
45
-
46
- <div class='fl pad1y space-right2'>
47
- <span class="strong">11.11% </span>
48
- <span class="quiet">Lines</span>
49
- <span class='fraction'>1/9</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 low'></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>
95
- <a name='L30'></a><a href='#L30'>30</a>
96
- <a name='L31'></a><a href='#L31'>31</a>
97
- <a name='L32'></a><a href='#L32'>32</a>
98
- <a name='L33'></a><a href='#L33'>33</a>
99
- <a name='L34'></a><a href='#L34'>34</a>
100
- <a name='L35'></a><a href='#L35'>35</a>
101
- <a name='L36'></a><a href='#L36'>36</a>
102
- <a name='L37'></a><a href='#L37'>37</a>
103
- <a name='L38'></a><a href='#L38'>38</a>
104
- <a name='L39'></a><a href='#L39'>39</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
105
- <span class="cline-any cline-neutral">&nbsp;</span>
106
- <span class="cline-any cline-yes">1x</span>
107
- <span class="cline-any cline-neutral">&nbsp;</span>
108
- <span class="cline-any cline-neutral">&nbsp;</span>
109
- <span class="cline-any cline-neutral">&nbsp;</span>
110
- <span class="cline-any cline-no">&nbsp;</span>
111
- <span class="cline-any cline-neutral">&nbsp;</span>
112
- <span class="cline-any cline-neutral">&nbsp;</span>
113
- <span class="cline-any cline-neutral">&nbsp;</span>
114
- <span class="cline-any cline-no">&nbsp;</span>
115
- <span class="cline-any cline-no">&nbsp;</span>
116
- <span class="cline-any cline-no">&nbsp;</span>
117
- <span class="cline-any cline-neutral">&nbsp;</span>
118
- <span class="cline-any cline-neutral">&nbsp;</span>
119
- <span class="cline-any cline-neutral">&nbsp;</span>
120
- <span class="cline-any cline-neutral">&nbsp;</span>
121
- <span class="cline-any cline-neutral">&nbsp;</span>
122
- <span class="cline-any cline-no">&nbsp;</span>
123
- <span class="cline-any cline-neutral">&nbsp;</span>
124
- <span class="cline-any cline-no">&nbsp;</span>
125
- <span class="cline-any cline-no">&nbsp;</span>
126
- <span class="cline-any cline-neutral">&nbsp;</span>
127
- <span class="cline-any cline-neutral">&nbsp;</span>
128
- <span class="cline-any cline-neutral">&nbsp;</span>
129
- <span class="cline-any cline-neutral">&nbsp;</span>
130
- <span class="cline-any cline-neutral">&nbsp;</span>
131
- <span class="cline-any cline-neutral">&nbsp;</span>
132
- <span class="cline-any cline-no">&nbsp;</span>
133
- <span class="cline-any cline-neutral">&nbsp;</span>
134
- <span class="cline-any cline-neutral">&nbsp;</span>
135
- <span class="cline-any cline-neutral">&nbsp;</span>
136
- <span class="cline-any cline-neutral">&nbsp;</span>
137
- <span class="cline-any cline-neutral">&nbsp;</span>
138
- <span class="cline-any cline-neutral">&nbsp;</span>
139
- <span class="cline-any cline-neutral">&nbsp;</span>
140
- <span class="cline-any cline-neutral">&nbsp;</span>
141
- <span class="cline-any cline-neutral">&nbsp;</span>
142
- <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import { createManifestJson } from './createManifestJson';
143
- &nbsp;
144
- const { Compilation } = require('webpack');
145
- &nbsp;
146
- export class AddFileToManifestJson {
147
- <span class="fstat-no" title="function not covered" > co</span>nstructor(options) {
148
- <span class="cstat-no" title="statement not covered" > this.options = options;</span>
149
- }
150
- &nbsp;
151
- <span class="fstat-no" title="function not covered" > ap</span>ply(compiler) {
152
- const { RawSource } = <span class="cstat-no" title="statement not covered" >compiler.webpack.sources;</span>
153
- <span class="cstat-no" title="statement not covered" > compiler.hooks.thisCompilation.tap('MyWebpackPlugin', <span class="fstat-no" title="function not covered" >co</span>mpilation =&gt; {</span>
154
- <span class="cstat-no" title="statement not covered" > compilation.hooks.processAssets.tap(</span>
155
- {
156
- name: 'MyPlugin',
157
- stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE
158
- },
159
- <span class="fstat-no" title="function not covered" > as</span>sets =&gt; {
160
- const { hashDigestLength } = <span class="cstat-no" title="statement not covered" >compilation.outputOptions;</span>
161
- &nbsp;
162
- <span class="cstat-no" title="statement not covered" > this.options.forEach(<span class="fstat-no" title="function not covered" >op</span>tion =&gt; {</span>
163
- const manifestJson = <span class="cstat-no" title="statement not covered" >createManifestJson({</span>
164
- option,
165
- hashDigestLength,
166
- compilation,
167
- assets
168
- });
169
- &nbsp;
170
- <span class="cstat-no" title="statement not covered" > compilation.emitAsset(</span>
171
- option.outputJsonFileName,
172
- new RawSource(JSON.stringify(manifestJson))
173
- );
174
- });
175
- }
176
- );
177
- });
178
- }
179
- }
180
- &nbsp;</pre></td></tr></table></pre>
181
-
182
- <div class='push'></div><!-- for sticky footer -->
183
- </div><!-- /wrapper -->
184
- <div class='footer quiet pad2 space-top1 center small'>
185
- Code coverage generated by
186
- <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
187
- at 2023-05-29T15:48:56.945Z
188
- </div>
189
- <script src="../../../../prettify.js"></script>
190
- <script>
191
- window.onload = function () {
192
- prettyPrint();
193
- };
194
- </script>
195
- <script src="../../../../sorter.js"></script>
196
- <script src="../../../../block-navigation.js"></script>
197
- </body>
198
- </html>
199
-
@@ -1,127 +0,0 @@
1
-
2
- <!doctype html>
3
- <html lang="en">
4
-
5
- <head>
6
- <title>Code coverage report for bundler/webpack/custom_plugins/AddManifestJson/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> / <a href="index.html">bundler/webpack/custom_plugins/AddManifestJson</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">&nbsp;</span>
81
- <span class="cline-any cline-neutral">&nbsp;</span>
82
- <span class="cline-any cline-neutral">&nbsp;</span>
83
- <span class="cline-any cline-yes">37x</span>
84
- <span class="cline-any cline-neutral">&nbsp;</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">&nbsp;</span>
91
- <span class="cline-any cline-neutral">&nbsp;</span>
92
- <span class="cline-any cline-neutral">&nbsp;</span>
93
- <span class="cline-any cline-yes">37x</span>
94
- <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&nbsp;
95
- &nbsp;
96
- export function removeHashFromFileName(fileName, hashDigestLength) {
97
- let outputFileName = '';
98
- &nbsp;
99
- fileName.split('.').forEach(iterateValue =&gt; {
100
- if (outputFileName === '') {
101
- outputFileName += iterateValue;
102
- } else if (iterateValue.length &lt; hashDigestLength) {
103
- outputFileName += `.${iterateValue}`;
104
- }
105
- });
106
- &nbsp;
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:12:25.469Z
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
-