@zohodesk/react-cli 0.0.1-beta.164 → 0.0.1-beta.167

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 (79) hide show
  1. package/README.md +63 -0
  2. package/bin/cli.js +28 -2
  3. package/cert/Tsicsezwild-22-23.crt +37 -0
  4. package/cert/Tsicsezwild-22-23.key +27 -0
  5. package/docs/CustomChunks.md +26 -0
  6. package/docs/DevStart.md +18 -0
  7. package/docs/TODOS.md +10 -0
  8. package/docs/ValueReplacer.md +60 -0
  9. package/docs/warnings_while_install.txt +35 -0
  10. package/eslint/React_CDN.zip +0 -0
  11. package/eslint/a23.c +16 -0
  12. package/eslint/a28.c +25 -0
  13. package/eslint/a29.c +25 -0
  14. package/eslint/a30.c +29 -0
  15. package/eslint/a31.c +23 -0
  16. package/eslint/a35.c +23 -0
  17. package/eslint/a36.c +18 -0
  18. package/eslint/a37.c +25 -0
  19. package/eslint/a38.c +28 -0
  20. package/eslint/a39.c +17 -0
  21. package/eslint/a40.c +32 -0
  22. package/eslint/temp/a +0 -0
  23. package/eslint/temp/a.der +0 -0
  24. package/eslint/temp/a.jks +0 -0
  25. package/eslint/temp/a.p12 +0 -0
  26. package/eslint/temp/a.pfx +0 -0
  27. package/eslint/temp/c.jks +0 -0
  28. package/eslint/temp/package.json +15 -0
  29. package/eslint/temp/pkcs12.keystore +0 -0
  30. package/eslint/temp/pkk.pfx +0 -0
  31. package/eslint/temp/sas.keystore +0 -0
  32. package/eslint/temp/sas.keystore.old +0 -0
  33. package/eslint/testa/build1/index.html +12 -0
  34. package/eslint/testa/build1/js/2_.js +15 -0
  35. package/eslint/testa/build1/js/2_.js.map +1 -0
  36. package/eslint/testa/build1/js/main_.js +40 -0
  37. package/eslint/testa/build1/js/main_.js.map +1 -0
  38. package/eslint/testa/build1/js/runtime~main_.js +251 -0
  39. package/eslint/testa/build1/js/runtime~main_.js.map +1 -0
  40. package/eslint/testa/build2/index.html +12 -0
  41. package/eslint/testa/build2/js/2_.js +15 -0
  42. package/eslint/testa/build2/js/2_.js.map +1 -0
  43. package/eslint/testa/build2/js/3_.js +15 -0
  44. package/eslint/testa/build2/js/3_.js.map +1 -0
  45. package/eslint/testa/build2/js/main_.js +46 -0
  46. package/eslint/testa/build2/js/main_.js.map +1 -0
  47. package/eslint/testa/build2/js/runtime~main_.js +251 -0
  48. package/eslint/testa/build2/js/runtime~main_.js.map +1 -0
  49. package/eslint/testa/package.json +22 -0
  50. package/eslint/testa/scr/chunk1.js +3 -0
  51. package/eslint/testa/scr/chunk2.js +3 -0
  52. package/eslint/testa/scr/index.html +12 -0
  53. package/eslint/testa/scr/index.js +4 -0
  54. package/eslint/testa/scr/utlis.js +12 -0
  55. package/eslint/testa/src/chunk1.js +3 -0
  56. package/eslint/testa/src/index.html +12 -0
  57. package/eslint/testa/src/index.js +3 -0
  58. package/eslint/testa/src/utlis.js +7 -0
  59. package/lib/common/splitChunks.js +57 -10
  60. package/lib/common/testPattern.js +69 -0
  61. package/lib/common/valueReplacer.js +55 -0
  62. package/lib/configs/jest.config.js +6 -1
  63. package/lib/configs/webpack.dev.config.js +3 -2
  64. package/lib/configs/webpack.docs.config.js +31 -26
  65. package/lib/configs/webpack.prod.config.js +4 -3
  66. package/lib/loaderUtils/getCSSLoaders.js +17 -13
  67. package/lib/postcss-plugins/ValueReplacer.js +46 -0
  68. package/lib/schemas/index.js +21 -0
  69. package/lib/servers/devBuild.js +102 -0
  70. package/lib/servers/getCliPath.js +24 -0
  71. package/lib/servers/httpsOptions.js +2 -3
  72. package/lib/servers/nowatchserver.js +9 -84
  73. package/lib/servers/server.js +20 -5
  74. package/lib/utils/repoClone.js +5 -2
  75. package/lib/utils/rtl.js +19 -2
  76. package/lib/utils/useExitCleanup.js +55 -0
  77. package/npm8.md +9 -0
  78. package/package.json +2 -1
  79. package/postpublish.js +6 -0
