From 438b41b24451b6429a7e0b27476fabbfe6d9f748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Wed, 26 Feb 2025 15:17:11 +0800 Subject: [PATCH 1/7] =?UTF-8?q?github-actions:=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E6=9D=A1=E4=BB=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-and-release.yml | 2 -- .github/workflows/npm-run-electron.yml | 2 -- .github/workflows/test-and-upload.yml | 1 + 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index da124e08ff..ab550ffef7 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -4,8 +4,6 @@ on: push: branches: - release* - - v1* - - v2* jobs: # job 1 diff --git a/.github/workflows/npm-run-electron.yml b/.github/workflows/npm-run-electron.yml index ae4c0d14a7..aeb4134811 100644 --- a/.github/workflows/npm-run-electron.yml +++ b/.github/workflows/npm-run-electron.yml @@ -6,8 +6,6 @@ on: - run* - test* - release* - - v1* - - v2* jobs: npm-run-electron: diff --git a/.github/workflows/test-and-upload.yml b/.github/workflows/test-and-upload.yml index 96229e5150..0dd17b03e7 100644 --- a/.github/workflows/test-and-upload.yml +++ b/.github/workflows/test-and-upload.yml @@ -10,6 +10,7 @@ on: pull_request: branches: - master + - develop - 1.x jobs: From e5bcad183d2dac1c184bbb5791755071aa3a52d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Wed, 26 Feb 2025 16:36:24 +0800 Subject: [PATCH 2/7] =?UTF-8?q?optimize:=20=E9=A1=B5=E9=9D=A2=E8=AF=A2?= =?UTF-8?q?=E9=97=AE=E7=9A=84=E5=8F=82=E4=B8=8E=E8=80=85=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=93=BE=E6=8E=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/gui/src/view/App.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/gui/src/view/App.vue b/packages/gui/src/view/App.vue index a47d7b92b4..d8b58b8c95 100644 --- a/packages/gui/src/view/App.vue +++ b/packages/gui/src/view/App.vue @@ -130,6 +130,9 @@ export default { window.config.disableSearchBar = false this.$router.replace(item.path) }, + async openExternal (url) { + await this.$api.ipc.openExternal(url) + }, }, } @@ -175,7 +178,7 @@ export default { From 632b75f842b1388109e9e0bd197d2914387ca40d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Thu, 27 Feb 2025 14:40:36 +0800 Subject: [PATCH 3/7] =?UTF-8?q?optimize:=20=E5=85=B3=E9=97=AD=E6=89=80?= =?UTF-8?q?=E6=9C=89=E8=BE=93=E5=85=A5=E6=A1=86=E7=9A=84=20`=E6=8B=BC?= =?UTF-8?q?=E5=86=99=E6=A3=80=E6=9F=A5`=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/src/view/components/mock-input.vue | 4 ++-- packages/gui/src/view/pages/plugin/node.vue | 6 ++--- .../gui/src/view/pages/plugin/overwall.vue | 22 ++++++++++++++----- packages/gui/src/view/pages/plugin/pip.vue | 4 ++-- packages/gui/src/view/pages/proxy.vue | 4 ++-- packages/gui/src/view/pages/server.vue | 16 +++++++------- packages/gui/src/view/pages/setting.vue | 16 +++++++------- 7 files changed, 41 insertions(+), 31 deletions(-) diff --git a/packages/gui/src/view/components/mock-input.vue b/packages/gui/src/view/components/mock-input.vue index 87a191aea5..5558fe35ba 100644 --- a/packages/gui/src/view/components/mock-input.vue +++ b/packages/gui/src/view/components/mock-input.vue @@ -19,7 +19,7 @@ export default { event.preventDefault() } }, - onChange () { + onBlur () { if (this.$refs.input.textContent !== this.value) { this.$emit('input', this.$refs.input.textContent) } @@ -29,7 +29,7 @@ export default { diff --git a/packages/gui/src/view/pages/plugin/pip.vue b/packages/gui/src/view/pages/plugin/pip.vue index 1ea0537269..6250a95749 100644 --- a/packages/gui/src/view/pages/plugin/pip.vue +++ b/packages/gui/src/view/pages/plugin/pip.vue @@ -63,7 +63,7 @@ export default { - +
如果你的pip命令改成了其他名字(如pip3),或想设置绿色版pip程序路径,可在此处修改
@@ -112,7 +112,7 @@ export default {
- +
使用以上域名安装包时,不会进行SSL证书验证,多个域名用空格隔开
注意:切换仓库镜像同时会修改pip.ini中的trusted-host配置,即使关闭 ds 也会继续保持 diff --git a/packages/gui/src/view/pages/proxy.vue b/packages/gui/src/view/pages/proxy.vue index 00aa93abec..1142079e60 100644 --- a/packages/gui/src/view/pages/proxy.vue +++ b/packages/gui/src/view/pages/proxy.vue @@ -151,7 +151,7 @@ export default {
- +
远程国内域名白名单文件内容可以是base64编码格式,也可以是未经过编码的
@@ -222,6 +222,6 @@ export default { diff --git a/packages/gui/src/view/pages/server.vue b/packages/gui/src/view/pages/server.vue index 44ce560c7a..bbe00053a9 100644 --- a/packages/gui/src/view/pages/server.vue +++ b/packages/gui/src/view/pages/server.vue @@ -225,13 +225,13 @@ export default {
- +
你可以设置为0.0.0.0,让其他电脑可以使用此代理服务
- +
修改后需要重启应用
@@ -256,12 +256,12 @@ export default { @@ -295,8 +295,8 @@ export default {
- 请求: ms,对应timeout配置
- 连接: ms,对应keepAliveTimeout配置 + 请求: ms,对应timeout配置
+ 连接: ms,对应keepAliveTimeout配置

这里指定域名的超时时间:(域名配置可使用通配符或正则)
@@ -400,10 +400,10 @@ export default { - ms + ms
使用以下DNS获取IP进行测速
diff --git a/packages/gui/src/view/pages/setting.vue b/packages/gui/src/view/pages/setting.vue index 598a0709bd..8c1e49b9f1 100644 --- a/packages/gui/src/view/pages/setting.vue +++ b/packages/gui/src/view/pages/setting.vue @@ -373,10 +373,10 @@ export default {
- + - + @@ -432,7 +432,7 @@ export default {
- +
部分快捷键已被占用:F5F12Ctrl+FF3Shift+F3
@@ -451,8 +451,8 @@ export default {
-  × - +  × +
@@ -485,7 +485,7 @@ export default {
@@ -494,7 +494,7 @@ export default {
- + {{ item.label }} @@ -506,7 +506,7 @@ export default { - +
修改后,重启DS才生效,隔天达到日志文件大小限制时,才会触发清理程序!
From 982fa53d39ad4ad566a2fa1629974a1d679c0405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Wed, 5 Mar 2025 21:37:43 +0800 Subject: [PATCH 4/7] =?UTF-8?q?optimize:=20=E9=A1=B5=E9=9D=A2=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/src/modules/plugin/node/config.js | 4 -- packages/core/src/modules/plugin/pip/index.js | 6 +-- packages/core/src/modules/server/index.js | 2 +- .../core/src/shell/scripts/kill-by-port.js | 3 +- .../core/src/shell/scripts/set-npm-env.js | 3 +- .../core/src/shell/scripts/set-system-env.js | 3 +- packages/core/src/shell/shell.js | 8 +-- packages/gui/pkg/after-pack.js | 3 +- packages/gui/src/view/App.vue | 11 +--- .../gui/src/view/components/mock-input.vue | 37 +------------ packages/gui/src/view/pages/help.vue | 4 +- packages/gui/src/view/pages/plugin/git.vue | 6 +-- packages/gui/src/view/pages/plugin/node.vue | 2 +- .../gui/src/view/pages/plugin/overwall.vue | 16 +++--- packages/gui/src/view/pages/plugin/pip.vue | 2 +- packages/gui/src/view/pages/proxy.vue | 4 +- packages/gui/src/view/pages/server.vue | 8 +-- packages/gui/src/view/pages/setting.vue | 8 +-- packages/gui/src/view/style/index.scss | 53 +++++-------------- packages/gui/src/view/style/theme/dark.scss | 16 +++++- 20 files changed, 64 insertions(+), 135 deletions(-) diff --git a/packages/core/src/modules/plugin/node/config.js b/packages/core/src/modules/plugin/node/config.js index f9697a1d49..1463f5094a 100644 --- a/packages/core/src/modules/plugin/node/config.js +++ b/packages/core/src/modules/plugin/node/config.js @@ -14,15 +14,11 @@ module.exports = { 'yarnRegistry': 'default', 'registry': 'https://registry.npmjs.org', // 可以选择切换官方或者淘宝镜像 }, - // intercepts: { - // 'cdn.cypress.io': [{ regexp: '/desktop/.*', proxy: 'http://npmmirror.com/mirrors/cypress/' }] - // }, variables: { phantomjs_cdnurl: 'https://npmmirror.com/mirrors/phantomjs', chromedriver_cdnurl: 'https://npmmirror.com/mirrors/chromedriver', sass_binary_site: 'https://npmmirror.com/mirrors/node-sass', ELECTRON_MIRROR: 'https://npmmirror.com/mirrors/electron/', - // CYPRESS_DOWNLOAD_MIRROR: 'https://cdn.cypress.io', NVM_NODEJS_ORG_MIRROR: 'https://npmmirror.com/mirrors/node', CHROMEDRIVER_CDNURL: 'https://npmmirror.com/mirrors/chromedriver', OPERADRIVER: 'https://npmmirror.com/mirrors/operadriver', diff --git a/packages/core/src/modules/plugin/pip/index.js b/packages/core/src/modules/plugin/pip/index.js index 63572ceef9..0ac81aa37a 100644 --- a/packages/core/src/modules/plugin/pip/index.js +++ b/packages/core/src/modules/plugin/pip/index.js @@ -52,8 +52,7 @@ const PipPlugin = function (context) { cmds.push(`${command} config unset global.${item.key}`) } } - const ret = await shell.exec(cmds, { type: 'cmd' }) - return ret + return await shell.exec(cmds, { type: 'cmd' }) }, async unsetPipEnv (list) { @@ -62,8 +61,7 @@ const PipPlugin = function (context) { for (const item of list) { cmds.push(`${command} config unset global.${item} `) } - const ret = await shell.exec(cmds, { type: 'cmd' }) - return ret + return await shell.exec(cmds, { type: 'cmd' }) }, async setRegistry ({ registry }) { diff --git a/packages/core/src/modules/server/index.js b/packages/core/src/modules/server/index.js index 25eb877fc6..58fe413ed7 100644 --- a/packages/core/src/modules/server/index.js +++ b/packages/core/src/modules/server/index.js @@ -104,7 +104,7 @@ const serverApi = { log.error('server process uncaughtException:', err) }) serverProcess.on('message', (msg) => { - log.info('收到子进程消息:', JSON.stringify(msg)) + log.debug('收到子进程消息:', JSON.stringify(msg)) if (msg.type === 'status') { fireStatus(msg.event) } else if (msg.type === 'error') { diff --git a/packages/core/src/shell/scripts/kill-by-port.js b/packages/core/src/shell/scripts/kill-by-port.js index 33e3c66c6b..248eb4a49d 100644 --- a/packages/core/src/shell/scripts/kill-by-port.js +++ b/packages/core/src/shell/scripts/kill-by-port.js @@ -5,8 +5,7 @@ const execute = Shell.execute const executor = { async windows (exec, { port }) { const cmds = [`for /f "tokens=5" %a in ('netstat -aon ^| find ":${port}" ^| find "LISTENING"') do (taskkill /f /pid %a & exit /B) `] - // eslint-disable-next-line no-unused-vars - const ret = await exec(cmds, { type: 'cmd' }) + await exec(cmds, { type: 'cmd' }) return true }, async linux (exec, { port }) { diff --git a/packages/core/src/shell/scripts/set-npm-env.js b/packages/core/src/shell/scripts/set-npm-env.js index 37c92edda2..e80855d1ca 100644 --- a/packages/core/src/shell/scripts/set-npm-env.js +++ b/packages/core/src/shell/scripts/set-npm-env.js @@ -11,8 +11,7 @@ const executor = { for (const item of list) { cmds.push(`npm config set ${item.key} ${item.value}`) } - const ret = await exec(cmds, { type: 'cmd' }) - return ret + return await exec(cmds, { type: 'cmd' }) }, async linux (exec, { port }) { throw new Error('暂未实现此功能') diff --git a/packages/core/src/shell/scripts/set-system-env.js b/packages/core/src/shell/scripts/set-system-env.js index 8e7abef9e8..828e5cdb81 100644 --- a/packages/core/src/shell/scripts/set-system-env.js +++ b/packages/core/src/shell/scripts/set-system-env.js @@ -19,8 +19,7 @@ const executor = { // [Environment]::SetEnvironmentVariable('FOO', 'bar', 'Machine') cmds2.push(`set ${item.key}=""`) } - // eslint-disable-next-line no-unused-vars - const ret2 = await exec(cmds2, { type: 'cmd' }) + await exec(cmds2, { type: 'cmd' }) return ret }, async linux (exec, { port }) { diff --git a/packages/core/src/shell/shell.js b/packages/core/src/shell/shell.js index a0f6bc78ab..1dd40bd5eb 100644 --- a/packages/core/src/shell/shell.js +++ b/packages/core/src/shell/shell.js @@ -54,9 +54,7 @@ class WindowsSystemShell extends SystemShell { } try { - const ret = await ps.invoke() - // log.info('ps complete', cmds) - return ret + return await ps.invoke() } finally { ps.dispose() } @@ -66,9 +64,7 @@ class WindowsSystemShell extends SystemShell { compose += ` && ${cmd}` } // compose += '&& exit' - const ret = await childExec(compose, args) - // log.info('cmd complete:', compose) - return ret + return await childExec(compose, args) } } } diff --git a/packages/gui/pkg/after-pack.js b/packages/gui/pkg/after-pack.js index 699593be51..6e3138ecd8 100644 --- a/packages/gui/pkg/after-pack.js +++ b/packages/gui/pkg/after-pack.js @@ -18,9 +18,8 @@ updaterCacheDirName: '@docmirrordev-sidecar-gui-updater' fs.writeFileSync(filePath, fileContent) } exports.default = async function (context) { - // console.log('context', context) let targetPath - let systemType = '' + let systemType if (context.packager.platform.nodeName === 'darwin') { targetPath = path.join(context.appOutDir, `${context.packager.appInfo.productName}.app/Contents/Resources`) systemType = 'mac' diff --git a/packages/gui/src/view/App.vue b/packages/gui/src/view/App.vue index d8b58b8c95..6a66503ccd 100644 --- a/packages/gui/src/view/App.vue +++ b/packages/gui/src/view/App.vue @@ -148,7 +148,7 @@ export default { style="inset:auto auto 53px 210px; background-color:#ddd" /> - +