@zohodesk/client_build_tool 0.0.10-exp.2 → 0.0.10-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,6 +1,16 @@
1
1
  # Changelog and Release Notes
2
+ # v0.0.10 (12-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
2
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
3
11
 
12
+ **Change:-**
13
+ - Refactor defaultConfigValues.js to include cli options for enableRTLSplit
4
14
 
5
15
  **Feature:-**
6
16
  - externals was added to Prevent bundling of certain imported packages and retrieve these external dependencies at runtime.
package/README.md CHANGED
@@ -99,8 +99,18 @@ fixes :-
99
99
  - preload plc undefined url fixed
100
100
 
101
101
  # Changelog and Release Notes
102
+ # v0.0.10 (12-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
102
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
103
111
 
112
+ **Change:-**
113
+ - Refactor defaultConfigValues.js to include cli options for enableRTLSplit
104
114
 
105
115
  **Feature:-**
106
116
  - 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'
@@ -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
  // }
@@ -20,7 +20,7 @@ function urlConcat(url, path) {
20
20
  return path;
21
21
  }
22
22
 
23
- return `${slashRemovedUrl}/${slashRemovedPath}/`;
23
+ return `${slashRemovedUrl}/${slashRemovedPath}`;
24
24
  }
25
25
 
26
26
  function removeLastSlash(url) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/client_build_tool",
3
- "version": "0.0.6-exp.43",
3
+ "version": "0.0.10-exp.3",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
@@ -1961,6 +1961,52 @@
1961
1961
  "object.assign": "^4.1.0"
1962
1962
  }
1963
1963
  },
1964
+ "babel-plugin-module-resolver": {
1965
+ "version": "5.0.2",
1966
+ "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.2.tgz",
1967
+ "integrity": "sha512-9KtaCazHee2xc0ibfqsDeamwDps6FZNo5S0Q81dUqEuFzVwPhcT4J5jOqIVvgCA3Q/wO9hKYxN/Ds3tIsp5ygg==",
1968
+ "requires": {
1969
+ "find-babel-config": "^2.1.1",
1970
+ "glob": "^9.3.3",
1971
+ "pkg-up": "^3.1.0",
1972
+ "reselect": "^4.1.7",
1973
+ "resolve": "^1.22.8"
1974
+ },
1975
+ "dependencies": {
1976
+ "brace-expansion": {
1977
+ "version": "2.0.1",
1978
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
1979
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
1980
+ "requires": {
1981
+ "balanced-match": "^1.0.0"
1982
+ }
1983
+ },
1984
+ "glob": {
1985
+ "version": "9.3.5",
1986
+ "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz",
1987
+ "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==",
1988
+ "requires": {
1989
+ "fs.realpath": "^1.0.0",
1990
+ "minimatch": "^8.0.2",
1991
+ "minipass": "^4.2.4",
1992
+ "path-scurry": "^1.6.1"
1993
+ }
1994
+ },
1995
+ "minimatch": {
1996
+ "version": "8.0.4",
1997
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz",
1998
+ "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==",
1999
+ "requires": {
2000
+ "brace-expansion": "^2.0.1"
2001
+ }
2002
+ },
2003
+ "reselect": {
2004
+ "version": "4.1.8",
2005
+ "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz",
2006
+ "integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ=="
2007
+ }
2008
+ }
2009
+ },
1964
2010
  "babel-plugin-polyfill-corejs2": {
1965
2011
  "version": "0.3.1",
1966
2012
  "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz",
@@ -2942,6 +2988,14 @@
2942
2988
  }
2943
2989
  }
2944
2990
  },
2991
+ "find-babel-config": {
2992
+ "version": "2.1.2",
2993
+ "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.1.2.tgz",
2994
+ "integrity": "sha512-ZfZp1rQyp4gyuxqt1ZqjFGVeVBvmpURMqdIWXbPRfB97Bf6BzdK/xSIbylEINzQ0kB5tlDQfn9HkNXXWsqTqLg==",
2995
+ "requires": {
2996
+ "json5": "^2.2.3"
2997
+ }
2998
+ },
2945
2999
  "find-up": {
2946
3000
  "version": "4.1.0",
2947
3001
  "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
@@ -2988,9 +3042,9 @@
2988
3042
  "optional": true
2989
3043
  },
2990
3044
  "function-bind": {
2991
- "version": "1.1.1",
2992
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
2993
- "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
3045
+ "version": "1.1.2",
3046
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
3047
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="
2994
3048
  },
2995
3049
  "fz-i18n": {
2996
3050
  "version": "1.2.0-beta.15",
@@ -3111,6 +3165,14 @@
3111
3165
  "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
3112
3166
  "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
3113
3167
  },
3168
+ "hasown": {
3169
+ "version": "2.0.2",
3170
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
3171
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
3172
+ "requires": {
3173
+ "function-bind": "^1.1.2"
3174
+ }
3175
+ },
3114
3176
  "he": {
3115
3177
  "version": "1.2.0",
3116
3178
  "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
@@ -3320,11 +3382,11 @@
3320
3382
  }
3321
3383
  },
