替换 yamljs 为 js-yaml 进行 yaml 格式校验,处理 yaml 同 key 不报错的问题 (#10647)
* 替换 yamljs 为 js-yaml 进行 yaml 格式校验,处理 yaml 同 key 不报错的问题 * 听说要build一下
This commit is contained in:
parent
1311df0663
commit
4095d172d0
17539
console-ui/package-lock.json
generated
17539
console-ui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -68,6 +68,7 @@
|
||||
"@alifd/next": "^1.19.4",
|
||||
"@alifd/theme-design-pro": "0.x",
|
||||
"axios": "^0.21.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"moment": "^2.23.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"qs": "^6.8.2",
|
||||
@ -78,7 +79,6 @@
|
||||
"react-router-dom": "^5.1.2",
|
||||
"react-router-redux": "^4.0.8",
|
||||
"redux": "^4.0.5",
|
||||
"redux-thunk": "^2.3.0",
|
||||
"yamljs": "^0.3.0"
|
||||
"redux-thunk": "^2.3.0"
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as yamljs from 'yamljs';
|
||||
import * as yaml from 'js-yaml';
|
||||
|
||||
/**
|
||||
* 校验一个配置项
|
||||
@ -141,7 +141,7 @@ export default {
|
||||
*/
|
||||
validateYaml(str) {
|
||||
try {
|
||||
return yamljs.parse(str);
|
||||
return yaml.parse(str);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="console-ui/public/css/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="console-ui/public/css/font-awesome.css">
|
||||
<!-- 第三方css结束 -->
|
||||
<link href="./css/main.css?c65099d9e1d3b503ffb6" rel="stylesheet"></head>
|
||||
<link href="./css/main.css?f8ce6847060d8e383da7" rel="stylesheet"></head>
|
||||
|
||||
<body>
|
||||
<div id="root" style="overflow:hidden"></div>
|
||||
@ -56,6 +56,6 @@
|
||||
<script src="console-ui/public/js/merge.js"></script>
|
||||
<script src="console-ui/public/js/loader.js"></script>
|
||||
<!-- 第三方js结束 -->
|
||||
<script type="text/javascript" src="./js/main.js?c65099d9e1d3b503ffb6"></script></body>
|
||||
<script type="text/javascript" src="./js/main.js?f8ce6847060d8e383da7"></script></body>
|
||||
|
||||
</html>
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user