@zohodesk/react-cli 1.1.19-exp.3 → 1.1.19-exp.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. package/lib/configs/webpack.prod.config.js +2 -2
  2. package/lib/loaderUtils/getDevJsLoaders.js +2 -2
  3. package/lib/loaders/workerLoader.js +24 -39
  4. package/lib/pluginUtils/configHtmlWebpackPlugins.js +2 -9
  5. package/lib/pluginUtils/getDevPlugins.js +2 -4
  6. package/lib/pluginUtils/getProdPlugins.js +1 -3
  7. package/lib/schemas/index.js +1 -2
  8. package/npm-shrinkwrap.json +55 -19082
  9. package/package.json +4 -1
  10. package/packages/client_build_tool/lib/allCommandsConfigs.js +0 -23
  11. package/packages/client_build_tool/lib/buildToolLoggers.js +0 -32
  12. package/packages/client_build_tool/lib/commands/build/commandExecutor.js +0 -21
  13. package/packages/client_build_tool/lib/commands/build/config.js +0 -12
  14. package/packages/client_build_tool/lib/commands/build/errorHander.js +0 -10
  15. package/packages/client_build_tool/lib/commands/build/index.js +0 -35
  16. package/packages/client_build_tool/lib/commands/build/optionsProcesser.js +0 -40
  17. package/packages/client_build_tool/lib/commands/buildEs/commandExecutor.js +0 -17
  18. package/packages/client_build_tool/lib/commands/buildEs/config.js +0 -12
  19. package/packages/client_build_tool/lib/commands/buildLib/commandExecutor.js +0 -17
  20. package/packages/client_build_tool/lib/commands/buildLib/config.js +0 -12
  21. package/packages/client_build_tool/lib/commands/start/commandExecutor.js +0 -13
  22. package/packages/client_build_tool/lib/commands/start/config.js +0 -12
  23. package/packages/client_build_tool/lib/commands/start/deprecationHandler.js +0 -10
  24. package/packages/client_build_tool/lib/commands/start/errorHander.js +0 -10
  25. package/packages/client_build_tool/lib/commands/start/optionsProcesser.js +0 -36
  26. package/packages/client_build_tool/lib/commands/start/postProcesser.js +0 -10
  27. package/packages/client_build_tool/lib/commands/start/preProcesser.js +0 -10
  28. package/packages/client_build_tool/lib/commandsRouter.js +0 -71
  29. package/packages/client_build_tool/lib/shared/bundler/webpack/common/decidePublicPath.js +0 -44
  30. package/packages/client_build_tool/lib/shared/bundler/webpack/common/libAlias.js +0 -31
  31. package/packages/client_build_tool/lib/shared/bundler/webpack/common/nameTemplates.js +0 -51
  32. package/packages/client_build_tool/lib/shared/bundler/webpack/common/resourceBasedPublicPath.js +0 -21
  33. package/packages/client_build_tool/lib/shared/bundler/webpack/cssLoaders.js +0 -16
  34. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/CdnChangePlugin.js +0 -111
  35. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/EFCPlugin.js +0 -1
  36. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/ContributionGuide.md +0 -11
  37. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nKeysIdentifer.js +0 -136
  38. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nSplit.md +0 -95
  39. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/README.md +0 -25
  40. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/constants.js +0 -29
  41. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/createHash.js +0 -24
  42. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nDependency.js +0 -99
  43. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nLoadingRuntimeModule.js +0 -81
  44. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nModule.js +0 -201
  45. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/index.js +0 -401
  46. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/optionsHandler.js +0 -67
  47. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/pathCreator.js +0 -23
  48. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/readI18nValues.js +0 -29
  49. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateFileName.js +0 -49
  50. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateHashHelpers.js +0 -77
  51. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/collectI18nKeys.js +0 -63
  52. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/hashUtils.js +0 -19
  53. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/index.js +0 -31
  54. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/propertiesUtils.js +0 -127
  55. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RTLSplitPlugin.js +0 -1
  56. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/OverwriteCssPathForRTL.js +0 -63
  57. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtlCssPlugin.js +0 -89
  58. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtrSplit.md +0 -34
  59. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/replaceCssDirTemplate.js +0 -15
  60. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPlugin.js +0 -155
  61. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/UglifyCSSPlugin.js +0 -49
  62. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_postcss_loaders/ExcludePlugin.js +0 -58
  63. package/packages/client_build_tool/lib/shared/bundler/webpack/custom_postcss_loaders/RTLSplitPlugin.js +0 -139
  64. package/packages/client_build_tool/lib/shared/bundler/webpack/devServerConfig.js +0 -34
  65. package/packages/client_build_tool/lib/shared/bundler/webpack/getCSSLoaders.js +0 -30
  66. package/packages/client_build_tool/lib/shared/bundler/webpack/jsLoaders.js +0 -17
  67. package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/assetLoaders.js +0 -14
  68. package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/babelLoaderConfig.js +0 -24
  69. package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configHtmlTemplateLoader.js +0 -18
  70. package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configWebWorkerLoader.js +0 -21
  71. package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configsAssetsLoaders.js +0 -138
  72. package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/cssClassNameGenerate.js +0 -83
  73. package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/getCssLoaderOptions.js +0 -23
  74. package/packages/client_build_tool/lib/shared/bundler/webpack/loaders/workerLoader.js +0 -133
  75. package/packages/client_build_tool/lib/shared/bundler/webpack/optimizationConfig.js +0 -39
  76. package/packages/client_build_tool/lib/shared/bundler/webpack/outputConfig.js +0 -28
  77. package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCdnChangePlugin.js +0 -18
  78. package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCopyThirdpartyFile.js +0 -38
  79. package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configEnvVariables.js +0 -24
  80. package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configHtmlWebpackPlugin.js +0 -28
  81. package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configI18nSplitPlugin.js +0 -35
  82. package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configIgnorePlugin.js +0 -16
  83. package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configMiniCSSExtractPlugin.js +0 -23
  84. package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configProgressPlugin.js +0 -19
  85. package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configRtlCssPlugin.js +0 -27
  86. package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configServiceWorkerPlugin.js +0 -18
  87. package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configUglifyCSSPlugin.js +0 -15
  88. package/packages/client_build_tool/lib/shared/bundler/webpack/plugins.js +0 -39
  89. package/packages/client_build_tool/lib/shared/bundler/webpack/postcssPlugins.js +0 -36
  90. package/packages/client_build_tool/lib/shared/bundler/webpack/resolvers.js +0 -42
  91. package/packages/client_build_tool/lib/shared/bundler/webpack/splitChunksConfig.js +0 -12
  92. package/packages/client_build_tool/lib/shared/bundler/webpack/webpack.dev.config.js +0 -17
  93. package/packages/client_build_tool/lib/shared/bundler/webpack/webpackBuild.js +0 -24
  94. package/packages/client_build_tool/lib/shared/bundler/webpack/webpackConfig.js +0 -50
  95. package/packages/client_build_tool/lib/shared/commands-utlis/doBasicRequiermentCheck.js +0 -16
  96. package/packages/client_build_tool/lib/shared/commands-utlis/getCliPath.js +0 -38
  97. package/packages/client_build_tool/lib/shared/commands-utlis/index.js +0 -29
  98. package/packages/client_build_tool/lib/shared/commands-utlis/log.js +0 -13
  99. package/packages/client_build_tool/lib/shared/commands-utlis/readArgsFormCommandLine.js +0 -11
  100. package/packages/client_build_tool/lib/shared/commands-utlis/readOptionFormCommandLine.js +0 -11
  101. package/packages/client_build_tool/lib/shared/commands-utlis/spanSync.js +0 -35
  102. package/packages/client_build_tool/lib/shared/constants.js +0 -33
  103. package/packages/client_build_tool/lib/shared/schemas/applyValuesToShema.js +0 -37
  104. package/packages/client_build_tool/lib/shared/schemas/cliArgsToObject.js +0 -37
  105. package/packages/client_build_tool/lib/shared/schemas/defaultConfigValues.js +0 -119
  106. package/packages/client_build_tool/lib/shared/schemas/deprecatedOptionsHandler.js +0 -65
  107. package/packages/client_build_tool/lib/shared/schemas/getCWD.js +0 -23
  108. package/packages/client_build_tool/lib/shared/schemas/getNpmVersion.js +0 -21
  109. package/packages/client_build_tool/lib/shared/schemas/npmConfigToObject.js +0 -32
  110. package/packages/client_build_tool/lib/shared/schemas/oldDefaultConfigValues.js +0 -480
  111. package/packages/client_build_tool/lib/shared/schemas/readOptions.js +0 -55
  112. package/packages/client_build_tool/lib/shared/schemas/readOptionsForPackageJson.js +0 -26
  113. package/packages/client_build_tool/lib/shared/schemas/readOptionsOld.js +0 -152
  114. package/packages/client_build_tool/lib/shared/server/cert/Tsicsezwild-22-23.crt +0 -37
  115. package/packages/client_build_tool/lib/shared/server/cert/Tsicsezwild-22-23.key +0 -27
  116. package/packages/client_build_tool/lib/shared/server/configWebpackDevMiddleware.js +0 -40
  117. package/packages/client_build_tool/lib/shared/server/corsHandleing.js +0 -28
  118. package/packages/client_build_tool/lib/shared/server/getIp.js +0 -30
  119. package/packages/client_build_tool/lib/shared/server/getServerURL.js +0 -29
  120. package/packages/client_build_tool/lib/shared/server/httpsOptions.js +0 -53
  121. package/packages/client_build_tool/lib/shared/server/initExpressApp.js +0 -19
  122. package/packages/client_build_tool/lib/shared/server/initialHTMLHandling.js +0 -66
  123. package/packages/client_build_tool/lib/shared/server/serveContextFiles.js +0 -24
  124. package/packages/client_build_tool/lib/shared/server/serverBywebpackDevMiddleware.js +0 -40
  125. package/packages/client_build_tool/lib/shared/server/startHttpServer.js +0 -26
  126. package/packages/client_build_tool/lib/shared/server/startHttpsServer.js +0 -34
  127. package/packages/client_build_tool/lib/shared/server/unwanted/addHttp2Server.js +0 -41
  128. package/packages/client_build_tool/lib/shared/server/unwanted/configWebpackDevMiddleware.js +0 -44
  129. package/packages/client_build_tool/lib/shared/server/unwanted/devServerUtlis.js +0 -1
  130. package/packages/client_build_tool/lib/shared/server/unwanted/mockApiSupport.js +0 -19
  131. package/packages/client_build_tool/lib/shared/server/unwanted/webpackConfig.js +0 -32
  132. package/packages/client_build_tool/lib/shared/server/unwanted/websocketMockSetup.js +0 -48
  133. package/packages/client_build_tool/lib/shared/server/urlConcat.js +0 -25
  134. package/packages/client_build_tool/lib/shared/utils/utils.js +0 -1
  135. package/packages/client_build_tool/node_modules/history/CHANGES.md +0 -395
  136. package/packages/client_build_tool/node_modules/history/DOMUtils.js +0 -3
  137. package/packages/client_build_tool/node_modules/history/ExecutionEnvironment.js +0 -3
  138. package/packages/client_build_tool/node_modules/history/LICENSE +0 -21
  139. package/packages/client_build_tool/node_modules/history/LocationUtils.js +0 -3
  140. package/packages/client_build_tool/node_modules/history/PathUtils.js +0 -3
  141. package/packages/client_build_tool/node_modules/history/README.md +0 -282
  142. package/packages/client_build_tool/node_modules/history/cjs/history.js +0 -933
  143. package/packages/client_build_tool/node_modules/history/cjs/history.min.js +0 -1
  144. package/packages/client_build_tool/node_modules/history/createBrowserHistory.js +0 -3
  145. package/packages/client_build_tool/node_modules/history/createHashHistory.js +0 -3
  146. package/packages/client_build_tool/node_modules/history/createMemoryHistory.js +0 -3
  147. package/packages/client_build_tool/node_modules/history/createTransitionManager.js +0 -3
  148. package/packages/client_build_tool/node_modules/history/es/DOMUtils.js +0 -7
  149. package/packages/client_build_tool/node_modules/history/es/ExecutionEnvironment.js +0 -7
  150. package/packages/client_build_tool/node_modules/history/es/LocationUtils.js +0 -7
  151. package/packages/client_build_tool/node_modules/history/es/PathUtils.js +0 -7
  152. package/packages/client_build_tool/node_modules/history/es/createBrowserHistory.js +0 -7
  153. package/packages/client_build_tool/node_modules/history/es/createHashHistory.js +0 -7
  154. package/packages/client_build_tool/node_modules/history/es/createMemoryHistory.js +0 -7
  155. package/packages/client_build_tool/node_modules/history/es/createTransitionManager.js +0 -7
  156. package/packages/client_build_tool/node_modules/history/es/warnAboutDeprecatedESMImport.js +0 -35
  157. package/packages/client_build_tool/node_modules/history/esm/history.js +0 -904
  158. package/packages/client_build_tool/node_modules/history/index.js +0 -7
  159. package/packages/client_build_tool/node_modules/history/package.json +0 -117
  160. package/packages/client_build_tool/node_modules/history/umd/history.js +0 -1059
  161. package/packages/client_build_tool/node_modules/history/umd/history.min.js +0 -1
  162. package/packages/client_build_tool/node_modules/history/warnAboutDeprecatedCJSRequire.js +0 -35
