@zohodesk/client_build_tool 0.0.11-exp.15 → 0.0.11-exp.17

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/CHANGELOG.md CHANGED
@@ -1,6 +1,34 @@
1
1
  # Changelog and Release Notes
2
2
 
3
+ - remove babel-plugin-module-resolver dependencies
3
4
 
5
+ **Adjustments:-**
6
+ - Public Folder configuration is separated for development and production
7
+
8
+ **Bug Fix:-**
9
+ - Fixed the issue where the build log was not visible when `stats (bundle integrity)` was enabled. The problem was resolved by adding an error check in the `bundleIntegrity plugin`.
10
+ - Removed the babel-plugin-module-resolver dependency to resolve the alias resolution issue in the application.
11
+ - Fixed the issue where a space in the variable name causes it to return an undefined value.
12
+ - Fixed the URL path generation issue that occurred while using context in the development setup.
13
+
14
+
15
+
16
+ # v0.0.11
17
+
18
+ # v0.0.10 (12-05-2025)
19
+ **Feature:-**
20
+ - `alias` support for `build:es` and `build:lib`
21
+ - Add babel-plugin-module-resolver dependencies
22
+ - Modify getBabelPlugin to include module resolver with aliases
23
+
24
+ **Bug Fix:-**
25
+ - Enhance runBabelForTSFile to handle both .tsx and .ts file extensions
26
+ - Update mockApiHandler to ensure mock function is called correctly
27
+
28
+ **Change:-**
29
+ - Refactor defaultConfigValues.js to include cli options for enableRTLSplit
30
+
31
+ ## v0.0.9
4
32
 
5
33
  **Feature:-**
6
34
  - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
package/README.md CHANGED
@@ -100,7 +100,35 @@ fixes :-
100
100
 
101
101
  # Changelog and Release Notes
102
102
 
103
+ - remove babel-plugin-module-resolver dependencies
103
104
 
105
+ **Adjustments:-**
106
+ - Public Folder configuration is separated for development and production
107
+
108
+ **Bug Fix:-**
109
+ - Fixed the issue where the build log was not visible when `stats (bundle integrity)` was enabled. The problem was resolved by adding an error check in the `bundleIntegrity plugin`.
110
+ - Removed the babel-plugin-module-resolver dependency to resolve the alias resolution issue in the application.
111
+ - Fixed the issue where a space in the variable name causes it to return an undefined value.
112
+ - Fixed the URL path generation issue that occurred while using context in the development setup.
113
+
114
+
115
+
116
+ # v0.0.11
117
+
118
+ # v0.0.10 (12-05-2025)
119
+ **Feature:-**
120
+ - `alias` support for `build:es` and `build:lib`
121
+ - Add babel-plugin-module-resolver dependencies
122
+ - Modify getBabelPlugin to include module resolver with aliases
123
+
124
+ **Bug Fix:-**
125
+ - Enhance runBabelForTSFile to handle both .tsx and .ts file extensions
126
+ - Update mockApiHandler to ensure mock function is called correctly
127
+
128
+ **Change:-**
129
+ - Refactor defaultConfigValues.js to include cli options for enableRTLSplit
130
+
131
+ ## v0.0.9
104
132
 
105
133
  **Feature:-**
106
134
  - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