3322
3384
  "is-core-module": {
3323
- "version": "2.9.0",
3324
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz",
3325
- "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==",
3385
+ "version": "2.16.1",
3386
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
3387
+ "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
3326
3388
  "requires": {
3327
- "has": "^1.0.3"
3389
+ "hasown": "^2.0.2"
3328
3390
  }
3329
3391
  },
3330
3392
  "is-extglob": {
@@ -3715,6 +3777,11 @@
3715
3777
  "brace-expansion": "^1.1.7"
3716
3778
  }
3717
3779
  },
3780
+ "minipass": {
3781
+ "version": "4.2.8",
3782
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz",
3783
+ "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ=="
3784
+ },
3718
3785
  "moment": {
3719
3786
  "version": "2.29.4",
3720
3787
  "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
@@ -3986,6 +4053,27 @@
3986
4053
  "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
3987
4054
  "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
3988
4055
  },
4056
+ "path-scurry": {
4057
+ "version": "1.11.1",
4058
+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
4059
+ "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
4060
+ "requires": {
4061
+ "lru-cache": "^10.2.0",
4062
+ "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
4063
+ },
4064
+ "dependencies": {
4065
+ "lru-cache": {
4066
+ "version": "10.4.3",
4067
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
4068
+ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="
4069
+ },
4070
+ "minipass": {
4071
+ "version": "7.1.2",
4072
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
4073
+ "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="
4074
+ }
4075
+ }
4076
+ },
3989
4077
  "path-to-regexp": {
3990
4078
  "version": "0.1.7",
3991
4079
  "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
@@ -4019,6 +4107,46 @@
4019
4107
  "find-up": "^4.0.0"
4020
4108
  }
4021
4109
  },
4110
+ "pkg-up": {
4111
+ "version": "3.1.0",
4112
+ "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz",
4113
+ "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==",
4114
+ "requires": {
4115
+ "find-up": "^3.0.0"
4116
+ },
4117
+ "dependencies": {
4118
+ "find-up": {
4119
+ "version": "3.0.0",
4120
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
4121
+ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
4122
+ "requires": {
4123
+ "locate-path": "^3.0.0"
4124
+ }
4125
+ },
4126
+ "locate-path": {
4127
+ "version": "3.0.0",
4128
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
4129
+ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
4130
+ "requires": {
4131
+ "p-locate": "^3.0.0",
4132
+ "path-exists": "^3.0.0"
4133
+ }
4134
+ },
4135
+ "p-locate": {
4136
+ "version": "3.0.0",
4137
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
4138
+ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
4139
+ "requires": {
4140
+ "p-limit": "^2.0.0"
4141
+ }
4142
+ },
4143
+ "path-exists": {
4144
+ "version": "3.0.0",
4145
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
4146
+ "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ=="
4147
+ }
4148
+ }
4149
+ },
4022
4150
  "postcss": {
4023
4151
  "version": "8.4.21",
4024
4152
  "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz",
@@ -4651,11 +4779,11 @@
4651
4779
  "integrity": "sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA=="
4652
4780
  },
4653
4781
  "resolve": {
4654
- "version": "1.22.1",
4655
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
4656
- "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
4782
+ "version": "1.22.10",
4783
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
4784
+ "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==",
4657
4785
  "requires": {
4658
- "is-core-module": "^2.9.0",
4786
+ "is-core-module": "^2.16.0",
4659
4787
  "path-parse": "^1.0.7",
4660
4788
  "supports-preserve-symlinks-flag": "^1.0.0"
4661
4789
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/client_build_tool",
3
- "version": "0.0.10-exp.2",
3
+ "version": "0.0.10-exp.4",
4
4
  "description": "A CLI tool to build web applications and client libraries",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -31,8 +31,10 @@
31
31
  "@babel/core": "7.18.5",
32
32
  "@babel/preset-env": "7.18.2",
33
33
  "@babel/preset-react": "7.17.12",
34
+ "@babel/preset-typescript": "7.23.2",
34
35
  "@zohodesk/client_packages_group": "1.0.2",
35
36
  "babel-loader": "9.1.2",
37
+ "babel-plugin-module-resolver": "5.0.2",
36
38
  "babel-plugin-transform-react-remove-prop-types": "0.4.24",
37
39
  "babel-plugin-transform-remove-console": "6.9.4",
38
40
  "copy-webpack-plugin": "11.0.0",
@@ -50,14 +52,13 @@
50
52
  "postcss": "8.4.21",
51
53
  "postcss-loader": "7.0.2",
52
54
  "postcss-rtl": "2.0.0",
55
+ "ts-loader": "8.2.0",
56
+ "typescript": "5.2.2",
53
57
  "uglifycss": "0.0.29",
54
58
  "watcher": "1.2.0",
55
59
  "webpack": "5.79.0",
56
60
  "webpack-bundle-analyzer": "4.8.0",
57
61
  "webpack-cli": "4.10.0",
58
- "webpack-dev-middleware": "6.1.1",
59
- "typescript": "5.2.2",
60
- "ts-loader": "8.2.0",
61
- "@babel/preset-typescript": "7.23.2"
62
+ "webpack-dev-middleware": "6.1.1"
62
63
  }
63
64
  }