@zohodesk/client_build_tool 0.0.6-exp.4 → 0.0.6-exp.41
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.
- package/coverage/coverage-final.json +1 -3
- package/coverage/coverage-summary.json +2 -4
- package/coverage/index.html +21 -51
- package/coverage/{bundler/webpack/custom_postcss_plugins/HoverActivePlugin/specialCases.js.html → updateArrayWithDefault.js.html} +67 -55
- package/lib/commands/buildEs/commandExecutor.js +7 -2
- package/lib/commands/buildLib/commandExecutor.js +7 -2
- package/lib/schemas/defaultConfigValues.js +17 -1
- package/lib/shared/babel/babelWebConfig.js +4 -1
- package/lib/shared/babel/runBabelForTsFile.js +1 -2
- package/lib/shared/bundler/webpack/common/decidePublicPath.js +5 -0
- package/lib/shared/bundler/webpack/common/nameTemplates.js +13 -9
- package/lib/shared/bundler/webpack/custom_plugins/{CdnChangePlugin.js → CdnChangePlugin/index.js} +25 -5
- package/lib/shared/bundler/webpack/custom_plugins/CdnChangePlugin/webpackCustomJsUrlLoader.js +46 -0
- package/lib/shared/bundler/webpack/custom_plugins/CustomScriptLoadingPlugin.js +110 -0
- package/lib/shared/bundler/webpack/custom_plugins/I18nSplitPlugin/getI18nLoadingRuntimeModule.js +1 -1
- package/lib/shared/bundler/webpack/custom_plugins/InitialHtmlPlugin.js +4 -0
- package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/addFilesNamesToManifestJson.js +8 -2
- package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createInitialEntries.js +7 -1
- package/lib/shared/bundler/webpack/custom_plugins/ManifestJsonPlugin/createManifestJson.js +1 -1
- package/lib/shared/bundler/webpack/custom_plugins/ResourceHintsPlugin.js +1 -0
- package/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPlugin.js +5 -1
- package/lib/shared/bundler/webpack/custom_plugins/ServiceWorkerPluginUtils.js +13 -0
- package/lib/shared/bundler/webpack/custom_plugins/SourceMapPlugin/index.js +16 -1
- package/lib/shared/bundler/webpack/custom_plugins/TPHashMappingPlugin/index.js +1 -1
- package/lib/shared/bundler/webpack/custom_plugins/getInitialAssetsFuncTemplate.js +4 -4
- package/lib/shared/bundler/webpack/devtoolConfig.js +4 -1
- package/lib/shared/bundler/webpack/loaderConfigs/cssClassNameGenerate.js +6 -1
- package/lib/shared/bundler/webpack/optimizationConfig.js +14 -1
- package/lib/shared/bundler/webpack/pluginConfigs/configCSSMinifierPlugin.js +5 -1
- package/lib/shared/bundler/webpack/pluginConfigs/configCustomScriptLoadingStrategyPlugin.js +76 -0
- package/lib/shared/bundler/webpack/pluginConfigs/configManifestJsonPlugin.js +25 -13
- package/lib/shared/bundler/webpack/pluginConfigs/configMiniCSSExtractPlugin.js +2 -1
- package/lib/shared/bundler/webpack/plugins.js +3 -1
- package/lib/shared/bundler/webpack/resolvers.js +2 -1
- package/lib/shared/bundler/webpack/tsLoaders.js +7 -14
- package/lib/shared/bundler/webpack/utils/index.js +6 -1
- package/lib/shared/fileUtils/watchRun.js +1 -1
- package/lib/shared/server/getServerURL.js +9 -2
- package/npm-shrinkwrap.json +412 -7328
- package/package.json +1 -1
- package/result.json +1 -1
- package/unittest/index.html +35 -33
- package/coverage/addFilesNamesToManifestJson.js.html +0 -148
- package/coverage/bundler/webpack/custom_plugins/AddManifestJson/addFilesNamesToManifestJson.js.html +0 -148
- package/coverage/bundler/webpack/custom_plugins/AddManifestJson/createInitialEntries.js.html +0 -136
- package/coverage/bundler/webpack/custom_plugins/AddManifestJson/createManifestJson.js.html +0 -181
- package/coverage/bundler/webpack/custom_plugins/AddManifestJson/findInitialFileNames.js.html +0 -133
- package/coverage/bundler/webpack/custom_plugins/AddManifestJson/index.html +0 -146
- package/coverage/bundler/webpack/custom_plugins/AddManifestJson/index.js.html +0 -199
- package/coverage/bundler/webpack/custom_plugins/AddManifestJson/removeHashFromFileName.js.html +0 -127
- package/coverage/bundler/webpack/custom_plugins/VariableConversionCollector/ErrorHandler.js.html +0 -346
- package/coverage/bundler/webpack/custom_plugins/VariableConversionCollector/index.html +0 -116
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/constants.js.html +0 -94
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/handleIgnores.js.html +0 -259
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/index.html +0 -236
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/index.js.html +0 -442
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/insertBefore.js.html +0 -154
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/isPreviouslyProcessed.js.html +0 -142
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/replaceUtils.js.html +0 -127
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/separateHoveredSelectorAndNormalSelector.js.html +0 -139
- package/coverage/bundler/webpack/custom_postcss_plugins/HoverActivePlugin/typeCheckUtils.js.html +0 -193
- package/coverage/bundler/webpack/custom_postcss_plugins/SelectorReplace.js.html +0 -292
- package/coverage/bundler/webpack/custom_postcss_plugins/ValueReplacer.js.html +0 -223
- package/coverage/bundler/webpack/custom_postcss_plugins/VariableModificationPlugin/index.html +0 -116
- package/coverage/bundler/webpack/custom_postcss_plugins/VariableModificationPlugin/index.js.html +0 -1126
- package/coverage/bundler/webpack/custom_postcss_plugins/index.html +0 -131
- package/coverage/bundler/webpack/loaderConfigs/getSpecificPostCssPlugin.js.html +0 -247
- package/coverage/bundler/webpack/loaderConfigs/index.html +0 -116
- package/coverage/createInitialEntries.js.html +0 -136
- package/coverage/dummy.js.html +0 -238
- package/coverage/index.js.html +0 -169
- package/coverage/isObject.js.html +0 -94
- package/coverage/isValid.js.html +0 -106
- package/coverage/removeHashFromFileName.js.html +0 -127
|
@@ -47,10 +47,12 @@ var _configBundleIntegrityReport = require("./pluginConfigs/configBundleIntegrit
|
|
|
47
47
|
|
|
48
48
|
var _configRuntimeResourceCleanup = require("./pluginConfigs/configRuntimeResourceCleanup");
|
|
49
49
|
|
|
50
|
+
var _configCustomScriptLoadingStrategyPlugin = require("./pluginConfigs/configCustomScriptLoadingStrategyPlugin");
|
|
51
|
+
|
|
50
52
|
// import { IgnorePlugin } from 'webpack';
|
|
51
53
|
function plugins(options) {
|
|
52
54
|
const {
|
|
53
55
|
webpackPlugins
|
|
54
56
|
} = options;
|
|
55
|
-
return [(0, _configEnvVariables.configEnvVariables)(options), (0, _configCustomAttributesPlugin.configCustomAttributesPlugin)(options), (0, _configTPHashMappingPlugin.configTPHashMappingPlugin)(options), (0, _configCopyPublicFolders.configCopyPublicFolders)(options), (0, _configIgnorePlugin.configIgnorePlugin)(options), (0, _configMiniCSSExtractPlugin.configMiniCSSExtractPlugin)(options), (0, _configSelectorWeightPlugin.configSelectorWeightPlugin)(options), (0, _configVariableConversionPlugin.configVariableConversionPlugin)(options), (0, _configI18nSplitPlugin.configI18nSplitPlugin)(options), (0, _configRtlCssPlugin.configRtlCssPlugin)(options), (0, _configHtmlWebpackPlugin.configHtmlWebpackPlugin)(options), (0, _configCdnChangePlugin.configCdnChangePlugin)(options), (0, _configServiceWorkerPlugin.configServiceWorkerPlugin)(options), (0, _configEFCTemplatePlugin.configEFCTemplatePlugin)(options), (0, _configResourceHintsPlugin.configResourceHintsPlugin)(options), (0, _configBundleAnalyzer.configBundleAnalyzer)(options), (0, _configManifestJsonPlugin.configManifestJsonPlugin)(options), (0, _configSourceMapPlugin.configSourceMapPlugin)(options), (0, _configProgressPlugin.configProgressPlugin)(options), (0, _configBundleIntegrityReport.configBundleIntegrityReport)(options), (0, _configRuntimeResourceCleanup.configRuntimeResourceCleanup)(options), ...webpackPlugins].filter(Boolean);
|
|
57
|
+
return [(0, _configEnvVariables.configEnvVariables)(options), (0, _configCustomAttributesPlugin.configCustomAttributesPlugin)(options), (0, _configTPHashMappingPlugin.configTPHashMappingPlugin)(options), (0, _configCopyPublicFolders.configCopyPublicFolders)(options), (0, _configIgnorePlugin.configIgnorePlugin)(options), (0, _configMiniCSSExtractPlugin.configMiniCSSExtractPlugin)(options), (0, _configSelectorWeightPlugin.configSelectorWeightPlugin)(options), (0, _configVariableConversionPlugin.configVariableConversionPlugin)(options), (0, _configI18nSplitPlugin.configI18nSplitPlugin)(options), (0, _configRtlCssPlugin.configRtlCssPlugin)(options), (0, _configHtmlWebpackPlugin.configHtmlWebpackPlugin)(options), (0, _configCustomScriptLoadingStrategyPlugin.configCustomScriptLoadingStrategyPlugin)(options), (0, _configCdnChangePlugin.configCdnChangePlugin)(options), (0, _configServiceWorkerPlugin.configServiceWorkerPlugin)(options), (0, _configEFCTemplatePlugin.configEFCTemplatePlugin)(options), (0, _configResourceHintsPlugin.configResourceHintsPlugin)(options), (0, _configBundleAnalyzer.configBundleAnalyzer)(options), (0, _configManifestJsonPlugin.configManifestJsonPlugin)(options), (0, _configSourceMapPlugin.configSourceMapPlugin)(options), (0, _configProgressPlugin.configProgressPlugin)(options), (0, _configBundleIntegrityReport.configBundleIntegrityReport)(options), (0, _configRuntimeResourceCleanup.configRuntimeResourceCleanup)(options), ...webpackPlugins].filter(Boolean);
|
|
56
58
|
}
|
|
@@ -62,7 +62,8 @@ function moduleResolver(options) {
|
|
|
62
62
|
modules: useAppNodeModulesAsPreferred(preferLocalFirst, [nodeModulesPath, _constants.cliNodeModulesPath].filter(Boolean)),
|
|
63
63
|
alias: { ...(defaultAlias ? _libAlias.libAlias : {}),
|
|
64
64
|
...(alias || {})
|
|
65
|
-
}
|
|
65
|
+
},
|
|
66
|
+
extensions: ['.ts', '.js', '.json', '.tsx']
|
|
66
67
|
};
|
|
67
68
|
}
|
|
68
69
|
|
|
@@ -5,20 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.tsLoaders = tsLoaders;
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
const {
|
|
10
|
-
enable
|
|
11
|
-
} = options.typeScript;
|
|
12
|
-
console.log('typescript', enable);
|
|
13
|
-
|
|
14
|
-
if (enable) {
|
|
15
|
-
return [{
|
|
16
|
-
test: /\.(ts|tsx)$/,
|
|
17
|
-
exclude: /node_modules/,
|
|
18
|
-
use: 'ts-loader' // include: path.join(appPath, folder)
|
|
8
|
+
var _babelLoaderConfig = require("./loaderConfigs/babelLoaderConfig");
|
|
19
9
|
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
function tsLoaders(options) {
|
|
11
|
+
return [{
|
|
12
|
+
test: /\.tsx$/,
|
|
13
|
+
exclude: /node_modules/,
|
|
14
|
+
use: [(0, _babelLoaderConfig.babelLoaderConfig)(options)] // include: path.join(appPath, folder)
|
|
22
15
|
|
|
23
|
-
|
|
16
|
+
}];
|
|
24
17
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.getTypeOf = getTypeOf;
|
|
6
7
|
exports.isJsFile = exports.isDirRelatedCss = exports.isCssFile = exports.isCss = void 0;
|
|
7
8
|
|
|
8
9
|
var _path = _interopRequireDefault(require("path"));
|
|
@@ -23,4 +24,8 @@ exports.isJsFile = isJsFile;
|
|
|
23
24
|
|
|
24
25
|
const isCssFile = file => /\.css$/.test(file);
|
|
25
26
|
|
|
26
|
-
exports.isCssFile = isCssFile;
|
|
27
|
+
exports.isCssFile = isCssFile;
|
|
28
|
+
|
|
29
|
+
function getTypeOf(value) {
|
|
30
|
+
return Object.prototype.toString.call(value).split(/\s/)[1].replace(/\]/, '').toLowerCase();
|
|
31
|
+
}
|
|
@@ -25,7 +25,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
25
25
|
|
|
26
26
|
const isJs = ext => ext === '.js';
|
|
27
27
|
|
|
28
|
-
const isTs = ext => ext === '.ts';
|
|
28
|
+
const isTs = ext => ext === '.ts' || ext === '.tsx';
|
|
29
29
|
|
|
30
30
|
const isCss = ext => ext === '.css';
|
|
31
31
|
|
|
@@ -9,10 +9,11 @@ exports.getServerUrl = getServerUrl;
|
|
|
9
9
|
function getServerDomain(serverInfo) {
|
|
10
10
|
const {
|
|
11
11
|
host,
|
|
12
|
-
domain
|
|
12
|
+
domain,
|
|
13
|
+
k8s
|
|
13
14
|
} = serverInfo;
|
|
14
15
|
|
|
15
|
-
if (domain) {
|
|
16
|
+
if (domain && !k8s) {
|
|
16
17
|
return `${host}.${domain}.zohocorpin.com`;
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -21,9 +22,15 @@ function getServerDomain(serverInfo) {
|
|
|
21
22
|
|
|
22
23
|
function getServerUrl({
|
|
23
24
|
domain,
|
|
25
|
+
k8s,
|
|
24
26
|
port,
|
|
25
27
|
protocol = 'http'
|
|
26
28
|
}) {
|
|
27
29
|
const prefix = protocol ? `${protocol}:` : '';
|
|
30
|
+
|
|
31
|
+
if (k8s) {
|
|
32
|
+
return `${prefix}//${domain}`;
|
|
33
|
+
}
|
|
34
|
+
|
|
28
35
|
return `${prefix}//${domain}:${port}/`;
|
|
29
36
|
}
|