Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
de2decf
fix vue3
chengcheng84 Apr 18, 2026
5094ca4
fix: index load
chengcheng84 Apr 19, 2026
dbe5223
fix: theme
chengcheng84 Apr 19, 2026
a2ddae3
fix: add value for v-model
chengcheng84 Apr 19, 2026
8e61629
fix: sidebar
chengcheng84 Apr 19, 2026
48836c8
refactor: migrate Vue slot syntax to shorthand
chengcheng84 Apr 24, 2026
4499d3f
feat: upgrade dependencies and update Vue components
chengcheng84 Apr 24, 2026
841adf5
refactor: migrate icons to Vue components
chengcheng84 Apr 24, 2026
2816c6a
refactor: remove unused MockInput component and router patches
chengcheng84 Apr 24, 2026
a261f0f
fix: ci and review
chengcheng84 Apr 24, 2026
6dce51d
fix: review
chengcheng84 Apr 25, 2026
868fa6f
fix: build and sidbar
chengcheng84 Apr 25, 2026
437ff6a
fix: ci
chengcheng84 Apr 25, 2026
203a756
Merge branch 'master' of https://github.com/chengcheng84/dev-sidecar …
chengcheng84 Apr 25, 2026
f82e178
fix: merge
chengcheng84 Apr 25, 2026
d329e26
ci: use working-directory in GitHub Actions
chengcheng84 Apr 25, 2026
bc8cc10
test
chengcheng84 Apr 25, 2026
1578de1
fix ci
chengcheng84 Apr 25, 2026
6412615
ci: remove Windows universal build artifacts
chengcheng84 Apr 30, 2026
ba6ded2
fix: ci
chengcheng84 Apr 30, 2026
476b062
fix: update output directory and publish URL handling
chengcheng84 Apr 30, 2026
45d7118
Merge branch 'master' of https://github.com/chengcheng84/dev-sidecar …
chengcheng84 Apr 30, 2026
d0cd144
fix: review from copilot
chengcheng84 Apr 30, 2026
d20f497
fix
chengcheng84 Apr 30, 2026
b9215e8
fix(gui): restore scoped package name @docmirror/dev-sidecar-gui
chengcheng84 Apr 30, 2026
a4c5056
Merge branch 'master' of https://github.com/chengcheng84/dev-sidecar …
chengcheng84 May 15, 2026
4fae2b5
fix: restore search bar and pre-release indicators
chengcheng84 May 15, 2026
e219f46
fix: noTip
chengcheng84 May 15, 2026
93a956b
Merge pull request #599 from chengcheng84/vue-ant-version
cute-omega May 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ jobs:
ren DevSidecar-${{ steps.package-info.outputs.version }}-x64.exe DevSidecar-${{ steps.package-info.outputs.version }}-windows-x86_64.exe;
ren DevSidecar-${{ steps.package-info.outputs.version }}-ia32.exe DevSidecar-${{ steps.package-info.outputs.version }}-windows-ia32.exe;
ren DevSidecar-${{ steps.package-info.outputs.version }}-arm64.exe DevSidecar-${{ steps.package-info.outputs.version }}-windows-arm64.exe;
ren DevSidecar-${{ steps.package-info.outputs.version }}.exe DevSidecar-${{ steps.package-info.outputs.version }}-windows-universal.exe;
dir;
- name: "Rename artifacts - Linux"
if: ${{ matrix.os == 'ubuntu' }}
Expand Down Expand Up @@ -292,13 +291,6 @@ jobs:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-windows-arm64.exe
name: "DevSidecar-${{ steps.package-info.outputs.version }}-windows-arm64.exe"
if-no-files-found: error
- name: "Upload DevSidecar-${{ steps.package-info.outputs.version }}-windows-universal.exe"
uses: actions/upload-artifact@v4.4.0
if: ${{ matrix.os == 'windows' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ steps.package-info.outputs.version }}-windows-universal.exe
name: "DevSidecar-${{ steps.package-info.outputs.version }}-windows-universal.exe"
if-no-files-found: error
# endregion Upload artifacts - Windows

