From 29ddfe41f5742f4e8450fbe10f46f819cdf5c683 Mon Sep 17 00:00:00 2001 From: Daxian_feng <67625711+locolocoer@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:28:31 +0800 Subject: [PATCH 1/3] Create webpack.yml --- .github/workflows/webpack.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/webpack.yml diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml new file mode 100644 index 0000000..48a9f2a --- /dev/null +++ b/.github/workflows/webpack.yml @@ -0,0 +1,28 @@ +name: NodeJS with Webpack + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Build + run: | + npm install + npx run release From 3bfb96b09113bed29fa35b17a7ad68db92971df2 Mon Sep 17 00:00:00 2001 From: locolocoer <1457901147@qq.com> Date: Fri, 24 Jan 2025 15:29:15 +0800 Subject: [PATCH 2/3] bugfix:path error in windows --- src/views/proxy/index.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/views/proxy/index.vue b/src/views/proxy/index.vue index 055337a..989d0e1 100644 --- a/src/views/proxy/index.vue +++ b/src/views/proxy/index.vue @@ -565,14 +565,19 @@ const handleRandomProxyName = () => { `df_${editForm.value.type}_${result}`.toLocaleLowerCase(); }; +import path from "path"; +function normalizePath(filePath: string) { + return path.normalize(filePath).replace(/\\/g, "/"); +} + const handleSelectFile = (type: number, ext: string[]) => { ipcRenderer.invoke("file.selectFile", ext).then(r => { switch (type) { case 1: - editForm.value.https2httpCaFile = r[0]; + editForm.value.https2httpCaFile = normalizePath(r[0]); break; case 2: - editForm.value.https2httpKeyFile = r[0]; + editForm.value.https2httpKeyFile = normalizePath(r[0]); break; } console.log(r); From f0b420fe2e417af200ac0253bf6aed763ffec759 Mon Sep 17 00:00:00 2001 From: Daxian_feng <67625711+locolocoer@users.noreply.github.com> Date: Fri, 24 Jan 2025 21:58:18 +0800 Subject: [PATCH 3/3] Update webpack.yml --- .github/workflows/webpack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml index 48a9f2a..9461f66 100644 --- a/.github/workflows/webpack.yml +++ b/.github/workflows/webpack.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [18.x, 20.x, 22.x] + node-version: [18.8.0] steps: - uses: actions/checkout@v4