mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-22 22:28:14 -05:00
⬆️ Upgrade: upgrade deps
This commit is contained in:
parent
e15aa846e5
commit
bfbfef17b2
65
package.json
65
package.json
@ -29,7 +29,8 @@
|
|||||||
"upload-dist": "node ./scripts/upload-dist-to-r2.js",
|
"upload-dist": "node ./scripts/upload-dist-to-r2.js",
|
||||||
"upload-beta": "node ./scripts/upload-beta.js",
|
"upload-beta": "node ./scripts/upload-beta.js",
|
||||||
"link": "node ./scripts/link.js",
|
"link": "node ./scripts/link.js",
|
||||||
"sha256": "node ./scripts/gen-sha256.js"
|
"sha256": "node ./scripts/gen-sha256.js",
|
||||||
|
"ncu": "node ./scripts/check-dep.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "^3.388.0",
|
"@aws-sdk/client-s3": "^3.388.0",
|
||||||
@ -41,91 +42,91 @@
|
|||||||
"@octokit/rest": "^19.0.7",
|
"@octokit/rest": "^19.0.7",
|
||||||
"@picgo/i18n": "^1.0.0",
|
"@picgo/i18n": "^1.0.0",
|
||||||
"@picgo/store": "^2.0.4",
|
"@picgo/store": "^2.0.4",
|
||||||
"@smithy/node-http-handler": "^2.0.2",
|
"@smithy/node-http-handler": "^2.0.5",
|
||||||
"@types/marked": "^4.0.8",
|
|
||||||
"@types/mime-types": "^2.1.1",
|
"@types/mime-types": "^2.1.1",
|
||||||
"@videojs-player/vue": "^1.0.0",
|
"@videojs-player/vue": "^1.0.0",
|
||||||
"ali-oss": "^6.18.0",
|
"ali-oss": "^6.18.0",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.5.0",
|
||||||
"compare-versions": "^4.1.3",
|
"compare-versions": "^4.1.3",
|
||||||
"core-js": "^3.27.1",
|
"core-js": "^3.32.1",
|
||||||
"cos-nodejs-sdk-v5": "^2.12.4",
|
"cos-nodejs-sdk-v5": "^2.12.4",
|
||||||
"dexie": "^3.2.4",
|
"dexie": "^3.2.4",
|
||||||
"electron-updater": "^6.1.1",
|
"electron-updater": "^6.1.1",
|
||||||
"element-plus": "^2.3.9",
|
"element-plus": "^2.3.9",
|
||||||
"epipebomb": "^1.0.0",
|
"epipebomb": "^1.0.0",
|
||||||
"fast-xml-parser": "^4.2.5",
|
"fast-xml-parser": "^4.2.7",
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
"fs-extra": "^11.1.1",
|
"fs-extra": "^11.1.1",
|
||||||
"got": "^12.6.0",
|
"got": "^12.6.0",
|
||||||
"highlight.js": "^11.7.0",
|
"highlight.js": "^11.8.0",
|
||||||
"hpagent": "^1.2.0",
|
"hpagent": "^1.2.0",
|
||||||
"keycode": "^2.2.0",
|
"keycode": "^2.2.0",
|
||||||
"lodash-id": "^0.14.0",
|
"lodash-id": "^0.14.0",
|
||||||
"lowdb": "^1.0.0",
|
"lowdb": "^1.0.0",
|
||||||
"marked": "^4.3.0",
|
"marked": "^7.0.5",
|
||||||
"mime-types": "^2.1.35",
|
"mime-types": "^2.1.35",
|
||||||
"mitt": "^3.0.0",
|
"mitt": "^3.0.1",
|
||||||
"node-ssh-no-cpu-features": "^1.0.1",
|
"node-ssh-no-cpu-features": "^1.0.1",
|
||||||
"nodejs-file-downloader": "^4.12.1",
|
"nodejs-file-downloader": "^4.12.1",
|
||||||
"piclist": "^0.8.12",
|
"piclist": "^0.8.14",
|
||||||
"pinia": "^2.1.4",
|
"pinia": "^2.1.6",
|
||||||
"pinia-plugin-persistedstate": "^3.1.0",
|
"pinia-plugin-persistedstate": "^3.2.0",
|
||||||
"qiniu": "^7.9.0",
|
"qiniu": "^7.9.0",
|
||||||
"qrcode.vue": "^3.4.0",
|
"qrcode.vue": "^3.4.1",
|
||||||
"querystring": "^0.2.1",
|
"querystring": "^0.2.1",
|
||||||
"shell-path": "2.1.0",
|
"shell-path": "2.1.0",
|
||||||
"upyun": "^3.4.6",
|
"upyun": "^3.4.6",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"video.js": "^8.3.0",
|
"video.js": "^8.5.2",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.4",
|
||||||
"vue-router": "^4.2.4",
|
"vue-router": "^4.2.4",
|
||||||
"vue3-lazyload": "^0.3.6",
|
"vue3-lazyload": "^0.3.8",
|
||||||
"vue3-photo-preview": "^0.3.0",
|
"vue3-photo-preview": "^0.3.0",
|
||||||
"webdav": "^5.2.3",
|
"webdav": "^5.2.3",
|
||||||
"write-file-atomic": "^4.0.1"
|
"write-file-atomic": "^4.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/plugin-proposal-optional-chaining": "^7.16.7",
|
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
||||||
"@electron/notarize": "^2.0.0",
|
"@electron/notarize": "^2.1.0",
|
||||||
"@picgo/bump-version": "^1.1.2",
|
"@picgo/bump-version": "^1.1.2",
|
||||||
"@types/ali-oss": "^6.16.8",
|
"@types/ali-oss": "^6.16.8",
|
||||||
"@types/electron-devtools-installer": "^2.2.2",
|
"@types/electron-devtools-installer": "^2.2.2",
|
||||||
"@types/fs-extra": "^11.0.1",
|
"@types/fs-extra": "^11.0.1",
|
||||||
"@types/inquirer": "^6.5.0",
|
"@types/inquirer": "^6.5.0",
|
||||||
"@types/js-yaml": "^4.0.5",
|
"@types/js-yaml": "^4.0.5",
|
||||||
"@types/lowdb": "^1.0.9",
|
"@types/lowdb": "^1.0.11",
|
||||||
"@types/node": "^16.10.2",
|
"@types/node": "^16.10.2",
|
||||||
"@types/request-promise-native": "^1.0.17",
|
"@types/request-promise-native": "^1.0.18",
|
||||||
"@types/semver": "^7.5.0",
|
"@types/semver": "^7.5.0",
|
||||||
"@types/tunnel": "^0.0.3",
|
"@types/tunnel": "^0.0.3",
|
||||||
"@types/uuid": "^9.0.0",
|
"@types/uuid": "^9.0.2",
|
||||||
"@types/write-file-atomic": "^4.0.0",
|
"@types/write-file-atomic": "^4.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
||||||
"@typescript-eslint/parser": "^5.48.0",
|
"@typescript-eslint/parser": "^6.4.1",
|
||||||
"@vue/cli-plugin-babel": "^5.0.8",
|
"@vue/cli-plugin-babel": "^5.0.8",
|
||||||
"@vue/cli-plugin-eslint": "^5.0.8",
|
"@vue/cli-plugin-eslint": "^5.0.8",
|
||||||
"@vue/cli-plugin-router": "^5.0.8",
|
"@vue/cli-plugin-router": "^5.0.8",
|
||||||
"@vue/cli-plugin-typescript": "^5.0.8",
|
"@vue/cli-plugin-typescript": "^5.0.8",
|
||||||
"@vue/cli-service": "^5.0.8",
|
"@vue/cli-service": "^5.0.8",
|
||||||
"@vue/eslint-config-standard": "^8.0.1",
|
"@vue/eslint-config-standard": "^8.0.1",
|
||||||
"@vue/eslint-config-typescript": "^11.0.2",
|
"@vue/eslint-config-typescript": "^11.0.3",
|
||||||
"@vue/runtime-dom": "^3.2.45",
|
"@vue/runtime-dom": "^3.3.4",
|
||||||
"conventional-changelog": "^3.1.18",
|
"conventional-changelog": "^5.0.0",
|
||||||
"cz-customizable": "^6.2.0",
|
"cz-customizable": "^7.0.0",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"electron": "^22.0.2",
|
"electron": "^22.0.2",
|
||||||
"electron-devtools-installer": "^3.2.0",
|
"electron-devtools-installer": "^3.2.0",
|
||||||
"eslint": "^8.34.0",
|
"eslint": "^8.48.0",
|
||||||
"eslint-config-standard": ">=16.0.0",
|
"eslint-config-standard": ">=16.0.0",
|
||||||
"eslint-plugin-import": "^2.24.2",
|
"eslint-plugin-import": "^2.28.1",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-promise": "^5.1.0",
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
"eslint-plugin-vue": "^9.9.0",
|
"eslint-plugin-vue": "^9.17.0",
|
||||||
"husky": "^3.1.0",
|
"husky": "^3.1.0",
|
||||||
"node-loader": "^2.0.0",
|
"node-loader": "^2.0.0",
|
||||||
"stylus": "^0.54.7",
|
"npm-check-updates": "^16.13.1",
|
||||||
"stylus-loader": "^3.0.2",
|
"stylus": "^0.59.0",
|
||||||
|
"stylus-loader": "^7.1.3",
|
||||||
"typescript": "^4.9.5",
|
"typescript": "^4.9.5",
|
||||||
"vue-cli-plugin-electron-builder": "^3.0.0-alpha.4"
|
"vue-cli-plugin-electron-builder": "^3.0.0-alpha.4"
|
||||||
},
|
},
|
||||||
|
38
scripts/check-dep.js
Normal file
38
scripts/check-dep.js
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
const ncu = require('npm-check-updates')
|
||||||
|
const axios = require('axios')
|
||||||
|
|
||||||
|
async function getRepositoryInfo (packageName) {
|
||||||
|
try {
|
||||||
|
const { data } = await axios.get(`https://registry.npmjs.org/${packageName}`)
|
||||||
|
const repository = data.repository
|
||||||
|
if (repository && repository.url) {
|
||||||
|
const gitUrl = repository.url.replace('git+', '').replace('.git', '')
|
||||||
|
const isGitHub = gitUrl.includes('github.com')
|
||||||
|
|
||||||
|
return isGitHub ? `${gitUrl}/releases` : gitUrl
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`Error fetching repository info for ${packageName}: ${error.message}`)
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
async function checkUpdates () {
|
||||||
|
const updated = await ncu.run({
|
||||||
|
packageFile: './package.json',
|
||||||
|
upgrade: false
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!Object.keys(updated).length) {
|
||||||
|
console.log('All dependencies are up-to-date!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('Dependencies that need to be updated:')
|
||||||
|
for (const [key] of Object.entries(updated)) {
|
||||||
|
const repoUrl = await getRepositoryInfo(key)
|
||||||
|
console.log(`${key}: ${updated[key]} ${repoUrl ? `- [GitHub/Repo](${repoUrl})` : ''}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
checkUpdates().catch(err => console.error(err))
|
@ -20,7 +20,9 @@ import type { IConfig } from 'piclist'
|
|||||||
// 其他工具
|
// 其他工具
|
||||||
import bus from './utils/bus'
|
import bus from './utils/bus'
|
||||||
import { FORCE_UPDATE } from '~/universal/events/constants'
|
import { FORCE_UPDATE } from '~/universal/events/constants'
|
||||||
|
import { useATagClick } from './hooks/useATagClick'
|
||||||
|
|
||||||
|
useATagClick()
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
const config = await getConfig<IConfig>()
|
const config = await getConfig<IConfig>()
|
||||||
|
@ -25,10 +25,31 @@
|
|||||||
<el-form-item
|
<el-form-item
|
||||||
v-for="(item, index) in configList"
|
v-for="(item, index) in configList"
|
||||||
:key="item.name + index"
|
:key="item.name + index"
|
||||||
:label="item.alias || item.name"
|
|
||||||
:required="item.required"
|
:required="item.required"
|
||||||
:prop="item.name"
|
:prop="item.name"
|
||||||
>
|
>
|
||||||
|
<template #label>
|
||||||
|
<el-row align="middle">
|
||||||
|
{{ item.alias || item.name }}
|
||||||
|
<template v-if="item.tips">
|
||||||
|
<el-tooltip
|
||||||
|
class="item"
|
||||||
|
effect="dark"
|
||||||
|
placement="right"
|
||||||
|
>
|
||||||
|
<template #content>
|
||||||
|
<span
|
||||||
|
class="config-form-common-tips"
|
||||||
|
v-html="transformMarkdownToHTML(item.tips)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<el-icon class="ml-[4px] cursor-pointer hover:text-blue">
|
||||||
|
<QuestionFilled />
|
||||||
|
</el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="item.type === 'input' || item.type === 'password'"
|
v-if="item.type === 'input' || item.type === 'password'"
|
||||||
v-model="ruleForm[item.name]"
|
v-model="ruleForm[item.name]"
|
||||||
@ -64,8 +85,8 @@
|
|||||||
<el-switch
|
<el-switch
|
||||||
v-else-if="item.type === 'confirm'"
|
v-else-if="item.type === 'confirm'"
|
||||||
v-model="ruleForm[item.name]"
|
v-model="ruleForm[item.name]"
|
||||||
active-text="yes"
|
:active-text="item.confirmText || 'yes'"
|
||||||
inactive-text="no"
|
:inactive-text="item.cancelText || 'no'"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<slot />
|
<slot />
|
||||||
@ -79,6 +100,8 @@ import { getConfig } from '@/utils/dataSender'
|
|||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import { T as $T } from '@/i18n'
|
import { T as $T } from '@/i18n'
|
||||||
|
import { QuestionFilled } from '@element-plus/icons-vue'
|
||||||
|
import { marked } from 'marked'
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
config: any[]
|
config: any[]
|
||||||
@ -118,6 +141,14 @@ async function validate (): Promise<IStringKeyMap | false> {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function transformMarkdownToHTML (markdown: string) {
|
||||||
|
try {
|
||||||
|
return marked.parse(markdown)
|
||||||
|
} catch (e) {
|
||||||
|
return markdown
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getConfigType () {
|
function getConfigType () {
|
||||||
switch (props.type) {
|
switch (props.type) {
|
||||||
case 'plugin': {
|
case 'plugin': {
|
||||||
@ -182,6 +213,10 @@ defineExpose({
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang='stylus'>
|
<style lang='stylus'>
|
||||||
|
.config-form-common-tips
|
||||||
|
a
|
||||||
|
color #409EFF
|
||||||
|
text-decoration none
|
||||||
#config-form
|
#config-form
|
||||||
.el-form
|
.el-form
|
||||||
label
|
label
|
||||||
|
19
src/renderer/hooks/useATagClick.ts
Normal file
19
src/renderer/hooks/useATagClick.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import { openURL } from '@/utils/common'
|
||||||
|
import { onMounted, onUnmounted } from 'vue'
|
||||||
|
|
||||||
|
export function useATagClick () {
|
||||||
|
const handleATagClick = (e: MouseEvent) => {
|
||||||
|
if (e.target instanceof HTMLAnchorElement) {
|
||||||
|
if (e.target.href) {
|
||||||
|
e.preventDefault()
|
||||||
|
openURL(e.target.href)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
document.addEventListener('click', handleATagClick)
|
||||||
|
})
|
||||||
|
onUnmounted(() => {
|
||||||
|
document.removeEventListener('click', handleATagClick)
|
||||||
|
})
|
||||||
|
}
|
@ -1971,7 +1971,7 @@ async function handleClickFile (item: any) {
|
|||||||
const fileUrl = item.url
|
const fileUrl = item.url
|
||||||
const res = await axios.get(fileUrl, options)
|
const res = await axios.get(fileUrl, options)
|
||||||
const content = res.data
|
const content = res.data
|
||||||
markDownContent.value = marked(content)
|
markDownContent.value = marked.parse(content)
|
||||||
isShowMarkDownDialog.value = true
|
isShowMarkDownDialog.value = true
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ElMessage.error($T('MANAGE_BUCKET_END_LOADING_MESSAGE_FAIL'))
|
ElMessage.error($T('MANAGE_BUCKET_END_LOADING_MESSAGE_FAIL'))
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import { isReactive, isRef, toRaw, unref } from 'vue'
|
import { isReactive, isRef, toRaw, unref } from 'vue'
|
||||||
|
import { sendToMain } from './dataSender'
|
||||||
|
import { OPEN_URL } from '~/universal/events/constants'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get raw data from reactive or ref
|
* get raw data from reactive or ref
|
||||||
@ -16,3 +18,7 @@ export const getRawData = (args: any): any => {
|
|||||||
}
|
}
|
||||||
return args
|
return args
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const openURL = (url: string) => {
|
||||||
|
sendToMain(OPEN_URL, url)
|
||||||
|
}
|
||||||
|
2
src/universal/types/extra-vue.d.ts
vendored
2
src/universal/types/extra-vue.d.ts
vendored
@ -15,7 +15,7 @@ declare module 'vue/types/vue' {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
declare module 'vue' {
|
||||||
interface ComponentCustomProperties {
|
interface ComponentCustomProperties {
|
||||||
$http: typeof axios
|
$http: typeof axios
|
||||||
$builtInPicBed: string[]
|
$builtInPicBed: string[]
|
||||||
|
2
src/universal/types/types.d.ts
vendored
2
src/universal/types/types.d.ts
vendored
@ -164,6 +164,8 @@ interface IPicGoPluginConfig {
|
|||||||
name?: string
|
name?: string
|
||||||
value?: any
|
value?: any
|
||||||
}[]
|
}[]
|
||||||
|
/** support markdown */
|
||||||
|
tips?: string
|
||||||
[propName: string]: any
|
[propName: string]: any
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user