# region Upload artifacts - Linux
Expand Down Expand Up @@ -474,11 +466,6 @@ jobs:
with:
name: "DevSidecar-${{ steps.package-info.outputs.version }}-windows-arm64.exe"
path: release
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-windows-universal.exe"
uses: actions/download-artifact@v4.1.8
with:
name: "DevSidecar-${{ steps.package-info.outputs.version }}-windows-universal.exe"
path: release
# -------------------------------------------------------------------------------------------------------------------------
- name: "Download DevSidecar-${{ steps.package-info.outputs.version }}-linux-x86_64.deb"
uses: actions/download-artifact@v4.1.8
Expand Down Expand Up @@ -575,4 +562,4 @@ jobs:
GHR_PATH: release/
GHR_TITLE: ${{ github.ref_name }}
GHR_REPLACE: true
GHR_DRAFT: true
GHR_DRAFT: true
4 changes: 1 addition & 3 deletions .github/workflows/npm-run-electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,9 @@ jobs:
pnpm install;

- name: "npm run electron"
working-directory: packages/gui
run: |
echo "======================================================================";
echo "cd packages/gui";
echo "--------------------";
cd packages/gui;
dir || ls -lah;

echo "======================================================================";
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/test-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ jobs:
ren DevSidecar-${{ env.BUILD_VERSION }}-x64.exe DevSidecar-${{ env.BUILD_VERSION }}-windows-x86_64.exe;
ren DevSidecar-${{ env.BUILD_VERSION }}-ia32.exe DevSidecar-${{ env.BUILD_VERSION }}-windows-ia32.exe;
ren DevSidecar-${{ env.BUILD_VERSION }}-arm64.exe DevSidecar-${{ env.BUILD_VERSION }}-windows-arm64.exe;
ren DevSidecar-${{ env.BUILD_VERSION }}.exe DevSidecar-${{ env.BUILD_VERSION }}-windows-universal.exe;
dir;
- name: "Rename artifacts - Linux"
if: ${{ matrix.os == 'ubuntu' }}
Expand Down Expand Up @@ -320,13 +319,6 @@ jobs:
path: packages/gui/dist_electron/DevSidecar-${{ env.BUILD_VERSION }}-windows-arm64.exe
name: "DevSidecar-${{ env.BUILD_VERSION }}-windows-arm64.exe"
if-no-files-found: error
- name: "Upload DevSidecar-${{ env.BUILD_VERSION }}-windows-universal.exe"
uses: actions/upload-artifact@v4.4.0
if: ${{ matrix.os == 'windows' }}
with:
path: packages/gui/dist_electron/DevSidecar-${{ env.BUILD_VERSION }}-windows-universal.exe
name: "DevSidecar-${{ env.BUILD_VERSION }}-windows-universal.exe"
if-no-files-found: error
# endregion Upload artifacts - Windows

