mirror of
https://github.com/pompurin404/mihomo-party.git
synced 2024-11-16 11:42:19 +08:00
fix webdav import
This commit is contained in:
parent
d3a4a7f3f0
commit
bed8e80f59
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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, {
|
||||
|
|
Loading…
Reference in New Issue
Block a user