mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-22 14:28:12 -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-beta": "node ./scripts/upload-beta.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": {
|
||||
"@aws-sdk/client-s3": "^3.388.0",
|
||||
@ -41,91 +42,91 @@
|
||||
"@octokit/rest": "^19.0.7",
|
||||
"@picgo/i18n": "^1.0.0",
|
||||
"@picgo/store": "^2.0.4",
|
||||
"@smithy/node-http-handler": "^2.0.2",
|
||||
"@types/marked": "^4.0.8",
|
||||
"@smithy/node-http-handler": "^2.0.5",
|
||||
"@types/mime-types": "^2.1.1",
|
||||
"@videojs-player/vue": "^1.0.0",
|
||||
"ali-oss": "^6.18.0",
|
||||
"axios": "^1.4.0",
|
||||
"axios": "^1.5.0",
|
||||
"compare-versions": "^4.1.3",
|
||||
"core-js": "^3.27.1",
|
||||
"core-js": "^3.32.1",
|
||||
"cos-nodejs-sdk-v5": "^2.12.4",
|
||||
"dexie": "^3.2.4",
|
||||
"electron-updater": "^6.1.1",
|
||||
"element-plus": "^2.3.9",
|
||||
"epipebomb": "^1.0.0",
|
||||
"fast-xml-parser": "^4.2.5",
|
||||
"fast-xml-parser": "^4.2.7",
|
||||
"form-data": "^4.0.0",
|
||||
"fs-extra": "^11.1.1",
|
||||
"got": "^12.6.0",
|
||||
"highlight.js": "^11.7.0",
|
||||
"highlight.js": "^11.8.0",
|
||||
"hpagent": "^1.2.0",
|
||||
"keycode": "^2.2.0",
|
||||
"lodash-id": "^0.14.0",
|
||||
"lowdb": "^1.0.0",
|
||||
"marked": "^4.3.0",
|
||||
"marked": "^7.0.5",
|
||||
"mime-types": "^2.1.35",
|
||||
"mitt": "^3.0.0",
|
||||
"mitt": "^3.0.1",
|
||||
"node-ssh-no-cpu-features": "^1.0.1",
|
||||
"nodejs-file-downloader": "^4.12.1",
|
||||
"piclist": "^0.8.12",
|
||||
"pinia": "^2.1.4",
|
||||
"pinia-plugin-persistedstate": "^3.1.0",
|
||||
"piclist": "^0.8.14",
|
||||
"pinia": "^2.1.6",
|
||||
"pinia-plugin-persistedstate": "^3.2.0",
|
||||
"qiniu": "^7.9.0",
|
||||
"qrcode.vue": "^3.4.0",
|
||||
"qrcode.vue": "^3.4.1",
|
||||
"querystring": "^0.2.1",
|
||||
"shell-path": "2.1.0",
|
||||
"upyun": "^3.4.6",
|
||||
"uuid": "^9.0.0",
|
||||
"video.js": "^8.3.0",
|
||||
"video.js": "^8.5.2",
|
||||
"vue": "^3.3.4",
|
||||
"vue-router": "^4.2.4",
|
||||
"vue3-lazyload": "^0.3.6",
|
||||
"vue3-lazyload": "^0.3.8",
|
||||
"vue3-photo-preview": "^0.3.0",
|
||||
"webdav": "^5.2.3",
|
||||
"write-file-atomic": "^4.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.16.7",
|
||||
"@electron/notarize": "^2.0.0",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
||||
"@electron/notarize": "^2.1.0",
|
||||
"@picgo/bump-version": "^1.1.2",
|
||||
"@types/ali-oss": "^6.16.8",
|
||||
"@types/electron-devtools-installer": "^2.2.2",
|
||||
"@types/fs-extra": "^11.0.1",
|
||||
"@types/inquirer": "^6.5.0",
|
||||
"@types/js-yaml": "^4.0.5",
|
||||
"@types/lowdb": "^1.0.9",
|
||||
"@types/lowdb": "^1.0.11",
|
||||
"@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/tunnel": "^0.0.3",
|
||||
"@types/uuid": "^9.0.0",
|
||||
"@types/uuid": "^9.0.2",
|
||||
"@types/write-file-atomic": "^4.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
||||
"@typescript-eslint/parser": "^5.48.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
||||
"@typescript-eslint/parser": "^6.4.1",
|
||||
"@vue/cli-plugin-babel": "^5.0.8",
|
||||
"@vue/cli-plugin-eslint": "^5.0.8",
|
||||
"@vue/cli-plugin-router": "^5.0.8",
|
||||
"@vue/cli-plugin-typescript": "^5.0.8",
|
||||
"@vue/cli-service": "^5.0.8",
|
||||
"@vue/eslint-config-standard": "^8.0.1",
|
||||
"@vue/eslint-config-typescript": "^11.0.2",
|
||||
"@vue/runtime-dom": "^3.2.45",
|
||||
"conventional-changelog": "^3.1.18",
|
||||
"cz-customizable": "^6.2.0",
|
||||
"@vue/eslint-config-typescript": "^11.0.3",
|
||||
"@vue/runtime-dom": "^3.3.4",
|
||||
"conventional-changelog": "^5.0.0",
|
||||
"cz-customizable": "^7.0.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"electron": "^22.0.2",
|
||||
"electron-devtools-installer": "^3.2.0",
|
||||
"eslint": "^8.34.0",
|
||||
"eslint": "^8.48.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-promise": "^5.1.0",
|
||||
"eslint-plugin-vue": "^9.9.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-vue": "^9.17.0",
|
||||
"husky": "^3.1.0",
|
||||
"node-loader": "^2.0.0",
|
||||
"stylus": "^0.54.7",
|
||||
"stylus-loader": "^3.0.2",
|
||||
"npm-check-updates": "^16.13.1",
|
||||
"stylus": "^0.59.0",
|
||||
"stylus-loader": "^7.1.3",
|
||||
"typescript": "^4.9.5",
|
||||
"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 { FORCE_UPDATE } from '~/universal/events/constants'
|
||||
import { useATagClick } from './hooks/useATagClick'
|
||||
|
||||
useATagClick()
|
||||
const store = useStore()
|
||||
onBeforeMount(async () => {
|
||||
const config = await getConfig<IConfig>()
|
||||
|
@ -25,10 +25,31 @@
|
||||
<el-form-item
|
||||
v-for="(item, index) in configList"
|
||||
:key="item.name + index"
|
||||
:label="item.alias || item.name"
|
||||
:required="item.required"
|
||||
: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
|
||||
v-if="item.type === 'input' || item.type === 'password'"
|
||||
v-model="ruleForm[item.name]"
|
||||
@ -64,8 +85,8 @@
|
||||
<el-switch
|
||||
v-else-if="item.type === 'confirm'"
|
||||
v-model="ruleForm[item.name]"
|
||||
active-text="yes"
|
||||
inactive-text="no"
|
||||
:active-text="item.confirmText || 'yes'"
|
||||
:inactive-text="item.cancelText || 'no'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<slot />
|
||||
@ -79,6 +100,8 @@ import { getConfig } from '@/utils/dataSender'
|
||||
import { useRoute } from 'vue-router'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import { T as $T } from '@/i18n'
|
||||
import { QuestionFilled } from '@element-plus/icons-vue'
|
||||
import { marked } from 'marked'
|
||||
|
||||
interface IProps {
|
||||
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 () {
|
||||
switch (props.type) {
|
||||
case 'plugin': {
|
||||
@ -182,6 +213,10 @@ defineExpose({
|
||||
})
|
||||
</script>
|
||||
<style lang='stylus'>
|
||||
.config-form-common-tips
|
||||
a
|
||||
color #409EFF
|
||||
text-decoration none
|
||||
#config-form
|
||||
.el-form
|
||||
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 res = await axios.get(fileUrl, options)
|
||||
const content = res.data
|
||||
markDownContent.value = marked(content)
|
||||
markDownContent.value = marked.parse(content)
|
||||
isShowMarkDownDialog.value = true
|
||||
} catch (error) {
|
||||
ElMessage.error($T('MANAGE_BUCKET_END_LOADING_MESSAGE_FAIL'))
|
||||
|
@ -1,4 +1,6 @@
|
||||
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
|
||||
@ -16,3 +18,7 @@ export const getRawData = (args: any): any => {
|
||||
}
|
||||
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 {
|
||||
$http: typeof axios
|
||||
$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
|
||||
value?: any
|
||||
}[]
|
||||
/** support markdown */
|
||||
tips?: string
|
||||
[propName: string]: any
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user