@zohodesk/react-cli 1.1.18-exp.1 → 1.1.18-exp.2
Sign up to get free protection for your applications and to get access to all the features.
- package/bin/cli.js +4 -0
- package/lib/babel/cmjs-plugins-presets.js +11 -12
- package/lib/babel/es-plugins-presets.js +12 -12
- package/lib/configs/webpack.dev.config.js +4 -0
- package/lib/configs/webpack.prod.config.js +6 -9
- package/lib/loaderUtils/getDevJsLoaders.js +1 -5
- package/lib/schemas/index.js +3 -0
- package/npm-shrinkwrap.json +1076 -31
- package/package.json +6 -1
- package/lib/babel/babel-option-utils/babel-preset-react-option.js +0 -22
- package/packages/client_build_tool/lib/allCommandsConfigs.js +0 -23
- package/packages/client_build_tool/lib/buildToolLoggers.js +0 -32
- package/packages/client_build_tool/lib/commands/build/commandExecutor.js +0 -21
- package/packages/client_build_tool/lib/commands/build/config.js +0 -12
- package/packages/client_build_tool/lib/commands/build/errorHander.js +0 -10
- package/packages/client_build_tool/lib/commands/build/index.js +0 -35
- package/packages/client_build_tool/lib/commands/build/optionsProcesser.js +0 -40
- package/packages/client_build_tool/lib/commands/buildEs/commandExecutor.js +0 -17
- package/packages/client_build_tool/lib/commands/buildEs/config.js +0 -12
- package/packages/client_build_tool/lib/commands/buildLib/commandExecutor.js +0 -17
- package/packages/client_build_tool/lib/commands/buildLib/config.js +0 -12
- package/packages/client_build_tool/lib/commands/start/commandExecutor.js +0 -13
- package/packages/client_build_tool/lib/commands/start/config.js +0 -12
- package/packages/client_build_tool/lib/commands/start/deprecationHandler.js +0 -10
- package/packages/client_build_tool/lib/commands/start/errorHander.js +0 -10
- package/packages/client_build_tool/lib/commands/start/optionsProcesser.js +0 -36
- package/packages/client_build_tool/lib/commands/start/postProcesser.js +0 -10
- package/packages/client_build_tool/lib/commands/start/preProcesser.js +0 -10
- package/packages/client_build_tool/lib/commandsRouter.js +0 -71
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/decidePublicPath.js +0 -44
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/libAlias.js +0 -31
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/nameTemplates.js +0 -51
- package/packages/client_build_tool/lib/shared/bundler/webpack/common/resourceBasedPublicPath.js +0 -21
- package/packages/client_build_tool/lib/shared/bundler/webpack/cssLoaders.js +0 -16
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/CdnChangePlugin.js +0 -111
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/EFCPlugin.js +0 -1
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/ContributionGuide.md +0 -11
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nKeysIdentifer.js +0 -136
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/I18nSplit.md +0 -95
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/README.md +0 -25
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/constants.js +0 -29
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/createHash.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nDependency.js +0 -99
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nLoadingRuntimeModule.js +0 -81
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nModule.js +0 -201
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/index.js +0 -401
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/optionsHandler.js +0 -67
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/pathCreator.js +0 -23
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/readI18nValues.js +0 -29
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateFileName.js +0 -49
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/templateHashHelpers.js +0 -77
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/collectI18nKeys.js +0 -63
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/hashUtils.js +0 -19
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/index.js +0 -31
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/utils/propertiesUtils.js +0 -127
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RTLSplitPlugin.js +0 -1
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/OverwriteCssPathForRTL.js +0 -63
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtlCssPlugin.js +0 -89
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/RtrSplit.md +0 -34
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/RtlSplitPlugin/replaceCssDirTemplate.js +0 -15
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPlugin.js +0 -155
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_plugins/UglifyCSSPlugin.js +0 -49
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_postcss_loaders/ExcludePlugin.js +0 -58
- package/packages/client_build_tool/lib/shared/bundler/webpack/custom_postcss_loaders/RTLSplitPlugin.js +0 -139
- package/packages/client_build_tool/lib/shared/bundler/webpack/devServerConfig.js +0 -34
- package/packages/client_build_tool/lib/shared/bundler/webpack/getCSSLoaders.js +0 -30
- package/packages/client_build_tool/lib/shared/bundler/webpack/jsLoaders.js +0 -17
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/assetLoaders.js +0 -14
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/babelLoaderConfig.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configHtmlTemplateLoader.js +0 -18
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configWebWorkerLoader.js +0 -21
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/configsAssetsLoaders.js +0 -138
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/cssClassNameGenerate.js +0 -83
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaderConfigs/getCssLoaderOptions.js +0 -23
- package/packages/client_build_tool/lib/shared/bundler/webpack/loaders/workerLoader.js +0 -133
- package/packages/client_build_tool/lib/shared/bundler/webpack/optimizationConfig.js +0 -39
- package/packages/client_build_tool/lib/shared/bundler/webpack/outputConfig.js +0 -28
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCdnChangePlugin.js +0 -18
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configCopyThirdpartyFile.js +0 -38
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configEnvVariables.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configHtmlWebpackPlugin.js +0 -28
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configI18nSplitPlugin.js +0 -35
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configIgnorePlugin.js +0 -16
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configMiniCSSExtractPlugin.js +0 -23
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configProgressPlugin.js +0 -19
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configRtlCssPlugin.js +0 -27
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configServiceWorkerPlugin.js +0 -18
- package/packages/client_build_tool/lib/shared/bundler/webpack/pluginConfigs/configUglifyCSSPlugin.js +0 -15
- package/packages/client_build_tool/lib/shared/bundler/webpack/plugins.js +0 -39
- package/packages/client_build_tool/lib/shared/bundler/webpack/postcssPlugins.js +0 -36
- package/packages/client_build_tool/lib/shared/bundler/webpack/resolvers.js +0 -42
- package/packages/client_build_tool/lib/shared/bundler/webpack/splitChunksConfig.js +0 -12
- package/packages/client_build_tool/lib/shared/bundler/webpack/webpack.dev.config.js +0 -17
- package/packages/client_build_tool/lib/shared/bundler/webpack/webpackBuild.js +0 -24
- package/packages/client_build_tool/lib/shared/bundler/webpack/webpackConfig.js +0 -50
- package/packages/client_build_tool/lib/shared/commands-utlis/doBasicRequiermentCheck.js +0 -16
- package/packages/client_build_tool/lib/shared/commands-utlis/getCliPath.js +0 -38
- package/packages/client_build_tool/lib/shared/commands-utlis/index.js +0 -29
- package/packages/client_build_tool/lib/shared/commands-utlis/log.js +0 -13
- package/packages/client_build_tool/lib/shared/commands-utlis/readArgsFormCommandLine.js +0 -11
- package/packages/client_build_tool/lib/shared/commands-utlis/readOptionFormCommandLine.js +0 -11
- package/packages/client_build_tool/lib/shared/commands-utlis/spanSync.js +0 -35
- package/packages/client_build_tool/lib/shared/constants.js +0 -33
- package/packages/client_build_tool/lib/shared/schemas/applyValuesToShema.js +0 -37
- package/packages/client_build_tool/lib/shared/schemas/cliArgsToObject.js +0 -37
- package/packages/client_build_tool/lib/shared/schemas/defaultConfigValues.js +0 -119
- package/packages/client_build_tool/lib/shared/schemas/deprecatedOptionsHandler.js +0 -65
- package/packages/client_build_tool/lib/shared/schemas/getCWD.js +0 -23
- package/packages/client_build_tool/lib/shared/schemas/getNpmVersion.js +0 -21
- package/packages/client_build_tool/lib/shared/schemas/npmConfigToObject.js +0 -32
- package/packages/client_build_tool/lib/shared/schemas/oldDefaultConfigValues.js +0 -480
- package/packages/client_build_tool/lib/shared/schemas/readOptions.js +0 -55
- package/packages/client_build_tool/lib/shared/schemas/readOptionsForPackageJson.js +0 -26
- package/packages/client_build_tool/lib/shared/schemas/readOptionsOld.js +0 -152
- package/packages/client_build_tool/lib/shared/server/cert/Tsicsezwild-22-23.crt +0 -37
- package/packages/client_build_tool/lib/shared/server/cert/Tsicsezwild-22-23.key +0 -27
- package/packages/client_build_tool/lib/shared/server/configWebpackDevMiddleware.js +0 -40
- package/packages/client_build_tool/lib/shared/server/corsHandleing.js +0 -28
- package/packages/client_build_tool/lib/shared/server/getIp.js +0 -30
- package/packages/client_build_tool/lib/shared/server/getServerURL.js +0 -29
- package/packages/client_build_tool/lib/shared/server/httpsOptions.js +0 -53
- package/packages/client_build_tool/lib/shared/server/initExpressApp.js +0 -19
- package/packages/client_build_tool/lib/shared/server/initialHTMLHandling.js +0 -66
- package/packages/client_build_tool/lib/shared/server/serveContextFiles.js +0 -24
- package/packages/client_build_tool/lib/shared/server/serverBywebpackDevMiddleware.js +0 -40
- package/packages/client_build_tool/lib/shared/server/startHttpServer.js +0 -26
- package/packages/client_build_tool/lib/shared/server/startHttpsServer.js +0 -34
- package/packages/client_build_tool/lib/shared/server/unwanted/addHttp2Server.js +0 -41
- package/packages/client_build_tool/lib/shared/server/unwanted/configWebpackDevMiddleware.js +0 -44
- package/packages/client_build_tool/lib/shared/server/unwanted/devServerUtlis.js +0 -1
- package/packages/client_build_tool/lib/shared/server/unwanted/mockApiSupport.js +0 -19
- package/packages/client_build_tool/lib/shared/server/unwanted/webpackConfig.js +0 -32
- package/packages/client_build_tool/lib/shared/server/unwanted/websocketMockSetup.js +0 -48
- package/packages/client_build_tool/lib/shared/server/urlConcat.js +0 -25
- package/packages/client_build_tool/lib/shared/utils/utils.js +0 -1
package/bin/cli.js
CHANGED
@@ -300,6 +300,8 @@ switch (option) {
|
|
300
300
|
'src',
|
301
301
|
'-d',
|
302
302
|
'lib',
|
303
|
+
'--extensions',
|
304
|
+
'.js,.ts,.tsx',
|
303
305
|
`--presets=${require.resolve('../lib/babel/cmjs-plugins-presets.js')}`,
|
304
306
|
'--copy-files'
|
305
307
|
].concat(args),
|
@@ -316,6 +318,8 @@ switch (option) {
|
|
316
318
|
'src',
|
317
319
|
'--out-dir',
|
318
320
|
'es',
|
321
|
+
'--extensions',
|
322
|
+
'.js,.ts,.tsx',
|
319
323
|
`--presets=${require.resolve('../lib/babel/es-plugins-presets.js')}`,
|
320
324
|
'--copy-files'
|
321
325
|
].concat(args),
|
@@ -7,24 +7,23 @@ exports.default = void 0;
|
|
7
7
|
|
8
8
|
var _utils = require("../utils");
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
|
-
|
14
|
-
let {
|
10
|
+
const {
|
15
11
|
module: {
|
16
12
|
mode
|
13
|
+
},
|
14
|
+
babelCustomizationForLibrary: {
|
15
|
+
babelPlugins
|
17
16
|
}
|
18
17
|
} = (0, _utils.getOptions)();
|
19
|
-
|
18
|
+
const isProd = mode.toLowerCase() === 'prod';
|
19
|
+
const defaultPlugins = [[require.resolve('babel-plugin-transform-define'), isProd ? {
|
20
|
+
__DOCS__: false
|
21
|
+
} : {}], require.resolve('@babel/plugin-syntax-dynamic-import'), require.resolve('@babel/plugin-proposal-optional-chaining'), require.resolve('@babel/plugin-proposal-class-properties')];
|
22
|
+
const plugins = [...babelPlugins, ...defaultPlugins];
|
20
23
|
|
21
24
|
var _default = () => ({
|
22
|
-
presets: [require.resolve('@babel/preset-env'), (
|
23
|
-
|
24
|
-
})],
|
25
|
-
plugins: [[require.resolve('babel-plugin-transform-define'), isProd ? {
|
26
|
-
__DOCS__: false
|
27
|
-
} : {}]]
|
25
|
+
presets: [require.resolve('@babel/preset-env'), require.resolve('@babel/preset-react'), require.resolve('@babel/preset-typescript')],
|
26
|
+
plugins: plugins
|
28
27
|
});
|
29
28
|
|
30
29
|
exports.default = _default;
|
@@ -7,17 +7,21 @@ exports.default = void 0;
|
|
7
7
|
|
8
8
|
var _utils = require("../utils");
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
|
-
|
14
|
-
let {
|
10
|
+
const {
|
15
11
|
module: {
|
16
12
|
mode,
|
17
13
|
disableES5Transpile
|
14
|
+
},
|
15
|
+
babelCustomizationForLibrary: {
|
16
|
+
babelPlugins
|
18
17
|
}
|
19
18
|
} = (0, _utils.getOptions)();
|
20
|
-
|
19
|
+
const isProd = mode.toLowerCase() === 'prod';
|
20
|
+
const defaultPlugins = [[require.resolve('babel-plugin-transform-define'), isProd ? {
|
21
|
+
__DOCS__: false
|
22
|
+
} : {}], require.resolve('@babel/plugin-syntax-dynamic-import'), require.resolve('@babel/plugin-proposal-optional-chaining'), require.resolve('@babel/plugin-proposal-class-properties')];
|
23
|
+
const plugins = [...babelPlugins, ...defaultPlugins];
|
24
|
+
console.log(disableES5Transpile);
|
21
25
|
|
22
26
|
var _default = () => ({
|
23
27
|
presets: [[require.resolve('@babel/preset-env'), disableES5Transpile ? {
|
@@ -29,12 +33,8 @@ var _default = () => ({
|
|
29
33
|
}
|
30
34
|
} : {
|
31
35
|
modules: false
|
32
|
-
}], (
|
33
|
-
|
34
|
-
})],
|
35
|
-
plugins: [[require.resolve('babel-plugin-transform-define'), isProd ? {
|
36
|
-
__DOCS__: false
|
37
|
-
} : {}], require.resolve('@babel/plugin-syntax-dynamic-import')]
|
36
|
+
}], require.resolve('@babel/preset-react'), require.resolve('@babel/preset-typescript')],
|
37
|
+
plugins: plugins
|
38
38
|
});
|
39
39
|
|
40
40
|
exports.default = _default;
|
@@ -14,8 +14,6 @@ var _configsAssetsLoaders = require("../loaderUtils/configsAssetsLoaders");
|
|
14
14
|
|
15
15
|
var _resolvers = require("./resolvers");
|
16
16
|
|
17
|
-
var _babelPresetReactOption = _interopRequireDefault(require("../babel/babel-option-utils/babel-preset-react-option"));
|
18
|
-
|
19
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
20
18
|
|
21
19
|
// import TerserPlugin from 'terser-webpack-plugin';
|
@@ -129,13 +127,8 @@ module.exports = {
|
|
129
127
|
}
|
130
128
|
} : {
|
131
129
|
modules: false
|
132
|
-
}], (
|
133
|
-
|
134
|
-
})],
|
135
|
-
plugins: disableES5Transpile ? [removeAttribute ? require.resolve('../utils/removeAttributes') : false, require.resolve('@babel/plugin-syntax-dynamic-import'), require.resolve('babel-plugin-lodash'), // require.resolve(
|
136
|
-
// '@babel/plugin-proposal-object-rest-spread'
|
137
|
-
// ), REMOVING IT, BECAUSE WE ALREADY SUPPORT SPREAD SYNTAX FROM LIBRARIES.
|
138
|
-
shouldRemovePropTypes ? [require.resolve('babel-plugin-transform-react-remove-prop-types'), removePropTypes] : false, devConsoleExculde ? [require.resolve('babel-plugin-transform-remove-console'), {
|
130
|
+
}], require.resolve('@babel/preset-react'), require.resolve('@babel/preset-typescript')],
|
131
|
+
plugins: disableES5Transpile ? [removeAttribute ? require.resolve('../utils/removeAttributes') : false, require.resolve('@babel/plugin-syntax-dynamic-import'), require.resolve('babel-plugin-lodash'), require.resolve('@babel/plugin-proposal-object-rest-spread'), shouldRemovePropTypes ? [require.resolve('babel-plugin-transform-react-remove-prop-types'), removePropTypes] : false, devConsoleExculde ? [require.resolve('babel-plugin-transform-remove-console'), {
|
139
132
|
exclude: ['error', 'log']
|
140
133
|
}] : null].filter(Boolean) : [removeAttribute ? require.resolve('../utils/removeAttributes') : false, shouldRemovePropTypes ? [require.resolve('babel-plugin-transform-react-remove-prop-types'), removePropTypes] : false, [require.resolve('@babel/plugin-transform-runtime'), {
|
141
134
|
helpers: true,
|
@@ -237,6 +230,10 @@ module.exports = {
|
|
237
230
|
minimize: false
|
238
231
|
}
|
239
232
|
}]
|
233
|
+
}, {
|
234
|
+
test: /\.ts$/,
|
235
|
+
use: 'ts-loader',
|
236
|
+
include: _path.default.join(appPath, folder)
|
240
237
|
}, {
|
241
238
|
test: /\.worker.js$/,
|
242
239
|
use: {
|
@@ -7,8 +7,6 @@ exports.default = void 0;
|
|
7
7
|
|
8
8
|
var _path = _interopRequireDefault(require("path"));
|
9
9
|
|
10
|
-
var _babelPresetReactOption = _interopRequireDefault(require("../babel/babel-option-utils/babel-preset-react-option"));
|
11
|
-
|
12
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
11
|
|
14
12
|
let getDevJsLoaders = options => {
|
@@ -42,9 +40,7 @@ let getDevJsLoaders = options => {
|
|
42
40
|
}
|
43
41
|
} : {
|
44
42
|
modules: false
|
45
|
-
}], (
|
46
|
-
disableES5Transpile
|
47
|
-
})],
|
43
|
+
}], require.resolve('@babel/preset-react')],
|
48
44
|
plugins: disableES5Transpile ? [require.resolve('@babel/plugin-syntax-dynamic-import'), require.resolve('babel-plugin-lodash'), require.resolve('@babel/plugin-proposal-object-rest-spread'), devConsoleExculde ? [require.resolve('babel-plugin-transform-remove-console'), {
|
49
45
|
exclude: ['error', 'log']
|
50
46
|
}] : null].filter(Boolean) : [require.resolve('@babel/plugin-syntax-dynamic-import'), require.resolve('babel-plugin-lodash'), require.resolve('@babel/plugin-proposal-object-rest-spread'), devConsoleExculde ? [require.resolve('babel-plugin-transform-remove-console'), {
|