From 03208f427fe758b7b2bb35cf978cdaedfc3427a7 Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Fri, 9 Oct 2020 11:40:01 +0800 Subject: [PATCH 1/3] chore: remove node-pty --- packages/ui/package.json | 3 --- packages/ui/src/UmiUI.ts | 4 ++-- packages/ui/web/src/layouts/Footer.tsx | 4 ++-- yarn.lock | 9 +-------- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/packages/ui/package.json b/packages/ui/package.json index a3588883..defa0ff9 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -69,9 +69,6 @@ "chencheng (https://github.com/sorrycc)" ], "license": "MIT", - "optionalDependencies": { - "node-pty": "^0.10.0-beta3" - }, "dependencies": { "@umijs/launch-editor": "^1.0.0", "binary-mirror-config": "1.20.3", diff --git a/packages/ui/src/UmiUI.ts b/packages/ui/src/UmiUI.ts index 5666bd66..f2b4928b 100644 --- a/packages/ui/src/UmiUI.ts +++ b/packages/ui/src/UmiUI.ts @@ -28,7 +28,7 @@ import ActiveProjectError from './ActiveProjectError'; import { BackToHomeAction, OpenProjectAction, ReInstallDependencyAction } from './Actions'; import { isDepLost, isPluginLost, isUmiProject, isUsingBigfish, isUsingUmi } from './checkProject'; import isDepFileExists from './utils/isDepFileExists'; -import initTerminal from './terminal'; +// import initTerminal from './terminal'; import detectLanguage from './detectLanguage'; import detectNpmClients from './detectNpmClients'; import debug, { debugSocket } from './debug'; @@ -1059,7 +1059,7 @@ export default class UmiUI { prefix: '/umiui', log: () => {}, }); - initTerminal.call(this, server); + // initTerminal.call(this, server); this.socketServer = ss; this.server = server; }); diff --git a/packages/ui/web/src/layouts/Footer.tsx b/packages/ui/web/src/layouts/Footer.tsx index a8c70a0d..71a13e5c 100644 --- a/packages/ui/web/src/layouts/Footer.tsx +++ b/packages/ui/web/src/layouts/Footer.tsx @@ -214,7 +214,7 @@ const Footer: React.SFC = props => { > - = props => { className={styles['section-drawer-shell']} /> )} - + */}
diff --git a/yarn.lock b/yarn.lock index 84a3e504..9aae84f8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13808,7 +13808,7 @@ mz@^2.4.0, mz@^2.5.0, mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" -nan@^2.12.1, nan@^2.14.0: +nan@^2.12.1: version "2.14.1" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== @@ -13988,13 +13988,6 @@ node-notifier@^6.0.0: shellwords "^0.1.1" which "^1.3.1" -node-pty@^0.10.0-beta3: - version "0.10.0-beta9" - resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.10.0-beta9.tgz#e5a795f9b53948346803cb71bac4ffc02e7909f0" - integrity sha512-Qm6uSH30FUcAhJ9s76C+lgvTsOW2cHUbkIGjCdOVCL0c7S4DxsmKBRgjcr+guUK9d9KwfuZHeSjXYWjpJFPe4w== - dependencies: - nan "^2.14.0" - node-releases@^1.1.13, node-releases@^1.1.58: version "1.1.58" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.58.tgz#8ee20eef30fa60e52755fcc0942def5a734fe935" From 08ed75265c817f84e5769bcf2827722d0cf58d50 Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Fri, 9 Oct 2020 11:44:43 +0800 Subject: [PATCH 2/3] chore: remove ui --- packages/ui/src/UmiUI.ts | 2 +- packages/ui/web/src/layouts/Footer.tsx | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/ui/src/UmiUI.ts b/packages/ui/src/UmiUI.ts index f2b4928b..b1d2ae89 100644 --- a/packages/ui/src/UmiUI.ts +++ b/packages/ui/src/UmiUI.ts @@ -907,7 +907,7 @@ export default class UmiUI { /** * Terminal shell resize server */ - app.get('/terminal/resize', resizeRoute(this.ctx)); + // app.get('/terminal/resize', resizeRoute(this.ctx)); // 访问域名打开 app.get('/', indexRoute(this.ctx)); app.use('/*', commonRoute(this.ctx)); diff --git a/packages/ui/web/src/layouts/Footer.tsx b/packages/ui/web/src/layouts/Footer.tsx index 71a13e5c..383815c8 100644 --- a/packages/ui/web/src/layouts/Footer.tsx +++ b/packages/ui/web/src/layouts/Footer.tsx @@ -9,7 +9,6 @@ import { QuestionCircleOutlined, CheckOutlined, MessageOutlined, - CodeOutlined, } from '@ant-design/icons'; import { useIntl } from 'react-intl'; import cls from 'classnames'; @@ -17,7 +16,7 @@ import { LOCALES, LOCALES_ICON } from '@/enums'; import Context from '@/layouts/Context'; import Logs from '@/components/Logs'; import EditorIcon from '@/components/icons/Editor'; -import Shell from '@/components/Shell'; +// import Shell from '@/components/Shell'; import { states, reducers } from '@/customModels/footer'; import { handleBack } from '@/utils'; import event, { MESSAGES } from '@/message'; @@ -127,7 +126,7 @@ const Footer: React.SFC = props => { const actionCls = cls(styles.section, styles.action); const logCls = cls(actionCls, styles.log); - const shellCls = cls(actionCls, styles.shell); + // const shellCls = cls(actionCls, styles.shell); const LocaleText = ({ locale: textLocale, checked, style }) => ( @@ -290,12 +289,12 @@ const Footer: React.SFC = props => { {' '} {intl.formatMessage({ id: 'org.umi.ui.global.log' })}
- {projectDashboard && ( + {/* {projectDashboard && (
togglePanel('terminal')}> {' '} {intl.formatMessage({ id: 'org.umi.ui.global.terminal' })}
- )} + )} */}
{!!key && ( From f121b0be5513cea8e4856dcad9a704b55886cebf Mon Sep 17 00:00:00 2001 From: ycjcl868 <45808948@qq.com> Date: Fri, 9 Oct 2020 11:47:02 +0800 Subject: [PATCH 3/3] chore: terminal --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index e5af9b40..d06a1db1 100644 --- a/README.md +++ b/README.md @@ -110,10 +110,6 @@ window.parent.postMessage( ); ``` -### 内置终端 - -![https://camo.githubusercontent.com/d627fa3b419e9231b32f8515db90e632d9dd2262/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323031392f6769662f38363032352f313537343134353634313431352d30366339626465372d303166392d343463652d383962392d3235616635613836643330392e676966](https://camo.githubusercontent.com/d627fa3b419e9231b32f8515db90e632d9dd2262/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323031392f6769662f38363032352f313537343134353634313431352d30366339626465372d303166392d343463652d383962392d3235616635613836643330392e676966) - [更多功能](https://github.com/sorrycc/blog/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+Umi+UI+in%3Atitle+) ## 📖 API