@zohodesk/react-cli 1.1.22 → 1.1.23
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +77 -0
- package/lib/babel/cmjs-plugins-presets.js +6 -2
- package/lib/babel/es-plugins-presets.js +6 -2
- package/lib/configs/libAlias.js +36 -2
- package/lib/configs/resolvers.js +3 -1
- package/lib/loaders/workerLoader.js +39 -24
- package/lib/pluginUtils/configHtmlWebpackPlugins.js +62 -2
- package/lib/pluginUtils/getDevPlugins.js +4 -2
- package/lib/pluginUtils/getProdPlugins.js +3 -1
- package/lib/plugins/CustomScriptLoadingStrategyPlugin.js +109 -0
- package/lib/plugins/EventsHandlingPlugin.js +2 -2
- package/lib/plugins/I18nSplitPlugin/I18nDownlodLogic.js +1 -1
- package/lib/schemas/index.js +6 -1
- package/lib/utils/index.js +14 -0
- package/lib/utils/typeCheck.js +10 -0
- package/npm-shrinkwrap.json +382 -2
- package/package.json +3 -2
package/README.md
CHANGED
@@ -44,6 +44,61 @@ Now to run app
|
|
44
44
|
|
45
45
|
# Change Logs
|
46
46
|
|
47
|
+
# 1.1.23 (28-06-2024)
|
48
|
+
|
49
|
+
**Features**
|
50
|
+
|
51
|
+
- alias feature added for library, application and jest. To enable it , configure your `react-cli.config.js` as below
|
52
|
+
|
53
|
+
```
|
54
|
+
{
|
55
|
+
alias: {
|
56
|
+
"@components": './src/components,
|
57
|
+
}
|
58
|
+
}
|
59
|
+
```
|
60
|
+
|
61
|
+
- For devmapping config jsConfig.json ad below
|
62
|
+
|
63
|
+
```
|
64
|
+
{
|
65
|
+
"compilerOptions": {
|
66
|
+
"baseUrl": ".",
|
67
|
+
"paths": {
|
68
|
+
"@components/*": [ "./src/components/*"],
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
```
|
73
|
+
|
74
|
+
- Customized Script loading strategy added. To enabled it, configure your `react-cli.config.js` as below
|
75
|
+
|
76
|
+
```
|
77
|
+
{
|
78
|
+
app: {
|
79
|
+
htmlTemplate: {
|
80
|
+
customScriptLoadingStrategey: {
|
81
|
+
enable: true,
|
82
|
+
options: {
|
83
|
+
async: [/.*js$/],
|
84
|
+
defer: [/^main.*\.js$/]
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
```
|
91
|
+
|
92
|
+
**Changes**
|
93
|
+
|
94
|
+
- Worker loading logic
|
95
|
+
|
96
|
+
# 1.1.22 (6-6-2024)
|
97
|
+
|
98
|
+
**Changes**
|
99
|
+
|
100
|
+
- Bug fix in Typescript
|
101
|
+
|
47
102
|
# 1.1.21 (4-6-2024)
|
48
103
|
|
49
104
|
- TypeScript support has been added for the application, library, and Jest.
|
@@ -59,6 +114,28 @@ Now to run app
|
|
59
114
|
```
|
60
115
|
- The Memory leak issue while downloading i18n and CSS files has been fixed
|
61
116
|
|
117
|
+
|
118
|
+
# 1.1.20-exp.1
|
119
|
+
|
120
|
+
**Changes**
|
121
|
+
|
122
|
+
- Added memory leak fixes for script, links tags
|
123
|
+
|
124
|
+
**Feature**
|
125
|
+
- Custom Script loading strategy support for initial html script tags.
|
126
|
+
|
127
|
+
# 1.1.19-exp.18
|
128
|
+
|
129
|
+
**Changes**
|
130
|
+
|
131
|
+
- To do further build size optimization by utilizing webpack provided config.
|
132
|
+
|
133
|
+
```
|
134
|
+
innerGraph: true,
|
135
|
+
usedExports: true,
|
136
|
+
sideEffects: true
|
137
|
+
```
|
138
|
+
|
62
139
|
# 1.1.20 (27-5-2024)
|
63
140
|
|
64
141
|
**Feature**
|
@@ -18,12 +18,16 @@ const {
|
|
18
18
|
babelCustomizationForLibrary: {
|
19
19
|
babelPlugins
|
20
20
|
},
|
21
|
-
enableTypeScript
|
21
|
+
enableTypeScript,
|
22
|
+
alias
|
22
23
|
} = (0, _utils.getOptions)();
|
23
24
|
const isProd = mode.toLowerCase() === 'prod';
|
24
25
|
const defaultPlugins = [[require.resolve('babel-plugin-transform-define'), isProd ? {
|
25
26
|
__DOCS__: false
|
26
|
-
} : {}], require.resolve('@babel/plugin-syntax-dynamic-import')
|
27
|
+
} : {}], require.resolve('@babel/plugin-syntax-dynamic-import'), [require.resolve('babel-plugin-module-resolver'), {
|
28
|
+
"root": ["./"],
|
29
|
+
alias
|
30
|
+
}]];
|
27
31
|
const resolvedPlugins = [];
|
28
32
|
babelPlugins.forEach(plugin => {
|
29
33
|
resolvedPlugins.push(require.resolve(plugin));
|
@@ -19,12 +19,16 @@ const {
|
|
19
19
|
babelCustomizationForLibrary: {
|
20
20
|
babelPlugins
|
21
21
|
},
|
22
|
-
enableTypeScript
|
22
|
+
enableTypeScript,
|
23
|
+
alias
|
23
24
|
} = (0, _utils.getOptions)();
|
24
25
|
const isProd = mode.toLowerCase() === 'prod';
|
25
26
|
const defaultPlugins = [[require.resolve('babel-plugin-transform-define'), isProd ? {
|
26
27
|
__DOCS__: false
|
27
|
-
} : {}], require.resolve('@babel/plugin-syntax-dynamic-import')
|
28
|
+
} : {}], require.resolve('@babel/plugin-syntax-dynamic-import'), [require.resolve('babel-plugin-module-resolver'), {
|
29
|
+
"root": ["./"],
|
30
|
+
alias
|
31
|
+
}]];
|
28
32
|
const resolvedPlugins = [];
|
29
33
|
babelPlugins.forEach(plugin => {
|
30
34
|
resolvedPlugins.push(require.resolve(plugin));
|
package/lib/configs/libAlias.js
CHANGED
@@ -3,12 +3,45 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
+
exports.aliasPathCreation = aliasPathCreation;
|
6
7
|
exports.libAlias = exports.jestModuleNameMapper = void 0;
|
8
|
+
|
9
|
+
var _utils = require("../utils");
|
10
|
+
|
11
|
+
var _path = _interopRequireDefault(require("path"));
|
12
|
+
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14
|
+
|
7
15
|
// the reason for alias at the time was code tree shaking
|
8
16
|
// tree shaking was most compactable with ES module system
|
9
17
|
// FIXME: But there is a posiblity when these package does not have lib,
|
10
18
|
// app will work because of alias, But may be jest won't work because of not alais
|
11
19
|
// So need to think about use alais in jest
|
20
|
+
const appPath = process.cwd();
|
21
|
+
const {
|
22
|
+
alias,
|
23
|
+
app
|
24
|
+
} = (0, _utils.getOptions)();
|
25
|
+
const {
|
26
|
+
disableES5Transpile
|
27
|
+
} = app;
|
28
|
+
|
29
|
+
function aliasPathCreation(customAlias) {
|
30
|
+
if (customAlias == null) {
|
31
|
+
return {};
|
32
|
+
}
|
33
|
+
|
34
|
+
const newAlias = {};
|
35
|
+
Object.keys(customAlias).forEach(key => {
|
36
|
+
if (customAlias[key].startsWith('.')) {
|
37
|
+
newAlias[key] = _path.default.resolve(appPath, customAlias[key]);
|
38
|
+
} else {
|
39
|
+
newAlias[key] = customAlias[key];
|
40
|
+
}
|
41
|
+
});
|
42
|
+
return newAlias;
|
43
|
+
}
|
44
|
+
|
12
45
|
const libAlias = {
|
13
46
|
'@zohodesk/components/lib': '@zohodesk/components/es',
|
14
47
|
// '@zohodesk/zc-custom/lib': '@zohodesk/zc-custom/es',
|
@@ -31,8 +64,9 @@ const libAlias = {
|
|
31
64
|
// '^@components(.*)$': '<rootDir>/src/components$1',
|
32
65
|
|
33
66
|
exports.libAlias = libAlias;
|
34
|
-
const
|
35
|
-
|
67
|
+
const totalAlias = disableES5Transpile ? Object.assign({}, libAlias, aliasPathCreation(alias)) : aliasPathCreation(alias);
|
68
|
+
const jestModuleNameMapper = Object.keys(totalAlias).reduce((previousValue, key) => {
|
69
|
+
previousValue[`^${key}(.*)$`] = `${totalAlias[key]}$1`;
|
36
70
|
return previousValue;
|
37
71
|
}, {});
|
38
72
|
exports.jestModuleNameMapper = jestModuleNameMapper;
|
package/lib/configs/resolvers.js
CHANGED
@@ -21,6 +21,7 @@ function moduleResolver(options) {
|
|
21
21
|
moduleResolvePath,
|
22
22
|
disableES5Transpile
|
23
23
|
} = options.app;
|
24
|
+
const customAlias = options.alias;
|
24
25
|
let required = moduleResolvePath && (0, _requireLocalOrGlobal.requireLocal)(moduleResolvePath);
|
25
26
|
|
26
27
|
if (!required) {
|
@@ -32,10 +33,11 @@ function moduleResolver(options) {
|
|
32
33
|
}
|
33
34
|
|
34
35
|
const nodeModulesPath = required ? required.nodeModulesPath : _client_packages_group.nodeModulesPath;
|
36
|
+
const totalAlias = disableES5Transpile ? Object.assign({}, _libAlias.libAlias, (0, _libAlias.aliasPathCreation)(customAlias)) : (0, _libAlias.aliasPathCreation)(customAlias);
|
35
37
|
return {
|
36
38
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
37
39
|
modules: [nodeModulesPath, _constants.cliNodeModulesPath, 'node_modules'].filter(Boolean),
|
38
|
-
alias:
|
40
|
+
alias: totalAlias // alias: { ...libAlias, ...clientDependenies }
|
39
41
|
|
40
42
|
};
|
41
43
|
}
|
@@ -19,32 +19,32 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
19
19
|
/* import WebWorkerTemplatePlugin from 'webpack/lib/webworker/WebWorkerTemplatePlugin';
|
20
20
|
import ExternalsPlugin from 'webpack/lib/ExternalsPlugin'; */
|
21
21
|
const schema = {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
type: 'object',
|
23
|
+
properties: {
|
24
|
+
publicPath: {
|
25
|
+
anyOf: [{
|
26
|
+
type: 'string'
|
27
27
|
}, {
|
28
|
-
|
28
|
+
instanceof: 'Function'
|
29
29
|
}]
|
30
30
|
},
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
filename: {
|
32
|
+
anyOf: [{
|
33
|
+
type: 'string',
|
34
|
+
minLength: 1
|
35
35
|
}, {
|
36
|
-
|
36
|
+
instanceof: 'Function'
|
37
37
|
}]
|
38
38
|
},
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
chunkFilename: {
|
40
|
+
type: 'string',
|
41
|
+
minLength: 1
|
42
42
|
},
|
43
|
-
|
44
|
-
|
43
|
+
esModule: {
|
44
|
+
type: 'boolean'
|
45
45
|
}
|
46
46
|
},
|
47
|
-
|
47
|
+
additionalProperties: false
|
48
48
|
}; // eslint-disable-next-line
|
49
49
|
|
50
50
|
function loader() {}
|
@@ -112,25 +112,40 @@ function pitch(request) {
|
|
112
112
|
}
|
113
113
|
|
114
114
|
function workerCode() {
|
115
|
+
if (this.workerInstance) {
|
116
|
+
return this.workerInstance;
|
117
|
+
}
|
118
|
+
|
115
119
|
let blob;
|
116
120
|
|
117
121
|
try {
|
118
122
|
blob = new Blob([`importScripts('${this.workerUrl}');`], {
|
119
|
-
|
123
|
+
type: 'application/javascript'
|
120
124
|
});
|
121
125
|
} catch (e1) {
|
122
126
|
throw new Error(e1);
|
123
127
|
}
|
124
128
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
return
|
129
|
+
const url = window.URL || window.webkitURL;
|
130
|
+
const blobUrl = url.createObjectURL(blob);
|
131
|
+
this.workerInstance = new Worker(blobUrl);
|
132
|
+
return this.workerInstance;
|
129
133
|
}
|
130
134
|
|
131
|
-
return cb(null,
|
135
|
+
return cb(null, `const workerObj ={\n
|
136
|
+
workerInstance: null, \n
|
132
137
|
workerUrl: __webpack_public_path__ + ${JSON.stringify(entry)}, \n
|
133
138
|
getInstance: ${workerCode} \n
|
134
|
-
}
|
139
|
+
};\n
|
140
|
+
workerObj.getInstance();
|
141
|
+
${options.esModule ? 'export default' : 'module.exports ='} workerObj;
|
142
|
+
`); // return cb(
|
143
|
+
// null,
|
144
|
+
// `${options.esModule ? 'export default' : 'module.exports ='} {\n
|
145
|
+
// workerInstance: null, \n
|
146
|
+
// workerUrl: __webpack_public_path__ + ${JSON.stringify(entry)}, \n
|
147
|
+
// getInstance: ${workerCode} \n
|
148
|
+
// }`
|
149
|
+
// );
|
135
150
|
});
|
136
151
|
}
|
@@ -13,6 +13,10 @@ var _htmlWebpackInjectAttributesPlugin = _interopRequireDefault(require("html-we
|
|
13
13
|
|
14
14
|
var _common = require("../common");
|
15
15
|
|
16
|
+
var _utils = require("../utils");
|
17
|
+
|
18
|
+
var _CustomScriptLoadingStrategyPlugin = _interopRequireDefault(require("../plugins/CustomScriptLoadingStrategyPlugin"));
|
19
|
+
|
16
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17
21
|
|
18
22
|
const defaultHTMLMiniFyOption = {
|
@@ -26,6 +30,51 @@ const defaultHTMLMiniFyOption = {
|
|
26
30
|
removeStyleLinkTypeAttributes: true,
|
27
31
|
useShortDoctype: true
|
28
32
|
};
|
33
|
+
const defaultScriptLoadingStrategy = 'defer';
|
34
|
+
const allowedScriptLoadingStrategies = ['blocking', 'defer', 'async', 'module'];
|
35
|
+
|
36
|
+
function isAllowedScriptLoadingStrategyUsed(scriptLoadingStategey) {
|
37
|
+
return allowedScriptLoadingStrategies.includes(scriptLoadingStategey);
|
38
|
+
}
|
39
|
+
|
40
|
+
function getScriptLoadingStrategyForStringType(scriptLoadingStategey) {
|
41
|
+
if (isAllowedScriptLoadingStrategyUsed(scriptLoadingStategey)) {
|
42
|
+
return scriptLoadingStategey;
|
43
|
+
}
|
44
|
+
|
45
|
+
return defaultScriptLoadingStrategy;
|
46
|
+
}
|
47
|
+
|
48
|
+
function getScriptLoadingStrategyForObject(scriptLoadingStategey) {
|
49
|
+
if (Object.keys(scriptLoadingStategey).length === 0) {
|
50
|
+
return defaultScriptLoadingStrategy;
|
51
|
+
}
|
52
|
+
|
53
|
+
const isAllowedScriptLoadingStrategy = Object.keys(scriptLoadingStategey).every(key => isAllowedScriptLoadingStrategyUsed(key));
|
54
|
+
|
55
|
+
if (isAllowedScriptLoadingStrategy) {
|
56
|
+
return Object.assign({}, scriptLoadingStategey);
|
57
|
+
}
|
58
|
+
|
59
|
+
console.warn('un supported script loading strategy used', scriptLoadingStategey);
|
60
|
+
return defaultScriptLoadingStrategy;
|
61
|
+
}
|
62
|
+
|
63
|
+
function getScriptLoadingStrategy(scriptLoadingStategey) {
|
64
|
+
if ((0, _utils.getTypeOf)(scriptLoadingStategey) === 'string') {
|
65
|
+
return {
|
66
|
+
[getScriptLoadingStrategyForStringType(scriptLoadingStategey)]: [/.*/]
|
67
|
+
};
|
68
|
+
}
|
69
|
+
|
70
|
+
if ((0, _utils.getTypeOf)(scriptLoadingStategey) === 'object') {
|
71
|
+
return getScriptLoadingStrategyForObject(scriptLoadingStategey);
|
72
|
+
}
|
73
|
+
|
74
|
+
return {
|
75
|
+
[defaultScriptLoadingStrategy]: [/.*/]
|
76
|
+
};
|
77
|
+
}
|
29
78
|
|
30
79
|
function configHtmlWebpackPlugins(plugins, {
|
31
80
|
enableChunkHash = false,
|
@@ -33,7 +82,8 @@ function configHtmlWebpackPlugins(plugins, {
|
|
33
82
|
inject,
|
34
83
|
crossorigin,
|
35
84
|
hasEFC,
|
36
|
-
minify: minifyHtmlOptions = false
|
85
|
+
minify: minifyHtmlOptions = false,
|
86
|
+
customScriptLoadingStrategey = {}
|
37
87
|
}) {
|
38
88
|
const optionsHtmlWebpack = {
|
39
89
|
chunksSortMode: 'none',
|
@@ -44,7 +94,7 @@ function configHtmlWebpackPlugins(plugins, {
|
|
44
94
|
// ? minifyHtmlOptions
|
45
95
|
// : minifyHtmlOptions,,
|
46
96
|
templateParameters: _common.templateParameters,
|
47
|
-
scriptLoading:
|
97
|
+
scriptLoading: defaultScriptLoadingStrategy,
|
48
98
|
inject: inject
|
49
99
|
};
|
50
100
|
|
@@ -56,4 +106,14 @@ function configHtmlWebpackPlugins(plugins, {
|
|
56
106
|
crossorigin && plugins.push(new _htmlWebpackInjectAttributesPlugin.default({
|
57
107
|
crossorigin: 'anonymous'
|
58
108
|
}));
|
109
|
+
|
110
|
+
if (customScriptLoadingStrategey.enable) {
|
111
|
+
const currentScriptLoadingStrategy = getScriptLoadingStrategy(customScriptLoadingStrategey.options);
|
112
|
+
|
113
|
+
if ((0, _utils.getTypeOf)(currentScriptLoadingStrategy) === 'object') {
|
114
|
+
plugins.push(new _CustomScriptLoadingStrategyPlugin.default({
|
115
|
+
scriptLoadingStategey: currentScriptLoadingStrategy
|
116
|
+
}));
|
117
|
+
}
|
118
|
+
}
|
59
119
|
}
|
@@ -62,7 +62,8 @@ const getDevPlugins = (options, publicPath) => {
|
|
62
62
|
mode
|
63
63
|
},
|
64
64
|
htmlTemplate: {
|
65
|
-
inject
|
65
|
+
inject,
|
66
|
+
customScriptLoadingStrategey
|
66
67
|
},
|
67
68
|
crossorigin
|
68
69
|
},
|
@@ -168,7 +169,8 @@ const getDevPlugins = (options, publicPath) => {
|
|
168
169
|
minify: false,
|
169
170
|
inject,
|
170
171
|
crossorigin,
|
171
|
-
hasEFC
|
172
|
+
hasEFC,
|
173
|
+
customScriptLoadingStrategey
|
172
174
|
});
|
173
175
|
|
174
176
|
if (hasEFC) {
|
@@ -80,7 +80,8 @@ const getProdPlugins = (options, publicPath = '') => {
|
|
80
80
|
} = options.app;
|
81
81
|
const {
|
82
82
|
inject,
|
83
|
-
minify: minifyHtmlOptions
|
83
|
+
minify: minifyHtmlOptions,
|
84
|
+
customScriptLoadingStrategey
|
84
85
|
} = htmlTemplate;
|
85
86
|
const {
|
86
87
|
i18n
|
@@ -178,6 +179,7 @@ const getProdPlugins = (options, publicPath = '') => {
|
|
178
179
|
folder,
|
179
180
|
inject,
|
180
181
|
minify: minifyHtmlOptions,
|
182
|
+
customScriptLoadingStrategey,
|
181
183
|
crossorigin,
|
182
184
|
hasEFC
|
183
185
|
});
|
@@ -0,0 +1,109 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = void 0;
|
7
|
+
|
8
|
+
var _htmlWebpackPlugin = _interopRequireDefault(require("html-webpack-plugin"));
|
9
|
+
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
+
|
12
|
+
const pluginName = 'CustomScriptLoadingStrategyPlugin';
|
13
|
+
|
14
|
+
class CustomScriptLoadingStrategyPlugin {
|
15
|
+
constructor({
|
16
|
+
scriptLoadingStategey
|
17
|
+
} = {}) {
|
18
|
+
this.scriptLoadingStrategy = scriptLoadingStategey;
|
19
|
+
this.tagNamesToMatch = ['script'];
|
20
|
+
}
|
21
|
+
|
22
|
+
getFileNameFromTagSrc(src) {
|
23
|
+
const fileNameArr = src.split('/');
|
24
|
+
return fileNameArr[fileNameArr.length - 1];
|
25
|
+
}
|
26
|
+
|
27
|
+
addAttributestToTag(tag, attributes) {
|
28
|
+
tag.attributes = Object.assign({}, tag.attributes, attributes);
|
29
|
+
}
|
30
|
+
|
31
|
+
matchFileName(tag, fileName) {
|
32
|
+
return fileName.test(this.getFileNameFromTagSrc(tag.attributes.src));
|
33
|
+
}
|
34
|
+
|
35
|
+
blockingStrategy(tag) {
|
36
|
+
delete tag.attributes.defer;
|
37
|
+
delete tag.attributes.async;
|
38
|
+
}
|
39
|
+
|
40
|
+
deferStrategy(tag) {
|
41
|
+
delete tag.attributes.async;
|
42
|
+
}
|
43
|
+
|
44
|
+
asyncStrategy(tag) {
|
45
|
+
delete tag.attributes.defer;
|
46
|
+
}
|
47
|
+
|
48
|
+
moduleStrategy(tag) {
|
49
|
+
this.deferStrategy(tag);
|
50
|
+
}
|
51
|
+
|
52
|
+
matchStrategy(scriptLoadingStrategy, tag) {
|
53
|
+
if (scriptLoadingStrategy === 'blocking') {
|
54
|
+
this.blockingStrategy(tag);
|
55
|
+
}
|
56
|
+
|
57
|
+
if (scriptLoadingStrategy === 'defer') {
|
58
|
+
this.deferStrategy(tag);
|
59
|
+
}
|
60
|
+
|
61
|
+
if (scriptLoadingStrategy === 'async') {
|
62
|
+
this.asyncStrategy(tag);
|
63
|
+
}
|
64
|
+
|
65
|
+
if (scriptLoadingStrategy === 'module') {
|
66
|
+
this.moduleStrategy(tag);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
matchAndApplyCustomLoadingStrategyToScripts(tags) {
|
71
|
+
Object.keys(this.scriptLoadingStrategy).forEach(scriptLoadingStrategy => {
|
72
|
+
const filesToMatch = this.scriptLoadingStrategy[scriptLoadingStrategy];
|
73
|
+
tags.forEach(tag => {
|
74
|
+
if (this.tagNamesToMatch.includes(tag.tagName) && tag.attributes.src) {
|
75
|
+
const isFileMatch = filesToMatch.some(fileName => this.matchFileName(tag, fileName));
|
76
|
+
|
77
|
+
if (isFileMatch) {
|
78
|
+
this.matchStrategy(scriptLoadingStrategy, tag);
|
79
|
+
this.addAttributestToTag(tag, {
|
80
|
+
[scriptLoadingStrategy]: true
|
81
|
+
});
|
82
|
+
}
|
83
|
+
} // filesToMatch.forEach(fileName => {
|
84
|
+
// if (!this.matchFileName(tag, fileName)) {
|
85
|
+
// return;
|
86
|
+
// }
|
87
|
+
// this.matchStrategy(scriptLoadingStrategy, tag);
|
88
|
+
// this.addAttributestToTag(tag, fileName, {
|
89
|
+
// [scriptLoadingStrategy]: true
|
90
|
+
// });
|
91
|
+
// });
|
92
|
+
|
93
|
+
});
|
94
|
+
});
|
95
|
+
}
|
96
|
+
|
97
|
+
apply(compiler) {
|
98
|
+
compiler.hooks.compilation.tap(pluginName, compilation => {
|
99
|
+
_htmlWebpackPlugin.default.getHooks(compilation).alterAssetTagGroups.tapAsync(pluginName, (data, callback) => {
|
100
|
+
const tags = [...data.bodyTags, ...data.headTags];
|
101
|
+
this.matchAndApplyCustomLoadingStrategyToScripts(tags);
|
102
|
+
callback(null, data);
|
103
|
+
});
|
104
|
+
});
|
105
|
+
}
|
106
|
+
|
107
|
+
}
|
108
|
+
|
109
|
+
exports.default = CustomScriptLoadingStrategyPlugin;
|
@@ -18,10 +18,10 @@ class EventsHandlingPlugin {
|
|
18
18
|
fn: compilation => {
|
19
19
|
compilation.mainTemplate.hooks.requireEnsure.tap('CustomAttributePlugin', source => {
|
20
20
|
// const str = attributeSetTemplate(cssAttributes, 'linkTag');
|
21
|
-
const sourceStr = source.replace('linkTag.onerror = function(event) {', 'linkTag.onerror = function(event) { linkTag.onerror = linkTag.onload = null');
|
21
|
+
const sourceStr = source.replace('linkTag.onerror = function(event) {', 'linkTag.onerror = function(event) { linkTag.onerror = linkTag.onload = null;');
|
22
22
|
const replacedSourceStr = sourceStr.replace('linkTag.onload = resolve', `linkTag.onload = () => {
|
23
|
+
linkTag.onerror = linkTag.onload = null;
|
23
24
|
resolve();
|
24
|
-
linkTag.onerror = linkTag.onload = null
|
25
25
|
};`);
|
26
26
|
return replacedSourceStr;
|
27
27
|
});
|
@@ -229,8 +229,8 @@ class I18nDownlodLogic {
|
|
229
229
|
}
|
230
230
|
var scriptTag = document.createElement("script");
|
231
231
|
scriptTag.onload = () => {
|
232
|
-
resolve();
|
233
232
|
scriptTag.onerror = scriptTag.onload = null;
|
233
|
+
resolve();
|
234
234
|
};
|
235
235
|
scriptTag.onerror = function(event) {
|
236
236
|
scriptTag.onerror = scriptTag.onload = null;
|
package/lib/schemas/index.js
CHANGED
@@ -15,6 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
15
15
|
|
16
16
|
// TODO move deprecated options to separate file and manage seperately
|
17
17
|
var _default = {
|
18
|
+
alias: null,
|
18
19
|
unstableDepsInverse: {
|
19
20
|
value: false,
|
20
21
|
cli: 'unstable_deps_inverse'
|
@@ -322,7 +323,11 @@ var _default = {
|
|
322
323
|
},
|
323
324
|
htmlTemplate: {
|
324
325
|
minify: null,
|
325
|
-
inject: true
|
326
|
+
inject: true,
|
327
|
+
customScriptLoadingStrategey: {
|
328
|
+
enable: false,
|
329
|
+
options: null
|
330
|
+
}
|
326
331
|
},
|
327
332
|
removePropTypes: false,
|
328
333
|
customChunksBaseConfig: null,
|
package/lib/utils/index.js
CHANGED
@@ -167,6 +167,20 @@ var _getComponents = _interopRequireDefault(require("./getComponents"));
|
|
167
167
|
|
168
168
|
var _ssTestHack = _interopRequireDefault(require("./ssTestHack"));
|
169
169
|
|
170
|
+
var _typeCheck = require("./typeCheck");
|
171
|
+
|
172
|
+
Object.keys(_typeCheck).forEach(function (key) {
|
173
|
+
if (key === "default" || key === "__esModule") return;
|
174
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
175
|
+
if (key in exports && exports[key] === _typeCheck[key]) return;
|
176
|
+
Object.defineProperty(exports, key, {
|
177
|
+
enumerable: true,
|
178
|
+
get: function () {
|
179
|
+
return _typeCheck[key];
|
180
|
+
}
|
181
|
+
});
|
182
|
+
});
|
183
|
+
|
170
184
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
171
185
|
|
172
186
|
// eslint-disable-next-line no-duplicate-imports
|
package/npm-shrinkwrap.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@zohodesk/react-cli",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.23",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "@zohodesk/react-cli",
|
9
|
-
"version": "1.1.
|
9
|
+
"version": "1.1.23",
|
10
10
|
"license": "ISC",
|
11
11
|
"dependencies": {
|
12
12
|
"@babel/cli": "7.10.5",
|
@@ -28,6 +28,7 @@
|
|
28
28
|
"babel-jest": "26.3.0",
|
29
29
|
"babel-loader": "8.1.0",
|
30
30
|
"babel-plugin-lodash": "3.3.4",
|
31
|
+
"babel-plugin-module-resolver": "5.0.2",
|
31
32
|
"babel-plugin-transform-define": "2.0.0",
|
32
33
|
"babel-plugin-transform-dynamic-import": "2.1.0",
|
33
34
|
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
|
@@ -4232,6 +4233,92 @@
|
|
4232
4233
|
"require-package-name": "^2.0.1"
|
4233
4234
|
}
|
4234
4235
|
},
|
4236
|
+
"node_modules/babel-plugin-module-resolver": {
|
4237
|
+
"version": "5.0.2",
|
4238
|
+
"resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.2.tgz",
|
4239
|
+
"integrity": "sha512-9KtaCazHee2xc0ibfqsDeamwDps6FZNo5S0Q81dUqEuFzVwPhcT4J5jOqIVvgCA3Q/wO9hKYxN/Ds3tIsp5ygg==",
|
4240
|
+
"dependencies": {
|
4241
|
+
"find-babel-config": "^2.1.1",
|
4242
|
+
"glob": "^9.3.3",
|
4243
|
+
"pkg-up": "^3.1.0",
|
4244
|
+
"reselect": "^4.1.7",
|
4245
|
+
"resolve": "^1.22.8"
|
4246
|
+
}
|
4247
|
+
},
|
4248
|
+
"node_modules/babel-plugin-module-resolver/node_modules/brace-expansion": {
|
4249
|
+
"version": "2.0.1",
|
4250
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
4251
|
+
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
4252
|
+
"dependencies": {
|
4253
|
+
"balanced-match": "^1.0.0"
|
4254
|
+
}
|
4255
|
+
},
|
4256
|
+
"node_modules/babel-plugin-module-resolver/node_modules/glob": {
|
4257
|
+
"version": "9.3.5",
|
4258
|
+
"resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz",
|
4259
|
+
"integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==",
|
4260
|
+
"dependencies": {
|
4261
|
+
"fs.realpath": "^1.0.0",
|
4262
|
+
"minimatch": "^8.0.2",
|
4263
|
+
"minipass": "^4.2.4",
|
4264
|
+
"path-scurry": "^1.6.1"
|
4265
|
+
},
|
4266
|
+
"engines": {
|
4267
|
+
"node": ">=16 || 14 >=14.17"
|
4268
|
+
},
|
4269
|
+
"funding": {
|
4270
|
+
"url": "https://github.com/sponsors/isaacs"
|
4271
|
+
}
|
4272
|
+
},
|
4273
|
+
"node_modules/babel-plugin-module-resolver/node_modules/is-core-module": {
|
4274
|
+
"version": "2.14.0",
|
4275
|
+
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz",
|
4276
|
+
"integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==",
|
4277
|
+
"dependencies": {
|
4278
|
+
"hasown": "^2.0.2"
|
4279
|
+
},
|
4280
|
+
"engines": {
|
4281
|
+
"node": ">= 0.4"
|
4282
|
+
},
|
4283
|
+
"funding": {
|
4284
|
+
"url": "https://github.com/sponsors/ljharb"
|
4285
|
+
}
|
4286
|
+
},
|
4287
|
+
"node_modules/babel-plugin-module-resolver/node_modules/minimatch": {
|
4288
|
+
"version": "8.0.4",
|
4289
|
+
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz",
|
4290
|
+
"integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==",
|
4291
|
+
"dependencies": {
|
4292
|
+
"brace-expansion": "^2.0.1"
|
4293
|
+
},
|
4294
|
+
"engines": {
|
4295
|
+
"node": ">=16 || 14 >=14.17"
|
4296
|
+
},
|
4297
|
+
"funding": {
|
4298
|
+
"url": "https://github.com/sponsors/isaacs"
|
4299
|
+
}
|
4300
|
+
},
|
4301
|
+
"node_modules/babel-plugin-module-resolver/node_modules/reselect": {
|
4302
|
+
"version": "4.1.8",
|
4303
|
+
"resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz",
|
4304
|
+
"integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ=="
|
4305
|
+
},
|
4306
|
+
"node_modules/babel-plugin-module-resolver/node_modules/resolve": {
|
4307
|
+
"version": "1.22.8",
|
4308
|
+
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
|
4309
|
+
"integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
|
4310
|
+
"dependencies": {
|
4311
|
+
"is-core-module": "^2.13.0",
|
4312
|
+
"path-parse": "^1.0.7",
|
4313
|
+
"supports-preserve-symlinks-flag": "^1.0.0"
|
4314
|
+
},
|
4315
|
+
"bin": {
|
4316
|
+
"resolve": "bin/resolve"
|
4317
|
+
},
|
4318
|
+
"funding": {
|
4319
|
+
"url": "https://github.com/sponsors/ljharb"
|
4320
|
+
}
|
4321
|
+
},
|
4235
4322
|
"node_modules/babel-plugin-transform-define": {
|
4236
4323
|
"version": "2.0.0",
|
4237
4324
|
"resolved": "https://registry.npmjs.org/babel-plugin-transform-define/-/babel-plugin-transform-define-2.0.0.tgz",
|
@@ -7933,6 +8020,26 @@
|
|
7933
8020
|
"ms": "2.0.0"
|
7934
8021
|
}
|
7935
8022
|
},
|
8023
|
+
"node_modules/find-babel-config": {
|
8024
|
+
"version": "2.1.1",
|
8025
|
+
"resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.1.1.tgz",
|
8026
|
+
"integrity": "sha512-5Ji+EAysHGe1OipH7GN4qDjok5Z1uw5KAwDCbicU/4wyTZY7CqOCzcWbG7J5ad9mazq67k89fXlbc1MuIfl9uA==",
|
8027
|
+
"dependencies": {
|
8028
|
+
"json5": "^2.2.3",
|
8029
|
+
"path-exists": "^4.0.0"
|
8030
|
+
}
|
8031
|
+
},
|
8032
|
+
"node_modules/find-babel-config/node_modules/json5": {
|
8033
|
+
"version": "2.2.3",
|
8034
|
+
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
8035
|
+
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
8036
|
+
"bin": {
|
8037
|
+
"json5": "lib/cli.js"
|
8038
|
+
},
|
8039
|
+
"engines": {
|
8040
|
+
"node": ">=6"
|
8041
|
+
}
|
8042
|
+
},
|
7936
8043
|
"node_modules/find-cache-dir": {
|
7937
8044
|
"version": "2.1.0",
|
7938
8045
|
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
|
@@ -8985,6 +9092,25 @@
|
|
8985
9092
|
"minimalistic-assert": "^1.0.1"
|
8986
9093
|
}
|
8987
9094
|
},
|
9095
|
+
"node_modules/hasown": {
|
9096
|
+
"version": "2.0.2",
|
9097
|
+
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
9098
|
+
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
9099
|
+
"dependencies": {
|
9100
|
+
"function-bind": "^1.1.2"
|
9101
|
+
},
|
9102
|
+
"engines": {
|
9103
|
+
"node": ">= 0.4"
|
9104
|
+
}
|
9105
|
+
},
|
9106
|
+
"node_modules/hasown/node_modules/function-bind": {
|
9107
|
+
"version": "1.1.2",
|
9108
|
+
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
9109
|
+
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
9110
|
+
"funding": {
|
9111
|
+
"url": "https://github.com/sponsors/ljharb"
|
9112
|
+
}
|
9113
|
+
},
|
8988
9114
|
"node_modules/he": {
|
8989
9115
|
"version": "1.2.0",
|
8990
9116
|
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
|
@@ -13071,6 +13197,14 @@
|
|
13071
13197
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
13072
13198
|
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
|
13073
13199
|
},
|
13200
|
+
"node_modules/minipass": {
|
13201
|
+
"version": "4.2.8",
|
13202
|
+
"resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz",
|
13203
|
+
"integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==",
|
13204
|
+
"engines": {
|
13205
|
+
"node": ">=8"
|
13206
|
+
}
|
13207
|
+
},
|
13074
13208
|
"node_modules/mississippi": {
|
13075
13209
|
"version": "3.0.0",
|
13076
13210
|
"resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz",
|
@@ -14573,6 +14707,37 @@
|
|
14573
14707
|
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
14574
14708
|
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
|
14575
14709
|
},
|
14710
|
+
"node_modules/path-scurry": {
|
14711
|
+
"version": "1.11.1",
|
14712
|
+
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
|
14713
|
+
"integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
|
14714
|
+
"dependencies": {
|
14715
|
+
"lru-cache": "^10.2.0",
|
14716
|
+
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
|
14717
|
+
},
|
14718
|
+
"engines": {
|
14719
|
+
"node": ">=16 || 14 >=14.18"
|
14720
|
+
},
|
14721
|
+
"funding": {
|
14722
|
+
"url": "https://github.com/sponsors/isaacs"
|
14723
|
+
}
|
14724
|
+
},
|
14725
|
+
"node_modules/path-scurry/node_modules/lru-cache": {
|
14726
|
+
"version": "10.2.2",
|
14727
|
+
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz",
|
14728
|
+
"integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==",
|
14729
|
+
"engines": {
|
14730
|
+
"node": "14 || >=16.14"
|
14731
|
+
}
|
14732
|
+
},
|
14733
|
+
"node_modules/path-scurry/node_modules/minipass": {
|
14734
|
+
"version": "7.1.2",
|
14735
|
+
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
|
14736
|
+
"integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
|
14737
|
+
"engines": {
|
14738
|
+
"node": ">=16 || 14 >=14.17"
|
14739
|
+
}
|
14740
|
+
},
|
14576
14741
|
"node_modules/path-to-regexp": {
|
14577
14742
|
"version": "0.1.7",
|
14578
14743
|
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
@@ -14721,6 +14886,59 @@
|
|
14721
14886
|
"node": ">=4"
|
14722
14887
|
}
|
14723
14888
|
},
|
14889
|
+
"node_modules/pkg-up": {
|
14890
|
+
"version": "3.1.0",
|
14891
|
+
"resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz",
|
14892
|
+
"integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==",
|
14893
|
+
"dependencies": {
|
14894
|
+
"find-up": "^3.0.0"
|
14895
|
+
},
|
14896
|
+
"engines": {
|
14897
|
+
"node": ">=8"
|
14898
|
+
}
|
14899
|
+
},
|
14900
|
+
"node_modules/pkg-up/node_modules/find-up": {
|
14901
|
+
"version": "3.0.0",
|
14902
|
+
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
|
14903
|
+
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
|
14904
|
+
"dependencies": {
|
14905
|
+
"locate-path": "^3.0.0"
|
14906
|
+
},
|
14907
|
+
"engines": {
|
14908
|
+
"node": ">=6"
|
14909
|
+
}
|
14910
|
+
},
|
14911
|
+
"node_modules/pkg-up/node_modules/locate-path": {
|
14912
|
+
"version": "3.0.0",
|
14913
|
+
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
|
14914
|
+
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
|
14915
|
+
"dependencies": {
|
14916
|
+
"p-locate": "^3.0.0",
|
14917
|
+
"path-exists": "^3.0.0"
|
14918
|
+
},
|
14919
|
+
"engines": {
|
14920
|
+
"node": ">=6"
|
14921
|
+
}
|
14922
|
+
},
|
14923
|
+
"node_modules/pkg-up/node_modules/p-locate": {
|
14924
|
+
"version": "3.0.0",
|
14925
|
+
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
|
14926
|
+
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
|
14927
|
+
"dependencies": {
|
14928
|
+
"p-limit": "^2.0.0"
|
14929
|
+
},
|
14930
|
+
"engines": {
|
14931
|
+
"node": ">=6"
|
14932
|
+
}
|
14933
|
+
},
|
14934
|
+
"node_modules/pkg-up/node_modules/path-exists": {
|
14935
|
+
"version": "3.0.0",
|
14936
|
+
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
|
14937
|
+
"integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==",
|
14938
|
+
"engines": {
|
14939
|
+
"node": ">=4"
|
14940
|
+
}
|
14941
|
+
},
|
14724
14942
|
"node_modules/posix-character-classes": {
|
14725
14943
|
"version": "0.1.1",
|
14726
14944
|
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
|
@@ -15293,6 +15511,7 @@
|
|
15293
15511
|
"version": "1.5.1",
|
15294
15512
|
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
|
15295
15513
|
"integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==",
|
15514
|
+
"deprecated": "You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.\n\n(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)",
|
15296
15515
|
"engines": {
|
15297
15516
|
"node": ">=0.6.0",
|
15298
15517
|
"teleport": ">=0.2.0"
|
@@ -22714,6 +22933,70 @@
|
|
22714
22933
|
"require-package-name": "^2.0.1"
|
22715
22934
|
}
|
22716
22935
|
},
|
22936
|
+
"babel-plugin-module-resolver": {
|
22937
|
+
"version": "5.0.2",
|
22938
|
+
"resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-5.0.2.tgz",
|
22939
|
+
"integrity": "sha512-9KtaCazHee2xc0ibfqsDeamwDps6FZNo5S0Q81dUqEuFzVwPhcT4J5jOqIVvgCA3Q/wO9hKYxN/Ds3tIsp5ygg==",
|
22940
|
+
"requires": {
|
22941
|
+
"find-babel-config": "^2.1.1",
|
22942
|
+
"glob": "^9.3.3",
|
22943
|
+
"pkg-up": "^3.1.0",
|
22944
|
+
"reselect": "^4.1.7",
|
22945
|
+
"resolve": "^1.22.8"
|
22946
|
+
},
|
22947
|
+
"dependencies": {
|
22948
|
+
"brace-expansion": {
|
22949
|
+
"version": "2.0.1",
|
22950
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
22951
|
+
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
22952
|
+
"requires": {
|
22953
|
+
"balanced-match": "^1.0.0"
|
22954
|
+
}
|
22955
|
+
},
|
22956
|
+
"glob": {
|
22957
|
+
"version": "9.3.5",
|
22958
|
+
"resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz",
|
22959
|
+
"integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==",
|
22960
|
+
"requires": {
|
22961
|
+
"fs.realpath": "^1.0.0",
|
22962
|
+
"minimatch": "^8.0.2",
|
22963
|
+
"minipass": "^4.2.4",
|
22964
|
+
"path-scurry": "^1.6.1"
|
22965
|
+
}
|
22966
|
+
},
|
22967
|
+
"is-core-module": {
|
22968
|
+
"version": "2.14.0",
|
22969
|
+
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz",
|
22970
|
+
"integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==",
|
22971
|
+
"requires": {
|
22972
|
+
"hasown": "^2.0.2"
|
22973
|
+
}
|
22974
|
+
},
|
22975
|
+
"minimatch": {
|
22976
|
+
"version": "8.0.4",
|
22977
|
+
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz",
|
22978
|
+
"integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==",
|
22979
|
+
"requires": {
|
22980
|
+
"brace-expansion": "^2.0.1"
|
22981
|
+
}
|
22982
|
+
},
|
22983
|
+
"reselect": {
|
22984
|
+
"version": "4.1.8",
|
22985
|
+
"resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz",
|
22986
|
+
"integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ=="
|
22987
|
+
},
|
22988
|
+
"resolve": {
|
22989
|
+
"version": "1.22.8",
|
22990
|
+
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
|
22991
|
+
"integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
|
22992
|
+
"requires": {
|
22993
|
+
"is-core-module": "^2.13.0",
|
22994
|
+
"path-parse": "^1.0.7",
|
22995
|
+
"supports-preserve-symlinks-flag": "^1.0.0"
|
22996
|
+
}
|
22997
|
+
}
|
22998
|
+
}
|
22999
|
+
},
|
22717
23000
|
"babel-plugin-transform-define": {
|
22718
23001
|
"version": "2.0.0",
|
22719
23002
|
"resolved": "https://registry.npmjs.org/babel-plugin-transform-define/-/babel-plugin-transform-define-2.0.0.tgz",
|
@@ -25594,6 +25877,22 @@
|
|
25594
25877
|
}
|
25595
25878
|
}
|
25596
25879
|
},
|
25880
|
+
"find-babel-config": {
|
25881
|
+
"version": "2.1.1",
|
25882
|
+
"resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.1.1.tgz",
|
25883
|
+
"integrity": "sha512-5Ji+EAysHGe1OipH7GN4qDjok5Z1uw5KAwDCbicU/4wyTZY7CqOCzcWbG7J5ad9mazq67k89fXlbc1MuIfl9uA==",
|
25884
|
+
"requires": {
|
25885
|
+
"json5": "^2.2.3",
|
25886
|
+
"path-exists": "^4.0.0"
|
25887
|
+
},
|
25888
|
+
"dependencies": {
|
25889
|
+
"json5": {
|
25890
|
+
"version": "2.2.3",
|
25891
|
+
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
25892
|
+
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="
|
25893
|
+
}
|
25894
|
+
}
|
25895
|
+
},
|
25597
25896
|
"find-cache-dir": {
|
25598
25897
|
"version": "2.1.0",
|
25599
25898
|
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
|
@@ -26377,6 +26676,21 @@
|
|
26377
26676
|
"minimalistic-assert": "^1.0.1"
|
26378
26677
|
}
|
26379
26678
|
},
|
26679
|
+
"hasown": {
|
26680
|
+
"version": "2.0.2",
|
26681
|
+
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
26682
|
+
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
26683
|
+
"requires": {
|
26684
|
+
"function-bind": "^1.1.2"
|
26685
|
+
},
|
26686
|
+
"dependencies": {
|
26687
|
+
"function-bind": {
|
26688
|
+
"version": "1.1.2",
|
26689
|
+
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
26690
|
+
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="
|
26691
|
+
}
|
26692
|
+
}
|
26693
|
+
},
|
26380
26694
|
"he": {
|
26381
26695
|
"version": "1.2.0",
|
26382
26696
|
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
|
@@ -29394,6 +29708,11 @@
|
|
29394
29708
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
29395
29709
|
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
|
29396
29710
|
},
|
29711
|
+
"minipass": {
|
29712
|
+
"version": "4.2.8",
|
29713
|
+
"resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz",
|
29714
|
+
"integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ=="
|
29715
|
+
},
|
29397
29716
|
"mississippi": {
|
29398
29717
|
"version": "3.0.0",
|
29399
29718
|
"resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz",
|
@@ -30547,6 +30866,27 @@
|
|
30547
30866
|
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
30548
30867
|
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
|
30549
30868
|
},
|
30869
|
+
"path-scurry": {
|
30870
|
+
"version": "1.11.1",
|
30871
|
+
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
|
30872
|
+
"integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
|
30873
|
+
"requires": {
|
30874
|
+
"lru-cache": "^10.2.0",
|
30875
|
+
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
|
30876
|
+
},
|
30877
|
+
"dependencies": {
|
30878
|
+
"lru-cache": {
|
30879
|
+
"version": "10.2.2",
|
30880
|
+
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz",
|
30881
|
+
"integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ=="
|
30882
|
+
},
|
30883
|
+
"minipass": {
|
30884
|
+
"version": "7.1.2",
|
30885
|
+
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
|
30886
|
+
"integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="
|
30887
|
+
}
|
30888
|
+
}
|
30889
|
+
},
|
30550
30890
|
"path-to-regexp": {
|
30551
30891
|
"version": "0.1.7",
|
30552
30892
|
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
@@ -30657,6 +30997,46 @@
|
|
30657
30997
|
}
|
30658
30998
|
}
|
30659
30999
|
},
|
31000
|
+
"pkg-up": {
|
31001
|
+
"version": "3.1.0",
|
31002
|
+
"resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz",
|
31003
|
+
"integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==",
|
31004
|
+
"requires": {
|
31005
|
+
"find-up": "^3.0.0"
|
31006
|
+
},
|
31007
|
+
"dependencies": {
|
31008
|
+
"find-up": {
|
31009
|
+
"version": "3.0.0",
|
31010
|
+
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
|
31011
|
+
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
|
31012
|
+
"requires": {
|
31013
|
+
"locate-path": "^3.0.0"
|
31014
|
+
}
|
31015
|
+
},
|
31016
|
+
"locate-path": {
|
31017
|
+
"version": "3.0.0",
|
31018
|
+
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
|
31019
|
+
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
|
31020
|
+
"requires": {
|
31021
|
+
"p-locate": "^3.0.0",
|
31022
|
+
"path-exists": "^3.0.0"
|
31023
|
+
}
|
31024
|
+
},
|
31025
|
+
"p-locate": {
|
31026
|
+
"version": "3.0.0",
|
31027
|
+
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
|
31028
|
+
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
|
31029
|
+
"requires": {
|
31030
|
+
"p-limit": "^2.0.0"
|
31031
|
+
}
|
31032
|
+
},
|
31033
|
+
"path-exists": {
|
31034
|
+
"version": "3.0.0",
|
31035
|
+
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
|
31036
|
+
"integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ=="
|
31037
|
+
}
|
31038
|
+
}
|
31039
|
+
},
|
30660
31040
|
"posix-character-classes": {
|
30661
31041
|
"version": "0.1.1",
|
30662
31042
|
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@zohodesk/react-cli",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.23",
|
4
4
|
"description": "A CLI tool for build modern web application and libraries",
|
5
5
|
"scripts": {
|
6
6
|
"init": "node ./lib/utils/init.js",
|
@@ -110,7 +110,8 @@
|
|
110
110
|
"webpack-dev-middleware": "3.7.2",
|
111
111
|
"ws": "7.3.1",
|
112
112
|
"xhr2": "0.2.0",
|
113
|
-
"xmlhttprequest": "1.8.0"
|
113
|
+
"xmlhttprequest": "1.8.0",
|
114
|
+
"babel-plugin-module-resolver": "5.0.2"
|
114
115
|
},
|
115
116
|
"babel": {
|
116
117
|
"presets": [
|