fix webdav import
Some checks are pending
Build / windows (arm64) (push) Waiting to run
Build / windows (ia32) (push) Waiting to run
Build / windows (x64) (push) Waiting to run
Build / windows7 (ia32) (push) Waiting to run
Build / windows7 (x64) (push) Waiting to run
Build / linux (arm64) (push) Waiting to run
Build / linux (x64) (push) Waiting to run
Build / macos (arm64) (push) Waiting to run
Build / macos (x64) (push) Waiting to run
Build / updater (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-bin) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron-bin) (push) Blocked by required conditions
Build / aur-git-updater (push) Waiting to run
Build / Update WinGet Package (push) Blocked by required conditions
Build / Update Homebrew cask (push) Blocked by required conditions

This commit is contained in:
pompurin404 2024-09-21 11:55:02 +08:00
parent eea4560104
commit f972873f87
No known key found for this signature in database
3 changed files with 16 additions and 20 deletions

View File

@ -54,7 +54,7 @@
"autoprefixer": "^10.4.20",
"cron-validator": "^1.3.1",
"driver.js": "^1.3.1",
"electron": "^32.1.0",
"electron": "^32.1.2",
"electron-builder": "^25.0.5",
"electron-vite": "^2.3.0",
"electron-window-state": "^5.0.3",

View File

@ -10,10 +10,10 @@ importers:
dependencies:
'@electron-toolkit/preload':
specifier: ^3.0.1
version: 3.0.1(electron@32.1.0)
version: 3.0.1(electron@32.1.2)
'@electron-toolkit/utils':
specifier: ^3.0.0
version: 3.0.0(electron@32.1.0)
version: 3.0.0(electron@32.1.2)
'@mihomo-party/sysproxy':
specifier: ^2.0.4
version: 2.0.4
@ -100,8 +100,8 @@ importers:
specifier: ^1.3.1
version: 1.3.1
electron:
specifier: ^32.1.0
version: 32.1.0
specifier: ^32.1.2
version: 32.1.2
electron-builder:
specifier: ^25.0.5
version: 25.0.5(electron-builder-squirrel-windows@25.0.4(dmg-builder@25.0.5))
@ -2914,8 +2914,8 @@ packages:
resolution: {integrity: sha512-1mNTwCfkolXl3kMf50yW3vE2lZj0y92P/HYWFBrb+v2S/pCka5mdwN3cagKm458A7NjndSwijynXgcLWRodsVg==}
engines: {node: '>=8.0.0'}
electron@32.1.0:
resolution: {integrity: sha512-4etE3K6vPUkHihf7nvawngbB5+jLuUJgZh31f9ki1Gfveo0qwNDkLv/doabw+4zFFWKUXI+uFUpyOpL5+RwS+Q==}
electron@32.1.2:
resolution: {integrity: sha512-CXe6doFzhmh1U7daOvUzmF6Cj8hssdYWMeEPRnRO6rB9/bbwMlWctcQ7P8NJXhLQ88/vYUJQrJvlJPh8qM0BRQ==}
engines: {node: '>= 12.20.55'}
hasBin: true
@ -5464,17 +5464,17 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@electron-toolkit/preload@3.0.1(electron@32.1.0)':
'@electron-toolkit/preload@3.0.1(electron@32.1.2)':
dependencies:
electron: 32.1.0
electron: 32.1.2
'@electron-toolkit/tsconfig@1.0.1(@types/node@22.5.5)':
dependencies:
'@types/node': 22.5.5
'@electron-toolkit/utils@3.0.0(electron@32.1.0)':
'@electron-toolkit/utils@3.0.0(electron@32.1.2)':
dependencies:
electron: 32.1.0
electron: 32.1.2
'@electron/asar@3.2.13':
dependencies:
@ -8991,7 +8991,7 @@ snapshots:
jsonfile: 4.0.0
mkdirp: 0.5.6
electron@32.1.0:
electron@32.1.2:
dependencies:
'@electron/get': 2.0.3
'@types/node': 20.16.5

View File

@ -13,8 +13,7 @@ import {
} from '../utils/dirs'
export async function webdavBackup(): Promise<boolean> {
const webdav = await import('webdav')
const createClient = webdav.createClient
const { createClient } = await import('webdav/dist/node/index.js')
const { webdavUrl = '', webdavUsername = '', webdavPassword = '' } = await getAppConfig()
const zip = new AdmZip()
@ -43,8 +42,7 @@ export async function webdavBackup(): Promise<boolean> {
}
export async function webdavRestore(filename: string): Promise<void> {
const webdav = await import('webdav')
const createClient = webdav.createClient
const { createClient } = await import('webdav/dist/node/index.js')
const { webdavUrl = '', webdavUsername = '', webdavPassword = '' } = await getAppConfig()
const client = createClient(webdavUrl, {
@ -57,8 +55,7 @@ export async function webdavRestore(filename: string): Promise<void> {
}
export async function listWebdavBackups(): Promise<string[]> {
const webdav = await import('webdav')
const createClient = webdav.createClient
const { createClient } = await import('webdav/dist/node/index.js')
const { webdavUrl = '', webdavUsername = '', webdavPassword = '' } = await getAppConfig()
const client = createClient(webdavUrl, {
@ -74,8 +71,7 @@ export async function listWebdavBackups(): Promise<string[]> {
}
export async function webdavDelete(filename: string): Promise<void> {
const webdav = await import('webdav')
const createClient = webdav.createClient
const { createClient } = await import('webdav/dist/node/index.js')
const { webdavUrl = '', webdavUsername = '', webdavPassword = '' } = await getAppConfig()
const client = createClient(webdavUrl, {