@@ -0,0 +1,251 @@
1
+ /******/ (function(modules) { // webpackBootstrap
2
+ /******/ // install a JSONP callback for chunk loading
3
+ /******/ function webpackJsonpCallback(data) {
4
+ /******/ var chunkIds = data[0];
5
+ /******/ var moreModules = data[1];
6
+ /******/ var executeModules = data[2];
7
+ /******/
8
+ /******/ // add "moreModules" to the modules object,
9
+ /******/ // then flag all "chunkIds" as loaded and fire callback
10
+ /******/ var moduleId, chunkId, i = 0, resolves = [];
11
+ /******/ for(;i < chunkIds.length; i++) {
12
+ /******/ chunkId = chunkIds[i];
13
+ /******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
14
+ /******/ resolves.push(installedChunks[chunkId][0]);
15
+ /******/ }
16
+ /******/ installedChunks[chunkId] = 0;
17
+ /******/ }
18
+ /******/ for(moduleId in moreModules) {
19
+ /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
20
+ /******/ modules[moduleId] = moreModules[moduleId];
21
+ /******/ }
22
+ /******/ }
23
+ /******/ if(parentJsonpFunction) parentJsonpFunction(data);
24
+ /******/
25
+ /******/ while(resolves.length) {
26
+ /******/ resolves.shift()();
27
+ /******/ }
28
+ /******/
29
+ /******/ // add entry modules from loaded chunk to deferred list
30
+ /******/ deferredModules.push.apply(deferredModules, executeModules || []);
31
+ /******/
32
+ /******/ // run deferred modules when all chunks ready
33
+ /******/ return checkDeferredModules();
34
+ /******/ };
35
+ /******/ function checkDeferredModules() {
36
+ /******/ var result;
37
+ /******/ for(var i = 0; i < deferredModules.length; i++) {
38
+ /******/ var deferredModule = deferredModules[i];
39
+ /******/ var fulfilled = true;
40
+ /******/ for(var j = 1; j < deferredModule.length; j++) {
41
+ /******/ var depId = deferredModule[j];
42
+ /******/ if(installedChunks[depId] !== 0) fulfilled = false;
43
+ /******/ }
44
+ /******/ if(fulfilled) {
45
+ /******/ deferredModules.splice(i--, 1);
46
+ /******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
47
+ /******/ }
48
+ /******/ }
49
+ /******/
50
+ /******/ return result;
51
+ /******/ }
52
+ /******/
53
+ /******/ // The module cache
54
+ /******/ var installedModules = {};
55
+ /******/
56
+ /******/ // object to store loaded and loading chunks
57
+ /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
58
+ /******/ // Promise = chunk loading, 0 = chunk loaded
59
+ /******/ var installedChunks = {
60
+ /******/ 0: 0
61
+ /******/ };
62
+ /******/
63
+ /******/ var deferredModules = [];
64
+ /******/
65
+ /******/ // script path function
66
+ /******/ function jsonpScriptSrc(chunkId) {
67
+ /******/ return __webpack_require__.p + "js/" + ({}[chunkId]||chunkId) + "_.js"
68
+ /******/ }
69
+ /******/
70
+ /******/ // The require function
71
+ /******/ function __webpack_require__(moduleId) {
72
+ /******/
73
+ /******/ // Check if module is in cache
74
+ /******/ if(installedModules[moduleId]) {
75
+ /******/ return installedModules[moduleId].exports;
76
+ /******/ }
77
+ /******/ // Create a new module (and put it into the cache)
78
+ /******/ var module = installedModules[moduleId] = {
79
+ /******/ i: moduleId,
80
+ /******/ l: false,
81
+ /******/ exports: {}
82
+ /******/ };
83
+ /******/
84
+ /******/ // Execute the module function
85
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
86
+ /******/
87
+ /******/ // Flag the module as loaded
88
+ /******/ module.l = true;
89
+ /******/
90
+ /******/ // Return the exports of the module
91
+ /******/ return module.exports;
92
+ /******/ }
93
+ /******/
94
+ /******/ // This file contains only the entry chunk.
95
+ /******/ // The chunk loading function for additional chunks
96
+ /******/ __webpack_require__.e = function requireEnsure(chunkId) {
97
+ /******/ var promises = [];
98
+ /******/
99
+ /******/
100
+ /******/ // JSONP chunk loading for javascript
101
+ /******/
102
+ /******/ var installedChunkData = installedChunks[chunkId];
103
+ /******/ if(installedChunkData !== 0) { // 0 means "already installed".
104
+ /******/
105
+ /******/ // a Promise means "currently loading".
106
+ /******/ if(installedChunkData) {
107
+ /******/ promises.push(installedChunkData[2]);
108
+ /******/ } else {
109
+ /******/ // setup Promise in chunk cache
110
+ /******/ var promise = new Promise(function(resolve, reject) {
111
+ /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
112
+ /******/ });
113
+ /******/ promises.push(installedChunkData[2] = promise);
114
+ /******/
115
+ /******/ // start chunk loading
116
+ /******/ var script = document.createElement('script');
117
+ /******/ var onScriptComplete;
118
+ /******/
119
+ /******/ script.charset = 'utf-8';
120
+ /******/ script.timeout = 120;
121
+ /******/ if (__webpack_require__.nc) {
122
+ /******/ script.setAttribute("nonce", __webpack_require__.nc);
123
+ /******/ }
124
+ /******/ script.src = jsonpScriptSrc(chunkId);
125
+ /******/
126
+ /******/ // create error before stack unwound to get useful stacktrace later
127
+ /******/ var error = new Error();
128
+ /******/ onScriptComplete = function (event) {
129
+ /******/ // avoid mem leaks in IE.
130
+ /******/ script.onerror = script.onload = null;
131
+ /******/ clearTimeout(timeout);
132
+ /******/ var chunk = installedChunks[chunkId];
133
+ /******/ if(chunk !== 0) {
134
+ /******/ if(chunk) {
135
+ /******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
136
+ /******/ var realSrc = event && event.target && event.target.src;
137
+ /******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
138
+ /******/ error.name = 'ChunkLoadError';
139
+ /******/ error.type = errorType;
140
+ /******/ error.request = realSrc;
141
+ /******/ chunk[1](error);
142
+ /******/ }
143
+ /******/ installedChunks[chunkId] = undefined;
144
+ /******/ }
145
+ /******/ };
146
+ /******/ var timeout = setTimeout(function(){
147
+ /******/ onScriptComplete({ type: 'timeout', target: script });
148
+ /******/ }, 120000);
149
+ /******/ script.onerror = script.onload = onScriptComplete;
150
+ /******/ document.head.appendChild(script);
151
+ /******/ }
152
+ /******/ }
153
+ /******/ return Promise.all(promises);
154
+ /******/ };
155
+ /******/
156
+ /******/ // expose the modules object (__webpack_modules__)
157
+ /******/ __webpack_require__.m = modules;
158
+ /******/
159
+ /******/ // expose the module cache
160
+ /******/ __webpack_require__.c = installedModules;
161
+ /******/
162
+ /******/ // define getter function for harmony exports
163
+ /******/ __webpack_require__.d = function(exports, name, getter) {
164
+ /******/ if(!__webpack_require__.o(exports, name)) {
165
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
166
+ /******/ }
167
+ /******/ };
168
+ /******/
169
+ /******/ // define __esModule on exports
170
+ /******/ __webpack_require__.r = function(exports) {
171
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
172
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
173
+ /******/ }
174
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
175
+ /******/ };
176
+ /******/
177
+ /******/ // create a fake namespace object
178
+ /******/ // mode & 1: value is a module id, require it
179
+ /******/ // mode & 2: merge all properties of value into the ns
180
+ /******/ // mode & 4: return value when already ns object
181
+ /******/ // mode & 8|1: behave like require
182
+ /******/ __webpack_require__.t = function(value, mode) {
183
+ /******/ if(mode & 1) value = __webpack_require__(value);
184
+ /******/ if(mode & 8) return value;
185
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
186
+ /******/ var ns = Object.create(null);
187
+ /******/ __webpack_require__.r(ns);
188
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
189
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
190
+ /******/ return ns;
191
+ /******/ };
192
+ /******/
193
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
194
+ /******/ __webpack_require__.n = function(module) {
195
+ /******/ var getter = module && module.__esModule ?
196
+ /******/ function getDefault() { return module['default']; } :
197
+ /******/ function getModuleExports() { return module; };
198
+ /******/ __webpack_require__.d(getter, 'a', getter);
199
+ /******/ return getter;
200
+ /******/ };
201
+ /******/
202
+ /******/ // Object.prototype.hasOwnProperty.call
203
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
204
+ /******/
205
+ /******/ // __webpack_public_path__
206
+ /******/ __webpack_require__.p = "https://kumar-zt375.tsi.zohocorpin.com:9090/app/";
207
+ /******/
208
+ /******/ __webpack_require__.getChunkId = function getChunkId(chunkId) {
209
+ /******/ return chunkId;
210
+ /******/ }
211
+ /******/ // Prefetch a chunk (prefetch-preload-chunk-plugin)
212
+ /******/ __webpack_require__.pfc = function prefetchChunk(chunkId) {
213
+ /******/ chunkId = __webpack_require__.getChunkId(chunkId)
214
+ /******/ __webpack_require__.e(chunkId);
215
+ /******/ };
216
+ /******/ // Preload a chunk (prefetch-preload-chunk-plugin)
217
+ /******/ __webpack_require__.plc = function preloadChunk(chunkId) {
218
+ /******/ chunkId = __webpack_require__.getChunkId(chunkId)
219
+ /******/ if(installedChunks[chunkId] === undefined) {
220
+ /******/ installedChunks[chunkId] = null;
221
+ /******/ var link = document.createElement('link');
222
+ /******/
223
+ /******/ link.charset = 'utf-8';
224
+ /******/ if (__webpack_require__.nc) {
225
+ /******/ link.setAttribute("nonce", __webpack_require__.nc);
226
+ /******/ }
227
+ /******/ link.rel = "preload";
228
+ /******/ link.as = "script";
229
+ /******/ link.href = jsonpScriptSrc(chunkId);
230
+ /******/ document.head.appendChild(link);
231
+ /******/ __webpack_require__.e(chunkId);
232
+ /******/ }
233
+ /******/ };
234
+ /******/
235
+ /******/ // on error function for async loading
236
+ /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
237
+ /******/
238
+ /******/ var jsonpArray = window["appJsonp"] = window["appJsonp"] || [];
239
+ /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
240
+ /******/ jsonpArray.push = webpackJsonpCallback;
241
+ /******/ jsonpArray = jsonpArray.slice();
242
+ /******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
243
+ /******/ var parentJsonpFunction = oldJsonpFunction;
244
+ /******/
245
+ /******/
246
+ /******/ // run deferred modules from other chunks
247
+ /******/ checkDeferredModules();
248
+ /******/ })
249
+ /************************************************************************/
250
+ /******/ ([]);
251
+ //# sourceMappingURL=runtime~main_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"js/./runtime~main_.js","sources":["webpack:///webpack/bootstrap"],"sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"js/\" + ({}[chunkId]||chunkId) + \"_.js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"https://kumar-zt375.tsi.zohocorpin.com:9090/app/\";\n\n \t__webpack_require__.getChunkId = function getChunkId(chunkId) {\n \t\treturn chunkId;\n \t}\n \t// Prefetch a chunk (prefetch-preload-chunk-plugin)\n \t__webpack_require__.pfc = function prefetchChunk(chunkId) {\n \t\tchunkId = __webpack_require__.getChunkId(chunkId)\n \t\t__webpack_require__.e(chunkId);\n \t};\n \t// Preload a chunk (prefetch-preload-chunk-plugin)\n \t__webpack_require__.plc = function preloadChunk(chunkId) {\n \t\tchunkId = __webpack_require__.getChunkId(chunkId)\n \t\tif(installedChunks[chunkId] === undefined) {\n \t\t\tinstalledChunks[chunkId] = null;\n \t\t\tvar link = document.createElement('link');\n\n \t\t\tlink.charset = 'utf-8';\n \t\t\tif (__webpack_require__.nc) {\n \t\t\t\tlink.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t}\n \t\t\tlink.rel = \"preload\";\n \t\t\tlink.as = \"script\";\n \t\t\tlink.href = jsonpScriptSrc(chunkId);\n \t\t\tdocument.head.appendChild(link);\n \t\t\t__webpack_require__.e(chunkId);\n \t\t}\n \t};\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"appJsonp\"] = window[\"appJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;A","sourceRoot":""}
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "testa",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "build": "react-cli build",
8
+ "clean": "rm -r build1 build2",
9
+ "b1": "npm run build --output_folder=build3 --app_folder=src",
10
+ "b2": "npm run build --output_folder=build4 --app_folder=scr",
11
+ "b": "npm run b1 && npm run b2",
12
+ "test": "echo \"Error: no test specified\" && exit 1"
13
+ },
14
+ "keywords": [],
15
+ "author": "ponkumar.s <nksponkumar@gmail.com>",
16
+ "license": "ISC",
17
+ "react-cli": {
18
+ "app": {
19
+ "sourcemap": "cheap-source-map"
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,3 @@
1
+ import { justVeryBigVeryVeryVeryBigNamesay } from"./utlis";
2
+
3
+ justVeryBigVeryVeryVeryBigNamesay("welcome to chunk1");
@@ -0,0 +1,3 @@
1
+ import { b } from "./utlis";
2
+
3
+ b("to chunk2");
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Document</title>
8
+ </head>
9
+ <body>
10
+
11
+ </body>
12
+ </html>
@@ -0,0 +1,4 @@
1
+ import { justVeryVeryVeryVeryBigNamesayHello } from "./utlis";
2
+ import("./chunk1")
3
+ import("./chunk2")
4
+ justVeryVeryVeryVeryBigNamesayHello();
@@ -0,0 +1,12 @@
1
+ export function b(text) {
2
+ console.log("welcome everyone");
3
+ console.log(text);
4
+ }
5
+
6
+ export function justVeryVeryVeryVeryBigNamesayHello() {
7
+ console.log("hello");
8
+ }
9
+ export function justVeryBigVeryVeryVeryBigNamesay(text) {
10
+ console.log("hello");
11
+ console.log("text", text);
12
+ }
@@ -0,0 +1,3 @@
1
+ import { justVeryBigVeryVeryVeryBigNamesay } from "./utlis";
2
+
3
+ justVeryBigVeryVeryVeryBigNamesay("welcome to chunk1");
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Document</title>
8
+ </head>
9
+ <body>
10
+ <div>Hello world</div>
11
+ </body>
12
+ </html>
@@ -0,0 +1,3 @@
1
+ import { justVeryVeryVeryVeryBigNamesayHello } from "./utlis";
2
+ import("./chunk1")
3
+ justVeryVeryVeryVeryBigNamesayHello();
@@ -0,0 +1,7 @@
1
+ export function justVeryVeryVeryVeryBigNamesayHello() {
2
+ console.log("hello");
3
+ }
4
+ export function justVeryBigVeryVeryVeryBigNamesay(text) {
5
+ console.log("hello");
6
+ console.log("text", text);
7
+ }
@@ -7,9 +7,11 @@ exports.default = void 0;
7
7
 
8
8
  var _path = _interopRequireDefault(require("path"));
9
9
 
10
+ var _os = _interopRequireDefault(require("os"));
11
+
10
12
  var _utils = require("../utils");
11
13
 
12
- var _os = _interopRequireDefault(require("os"));
14
+ var _testPattern = require("./testPattern");
13
15
 
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
17
 
@@ -47,30 +49,75 @@ let defaultChunks = {
47
49
  chunks: 'all',
48
50
  minChunks: 1,
49
51
  test: isReact,
52
+ enforce: true,
53
+ // priority: 10
50
54
  priority: -10
51
55
  },
52
56
  vendor: {
53
57
  name: 'vendor',
54
58
  chunks: 'all',
59
+ // chunks: 'initial',
55
60
  minChunks: 1,
56
61
  test: isVendor,
62
+ // priority: 19,
57
63
  priority: -10
58
64
  }
59
65
  };
60
66
  let customChunksConfig = {};
61
- customChunks.map(({
67
+ customChunks.map((obj, index) => ({
68
+ name: obj.name,
69
+ pattern: obj.pattern,
70
+ minChunks: obj.minChunks || obj.size || 2,
71
+ rules: obj.rules,
72
+ // includeDepenency: obj.includeDepenency || false,
73
+ priority: obj.priority || -10 * (index + 2),
74
+ enforce: obj.enforce || true,
75
+ maxSize: obj.maxSize,
76
+ // || 0,
77
+ minSize: obj.minSize,
78
+ // || 20000,
79
+ chunks: obj.chunks || 'all'
80
+ })).map(({
62
81
  name,
63
82
  pattern,
64
- size = 2
65
- }, index) => customChunksConfig[name] = {
66
- name,
67
- test: new RegExp(isWindows ? pattern.replace(/\//g, '\\') : pattern),
68
- chunks: 'all',
69
- enforce: true,
70
- minChunks: size,
71
- priority: -10 * (index + 2)
83
+ minChunks,
84
+ rules,
85
+ priority,
86
+ // includeDepenency,
87
+ enforce,
88
+ minSize,
89
+ maxSize,
90
+ chunks = 'all'
91
+ }) => {
92
+ let obj = {
93
+ name,
94
+ test: rules ? m => {
95
+ const {
96
+ userRequest
97
+ } = m;
98
+ return (0, _testPattern.testPattern)(userRequest, rules); // return (
99
+ // pkgs.some(p => isRelated(userRequest, p)) ||
100
+ // (includeDepenency && isDependency(m, pkgs))
101
+ // );
102
+ } : new RegExp(isWindows ? pattern.replace(/\//g, '\\') : pattern),
103
+ chunks,
104
+ enforce,
105
+ minChunks,
106
+ priority
107
+ };
108
+
109
+ if (minSize !== undefined) {
110
+ obj.minSize = minSize;
111
+ }
112
+
113
+ if (maxSize !== undefined) {
114
+ obj.maxSize = maxSize;
115
+ }
116
+
117
+ return customChunksConfig[name] = obj;
72
118
  });
73
119
  var _default = {
120
+ minSize: 12000,
74
121
  cacheGroups: Object.assign({
75
122
  default: false,
76
123
  vendors: false
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isDependency = isDependency;
7
+ exports.isRelatedPackage = exports.isRelated = void 0;
8
+ exports.testPattern = testPattern;
9
+
10
+ var _path = require("path");
11
+
12
+ // in our development we only use windows, mac and linux
13
+ const isWindows = _path.sep !== '/'; // this function will return true if pattern matched
14
+
15
+ function _testPattern(req, pattern) {
16
+ let modifyedPattern = pattern;
17
+
18
+ if (/[*.$^]/.test(modifyedPattern)) {
19
+ if (isWindows) {
20
+ // modifyedPattern = pattern.replace(/\//g, ps.replace(/\\/g, '\\\\'));
21
+ modifyedPattern = modifyedPattern.replace(/\//g, '\\\\');
22
+ }
23
+
24
+ modifyedPattern = modifyedPattern.replace(/\./g, '\\.').replace(/\*/g, '.*');
25
+ const re = new RegExp(modifyedPattern);
26
+ return re.test(req);
27
+ }
28
+
29
+ if (isWindows) {
30
+ // modifyedPattern = pattern.replace(/\//g, ps.replace(/\\/g, '\\\\'));
31
+ modifyedPattern = modifyedPattern.replace(/\//g, '\\');
32
+ }
33
+
34
+ return req.indexOf(modifyedPattern) !== -1;
35
+ }
36
+
37
+ function testPattern(req, pattern) {
38
+ if (!req || !pattern) {
39
+ return false;
40
+ }
41
+
42
+ if (Array.isArray(pattern)) {
43
+ // eslint-disable-next-line no-unused-vars
44
+ return pattern.every(p => testPattern(req, p));
45
+ }
46
+
47
+ if (pattern[0] === '!') {
48
+ return !_testPattern(req, pattern.slice(1));
49
+ }
50
+
51
+ return _testPattern(req, pattern);
52
+ }
53
+
54
+ const isRelated = (req, item) => req && req.indexOf(item) !== -1; // export const isRelated = (req, item) => testPattern(req, item);
55
+
56
+
57
+ exports.isRelated = isRelated;
58
+
59
+ const isRelatedPackage = (req, item) => isRelated(req, `node_modules${_path.sep}${item}${_path.sep}`) !== -1; // export const isRelated = (req, item) => testPattern(req, item);
60
+
61
+
62
+ exports.isRelatedPackage = isRelatedPackage;
63
+
64
+ function isDependency(m, excludeList) {
65
+ // let reasons = m.reasons.map(r => r.module.userRequest);
66
+ // m.reasons.some(r => !r.module || !r.module.userRequest) && console.log(m.reasons);
67
+ return m.reasons.some(r => excludeList.some(item => r.module && isRelated(r.module.userRequest, item)));
68
+ } // export function queryHandler(conditions, pattern) {
69
+ // }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ var _postcss = _interopRequireDefault(require("postcss"));
4
+
5
+ var _path = _interopRequireDefault(require("path"));
6
+
7
+ var _fs = _interopRequireDefault(require("fs"));
8
+
9
+ var _folderIterator = _interopRequireDefault(require("../utils/folderIterator"));
10
+
11
+ var _utils = require("../utils");
12
+
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+
15
+ const cwd = process.cwd();
16
+
17
+ const src = _path.default.join(cwd, process.argv[2]);
18
+
19
+ const dist = _path.default.join(cwd, process.argv[3]);
20
+
21
+ const docopy = process.argv[4] === 'true';
22
+ const {
23
+ css: {
24
+ valueReplacer
25
+ }
26
+ } = (0, _utils.getOptions)();
27
+
28
+ if (!_fs.default.existsSync(dist)) {
29
+ _fs.default.mkdirSync(dist, {
30
+ recursive: true
31
+ });
32
+ }
33
+
34
+ (0, _folderIterator.default)(src, dist, docopy ? false : ['.css'], false, (fromPath, toPath) => {
35
+ //console.log({ fromPath: fromPath, toPath: toPath });
36
+ let css = _fs.default.readFileSync(fromPath);
37
+
38
+ if (docopy && !fromPath.endsWith('.css')) {
39
+ //console.log(toPath,'....');
40
+ _fs.default.writeFileSync(toPath, css);
41
+
42
+ return;
43
+ }
44
+
45
+ (0, _postcss.default)([valueReplacer && require('../postcss-plugins/ValueReplacer')(valueReplacer)]).process(css, {
46
+ from: fromPath,
47
+ to: toPath
48
+ }).then(result => {
49
+ _fs.default.writeFile(toPath, result.css, () => true);
50
+
51
+ if (result.map) {
52
+ _fs.default.writeFile(`${toPath}.map`, result.map, () => true);
53
+ }
54
+ });
55
+ });
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ var _fs = require("fs");
4
+
3
5
  var _path = _interopRequireDefault(require("path"));
4
6
 
5
7
  var _libAlias = require("./libAlias");
@@ -13,6 +15,9 @@ let moduleNameMapper = Object.keys(_libAlias.libAlias).reduce((previousValue, ke
13
15
  previousValue[`^${key}(.*)$`] = `${_libAlias.libAlias[key]}$1`;
14
16
  return previousValue;
15
17
  }, {});
18
+
19
+ const appGlobals = _path.default.resolve(appPath, '__testUtils__', 'globals.js');
20
+
16
21
  let commonConfig = {
17
22
  coverageReporters: ['json', 'html', 'json-summary', 'text'],
18
23
  collectCoverage: true,
@@ -28,7 +33,7 @@ let commonConfig = {
28
33
  transformIgnorePatterns: ['/node_modules/(?!(@zohodesk)/)'],
29
34
  // transformIgnorePatterns: ['/node_modules.*?.js$'],
30
35
  moduleFileExtensions: ['js'],
31
- setupFiles: [_path.default.resolve(appPath, '__testUtils__', 'globals.js'), _path.default.resolve(__dirname, '..', 'jest', 'setup.js')],
36
+ setupFiles: [(0, _fs.existsSync)(appGlobals) && appGlobals, _path.default.resolve(__dirname, '..', 'jest', 'setup.js')].filter(Boolean),
32
37
  globals: {
33
38
  __DEVELOPMENT__: true,
34
39
  __DOCS__: false,
@@ -16,6 +16,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
16
16
 
17
17
  let options = (0, _utils.getOptions)();
18
18
  let {
19
+ unstableDepsInverse,
19
20
  app: {
20
21
  folder,
21
22
  context,
@@ -131,10 +132,10 @@ module.exports = {
131
132
  ZC: '$ZC'
132
133
  },
133
134
  resolve: {
134
- modules: [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
135
+ modules: unstableDepsInverse ? ['node_modules', _path.default.resolve(__dirname, '..', '..', 'node_modules')] : [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
135
136
  alias: disableES5Transpile ? _libAlias.libAlias : {}
136
137
  },
137
138
  resolveLoader: {
138
- modules: [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules']
139
+ modules: unstableDepsInverse ? ['node_modules', _path.default.resolve(__dirname, '..', '..', 'node_modules')] : [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules']
139
140
  }
140
141
  };