修复系统更新源判断,回退 @monaco-editor/react

This commit is contained in:
whyour 2023-03-03 23:45:38 +08:00
parent 5c5b4f804e
commit 5bf08b76de
4 changed files with 14 additions and 12 deletions

View File

@ -92,7 +92,7 @@
"devDependencies": { "devDependencies": {
"@ant-design/icons": "^4.7.0", "@ant-design/icons": "^4.7.0",
"@ant-design/pro-layout": "6.38.22", "@ant-design/pro-layout": "6.38.22",
"@monaco-editor/react": "4.4.6", "@monaco-editor/react": "4.2.1",
"@react-hook/resize-observer": "^1.2.6", "@react-hook/resize-observer": "^1.2.6",
"@sentry/react": "^7.12.1", "@sentry/react": "^7.12.1",
"@types/body-parser": "^1.19.2", "@types/body-parser": "^1.19.2",

View File

@ -3,7 +3,7 @@ lockfileVersion: 5.4
specifiers: specifiers:
'@ant-design/icons': ^4.7.0 '@ant-design/icons': ^4.7.0
'@ant-design/pro-layout': 6.38.22 '@ant-design/pro-layout': 6.38.22
'@monaco-editor/react': 4.4.6 '@monaco-editor/react': 4.2.1
'@otplib/preset-default': ^12.0.1 '@otplib/preset-default': ^12.0.1
'@react-hook/resize-observer': ^1.2.6 '@react-hook/resize-observer': ^1.2.6
'@sentry/node': ^7.12.1 '@sentry/node': ^7.12.1
@ -134,7 +134,7 @@ dependencies:
devDependencies: devDependencies:
'@ant-design/icons': 4.8.0_biqbaboplfbrettd7655fr4n2y '@ant-design/icons': 4.8.0_biqbaboplfbrettd7655fr4n2y
'@ant-design/pro-layout': 6.38.22_biqbaboplfbrettd7655fr4n2y '@ant-design/pro-layout': 6.38.22_biqbaboplfbrettd7655fr4n2y
'@monaco-editor/react': 4.4.6_jywyd5ymizla4bkdnod6po6m6y '@monaco-editor/react': 4.2.1_jywyd5ymizla4bkdnod6po6m6y
'@react-hook/resize-observer': 1.2.6_react@18.2.0 '@react-hook/resize-observer': 1.2.6_react@18.2.0
'@sentry/react': 7.28.1_react@18.2.0 '@sentry/react': 7.28.1_react@18.2.0
'@types/body-parser': 1.19.2 '@types/body-parser': 1.19.2
@ -3365,12 +3365,12 @@ packages:
state-local: 1.0.7 state-local: 1.0.7
dev: true dev: true
/@monaco-editor/react/4.4.6_jywyd5ymizla4bkdnod6po6m6y: /@monaco-editor/react/4.2.1_jywyd5ymizla4bkdnod6po6m6y:
resolution: {integrity: sha512-Gr3uz3LYf33wlFE3eRnta4RxP5FSNxiIV9ENn2D2/rN8KgGAD8ecvcITRtsbbyuOuNkwbuHYxfeaz2Vr+CtyFA==} resolution: {integrity: sha512-yN8qVY0PyFIbqPjfrZ5TbR/wrcfeiwoys8+0QkmyfiOzG74vXxSBOPIUxk7Ly+qCj7qWHPq1uDJskzFGaIqaPA==}
peerDependencies: peerDependencies:
monaco-editor: '>= 0.25.0 < 1' monaco-editor: '>= 0.25.0 < 1'
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || 18 react: ^16.8.0 || ^17.0.0 || 18
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || 18 react-dom: ^16.8.0 || ^17.0.0 || 18
peerDependenciesMeta: peerDependenciesMeta:
monaco-editor: monaco-editor:
optional: true optional: true
@ -3384,6 +3384,7 @@ packages:
prop-types: 15.8.1 prop-types: 15.8.1
react: 18.2.0 react: 18.2.0
react-dom: 18.2.0_react@18.2.0 react-dom: 18.2.0_react@18.2.0
state-local: 1.0.7
dev: true dev: true
/@nicolo-ribaudo/chokidar-2/2.1.8-no-fsevents.3: /@nicolo-ribaudo/chokidar-2/2.1.8-no-fsevents.3:

View File

@ -226,10 +226,10 @@ usage() {
## 更新qinglong ## 更新qinglong
update_qinglong() { update_qinglong() {
local mirror="github" local mirror="gitee"
local githubStatus=$(curl -s -m 2 -IL "https://github.com" | grep 200) local githubStatus=$(curl -s -m 2 -IL "https://google.com" | grep 200)
if [[ ! -z $githubStatus ]]; then if [[ ! -z $githubStatus ]]; then
mirror="gitee" mirror="github"
fi fi
echo -e "使用 ${mirror} 源更新...\n" echo -e "使用 ${mirror} 源更新...\n"
export isFirstStartServer=false export isFirstStartServer=false

View File

@ -1,7 +1,6 @@
import * as Sentry from '@sentry/react'; import * as Sentry from '@sentry/react';
import { Integrations } from '@sentry/tracing'; import { Integrations } from '@sentry/tracing';
import { loader } from '@monaco-editor/react'; import { loader } from '@monaco-editor/react';
import * as monaco from 'monaco-editor';
export function init(version: string) { export function init(version: string) {
// sentry监控 init // sentry监控 init
@ -27,7 +26,9 @@ export function init(version: string) {
// monaco 编辑器配置cdn和locale // monaco 编辑器配置cdn和locale
loader.config({ loader.config({
monaco, paths: {
vs: 'https://cdn.staticfile.org/monaco-editor/0.33.0/min/vs',
},
'vs/nls': { 'vs/nls': {
availableLanguages: { availableLanguages: {
'*': 'zh-cn', '*': 'zh-cn',