@zohodesk/client_build_tool 0.0.9-exp.2 → 0.0.9-exp.4

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,4 +1,16 @@
1
1
  # Changelog and Release Notes
2
+ # v0.0.9-exp.3 (11-05-2025)
3
+ **Feature:-**
4
+ - `alias` support for `build:es` and `build:lib`
5
+ - Add babel-plugin-module-resolver dependencies
6
+ - Modify getBabelPlugin to include module resolver with aliases
7
+
8
+ **Bug Fix:-**
9
+ - Enhance runBabelForTSFile to handle both .tsx and .ts file extensions
10
+ - Update mockApiHandler to ensure mock function is called correctly
11
+
12
+ **Change:-**
13
+ - Refactor defaultConfigValues.js to include cli options for enableRTLSplit
2
14
 
3
15
 
4
16
 
package/README.md CHANGED
@@ -99,6 +99,18 @@ fixes :-
99
99
  - preload plc undefined url fixed
100
100
 
101
101
  # Changelog and Release Notes
102
+ # v0.0.9-exp.3 (11-05-2025)
103
+ **Feature:-**
104
+ - `alias` support for `build:es` and `build:lib`
105
+ - Add babel-plugin-module-resolver dependencies
106
+ - Modify getBabelPlugin to include module resolver with aliases
107
+
108
+ **Bug Fix:-**
109
+ - Enhance runBabelForTSFile to handle both .tsx and .ts file extensions
110
+ - Update mockApiHandler to ensure mock function is called correctly
111
+
112
+ **Change:-**
113
+ - Refactor defaultConfigValues.js to include cli options for enableRTLSplit
102
114
 
103
115
 
104
116
 
@@ -0,0 +1,9 @@
1
+ const {
2
+ requireLocalOrGlobal
3
+ } = require('../lib/shared/bundler/webpack/utils/requireLocalOrGlobal.js');
4
+
5
+ // const {requireLocalOrGlobal} = require
6
+
7
+ let a = '@zohodesk-private/client_dev_cert';
8
+
9
+ console.log(requireLocalOrGlobal(a));
@@ -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'
@@ -20,7 +20,14 @@ function getBabelPlugin(options) {
20
20
  const {
21
21
  mode
22
22
  } = options;
23
- let customPlugins = [];
23
+ const {
24
+ alias
25
+ } = options.resolve; // let customPlugins = [];
26
+
27
+ let customPlugins = [[require.resolve('babel-plugin-module-resolver'), {
28
+ root: ['./'],
29
+ alias
30
+ }]];
24
31
  const {
25
32
  babelCustomizations
26
33
  } = options;
@@ -32,6 +39,4 @@ function getBabelPlugin(options) {
32
39
  }
33
40
 
34
41
  return customPlugins.filter(Boolean);
35
- }
36
-
37
- ;
42
+ }
@@ -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
  }
@@ -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
  // }