ezuikit-js 0.5.8-beta.1 → 0.5.9
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 +9 -0
- package/demos/base-demo/ezuikit.js +65 -5
- package/demos/base-demo/index.html +2 -2
- package/demos/nginx-demo/conf/nginx.conf +0 -2
- package/demos/nginx-demo/html/ezuikit5/ezuikit.js +2 -2
- package/demos/nginx-demo/html/ezuikit5/server.js +1 -1
- package/demos/nginx-demo/logs/access.log +30 -0
- package/demos/nginx-demo/logs/error.log +2 -0
- package/demos/react-demo/README.md +68 -0
- package/demos/react-demo/config/env.js +101 -0
- package/demos/react-demo/config/getHttpsConfig.js +66 -0
- package/demos/react-demo/config/jest/cssTransform.js +14 -0
- package/demos/react-demo/config/jest/fileTransform.js +40 -0
- package/demos/react-demo/config/modules.js +141 -0
- package/demos/react-demo/config/paths.js +72 -0
- package/demos/react-demo/config/pnpTs.js +35 -0
- package/demos/react-demo/config/webpack.config.js +669 -0
- package/demos/react-demo/config/webpackDevServer.config.js +134 -0
- package/demos/react-demo/package-lock.json +13893 -0
- package/demos/react-demo/package.json +141 -0
- package/demos/react-demo/public/favicon.ico +0 -0
- package/demos/react-demo/public/index.html +43 -0
- package/demos/react-demo/public/logo192.png +0 -0
- package/demos/react-demo/public/logo512.png +0 -0
- package/demos/react-demo/public/manifest.json +25 -0
- package/demos/react-demo/public/robots.txt +3 -0
- package/demos/react-demo/scripts/build.js +211 -0
- package/demos/react-demo/scripts/start.js +166 -0
- package/demos/react-demo/scripts/test.js +53 -0
- package/demos/react-demo/src/App.css +38 -0
- package/demos/react-demo/src/App.js +54 -0
- package/demos/react-demo/src/App.test.js +9 -0
- package/demos/react-demo/src/ezuikit/index.js +1113 -0
- package/demos/react-demo/src/ezuikit/package.json +12 -0
- package/demos/react-demo/src/index.css +13 -0
- package/demos/react-demo/src/index.js +17 -0
- package/demos/react-demo/src/logo.svg +7 -0
- package/demos/react-demo/src/serviceWorker.js +141 -0
- package/demos/react-demo/src/setupTests.js +5 -0
- package/ezuikit.js +16455 -22699
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -31878,6 +31878,12 @@ var matchTemplate = function matchTemplate(templateName, params) {
|
|
|
31878
31878
|
}
|
|
31879
31879
|
};
|
|
31880
31880
|
|
|
31881
|
+
var isVersion2Available = function isVersion2Available() {
|
|
31882
|
+
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
31883
|
+
var isSharedArrayBuffer = window.SharedArrayBuffer;
|
|
31884
|
+
return isSharedArrayBuffer && !isMobile;
|
|
31885
|
+
};
|
|
31886
|
+
|
|
31881
31887
|
var EZUIKitPlayer = /*#__PURE__*/function () {
|
|
31882
31888
|
function EZUIKitPlayer(params) {
|
|
31883
31889
|
var _this = this;
|
|
@@ -31912,11 +31918,13 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
|
|
|
31912
31918
|
this.poster = params.poster;
|
|
31913
31919
|
this.speed = 1;
|
|
31914
31920
|
this.disabledTimeLine = false;
|
|
31921
|
+
this.disabledPTZ = false;
|
|
31922
|
+
this.enableSharedArrayBufferGuide = false;
|
|
31915
31923
|
this.capacity = {};
|
|
31916
31924
|
this.env = {
|
|
31917
31925
|
domain: "https://open.ys7.com"
|
|
31918
31926
|
};
|
|
31919
|
-
this.staticPath = "https://open.ys7.com/assets/ezuikit_v4.0";
|
|
31927
|
+
this.staticPath = isVersion2Available() ? "https://open.ys7.com/assets/ezuikit_v5.0" : "https://open.ys7.com/assets/ezuikit_v4.0";
|
|
31920
31928
|
|
|
31921
31929
|
if (typeof params.staticPath === 'string') {
|
|
31922
31930
|
this.staticPath = params.staticPath;
|
|
@@ -31930,11 +31938,63 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
|
|
|
31930
31938
|
this.disabledTimeLine = params.disabledTimeLine;
|
|
31931
31939
|
}
|
|
31932
31940
|
|
|
31941
|
+
if (typeof params.disabledPTZ !== 'undefined') {
|
|
31942
|
+
this.disabledPTZ = params.disabledPTZ;
|
|
31943
|
+
}
|
|
31944
|
+
|
|
31945
|
+
if (typeof params.enableSharedArrayBufferGuide !== 'undefined') {
|
|
31946
|
+
this.enableSharedArrayBufferGuide = params.enableSharedArrayBufferGuide;
|
|
31947
|
+
}
|
|
31948
|
+
|
|
31933
31949
|
var pluginUrl = "".concat(this.staticPath, "/js/jsPlugin-4.0.2.min.js");
|
|
31934
31950
|
|
|
31935
|
-
if (
|
|
31951
|
+
if (isVersion2Available()) {
|
|
31936
31952
|
console.log("启用多线程解析视频");
|
|
31937
|
-
pluginUrl = "
|
|
31953
|
+
pluginUrl = "".concat(this.staticPath, "/jsPlugin-2.0.0.min.js");
|
|
31954
|
+
} else {
|
|
31955
|
+
// 是否引导用户开启谷歌实验室 Google Labs 特性
|
|
31956
|
+
//enableSharedArrayBufferGuide
|
|
31957
|
+
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
31958
|
+
|
|
31959
|
+
var getChromeVersion = function getChromeVersion() {
|
|
31960
|
+
var arr = navigator.userAgent.split(' ');
|
|
31961
|
+
var chromeVersion = '';
|
|
31962
|
+
|
|
31963
|
+
for (var i = 0; i < arr.length; i++) {
|
|
31964
|
+
if (/chrome/i.test(arr[i])) {
|
|
31965
|
+
chromeVersion = arr[i];
|
|
31966
|
+
}
|
|
31967
|
+
}
|
|
31968
|
+
|
|
31969
|
+
if (chromeVersion) {
|
|
31970
|
+
return Number(chromeVersion.split('/')[1].split('.')[0]);
|
|
31971
|
+
}
|
|
31972
|
+
|
|
31973
|
+
return false;
|
|
31974
|
+
}; // pc端 谷歌浏览器 版本92 ~ 105
|
|
31975
|
+
|
|
31976
|
+
|
|
31977
|
+
if (!isMobile && 91 < getChromeVersion < 106 && this.enableSharedArrayBufferGuide) {
|
|
31978
|
+
console.log("提示用户开启谷歌实验室特性");
|
|
31979
|
+
var wapDomId = "".concat(this.id, "-wrap");
|
|
31980
|
+
var guideDom = document.createElement("div");
|
|
31981
|
+
var guideSpan = document.createElement("span");
|
|
31982
|
+
guideSpan.innerHTML = "您当前浏览器可以开启谷歌实验室多线程特性,获取更好播放体验,避免浏览器卡顿及崩溃,详见";
|
|
31983
|
+
guideDom.appendChild(guideSpan);
|
|
31984
|
+
var guideLink = document.createElement("a");
|
|
31985
|
+
guideLink.href = "https://open.ys7.com/help/384";
|
|
31986
|
+
guideLink.setAttribute("target", "_blank");
|
|
31987
|
+
guideDom.appendChild(guideLink);
|
|
31988
|
+
guideLink.innerHTML = "开启说明"; //guideDom.innerHTML = "您的浏览器当前使用单进程播放视频,可能因内存占用过高导致浏览器卡顿,您可参考·谷歌浏览器开启多线程(链接)·开启谷歌实验室多线程特性,获取更好播放体验";
|
|
31989
|
+
|
|
31990
|
+
guideDom.id = "".concat(this.id, "-guide");
|
|
31991
|
+
guideDom.style = "font-size:12px;color:red;";
|
|
31992
|
+
setTimeout(function () {
|
|
31993
|
+
if (document.getElementById(wapDomId)) {
|
|
31994
|
+
document.getElementById(wapDomId).insertBefore(guideDom, document.getElementById(_this.id));
|
|
31995
|
+
}
|
|
31996
|
+
}, 5000);
|
|
31997
|
+
}
|
|
31938
31998
|
}
|
|
31939
31999
|
|
|
31940
32000
|
addJs(pluginUrl, function () {
|
|
@@ -33172,9 +33232,9 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
|
|
|
33172
33232
|
var end = defaultTime.length;
|
|
33173
33233
|
var standardTime = time + defaultTime.substring(start, end);
|
|
33174
33234
|
return standardTime.slice(0, 8) + 'T' + standardTime.slice(8) + 'Z';
|
|
33175
|
-
} else {
|
|
33176
|
-
throw new Error('回放时间格式有误,请确认');
|
|
33177
33235
|
}
|
|
33236
|
+
|
|
33237
|
+
throw new Error('回放时间格式有误,请确认');
|
|
33178
33238
|
}
|
|
33179
33239
|
|
|
33180
33240
|
var seekRT = this.jSPlugin.JS_Seek(0, startTime, endTime);
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
var accessToken = res.data.accessToken;
|
|
37
37
|
playr = new EZUIKit.EZUIKitPlayer({
|
|
38
38
|
id: 'video-container', // 视频容器ID
|
|
39
|
-
accessToken:
|
|
40
|
-
url: 'ezopen://open.ys7.com/
|
|
39
|
+
accessToken: accessToken,
|
|
40
|
+
url: 'ezopen://open.ys7.com/G39444019/1.live',
|
|
41
41
|
template: 'simple', // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版; theme-可配置主题;
|
|
42
42
|
plugin: ['talk'], // 加载插件,talk-对讲
|
|
43
43
|
width: 600,
|
|
@@ -31916,7 +31916,7 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
|
|
|
31916
31916
|
this.env = {
|
|
31917
31917
|
domain: "https://open.ys7.com"
|
|
31918
31918
|
};
|
|
31919
|
-
this.staticPath = "https://open.ys7.com/assets/ezuikit_v4.0";
|
|
31919
|
+
this.staticPath = !!window.SharedArrayBuffer ? "https://open.ys7.com/assets/ezuikit_v5.0" : "https://open.ys7.com/assets/ezuikit_v4.0";
|
|
31920
31920
|
|
|
31921
31921
|
if (typeof params.staticPath === 'string') {
|
|
31922
31922
|
this.staticPath = params.staticPath;
|
|
@@ -31934,7 +31934,7 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
|
|
|
31934
31934
|
|
|
31935
31935
|
if (!!window.SharedArrayBuffer) {
|
|
31936
31936
|
console.log("启用多线程解析视频");
|
|
31937
|
-
pluginUrl = "
|
|
31937
|
+
pluginUrl = "".concat(this.staticPath, "/jsPlugin-2.0.0.min.js");
|
|
31938
31938
|
}
|
|
31939
31939
|
|
|
31940
31940
|
addJs(pluginUrl, function () {
|
|
@@ -40,7 +40,7 @@ httpServer.on('request', (req, res) => {
|
|
|
40
40
|
if (ext === 'html' || ext === 'xhtml'|| ext === 'js') {
|
|
41
41
|
//跨域隔离
|
|
42
42
|
res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp')
|
|
43
|
-
|
|
43
|
+
res.setHeader('Cross-Origin-Opener-Policy', 'same-origin')
|
|
44
44
|
res.setHeader('Access-Control-Allow-Origin', 'https://resource.eziot.com')
|
|
45
45
|
//影响报告
|
|
46
46
|
//res.setHeader('Cross-Origin-Embedder-Policy-Report-Only', 'require-corp')
|
|
@@ -77,3 +77,33 @@
|
|
|
77
77
|
127.0.0.1 - - [01/Jun/2022:21:19:14 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3802 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
78
78
|
127.0.0.1 - - [01/Jun/2022:21:20:21 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3747 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
79
79
|
127.0.0.1 - - [01/Jun/2022:21:20:21 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 304 0 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
80
|
+
127.0.0.1 - - [01/Jun/2022:21:24:04 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3740 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
81
|
+
127.0.0.1 - - [01/Jun/2022:21:24:04 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 304 0 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
82
|
+
127.0.0.1 - - [01/Jun/2022:21:30:53 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3740 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
83
|
+
127.0.0.1 - - [01/Jun/2022:21:30:53 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 200 1304891 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
84
|
+
127.0.0.1 - - [01/Jun/2022:22:12:25 +0800] "GET /ezuikit5/ HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
85
|
+
127.0.0.1 - - [01/Jun/2022:22:12:25 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 200 1304884 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
86
|
+
127.0.0.1 - - [01/Jun/2022:22:12:32 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3740 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
87
|
+
127.0.0.1 - - [01/Jun/2022:22:12:32 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 200 1304884 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
88
|
+
127.0.0.1 - - [01/Jun/2022:22:31:37 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3740 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
89
|
+
127.0.0.1 - - [01/Jun/2022:22:31:37 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 200 1304884 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
90
|
+
127.0.0.1 - - [01/Jun/2022:22:32:05 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3740 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
91
|
+
127.0.0.1 - - [01/Jun/2022:22:32:05 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 200 1304884 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
92
|
+
127.0.0.1 - - [01/Jun/2022:22:32:05 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3740 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
93
|
+
127.0.0.1 - - [01/Jun/2022:22:32:05 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 200 1304884 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
94
|
+
127.0.0.1 - - [01/Jun/2022:22:32:05 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3740 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
95
|
+
127.0.0.1 - - [01/Jun/2022:22:32:05 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 200 1304884 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
96
|
+
127.0.0.1 - - [01/Jun/2022:22:32:05 +0800] "GET /favicon.ico HTTP/1.1" 404 571 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
97
|
+
127.0.0.1 - - [01/Jun/2022:22:32:05 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3740 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
98
|
+
127.0.0.1 - - [01/Jun/2022:22:32:05 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 200 1304884 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
99
|
+
127.0.0.1 - - [01/Jun/2022:22:32:05 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3740 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
100
|
+
127.0.0.1 - - [01/Jun/2022:22:32:05 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 200 1304884 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
101
|
+
127.0.0.1 - - [01/Jun/2022:22:32:06 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3740 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
102
|
+
127.0.0.1 - - [01/Jun/2022:22:32:06 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 200 1304884 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
103
|
+
127.0.0.1 - - [01/Jun/2022:22:32:06 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3740 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
104
|
+
127.0.0.1 - - [01/Jun/2022:22:32:06 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 200 1304884 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
105
|
+
127.0.0.1 - - [01/Jun/2022:22:32:06 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3740 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
106
|
+
127.0.0.1 - - [01/Jun/2022:22:32:06 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 200 1304884 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
107
|
+
127.0.0.1 - - [01/Jun/2022:22:32:06 +0800] "GET /favicon.ico HTTP/1.1" 404 571 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
108
|
+
127.0.0.1 - - [01/Jun/2022:22:32:54 +0800] "GET /ezuikit5/ HTTP/1.1" 200 3740 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
109
|
+
127.0.0.1 - - [01/Jun/2022:22:32:54 +0800] "GET /ezuikit5/ezuikit.js HTTP/1.1" 200 1304878 "http://localhost/ezuikit5/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"
|
|
@@ -11,3 +11,5 @@
|
|
|
11
11
|
2022/05/31 12:28:03 [notice] 6492#13188: signal process started
|
|
12
12
|
2022/05/31 14:24:13 [notice] 1284#11668: signal process started
|
|
13
13
|
2022/06/01 21:17:25 [error] 3132#16392: *1 CreateFile() "D:\work\jssdk\jssdk-svn\ezuikit-jsv5\demos\nginx-demo/html/favicon.ico" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "localhost", referrer: "http://localhost/ezuikit5/"
|
|
14
|
+
2022/06/01 22:32:05 [error] 3132#16392: *22 CreateFile() "D:\work\jssdk\jssdk-svn\ezuikit-jsv5\demos\nginx-demo/html/favicon.ico" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "localhost", referrer: "http://localhost/ezuikit5/"
|
|
15
|
+
2022/06/01 22:32:06 [error] 3132#16392: *22 CreateFile() "D:\work\jssdk\jssdk-svn\ezuikit-jsv5\demos\nginx-demo/html/favicon.ico" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "localhost", referrer: "http://localhost/ezuikit5/"
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
|
2
|
+
|
|
3
|
+
## Available Scripts
|
|
4
|
+
|
|
5
|
+
In the project directory, you can run:
|
|
6
|
+
|
|
7
|
+
### `npm start`
|
|
8
|
+
|
|
9
|
+
Runs the app in the development mode.<br />
|
|
10
|
+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
|
11
|
+
|
|
12
|
+
The page will reload if you make edits.<br />
|
|
13
|
+
You will also see any lint errors in the console.
|
|
14
|
+
|
|
15
|
+
### `npm test`
|
|
16
|
+
|
|
17
|
+
Launches the test runner in the interactive watch mode.<br />
|
|
18
|
+
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
|
19
|
+
|
|
20
|
+
### `npm run build`
|
|
21
|
+
|
|
22
|
+
Builds the app for production to the `build` folder.<br />
|
|
23
|
+
It correctly bundles React in production mode and optimizes the build for the best performance.
|
|
24
|
+
|
|
25
|
+
The build is minified and the filenames include the hashes.<br />
|
|
26
|
+
Your app is ready to be deployed!
|
|
27
|
+
|
|
28
|
+
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
|
29
|
+
|
|
30
|
+
### `npm run eject`
|
|
31
|
+
|
|
32
|
+
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
|
33
|
+
|
|
34
|
+
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
|
35
|
+
|
|
36
|
+
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
|
37
|
+
|
|
38
|
+
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
|
39
|
+
|
|
40
|
+
## Learn More
|
|
41
|
+
|
|
42
|
+
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
|
43
|
+
|
|
44
|
+
To learn React, check out the [React documentation](https://reactjs.org/).
|
|
45
|
+
|
|
46
|
+
### Code Splitting
|
|
47
|
+
|
|
48
|
+
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
|
|
49
|
+
|
|
50
|
+
### Analyzing the Bundle Size
|
|
51
|
+
|
|
52
|
+
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
|
|
53
|
+
|
|
54
|
+
### Making a Progressive Web App
|
|
55
|
+
|
|
56
|
+
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
|
|
57
|
+
|
|
58
|
+
### Advanced Configuration
|
|
59
|
+
|
|
60
|
+
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
|
|
61
|
+
|
|
62
|
+
### Deployment
|
|
63
|
+
|
|
64
|
+
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
|
|
65
|
+
|
|
66
|
+
### `npm run build` fails to minify
|
|
67
|
+
|
|
68
|
+
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const paths = require('./paths');
|
|
6
|
+
|
|
7
|
+
// Make sure that including paths.js after env.js will read .env variables.
|
|
8
|
+
delete require.cache[require.resolve('./paths')];
|
|
9
|
+
|
|
10
|
+
const NODE_ENV = process.env.NODE_ENV;
|
|
11
|
+
if (!NODE_ENV) {
|
|
12
|
+
throw new Error(
|
|
13
|
+
'The NODE_ENV environment variable is required but was not specified.'
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
|
|
18
|
+
const dotenvFiles = [
|
|
19
|
+
`${paths.dotenv}.${NODE_ENV}.local`,
|
|
20
|
+
`${paths.dotenv}.${NODE_ENV}`,
|
|
21
|
+
// Don't include `.env.local` for `test` environment
|
|
22
|
+
// since normally you expect tests to produce the same
|
|
23
|
+
// results for everyone
|
|
24
|
+
NODE_ENV !== 'test' && `${paths.dotenv}.local`,
|
|
25
|
+
paths.dotenv,
|
|
26
|
+
].filter(Boolean);
|
|
27
|
+
|
|
28
|
+
// Load environment variables from .env* files. Suppress warnings using silent
|
|
29
|
+
// if this file is missing. dotenv will never modify any environment variables
|
|
30
|
+
// that have already been set. Variable expansion is supported in .env files.
|
|
31
|
+
// https://github.com/motdotla/dotenv
|
|
32
|
+
// https://github.com/motdotla/dotenv-expand
|
|
33
|
+
dotenvFiles.forEach(dotenvFile => {
|
|
34
|
+
if (fs.existsSync(dotenvFile)) {
|
|
35
|
+
require('dotenv-expand')(
|
|
36
|
+
require('dotenv').config({
|
|
37
|
+
path: dotenvFile,
|
|
38
|
+
})
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// We support resolving modules according to `NODE_PATH`.
|
|
44
|
+
// This lets you use absolute paths in imports inside large monorepos:
|
|
45
|
+
// https://github.com/facebook/create-react-app/issues/253.
|
|
46
|
+
// It works similar to `NODE_PATH` in Node itself:
|
|
47
|
+
// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
|
|
48
|
+
// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
|
|
49
|
+
// Otherwise, we risk importing Node.js core modules into an app instead of webpack shims.
|
|
50
|
+
// https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421
|
|
51
|
+
// We also resolve them to make sure all tools using them work consistently.
|
|
52
|
+
const appDirectory = fs.realpathSync(process.cwd());
|
|
53
|
+
process.env.NODE_PATH = (process.env.NODE_PATH || '')
|
|
54
|
+
.split(path.delimiter)
|
|
55
|
+
.filter(folder => folder && !path.isAbsolute(folder))
|
|
56
|
+
.map(folder => path.resolve(appDirectory, folder))
|
|
57
|
+
.join(path.delimiter);
|
|
58
|
+
|
|
59
|
+
// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
|
|
60
|
+
// injected into the application via DefinePlugin in webpack configuration.
|
|
61
|
+
const REACT_APP = /^REACT_APP_/i;
|
|
62
|
+
|
|
63
|
+
function getClientEnvironment(publicUrl) {
|
|
64
|
+
const raw = Object.keys(process.env)
|
|
65
|
+
.filter(key => REACT_APP.test(key))
|
|
66
|
+
.reduce(
|
|
67
|
+
(env, key) => {
|
|
68
|
+
env[key] = process.env[key];
|
|
69
|
+
return env;
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
// Useful for determining whether we’re running in production mode.
|
|
73
|
+
// Most importantly, it switches React into the correct mode.
|
|
74
|
+
NODE_ENV: process.env.NODE_ENV || 'development',
|
|
75
|
+
// Useful for resolving the correct path to static assets in `public`.
|
|
76
|
+
// For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
|
|
77
|
+
// This should only be used as an escape hatch. Normally you would put
|
|
78
|
+
// images into the `src` and `import` them in code to get their paths.
|
|
79
|
+
PUBLIC_URL: publicUrl,
|
|
80
|
+
// We support configuring the sockjs pathname during development.
|
|
81
|
+
// These settings let a developer run multiple simultaneous projects.
|
|
82
|
+
// They are used as the connection `hostname`, `pathname` and `port`
|
|
83
|
+
// in webpackHotDevClient. They are used as the `sockHost`, `sockPath`
|
|
84
|
+
// and `sockPort` options in webpack-dev-server.
|
|
85
|
+
WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST,
|
|
86
|
+
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
|
|
87
|
+
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
// Stringify all values so we can feed into webpack DefinePlugin
|
|
91
|
+
const stringified = {
|
|
92
|
+
'process.env': Object.keys(raw).reduce((env, key) => {
|
|
93
|
+
env[key] = JSON.stringify(raw[key]);
|
|
94
|
+
return env;
|
|
95
|
+
}, {}),
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
return { raw, stringified };
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
module.exports = getClientEnvironment;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const crypto = require('crypto');
|
|
6
|
+
const chalk = require('react-dev-utils/chalk');
|
|
7
|
+
const paths = require('./paths');
|
|
8
|
+
|
|
9
|
+
// Ensure the certificate and key provided are valid and if not
|
|
10
|
+
// throw an easy to debug error
|
|
11
|
+
function validateKeyAndCerts({ cert, key, keyFile, crtFile }) {
|
|
12
|
+
let encrypted;
|
|
13
|
+
try {
|
|
14
|
+
// publicEncrypt will throw an error with an invalid cert
|
|
15
|
+
encrypted = crypto.publicEncrypt(cert, Buffer.from('test'));
|
|
16
|
+
} catch (err) {
|
|
17
|
+
throw new Error(
|
|
18
|
+
`The certificate "${chalk.yellow(crtFile)}" is invalid.\n${err.message}`
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
// privateDecrypt will throw an error with an invalid key
|
|
24
|
+
crypto.privateDecrypt(key, encrypted);
|
|
25
|
+
} catch (err) {
|
|
26
|
+
throw new Error(
|
|
27
|
+
`The certificate key "${chalk.yellow(keyFile)}" is invalid.\n${
|
|
28
|
+
err.message
|
|
29
|
+
}`
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Read file and throw an error if it doesn't exist
|
|
35
|
+
function readEnvFile(file, type) {
|
|
36
|
+
if (!fs.existsSync(file)) {
|
|
37
|
+
throw new Error(
|
|
38
|
+
`You specified ${chalk.cyan(
|
|
39
|
+
type
|
|
40
|
+
)} in your env, but the file "${chalk.yellow(file)}" can't be found.`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
return fs.readFileSync(file);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Get the https config
|
|
47
|
+
// Return cert files if provided in env, otherwise just true or false
|
|
48
|
+
function getHttpsConfig() {
|
|
49
|
+
const { SSL_CRT_FILE, SSL_KEY_FILE, HTTPS } = process.env;
|
|
50
|
+
const isHttps = HTTPS === 'true';
|
|
51
|
+
|
|
52
|
+
if (isHttps && SSL_CRT_FILE && SSL_KEY_FILE) {
|
|
53
|
+
const crtFile = path.resolve(paths.appPath, SSL_CRT_FILE);
|
|
54
|
+
const keyFile = path.resolve(paths.appPath, SSL_KEY_FILE);
|
|
55
|
+
const config = {
|
|
56
|
+
cert: readEnvFile(crtFile, 'SSL_CRT_FILE'),
|
|
57
|
+
key: readEnvFile(keyFile, 'SSL_KEY_FILE'),
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
validateKeyAndCerts({ ...config, keyFile, crtFile });
|
|
61
|
+
return config;
|
|
62
|
+
}
|
|
63
|
+
return isHttps;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
module.exports = getHttpsConfig;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// This is a custom Jest transformer turning style imports into empty objects.
|
|
4
|
+
// http://facebook.github.io/jest/docs/en/webpack.html
|
|
5
|
+
|
|
6
|
+
module.exports = {
|
|
7
|
+
process() {
|
|
8
|
+
return 'module.exports = {};';
|
|
9
|
+
},
|
|
10
|
+
getCacheKey() {
|
|
11
|
+
// The output is always the same.
|
|
12
|
+
return 'cssTransform';
|
|
13
|
+
},
|
|
14
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const camelcase = require('camelcase');
|
|
5
|
+
|
|
6
|
+
// This is a custom Jest transformer turning file imports into filenames.
|
|
7
|
+
// http://facebook.github.io/jest/docs/en/webpack.html
|
|
8
|
+
|
|
9
|
+
module.exports = {
|
|
10
|
+
process(src, filename) {
|
|
11
|
+
const assetFilename = JSON.stringify(path.basename(filename));
|
|
12
|
+
|
|
13
|
+
if (filename.match(/\.svg$/)) {
|
|
14
|
+
// Based on how SVGR generates a component name:
|
|
15
|
+
// https://github.com/smooth-code/svgr/blob/01b194cf967347d43d4cbe6b434404731b87cf27/packages/core/src/state.js#L6
|
|
16
|
+
const pascalCaseFilename = camelcase(path.parse(filename).name, {
|
|
17
|
+
pascalCase: true,
|
|
18
|
+
});
|
|
19
|
+
const componentName = `Svg${pascalCaseFilename}`;
|
|
20
|
+
return `const React = require('react');
|
|
21
|
+
module.exports = {
|
|
22
|
+
__esModule: true,
|
|
23
|
+
default: ${assetFilename},
|
|
24
|
+
ReactComponent: React.forwardRef(function ${componentName}(props, ref) {
|
|
25
|
+
return {
|
|
26
|
+
$$typeof: Symbol.for('react.element'),
|
|
27
|
+
type: 'svg',
|
|
28
|
+
ref: ref,
|
|
29
|
+
key: null,
|
|
30
|
+
props: Object.assign({}, props, {
|
|
31
|
+
children: ${assetFilename}
|
|
32
|
+
})
|
|
33
|
+
};
|
|
34
|
+
}),
|
|
35
|
+
};`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return `module.exports = ${assetFilename};`;
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const paths = require('./paths');
|
|
6
|
+
const chalk = require('react-dev-utils/chalk');
|
|
7
|
+
const resolve = require('resolve');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Get additional module paths based on the baseUrl of a compilerOptions object.
|
|
11
|
+
*
|
|
12
|
+
* @param {Object} options
|
|
13
|
+
*/
|
|
14
|
+
function getAdditionalModulePaths(options = {}) {
|
|
15
|
+
const baseUrl = options.baseUrl;
|
|
16
|
+
|
|
17
|
+
// We need to explicitly check for null and undefined (and not a falsy value) because
|
|
18
|
+
// TypeScript treats an empty string as `.`.
|
|
19
|
+
if (baseUrl == null) {
|
|
20
|
+
// If there's no baseUrl set we respect NODE_PATH
|
|
21
|
+
// Note that NODE_PATH is deprecated and will be removed
|
|
22
|
+
// in the next major release of create-react-app.
|
|
23
|
+
|
|
24
|
+
const nodePath = process.env.NODE_PATH || '';
|
|
25
|
+
return nodePath.split(path.delimiter).filter(Boolean);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
|
|
29
|
+
|
|
30
|
+
// We don't need to do anything if `baseUrl` is set to `node_modules`. This is
|
|
31
|
+
// the default behavior.
|
|
32
|
+
if (path.relative(paths.appNodeModules, baseUrlResolved) === '') {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Allow the user set the `baseUrl` to `appSrc`.
|
|
37
|
+
if (path.relative(paths.appSrc, baseUrlResolved) === '') {
|
|
38
|
+
return [paths.appSrc];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// If the path is equal to the root directory we ignore it here.
|
|
42
|
+
// We don't want to allow importing from the root directly as source files are
|
|
43
|
+
// not transpiled outside of `src`. We do allow importing them with the
|
|
44
|
+
// absolute path (e.g. `src/Components/Button.js`) but we set that up with
|
|
45
|
+
// an alias.
|
|
46
|
+
if (path.relative(paths.appPath, baseUrlResolved) === '') {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Otherwise, throw an error.
|
|
51
|
+
throw new Error(
|
|
52
|
+
chalk.red.bold(
|
|
53
|
+
"Your project's `baseUrl` can only be set to `src` or `node_modules`." +
|
|
54
|
+
' Create React App does not support other values at this time.'
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Get webpack aliases based on the baseUrl of a compilerOptions object.
|
|
61
|
+
*
|
|
62
|
+
* @param {*} options
|
|
63
|
+
*/
|
|
64
|
+
function getWebpackAliases(options = {}) {
|
|
65
|
+
const baseUrl = options.baseUrl;
|
|
66
|
+
|
|
67
|
+
if (!baseUrl) {
|
|
68
|
+
return {};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
|
|
72
|
+
|
|
73
|
+
if (path.relative(paths.appPath, baseUrlResolved) === '') {
|
|
74
|
+
return {
|
|
75
|
+
src: paths.appSrc,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Get jest aliases based on the baseUrl of a compilerOptions object.
|
|
82
|
+
*
|
|
83
|
+
* @param {*} options
|
|
84
|
+
*/
|
|
85
|
+
function getJestAliases(options = {}) {
|
|
86
|
+
const baseUrl = options.baseUrl;
|
|
87
|
+
|
|
88
|
+
if (!baseUrl) {
|
|
89
|
+
return {};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const baseUrlResolved = path.resolve(paths.appPath, baseUrl);
|
|
93
|
+
|
|
94
|
+
if (path.relative(paths.appPath, baseUrlResolved) === '') {
|
|
95
|
+
return {
|
|
96
|
+
'^src/(.*)$': '<rootDir>/src/$1',
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function getModules() {
|
|
102
|
+
// Check if TypeScript is setup
|
|
103
|
+
const hasTsConfig = fs.existsSync(paths.appTsConfig);
|
|
104
|
+
const hasJsConfig = fs.existsSync(paths.appJsConfig);
|
|
105
|
+
|
|
106
|
+
if (hasTsConfig && hasJsConfig) {
|
|
107
|
+
throw new Error(
|
|
108
|
+
'You have both a tsconfig.json and a jsconfig.json. If you are using TypeScript please remove your jsconfig.json file.'
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
let config;
|
|
113
|
+
|
|
114
|
+
// If there's a tsconfig.json we assume it's a
|
|
115
|
+
// TypeScript project and set up the config
|
|
116
|
+
// based on tsconfig.json
|
|
117
|
+
if (hasTsConfig) {
|
|
118
|
+
const ts = require(resolve.sync('typescript', {
|
|
119
|
+
basedir: paths.appNodeModules,
|
|
120
|
+
}));
|
|
121
|
+
config = ts.readConfigFile(paths.appTsConfig, ts.sys.readFile).config;
|
|
122
|
+
// Otherwise we'll check if there is jsconfig.json
|
|
123
|
+
// for non TS projects.
|
|
124
|
+
} else if (hasJsConfig) {
|
|
125
|
+
config = require(paths.appJsConfig);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
config = config || {};
|
|
129
|
+
const options = config.compilerOptions || {};
|
|
130
|
+
|
|
131
|
+
const additionalModulePaths = getAdditionalModulePaths(options);
|
|
132
|
+
|
|
133
|
+
return {
|
|
134
|
+
additionalModulePaths: additionalModulePaths,
|
|
135
|
+
webpackAliases: getWebpackAliases(options),
|
|
136
|
+
jestAliases: getJestAliases(options),
|
|
137
|
+
hasTsConfig,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
module.exports = getModules();
|