# region Upload artifacts - Linux
Expand Down Expand Up @@ -465,4 +457,4 @@ jobs:
path: packages/gui/dist_electron/DevSidecar-${{ env.BUILD_VERSION }}-macos-universal.dmg
name: "DevSidecar-${{ env.BUILD_VERSION }}-macos-universal.dmg"
if-no-files-found: error
# endregion Upload artifacts - macOS
# endregion Upload artifacts - macOS
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@antfu/eslint-config": "^3.16.0",
"eslint": "^9.39.4",
"eslint": "^10.2.1",
"eslint-plugin-format": "^0.1.3"
},
"pnpm": {
Expand Down
6 changes: 4 additions & 2 deletions packages/core/src/modules/proxy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const ProxyPlugin = function (context) {
async setProxy () {
const ip = '127.0.0.1'
const port = config.get().server.port
const setEnv = config.get().proxy.setEnv
const proxyConfig = config.get().proxy || {}
const setEnv = proxyConfig.setEnv ?? false
await shell.setSystemProxy({ ip, port, setEnv })
log.info(`开启系统代理成功:${ip}:${port}`)
event.fire('status', { key: 'proxy.enabled', value: true })
Expand All @@ -26,7 +27,8 @@ const ProxyPlugin = function (context) {

async unsetProxy (setEnv) {
if (setEnv == null) {
setEnv = config.get().proxy.setEnv
const proxyConfig = config.get().proxy || {}
setEnv = proxyConfig.setEnv ?? false
}
try {
await shell.setSystemProxy({ setEnv })
Expand Down
File renamed without changes.
104 changes: 104 additions & 0 deletions packages/gui/electron-builder.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
const publishUrl = process.env.VUE_APP_PUBLISH_URL
const publishProvider = process.env.VUE_APP_PUBLISH_PROVIDER

/** @type {import('electron-builder').Configuration} */
module.exports = {
appId: 'dev-sidecar',
productName: 'dev-sidecar',
artifactName: 'DevSidecar-${version}-${arch}.${ext}',
copyright: 'Copyright © 2020-' + new Date().getFullYear() + ' Greper, WangLiang, CuteOmega',
directories: {
output: 'dist_electron',
buildResources: 'build',
},
files: [
{
from: 'dist',
to: 'dist',
filter: [
'**/*',
'!win-*/**/*',
'!mac-*/**/*',
'!linux-*/**/*',
'!*.zip',
'!*.dmg',
'!*.blockmap',
'!*.exe',
'!*.AppImage',
'!*.deb',
'!*.rpm',
'!*.tar.gz',
'!*.flatpak',
'!builder-*.yml',
'!builder-*.yaml',
],
},
'src/**/*',
'package.json',
'extra/**/*',
],
extraResources: [
{
from: 'extra',
to: 'extra',
},
],
afterPack: './pkg/after-pack.cjs',
afterAllArtifactBuild: './pkg/after-all-artifact-build.cjs',
nsis: {
oneClick: false,
perMachine: true,
allowElevation: true,
allowToChangeInstallationDirectory: true,
},
win: {
icon: 'build/icons/',
target: [
{
target: 'nsis',
arch: ['x64', 'ia32', 'arm64'],
},
],
},
linux: {
icon: 'build/mac/',
target: [
{
target: 'deb',
arch: ['x64', 'arm64', 'armv7l'],
},
{
target: 'AppImage',
arch: ['x64', 'arm64', 'armv7l'],
},
{
target: 'tar.gz',
arch: ['x64', 'arm64', 'armv7l'],
},
{
target: 'rpm',
arch: ['x64', 'arm64', 'armv7l'],
},
{
target: 'flatpak',
arch: ['x64'],
},
],
appId: 'cn.docmirror.DevSidecar',
category: 'System',
},
mac: {
icon: './build/mac/icon.icns',
target: {
target: 'dmg',
arch: ['x64', 'arm64', 'universal'],
},
category: 'public.app-category.developer-tools',
},
publish: publishProvider
? {
provider: publishProvider,
url: publishUrl,
}
: undefined,
}
48 changes: 29 additions & 19 deletions packages/gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"name": "@docmirror/dev-sidecar-gui",
"version": "2.1.0",
"private": false,
"type": "module",
"main": "src/background.js",
"author": {
"email": "xiaojunnuo@qq.com",
"name": "Greper"
Expand All @@ -10,9 +12,10 @@
"homepage": "https://github.com/docmirror/dev-sidecar",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"electron:build": "vue-cli-service electron:build",
"electron": "vue-cli-service electron:serve",
"electron": "concurrently -k \"vue-cli-service serve --port 8080\" \"wait-on http-get://localhost:8080 && cross-env WEBPACK_DEV_SERVER_URL=http://localhost:8080 electron .\"",
"electron:build": "npm run build && electron-builder --config electron-builder.config.cjs",
"postinstall": "electron-builder install-app-deps",
"postuninstall": "electron-builder install-app-deps",
"electron:icons": "electron-icon-builder --input=./public/logo/win.png --output=build --flatten",
Expand All @@ -24,32 +27,39 @@
"@docmirror/mitmproxy": "workspace:*",
"@starknt/shutdown-handler-napi": "^0.0.3",
"@starknt/sysproxy": "^0.0.3",
"@vscode/sudo-prompt": "^9.3.1",
"adm-zip": "^0.5.16",
"ant-design-vue": "^1.7.8",
"@vscode/sudo-prompt": "^9.3.2",
"adm-zip": "^0.5.17",
"ant-design-vue": "^4.2.6",
"archiver": "^7.0.1",
"core-js": "^3.49.0",
"electron-baidu-tongji": "^1.0.5",
"electron-updater": "^6.3.9",
"electron-updater": "^6.8.3",
"json5": "^2.2.3",
"lodash": "^4.17.21",
"lodash": "^4.18.1",
"minimist": "^1.2.8",
"request-progress": "^3.0.0",
"sass": "^1.81.0",
"sass-loader": "^16.0.3",
"search-bar-vue2": "^1.0.0",
"vue": "^2.7.16",
"vue-json-editor-fix-cn": "^1.4.3",
"vue-router": "^3.6.5"
"sass": "^1.99.0",
"sass-loader": "^16.0.7",
"tiny-emitter": "^2.1.0",
"vue": "^3.5.33",
"vue-router": "^4.6.4",
"vue3-json-editor": "^1.1.5"
},
"devDependencies": {
"@babel/plugin-syntax-jsx": "^7.25.9",
"@babel/core": "^7.29.0",
"@babel/plugin-syntax-jsx": "^7.28.6",
"@vue/babel-helper-vue-jsx-merge-props": "^1.4.0",
"@vue/babel-preset-jsx": "^1.4.0",
"@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-service": "^5.0.8",
"electron": "^19.1.9",
"electron-builder": "^25.1.8",
"@vue/cli-plugin-babel": "^5.0.9",
"@vue/cli-service": "^5.0.9",
"concurrently": "^8.2.2",
"cross-env": "^7.0.3",
"electron": "^41.3.0",
"electron-builder": "^26.8.1",
"electron-icon-builder": "^2.0.1",
"json5-loader": "^4.0.1",
"vue-cli-plugin-electron-builder": "^3.0.0-alpha.4"
"path-browserify": "^1.0.1",
"wait-on": "^7.2.0"
},
"browserslist": [
"> 1%",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ function appendIntro (context, systemType, latest) {
const version = pkg.version
const partUpdateFile = `update-${systemType}-${version}.zip`

const partUpdateUrl = context.configuration.publish.url + partUpdateFile
const publishConfig = context.configuration.publish
if (!publishConfig || !publishConfig.url) {
console.log(`跳过 latest 修改: ${latest},publish 配置不可用`)
return
}
const partUpdateUrl = publishConfig.url + partUpdateFile

const latestFilePath = path.join(context.outDir, latest)
fs.appendFile(latestFilePath, `partPackage: ${partUpdateUrl}
partMiniVersion: 1.7.0
releaseNotes:
- 升级日志
- https://download.fastgit.org/docmirror/dev-sidecar/releases/download/v${version}/DevSidecar-${version}.exe
`, (err) => {
fs.appendFile(latestFilePath, `partPackage: ${partUpdateUrl}\npartMiniVersion: 1.7.0\nreleaseNotes:\n - 升级日志\n - https://download.fastgit.org/docmirror/dev-sidecar/releases/download/v${version}/DevSidecar-${version}.exe\n`, (err) => {
if (err) {
console.log('修改latest 失败')
}
Expand Down
32 changes: 24 additions & 8 deletions packages/gui/pkg/after-pack.js → packages/gui/pkg/after-pack.cjs
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
const fs = require('node:fs')
const path = require('node:path')
const AdmZip = require('adm-zip')
const archiver = require('archiver')
const pkg = require('../package.json')

function writeAppUpdateYmlForLinux () {
function writeAppUpdateYmlForLinux (appOutDir) {
const publishUrl = process.env.VUE_APP_PUBLISH_URL
const publishProvider = process.env.VUE_APP_PUBLISH_PROVIDER
// provider: generic
// url: 'http://dev-sidecar.docmirror.cn/update/preview/'
// updaterCacheDirName: '@docmirrordev-sidecar-gui-updater'
const fileContent = `provider: ${publishProvider}
url: '${publishUrl}'
updaterCacheDirName: '@docmirrordev-sidecar-gui-updater'
updaterCacheDirName: 'dev-sidecar-gui-updater'
`
console.log('write linux app-update.yml,updateUrl:', publishUrl)
const filePath = path.resolve('./dist_electron/linux-unpacked/resources/app-update.yml')
const filePath = path.join(appOutDir, 'resources', 'app-update.yml')
fs.writeFileSync(filePath, fileContent)
}
exports.default = async function (context) {
Expand All @@ -26,13 +26,29 @@ exports.default = async function (context) {
} else if (context.packager.platform.nodeName === 'linux') {
targetPath = path.join(context.appOutDir, './resources')
systemType = 'linux'
writeAppUpdateYmlForLinux()
writeAppUpdateYmlForLinux(context.appOutDir)
} else {
targetPath = path.join(context.appOutDir, './resources')
systemType = 'win'
}
const zip = new AdmZip()
zip.addLocalFolder(targetPath)
const partUpdateFile = `update-${systemType}-${pkg.version}.zip`
zip.writeZip(path.join(context.outDir, partUpdateFile))
const outputPath = path.join(context.outDir, partUpdateFile)

await new Promise((resolve, reject) => {
const output = fs.createWriteStream(outputPath)
const archive = archiver('zip', { zlib: { level: 9 } })

output.on('close', () => {
console.log(`Created ${partUpdateFile}, size: ${(archive.pointer() / 1024 / 1024).toFixed(2)} MB`)
resolve()
})

archive.on('error', (err) => {
reject(err)
})

archive.pipe(output)
archive.directory(targetPath, false)
archive.finalize()
})
}
Loading
Loading