@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
@@ -1,44 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.configWebpackDevMiddleware = configWebpackDevMiddleware;
|
7
|
-
|
8
|
-
var _webpackDevMiddleware = _interopRequireDefault(require("webpack-dev-middleware"));
|
9
|
-
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
|
12
|
-
function configWebpackDevMiddleware({
|
13
|
-
publicPath,
|
14
|
-
writeToDisk,
|
15
|
-
enableDevCache,
|
16
|
-
disableWatch,
|
17
|
-
compress,
|
18
|
-
compiler
|
19
|
-
}) {
|
20
|
-
let webpackServerOptions = {
|
21
|
-
logLevel: 'error',
|
22
|
-
publicPath,
|
23
|
-
headers: {
|
24
|
-
'Access-Control-Allow-Origin': '*'
|
25
|
-
},
|
26
|
-
compress
|
27
|
-
};
|
28
|
-
|
29
|
-
if (enableDevCache) {
|
30
|
-
webpackServerOptions.headers['Cache-Control'] = 'public, max-age=604800';
|
31
|
-
}
|
32
|
-
|
33
|
-
if (disableWatch) {
|
34
|
-
webpackServerOptions.watchOptions = {
|
35
|
-
ignored: /./
|
36
|
-
};
|
37
|
-
}
|
38
|
-
|
39
|
-
if (writeToDisk) {
|
40
|
-
webpackServerOptions.writeToDisk = true;
|
41
|
-
}
|
42
|
-
|
43
|
-
return (0, _webpackDevMiddleware.default)(compiler, webpackServerOptions);
|
44
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";
|
@@ -1,19 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.mockApiSupport = mockApiSupport;
|
7
|
-
|
8
|
-
var _httpProxyMiddleware = require("http-proxy-middleware");
|
9
|
-
|
10
|
-
function mockApiSupport(app, server) {
|
11
|
-
const {
|
12
|
-
mockPrefix,
|
13
|
-
mockPort
|
14
|
-
} = server;
|
15
|
-
app.use(mockPrefix, (0, _httpProxyMiddleware.createProxyMiddleware)({
|
16
|
-
target: 'ht' + `tp://localhost:${mockPort}`,
|
17
|
-
changeOrigin: true
|
18
|
-
}));
|
19
|
-
}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.webpackConfig = webpackConfig;
|
7
|
-
|
8
|
-
var _webpack = _interopRequireDefault(require("webpack"));
|
9
|
-
|
10
|
-
var _compression = _interopRequireDefault(require("compression"));
|
11
|
-
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13
|
-
|
14
|
-
function webpackConfig(mode, app) {
|
15
|
-
let config;
|
16
|
-
|
17
|
-
if (mode === 'prod') {
|
18
|
-
config = require('../../../src/configs/webpack.prod.config');
|
19
|
-
app.use((0, _compression.default)());
|
20
|
-
} else if (mode === 'dev' || mode === 'dev-no-warn') {
|
21
|
-
config = require('../../../src/configs/webpack.dev.config');
|
22
|
-
} else {
|
23
|
-
throw new Error('You must configure valid option in mode');
|
24
|
-
} // console.log({ contextURL });
|
25
|
-
|
26
|
-
|
27
|
-
let compiler = (0, _webpack.default)(config);
|
28
|
-
return {
|
29
|
-
config,
|
30
|
-
compiler
|
31
|
-
};
|
32
|
-
}
|
@@ -1,48 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.websocketMockSetup = websocketMockSetup;
|
7
|
-
|
8
|
-
var _path = _interopRequireDefault(require("path"));
|
9
|
-
|
10
|
-
var _ws = _interopRequireDefault(require("ws"));
|
11
|
-
|
12
|
-
var _utils = require("../../../src/utils");
|
13
|
-
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
|
-
|
16
|
-
function websocketMockSetup(app, httpsServer) {
|
17
|
-
app.use('/wms/*', (req, res) => {
|
18
|
-
res.sendFile(_path.default.join(__dirname, '..', '..', 'templates', 'wms', 'index.html'));
|
19
|
-
});
|
20
|
-
const wss = new _ws.default.Server({
|
21
|
-
server: httpsServer
|
22
|
-
});
|
23
|
-
let wsPool = [];
|
24
|
-
wss.on('connection', ws => {
|
25
|
-
wsPool.push(ws);
|
26
|
-
ws.on('close', () => {
|
27
|
-
wsPool = wsPool.filter(ws1 => ws1 !== ws);
|
28
|
-
});
|
29
|
-
ws.on('message', message => {
|
30
|
-
(0, _utils.log)('received: %s', message);
|
31
|
-
});
|
32
|
-
ws.send('something');
|
33
|
-
});
|
34
|
-
app.post('/wmsmockapi', (req, res) => {
|
35
|
-
wsPool.forEach(ws => {
|
36
|
-
let {
|
37
|
-
body
|
38
|
-
} = req;
|
39
|
-
|
40
|
-
try {
|
41
|
-
ws.send(JSON.stringify(body));
|
42
|
-
} catch (e) {
|
43
|
-
(0, _utils.log)(e, body);
|
44
|
-
}
|
45
|
-
});
|
46
|
-
res.send('success');
|
47
|
-
});
|
48
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.urlConcat = urlConcat;
|
7
|
-
|
8
|
-
/**
|
9
|
-
*
|
10
|
-
* @param {String} url
|
11
|
-
* @param {String} path
|
12
|
-
*/
|
13
|
-
function removeLastSlash(url) {
|
14
|
-
return url.replace(/\/+$/, '');
|
15
|
-
}
|
16
|
-
|
17
|
-
function urlConcat(url, path) {
|
18
|
-
url = removeLastSlash(url);
|
19
|
-
path = removeFrontSlash(path);
|
20
|
-
return `${url}/${path}`;
|
21
|
-
}
|
22
|
-
|
23
|
-
function removeFrontSlash(url) {
|
24
|
-
return url.replace(/^\/+/, '');
|
25
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";
|