@@ -115,7 +115,10 @@ var _default = {
115
115
  // Name Suggestions `customizations` this will be easier then `plugin` to understand for developers
116
116
  plugins: {
117
117
  rtlSplit: {
118
- enableRTLSplit: false,
118
+ enableRTLSplit: {
119
+ value: false,
120
+ cli: 'enable_rtl_split'
121
+ },
119
122
  templateLabel: '{{--dir}}',
120
123
  disableMinifySelector: false,
121
124
  dirVarName: 'document.dir'
@@ -171,25 +174,7 @@ var _default = {
171
174
  localeVarName: 'document.documentElement.lang',
172
175
  jsonpFunc: 'console.log',
173
176
  jsResource: null,
174
- propertiesFolder: null,
175
- useNumericIndexing: false
176
- },
177
- i18nIndexing: {
178
- enable: false,
179
- devMode: false,
180
- jsResourcePath: './deskapp/properties/JSResources.properties',
181
- propertiesFolderPath: './deskapp/properties',
182
- numericMapPath: './deskapp/properties/i18n-numeric-map.json',
183
- numericFilenameTemplate: 'i18n-chunk/[locale]/numeric.i18n.js',
184
- dynamicFilenameTemplate: 'i18n-chunk/[locale]/dynamic.i18n.js',
185
- singleFileTemplate: 'i18n/[locale].js',
186
- jsonpFunc: 'window.loadI18nChunk',
187
- htmlTemplateLabel: '{{--user-locale}}',
188
- localeVarName: 'window.userLangCode',
189
- singleFile: false,
190
- includeContentHash: false,
191
- generateManifest: false,
192
- manifestPath: null
177
+ propertiesFolder: null
193
178
  },
194
179
  publicFolders: ['...'],
195
180
  app: {
@@ -94,29 +94,12 @@ var _default = {
94
94
  localeVarName: 'document.documentElement.lang',
95
95
  jsonpFunc: 'console.log',
96
96
  jsResource: null,
97
- propertiesFolder: null,
98
- useNumericIndexing: false
97
+ propertiesFolder: null
99
98
  },
100
- i18nIndexing: {
101
- enable: false,
102
- devMode: false,
103
- jsResourcePath: './deskapp/properties/JSResources.properties',
104
- propertiesFolderPath: './deskapp/properties',
105
- numericMapPath: './deskapp/properties/i18n-numeric-map.json',
106
- numericFilenameTemplate: 'i18n-chunk/[locale]/numeric.i18n.js',
107
- dynamicFilenameTemplate: 'i18n-chunk/[locale]/dynamic.i18n.js',
108
- jsonpFunc: 'window.loadI18nChunk',
109
- htmlTemplateLabel: '{{--user-locale}}',
110
- localeVarName: 'window.userLangCode',
111
- singleFile: false,
112
- includeContentHash: false,
113
- generateManifest: false,
114
- manifestPath: null
99
+ publicFolders: {
100
+ dev: ['...'],
101
+ prod: ['...']
115
102
  },
116
- publicFolders: ['...', {
117
- source: './deskapp/tp/',
118
- target: './tp/'
119
- }],
120
103
  app: {
121
104
  entryFile: 'src/index.js',
122
105
  tpFolder: null,
@@ -19,7 +19,8 @@ const babelPluginOrder = ['removeAttribute', 'removePropTypes', 'devConsoleExclu
19
19
  function getBabelPlugin(options) {
20
20
  const {
21
21
  mode
22
- } = options;
22
+ } = options; // let customPlugins = [];
23
+
23
24
  let customPlugins = [];
24
25
  const {
25
26
  babelCustomizations
@@ -32,6 +33,4 @@ function getBabelPlugin(options) {
32
33
  }
33
34
 
34
35
  return customPlugins.filter(Boolean);
35
- }
36
-
37
- ;
36
+ }
@@ -25,6 +25,6 @@ function runBabelForTSFile({
25
25
  // const jsSourceCode = readFileSync(filename).toString();
26
26
  const babelConfig = (0, _babelWebConfig.babelWebConfig)(options, mode);
27
27
  const result = (0, _core.transformFileSync)(filename, babelConfig);
28
- (0, _copyFile.writeFile)(outputFile.replace('.tsx', '.js'), result.code);
28
+ (0, _copyFile.writeFile)(outputFile.replace('.tsx', '.js').replace('.ts', '.js'), result.code);
29
29
  }
30
30
  }
@@ -30,6 +30,16 @@ class BundleIntegrityReport {
30
30
 
31
31
  apply(compiler) {
32
32
  compiler.hooks.done.tapAsync(pluginName, (stats, callback) => {
33
+ if (stats.hasErrors()) {
34
+ console.error(stats.toString({
35
+ all: false,
36
+ errors: true,
37
+ errorDetails: true,
38
+ colors: true
39
+ }));
40
+ return callback(new Error('Build failed due to compilation errors.'));
41
+ }
42
+
33
43
  const statsJson = (0, _objectManipulation.removeKeysFromObject)(stats.toJson(this.statsOptions), this.excludeKeysInStat);
34
44
  this.emitStats(statsJson).on('end', () => {
35
45
  callback();
@@ -7,29 +7,11 @@ exports.jsLoaders = jsLoaders;
7
7
 
8
8
  var _babelLoaderConfig = require("./loaderConfigs/babelLoaderConfig");
9
9
 
10
- const {
11
- i18nIdReplaceLoaderConfig
12
- } = require('./loaderConfigs/i18nIdReplaceLoaderConfig');
13
-
14
10
  function jsLoaders(options) {
15
- const useLoaders = [];
16
- useLoaders.push((0, _babelLoaderConfig.babelLoaderConfig)(options));
17
- const shouldUseNumericIndexing = options.i18nIndexing && options.i18nIndexing.enable || options.i18nChunkSplit && options.i18nChunkSplit.chunkSplitEnable && options.i18nChunkSplit.useNumericIndexing;
18
-
19
- if (shouldUseNumericIndexing) {
20
- try {
21
- const loaderConfig = i18nIdReplaceLoaderConfig(options, options.context);
22
-
23
- if (loaderConfig) {
24
- useLoaders.push(loaderConfig);
25
- }
26
- } catch (err) {// Silently skip if configuration fails
27
- }
28
- }
29
-
30
11
  return [{
31
12
  test: /\.js$/,
32
13
  exclude: /node_modules/,
33
- use: useLoaders
14
+ use: [(0, _babelLoaderConfig.babelLoaderConfig)(options)] // include: path.join(appPath, folder)
15
+
34
16
  }];
35
17
  }
@@ -49,12 +49,10 @@ var _configRuntimeResourceCleanup = require("./pluginConfigs/configRuntimeResour
49
49
 
50
50
  var _configCustomScriptLoadingStrategyPlugin = require("./pluginConfigs/configCustomScriptLoadingStrategyPlugin");
51
51
 
52
- var _configI18nNumericIndexPlugin = require("./pluginConfigs/configI18nNumericIndexPlugin");
53
-
54
52
  // import { IgnorePlugin } from 'webpack';
55
53
  function plugins(options) {
56
54
  const {
57
55
  webpackPlugins
58
56
  } = options;
59
- 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, _configI18nNumericIndexPlugin.configI18nNumericIndexPlugin)(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);
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);
60
58
  }
@@ -259,7 +259,7 @@ var _default = ({
259
259
  if (range) {
260
260
  // console.log('multiple :', decl.value)
261
261
  let newVal = '';
262
- decl.value.split(' ').forEach(singleVal => {
262
+ decl.value.split(' ').filter(Boolean).forEach(singleVal => {
263
263
  newVal += `${singleConvertor(singleVal, settings.replacements.px, {
264
264
  decl,
265
265
  filename,
@@ -44,6 +44,13 @@ function handleMockApi(mockEntryFile, app) {
44
44
  const entryFilePath = (0, _constants.joinWithAppPath)(mockEntryFile); // eslint-disable-next-line no-use-before-define
45
45
 
46
46
  const mockFunc = safeRequire(entryFilePath);
47
+
48
+ if (typeof mockFunc === 'function') {
49
+ // eslint-disable-next-line no-use-before-define
50
+ mockFunc(app);
51
+ return;
52
+ }
53
+
47
54
  mockFunc?.mockApi?.(app);
48
55
  } // function handleMockApi(params) {
49
56
  // }
@@ -17,10 +17,11 @@ function urlConcat(url, path) {
17
17
  const slashRemovedPath = removeFrontSlash(path);
18
18
 
19
19
  if (slashRemovedUrl === '') {
20
- return path;
21
- }
20
+ return `${path}/`;
21
+ } //return `${slashRemovedUrl}/${slashRemovedPath}`;
22
22
 
23
- return `${slashRemovedUrl}/${slashRemovedPath}/`;
23
+
24
+ return `${[slashRemovedUrl, slashRemovedPath].filter(a => a).join('/')}/`;
24
25
  }
25
26
 
26
27
  function removeLastSlash(url) {