@@ -1,65 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.deprecatedOptionsHandler = deprecatedOptionsHandler;
7
-
8
- var _buildToolLoggers = require("../../buildToolLoggers");
9
-
10
- function selectn(obj, key) {
11
- let temp = obj;
12
- const keys = key.split('.');
13
-
14
- for (let i = 0; i < keys.length; i++) {
15
- const element = keys[i];
16
- temp = temp && temp[element];
17
- }
18
-
19
- return temp;
20
- }
21
-
22
- function selectnu(obj, key, value) {
23
- let temp = obj;
24
- const keys = key.split('.');
25
- let i = 0;
26
-
27
- for (; i < keys.length - 1; i++) {
28
- const element = keys[i];
29
- temp = temp && temp[element];
30
- }
31
-
32
- temp[keys[i]] = value;
33
- }
34
-
35
- function deprecatedOptionsHandler(options) {
36
- function checkAndupdateAndPrintWaring(oldKey, newkey) {
37
- const oldVal = selectn(options, oldKey);
38
- const newVal = selectn(options, newkey); // console.log({ oldVal, newVal });
39
-
40
- if (oldVal !== undefined && newVal === undefined) {
41
- selectnu(options, newkey, newVal);
42
- (0, _buildToolLoggers.warnLogger)(`"${oldKey}" deprecated use "${newkey}" instead`);
43
- }
44
- } // return;
45
-
46
-
47
- checkAndupdateAndPrintWaring('app.context', 'context'); // TODO handle deprecations here
48
- // we will finish this logic later when options are confirmed
49
-
50
- if (selectn(options, 'app.hasRTL') === true) {
51
- options.app.plugins.hasRTL = true;
52
- }
53
-
54
- if (selectn(options, 'docs.hasRTL') === true) {
55
- options.docs.plugins.hasRTL = true;
56
- }
57
-
58
- if (selectn(options, 'app.rtlExclude.length') > 0) {
59
- options.app.exclude.rtl = selectn(options, 'app.rtlExclude');
60
- }
61
-
62
- if (selectn(options, 'docs.rtlExclude.length') > 0) {
63
- options.docs.exclude.rtl = selectn(options, 'docs.rtlExclude');
64
- }
65
- }
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getCWD = getCWD;
7
-
8
- var _child_process = require("child_process");
9
-
10
- function getCWD() {
11
- // require("child_process").
12
- let cwd = process.cwd();
13
-
14
- try {
15
- let ress = (0, _child_process.execSync)('npm bin').toString();
16
- let i = ress.lastIndexOf('node_modules');
17
- cwd = i === -1 ? cwd : ress.slice(0, i);
18
- } catch (error) {
19
- console.log(error);
20
- }
21
-
22
- return cwd;
23
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getNpmVersion = getNpmVersion;
7
-
8
- var _child_process = require("child_process");
9
-
10
- function getNpmVersion() {
11
- // require("child_process").
12
- let vers = '6';
13
-
14
- try {
15
- [vers] = (0, _child_process.execSync)('npm -v').toString().trim().split('.');
16
- } catch (error) {
17
- console.log(error);
18
- }
19
-
20
- return vers;
21
- }
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.npmConfigToObject = npmConfigToObject;
7
- const NPM_CONFIG_PREFIX = 'npm_config_'; // TODO: we have to do option parse logic little better
8
- // if user use react-cli stritly without using npm scripts options won't work,
9
- // So we have to write our own option parse logic or some other library
10
- // console.log('type', process.argv, process.env.npm_config_check, process.env.npm_config_clone_type, process.env.npm_config_clone_url);
11
- // console.log('Object.keys(process.env).filter(s => s.startsWith(\'npm_config_\') && s.includes(\'clone\')', Object.keys(process.env).filter(s => s.startsWith('npm_config_') && s.includes('clone')));
12
-
13
- function npmConfigToObject() {
14
- // // clone:type
15
- const processEnv = {};
16
- let keysWithColon = [];
17
- Object.keys(process.env).filter(key => key.startsWith(NPM_CONFIG_PREFIX)).forEach(key => {
18
- let nkey = key.slice(NPM_CONFIG_PREFIX.length);
19
- processEnv[nkey] = process.env[key];
20
- nkey.includes(':') && keysWithColon.push(nkey);
21
- });
22
- keysWithColon.forEach(key => {
23
- let nkey = key.replace(/:/g, '_');
24
-
25
- if (processEnv[nkey]) {
26
- console.warn('there is some options conflict', key, nkey);
27
- }
28
-
29
- processEnv[nkey] = processEnv[key];
30
- });
31
- return processEnv;
32
- }
@@ -1,480 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _os = require("os");
9
-
10
- var _getIp = require("../server/getIp");
11
-
12
- var _default = {
13
- cliRootPath: null,
14
- unstableDepsInverse: {
15
- value: false,
16
- cli: 'unstable_deps_inverse'
17
- },
18
- sslCertURL: {
19
- value: null,
20
- cli: 'ssl_cert_url'
21
- },
22
- preprocess: {
23
- // This option is for tell the react-cli which in preprocessor js file path
24
- runner: {
25
- value: '',
26
- cli: 'preprocessor'
27
- },
28
- // usally preprocessor run in nodemon for, start and docs , preprocessor
29
- stopNodemon: {
30
- value: false,
31
- cli: 'stop_nodemon'
32
- }
33
- },
34
- i18n: {
35
- chunkSplitEnable: {
36
- value: false,
37
- cli: 'i18n_split'
38
- },
39
- disableDefault: false,
40
- templateLabel: '{{--user-locale}}',
41
- jsResource: null,
42
- localeVarName: 'document.documentElement.lang',
43
- jsonpFunc: 'console.log',
44
- propertiesFolder: null
45
- },
46
- css: {
47
- enableRTLSplit: false,
48
- valueReplacer: null,
49
- //valueReplacer: [
50
- // {
51
- // props: ['font', 'font-family'],
52
- // values: {
53
- // 'zdfonts-rCallBar': 'zdfonts-rCallBar01',
54
- // 'zdfonts-rCall': 'zdfonts-rCallBar02'
55
- // }
56
- // // ,suffix: '0'
57
- // }
58
- // ],
59
- templateLabel: '{{--dir}}',
60
- disableMiniFiySelector: false,
61
- dirVarName: 'document.dir'
62
- },
63
- efc: {
64
- hasEFC: {
65
- value: false,
66
- cli: 'enable_efc'
67
- },
68
- createSDkFile: false,
69
- nameScope: 'ZOHODESK',
70
- version: 'default',
71
- outputFile: {
72
- value: 'efc-sdk-[version].js',
73
- cli: 'efc_output_file'
74
- },
75
- templateFilePath: '',
76
- localeAttr: 'data-efc-locale',
77
- localeDefaultValue: 'en_US',
78
- localeStatement: null,
79
- cssDirAttr: 'data-efc-dir',
80
- cssDirDefaultValue: 'ltr',
81
- cdnStatement: '',
82
- // cdnStatement: "new URL(document.querySelector(\"script[src*='zohodesk-efc-sdk']\").src).origin",
83
- cssDirStatement: null
84
- },
85
- app: {
86
- // this option only for impact testing
87
- devCssFileBountry: {
88
- value: '',
89
- cli: 'impact_cssbountry'
90
- },
91
- disableWatch: {
92
- value: false,
93
- cli: 'disable_watch'
94
- },
95
- enableDevCache: {
96
- value: false,
97
- cli: 'dev_cache'
98
- },
99
- crossorigin: {
100
- value: false,
101
- cli: 'enable_crossorigin'
102
- },
103
- context: {
104
- value: 'app',
105
- cli: 'app_context'
106
- },
107
- tpFolder: null,
108
- // folder: 'src',
109
- folder: {
110
- cli: 'app_folder',
111
- value: 'src'
112
- },
113
- vendorExclude: [],
114
- vendorInclude: [],
115
- cssHashSelectors: {
116
- filenames: [],
117
- packages: []
118
- },
119
- server: {
120
- host: {
121
- value: (0, _os.hostname)(),
122
- cli: 'app_host'
123
- },
124
- port: {
125
- value: 9090,
126
- cli: 'app_port'
127
- },
128
- domain: {
129
- value: null,
130
- cli: 'app_domain'
131
- },
132
- mode: {
133
- value: 'dev',
134
- cli: 'app_mode'
135
- },
136
- branch: {
137
- value: 'master',
138
- cli: 'app_branch'
139
- },
140
- redisHost: {
141
- value: '127.0.0.1',
142
- cli: 'redis:host'
143
- },
144
- redisPort: {
145
- value: '6379',
146
- cli: 'redis:port'
147
- },
148
- disableContextURL: false,
149
- hasMock: false,
150
- mockPrefix: {
151
- value: '/api',
152
- cli: 'mock_prefix'
153
- },
154
- mockPort: {
155
- value: 5000,
156
- cli: 'mock_port'
157
- }
158
- },
159
- disableES5Transpile: false,
160
- isReactMig: false,
161
- hasWidget: false,
162
- hasEFC: {
163
- value: false,
164
- cli: 'enable_efc'
165
- },
166
- enableChunkHash: {
167
- value: false,
168
- cli: 'hash_enable'
169
- },
170
- cssUniqueness: {
171
- value: true,
172
- cli: 'css_unique'
173
- },
174
- outputFolder: {
175
- value: 'build',
176
- cli: 'output_folder'
177
- },
178
- bundleAnalyze: {
179
- value: false,
180
- cli: 'bundle_analyze'
181
- },
182
- optimize: true,
183
- manifestFileName: 'manifest.json',
184
- removeAttribute: {
185
- value: true,
186
- cli: 'rm_attr'
187
- },
188
- attrbuteNames: {
189
- value: ['data-testid'],
190
- cli: 'attr_name'
191
- },
192
- publicPaths: false,
193
- instrumentScript: {
194
- value: false,
195
- cli: 'instru_script'
196
- },
197
- enableSMap: {
198
- value: false,
199
- cli: 'enable_smap'
200
- },
201
- enableSMapHook: {
202
- value: true,
203
- cli: 'enable_smaphook'
204
- },
205
- hasRTL: false,
206
- rtlExclude: [],
207
- seperateCssModules: {
208
- value: false,
209
- cli: 'sep_cssmodules'
210
- },
211
- hasShadowDOM: {
212
- value: false,
213
- cli: 'has_shadowdom'
214
- },
215
- resourceHints: [],
216
- changeRuntimeChunkChar: false,
217
- classNamePrefix: {
218
- value: 'zd',
219
- cli: 'class_prefix'
220
- },
221
- selectorReplace: null,
222
- devConsoleExculde: {
223
- value: false,
224
- cli: 'console_exculde'
225
- },
226
- serviceWorker: {
227
- enableSw: false,
228
- filePath: 'sw.js',
229
- fileName: 'v1.js',
230
- exitPath: '/',
231
- replaceText: '//<!--AssetsFromBuild -->'
232
- },
233
- htmlTemplate: {
234
- inject: true
235
- },
236
- removePropTypes: false,
237
- customChunks: [{
238
- name: 'styles',
239
- pattern: '\\.css$'
240
- }],
241
- tpHashMapping: [],
242
- cdnMapping: {
243
- isCdnEnabled: false,
244
- variableName: '',
245
- cssTemplate: '',
246
- jsTemplate: '',
247
- i18nTemplate: ''
248
- },
249
- sourcemap: {
250
- cli: 'source_map',
251
- value: 'cheap-eval-source-map'
252
- }
253
- },
254
- docs: {
255
- server: {
256
- iphost: (0, _getIp.getIp)(),
257
- host: (0, _os.hostname)(),
258
- port: {
259
- value: 9292,
260
- cli: 'docs_port'
261
- },
262
- domain: {
263
- value: null,
264
- cli: 'docs_domain'
265
- },
266
- branch: false
267
- },
268
- componentFolder: 'src',
269
- cssUniqueness: {
270
- value: true,
271
- cli: 'css_unique'
272
- },
273
- enableChunkHash: false,
274
- folder: 'src',
275
- disableES5Transpile: false,
276
- hasRTL: false,
277
- rtlExclude: [],
278
- cssHashSelectors: {
279
- filenames: [],
280
- packages: []
281
- },
282
- classNamePrefix: {
283
- value: 'zd',
284
- cli: 'class_prefix'
285
- }
286
- },
287
- ssr: {
288
- server: {
289
- host: (0, _os.hostname)(),
290
- port: {
291
- value: 4040,
292
- cli: 'ssr_port'
293
- },
294
- domain: {
295
- value: false,
296
- cli: 'ssr_domain'
297
- },
298
- repoUrl: 'https://vimalesan.a@git.csez.zohocorpin.com/zohodesk/supportportal.git',
299
- branch: {
300
- value: 'theme1',
301
- cli: 'ssr_branch'
302
- },
303
- clientAppPath: 'jsapps/portalapp'
304
- },
305
- watch: {
306
- value: false,
307
- cli: 'ssr_watch'
308
- }
309
- },
310
- cluster: {
311
- server: {
312
- host: (0, _os.hostname)(),
313
- port: 4000,
314
- domain: {
315
- value: false,
316
- cli: 'cluster_domain'
317
- }
318
- }
319
- },
320
- help: {
321
- server: {
322
- host: (0, _os.hostname)(),
323
- port: 3000,
324
- domain: {
325
- value: false,
326
- cli: 'help_domain'
327
- }
328
- }
329
- },
330
- umd: {
331
- component: {
332
- watch: {
333
- value: false,
334
- cli: 'umdComp_watch'
335
- },
336
- umdVar: 'Component',
337
- isDocs: false,
338
- isHtml: false,
339
- outputFolder: 'build',
340
- cssUniqueness: {
341
- value: true,
342
- cli: 'umdComp_css_unique'
343
- },
344
- folder: 'src'
345
- },
346
- css: {
347
- watch: {
348
- value: false,
349
- cli: 'umdCss_watch'
350
- },
351
- outputFolder: 'dist',
352
- umdVar: 'CSS',
353
- cssUniqueness: {
354
- value: true,
355
- cli: 'umdCss_css_unique'
356
- },
357
- folder: 'src',
358
- publicPath: {
359
- value: false,
360
- cli: 'umdCss_public_path'
361
- },
362
- cssHashSelectors: {
363
- filenames: [],
364
- packages: []
365
- },
366
- classNamePrefix: {
367
- value: 'zd',
368
- cli: 'class_prefix'
369
- }
370
- },
371
- library: {
372
- umdVar: 'Component',
373
- outputFolder: 'build',
374
- watch: {
375
- value: false,
376
- cli: 'umdLib_watch'
377
- }
378
- }
379
- },
380
- unusedFiles: {
381
- usedFilesExcludes: ['node_modules'],
382
- appFilesExcludes: ['.docs.js$', '/__tests__/.*(spec|test).js$'],
383
- delete: false,
384
- enable: {
385
- value: false,
386
- cli: 'enable_unusedfiles'
387
- },
388
- outputFileName: 'Unusedfiles.json'
389
- },
390
- esLint: {
391
- enable: {
392
- value: false,
393
- cli: 'enable_eslint'
394
- },
395
- ignoreFilePaths: false,
396
- fix: {
397
- value: false,
398
- cli: 'eslint_fix'
399
- },
400
- isCI: {
401
- value: false,
402
- cli: 'eslint_ci'
403
- },
404
- reportType: {
405
- value: 'json',
406
- cli: 'report_type'
407
- },
408
- reportPath: {
409
- value: './eslint/report.json',
410
- cli: 'report_path'
411
- },
412
- srcBranch: {
413
- value: 'master',
414
- cli: 'src_branch'
415
- },
416
- targetBranch: {
417
- value: 'master',
418
- cli: 'target_branch'
419
- },
420
- serviceName: {
421
- value: 'ZohoDeskReactApp',
422
- cli: 'service_name'
423
- },
424
- impactServerDomain: {
425
- value: 'ht' + 'tp://desk-automation.csez.zohocorpin.com:8080',
426
- //value: 'ht' + 'tp://desk-qa-impact.tsi.zohocorpin.com:8080',
427
- cli: 'impact_server_domain'
428
- },
429
- impactRun: {
430
- value: false,
431
- cli: 'impact_run'
432
- }
433
- },
434
- clone: {
435
- type: {
436
- value: null,
437
- cli: 'clone_type'
438
- },
439
- url: {
440
- value: null,
441
- cli: 'clone_url'
442
- },
443
- branch: {
444
- value: null,
445
- cli: 'clone_branch'
446
- },
447
- revision: {
448
- value: null,
449
- cli: 'clone_revision'
450
- },
451
- shallowClone: {
452
- value: false,
453
- cli: 'shallow_clone'
454
- },
455
- projectName: {
456
- value: null,
457
- cli: 'clone_proj_name'
458
- },
459
- remoteName: {
460
- value: 'origin',
461
- cli: 'clone_remote_name'
462
- },
463
- cacheDir: {
464
- value: null,
465
- cli: 'clone_cacheDir'
466
- },
467
- shouldDelete: {
468
- value: true,
469
- cli: 'clone_delete'
470
- }
471
- },
472
- module: {
473
- mode: {
474
- value: 'prod',
475
- cli: 'module_mode'
476
- },
477
- disableES5Transpile: true
478
- }
479
- };
480
- exports.default = _default;
@@ -1,55 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getOptions = exports.args = void 0;
7
-
8
- var _applyValuesToShema = require("./applyValuesToShema");
9
-
10
- var _cliArgsToObject = require("./cliArgsToObject");
11
-
12
- var _defaultConfigValues = _interopRequireDefault(require("./defaultConfigValues"));
13
-
14
- var _deprecatedOptionsHandler = require("./deprecatedOptionsHandler");
15
-
16
- var _getCWD = require("./getCWD");
17
-
18
- var _getNpmVersion = require("./getNpmVersion");
19
-
20
- var _npmConfigToObject = require("./npmConfigToObject");
21
-
22
- var _readOptionsForPackageJson = require("./readOptionsForPackageJson");
23
-
24
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
-
26
- // import schemas from './oldDefaultConfigValues';
27
- const args = process.argv.slice(2);
28
- exports.args = args;
29
- const processEnv = (0, _npmConfigToObject.npmConfigToObject)();
30
- const cliArgsObject = (0, _cliArgsToObject.cliArgsToObject)(args);
31
- Object.assign(processEnv, cliArgsObject);
32
- global.reactCLIOptions = null;
33
-
34
- const getOptions = () => {
35
- if (global.reactCLIOptions) {
36
- return global.reactCLIOptions;
37
- }
38
-
39
- const appPath = process.cwd();
40
- const userSchemas = (0, _readOptionsForPackageJson.readOptionsForPackageJson)(appPath);
41
- const options = (0, _applyValuesToShema.applyValuesToShema)(_defaultConfigValues.default, userSchemas || {}, processEnv);
42
- (0, _deprecatedOptionsHandler.deprecatedOptionsHandler)(options); // for future may be for npm 8 edge cases
43
-
44
- options.npmVersion = (0, _getNpmVersion.getNpmVersion)();
45
- options.cwd = (0, _getCWD.getCWD)();
46
- options.packageVersion = process.env.npm_package_version;
47
- options.extraArgs = process.argv.slice(3); // eslint-disable-next-line prefer-destructuring
48
-
49
- options.commandOption = process.argv[2];
50
- global.reactCLIOptions = options; // console.log({ options });
51
-
52
- return options;
53
- };
54
-
55
- exports.getOptions = getOptions;
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.readOptionsForPackageJson = readOptionsForPackageJson;
7
-
8
- var _fs = require("fs");
9
-
10
- var _path = _interopRequireDefault(require("path"));
11
-
12
- var _constants = require("../constants");
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- // import { CONFIG_ROOT } from "../constants";
17
- function readOptionsForPackageJson(appPath) {
18
- const packagePath = _path.default.join(appPath, "package.json");
19
-
20
- if ((0, _fs.existsSync)(packagePath)) {
21
- // eslint-disable-next-line import/no-dynamic-require, global-require
22
- return require(packagePath)[_constants.BASE_CONFIG_KEY] || {};
23
- }
24
-
25
- return {};
26
- }